radices — Arithmetic for any positional notation systems

kanon.units.radices Module

>>> class ExampleBase(
...    BasedReal, base=([20, 5, 18], [24, 60]), separators=[" ","u ","sep "]
... ):
...     pass
...
>>> number = ExampleBase((8, 12, 3, 1), (23, 31))
>>> number
08 12u 3sep 01 ; 23,31
>>> float(number)
15535.979861111111

Classes

BasedReal(*args[, remainder, sign])

Abstract class to represent a number in a specific base.

Class Inheritance Diagram

Inheritance diagram of kanon.units.radices.BasedReal