Пример #1
0
 protected internal override double Evaluate(double[] values)
 {
     if (values.Length < 1)
     {
         throw new EvaluationException(ErrorEval.DIV_ZERO);
     }
     return(MathX.average(values));
 }
Пример #2
0
 public override double Evaluate(double d0, double d1)
 {
     if (d1 == NumericFunction.ZERO)
     {
         throw new EvaluationException(ErrorEval.DIV_ZERO);
     }
     return(MathX.Mod(d0, d1));
 }
Пример #3
0
 public override double Evaluate(double d0, double d1)
 {
     if (d0 > int.MaxValue || d1 > int.MaxValue)
     {
         throw new EvaluationException(ErrorEval.NUM_ERROR);
     }
     return(MathX.nChooseK((int)d0, (int)d1));
 }
Пример #4
0
 public override double Evaluate(double d0, double d1)
 {
     if (d1 == ZERO)
     {
         if (d0 == ZERO)
         {
             return(ZERO);
         }
         throw new EvaluationException(ErrorEval.DIV_ZERO);
     }
     return(MathX.floor(d0, d1));
 }
Пример #5
0
 public override double Evaluate(double d0, double d1)
 {
     return(MathX.roundUp(d0, (int)d1));
 }
Пример #6
0
 public override double Evaluate(double d)
 {
     return(MathX.atanh(d));
 }
Пример #7
0
 protected internal override double Evaluate(double[] values)
 {
     return(MathX.product(values));
 }
Пример #8
0
 protected internal override double Evaluate(double[] values)
 {
     return(values.Length > 0 ? MathX.min(values) : 0);
 }
Пример #9
0
 public override double Evaluate(double d)
 {
     return(MathX.sign(d));
 }
Пример #10
0
 public override double Evaluate(double d)
 {
     return(MathX.factorial((int)d));
 }