Skip Menu |
 

This queue is for tickets about the Math-BigInt CPAN distribution.

Report information
The Basics
Id: 130736
Status: resolved
Priority: 0/
Queue: Math-BigInt

People
Owner: Nobody in particular
Requestors: shay [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.999818



Subject: to_ieee754-mbf.t failing in 1.999817
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
Message-ID: <rt-4.0.18-13846-1571399337-1424.0-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1571399337-13846-2"
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
Content-Length: 282
Download (untitled) / with headers
text/plain 282b
I recently updated blead to 1.999817 but somehow failed to run tests before pushing, and I've now noticed that one is failing. Verbose output attached. We have a blead release on Sun 20th. It would be great if this could be fixed by then. If not then I will just revert the update.
Subject: output.txt
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; name="output.txt"
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline; filename="output.txt"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
Content-Length: 2968
Download output.txt
text/plain 2.8k
D:\Dev\Git\perl\t>.\perl harness -v ../cpan/Math-BigInt/t/to_ieee754-mbf.t ../cpan/Math-BigInt/t/to_ieee754-mbf.t .. 1..60 # # Computing test data for k = 16 ... # # # smallest positive subnormal number (k = 16) # ok 1 # # largest subnormal number (k = 16) # ok 2 # # smallest positive normal number (k = 16) # ok 3 # # largest normal number (k = 16) # ok 4 # # largest number less than one (k = 16) # ok 5 # # smallest number larger than one (k = 16) # ok 6 # # second smallest number larger than one (k = 16) # ok 7 # # one (k = 16) # ok 8 # # minus one (k = 16) # ok 9 # # two (k = 16) # ok 10 # # minus two (k = 16) # ok 11 # # positive zero (k = 16) # ok 12 # # positive infinity (k = 16) # ok 13 # # negative infinity (k = 16) # ok 14 # # NaN (encoding used by Perl on Cygwin) (k = 16) # ok 15 # # Computing test data for k = 32 ... # # # smallest positive subnormal number (k = 32) # ok 16 # # largest subnormal number (k = 32) # ok 17 # # smallest positive normal number (k = 32) # ok 18 # # largest normal number (k = 32) # ok 19 # # largest number less than one (k = 32) # ok 20 # # smallest number larger than one (k = 32) # ok 21 # # second smallest number larger than one (k = 32) # ok 22 # # one (k = 32) # ok 23 # # minus one (k = 32) # ok 24 # # two (k = 32) # ok 25 # # minus two (k = 32) # ok 26 # # positive zero (k = 32) # ok 27 # # positive infinity (k = 32) # ok 28 # # negative infinity (k = 32) # ok 29 # # NaN (encoding used by Perl on Cygwin) (k = 32) # ok 30 # # Computing test data for k = 64 ... # # # smallest positive subnormal number (k = 64) # ok 31 # # largest subnormal number (k = 64) # ok 32 # # smallest positive normal number (k = 64) # ok 33 # # largest normal number (k = 64) # ok 34 # # largest number less than one (k = 64) # ok 35 # # smallest number larger than one (k = 64) # ok 36 # # second smallest number larger than one (k = 64) # ok 37 # # one (k = 64) # ok 38 # # minus one (k = 64) # ok 39 # # two (k = 64) # ok 40 # # minus two (k = 64) # ok 41 # # positive zero (k = 64) # ok 42 # # positive infinity (k = 64) # ok 43 # # negative infinity (k = 64) # ok 44 # # NaN (encoding used by Perl on Cygwin) (k = 64) # ok 45 # # Computing test data for k = 128 ... # # # smallest positive subnormal number (k = 128) # Can't take log of 0 at ../../lib/Math/BigFloat.pm line 4474. # Looks like your test exited with 34 just after 45. Dubious, test returned 34 (wstat 8704, 0x2200) Failed 15/60 subtests Test Summary Report ------------------- ../cpan/Math-BigInt/t/to_ieee754-mbf.t (Wstat: 8704 Tests: 45 Failed: 0) Non-zero exit status: 34 Parse errors: Bad plan. You planned 60 tests but ran 45. Files=1, Tests=45, 1 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU) Result: FAIL D:\Dev\Git\perl\t>
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-13846-1571399337-1424.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-13846-1571399337-1424.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-14899-1571405847-1982.130736-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 366
Download (untitled) / with headers
text/plain 366b
This error puzzles me, as the zero case is taken care of before execution gets to this point. Anyway, I doubt I will be able to reproduce this error without more information about the platform and how perl was built. I guess from the prompt that this is some sort of Windows version, but other than that, I have nothing. Could you show me the output from "perl -V"?
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-14899-1571405847-1982.130736-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
References: <rt-4.0.18-13846-1571399337-1424.0-0-0 [...] rt.cpan.org> <rt-4.0.18-14899-1571405847-1982.130736-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1571414438-17857-2"
Message-ID: <rt-4.0.18-17857-1571414438-1050.130736-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 579
Download (untitled) / with headers
text/plain 579b
On Fri Oct 18 09:37:27 2019, pjacklam wrote: Show quoted text
> This error puzzles me, as the zero case is taken care of before > execution gets to this point. > > Anyway, I doubt I will be able to reproduce this error without more > information about the platform and how perl was built. I guess from > the prompt that this is some sort of Windows version, but other than > that, I have nothing. Could you show me the output from "perl -V"?
Apologies. I should have included that information, of course. Please find perl -V output attached. This is Visual C++ 2019 (v16.3.4) x64 on Windows 10.
MIME-Version: 1.0
Subject: perl-V.txt
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Type: text/plain; charset="utf-8"; name="perl-V.txt"
Content-Disposition: inline; filename="perl-V.txt"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 3184
Download perl-V.txt
text/plain 3.1k
Summary of my perl5 (revision 5 version 31 subversion 5) configuration: Commit id: 859b78b1a8287681e524286f4e989b01816433ba Platform: osname=MSWin32 osvers=10.0.18362.388 archname=MSWin32-x64-multi-thread uname='' config_args='undef' hint=recommended useposix=true d_sigaction=undef useithreads=define usemultiplicity=define use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='cl' ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS' optimize='-O1 -MD -Zi -DNDEBUG -GL -fp:precise' cppflags='-DWIN32' ccversion='19.23.28106.4' gccversion='' gccosandvers='' intsize=4 longsize=4 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=undef longlongsize=8 d_longdbl=define longdblsize=8 longdblkind=0 ivtype='__int64' ivsize=8 nvtype='double' nvsize=8 Off_t='__int64' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='link' ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl\lib\CORE" -machine:AMD64 -subsystem:console,"5.02"' libpth="C:\Program Files (x86)\Microsoft Visual Studio\2019 16.3\Professional\VC\Tools\MSVC\14.23.28105\\lib\x64" libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib 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 vcruntime.lib ucrt.lib perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib 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 vcruntime.lib ucrt.lib libc=ucrt.lib so=dll useshrplib=true libperl=perl531.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs dlext=dll d_dlsymun=undef ccdlflags=' ' cccdlflags=' ' lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl\lib\CORE" -machine:AMD64 -subsystem:console,"5.02"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_THREAD_SAFE_LOCALE Built under MSWin32 Compiled at Oct 18 2019 10:01:39 @INC: D:/Dev/Git/perl/lib
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-17857-1571414438-1050.130736-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-13846-1571399337-1424.0-0-0 [...] rt.cpan.org> <rt-4.0.18-14899-1571405847-1982.130736-0-0 [...] rt.cpan.org> <rt-4.0.18-17857-1571414438-1050.130736-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-32450-1571492488-1869.130736-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 940
Download (untitled) / with headers
text/plain 940b
With the perl you compiled with Visual C++ 2019 (v16.3.4) x64 on Windows 10, could you please execute the following and show me the output. perl -MMath::BigFloat -le "($m, $e) = Math::BigFloat -> new('0.5') -> bpow('16494') -> nparts(); print for $m -> numify(), 0 + $m -> bstr()" You should get two lines displaying the number "6.47517511943802" (or "6.47517511943802511092443895822765" if perl is compiled with quadmath support). So far, I have not been able to reproduce the error. On Cygwin 64 bit I have tried with perl compiled with and without quadmath, with and without threads, and with/without multiplicity (8 combinations in all). On Cygwin 32 bit I have in addition tried with and without 64 bit integers (16 combinations in all). All of this for various versions of perl. I have also tried blead perl. In addition to all of this, I have tried with Strawberry Perl on Windows. None of these give the error you have displayed.
CC: shay [...] cpan.org
MIME-Version: 1.0
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -5.061
X-Google-SMTP-Source: APXvYqyFfV8bNto9RP2k6gk6fx7M/LPgZJECTCyaDjtXvLB1W3vn3P+IX8IQDjawZSfzGsZdKx99ESN25+YT2kY54a4=
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] googlemail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 0489A2402CF for <cpan-bug+Math-BigInt [...] hipster.bestpractical.com>; Sat, 19 Oct 2019 12:47:45 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oCkYBL-wr-RO for <cpan-bug+Math-BigInt [...] hipster.bestpractical.com>; Sat, 19 Oct 2019 12:47:43 -0400 (EDT)
Received: from xx1.develooper.com (unknown [147.75.38.233]) by hipster.bestpractical.com (Postfix) with ESMTPS id 336A1240038 for <bug-Math-BigInt [...] rt.cpan.org>; Sat, 19 Oct 2019 12:47:43 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id E4A99C215C for <bug-Math-BigInt [...] rt.cpan.org>; Sat, 19 Oct 2019 09:47:42 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 1FD6BC215D for <bug-Math-BigInt [...] rt.cpan.org>; Sat, 19 Oct 2019 09:47:41 -0700 (PDT)
Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id 7F8F0C2159 for <bug-Math-BigInt [...] rt.cpan.org>; Sat, 19 Oct 2019 09:47:28 -0700 (PDT)
Received: by mail-io1-f44.google.com with SMTP id a1so11098509ioc.6 for <bug-Math-BigInt [...] rt.cpan.org>; Sat, 19 Oct 2019 09:47:28 -0700 (PDT)
Delivered-To: cpan-bug+Math-BigInt [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #130736] to_ieee754-mbf.t failing in 1.999817
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ogxfPdtTQRBDt1g0LsMTV8IiZqiEx59x+XEeH4E7cOE=; b=fihA7ZGbI7kn6He0Cu7z54FdB+dDwKoZSmluyEef7YevioMTxMP5qF+5CKFvIu1QMW FZuwEZhjylVe6vViqy0/Gyq2HVMSZKUxc4sTBCBVNO3Pz9mrj8XEwpJA64U+EmCB+yrw V5AwMui2rhKWmt/pWaOpXDkspLjqdgrP7Lf/oosWez6A3d+xhh5NvnKigxjwHeIzIbvS +sw5nSz2rNYnnxIS/bmBMdH2H434M1lu1CMfYQ8+w4zBkAX01YZiJJt/+jGJkX0B4rpG c4f/YlgK461uTktclLf2b2JN6A4tu2GT4fZwLaRhf6WIpHIjGXiVoOgsDvSH4VWKOUsX nAXQ==
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ogxfPdtTQRBDt1g0LsMTV8IiZqiEx59x+XEeH4E7cOE=; b=oXVptS0aKwNBes0jhu6CZfcyc3AS+IGfiluxmJ1aO9Rait8/A6UJp7LYCYnm8FKNWz +nVgeO7WNRLAO/Lf4WmfeQWjwFmoRu2lnsIiDufd57yxJMwHuKbnCys2dqorDyX5CoeV AnHSlbLIrBAAu208KcLZbtWperg1YEbnIsbLEfpmatdrvdU7S0QlvQaCkIHRhFoA86cF V9C/hv9+JhIgX0BNa8++ZMH5QTJMZiDC7LYwaVLlTa7/lphrmGsdZ4zfdk4gDbafW+zc b86S8peopnBLZClzQAK2E5LBbA+OmjNFgTXf3gH0xDjLGqauPb1RX9UznRrDIsbxV+L1 88Vw==
Date: Sat, 19 Oct 2019 17:47:16 +0100
X-PMX-Spam: Gauge=X, Probability=10%, Report=' URI_CONTAINS_EXE 0.5, HTML_00_01 0.05, HTML_00_10 0.05, SUPERLONG_LINE 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, DKIM_ALIGNS 0, DKIM_SIGNATURE 0, IN_REP_TO 0, KNOWN_MTA_TFX 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, REFERENCES 0, SPF_PASS 0, SXL_IP_TFX_WM 0, URI_ENDS_IN_HTML 0, URI_WITH_PATH_ONLY 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BODY_NO_MAILTO 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __DKIM_ALIGNS_1 0, __DKIM_ALIGNS_2 0, __DQ_NEG_HEUR 0, __DQ_NEG_IP 0, __FORWARDED_MSG 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FUR_RDNS_GMAIL 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_REFERENCES 0, __HELO_GMAIL 0, __HTTPS_URI 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MSGID_DOMAIN_NOT_IN_HDRS 0, __MULTIPLE_URI_TEXT 0, __NETFLIX_URI_ONLY 0, __NO_HTML_TAG_RAW 0, __PHISH_SPEAR_STRUCTURE_1 0, __RDNS_WEBMAIL 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_NEGATE 0, __SUBJ_REPLY 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NOT_IMG 0, __URI_NS , __URI_WITH_PATH 0, __X_GOOGLE_DKIM_SIGNATURE 0, __YOUTUBE_RCVD 0, __zen.spamhaus.org_ERROR '
X-Spam-Level:
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2019.10.19.163617
To: bug-Math-BigInt [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
X-GM-Message-State: APjAAAWkkkFI8nOrij7YD7X1IwarPVgRHFZFqH4IIFIOXCxQSa5d3r4C /VJCGIlzQz7cpbQC3J0HyxjsnBceRbD3YKPWy/1LEmP8
In-Reply-To: <rt-4.0.18-32450-1571492489-660.130736-6-0 [...] rt.cpan.org>
X-Spam-Status: No, score=-5.061 tagged_above=-99.9 required=10 tests=[AWL=-0.520, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FROM_OUR_RT=-4, RDNS_NONE=0.793, SPF_SOFTFAIL=0.665] autolearn=ham
X-RT-Interface: API
References: <RT-Ticket-130736 [...] rt.cpan.org> <rt-4.0.18-13846-1571399337-1424.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-14899-1571405847-1982.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-17857-1571414438-1050.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-32450-1571492489-660.130736-6-0 [...] rt.cpan.org>
Message-ID: <CADED=K5skf7BA5uUc10OC0wYey3+C7cz9J+e2NDhDHsaOXXhmg [...] mail.gmail.com>
X-Received: by 2002:a6b:908:: with SMTP id t8mr6430822ioi.129.1571503647980; Sat, 19 Oct 2019 09:47:27 -0700 (PDT)
Return-Path: <steve.m.hay [...] googlemail.com>
X-RT-Mail-Extension: math-bigint
X-Original-To: cpan-bug+Math-BigInt [...] hipster.bestpractical.com
From: Steve Hay <steve.m.hay [...] googlemail.com>
RT-Message-ID: <rt-4.0.18-17143-1571503665-234.130736-0-0 [...] rt.cpan.org>
Content-Length: 2359
Download (untitled) / with headers
text/plain 2.3k
On Sat, 19 Oct 2019 at 14:41, Peter John Acklam via RT <bug-Math-BigInt@rt.cpan.org> wrote: Show quoted text
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=130736 > > > With the perl you compiled with Visual C++ 2019 (v16.3.4) x64 on Windows 10, could you please execute the following and show me the output. > > perl -MMath::BigFloat -le "($m, $e) = Math::BigFloat -> new('0.5') -> bpow('16494') -> nparts(); print for $m -> numify(), 0 + $m -> bstr()" > > You should get two lines displaying the number "6.47517511943802" (or "6.47517511943802511092443895822765" if perl is compiled with quadmath support). > > So far, I have not been able to reproduce the error. On Cygwin 64 bit I have tried with perl compiled with and without quadmath, with and without threads, and with/without multiplicity (8 combinations in all). On Cygwin 32 bit I have in addition tried with and without 64 bit integers (16 combinations in all). All of this for various versions of perl. I have also tried blead perl. In addition to all of this, I have tried with Strawberry Perl on Windows. None of these give the error you have displayed.
Only the second line of output is as expected. The first line is 0: D:\Dev\Git\perl>perl -v This is perl 5, version 31, subversion 5 (v5.31.5 (v5.31.4-373-g859b78b1a8)) built for MSWin32-x64-multi-thread Copyright 1987-2019, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. D:\Dev\Git\perl>where cl C:\Program Files (x86)\Microsoft Visual Studio\2019 16.3\Professional\VC\Tools\MSVC\14.23.28105\bin\Hostx64\x64\cl.exe D:\Dev\Git\perl>cl Microsoft (R) C/C++ Optimizing Compiler Version 19.23.28106.4 for x64 Copyright (C) Microsoft Corporation. All rights reserved. usage: cl [ option... ] filename... [ /link linkoption... ] D:\Dev\Git\perl>perl -MMath::BigFloat -le "print $Math::BigFloat::VERSION" 1.999817 D:\Dev\Git\perl>perl -MMath::BigFloat -le "($m, $e) = Math::BigFloat -> new('0.5') -> bpow('16494') -> nparts(); print for $m -> numify(), 0 + $m -> bstr()" 0 6.47517511943802 D:\Dev\Git\perl>
CC: shay [...] cpan.org
MIME-Version: 1.0
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -5.042
X-Google-SMTP-Source: APXvYqxxJLzKzBbgUW0hJG3mApyNVVX39Fbo/5yNSYwrBRMmVxEwld0WBXKFZ2oelTczt5WvEku6IaFwP/m/pgbsuIU=
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] googlemail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id CFF942401FD for <cpan-bug+Math-BigInt [...] hipster.bestpractical.com>; Sat, 19 Oct 2019 13:40:40 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2toAjmiOsk+q for <cpan-bug+Math-BigInt [...] hipster.bestpractical.com>; Sat, 19 Oct 2019 13:40:36 -0400 (EDT)
Received: from xx1.develooper.com (unknown [147.75.38.233]) by hipster.bestpractical.com (Postfix) with ESMTPS id AF8F5240038 for <bug-Math-BigInt [...] rt.cpan.org>; Sat, 19 Oct 2019 13:40:36 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 64435C2159 for <bug-Math-BigInt [...] rt.cpan.org>; Sat, 19 Oct 2019 10:40:36 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 97E88C215C for <bug-Math-BigInt [...] rt.cpan.org>; Sat, 19 Oct 2019 10:40:34 -0700 (PDT)
Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id BE403C2159 for <bug-Math-BigInt [...] rt.cpan.org>; Sat, 19 Oct 2019 10:40:33 -0700 (PDT)
Received: by mail-io1-f48.google.com with SMTP id w12so11147711iol.11 for <bug-Math-BigInt [...] rt.cpan.org>; Sat, 19 Oct 2019 10:40:33 -0700 (PDT)
Delivered-To: cpan-bug+Math-BigInt [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #130736] to_ieee754-mbf.t failing in 1.999817
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gVVEsPbeF5KzpiRmvN6Jp6uCYzHqsOa+BKBd46xP3dE=; b=kQ7lEy5FS/+Bya0NXesf1CTYMd9lFeTOM8rFVwYi2/LBCjoBNQTl76Fi+O8Yv9hJqr gRc1ynAtjCEjqu2bz7sGxY85ifc5VkEyULIVFasL5aOgFvNpSYBudLxhRNJ4E0NbXYOn 9wOOdCmVhhT8V0fQxXsUkqrnVL9gmmwBEvADOUrNA3sgzxlpMU4I1+jtyKXvkf7uFQx3 1jAkkeFFwMY5OGNwCNo6uZjaQFgi/nPDFpvaYdj84dwEtgRSi1FLCJ9SgcD7u1pGxHG0 Xfn64QfC+jQuUz6rYbGSkpJuxdxHlsOR1T3q106Mx7FALqi6JKD2MXlPjNGOpBYpQptu qpQA==
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gVVEsPbeF5KzpiRmvN6Jp6uCYzHqsOa+BKBd46xP3dE=; b=Y0Hk5ER0KC5xaXWGMmhZU3LN8dsbr3RBN1Ngt85SKxMIz5HE0/LfXyznQYt7suzw2z FUyS32dbCiPNWOriWR9vTupo91IPvz72sxX0R3p/GCPJ+LuBsEqcP3lY0tgj3MGDF+jC hyHDChw+fd5teGj/39ckeeBGFYeQf38Nb5MoHwAtTQS1jaiyeV8C40MPagVBxYv0EjbV jN9EV+SJfuG+MMUo+YMnc2pr3hNVWnDyqu5PN071gzuMzD46IheFo+94/KH5q5aIMQz8 9Qo5VGc92aYvGDEB1P5lVSK0IZjGUDDINOVSRYTkcEslT+KUPtrYL885VvEhP2L9w47x YPDQ==
Date: Sat, 19 Oct 2019 18:42:31 +0100
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, SUPERLONG_LINE 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1500_1599 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, DKIM_ALIGNS 0, DKIM_SIGNATURE 0, IN_REP_TO 0, KNOWN_MTA_TFX 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, REFERENCES 0, SINGLE_URI_IN_BODY 0, SPF_PASS 0, SXL_IP_TFX_WM 0, URI_ENDS_IN_HTML 0, URI_WITH_PATH_ONLY 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BODY_NO_MAILTO 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __DKIM_ALIGNS_1 0, __DKIM_ALIGNS_2 0, __DQ_NEG_HEUR 0, __DQ_NEG_IP 0, __FORWARDED_MSG 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FUR_RDNS_GMAIL 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_REFERENCES 0, __HELO_GMAIL 0, __HTTPS_URI 0, __IN_REP_TO 0, __MAIL_CHAIN 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MSGID_DOMAIN_NOT_IN_HDRS 0, __NETFLIX_URI_ONLY 0, __NO_HTML_TAG_RAW 0, __PHISH_SPEAR_STRUCTURE_1 0, __RDNS_WEBMAIL 0, __REFERENCES 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __SUBJ_ALPHA_NEGATE 0, __SUBJ_REPLY 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NOT_IMG 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0, __X_GOOGLE_DKIM_SIGNATURE 0, __YOUTUBE_RCVD 0, __zen.spamhaus.org_ERROR '
X-Spam-Level:
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2019.10.19.172417
To: bug-Math-BigInt [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
X-GM-Message-State: APjAAAWdyfbnk0IiZOGaPX8ynzD/BkrgCcLq88f9pjdQQWDIAiBE4vaG jpjRuJ4Bu50OlCazA3PhEsRNHrSxmMEdVkzJld4H+w==
In-Reply-To: <CADED=K5skf7BA5uUc10OC0wYey3+C7cz9J+e2NDhDHsaOXXhmg [...] mail.gmail.com>
X-Spam-Status: No, score=-5.042 tagged_above=-99.9 required=10 tests=[AWL=-0.501, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FROM_OUR_RT=-4, RDNS_NONE=0.793, SPF_SOFTFAIL=0.665] autolearn=ham
X-RT-Interface: API
References: <RT-Ticket-130736 [...] rt.cpan.org> <rt-4.0.18-13846-1571399337-1424.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-14899-1571405847-1982.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-17857-1571414438-1050.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-32450-1571492489-660.130736-6-0 [...] rt.cpan.org> <CADED=K5skf7BA5uUc10OC0wYey3+C7cz9J+e2NDhDHsaOXXhmg [...] mail.gmail.com>
Message-ID: <CADED=K4GT_gALOiSV6ecZJLhW-+hFzOa00dgR+CtqyMmnqsujw [...] mail.gmail.com>
X-Received: by 2002:a05:6638:1f0:: with SMTP id t16mr14299567jaq.119.1571506832226; Sat, 19 Oct 2019 10:40:32 -0700 (PDT)
Return-Path: <steve.m.hay [...] googlemail.com>
X-RT-Mail-Extension: math-bigint
X-Original-To: cpan-bug+Math-BigInt [...] hipster.bestpractical.com
From: Steve Hay <steve.m.hay [...] googlemail.com>
RT-Message-ID: <rt-4.0.18-16550-1571506842-1346.130736-0-0 [...] rt.cpan.org>
Content-Length: 1460
Download (untitled) / with headers
text/plain 1.4k
On Sat, 19 Oct 2019 at 17:47, Steve Hay <steve.m.hay@googlemail.com> wrote: Show quoted text
> > On Sat, 19 Oct 2019 at 14:41, Peter John Acklam via RT > <bug-Math-BigInt@rt.cpan.org> wrote:
> > > > <URL: https://rt.cpan.org/Ticket/Display.html?id=130736 > > > > > With the perl you compiled with Visual C++ 2019 (v16.3.4) x64 on Windows 10, could you please execute the following and show me the output. > > > > perl -MMath::BigFloat -le "($m, $e) = Math::BigFloat -> new('0.5') -> bpow('16494') -> nparts(); print for $m -> numify(), 0 + $m -> bstr()" > > > > You should get two lines displaying the number "6.47517511943802" (or "6.47517511943802511092443895822765" if perl is compiled with quadmath support). > > > > So far, I have not been able to reproduce the error. On Cygwin 64 bit I have tried with perl compiled with and without quadmath, with and without threads, and with/without multiplicity (8 combinations in all). On Cygwin 32 bit I have in addition tried with and without 64 bit integers (16 combinations in all). All of this for various versions of perl. I have also tried blead perl. In addition to all of this, I have tried with Strawberry Perl on Windows. None of these give the error you have displayed.
> > Only the second line of output is as expected. The first line is 0: >
I'm wondering if this might be a bug in this version of VC++?... I've just tried with VC++ 2013 and all the tests pass. I'll try 2015 and 2017 and let you know how they fare.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-17143-1571503665-234.130736-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-130736 [...] rt.cpan.org> <rt-4.0.18-13846-1571399337-1424.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-14899-1571405847-1982.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-17857-1571414438-1050.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-32450-1571492489-660.130736-6-0 [...] rt.cpan.org> <CADED=K5skf7BA5uUc10OC0wYey3+C7cz9J+e2NDhDHsaOXXhmg [...] mail.gmail.com> <rt-4.0.18-17143-1571503665-234.130736-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-14217-1571507351-1081.130736-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 699
Download (untitled) / with headers
text/plain 699b
Thank you so much! The problem is in Math::BigFloat->numify() which converts an object $x to a scalar by using 0 + $x -> bsstr(); which converts $x to a string and, by adding zero, lets atof()/atoi() convert the string to a number. In this case, the string is 6475175119438025110924438(...)e-11528 where the (...) represents no less than 11500 omitted digits. The mantissa aka. significand is a 11529 digit integer, which is way beyond what can be represented by a double precision floating point number. I am actually impressed that some systems get this right. Anyway, the fix is to use 0 + $x -> bnstr(); in numify(). I am sure that if you try this, you get the correct result.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-14217-1571507351-1081.130736-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-130736 [...] rt.cpan.org> <rt-4.0.18-13846-1571399337-1424.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-14899-1571405847-1982.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-17857-1571414438-1050.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-32450-1571492489-660.130736-6-0 [...] rt.cpan.org> <CADED=K5skf7BA5uUc10OC0wYey3+C7cz9J+e2NDhDHsaOXXhmg [...] mail.gmail.com> <rt-4.0.18-17143-1571503665-234.130736-0-0 [...] rt.cpan.org> <rt-4.0.18-14217-1571507351-1081.130736-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-17143-1571512120-1378.130736-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 990
Download (untitled) / with headers
text/plain 990b
On Sat Oct 19 13:49:11 2019, pjacklam wrote: Show quoted text
> Thank you so much! The problem is in Math::BigFloat->numify() which > converts an object $x to a scalar by using > > 0 + $x -> bsstr(); > > which converts $x to a string and, by adding zero, lets atof()/atoi() > convert the string to a number. In this case, the string is > > 6475175119438025110924438(...)e-11528 > > where the (...) represents no less than 11500 omitted digits. The > mantissa aka. significand is a 11529 digit integer, which is way > beyond what can be represented by a double precision floating point > number. I am actually impressed that some systems get this right. > > Anyway, the fix is to use > > 0 + $x -> bnstr(); > > in numify(). I am sure that if you try this, you get the correct > result.
Ok, I will try that later. I've just finished testing with other compilers and I find that VC++ 2015/2017/2019 all fail, whereas VC++ 2010/2013 both work for some reason - but more by luck than anything, it seems!
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-17143-1571512120-1378.130736-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-130736 [...] rt.cpan.org> <rt-4.0.18-13846-1571399337-1424.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-14899-1571405847-1982.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-17857-1571414438-1050.130736-6-0 [...] rt.cpan.org> <rt-4.0.18-32450-1571492489-660.130736-6-0 [...] rt.cpan.org> <CADED=K5skf7BA5uUc10OC0wYey3+C7cz9J+e2NDhDHsaOXXhmg [...] mail.gmail.com> <rt-4.0.18-17143-1571503665-234.130736-0-0 [...] rt.cpan.org> <rt-4.0.18-14217-1571507351-1081.130736-0-0 [...] rt.cpan.org> <rt-4.0.18-17143-1571512120-1378.130736-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-16037-1571562841-955.130736-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1314
Download (untitled) / with headers
text/plain 1.2k
On Sat Oct 19 15:08:40 2019, SHAY wrote: Show quoted text
> On Sat Oct 19 13:49:11 2019, pjacklam wrote:
> > Thank you so much! The problem is in Math::BigFloat->numify() which > > converts an object $x to a scalar by using > > > > 0 + $x -> bsstr(); > > > > which converts $x to a string and, by adding zero, lets atof()/atoi() > > convert the string to a number. In this case, the string is > > > > 6475175119438025110924438(...)e-11528 > > > > where the (...) represents no less than 11500 omitted digits. The > > mantissa aka. significand is a 11529 digit integer, which is way > > beyond what can be represented by a double precision floating point > > number. I am actually impressed that some systems get this right. > > > > Anyway, the fix is to use > > > > 0 + $x -> bnstr(); > > > > in numify(). I am sure that if you try this, you get the correct > > result.
> > > Ok, I will try that later. I've just finished testing with other > compilers and I find that VC++ 2015/2017/2019 all fail, whereas VC++ > 2010/2013 both work for some reason - but more by luck than anything, > it seems!
Yes, changing 0 + $x -> bsstr() to 0 + $x -> bnstr() in Math::BigFloat::numify() fixes the test failure. Thanks for the fix. I will just patch this locally in blead for today, and upgrade whenever you have a new release out later.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-13846-1571399337-1424.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-13846-1571399337-1424.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-13913-1571668125-1958.130736-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 18
Fixed in 1.999818.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.