How to use the smaller function from mathjs
Find comprehensive JavaScript mathjs.smaller code examples handpicked from public code repositorys.
GitHub: mljs/optimization
236 237 238 239 240 241 242 243 244
var e0 = math.abs(math.subtract(y0, ymin)); var e1 = math.abs(math.subtract(y1, ymin)); var e2 = math.abs(math.subtract(y2, ymin)); if(math.unequal(e0, 0) && math.smaller(e0, err)) err = e0; if(math.unequal(e1, 0) && math.smaller(e1, err)) err = e1; if(math.unequal(e2, 0) && math.smaller(e2, err)) err = e2; if(math.equal(e0, 0) && math.equal(e1, 0) && math.equal(e2, 0)) err = 0;
0
0
0
+ 19 other calls in file
mathjs.evaluate is the most popular function in mathjs (87200 examples)