You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2011/01/18 01:25:44 UTC

[jira] Created: (MATH-483) FastMath does not handle special case -0.0 for asin() and atan()

FastMath does not handle special case -0.0 for asin() and atan()
----------------------------------------------------------------

                 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

The functions asin() and atan() are supposed to return the same sign 0 for zero argument, but they currently return +0.0 for both.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MATH-483) FastMath does not handle all special cases correctly

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated MATH-483:
----------------------

    Attachment: MATH-483-generic.patch

Generic test methods using reflection to compare Math methods with FastMath methods for float and double special cases.

Replaces testHyperbolicSpecialCases() and testTrigSpecialCases() in the previous patch

> 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-generic.patch, 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.


[jira] Updated: (MATH-483) FastMath does not handle all special cases correctly

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated MATH-483:
----------------------

    Affects Version/s:     (was: 2.1)
                       2.2

> 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.2, 3.0
>            Reporter: Sebb
>             Fix For: 2.2, 3.0
>
>         Attachments: MATH-483-generic.patch, 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.


[jira] [Closed] (MATH-483) FastMath does not handle all special cases correctly

Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luc Maisonobe closed MATH-483.
------------------------------


Closing issue as it was included in version 2.2, which has been released

> 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.2, 3.0
>            Reporter: Sebb
>             Fix For: 2.2, 3.0
>
>         Attachments: MATH-483-generic.patch, 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (MATH-483) FastMath does not handle all special cases correctly

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (MATH-483) FastMath does not handle special case -0.0 for asin() and atan()

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated MATH-483:
----------------------

    Attachment: MATH-483.patch

Fix + test cases

> FastMath does not handle special case -0.0 for asin() and atan()
> ----------------------------------------------------------------
>
>                 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
>
>
> The functions asin() and atan() are supposed to return the same sign 0 for zero argument, but they currently return +0.0 for both.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MATH-483) FastMath does not handle all special cases correctly

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved MATH-483.
-----------------------

       Resolution: Fixed
    Fix Version/s: 3.0
                   2.2

There are still some issues with toDegrees() and toRadians() but these are covered by MATH-486

> 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
>             Fix For: 2.2, 3.0
>
>         Attachments: MATH-483-generic.patch, 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.


[jira] Updated: (MATH-483) FastMath does not handle all special cases correctly

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated MATH-483:
----------------------

    Attachment: MATH-483-generic.patch

Fixed bug - duplicate MAX_VALUE should have MIN_VALUE

> 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-generic.patch, 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.


[jira] Updated: (MATH-483) FastMath does not handle all special cases correctly

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated MATH-483:
----------------------

    Attachment:     (was: MATH-483-generic.patch)

> 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-generic.patch, 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.