On Mon, Sep 20, 2010 at 4:00 AM, Nigel Horne <n...@bandsman.co.uk> wrote:
> if((a - b) <= 0.000000001)
>
> I think that the author of this module has forgotten this basic principal.

The comparison is between "1.18" and "0.99" which would not give that problem.

The culprit appears to be this:

    cpan[2]> ! printf "%g\n", 0 + (1 < 0)
    3.33761e-308

The code is doing something equivalent -- though I'm not sure why.
But perl is adding 0 + 0 and getting 3.34e-308 when it numifies it.
That seems like a bug in perl on that platform.  If you run that from
the command line, do you get the same thing?

    $ perl -e 'printf "%g\n", 0 + (1 < 0)'

-- David

Reply via email to