commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Nezda (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MATH-971) FastMath.atanh wrong?
Date Thu, 02 May 2013 19:42:15 GMT
Luke Nezda created MATH-971:
-------------------------------

             Summary: FastMath.atanh wrong?
                 Key: MATH-971
                 URL: https://issues.apache.org/jira/browse/MATH-971
             Project: Commons Math
          Issue Type: Bug
    Affects Versions: 3.1.1
            Reporter: Luke Nezda


When I compare the values computed using FastMath.atanh with those produced by similar C++
code (using standard math.h), the results are different.  The C++ code agrees with Wolfram
Alpha, so I think it is probably right.

||Input||Wolfram-Alpha||C++ / math.h||FastMath.atanh||
|0.1 |0.10033534773107558|0.100335|0.09966865249116204|
|0.2 |0.2027325540540822| 0.202733|0.19739555984988078|
|0.3 |0.30951960420311175|0.30952 |0.2914567944778671|
|0.4 |0.4236489301936|    0.423649|0.3805063771123649|
|0.5 |0.5493061443340548| 0.549306|0.4636476090008061|
|0.6 |0.6931471805599453| 0.693147|0.5404195002705842|
|0.7 |0.8673005276940531| 0.867301|0.6107259643892086|
|0.8 |1.0986122886681098| 1.09861 |0.6747409422235527|
|0.9 |1.4722194895832204| 1.47222 |0.7328151017865066|
|1	 |Infinity|           inf     |0.7853981633974483|
|1.1 |1.522 and 1.571i|   -nan    |0.8329812666744317|


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message