Re: bigatom.e - New ba_log10() function (fast)
- Posted by _tom (admin) Dec 23, 2014
- 1147 views
With shortcut to large numbers
Log10 (x * y) = log10 (x) + log10 (y)
And if 'x' or 'y' is a power of ten, the logarithm is the Exponent and simply add it to the logarithm of another number with exponent 0 So not a big number and calculates faster ... - ... The logarithm of a small number and a sum - Surprises me not having fallen before ... so simple ... so effective. - -
123456789 = 1.23456789 * 10 ^ 8 = {1, 8, {1,2,3,4,5,6,7,8,9}} Log10 (123456789) = 8 + log10 (1.23456789) = 8 + 1 + log10 (0.123456789)