Returns a function that starting with given arguments, applies f repeatedly until the result no longer changes. The function f of arity n must produce n values.
This function is used for repetitive rewriting.
Implementation of the secant method for solving algebraic equations f(x) = 0 numerically.
|> ((secant (λ(x)(- (* x x) 20))) 1.0 2.0)|
Values returned by this function show the last two approximations to the solution of the equation x2 - 20 = 0.
|> (sqrt 20)|
either if (equal? v1 v2)
, or if both v1
are inexact numbers, and they are equal with relative precision, given by the (tolerance)
A parameter which sets the tolerance for the almost-equal?
predicate. The default value is 5e-16
With tolerance set to 0.001 iteration stop when only 3 significant digits of consequent approximations coinside.