Example #1
0
        public Exprs.Expr Approx(EvalContext argContext, Exprs.EPrecisionNumber argPrecision, Exprs.Expr e)
        {
            var c  = new EvalContext(argContext, argPrecision);
            var e1 = Eval(c, e);

            // falta aplicar operaciones y funciones matemáticas

            var e2 = e1;

            return((e2.TypeExpr == Exprs.ETypeExpr.Number && e2 is Exprs.NumberExpr ne) ? ne.ConverTo(argPrecision, FPPrec) : e2);
        }
Example #2
0
 public EvalContext(EvalContext c, Exprs.EPrecisionNumber argPrecision)
 {
     CancelToken = c.CancelToken;
     Precision   = argPrecision;
 }
Example #3
0
 public EvalContext(EvalContext c)
 {
     CancelToken = c.CancelToken;
     Precision   = c.Precision;
 }