On Sun, May 3, 2009 at 12:18 PM, Andy Armstrong <a...@hexten.net> wrote:
> On 3 May 2009, at 20:07, Bill Ward wrote: > >> For my module Number::Format I am getting a strange result from cpan >> testers that I can't replicate. See this error report... >> http://www.nntp.perl.org/group/perl.cpan.testers/2009/03/msg3560533.html >> [...]Since it's using '==' it shouldn't be possible to get those errors, >> right? Anyone have any thoughts? >> > > > Yeah, that's floating point. There can be a difference between the two > values that's too small to display but big enough to make them non-equal. > '==' is /always/ risky with FP values. > > You should instead check for the value being within an acceptable range. > Do you think I should change it to use eq in the test?