Skip Menu |

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

Report information
The Basics
Id: 35238
Status: resolved
Worked: 25 min
Priority: 0/
Queue: Math-BigInt

People
Owner: TELS [...] cpan.org
Requestors: nospam-abuse [...] bloodgate.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.88
Fixed in: (no value)



Subject: batan2() does not handle inf/-inf properly
From the POSIX man page of atan2: Show quoted text
> | For finite values of ± y > 0, if x is -Inf, ±pi shall be returned. > | For finite values of ± y > 0, if x is +Inf, ±0 shall be returned. > | For finite values of x, if y is ±Inf, ±pi/2 shall be returned. > | If y is ±Inf and x is -Inf, ±3pi/4 shall be returned. > | If y is ±Inf and x is +Inf, ±pi/4 shall be returned. >
Currently: # perl -Mbignum -wle 'print 1->batan2(-inf)' Ambiguous use of -inf resolved as -&inf() at -e line 1. Illegal division by zero at /usr/share/perl/5.8/Math/BigInt/Calc.pm line 806. # perl -Mbignum -wle 'print 1->batan2(+inf)' Illegal division by zero at /usr/share/perl/5.8/Math/BigInt/Calc.pm line 806. # perl -Mbignum -wle 'print inf->batan2(1)' 1 # perl -Mbignum -wle 'print inf->batan2(-inf)' Ambiguous use of -inf resolved as -&inf() at -e line 1. 1 # perl -Mbignum -wle 'print inf->batan2(+inf)' 1
Resolved with the v1.89 release.