Skip Menu |

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

Report information
The Basics
Id: 33578
Status: resolved
Worked: 22 min
Priority: 0/
Queue: Math-BigInt

People
Owner: TELS [...] cpan.org
Requestors: PMW-Pause [...] gamewood.net
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 1.82
  • 1.83
  • 1.84
  • 1.85
  • 1.86
  • 1.87
Fixed in: (no value)



Subject: from_hex/from_bin/from_oct seem broken?
Trying to use from_bin or from_hex in ActiveState Perl 5.8.8 build 822 on Windows XP and it is always returning NaN. Examining code seems to show a number of issues, puzzling is double strip underscores code and weird way it is done. Main issue seems to be not handling $self when getting arguments in internal __from_hex and __from_bin. from_oct appears to be seriously broken as well, using hex patterns in strip underscore expression and decimal pattern when testing validity.
On Mon Feb 25 23:05:01 2008, WILSONPM wrote: Show quoted text
> Trying to use from_bin or from_hex in ActiveState Perl 5.8.8 build 822 > on Windows XP and it is always returning NaN. > > Examining code seems to show a number of issues, puzzling is double > strip underscores code and weird way it is done. > > Main issue seems to be not handling $self when getting arguments in > internal __from_hex and __from_bin. > > from_oct appears to be seriously broken as well, using hex patterns in > strip underscore expression and decimal pattern when testing validity.
Is this v1.82 of Math::BigInt? If so, can you please try the latest CPAN release (which should be v1.87). Thank you!
From: PMW-Pause [...] gamewood.net
On Tue Feb 26 17:42:21 2008, TELS wrote: Show quoted text
> > Is this v1.82 of Math::BigInt? If so, can you please try the latest CPAN > release (which should be v1.87). Thank you! >
Checking the source for 1.87 on CPAN, the code appears identical and the same issues should be there. It is obvious that the from_oct code is incorrect and I was unable to get the same code in 1.82 to work for from_hex or from_bin without patching the source.
On Tue Feb 26 18:11:51 2008, WILSONPM wrote: Show quoted text
> On Tue Feb 26 17:42:21 2008, TELS wrote:
> > > > Is this v1.82 of Math::BigInt? If so, can you please try the latest CPAN > > release (which should be v1.87). Thank you! > >
> > > Checking the source for 1.87 on CPAN, the code appears identical and the > same issues should be there. It is obvious that the from_oct code is > incorrect and I was unable to get the same code in 1.82 to work for > from_hex or from_bin without patching the source.
This is fixed in the upcoming release of v1.88 - sorry for the delay!
I just released v1.88 of Math::BigInt to CPAN, this should resolve your issue. If it doesn't, please reply to re-open the bug report ;)