fastmath.solver

Categories

    Other vars: find-root quadratic

    find-root

    (find-root f lower-bound upper-bound)(find-root f lower-bound upper-bound {:keys [absolute-accuracy relative-accuracy max-iters initial-value solver], :or {max-iters 100, solver :brent}})

    Find zero (root) of a function f in given range lower-bound, upper-bound.

    Optional parameters:

    • :absolute-accuracy - default 1.0e-8
    • :relative-accuracy
    • :max-iters - maximum iterations (default: 100)
    • :initial-value - algorithm starting value
    • :solver - one of: :brent (default), :bisection, :illinois, :muller, :muller2, :pegasus, :regula-falsi, :ridders and :secant.

    quadratic

    (quadratic a b c)

    Solution of quadratic formula ax^2+bx+c=0, returns nil when there are no solutions