Math.nextUp is not available before Java 1.6.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1588754 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2014-04-20 13:25:36 +00:00
parent 7f162008a2
commit 931a67ff52
1 changed files with 4 additions and 4 deletions

View File

@ -531,14 +531,14 @@ public class ComplexTest {
final int maxUlps = 5;
for (int i = 0; i < maxUlps; i++) {
re = Math.nextUp(re);
im = Math.nextUp(im);
re = FastMath.nextUp(re);
im = FastMath.nextUp(im);
}
y = new Complex(re, im);
Assert.assertTrue(Complex.equals(x, y, maxUlps));
re = Math.nextUp(re);
im = Math.nextUp(im);
re = FastMath.nextUp(re);
im = FastMath.nextUp(im);
y = new Complex(re, im);
Assert.assertFalse(Complex.equals(x, y, maxUlps));
}