We don't bite newbies here... much | |
PerlMonks |
Re^4: Anyone with XS experience willing to create a high performance data type for Perl?by jdporter (Paladin) |
on Nov 10, 2021 at 17:59 UTC ( [id://11138700]=note: print w/replies, xml ) | Need Help?? |
10 and 99 (1E1 and 9.9E1) are the same order of magnitude, but 99 and 100 (9.9E1 and 1E2) are different orders of magnitude No. That's the problem with taking such a definition literally. The "order of magnitude" of a number is its base-10 logarithm, usually rounded to the nearest whole number. Try this: round( log10(X) - log10(Y) ) In terms of "order of magnitude", 99 and 100 are the same number.
In Section
Seekers of Perl Wisdom
|
|