in reply to Re: test fails on 64bit uselongdouble Perl
in thread test fails on 64bit uselongdouble Perl

Thanks for the ideas moritz.

I should have mentioned that this specific test also fails without the sprintf. (And for these values the divisions should yield whole number results.) Also, for my application there will be floating-point numbers as part of the input so it would be hard to eliminate them in this calculation

I'll look at bigrat, thanks.

  • Comment on Re^2: test fails on 64bit uselongdouble Perl

Replies are listed 'Best First'.
Re^3: test fails on 64bit uselongdouble Perl
by frankcox (Acolyte) on Oct 29, 2009 at 19:07 UTC

    well, I should have tried bigrat before I replied...

    If I just 'use bigrat' I get this during make test:

    Deep recursion on subroutine "Math::BigInt::bsub"

    And then, after a very long time:

    Out of memory!

    It's possible some Math::* module will help but I don't know which one since I don't understand the underlying problem.

    One question I have is why uselongdouble gives less accurate results in this case?

    And also, shouldn't all versions of Perl return the same result for a relatively simple calculation?