Is there any differences between Math.IEEERemainder(x,y) and x%y ?
No, they're not the same; see the documentation.
Here's the source:
public static double IEEERemainder(double x, double y) {
double regularMod = x % y;
if (Double.IsNaN(regularMod)) {
return Double.NaN;
}
if (regularMod == 0) {
if (Double.IsNegative(x)) {
return Double.NegativeZero;
}
}
double alternativeResult;
alternativeResult = regularMod - (Math.Abs(y) * Math.Sign(x));
if (Math.Abs(alternativeResult) == Math.Abs(regularMod)) {
double divisionResult = x/y;
double roundedResult = Math.Round(divisionResult);
if (Math.Abs(roundedResult) > Math.Abs(divisionResult)) {
return alternativeResult;
}
else {
return regularMod;
}
}
if (Math.Abs(alternativeResult) < Math.Abs(regularMod)) {
return alternativeResult;
}
else {
return regularMod;
}
}