Java Math IEEEremainder() Method
Example
Calculate the IEEE 754 remainder of different pairs of numbers:
System.out.println(Math.IEEEremainder(11, 3));
System.out.println(Math.IEEEremainder(16, 4));
System.out.println(Math.IEEEremainder(31, 2.5));
Definition and Usage
The IEEEremainder()
method computes the remainder operation on two numbers as prescribed by the IEEE 754 standard.
The return value of this method for two numbers a and b is equal to a - (b * Math.rint(a/b))
.
Syntax
public static double IEEEremainder(double dividend, double divisor)
Parameter Values
Parameter | Description |
---|---|
dividend | Required. The dividend of the remainder operation. |
divisor | Required. The divisor of the remainder operation. |
Technical Details
Returns: | A double value representing the result of the remainder operation between two numbers. |
---|---|
Java version: | Any |
❮ Math Methods