You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Qualtagh (JIRA)" <ji...@apache.org> on 2015/09/11 08:53:46 UTC

[jira] [Updated] (MATH-1273) Negative zero support in FastMath.pow

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

Qualtagh updated MATH-1273:
---------------------------
    Attachment: MATH-1273.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
>
>         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)