You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Luke Nezda (JIRA)" <ji...@apache.org> on 2013/05/03 15:42:22 UTC
[jira] [Closed] (MATH-971) FastMath.atanh wrong?
[ https://issues.apache.org/jira/browse/MATH-971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luke Nezda closed MATH-971.
---------------------------
Resolution: Invalid
What a spectacular public fail - I was calling {{FastMath.atan\(x\)}} instead of {{FastMath.atanh\(x\)}} - you'd think I would've double-checked that!? I apologize for wasting your time Gilles.
> 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 WolframAlpha (e.g., [http://www.wolframalpha.com/input/?i=atanh(1)]), 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