2 ms·
Interesting! When you assess the equality on a neighborhood, what's the algorithm that decides on the number and location of samples? For polynomial functions,
by romwell 8y ago
Interesting! When you assess the equality on a neighborhood, what's the algorithm that decides on the number and location of samples?
For polynomial functions, it's clear how many samples to use; what about others? Do you settle on a magic constant and call it a day?
- kisonecat 8y agoThe magic number is currently 100 samples; the perturbation size is "adaptive" in that the perturbation size is changed when the expressions appear to equal but they're also close to zero. The main goal is to make sure that we pass the tests listed in https://github.com/kisonecat/math-expressions/blob/master/spec/slow_math-expressions.spec.js https://github.com/kisonecat/math-expressions/blob/master/sp...