public static ValueProxy Min(ValueProxy val1, ValueProxy val2) { switch (conv_t[val1.GetValueCode(), val2.GetValueCode()]) { case -1: val1 = val2.Promote(val1); break; case 0: break; case 1: val2 = val1.Promote(val2); break; default: { if (conv_t[val2.GetValueCode(), val1.GetValueCode()] == 1) val1 = val2.Promote(val1); else throw new OperatorMismatchException(Funcs.Gt, val1, val2); } break; } if (val2.IsNaN() || val1.Gt(val2)) return val2; return val1; }