Subject: | Infinite loop for $x->blog($y) with global precision set |
For certain values, when the result is not a whole number, Math::BigFloat gets stuck into an infinite loop and produces the following infinite warning:
Use of uninitialized value in numeric le (<=) at /usr/share/perl5/site_perl/Math/BigFloat.pm line 1528.
Use of uninitialized value in numeric le (<=) at /usr/share/perl5/site_perl/Math/BigFloat.pm line 1528.
Use of uninitialized value in numeric le (<=) at /usr/share/perl5/site_perl/Math/BigFloat.pm line 1528.
...
The following code reproduces the bug:
===BEGIN-CODE===
use Math::BigFloat;
Math::BigFloat->precision(-4); # commenting this, works OK
my $x = Math::BigFloat->new(8);
my $y = Math::BigFloat->new(4);
CORE::say $x->blog($y);
===END-CODE===