calculate the # of digits with log10 and free str