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.
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 all close allBasic Examples (2)
Find the sequence of values leading to a fixed point:
FixedPointList[1 + Floor[# / 2]&, 1000]1 + Floor[Last[%] / 2]Repeated application of a rule until the result no longer changes:
FixedPointList[# /. {a_, b_} /; b ≠ 0 -> {b, Mod[a, b]}&, {28, 21}]GCD[28, 21]Generalizations & Extensions (1)
Options (1)
Applications (6)
Show convergence to
in Newton’s method:
FixedPointList[(# + 2 / # ) / 2&, 1.0]Find the fixed point of an integer sequence:
FixedPointList[11PrimePi[#] + 1&, 2]MatrixForm /@ FixedPointList[{{0.51, 0.49}, {0.49, 0.51}}.#&, {{1, 0}, {0, 1}}]FixedPointList[# /. {s[x_][y_][z_] -> x[z][y[z]], k[x_][y_] -> x}&, s[s[s]][s][k][k]]Go up a directory tree to its root (the result will depend on computer system):
FixedPointList[ParentDirectory, $UserBaseDirectory]FixedPointList[D[#, x]&, x ^ 10]Properties & Relations (4)
FixedPoint gives the last element of FixedPointList:
FixedPointList[Function[x, (x + 2 / x) / 2], 1.0]FixedPoint[Function[x, (x + 2 / x) / 2], 1.0]NestList goes for a fixed number of steps:
NestList[(# + 2 / # ) / 2&, 1.0, 8]FixedPointList[(# + 2 / # ) / 2&, 1.0]Apply rules repeatedly until the result no longer changes:
FixedPointList[# /. {a -> b, b -> c, c -> d}&, a ^ 2 + c ^ 3]a ^ 2 + c ^ 3 //. {a -> b, b -> c, c -> d}FixedPointList is equivalent to a particular choice of arguments of NestWhileList:
NestWhileList[Function[x, (x + 2 / x) / 2], 1.0, UnsameQ, 2]Possible Issues (3)
Calculations may not converge in a finite number of steps:
TimeConstrained[FixedPointList[# / 3 + 1 / 4&, Interval[{0, 1}]], 1]Providing a maximum number of iterations will guarantee termination:
FixedPointList[# / 3 + 1 / 4&, Interval[{0, 1}], 10]Using a numerical test for convergence works in this case as well:
Take[FixedPointList[# / 3 + 1 / 4&, Interval[{0, 1}], SameTest -> (SameQ[N[#1], N[#2]]&)], -3]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:
FixedPointList[Cos, 0.5, SameTest -> Equal]When finding a fixed point, numerical precision may increase:
FixedPointList[InverseErf, 0.5`10, 10]//TableFormNeat Examples (1)
The depth of intermediate expressions in a combinator evaluation [more info]:
Depth /@ FixedPointList[# /. {s[x_][y_][z_] -> x[z][y[z]], k[x_][y_] -> x}&, s[s[s[s][s]]][s][s][k]]See Also
Tech Notes
History
Introduced in 1991 (2.0) | Updated in 1996 (3.0)
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
BibTeX
@misc{reference.wolfram_2026_fixedpointlist, author="Wolfram Research", title="{FixedPointList}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/FixedPointList.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_fixedpointlist, organization={Wolfram Research}, title={FixedPointList}, year={1996}, url={https://reference.wolfram.com/language/ref/FixedPointList.html}, note=[Accessed: 13-June-2026]}