commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Qualtagh (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MATH-1273) Negative zero support in FastMath.pow
Date Fri, 11 Sep 2015 06:52:45 GMT
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(-&infin;, -3.0) = -0.0
FastMath.pow(-&infin;, -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)

Mime
View raw message