develooper Front page | perl.perl5.porters | Postings from July 2018

[perl #41202] text->float conversion gives wrong answer

Thread Next
From: via RT
July 16, 2018 05:25
[perl #41202] text->float conversion gives wrong answer
Message ID:
I should probably provide an up-to-date script that checks floating point assignments for correctness.
The one I'm now using is attached as (Some of my earlier attempts did not handle subnormal values correctly.)

The script requires Math-MPFR-4.03, and that module needs to have been built against mpfr-3.1.6 or later - best to build against the current stable mpfr-4.0.1 if possible.
Running the script as, say, "perl 324 100000" will select a hundred thousand random values in the range 1e-325 to 10e324 and record any that don't assign correctly.

I'd be interested to hear of any mis-assignments that it catches on perls that define $Config{d_strtod} or $Config{d_strtold} && to which the patch under consideration has been applied.


via perlbug:  queue: perl5 status: open

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About