public override CompileResult Execute(IEnumerable <FunctionArgument> arguments, ParsingContext context) { ValidateArguments(arguments, 1); var x = ArgToDecimal(arguments, 0); var retVal = ErfHelper.Erf(0d, x); return(CreateResult(retVal, DataType.Decimal)); }
public override CompileResult Execute(IEnumerable <FunctionArgument> arguments, ParsingContext context) { ValidateArguments(arguments, 1); var lowerLimit = ArgToDecimal(arguments, 0); var upperLimit = default(double?); if (arguments.Count() > 1) { upperLimit = ArgToDecimal(arguments, 1); } var retVal = !upperLimit.HasValue ? ErfHelper.Erf(lowerLimit) : ErfHelper.Erf(lowerLimit, upperLimit.Value); return(CreateResult(retVal, DataType.Decimal)); }