[ https://issues.apache.org/jira/browse/MATH1269?page=com.atlassian.jira.plugin.system.issuetabpanels:commenttabpanel&focusedCommentId=14969913#comment14969913
]
Thomas Neidhart edited comment on MATH1269 at 10/22/15 9:38 PM:

I propose another patch for this issue.
The polynomial expansion for z = exp(epsilon)  1.0 is actually returning wrong results in
case epsilon = 0.
The patch handles this case and further fixes the calculation of (1+z)(tempA+tempB) in this
case (as z is 0, we only have to add tempA and tempB).
This would fix your case and other potential cases in the range [0, 709] for which the epsilon
is also 0.
was (Author: tn):
I propose another patch for this issue.
The polynomial expansion for z = exp(epsilon)  1.0 is actually returning wrong results in
case epsilon = 0.
The patch handles this case and further fixes the calculation of (1+z)(tempA+tempB) in case
z is 0 as well (in which case we only have to add tempA and tempB).
This would fix your case as well and other potential cases in the range [0, 709] for which
the epsilon is also 0.
> FastMath.exp may return NaN for nonNaN arguments
> 
>
> Key: MATH1269
> URL: https://issues.apache.org/jira/browse/MATH1269
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 4.0
> Reporter: Otmar Ertl
> Attachments: MATH1269.patch, MATH1269.patch, MATH1269_fix_z.patch
>
>
> I have observed that FastMath.exp(709.8125) returns NaN. However, the exponential function
must never return NaN (if the argument is not NaN). The result must always be nonnegative
or positive infinity.

This message was sent by Atlassian JIRA
(v6.3.4#6332)
