Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
|||
[ dup dip /mod
|
||||
over iff
|
||||
[ - dip 1+ ]
|
||||
else drop ] is /mod+ ( n n --> n n )
|
||||
|
||||
[ over 0 = iff
|
||||
[ 2drop $ "0" ]
|
||||
done
|
||||
temp put
|
||||
$ "" swap
|
||||
[ temp share /mod+
|
||||
digit
|
||||
rot join swap
|
||||
dup 0 = until ]
|
||||
drop
|
||||
temp release ] is ->negabase$ ( n n --> $ )
|
||||
|
||||
[ over $ "0" = iff
|
||||
[ 2drop 0 ]
|
||||
done
|
||||
temp put
|
||||
0 swap
|
||||
witheach
|
||||
[ dip
|
||||
[ temp share * ]
|
||||
char->n + ]
|
||||
temp release ] is negabase$-> ( $ n --> n )
|
||||
|
||||
10 dup echo say " -> "
|
||||
-2 ->negabase$ dup echo$ say " -> "
|
||||
-2 negabase$-> echo cr
|
||||
146 dup echo say " -> "
|
||||
-3 ->negabase$ dup echo$ say " -> "
|
||||
-3 negabase$-> echo cr
|
||||
15 dup echo say " -> "
|
||||
-10 ->negabase$ dup echo$ say " -> "
|
||||
-10 negabase$-> echo cr
|
||||
Loading…
Add table
Add a link
Reference in a new issue