Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C9B4100A8 for ; Wed, 9 Sep 2015 16:52:58 +0000 (UTC) Received: (qmail 78880 invoked by uid 500); 9 Sep 2015 16:52:46 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 78775 invoked by uid 500); 9 Sep 2015 16:52:46 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 78758 invoked by uid 99); 9 Sep 2015 16:52:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2015 16:52:45 +0000 Date: Wed, 9 Sep 2015 16:52:45 +0000 (UTC) From: "Otmar Ertl (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MATH-1269) FastMath.exp may return NaN for non-NaN arguments MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MATH-1269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14737181#comment-14737181 ] Otmar Ertl commented on MATH-1269: ---------------------------------- I have an objection. The patch changes the result of FastMath.exp(709.0001) from 8.219229343394329E307 to Double.POSITIVE_INFINITY. Although this kind of error is less harmful than that caused by the bug, I would prefer a more rigorous solution. > FastMath.exp may return NaN for non-NaN arguments > ------------------------------------------------- > > Key: MATH-1269 > URL: https://issues.apache.org/jira/browse/MATH-1269 > 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 (v6.3.4#6332)