develooper Front page | perl.perl5.porters | Postings from October 2013

Re: [perl #120363] perl-5.18.0 apparently miscalculates the NV 1e-298

Thread Previous | Thread Next
From:
Zefram
Date:
October 27, 2013 15:31
Subject:
Re: [perl #120363] perl-5.18.0 apparently miscalculates the NV 1e-298
Message ID:
20131027153112.GD21945@fysh.org
I wrote:
>I'm mystified as to how Perl 10**-298 gets a different result from C
>powl(), because pp_pow() clearly uses powl() underneath.

I've narrowed this difference down to C constant folding.  powl() on
literal arguments gets folded at C compile time, and produces a different
result from powl() that actually runs at runtime.  Not a Perl bug.
(Still a separate bug from the text->float conversion errors that this
ticket is really concerned with.)

-zefram

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About