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
"Can't take log of 0" error in perl 5.8.8. 64 bit #9338
Comments
From lourdes.pena@gmail.comHi, If I run the following code in perl v5.8.8 built for perl But if I run it in perl v5.8.7 built for i486-linux-gnu-thread-multi, I get Is this a known issue with perl 5.8.8. for 64bits? Thanks! Here is the perl -V info: Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Characteristics of this binary (from libperl): |
From @TuxOn Wed, 21 May 2008 10:14:48 -0700, "Lourdes Peña Castillo" (via RT)
I see the same for 5.10 on 32bit and 64bit
Don't know if it is a known issue, but it is probably not (yet) fixed -- |
The RT System itself - Status changed from 'new' to 'open' |
From @AbigailOn Wed, May 21, 2008 at 10:14:48AM -0700, Lourdes Pe??a Castillo wrote:
I see a difference depending on whether Perl was build using 64 bit It seems that in a 32-bit build, 2.5e-310 gets constant folded to 0. Abigail |
From @TuxOn Thu, 22 May 2008 15:27:38 +0200, Abigail <abigail@abigail.be> wrote:
weird. both my perls were 64bitint. one of them 64bitall -- |
From ben@morrow.me.ukQuoth h.m.brand@xs4all.nl ("H.Merijn Brand"):
On i386-freebsd, with both 5.8 and 5.10, I seem to consistently get the Ben -- |
From tchrist@perl.comScripsit hodie, XI Kalendas Iunias MMDCCLXI AUC, circa horam quartam
[... now enter Abigail ...]
Abigail and Lourdes, I get slightly mixed results depending on version, configuration, and Box vperl details A v5.8.8 cygwin-thread-multi-64int B v5.6.0 i686-linux-thread C 5.005_02 OpenBSD.i386-openbsd D v5.8.8 OpenBSD.i386-openbsd E v5.6.0 OpenBSD.sparc-openbsd On all of these EXCEPT FOR THE VERY LAST-MOST ENTRY ALONE, -309.602059991328 Although admittedly when on machine C, I run boxC% perl1 -e 'print log(2.5e-310)/log(10), "\n";' or boxC% perl4.036 -e 'print log(2.5e-310)/log(10), "\n";' I do get more digits. But they're there anyway, since boxC% perl5.10.0 -e 'printf "%.45f\n", log ( 2.5e-310 ) /log ( 10 ) ' No, the different response of not being able to take the log of 0 occurs boxE% perl5.6.0 -le 'print log ( 2.5e-310 ) /log( 10 ) ' boxE% perl5.10.0 -le 'print log ( 2.5e-310 ) /log( 10 ) ' boxE% perl5.10.0 -cw -le 'print log ( 2.5e-310 ) /log( 10 ) ' Whereas in older Perl, it was usually a compile-time error. We can use 1/0 to show that this was always the case until Although I see that it runs just fine under original perl, boxC% perl1 -e 'print 1/0, "\n";' But later than that, we get an exception during compilation boxC% perl4.036 -cw -le 'print 1/0' boxC% perl5.00503 -cw -le 'print 1/0' boxC% perl5.8.7 -cw -le 'print 1/0' Yet today, this is different--depending. Whatever happened to boxC% perl5.10.0 -cw -le 'print 1/0' boxC% perl5.10.0 -le 'print 1/0' Curious range of exit status, though, eh? 19? Why 19? That seems to make no sense as a sysexit, a signo, nor It's certainly not a sysexit per sysexit.h at all (they're >64), EX_OK EX_CANTCREAT EX_CONFIG EX_DATAERR EX_IOERR EX_NOHOST Now, if it were 128..255, that then I thiknk would be a signal in Digging through docs on die() to figure out what happened suggests The CRT (=libc startup) often leaves this value lying about, perhaps Now I ask you, is this behaviour all of: reasonable and expected, FTR, my own current answer to that question happens to be "hmm". --tom |
From @demerphq2008/5/22 Tom Christiansen <tchrist@perl.com>:
Does this mean that we should clear this value at some point during our startup? Yves -- |
From @cpansproutOn Wed May 21 10:14:46 2008, lourdes.pena@gmail.com wrote:
If I use strtod (on Mac OS X), I get the correct result, regardless of #!perl -l It prints: So, I expect this is related to bug 41202. |
From [Unknown Contact. See original ticket]On Wed May 21 10:14:46 2008, lourdes.pena@gmail.com wrote:
If I use strtod (on Mac OS X), I get the correct result, regardless of #!perl -l It prints: So, I expect this is related to bug 41202. |
Migrated from rt.perl.org#54590 (status was 'open')
Searchable as RT54590$
The text was updated successfully, but these errors were encountered: