Java Math IEEEremainder() Method

Facebooktwitterredditpinterestlinkedinmailby feather

The IEEEremainder() method of Math class calculates the remainder as prescribed by the IEEE754 standard. This method simply returns the remainder when f1 (dividend) is divided by f2 (divisor).


public static double IEEEremainder (double f1, double f2)


The parameters ‘f1’ and ‘f2’ represent the dividend and the divisor.

Return Value:

The IEEEremainder () method returns the remainder when first argument is divided by second argument.

Special cases of the IEEEremainder() method are as follows:

  • It returns the result same as the first argument, if the second argument is infinite.
  • It returns NaN , if either argument is NaN or first argument is infinite or second argument is positive or zero.

Example 1:


Example 2:


Example 3:


Example 4:


Facebooktwitterredditpinterestlinkedinmailby feather