Do you know where your variables are? | |
PerlMonks |
Re: Comparing Reals with a Toleranceby ruoso (Curate) |
on Dec 22, 2005 at 15:52 UTC ( [id://518555]=note: print w/replies, xml ) | Need Help?? |
Hmmm... Reading your post, I wondered if it wouldn't be good to have a module that overloads this operators applying such tolerance... I took a look on CPAN and couldn't found such module. Update: Math::BigFloat seems to do someting like that... like...
It would be possibly interesting to have different tolerances for different numbers, but I don't know what to do if two numbers with different tolerances are compared, or worse, if you sum them... Maybe using the tolerance of the leftest operand... I Don't know...
daniel
In Section
Seekers of Perl Wisdom
|
|