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

I tested the advice of ikegami here and changed my code to round floating-point numbers rather than truncate as I was inadvertently doing. That is, I changed:

return sprintf "%d", $out; # Wrong, truncates.

to:

return sprintf "%.0f", sprintf "%.6f", $out;

With this change I now see consistent results on all Perl platforms including 64bit uselongdouble ones. Thanks to everyone who helped out here! I apologize for being a little slow to see the light but the end result is good.

I still plan to rework my algorithm but now I can do that as part of a regular release rather than as part of a bug fix.