in reply to 64-bit build fails numeric tests

1/10 is a periodic numbers in binary (like 1/3 is in decimal). It can't be represented exactly as a float. Normally, the least significant bits are rounded off to give the appearance of being able to store those numbers. You're not getting that rounding for some reason.

I find it odd that a 64-bit build uses double-precision numbers, but I don't know if that's unusual or wrong. I'm not experienced with those.

If you don't get a solution here, I suggest that you file a bug report. It'll put you in touch with people better equipped to solve this problem.

Replies are listed 'Best First'.
Re^2: 64-bit build fails numeric tests
by syphilis (Archbishop) on Feb 02, 2010 at 13:45 UTC
    I find it odd that a 64-bit build uses double-precision numbers, but I don't know if that's unusual or wrong

    Looking at the INSTALL file that ships with the perl source, it appears that -Duse64bitall switches on 64 bit ints and longs, and the use of 64bit pointers ... but doesn't switch on -Duselongdouble. If you want the extra precision that -Duselongdouble provides it seems that you have to specify either -Duselongdouble or -Dusemorebits.

    It could be interesting to know if there were any compiler flags (other than the ones already stated) specified by the OP.

    Cheers,
    Rob

      Rob,

      Adding -Duselongdouble seems to have fixed the problem. I suspect I shall have to spend more time trying to figure out exactly what 64-bit features I need and exactly how to get those and no others. But at least now I have a consistent, working build.

      Thanks to you and everyone who contributed to the thread.