Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: james2vegas [...] aim.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.9902
Fixed in: (no value)



Subject: Failing tests comparing inf to Inf
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1796
t/bare_mbi.t ........ 608/3615
Show quoted text
#   Failed test at t/bigintpm.inc line 206.
#          got: 'Inf'
#     expected: 'inf'

Show quoted text
#   Failed test at t/bigintpm.inc line 206.
#          got: '-Inf'
#     expected: '-inf'
t/bare_mbi.t ........ 3257/3615 # Looks like you failed 2 tests of 3615.
t/bare_mbi.t ........ Dubious, test returned 2 (wstat 512, 0x200)

t/bigintpm.t ........ 1/3621
Show quoted text
#   Failed test at t/bigintpm.inc line 206.
#          got: 'Inf'
#     expected: 'inf'
t/bigintpm.t ........ 763/3621
Show quoted text
#   Failed test at t/bigintpm.inc line 206.
#          got: '-Inf'
#     expected: '-inf'
t/bigintpm.t ........ 2396/3621 # Looks like you failed 2 tests of 3621.
t/bigintpm.t ........ Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/3621 subtests

t/sub_mbi.t ......... 520/3620
Show quoted text
#   Failed test at t/bigintpm.inc line 206.
#          got: 'Inf'
#     expected: 'inf'

Show quoted text
#   Failed test at t/bigintpm.inc line 206.
#          got: '-Inf'
#     expected: '-inf'
t/sub_mbi.t ......... 3257/3620 # Looks like you failed 2 tests of 3620.
t/sub_mbi.t ......... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/3620 subtests


MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/html; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2359-1290860223-1953.63379-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 89
bash-2.05a# perl -v

This is perl, v5.8.9 built for i386-freebsd

MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-2359-1290860223-1953.63379-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-2359-1290860223-1953.63379-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2359-1290930754-1585.63379-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 506
Download (untitled) / with headers
text/plain 506b
On Sat Nov 27 07:17:03 2010, JWRIGHT wrote: Show quoted text
> This is perl, v5.8.9 built for i386-freebsd
Could you show me how your Perl prints infinity? Please try with something like perl -wle 'print 1e99 ** 1e99' Older versions of Perl have several different ways of representing a numerical scalar infinity and Not-a-number. The test cases expect "inf" and "NaN" and nothing else. The test cases should be modified so it allows the cases when Perl represents these values with something other than "inf" or "NaN".
From rafl [...] debian.org Sun Nov 28 03: 07:26 2010
MIME-Version: 1.0
X-Spam-Status: No, score=-6.425 tagged_above=-99.9 required=10 tests=[AWL=0.475, BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-2359-1290930754-1005.63379-5-0 [...] rt.cpan.org> (Peter John Acklam via's message of "Sun, 28 Nov 2010 02:52:35 -0500")
X-Spam_score: -4.0
X-Spam-Flag: NO
References: <RT-Ticket-63379 [...] rt.cpan.org> <rt-3.8.HEAD-2359-1290860223-1953.63379-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-2359-1290930754-1005.63379-5-0 [...] rt.cpan.org>
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
X-Spam_bar: ----
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <87sjyleutf.fsf [...] tardis.home.perldition.org>
Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -6.425
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id DB0C6241196 for <cpan-bug+Math-BigInt [...] hipster.bestpractical.com>; Sun, 28 Nov 2010 03:07:25 -0500 (EST)
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 xEhtLy767Tq6 for <cpan-bug+Math-BigInt [...] hipster.bestpractical.com>; Sun, 28 Nov 2010 03:07:24 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id BEA50241130 for <bug-Math-BigInt [...] rt.cpan.org>; Sun, 28 Nov 2010 03:07:23 -0500 (EST)
Received: (qmail 3711 invoked by uid 103); 28 Nov 2010 08:07:23 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 28 Nov 2010 08:07:23 -0000
Received: from kief.perldition.org (HELO kief.perldition.org) (78.47.20.161) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Sun, 28 Nov 2010 00:07:20 -0800
Received: from p4fd76901.dip.t-dialin.net ([79.215.105.1] helo=tardis.home.perldition.org) by kief.perldition.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from <rafl [...] debian.org>) id 1PMcHz-0001Rd-Al for bug-Math-BigInt [...] rt.cpan.org; Sun, 28 Nov 2010 09:07:17 +0100
Received: from rafl by tardis.home.perldition.org with local (Exim 4.72) (envelope-from <rafl [...] debian.org>) id 1PMcHB-0008WN-4d for bug-Math-BigInt [...] rt.cpan.org; Sun, 28 Nov 2010 09:06:25 +0100
Delivered-To: cpan-bug+Math-BigInt [...] hipster.bestpractical.com
X-Spam_score_int: -39
Subject: Re: [rt.cpan.org #63379] Failing tests comparing inf to Inf
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)
Return-Path: <rafl [...] debian.org>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Math-BigInt [...] hipster.bestpractical.com
X-RT-Mail-Extension: math-bigint
Date: Sun, 28 Nov 2010 09:06:20 +0100
X-Spam-Level:
X-Spam_report: Spam detection software, running on the system "kief.perldition.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: "Peter John Acklam via RT" <bug-Math-BigInt [...] rt.cpan.org> writes: > Queue: Math-BigInt > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63379 > > > On Sat Nov 27 07:17:03 2010, JWRIGHT wrote: > >> This is perl, v5.8.9 built for i386-freebsd > > Could you show me how your Perl prints infinity? Please try with > something like > > perl -wle 'print 1e99 ** 1e99' > > Older versions of Perl have several different ways of representing a > numerical scalar infinity and Not-a-number. The test cases expect > "inf" and "NaN" and nothing else. The test cases should be modified so > it allows the cases when Perl represents these values with something > other than "inf" or "NaN". [...] Content analysis details: (-4.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.4 AWL AWL: From: address is in the auto white-list
To: bug-Math-BigInt [...] rt.cpan.org
From: Florian Ragwitz <rafl [...] debian.org>
RT-Message-ID: <rt-3.8.HEAD-2356-1290931646-645.63379-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Content-Length: 1309
Download (untitled) / with headers
text/plain 1.2k
"Peter John Acklam via RT" <bug-Math-BigInt@rt.cpan.org> writes: Show quoted text
> Queue: Math-BigInt > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63379 > > > On Sat Nov 27 07:17:03 2010, JWRIGHT wrote: >
>> This is perl, v5.8.9 built for i386-freebsd
> > Could you show me how your Perl prints infinity? Please try with > something like > > perl -wle 'print 1e99 ** 1e99' > > Older versions of Perl have several different ways of representing a > numerical scalar infinity and Not-a-number. The test cases expect > "inf" and "NaN" and nothing else. The test cases should be modified so > it allows the cases when Perl represents these values with something > other than "inf" or "NaN".
Actually, that doesn't necessarily depend on the perl version. In most configurations and on most systems stringifying numbers is done by the C library of the system perl is running on. Unfortunately, there is no standard for how C libraries are supposed to stringify NaN and Inf. Common values are covered by /[+-]?inf/i and /[+-]?nan/i, but there's many more, such as '1.#INF' or '1.#IND' on win32. Perl does make no attempt at normalising this. I do happen to be working on a feature branch for perl to do that, but that is not quite finished yet and won't be available in a released version until 5.14 anyway.
Content-Type: application/pgp-signature
Content-Length: 197
Download (untitled)
application/pgp-signature 197b

Message body not shown because it is not plain text.

MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-2356-1290931646-645.63379-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-63379 [...] rt.cpan.org> <rt-3.8.HEAD-2359-1290860223-1953.63379-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-2359-1290930754-1005.63379-5-0 [...] rt.cpan.org> <87sjyleutf.fsf [...] tardis.home.perldition.org> <rt-3.8.HEAD-2356-1290931646-645.63379-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2362-1290932050-77.63379-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 294
Download (untitled) / with headers
text/plain 294b
I thought this had been standardized in Perl, to take care of the problem with the differing C libraries, so that Perl now returns "inf" and "NaN" regardless of the underlying C library. I could be mistaken, though. Anyway, the test case must be changed to handle this, or temporarily removed.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/html; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2363-1290941839-659.63379-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 55
Show quoted text
# perl -wle 'print 1e99 ** 1e99'
Inf

MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2361-1291033274-135.63379-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
RT-Send-CC: rafl [...] debian.org
Content-Length: 876
Download (untitled) / with headers
text/plain 876b
On HP-UX 11.11 PA-RISC/32 with perl5.12.2: $ perl -wle 'print 1e99 ** 1e99' ++ t/bare_mbi.t ........ 756/3615 # Failed test at t/bigintpm.inc line 206. # got: '++' # expected: 'inf' t/bare_mbi.t ........ 757/3615 # Failed test at t/bigintpm.inc line 206. # got: '---' # expected: '-inf' t/bigintpm.t ........ 762/3621 # Failed test at t/bigintpm.inc line 206. # got: '++' # expected: 'inf' t/bigintpm.t ........ 763/3621 # Failed test at t/bigintpm.inc line 206. # got: '---' # expected: '-inf' t/sub_mbi.t ......... 756/3620 # Failed test at t/bigintpm.inc line 206. # got: '++' # expected: 'inf' t/sub_mbi.t ......... 757/3620 # Failed test at t/bigintpm.inc line 206. # got: '---' # expected: '-inf' HP-UX 11.11 PA-RISC/64 with perl-5.12.2: $ perl -wle 'print 1e99 ** 1e99' ++
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-2361-1291033274-135.63379-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-2361-1291033274-135.63379-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2358-1291036276-1513.63379-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 411
Download (untitled) / with headers
text/plain 411b
On Mon Nov 29 07:21:14 2010, HMBRAND wrote: Show quoted text
> > $ perl -wle 'print 1e99 ** 1e99' > ++
Thank you! I am working on a fix. By the way, is the output numeric? If you do $ perl -wle 'print 0 + 1e99 ** 1e99' do you get the same output, or do you get Argument "++" isn't numeric in addition (+) at -e line 1. 0 It would surprise me if you get the latter, but it would be nice if you could confirm that you don't.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-19315-1297160962-1685.63379-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 87
The problem was non-portable tests. They have been removed. Fixed in Math-BigInt-1.991.


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.