public static double TestDoublePrecisionAwayFromZero(double input) { Double_t num = new Double_t(input); num.f = input; Assert(num.parts.exponent < 2047); num.i += 1; double delta = num.f - input; return(delta); }
public static double TestDoublePrecisionTowardZero(double input) { Double_t num = new Double_t(input); num.f = input; Assert(num.parts.exponent != 0 || num.parts.mantissa != 0); Assert(num.parts.exponent != 2047 || num.parts.mantissa == 0); num.i += 1; double delta = num.f - input; return(delta); }