Table of Contents
Fetching ...

Computing with Continued Logarithms

Michael J. Collins

TL;DR

This work formalizes arithmetic on continued logarithms (CLs), a representation that encodes magnitude via $x=[a_0,a_1,...]_2$ with a dynamical-system view, enabling exact computations without floating-point arithmetic. It develops Gosper-style arithmetic using bihomographic maps $M(x,y)$ to generate CL terms by reading inputs incrementally, and extends the framework to transcendental functions by composing nested bihomographic maps to compute $\exp$, $\log$, and trigonometric functions directly in the CL domain. The key contributions include a concrete method for CL arithmetic, a novel approach to computing exponentials, logarithms, and trigonometric functions on CLs (with termination analysis), and an implementation in Haskell to validate the concepts. The results indicate that CL-based methods are hardware-friendly and can produce exact, incremental outputs, with termination considerations guiding practical deployment in finite-resource environments.

Abstract

Gosper developed an algorithm for performing arithmetic on continued fractions (CFs), and introduced continued logarithms (CLs) as a variant of continued fractions better suited to representing extremely large (or small) numbers. CLs are also well-suited to efficient hardware implementation. Here we present the algorithm for arithmetic on CLs, then extend it to the novel contribution of this paper, an algorithm for computing trigonometric, exponential, and log functions on CLs. These methods can be extended to other transcendental functions. As with the corresponding CF algorithms, computations are entirely in the domain of the CL representation, with no floating-point arithmetic; we read one CL input term at a time, producing the next CL term of the result as soon as it is determined. The CL algorithms are in fact simpler than their CF counterparts. We have implemented these algorithms in Haskell.

Computing with Continued Logarithms

TL;DR

This work formalizes arithmetic on continued logarithms (CLs), a representation that encodes magnitude via with a dynamical-system view, enabling exact computations without floating-point arithmetic. It develops Gosper-style arithmetic using bihomographic maps to generate CL terms by reading inputs incrementally, and extends the framework to transcendental functions by composing nested bihomographic maps to compute , , and trigonometric functions directly in the CL domain. The key contributions include a concrete method for CL arithmetic, a novel approach to computing exponentials, logarithms, and trigonometric functions on CLs (with termination analysis), and an implementation in Haskell to validate the concepts. The results indicate that CL-based methods are hardware-friendly and can produce exact, incremental outputs, with termination considerations guiding practical deployment in finite-resource environments.

Abstract

Gosper developed an algorithm for performing arithmetic on continued fractions (CFs), and introduced continued logarithms (CLs) as a variant of continued fractions better suited to representing extremely large (or small) numbers. CLs are also well-suited to efficient hardware implementation. Here we present the algorithm for arithmetic on CLs, then extend it to the novel contribution of this paper, an algorithm for computing trigonometric, exponential, and log functions on CLs. These methods can be extended to other transcendental functions. As with the corresponding CF algorithms, computations are entirely in the domain of the CL representation, with no floating-point arithmetic; we read one CL input term at a time, producing the next CL term of the result as soon as it is determined. The CL algorithms are in fact simpler than their CF counterparts. We have implemented these algorithms in Haskell.
Paper Structure (11 sections, 51 equations)