|Subject:||Bug in Math::BigFloat ->batan() method.|
|Date:||Tue, 7 Sep 2010 11:41:19 -0600|
|To:||bug-Math-BigInt [...] rt.cpan.org|
|From:||Calvin Schwenzfeier <calvin.schwenzfeier [...] gmail.com>|
Greetings, Attached is a test file which tickles a bug in the Math::BigFloat ->batan() method. Specifically, the bug manifests when the value (*n*) you are trying to find the arc-tangent of is outside the range -1 ≤ *n* ≤ 1 , but only if the value (*n*) is not an integer (that is, finding the arc-tangent of 2 works; but 2.1 and 1.9 both go off in infinite loops). Looking at the source, it appears there is code to map numbers into the above range and then map them back after the arc-tangent series computation. My guess is one or both of the mapping operations are wrong (haven't taken the time to figure out which). ~Cal P.S.: The values used in the test file came from Wolfram|Alpha (i.e.,, then rounded to approximately the correct precision. So if values are not exactly matching up, check the last few digits.
Message body is not shown because sender requested not to inline it.