FixedPointList
FixedPointList[f,expr]
generates a list giving the results of applying f repeatedly, starting with expr, until the results no longer change.
FixedPointList[f,expr,n]
stops after at most n steps.
Details and Options
- FixedPointList[f,expr] gives expr as the first element of the list it produces.
- The last two elements in the list produced by FixedPointList are always the same.
- FixedPointList[f,expr] applies SameQ to successive pairs of results to determine whether a fixed point has been reached.
- FixedPointList[f,expr,…,SameTest->s] applies s to successive pairs of results.
Examples
open allclose allBasic Examples (2)
Applications (6)
Properties & Relations (4)
FixedPoint gives the last element of FixedPointList:
NestList goes for a fixed number of steps:
Apply rules repeatedly until the result no longer changes:
FixedPointList is equivalent to a particular choice of arguments of NestWhileList:
Possible Issues (3)
Calculations may not converge in a finite number of steps:
Providing a maximum number of iterations will guarantee termination:
Using a numerical test for convergence works in this case as well:
Convergence may fail in machine-precision computations due to oscillations in the final digits. Use a test function with a larger tolerance than SameQ to resolve this:
When finding a fixed point, numerical precision may increase:
Neat Examples (1)
The depth of intermediate expressions in a combinator evaluation [more info]:
Text
Wolfram Research (1991), FixedPointList, Wolfram Language function, https://reference.wolfram.com/language/ref/FixedPointList.html (updated 1996).
CMS
Wolfram Language. 1991. "FixedPointList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/FixedPointList.html.
APA
Wolfram Language. (1991). FixedPointList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FixedPointList.html