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 (finite, simple) 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 is supported on Python 3.10, 3.11, 3.12 and 3.13.

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, simple) 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

Some - but not necessarily all - of these features may be considered for future release.

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.18.1.tar.gz (36.5 kB view details)

Uploaded Source

Built Distribution

continuedfractions-0.18.1-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for continuedfractions-0.18.1.tar.gz
Algorithm Hash digest
SHA256 23323438c373ec0dedb7efded2faa2be762c92efa6a567a3dd6562d35c667507
MD5 d9030a7447943f5968f31e37674a2f56
BLAKE2b-256 c04b61f67538a8eb6ed97e8b4edaf89f834f61eac44fa7616a0b532a18dc6593

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for continuedfractions-0.18.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8aecd4e3e731b3ccd69f958485878de3e987c6c81fe7d45816693715be6c686f
MD5 e64ee7dfca12e7faa56e388d4c482aa1
BLAKE2b-256 a077b48c8049676a813e0835c0fbee3dac3d210ecc696ae91eace08aceb7fdb9

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