[
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(-∞, -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)