Skip Menu |

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

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

Owner: Nobody in particular
Requestors: TRIZEN [...]

Bug Information
Severity: (no value)
Broken in: 1.999710
Fixed in: 1.999714

Subject: Possible infinite loop inside Math::BigFloat->batan2()
Download (untitled) / with headers
text/plain 474b
Given the following code: ===BEGIN=== use Math::BigFloat (lib => 'GMP'); my $x = Math::BigFloat->new('0.08628308027'); my $y = Math::BigFloat->new('0.008726535033'); CORE::say $x->batan2($y); ===END=== On my computer, with Math::BigInt::GMP installed, after two minutes, the code is still running. My guess is that it got stuck into an infinite loop, or the function is just too slow to finish in a reasonable amount of time. I'm not really sure which one is the case.
Download (untitled) / with headers
text/plain 349b
With Math-BigInt v1.999714, my laptop takes less than a fraction of a execute the code and return 1.4700006461650417615358745908443378854551204. Thanks to DANAJ (Dana Jacobsen) for the fix and for the suggestions for speeding up the code. The batan2() method was almost completely rewritten. If it returned a result, the result was often incorrect.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to