Dan Rowles wrote:
> I have encountered some weirdness with floating point numbers, and I was
> hoping for your collective wisdom on what to do next.
That's just the way floating point numbers work. Epsilon is your friend:
use constant epsilon => 0.0000001; # a suitably small number
sub fp_equal {
abs($_[0] - $_[1]) < epsilon;
}
http://en.wikipedia.org/wiki/Machine_epsilon
A