public static double IEEERemainder(double x, double y) { double r; if (y == 0) { return(Double.NaN); } r = x - (y * Math.Round(x / y)); if (r != 0) { return(r); } return((x > 0) ? 0 : (BitConverter.InternalInt64BitsToDouble(Int64.MinValue))); }
public static double IEEERemainder(double x, double y) { double r; if (y == 0) { return(Double.NaN); } r = x - (y * Math.Round(x / y)); if (r != 0) { return(r); } return((x > 0) ? 0 : (BitConverter.InternalInt64BitsToDouble(Int64.MinValue))); }