Sha256: e06d8939d70d2638f306ffd18a12086e69d59eb3d6c1baf596e3c80888faa56e

Contents?: true

Size: 1.04 KB

Versions: 10

Compression:

Stored size: 1.04 KB

Contents

As a BF derivative, SNUSP only has increment and decrement as native operations. Here are routines for other basic arithmetic upon single digit numbers and results.

''See also: [[Ethiopian Multiplication]]''
$\
 ,
 @
 \=@@@-@-----#  atoi
 >
 ,
 @
 \=@@@-@-----#
 <
 @     #        4 copies
 \=!/?!/->>+>>+>>+>>+<<<<<<<<?\#
 >  | #\?<<<<<<<<+>>+>>+>>+>>-/
 @  |
 \==/
 \>>>>\
 />>>>/
 @
 \==!/===?\#    add
 <   \>+<-/
 @
 \=@@@+@+++++#  itoa
 .
 <
 @
 \==!/===?\#    subtract
 <   \>-<-/
 @
 \=@@@+@+++++#
 .
 !
 /\
 ?-             multiply
 \/ #/?<<+>+>-==\     /==-<+<+>>?\#    /==-<<+>>?\#
 <   \->+>+<<!/?/#   #\?\!>>+<+<-/    #\?\!>>+<<-/
 @         /==|=========|=====\   /-\    |
 \======<?!/>@/<-?!\>>>@/<<<-?\=>!\?/>!/@/<#
 <         \=======|==========/   /-\  |
 @                 \done======>>>!\?/<=/
 \=@@@+@+++++#
 .
 !
 /\
 ?-  zero
 \/
 <              divmod
 @    /-\
 \?\<!\?/#!===+<<<\      /-\
 | \<==@\>@\>>!/?!/=<?\>!\?/<<#
 |      |  |  #\->->+</
 |      \=!\=?!/->>+<<?\#
 @            #\?<<+>>-/
 \=@@@+@+++++#
 .
 <
 @
 \=@@@+@+++++#
 .
 #

Version data entries

10 entries across 7 versions & 1 rubygems

Version Path
zettacode-0.1.7 files.zettacode/arithmetic.integer/snusp.txt
zettacode-0.1.6 files.zettacode/arithmetic.integer/snusp.txt
zettacode-0.1.6 files.zettacode2/arithmetic.integer/snusp.txt
zettacode-0.1.5 files.zettacode/arithmetic.integer/snusp.txt
zettacode-0.1.5 files.zettacode2/arithmetic.integer/snusp.txt
zettacode-0.1.4 files.zettacode/arithmetic.integer/snusp.txt
zettacode-0.1.4 files.zettacode2/arithmetic.integer/snusp.txt
zettacode-0.1.3 files.zettacode/arithmetic.integer/snusp.txt
zettacode-0.1.2 files.zettacode/arithmetic.integer/snusp.txt
zettacode-0.1.1 zettacode.files/arithmetic.integer/snusp.txt