You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2011/01/21 04:33:43 UTC

[jira] Resolved: (MATH-489) FastMath acos fails when input abs value is less than about 5.7851920321187236E-300 - returns NaN

     [ https://issues.apache.org/jira/browse/MATH-489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved MATH-489.
-----------------------

       Resolution: Fixed
    Fix Version/s: 3.0
                   2.2

URL: http://svn.apache.org/viewvc?rev=1061608&view=rev
Log:
Fix overflows in acos calculation

URL: http://svn.apache.org/viewvc?rev=1061609&view=rev
Log:
Fix overflows in acos calculation

> FastMath acos fails when input abs value is less than about 5.7851920321187236E-300 - returns NaN
> -------------------------------------------------------------------------------------------------
>
>                 Key: MATH-489
>                 URL: https://issues.apache.org/jira/browse/MATH-489
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: 2.2, 3.0
>
>
> FastMath acos fails when input absolute value is less than about 5.7851920321187236E-300
> It returns NaN instead of an expected value close to PI/2.0
> This appears to be due to the following code:
> {code}
> // Compute ratio r = y/x
> double r = y/x;
> temp = r * 1073741824.0;
> {code}
> r and temp can become infinite or Nan.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.