Skip to content

jsl/design/solvers

Package name: jsl/design/solvers

Summary

General Definitions

Function Description
steffensen-method Iterative Root Finding via Steffensen's Method

Definitions

General Definitions

steffensen-method

Iterative Root Finding via Steffensen's Method

public defn steffensen-method (f:(Double) -> Double, x0:Double, step:Double = ?, eps:Double = ?, max-iter:Int = ?) -> Double

  • f: (Double) -> Double - Function f(x) for which we will find a zero
  • x0: Double - Starting X location
  • step: Double - Size of the step used for computing the derivative of f numerically. The default value is 0.001
  • eps: Double - Epsilon is used to determine when to stop iterating, We compare f(x) to this eps value and if |f(x)| < eps we stop iterating. Default value is 0.01
  • max-iter: Int - Maximum number of iterations to attempt. This prevents the solver from getting stuck looking for a solution. Default value is 1000
  • Returns Double - Value of x that approximates a zero in f(x)