Skip to main content

Object-oriented continued fractions with Python.

Project description

continuedfractions

A simple extension of the Python fractions standard library for working with continued fractions as Python objects.

The PyPI package is updated as necessary with improvements, features and fixes. Only standard libraries are used, and the package can be installed on any Linux, Mac OS or Windows system supporting Python 3.10, 3.11, or 3.12.

pip install -U continuedfractions

See the project docs for more details, which includes the API reference.

Continued fractions are beautiful and interesting mathematical objects, with many connections in number theory and also very useful practical applications, including the rational approximation of real numbers.

The continuedfractions package is designed for users interested in:

  • learning about and working with (finite) continued fractions as Python objects, in an intuitive object-oriented way
  • exploring their key properties, such as elements/coefficients, convergents, semiconvergents, remainders, and others
  • operating on them as rationals and instances of the standard library fractions.Fraction class
  • making approximations of and experimental computations for irrational numbers
  • exploring other related objects, such as mediants, and special sequences of rational numbers such as Farey sequences

Currently, it does not support the following features:

  • infinite and generalised continued fractions
  • symbolic representations of or operations with continued fractions

These are planned for future releases.

The project is licensed under the Mozilla Public License 2.0.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

continuedfractions-0.17.2.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

continuedfractions-0.17.2-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file continuedfractions-0.17.2.tar.gz.

File metadata

  • Download URL: continuedfractions-0.17.2.tar.gz
  • Upload date:
  • Size: 36.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for continuedfractions-0.17.2.tar.gz
Algorithm Hash digest
SHA256 c0b0a7e02b3f8ab4cde28ecdc49ca994a279093a3f8a7f5d4b0673ecc2f586ac
MD5 c76295bade4ee604bf6d1487c8eec3da
BLAKE2b-256 5877085cc3323b63c83cc49dfa404f2dd4b40679ebf885e04ef95af964032a80

See more details on using hashes here.

File details

Details for the file continuedfractions-0.17.2-py3-none-any.whl.

File metadata

File hashes

Hashes for continuedfractions-0.17.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a6412b2dad7314a0e0f070113ff37c3f01bd254b4f4dff07cb8788bf7dcf5622
MD5 b9776bd8bafb6db53e845bb655649f1b
BLAKE2b-256 b824a9e27bc96fea910bbe0a4d44cf1fb8d800bcbb6832508a5ad5294a45c4c8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page