Socket
Book a DemoInstallSign in
Socket

continuedfractions

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

continuedfractions

Object-oriented continued fractions with Python.

1.3.3
pipPyPI
Maintainers
1

CI CodeQL Analysis Codecov Ruff pdm-managed License: MPL
2.0 Docs trackgit-views PyPI version Downloads

continuedfractions

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

Install from PyPI:

pip install -U continuedfractions

or the main branch of this repo:

pip install -U git+https://github.com/sr-murthy/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 enumerations of rational numbers, mediants, and special sequences of rational numbers such as Farey sequences

The project is licensed under the Mozilla Public License 2.0.

Keywords

computational number theory

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.