commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Created: (MATH-479) FastMath.signum(-0.0) does not agree with Math.signum(-0.0) ; no tests for signum
Date Fri, 14 Jan 2011 22:46:45 GMT
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.


Mime
View raw message