Example #1
0
 Expr Sqrt(Expr e) {
     var @const = e.AsConst();
     if(@const != null && @const.Value == BigRational.Zero)
         return Expr.Zero;
     return builder.Sqrt(e);
 }
Example #2
0
 static bool IsMinusOne(Expr expr)
 {
     return expr.AsConst().If<BigRational>(x => x == BigInteger.MinusOne).ReturnSuccess();
 }