Re:Show HN: Chebyshev approximation calculator (open source ...
by tgv on Friday October 04, 2024 @09:32AM
(#41741211)
You could also set the x_min to 0.001 or so.
Re:Show HN: Chebyshev approximation calculator (open source ...
by stuffmatic on Friday October 04, 2024 @09:57AM
(#41741462)
Or, since the function expression is just JavaScript, singularities can also be avoided like this: x == 0 ? 1 : Math.sin(x) / x
Doesn't handle divide by zero very well though i.e. f(x)=1/x. Should probably consider that as undefined rather than a bad expression.