-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No subject provided #492
Comments
From mostow@il.ibm.comThe test program below, when run for Perl version 5.00403, My test program which uses BigInt addition initializes its variables. #!/usr/local/bin/perl5 -w print "\tBigInt calculations for Perl version $]\n\n"; package BigIntBug; use Math::BigInt; my $a = '134720'; Perl Info
|
From [Unknown Contact. See original ticket]On Wed, 08 Sep 1999 at 09:37:04 +0300, mostow@il.ibm.com wrote:
Thank you for your bug report. The warnings have been silenced in the Unfortunately, The new BigInt has a number of improvements and makes use Ian Inline Patch--- ../perl5.004_04/lib/Math/BigInt.pm Sun Apr 13 01:37:09 1997
+++ lib/Math/BigInt.pm Tue Jul 20 18:18:00 1999
@@ -172,5 +184,5 @@
for $x (@x) {
last unless @y || $car;
- $x -= 1e5 if $car = (($x += shift(@y) + $car) >= 1e5) ? 1 : 0;
+ $x -= 1e5 if $car = (($x += (@y ? shift(@y) : 0) + $car) >= 1e5) ? 1 : 0;
}
for $y (@y) {
@@ -186,6 +198,6 @@
$bar = 0;
for $sx (@sx) {
- last unless @y || $bar;
- $sx += 1e5 if $bar = (($sx -= shift(@sy) + $bar) < 0);
+ last unless @sy || $bar;
+ $sx += 1e5 if $bar = (($sx -= (@sy ? shift(@sy) : 0) + $bar) < 0);
}
@sx;
@@ -254,6 +266,8 @@
}
@q = (); ($v2,$v1) = @y[-2,-1];
+ $v2 = 0 unless $v2;
while ($#x > $#y) {
($u2,$u1,$u0) = @x[-3..-1];
+ $u2 = 0 unless $u2;
$q = (($u0 == $v1) ? 99999 : int(($u0*1e5+$u1)/$v1));
--$q while ($v2*$q > ($u0*1e5+$u1-$q*$v1)*1e5+$u2); |
From [Unknown Contact. See original ticket]Dear Ian, That was fast! Thanks for your speedy reply about BigInt problems. Best wishes, Mark |
Migrated from rt.perl.org#1334 (status was 'resolved')
Searchable as RT1334$
The text was updated successfully, but these errors were encountered: