diff --git a/lib/Math/BigInt/LTM.pm b/lib/Math/BigInt/LTM.pm index 4ee7bb7..dfe6b67 100644 --- a/lib/Math/BigInt/LTM.pm +++ b/lib/Math/BigInt/LTM.pm @@ -331,7 +331,7 @@ 0 + $class -> _str($x); } -### same as _fac() in Math::BigInt::Lib +### PATCHED _fac() from Math::BigInt::Lib sub _fac { # factorial my ($class, $x) = @_; @@ -339,7 +339,9 @@ my $two = $class -> _two(); if ($class -> _acmp($x, $two) < 0) { - return $class -> _one(); + ###HACK: needed for MBI 1.999715 compatibility + ###return $class -> _one(); + $class->_set($x, 1); return $x } my $i = $class -> _copy($x); @@ -351,7 +353,7 @@ return $x; } -### same as _dfac() in Math::BigInt::Lib +### PATCHED _dfac() from Math::BigInt::Lib sub _dfac { # double factorial my ($class, $x) = @_; @@ -359,7 +361,9 @@ my $two = $class -> _two(); if ($class -> _acmp($x, $two) < 0) { - return $class -> _one(); + ###HACK: needed for MBI 1.999715 compatibility + ###return $class -> _one(); + $class->_set($x, 1); return $x } my $i = $class -> _copy($x);