Hacker News new | ask | show | jobs
by romwell 2849 days 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?

1 comments

The 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/sp...