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 14ECB18F1D for ; Fri, 11 Sep 2015 06:52:46 +0000 (UTC) Received: (qmail 99613 invoked by uid 500); 11 Sep 2015 06:52:45 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 99521 invoked by uid 500); 11 Sep 2015 06:52:45 -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 99510 invoked by uid 99); 11 Sep 2015 06:52:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Sep 2015 06:52:45 +0000 Date: Fri, 11 Sep 2015 06:52:45 +0000 (UTC) From: "Qualtagh (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (MATH-1273) Negative zero support in FastMath.pow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Qualtagh created MATH-1273: ------------------------------ Summary: Negative zero support in FastMath.pow Key: MATH-1273 URL: https://issues.apache.org/jira/browse/MATH-1273 Project: Commons Math Issue Type: Improvement Affects Versions: 4.0 Reporter: Qualtagh Priority: Trivial Fix For: 4.0 FastMath.pow(double, double) and FastMath.pow(double, long) functions never return negative zero. Math.pow(-0.0, 5.0) = -0.0 FastMath.pow(-0.0, 5.0) = 0.0 Math.pow(-∞, -3.0) = -0.0 FastMath.pow(-∞, -3.0) = 0.0 Added support for negative zero. Also, added ultimate tests to cover all special cases described in Math.pow javadoc. Slightly edited an existing test: there were some typos and duplicates. -- This message was sent by Atlassian JIRA (v6.3.4#6332)