No such thing as a small change | |
PerlMonks |
Re: Comparing results of math operations (try integer)by LanX (Saint) |
on Apr 16, 2014 at 09:55 UTC ( [id://1082475]=note: print w/replies, xml ) | Need Help?? |
Better avoid decimal fractions! They can't always be transformed loss-free to binary fractions (see Re: eq vs ==) But this works:
So just calculate with integers and shift the decimal point afterwards! The deeper reason for this mess is that Humans have too many fingers ;-)
Cheers Rolf ( addicted to the Perl Programming Language)
In Section
Seekers of Perl Wisdom
|
|