commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (MATH-1273) Negative zero support in FastMath.pow
Date Fri, 11 Sep 2015 18:03:45 GMT

     [ https://issues.apache.org/jira/browse/MATH-1273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Luc Maisonobe resolved MATH-1273.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 3.6

Fixed in git repository, for both 4.0 and 3.X branches.

Thanks for the report and for the patch!

> 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, 3.6
>
>         Attachments: MATH-1273.patch
>
>
> 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