Module balanced

Source
Expand description

Signed, unbounded type-level integers represented in balanced ternary form. Int constants are provided, from SN81 (signed, negative 81) to S0 (signed zero) to SP81 (signed, positive 81). SN243 and SP243 are also provided.

Structs§

Int2
Minus
Plus
Term
Undefined
Zero

Traits§

Int
The Int kind is for signed, type-level integers. They are represented through balanced ternary in order to avoid a potentially non-unique representation of zero. Balanced ternary is a signed digit representation. A signed digit representation is two things:
IntPair
The IntPair trait and Int2 struct represent 2-tuples of Ints. They are used internally for defining type-level logic.

Type Aliases§

S0
SN1
SN2
SN3
SN4
SN5
SN6
SN7
SN8
SN9
SN10
SN11
SN12
SN13
SN14
SN15
SN16
SN17
SN18
SN19
SN20
SN21
SN22
SN23
SN24
SN25
SN26
SN27
SN81
SN243
SP1
SP2
SP3
SP4
SP5
SP6
SP7
SP8
SP9
SP10
SP11
SP12
SP13
SP14
SP15
SP16
SP17
SP18
SP19
SP20
SP21
SP22
SP23
SP24
SP25
SP26
SP27
SP81
SP243