There's more than one way to do things | |
PerlMonks |
Re: My floating point comparison does not work. Why ?by TedPride (Priest) |
on Oct 30, 2004 at 23:22 UTC ( [id://404070]=note: print w/replies, xml ) | Need Help?? |
You should also note that while floating point numbers won't be exact, two numbers arrived at through the same calculation (4 / 7, for instance) will be the same. This means that under some conditions, rounding isn't necessary - and under others, a simple fraction class is probably going to be better than trying to approximate comparisons.
In Section
Seekers of Perl Wisdom
|
|