in reply to test fails on 64bit uselongdouble Perl

I can think of several options:
Perl 6 - links to (nearly) everything that is Perl 6.

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

    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.

      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?