Balanced ternary: Difference between revisions
Content added Content deleted
Alextretyak (talk | contribs) m (→{{header|11l}}: `-I/`) |
Alextretyak (talk | contribs) m (→{{header|11l}}) |
||
Line 30: | Line 30: | ||
<syntaxhighlight lang="11l">T BalancedTernary |
<syntaxhighlight lang="11l">T BalancedTernary |
||
:str2dig = [‘+’ = 1, ‘-’ = -1, ‘0’ = 0] |
-:str2dig = [‘+’ = 1, ‘-’ = -1, ‘0’ = 0] |
||
:dig2str = [1 = ‘+’, -1 = ‘-’, 0 = ‘0’] |
-:dig2str = [1 = ‘+’, -1 = ‘-’, 0 = ‘0’] |
||
:table = [(0, -1), (1, -1), (-1, 0), (0, 0), (1, 0), (-1, 1), (0, 1)] |
-:table = [(0, -1), (1, -1), (-1, 0), (0, 0), (1, 0), (-1, 1), (0, 1)] |
||
[Int] digits |
[Int] digits |