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/14 23:46:45 UTC
[jira] Created: (MATH-479) FastMath.signum(-0.0) does not agree
with Math.signum(-0.0) ; no tests for signum
FastMath.signum(-0.0) does not agree with Math.signum(-0.0) ; no tests for signum
---------------------------------------------------------------------------------
Key: MATH-479
URL: https://issues.apache.org/jira/browse/MATH-479
Project: Commons Math
Issue Type: Bug
Reporter: Sebb
There are no unit tests for FastMath.signum(double) as yet.
Here is one that should work, but fails:
{code}
@Test
public void testSignum() {
Assert.assertTrue(Double.valueOf(FastMath.signum(+0.0)).equals(Double.valueOf(Math.signum(+0.0)))); // OK
Assert.assertTrue(Double.valueOf(FastMath.signum(-0.0)).equals(Double.valueOf(Math.signum(-0.0)))); // FAILS
}
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MATH-479) FastMath.signum(-0.0) does not agree
with Math.signum(-0.0) ; no tests for signum
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb updated MATH-479:
----------------------
Affects Version/s: 3.0
2.2
> FastMath.signum(-0.0) does not agree with Math.signum(-0.0) ; no tests for signum
> ---------------------------------------------------------------------------------
>
> Key: MATH-479
> URL: https://issues.apache.org/jira/browse/MATH-479
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.2, 3.0
> Reporter: Sebb
> Attachments: Math479.patch
>
>
> There are no unit tests for FastMath.signum(double) as yet.
> Here is one that should work, but fails:
> {code}
> @Test
> public void testSignum() {
> Assert.assertTrue(Double.valueOf(FastMath.signum(+0.0)).equals(Double.valueOf(Math.signum(+0.0)))); // OK
> Assert.assertTrue(Double.valueOf(FastMath.signum(-0.0)).equals(Double.valueOf(Math.signum(-0.0)))); // FAILS
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] [Closed] (MATH-479) FastMath.signum(-0.0) does not agree
with Math.signum(-0.0) ; no tests for signum
Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luc Maisonobe closed MATH-479.
------------------------------
Closing issue as it was included in version 2.2, which has been released
> FastMath.signum(-0.0) does not agree with Math.signum(-0.0) ; no tests for signum
> ---------------------------------------------------------------------------------
>
> Key: MATH-479
> URL: https://issues.apache.org/jira/browse/MATH-479
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.2, 3.0
> Reporter: Sebb
> Fix For: 2.2, 3.0
>
> Attachments: Math479.patch
>
>
> There are no unit tests for FastMath.signum(double) as yet.
> Here is one that should work, but fails:
> {code}
> @Test
> public void testSignum() {
> Assert.assertTrue(Double.valueOf(FastMath.signum(+0.0)).equals(Double.valueOf(Math.signum(+0.0)))); // OK
> Assert.assertTrue(Double.valueOf(FastMath.signum(-0.0)).equals(Double.valueOf(Math.signum(-0.0)))); // FAILS
> }
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MATH-479) FastMath.signum(-0.0) does not agree
with Math.signum(-0.0) ; no tests for signum
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb updated MATH-479:
----------------------
Attachment: Math479.patch
Patch to add test case against Math.signum(double) and fix for bug (also simplifies the code)
> FastMath.signum(-0.0) does not agree with Math.signum(-0.0) ; no tests for signum
> ---------------------------------------------------------------------------------
>
> Key: MATH-479
> URL: https://issues.apache.org/jira/browse/MATH-479
> Project: Commons Math
> Issue Type: Bug
> Reporter: Sebb
> Attachments: Math479.patch
>
>
> There are no unit tests for FastMath.signum(double) as yet.
> Here is one that should work, but fails:
> {code}
> @Test
> public void testSignum() {
> Assert.assertTrue(Double.valueOf(FastMath.signum(+0.0)).equals(Double.valueOf(Math.signum(+0.0)))); // OK
> Assert.assertTrue(Double.valueOf(FastMath.signum(-0.0)).equals(Double.valueOf(Math.signum(-0.0)))); // FAILS
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MATH-479) FastMath.signum(-0.0) does not agree
with Math.signum(-0.0) ; no tests for signum
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved MATH-479.
-----------------------
Resolution: Fixed
Fix Version/s: 3.0
2.2
> FastMath.signum(-0.0) does not agree with Math.signum(-0.0) ; no tests for signum
> ---------------------------------------------------------------------------------
>
> Key: MATH-479
> URL: https://issues.apache.org/jira/browse/MATH-479
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.2, 3.0
> Reporter: Sebb
> Fix For: 2.2, 3.0
>
> Attachments: Math479.patch
>
>
> There are no unit tests for FastMath.signum(double) as yet.
> Here is one that should work, but fails:
> {code}
> @Test
> public void testSignum() {
> Assert.assertTrue(Double.valueOf(FastMath.signum(+0.0)).equals(Double.valueOf(Math.signum(+0.0)))); // OK
> Assert.assertTrue(Double.valueOf(FastMath.signum(-0.0)).equals(Double.valueOf(Math.signum(-0.0)))); // FAILS
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.