#calculator #python #numbers #advanced #complex #representation

bin+lib suan

suan is a calculator supporting advanced mathematics and multiple precision. It’s designed to be both a command line calculator and Python library. It’s an alternative to Pari/GP and GNU BC.

5 releases

0.0.4 May 30, 2022
0.0.3 Mar 3, 2022
0.0.2 Feb 13, 2022
0.0.1 Feb 11, 2022
0.0.0 Feb 8, 2022

#27 in #advanced

Apache-2.0

200KB
4.5K SLoC

num-irrational

This crate provides representations of irrational numbers within following categories:

  • Math constants (pi, e, etc.)
  • Quadratic Numbers
    • Quadratic irrational aka. Quadratic surd
    • Quadratic integer
    • Gaussian integer / Eisenstein integer
  • Continued Fraction
    • Simple (aka. Regular) continued fraction
    • General continued fraction
    • Hurwitz continued fraction

As you can see, the support for irrational number is not limited in the real field, it also support several numeric types in the complex field (by enabling the complex feature). It's based on the num creates.

Dependencies

~6–12MB
~124K SLoC