Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Math.IEEERemainder() Method in C#
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
Advertisements