Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,12 @@
trigits=: 1+3 <.@^. 2 * 1&>.@|
trinOfN=: |.@((_1 + ] #: #.&1@] + [) #&3@trigits) :. nOfTrin
nOfTrin=: p.&3 :. trinOfN
trinOfStr=: 0 1 _1 {~ '0+-'&i.@|. :. strOfTrin
strOfTrin=: {&'0+-'@|. :. trinOfStr
carry=: +//.@:(trinOfN"0)^:_
trimLead0=: (}.~ i.&1@:~:&0)&.|.
add=: carry@(+/@,:)
neg=: -
mul=: trimLead0@carry@(+//.@(*/))

View file

@ -0,0 +1,3 @@
a=: trinOfStr '+-0++0+'
b=: trinOfN -436
c=: trinOfStr '+-++-'

View file

@ -0,0 +1,7 @@
nOfTrin&> a;b;c
523 _436 65
strOfTrin a mul b (add -) c
----0+--0++0
nOfTrin a mul b (add -) c
_262023