Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



From gg [...] zip.com.au Fri Aug 12 20: 08:23 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-6.893 tagged_above=-99.9 required=10 tests=[AWL=-0.003, BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, T_TVD_MIME_NO_HEADERS=0.01] autolearn=ham
X-Spam-Flag: NO
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Content-Type: multipart/mixed; boundary="=-=-="
Message-ID: <878vqy9ns8.fsf [...] blah.blah>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -6.893
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 1622D240795 for <cpan-bug+Math-BigInt [...] hipster.bestpractical.com>; Fri, 12 Aug 2011 20:08:23 -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 elaUyJMt-7hv for <cpan-bug+Math-BigInt [...] hipster.bestpractical.com>; Fri, 12 Aug 2011 20:08:21 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id C211D240787 for <bug-Math-BigInt [...] rt.cpan.org>; Fri, 12 Aug 2011 20:08:20 -0400 (EDT)
Received: (qmail 833 invoked by uid 103); 13 Aug 2011 00:08:19 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 13 Aug 2011 00:08:19 -0000
Received: from mailout2-6.pacific.net.au (HELO mailout2.pacific.net.au) (61.8.2.229) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Fri, 12 Aug 2011 17:08:16 -0700
Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id DDBE82C0081 for <bug-Math-BigInt [...] rt.cpan.org>; Sat, 13 Aug 2011 10:08:12 +1000 (EST)
Received: from blah.blah (unknown [203.26.175.71]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 4376627407 for <bug-Math-BigInt [...] rt.cpan.org>; Sat, 13 Aug 2011 10:08:12 +1000 (EST)
Received: from gg by blah.blah with local (Exim 4.72) (envelope-from <gg [...] zip.com.au>) id 1Qs1lX-0005pM-BV for bug-Math-BigInt [...] rt.cpan.org; Sat, 13 Aug 2011 10:07:51 +1000
Delivered-To: cpan-bug+Math-BigInt [...] hipster.bestpractical.com
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.3 (gnu/linux)
Subject: int(x) > x
Return-Path: <gg [...] zip.com.au>
X-RT-Mail-Extension: math-bigint
X-Original-To: cpan-bug+Math-BigInt [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Date: Sat, 13 Aug 2011 10:07:51 +1000
X-Spam-Level:
To: bug-Math-BigInt [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
Content-Length: 0
X-RT-Original-Encoding: ascii
content-type: text/plain; charset="utf-8"
Content-Length: 407
Download (untitled) / with headers
text/plain 407b
With recent debian i386 perl 5.12.4 and its Math::BigInt 1.993, it seems int($x) > $x is true for a positive BigFloat, where I expected it to be false, since int() rounds towards zero. Eg. foo.pl below. I see int() gives a BigInt but a comparision "BigInt > BigFloat" apparently doesn't like a fraction part in the second arg. Maybe it could notice a BigFloat there for maximum inter-operation.
Content-Type: text/x-perl
content-disposition: inline; filename="foo.pl"
Content-Length: 153
Download foo.pl
text/x-perl 153b
use strict; use Math::BigFloat; my $f = Math::BigFloat->new('3.5'); my $i = int($f); print "f=$f\n"; print "i=$i\n"; print "i > f is '",($i > $f),"'\n";
MIME-Version: 1.0
In-Reply-To: <878vqy9ns8.fsf [...] blah.blah>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <878vqy9ns8.fsf [...] blah.blah>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-29756-1341859392-981.70244-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 131
Download (untitled) / with headers
text/plain 131b
This is fixed. The spaceship operator returns 0 for non-upgraded values, and -1 with upgrade turned on. Please close this ticket.
MIME-Version: 1.0
In-Reply-To: <878vqy9ns8.fsf [...] blah.blah>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <878vqy9ns8.fsf [...] blah.blah>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-19744-1396962438-1106.70244-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: 32
This was fixed in version 1.997.


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.