mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
add besselj function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897765 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d5641b3062
commit
39b134acae
@ -52,9 +52,9 @@ public final class BesselJ extends Fixed2ArgFunction implements FreeRefFunction
|
||||
return ErrorEval.NUM_ERROR;
|
||||
}
|
||||
|
||||
org.apache.commons.math3.special.BesselJ bes = new org.apache.commons.math3.special.BesselJ(order);
|
||||
final double result = org.apache.commons.math3.special.BesselJ.value(order, xval);
|
||||
|
||||
return new NumberEval(bes.value(xval));
|
||||
return new NumberEval(result);
|
||||
} catch (EvaluationException e) {
|
||||
return e.getErrorEval();
|
||||
}
|
||||
|
||||
@ -63,6 +63,7 @@ final class TestBesselJ {
|
||||
double tolerance = 0.000001;
|
||||
assertDouble(fe, cell, "BESSELJ(1.9, 2)", 0.329925829, tolerance);
|
||||
assertDouble(fe, cell, "BESSELJ(1.9, 2.5)", 0.329925829, tolerance);
|
||||
assertDouble(fe, cell, "BESSELJ(12.4,7)", -0.217156767, tolerance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user