New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
printf %.20g value different from %.20f value #14062
Comments
From dmi@questrel.comCreated by dmi@questrel.comperl -e 'printf"%.20f\n%.20g\n",(-3895.3125*-3341.25*8231)x2' should be identical except for trailing 0's Perl Info
|
From @jkeenanOn Sun Aug 31 21:32:57 2014, dmi wrote:
I don't have perl-5.16.2 available, so I cannot speak to any differences between 5.16.2 and 5.16.3. However, using perlbrew to switch among the final or most recent sub-versions of the last 4 annual releases, I get the same output in each: ##### $ perlbrew switch perl-5.16.3 $ perlbrew switch perl-5.18.2 $ perlbrew switch perl-5.20.0 So I cannot reproduce the bug. Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Mon Sep 01 05:56:23 2014, jkeenan wrote:
More data. Tux alerted me to the fact that it is possible on the Dromedary server to run a given Perl program with almost any released version of Perl 5 and compare results. I did so. Here is an excerpt from those results (attached in gzipped file), focusing on 3 different builds of perl-5.20.0, all built on the same machine. ##### And here are the runs for perl-5.16.2 and perl-5.16.3 on the same machine: ##### So my *preliminary* observation is that there are likely to be small differences in the output of those two different 'printf' formats for a given release of perl depending on how you build that release. Bug or feature? Discuss (but let's not get dogmatic). Thank you very much. |
From @jhiOn Monday-201409-01, 9:55, James E Keenan via RT wrote:
Feature, for now... as seen on the inf/nan thread, this is what we have |
From @ikegamiAll the builds with "ld" give 107128217302.734375 What's "ld"? |
From @jhiOn Monday-201409-01, 16:52, Eric Brine wrote:
"long double". Which may mean many things. Sometimes it is == double. |
From @sisyphus-----Original Message----- On Monday-201409-01, 16:52, Eric Brine wrote:
"long double". Which may mean many things. Sometimes it is == double. |
From @sisyphus... and now for the message I was trying to send: -----Original Message----- On Monday-201409-01, 9:55, James E Keenan via RT wrote:
It looks like a bug to me. This bug is *almost* excusable when the NV has 53 bits of precision - in The sprintf docs say: but that documentation is wrong wrt 107128217302.734375 when the NV has 53 Cheers, |
Migrated from rt.perl.org#122672 (status was 'open')
Searchable as RT122672$
The text was updated successfully, but these errors were encountered: