Skip to content

pjm07/contfunc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

contfunc: A Library for Continued Function Expansions

Every positive real number can be expressed in a continued function expansion as long as the function has certain properties. Those properties are outlined in Rényi (1957), which treats a number of such continued function expansions for a real number $r$ of the form

$r = b_{0} + f(b_{1} + f(b_{2} + f(b_{3} + f(\dots))))$,

where $B = {b_{0}; b_{1}, b_{2}, b_{3}, \dots}$ is the list of digits of the expansion.

Two well-known continued function expansions are

  • The continued fraction expansion,

$r = b_{0} + \frac{1}{b_{1} + \frac{1}{b_{2} + \frac{1}{b_{3} + \dots}}}$; and

  • The Bolyai expansion,

$r = b_{0} - 1 + \sqrt[m]{b_{1} + \sqrt[m]{b_{2} + }\sqrt[m]{b_{3} + \dots}}$.

Other well-known expansions, such as

  • The Egyptian fraction expansion,

$r = \frac{1}{b_{0}} + \frac{1}{b_{1}} + \frac{1}{b_{2}} + \frac{1}{b_{3}} + \dots$, with $b_{0}, b_{1}, b_{2}, b_{3}, \dots$ distinct;

  • The Engel expansion,

$r = \frac{1}{b_{0}} + \frac{1}{b_{0} b_{1}} + \frac{1}{b_{0} b_{1} b_{2}} + \frac{1}{b_{0} b_{1} b_{2} b_{3}} + \dots$;

  • And its close relative the Pierce expansion,

$r = \frac{1}{b_{0}} - \frac{1}{b_{0} b_{1}} + \frac{1}{b_{0} b_{1} b_{2}} - \frac{1}{b_{0} b_{1} b_{2} b_{3}} + \dots$,

will not be considered here because they are not proper continued function expansions.

This library aims to formulate and develop other continued function expansions and to learn about other continued-function expansions of the real numbers, in particular those of fundamental constants including Euler's number $e$, the circle constant $\pi$, and the Euler-Mascheroni constant $\gamma_{E}$. In order for that learning to take place, these and other numbers must be known and treated with tremendous precision, beyond the ordinary machine precision of Python. This has required the use of the mpmath library, which was facilitated high-precision calculation with admirable simplicity.

The meat of the project is in the two notebooks

  • expansions.ipynb, where the expansions of fundamental constants can be extracted to arbitrary precision; and
  • statistics.ipynb, where the continued function expansions of constants are compared across functions and constants.

I thank user tim.p...@gmail.com in this SeqFan message board thread.

About

A project that investigates continued-function expansions and their properties

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors