fp::nest
-- repeated composition of
functionfp::nest
(f,n)
returns the
n
-fold repeated composition of the function
f
.
fp::nest(f, n)
f |
- | function |
n |
- | nonnegative integer |
A function.
_fconcat
, _fnest
, fp::nestvals
fp::nest
(f,n)
returns the
n
-fold repeated composition of the function
f
.f
, fp::nest
returns the identity function id
if n
is 0 and otherwise
the function
f @ f @...@ f
n
-fold repeated.fp::nest
is obselete, one should use the
@@
operator or its functional form _fnest
instead. It is only supported
for compatibility with former versions of MuPAD.Apply the 3-fold repeated composition of f
to x
:
>> fp::nest(f, 3)(x)
f(f(f(x)))
Numerically finding a fixed point of the function
cos
by repeated
application:
>> p :=fp::nest(cos, 100)(1.0): p, cos(p)
0.7390851332, 0.7390851332