Re: bigatom.e - New ba_log10() function (fast)

new topic     » goto parent     » topic index » view thread      » older message » newer message

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) 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu