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

[perl #117315] [Win32, 5.17.10] infinity is zero

Thread Previous | Thread Next
From:
Sisyphus
Date:
March 24, 2013 04:16
Subject:
[perl #117315] [Win32, 5.17.10] infinity is zero
Message ID:
rt-3.6.HEAD-28177-1364098558-1149.117315-75-0@perl.org
# New Ticket Created by  "Sisyphus" 
# Please include the string:  [perl #117315]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=117315 >


This is a bug report for perl from sisyphus1@optusnet.com.au,
generated with the help of perlbug 1.39 running under perl 5.17.10.


-----------------------------------------------------------------
[Please describe your issue here]

I don't know if this bug was present in 5.17.9 (and/or earlier).
It affects only my 64-bit build of 5.17.10. My 32-bit builds,
including the 64int build, are fine.

Perl correctly evaluates 2**1e15 as infinity.
But it evaluates 2**1e16 as 0. For exponents greater than 16, 0
is also returned. (This shows up in one of the
t/op/sprintf2.t tests as a 'divide-by-zero' error.)

Here's a simple demo:

C:\>perl -wle "print 2**1e15"
1.#INF

C:\>perl -wle "print 2**1e16"
0

C:\>perl -wle "print 2**1e160"
0

C:\>

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=high
---
Site configuration information for perl 5.17.10:

Configured by sisyphus at Sun Mar 24 13:38:41 2013.

Summary of my perl5 (revision 5 version 17 subversion 10) configuration:

  Platform:
    osname=MSWin32, osvers=6.1, archname=MSWin32-x64-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='x86_64-w64-mingw32-gcc', ccflags 
=' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT 
 -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields',
    optimize='-s -O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='4.7.0', gccosandvers=''
    intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='long 
long', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='x86_64-w64-mingw32-g++', ldflags 
='-s -L"c:\_64\bleadperl\lib\CORE" -L"C:\_64\alt\x86_64-w64-mingw32\lib"'
    libpth=C:\_64\alt\x86_64-w64-mingw32\lib C:\_64\msys\1.0\local\lib 
C:\_64\msys\1.0\local\ssl\lib
    libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 
 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion 
 -lodbc32 -lodbccp32 -lcomctl32
    perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 
 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion 
 -lodbc32 -lodbccp32 -lcomctl32
    libc=, so=dll, useshrplib=true, libperl=libperl517.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', 
lddlflags='-mdll -s -L"c:\_64\bleadperl\lib\CORE" -L"C:\_64\alt\x86_64-w64-mingw32\lib"'

Locally applied patches:


---
@INC for perl 5.17.10:
    C:/_64/bleadperl/site/lib
    C:/_64/bleadperl/lib
    .

---
Environment for perl 5.17.10:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\_64\bleadperl\bin;C:\_64\alt\bin;C:\Program Files\Common 
Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common 
Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NVIDIA 
Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS 
Client\;C:\Program Files\Intel\iCLS 
Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program 
Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program 
Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files 
(x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files 
(x86)\Intel\Intel(R) Management Engine Components\IPT;C:\batch;C:\Program 
Files (x86)\Windows 
Live\Shared;C:\_64\msys\1.0\local_dyn\bin;;C:\_32\dmake;C:\MinGW\msys\1.0\bin;C:\Program 
Files\Windows NT\Accessories;C:\zip
    PERL_BADLANG (unset)
    SHELL (unset) 


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