commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Otmar Ertl (JIRA)" <>
Subject [jira] [Commented] (MATH-1269) FastMath.exp may return NaN for non-NaN arguments
Date Wed, 09 Sep 2015 19:22:47 GMT


Otmar Ertl commented on MATH-1269:

In my opinion simply changing NaNs to infinity can only be a short-term solution. Such a transformation
at the end of this function is like admitting that we do not really know how our code works.
This is not acceptable for such an essential function as the exponential function.

> FastMath.exp may return NaN for non-NaN arguments
> -------------------------------------------------
>                 Key: MATH-1269
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Otmar Ertl
>         Attachments: MATH-1269.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 non-negative
or positive infinity.

This message was sent by Atlassian JIRA

View raw message