Dear All,
I am happy to announce that new version of mXparser has just been released. Update delivers below functionalities
New variadic functions
– Mean value: mean(a1, a2, …, an)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("mean(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 5.5
– Bias-corrected sample variance: var(a1, a2, …, an)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("var(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 9.166666666666666
– Bias-corrected sample standard deviation: std(a1, a2, …, an)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("std(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 3.0276503540974917
New iterated operators
– Minimum from sample function values: mini(i, from, to, f(i), <by>)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("mini(x, -pi, pi, sin(x), 2*pi/1000)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: -1.0
– Maximum from sample function values: maxi(i, from, to, f(i), <by>)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("maxi(x, -pi, pi, sin(x), 2*pi/1000)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 1.0
– Average from sample function values: avg(i, from, to, f(i), <by>)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("avg(x, -pi, pi, sin(x), 2*pi/1000)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 4.8615748597837905E-17
– Bias-corrected variance from sample function values: vari(i, from, to, f(i), <by>)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("vari(x, -pi, pi, sin(x), 2*pi/1000)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 0.4999999999999962
– Bias-corrected standard deviation from sample function values: stdi(i, from, to, f(i), <by>)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("stdi(x, -pi, pi, sin(x), 2*pi/1000)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 0.7071067811865449
Enjoy 🙂
Mariusz Gromada