Front page | perl.perl5.porters |
Postings from March 2013
[perl #117315] [Win32, 5.17.10] infinity is zero
Thread Previous
|
Thread Next
From:
bulk88 via RT
Date:
March 25, 2013 19:08
Subject:
[perl #117315] [Win32, 5.17.10] infinity is zero
Message ID:
rt-3.6.HEAD-28177-1364238485-1733.117315-15-0@perl.org
On Sat Mar 23 21:15:58 2013, sisyphus wrote:
> 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.)
I think the problem is only on (newer?) Mingw/GCC Win64 Perl, using my
VC 2008 Win64 Perl I get
____________________________________________________________________
C:\Documents and Settings\Administrator>perl -V
Summary of my perl5 (revision 5 version 17 subversion 9 patch blead
2013-02-16.1
8:14:53 2f8114fb08248fa8661a45c7e473b59c7e633458 v5.17.8-169-g2f8114f)
configura
tion:
Snapshot of: 2f8114fb08248fa8661a45c7e473b59c7e633458
Platform:
osname=MSWin32, osvers=5.2, 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='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -Od -GL -GS- -Gy
-fp:pre
cise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE
-D_CRT_SECURE_NO_DEPR
ECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS
-DPERL_IMPLICIT_CONTE
XT -DPERL_IMPLICIT_SYS -DUSE_PERLIO',
optimize='-MD -Zi -DNDEBUG -Od -GL -GS- -Gy -fp:precise',
cppflags='-DWIN32'
ccversion='15.00.30729.01', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='__int64', ivsize=8, nvtype='double', nvsize=8,
Off_t='__int64', lsee
ksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg
-libpa
th:"c:\p517\lib\CORE" -machine:AMD64 "/manifestdependency:type='Win32'
name='Mi
crosoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitecture='*' pub
licKeyToken='6595b64144ccf1df' language='*'"'
libpth=\lib
libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.l
ib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib ws2_32
.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib
msvcrt.
lib
perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg
32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib ws
2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib
comctl32.lib msv
crt.lib
libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl517.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref,icf -l
tcg -libpath:"c:\p517\lib\CORE" -machine:AMD64
"/manifestdependency:type='Win3
2' name='Microsoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitect
ure='*' publicKeyToken='6595b64144ccf1df' language='*'"'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
PERLIO_LAYERS PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE
PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS
USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
USE_PERL_ATOF
Built under MSWin32
Compiled at Feb 17 2013 00:25:10
@INC:
C:/p517/site/lib
C:/p517/lib
.
C:\Documents and Settings\Administrator>perl -wle "print 2**1e15"
1.#INF
C:\Documents and Settings\Administrator>perl -wle "print 2**1e16"
1.#INF
C:\Documents and Settings\Administrator>perl -wle "print 2**1e160"
1.#INF
C:\Documents and Settings\Administrator>
_____________________________________________________________________
Using my x64 Strawberry 5.14 (which uses a different C lib than 2008,
msvcrt.dll vs msvcr90.dll),
_____________________________________________________________________
C:\Documents and Settings\Administrator>perl -V
Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
Platform:
osname=MSWin32, osvers=4.0, archname=MSWin32-x64-multi-thread
uname='Win32 strawberryperl 5.14.2.1 #1 Tue Nov 22 22:40:59 2011 x64'
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='gcc', ccflags =' -ggdb -O2 -DWIN32 -DWIN64 -DCONSERVATIVE
-DPERL_TEXTMO
DE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -fno-
strict-aliasing -mms-bitfields',
optimize=' -O2 ',
cppflags='-DWIN32'
ccversion='', gccversion='4.4.7', 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='g++', ldflags =' -L"C:\sperl\perl\lib\CORE" -L"C:\sperl\c\lib"'
libpth=C:\sperl\c\lib C:\sperl\c\x86_64-w64-mingw32\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 -ladva
pi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr
-lwinmm -lver
sion -lodbc32 -lodbccp32 -lcomctl32
libc=, so=dll, useshrplib=true, libperl=libperl514.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-mdll -L"C:\sperl\perl\lib\CORE"
-L"C:\sperl\c\l
ib"'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PL_OP_SLAB_ALLOC
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE
Built under MSWin32
Compiled at Nov 22 2011 22:53:05
@INC:
C:/sperl/perl/site/lib
C:/sperl/perl/vendor/lib
C:/sperl/perl/lib
.
C:\Documents and Settings\Administrator>perl -wle "print 2**1e15"
1.#INF
C:\Documents and Settings\Administrator>perl -wle "print 2**1e16"
1.#INF
C:\Documents and Settings\Administrator>perl -wle "print 2**1e160"
1.#INF
C:\Documents and Settings\Administrator>
____________________________________________________________________
C:\Documents and Settings\Administrator>perl -V
Summary of my perl5 (revision 5 version 16 subversion 1) configuration:
Platform:
osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
uname='Win32 strawberry-perl 5.16.1.1 #1 Thu Aug 9 09:54:46 2012 i386'
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS
-DPERL_IMPLICIT
_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields',
optimize='-s -O2',
cppflags='-DWIN32'
ccversion='', gccversion='4.6.3', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long
long', lseek
size=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='g++', ldflags ='-s -L"C:\sp3216\perl\lib\CORE" -L"C:\sp3216\c\lib"'
libpth=C:\sp3216\c\lib C:\sp3216\c\i686-w64-mingw32\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 -ladva
pi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr
-lwinmm -lver
sion -lodbc32 -lodbccp32 -lcomctl32
libc=, so=dll, useshrplib=true, libperl=libperl516.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-mdll -s -L"C:\sp3216\perl\lib\CORE"
-L"C:\sp3216
\c\lib"'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
PERLIO_LAYERS PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PL_OP_SLAB_ALLOC
USE_ITHREADS USE_LARGE_FILES USE_LOCALE
USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
Built under MSWin32
Compiled at Aug 9 2012 10:03:09
@INC:
C:/sp3216/perl/site/lib
C:/sp3216/perl/vendor/lib
C:/sp3216/perl/lib
.
C:\Documents and Settings\Administrator>perl -wle "print 2**1e15"
1.#INF
C:\Documents and Settings\Administrator>perl -wle "print 2**1e16"
1.#INF
C:\Documents and Settings\Administrator>perl -wle "print 2**1e160"
1.#INF
C:\Documents and Settings\Administrator>
____________________________________________________________________
I'll make a random guess and say something changed in spec file for
Mingw64 4.7.0 that sisyphus is using. I don't really use GCC, so I can't
debug or research any further, but I think there is a bug or something
that has to be fixed here, or atleast when Strawberry 5.18 is created
with a 4.7 or 4.8 series GCC this will be brought up again. This ticket
needs more opinions.
--
bulk88 ~ bulk88 at hotmail.com
---
via perlbug: queue: perl5 status: rejected
https://rt.perl.org:443/rt3/Ticket/Display.html?id=117315
Thread Previous
|
Thread Next