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:
parent
7f162008a2
commit
931a67ff52
|
@ -531,14 +531,14 @@ public class ComplexTest {
|
||||||
|
|
||||||
final int maxUlps = 5;
|
final int maxUlps = 5;
|
||||||
for (int i = 0; i < maxUlps; i++) {
|
for (int i = 0; i < maxUlps; i++) {
|
||||||
re = Math.nextUp(re);
|
re = FastMath.nextUp(re);
|
||||||
im = Math.nextUp(im);
|
im = FastMath.nextUp(im);
|
||||||
}
|
}
|
||||||
y = new Complex(re, im);
|
y = new Complex(re, im);
|
||||||
Assert.assertTrue(Complex.equals(x, y, maxUlps));
|
Assert.assertTrue(Complex.equals(x, y, maxUlps));
|
||||||
|
|
||||||
re = Math.nextUp(re);
|
re = FastMath.nextUp(re);
|
||||||
im = Math.nextUp(im);
|
im = FastMath.nextUp(im);
|
||||||
y = new Complex(re, im);
|
y = new Complex(re, im);
|
||||||
Assert.assertFalse(Complex.equals(x, y, maxUlps));
|
Assert.assertFalse(Complex.equals(x, y, maxUlps));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue