Hacker News new | past | comments | ask | show | jobs | submit login

What would you search for, the zero/root in the derivative? Imagine the derivative is a function like y=x^2-eps with some small eps, say 0.000001. For binary search like that to work, you need to start with two values x1 and x2 such that sign(y1) != sign(y2). But with the derivative above those values are hard to find with random initialization.

More generally, for binary search to find a value x such that f(x)=0, we need to have f(any value less than x)<0 and f(any value greater than x)>0. We can't guarantee these properties for general derivatives.




> What would you search for

I imagine you could search until the incremental change between your current and last result is below some threshold epsilon, as a kind of stopping criterion.


IEEE 754 is by default limited by 64 bits, so yes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: