encyclopegia.org

Lentz's algorithm

In mathematics, Lentz's algorithm is an algorithm to evaluate continued fractions, and was originally devised to compute tables of spherical Bessel functions.[src] The version often employed now is the simplification due to Thompson and Barnett.[src]

In mathematics, Lentz's algorithm is an algorithm to evaluate continued fractions, and was originally devised to compute tables of spherical Bessel functions.[src] The version often employed now is the simplification due to Thompson and Barnett.[src] f_0 = b_0 f_1 = b_0 + \frac{a_1}{b_1} f_2 = b_0 + \frac{a_1}{b_1 + \frac{a_2}{b_2}} f_3 = b_0 + \frac{a_1}{b_1 + \frac{a_2}{b_2 + \frac{a_3}{b_3}}} etc., or using the big-K notation, if f_n = b_0 + \underset{j = 1}\overset{n}\operatorname{K}\frac{a_j}{b_j} is the n th convergent to f then f_n = \frac{A_n}{B_n} where A_n and B_n are given by the Wallis-Euler recurrence relations \begin{align} A_{-1} & = 1 & B_{-1} & = 0\\ A_0 & = b_0 & B_0 & = 1\\ A_n & = b_n A_{n-1} + a_n A_{n-2} & B_n & = b_n B_{n-1} + a_n B_{n-2} \end{align} Lentz's method defines C_n = \frac{A_n}{A_{n - 1}} D_n = \frac{B_{n - 1}}{B_n} so that the n th convergent is f_n = C_n D_n f_{n - 1} with f_0 = \frac{A_0}{B_0} = b_0 and uses the recurrence relations \begin{align} C_0 & = \frac{A_0}{A_{-1}} = b_0 & D_0 & = \frac{B_{-1}}{B_0} = 0\\ C_n & = b_n + \frac{a_n}{C_{n-1}} & D_n & = \frac1{b_n + a_n D_{n-1}} \end{align} When the product C_n D_n reaches unity with increasing n to the accuracy of the computer, then f_n has converged to f .[src] Lentz's algorithm has the advantage of side-stepping an inconvenience of the Wallis-Euler relations, namely that the numerators A_n and denominators B_n are prone to grow or diminish very rapidly with increasing n .[src] In direct numerical application of the Wallis-Euler relations, this means that A_{n-1} , A_{n-2} , B_{n-1} , B_{n-2} must be periodically checked and rescaled to avoid floating-point overflow or underflow.[src] In Lentz's original algorithm, it can happen that C_n = 0 , resulting in division by zero at the next step.[src] A simpler method than that proposed by Lentz remedied the problem can be simply by setting C_n = \varepsilon for some sufficiently small \varepsilon .[src] This gives C_{n + 1} = b_{n + 1} + \frac{a_{n + 1}}{\varepsilon} = \frac{a_{n + 1}}{\varepsilon} to within floating-point precision, and the product C_n C_{n + 1} = a_{n + 1} irrespective of the precise value of ε.[src] Accordingly, the value of f_0 = C_0 = b_0 is also set to \varepsilon in the case of b_0 = 0 .[src] Similarly, if the denominator in D_n = \frac{1}{b_n + a_n D_{n - 1}} is zero, then setting D_n = \frac{1}{\varepsilon} for small enough \varepsilon gives D_n D_{n + 1} = \frac{1}{a_{n + 1}} irrespective of the value of \varepsilon .[src] ==References==[src]

13 sentences · 13 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Lentz's algorithm." encyclopegia.org, 2026, https://encyclopegia.org/wiki/lentz-s-algorithm. Accessed 27 November 2026.

Chicago

"Lentz's algorithm." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/lentz-s-algorithm.

APA

encyclopegia.org. (2026). Lentz's algorithm. Retrieved November 27, 2026, from https://encyclopegia.org/wiki/lentz-s-algorithm

Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Michael Lentz

stub · references available

μ-law algorithm

stub · references available

bitap algorithm

stub · references available

QR algorithm

stub · references available

Prim's algorithm

stub · references available

greedy algorithm

stub · references available

Apriori algorithm

stub · references available

Baum–Welch algorithm

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1360986564 · 0.5 · snapshot enwiki-001360986564

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.