They can't always be transformed loss-free to binary fractions (see Re: eq vs ==)
But this works:
DB<107> $x=95*806 /100; => "765.7" DB<108> $y=13*589 /10; => "765.7" DB<109> $x <=> $y => 0
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 reply to Re: Comparing results of math operations (try integer)
by LanX
in thread Comparing results of math operations
by stangoesagain
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |