Skip to content

MostAwesomeDude/continued

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Continued

Continued is a simple library for representing and operating on numbers represented as continued fractions.

Features

  • Conversion from a plethora of representations to continued fractions
    • int
    • float
    • decimal.Decimal
    • fractions.Fraction and numbers.Rational
  • Basic arithmetic: addition, subtraction, multiplication, division
  • Popular irrational and transcendental identities, to arbitrary (infinite) precision
    • e (Euler's number)
    • (the Golden Ratio)
  • Arbitrary-precision quadratic surds

Bugs

Plenty.

  • sqrt(2) * sqrt(2) goes into an infinite loop, as does any other operation with an arbitrary string of 0.

Some enhancements are planned.

  • Surds should permit the form (a + sqrt(b))/c without an extra pair of combination generators.
  • Trigonometric operators.
  • Radix-based decoding.

Changelog

1.0

Initial release.

About

Continued fractions in Python!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages