[
https://issues.apache.org/jira/browse/MATH-483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sebb updated MATH-483:
----------------------
Description:
FastMath has some issues with special cases such as +0.0 and -0.0.
Here are the double cases so far found:
abs(-0.0) expected:<0.0> but was:<-0.0>
signum(-0.0) expected:<-0.0> but was:<0.0>
asin(-0.0) expected:<-0.0> but was:<0.0>
atan(-0.0) expected:<-0.0> but was:<0.0>
log10(-0.0) expected:<-Infinity> but was:<NaN>
toDegrees(-0.0) expected:<-0.0> but was:<0.0>
toRadians(-0.0) expected:<-0.0> but was:<0.0>
ulp(-Infinity) expected:<Infinity> but was:<NaN>
And float cases:
abs(-0.0) expected:<0.0> but was:<-0.0>
was:The functions asin() and atan() are supposed to return the same sign 0
for zero argument, but they currently return +0.0 for both.
Summary: FastMath does not handle all special cases correctly (was:
FastMath does not handle special case -0.0 for asin() and atan())
> FastMath does not handle all special cases correctly
> ----------------------------------------------------
>
> Key: MATH-483
> URL: https://issues.apache.org/jira/browse/MATH-483
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.1, 3.0
> Reporter: Sebb
> Attachments: MATH-483.patch
>
>
> FastMath has some issues with special cases such as +0.0 and -0.0.
> Here are the double cases so far found:
> abs(-0.0) expected:<0.0> but was:<-0.0>
> signum(-0.0) expected:<-0.0> but was:<0.0>
> asin(-0.0) expected:<-0.0> but was:<0.0>
> atan(-0.0) expected:<-0.0> but was:<0.0>
> log10(-0.0) expected:<-Infinity> but was:<NaN>
> toDegrees(-0.0) expected:<-0.0> but was:<0.0>
> toRadians(-0.0) expected:<-0.0> but was:<0.0>
> ulp(-Infinity) expected:<Infinity> but was:<NaN>
> And float cases:
> abs(-0.0) expected:<0.0> but was:<-0.0>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.