The Math.IEEERemainder() method in C# is used to return the remainder resulting from the division of a specified number by another specified number.
Syntax
public static double IEEERemainder (double dividend, double divisor);
Let us now see an example to implement Math.IEEERemainder() method −
Example
using System;
public class Demo {
public static void Main(){
double val1 = 90;
double val2 = 7;
// IEEE Remainder
var rem = Math.IEEERemainder(val1, val2);
Console.WriteLine(rem);
}
}Output
This will produce the following output −
-1
Let us see another example to implement Math.IEEERemainder() method −
Example
using System;
public class Demo {
public static void Main(){
double val1 = 1;
double val2 = 0;
// IEEE Remainder
var rem = Math.IEEERemainder(val1, val2);
Console.WriteLine(rem);
}
}Output
This will produce the following output −
NaN