Skip Menu |
 

This queue is for tickets about the bignum CPAN distribution.

Report information
The Basics
Id: 78676
Status: resolved
Priority: 0/
Queue: bignum

People
Owner: Nobody in particular
Requestors: spidermario [...] free.fr
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.29
Fixed in: 0.41



Subject: The behaviour of oct in bigint is inconsistent with that of the default oct
MIME-Version: 1.0
Content-Type: text/plain; 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: 548
Download (untitled) / with headers
text/plain 548b
Hello, I am using perl v5.16.0 and v5.10.1 and the `oct` function with which bigint replaces the default one requires a leading 0 to interpret its parameter as an octal number, whereas the default `oct` does not (and neither do `hex` and `bigint::hex` require a leading 0x). If there is no prefix, the parameter is interpreted as a decimal number. It is also inconsistent with Math::BigInt->from_oct, which returns NaN in Math::BigInt v1.89 and correctly interprets as an octal number in v1.998. Is that a bug or is there a rationale behind it?
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-4082-1429432943-51.78676-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: 125
Download (untitled) / with headers
text/plain 125b
This is a bug. The bigint, bignum, and bigrat the semantics should be the same as those of core Perl. I am working on a fix.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-18210-1449149286-1510.78676-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: 20
Fixed in bignum-0.41


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.