public override CompileResult Execute(IEnumerable <FunctionArgument> arguments, ParsingContext context) { ValidateArguments(arguments, 2); var x = ArgToDecimal(arguments, 0); var n = ArgToInt(arguments, 1); var result = new BesselIimpl().BesselI(x, n); return(CreateResult(result.Result, DataType.Decimal)); }
public void BesselITest() { var func = new BesselIimpl(); var result = func.BesselI(4.5, 1); Assert.AreEqual(15.38922, Math.Round((double)result.Result, 5)); result = func.BesselI(1.5, 1); Assert.AreEqual(0.98166643, Math.Round((double)result.Result, 8)); result = func.BesselI(1.5, 2); Assert.AreEqual(0.3378346, Math.Round((double)result.Result, 7)); }