http://qs321.pair.com?node_id=11138700


in reply to Re^3: Anyone with XS experience willing to create a high performance data type for Perl?
in thread Anyone with XS experience willing to create a high performance data type for Perl?

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.

I reckon we are the only monastery ever to have a dungeon staffed with 16,000 zombies.