FixedPoint
Iterates f from x until the result no longer changes.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
FixedPoint✓FixedPoint(f, x, maxIterations?)iterates starting from until two successive values are equal, or for at most steps.Typed signatures
| Type | Package | Applies |
|---|---|---|
(function, initial: any, maxIterations: integer?) -> unknown | combinatoricsreplaces compute-engine | always |
(function, initial: any, maxIterations: integer?) -> unknown | compute-engine | always |
Details
- compute-engine's own does the iterating. Two successive values are the same when they are structurally identical or, for a float, agree to the working precision. It stays unevaluated when the iteration cannot converge: a value that nests the previous one, an exact number that gains digits at every step, or the default iteration limit reached without settling. A given
maxIterationsreturns the last value instead, as Wolfram's does. - An inexact iteration runs with ten guard digits past the engine's precision and the answer is rounded back to it, so every printed digit is right: the last step of a convergent iteration is off by a few times the stopping gap, which at the engine's own precision would reach the last digit or two.
- Newton's method for on an exact rational start gains digits at every step, so it never settles and the call stays unevaluated (Wolfram aborts there too). The two exact-rational examples show the call coming back unevaluated.
Examples
Basic #
The Dottie number, the fixed point of cos
live ↗InOut
Known value · mpmath 1.3.0 at 40 digits (cos iterated to its fixed point)
live ↗
InOut
Scope #
Applications #
Newton's method for , run to this engine's default precision
live ↗InOut
Known value · mpmath 1.3.0 at 40 digits (sqrt(2))
About
| Examples | 10 |
|---|---|
| Checked against | Wolfram Language 8 agree2 error |
| Crosswalk | Wolfram Language |