Home >>Java Math Methods >Java Math.IEEEremainder() method
The Math. IEEEremainder() method in Java Math is used to measure the remaining operation on two arguments, as defined by the standard IEEE 754. The remaining value is mathematically equal to a-b, where n is the mathematical integer closest to the quotient a / b's exact mathematical value.
If a / b is equally closed to two integer then n is the integer that is even.
public static double IEEEremainder(double a, double b)
a = This parameter is used to the dividend
b = This parameter is used to the divisor
It is used to returns the remainder when a is divided by b.
public class MyClass
{
public static void main(String[] args)
{
double a = 123.1;
double b = 8.4;
System.out.println(Math.IEEEremainder(a, b));
}
}
public class Main
{
public static void main(String[] args)
{
double a = 2.0/0;
double b = 7;
System.out.println(Math.IEEEremainder(a, b));
}
}