MathF.IEEERemainder() Method in C# with Examples


The MathF.IEEERemainder() method in C# is used to return the remainder resulting from the division of a specified number by another number.

Syntax

Following is the syntax −

public static float IEEERemainder (float dividend, double float);

Example

Let us now see an example to implement the MathF.IEEERemainder() method −

using System;
public class Demo {
   public static void Main(){
      float val1 = 90.5f;
      float val2 = 13.5f;
      float rem = MathF.IEEERemainder(val1, val2);
      Console.WriteLine(rem);
   }
}

Output

This will produce the following output −

-4

Example

Let us now see another example to implement the MathF.IEEERemainder() method −

using System;
public class Demo {
   public static void Main(){
      float val1 = 0.0f;
      float val2 = 1.0f;
      float rem = MathF.IEEERemainder(val1, val2);
      Console.WriteLine(rem);
   }
}

Output

This will produce the following output −

0

Updated on: 14-Nov-2019

22 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements