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
$] sometimes has bad numeric value #10095
Comments
From zefram@fysh.orgOn some perl versions, the numeric value of $] is not equal to the $ perlver 5.8.8-i32-f63 perl -le 'print That's perl 5.8.8 *configured to use x86 long double*. The same version $ perlver 5.8.8-i32-f52 perl -le 'print It turns out that on the long-double 5.8.8 $]'s numeric value is the next $ perlver 5.8.8-i32-f63 perl -MData::Float=float_hex -le 'print float_hex($]); print float_hex(5.008008)' On a systematic check of every version from 5.6.0 to date, except for 5.6.1 long-double In no case was Possible cause of failure: $ perlver 5.10.1-i32-f52 perl -MData::Float=float_hex -lwe 'print float_hex(5.009001); print float_hex(5+0.009+0.000001)' If $] is indeed being built up by summing the parts in this way, suffering (I knew we were skating on thin ice in using binary floating point to -zefram |
From @xdgOn Tue, Jan 19, 2010 at 4:07 PM, Zefram <perlbug-followup@perl.org> wrote:
perlvar does warn about this: The floating point representation can sometimes lead to It's always better to think of "version numbers" as "version strings". E.g. $ perl588 -le 'print $ perl588 -le 'print -- David |
The RT System itself - Status changed from 'new' to 'open' |
From @xdgOn Tue, Jan 19, 2010 at 4:07 PM, Zefram <perlbug-followup@perl.org> wrote:
For the record, it appears to be constructed equivalent to this numify() builds it up in parts *as a string* from the components of I think we can close this ticket. -- David |
From @nwc10On Tue, Jan 19, 2010 at 01:07:35PM -0800, Zefram wrote:
I wondered if it might be the implementation of atof, but that was only added http://perl5.git.perl.org/perl.git/commit/1f727ac0e62bc2e4
Assuming that you did your tests on x86, I thought that x86 (well, x87) Nicholas Clark |
From zefram@fysh.orgNicholas Clark wrote:
That's under compiler control, and a sane compiler will ensure consistent
If inconsistent arithmetic were enabled, it could lead to getting -zefram |
From @cpansproutOn Tue Jan 19 19:49:09 2010, xdaveg@gmail.com wrote:
And I missed this particular message when I was going through tickets a Zefram confirms that it is now fixed: -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#72210 (status was 'resolved')
Searchable as RT72210$
The text was updated successfully, but these errors were encountered: