org.opengis.filter.expression.Expression.NIL,
org.opengis.filter.expression.Expression.NIL);
assertEquals("Name is, ", "IEEEremainder", IEEEremainder.getName());
assertEquals("Number of arguments, ", 2, IEEEremainder.getFunctionName().getArgumentCount());
Function IEEEremainderFunction = ff.function("IEEEremainder", literal_1, literal_m1);
double good0 = Math.IEEEremainder(1.0, -1.0);
if (Double.isNaN(good0)) {
assertTrue("IEEEremainder of (1.0,-1.0):", Double
.isNaN(((Double) IEEEremainderFunction.evaluate(null))
.doubleValue()));
} else {
assertEquals("IEEEremainder of (1.0,-1.0):", (double) Math.IEEEremainder(1.0,
-1.0), ((Double) IEEEremainderFunction.evaluate(null))
.doubleValue(), 0.00001);
}
IEEEremainderFunction = ff.function("IEEEremainder", literal_m1, literal_2);
double good1 = Math.IEEEremainder(-1.0, 2.0);
if (Double.isNaN(good1)) {
assertTrue("IEEEremainder of (-1.0,2.0):", Double
.isNaN(((Double) IEEEremainderFunction.evaluate(null))
.doubleValue()));
} else {
assertEquals("IEEEremainder of (-1.0,2.0):", (double) Math.IEEEremainder(-1.0,
2.0), ((Double) IEEEremainderFunction.evaluate(null))
.doubleValue(), 0.00001);
}
IEEEremainderFunction = ff.function("IEEEremainder", literal_2, literal_m2);
double good2 = Math.IEEEremainder(2.0, -2.0);
if (Double.isNaN(good2)) {
assertTrue("IEEEremainder of (2.0,-2.0):", Double
.isNaN(((Double) IEEEremainderFunction.evaluate(null))
.doubleValue()));
} else {
assertEquals("IEEEremainder of (2.0,-2.0):", (double) Math.IEEEremainder(2.0,
-2.0), ((Double) IEEEremainderFunction.evaluate(null))
.doubleValue(), 0.00001);
}
IEEEremainderFunction = ff.function("IEEEremainder", literal_m2, literal_pi);
double good3 = Math.IEEEremainder(-2.0, 3.141592653589793);
if (Double.isNaN(good3)) {
assertTrue("IEEEremainder of (-2.0,3.141592653589793):", Double
.isNaN(((Double) IEEEremainderFunction.evaluate(null))
.doubleValue()));
} else {
assertEquals("IEEEremainder of (-2.0,3.141592653589793):",
(double) Math.IEEEremainder(-2.0, 3.141592653589793),
((Double) IEEEremainderFunction.evaluate(null)).doubleValue(),
0.00001);
}
IEEEremainderFunction = ff.function("IEEEremainder", literal_pi, literal_05pi);
double good4 = Math.IEEEremainder(3.141592653589793, 1.5707963267948966);
if (Double.isNaN(good4)) {
assertTrue("IEEEremainder of (3.141592653589793,1.5707963267948966):",
Double.isNaN(((Double) IEEEremainderFunction.evaluate(null))
.doubleValue()));
} else {
assertEquals(
"IEEEremainder of (3.141592653589793,1.5707963267948966):",
(double) Math.IEEEremainder(3.141592653589793,
1.5707963267948966), ((Double) IEEEremainderFunction
.evaluate(null)).doubleValue(), 0.00001);
}
IEEEremainderFunction = ff.function("IEEEremainder", literal_05pi, literal_1);
double good5 = Math.IEEEremainder(1.5707963267948966, 1.0);
if (Double.isNaN(good5)) {
assertTrue("IEEEremainder of (1.5707963267948966,1.0):", Double
.isNaN(((Double) IEEEremainderFunction.evaluate(null))
.doubleValue()));
} else {
assertEquals("IEEEremainder of (1.5707963267948966,1.0):",
(double) Math.IEEEremainder(1.5707963267948966, 1.0),
((Double) IEEEremainderFunction.evaluate(null)).doubleValue(),
0.00001);
}
} catch (FactoryRegistryException e) {
e.printStackTrace();
fail("Unexpected exception: " + e.getMessage());