





















Gosper developed an algorithm for performing arithmetic operations on continued fractions (CFs), getting a CF as the result. Straightforward implementation of the algorithm leads to infinite loops on some inputs. Here we present a modified version of the arithmetic algorithm and prove that it avoids all difficulties with infinite loops. We then combine CF arithmetic with the spigot algorithm to compute the CF expansions of exponential, logarithmic, and trigonometric functions of CFs. We have implemented these algorithms in Haskell.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。