diff options
Diffstat (limited to 'std/Number.bruijn')
-rw-r--r-- | std/Number.bruijn | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/std/Number.bruijn b/std/Number.bruijn index 81e6636..c7cce1b 100644 --- a/std/Number.bruijn +++ b/std/Number.bruijn @@ -299,7 +299,7 @@ gre? [[>?(1 - 0)]] # returns whether number is less than other number # smaller numbers should be second argument (performance) -les? [[<?(1 - 0)]] +les? \gre? (<?) les? @@ -319,7 +319,7 @@ leq? [[!(1 >? 0)]] # returns whether number is greater than or equal to other number # smaller numbers should be second argument (performance) -geq? [[!(1 <? 0)]] +geq? \leq? (>=?) geq? @@ -327,6 +327,12 @@ geq? [[!(1 <? 0)]] :test ((+2) >=? (+2)) (true) :test ((+3) >=? (+2)) (true) +# returns max number of two +max [[(1 <=? 0) 0 1]] + +# returns min number of two +min [[(1 <=? 0) 1 0]] + # muls two balanced ternary numbers (can introduce leading 0s) mul [[1 (+0) a< a> a=]] a< [^=0 - 1] |