Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: peter.john.acklam [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 1.41
  • 1.42
  • 1.44
  • 1.45
  • 1.46
  • 1.47
  • 1.48
  • 1.49
  • 1.50
  • 1.51
  • 1.52
  • 1.53
  • 1.54
  • 1.55
  • 1.56
  • 1.57
  • 1.58
  • 1.59
  • 1.60
  • 1.61
  • 1.62
  • 1.63
  • 1.64
  • 1.65
  • 1.66
  • 1.67
  • 1.68
  • 1.69
  • 1.70
  • 1.71
  • 1.72
  • 1.73
  • 1.74
  • 1.75
  • 1.76
  • 1.77
  • 1.78
  • 1.79
  • 1.80
  • 1.82
  • 1.83
  • 1.84
  • 1.85
  • 1.86
  • 1.87
  • 1.88
  • 1.89
  • 1.90
  • 1.91
  • 1.92
  • 1.93
  • 1.94-TRIAL
  • 1.95
  • 1.96
  • 1.97
  • 1.98
  • 1.99
Fixed in: (no value)



Subject: Math::BigInt -> new("1e-999999") gives error, not NaN
Most non-integer intput to Math::BigInt -> new() returns a NaN (but see RT ticket 61887). This case gives an error: $ perl -MMath::BigInt -lwe 'print Math::BigInt -> new("1e-999999")' Quantifier in {,} bigger than 32766 in regex; marked by <-- HERE in m/0{ <-- HERE 999999}$/ at /usr/local/lib/perl5/5.10/Math/BigInt.pm line 626. This bug is related to RT tickets 61778 and 61887 in the sense they all have to do with how Math::BigInt -> new() parses and converts input.
This is still an issue, but only for BigInt, not BigFloat. BigInt should detect the e-### and immediately create a zero from that. All negative exponents will be in the 0 < x > 1 range, so the truncation should just short-circuit to zero.
From: bitcard [...] volkerschatz.com
This is a regex error message complaining about the match count being to large. The cause is trying to truncate the number using a regex matching surplus digits, in the test case all 999999 of them. The solution (as in other cases when you get this message) is to use substr() instead: @@ -625,8 +625,10 @@ { # xE-y, and empty mfv #print "xE-y\n"; - $e = abs($e); - if ($$miv !~ s/0{$e}$//) # can strip so many zero's? + my $tail= substr($$miv, $e); # abs($e) trailing digits + substr($$miv, $e)= ""; + $$miv= "0" unless CORE::length $$miv; + if ($tail =~ /[^0]/) { if ($_trap_nan) Line numbers refer to version 1.9991, which my distribution ships but CPAN does not yet (?!).
RT-Send-CC: bitcard [...] volkerschatz.com
Fixed in Math-BigInt-1.999701.