Balanced ternary: Difference between revisions

m
Line 30:
 
<syntaxhighlight lang="11l">T BalancedTernary
-:str2dig = [‘+’ = 1, ‘-’ = -1, ‘0’ = 0]
-:dig2str = [1 = ‘+’, -1 = ‘-’, 0 = ‘0’]
-:table = [(0, -1), (1, -1), (-1, 0), (0, 0), (1, 0), (-1, 1), (0, 1)]
 
[Int] digits
1,481

edits