Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Solve \(f(x) = 0\) for \(x\).
Documentation
:: Double | \(h\) to calculate the derivative, as in \(\frac{f(x+h)-f(x)}h\) |
-> (Double -> Double) | \( f(t_n) \) |
-> Double | \( t_n \) |
-> Double | \( t_{n+1} \) |
Single step for Newton’s method for root finding.
https://en.wikipedia.org/wiki/Newton%27s_method
\[ t_{n+1} = t_n - \frac{f(t_n)}{f'(t_n)} \]
Useful as a parameter to recurseUntilPrecision
.