Context
No root-finding methods exist. These are fundamental numerical tools needed for optimization, inverse functions, and equation solving.
Proposed API
pub fn newton_raphson(f: fn(f32) -> f32, x0: f32, tol: f32, max_iter: u32) -> (f32, u32)
pub fn bisection(f: fn(f32) -> f32, a: f32, b: f32, tol: f32, max_iter: u32) -> (f32, u32)
Newton-Raphson uses central-difference numerical derivative. Bisection is slower but guaranteed convergence for continuous f with sign change.
Thesis alignment
- Pure: inputs → (root, iterations)
- ADVANCE-EXCEPTION: convergence loops bounded by max_iter
- Uses
derivative from this crate for Newton's Jacobian
Tests needed
- sqrt(2) via x²-2=0
- Cubic roots
- Newton convergence count < bisection
- Bisection guaranteed convergence
Context
No root-finding methods exist. These are fundamental numerical tools needed for optimization, inverse functions, and equation solving.
Proposed API
Newton-Raphson uses central-difference numerical derivative. Bisection is slower but guaranteed convergence for continuous f with sign change.
Thesis alignment
derivativefrom this crate for Newton's JacobianTests needed