Java Math.IEEEremainder(double f1, double f2)
Syntax
Math.IEEEremainder(double f1, double f2) has the following syntax.
public static double IEEEremainder(double f1, double f2)
Example
In the following code shows how to use Math.IEEEremainder(double f1, double f2) method.
/*ww w .jav a2 s .c o m*/
public class Main {
public static void main(String[] args) {
double x = 123456.7;
double y = -123.45;
// get the remainder when x/y
System.out.println("Math.IEEEremainder(" + x + "," + y + ")="
+ Math.IEEEremainder(x, y));
// get the remainder when y/x
System.out.println("Math.IEEEremainder(" + y + "," + x + ")="
+ Math.IEEEremainder(y, x));
}
}
The code above generates the following result.