@@ -25,23 +25,37 @@ An atom.
28− ++ add :: add
28+ ++ add
30 |= [a=@ b=@]
30 |= [a=@ b=@]
32 ?: =(0 a) b
32 ?: =(0 a) b
33 $(a (dec a), b +(b))
33 $(a (dec a), b +(b))
38 > (add 2 2)
38 > (add 2 2)
40 > (add 1 1.000.000)
41 > (add 1 1.000.000)
42 > (add 1.333 (mul 2 2))
44 > (add 1.333 (mul 2 2))
47+ > `@`'a' ::`'a'` is an atom represented as a different data type.
48+ 97 We cast it to the aura `@` to see what its integer representation is.
54+ > (add 0xc 0xf) ::`0xc` and `0xf` are of the hexadecimal soft atom type (`@ux`).
46### `++dec`
60### `++dec`
@@ -62,7 +76,7 @@ An atom.
65− ++ dec :: decrement
79+ ++ dec
68 ~_ leaf+"decrement-underflow"
82 ~_ leaf+"decrement-underflow"
@@ -71,16 +85,26 @@ Source
72 ?: =(a +(b)) b
86 ?: =(a +(b)) b
81 ! decrement-underflow
96 ! decrement-underflow
@@ -88,7 +112,7 @@ Examples
91−Computes `a` divided by `b`.
115+Computes `a` divided by `b`. Only a whole number, without the remainder, is produced.
@@ -105,10 +129,9 @@ An atom.
108− ++ div :: divide
132+ ++ div
110 |: [a=`@`1 b=`@`1]
134 |: [a=`@`1 b=`@`1]
113 ~_ leaf+"divide-by-zero"
136 ~_ leaf+"divide-by-zero"
114 ?< =(0 b)
137 ?< =(0 b)
@@ -117,477 +140,92 @@ Source
117 ?: (lth a b) c
140 ?: (lth a b) c
118 $(a (sub a b), c +(c))
141 $(a (sub a b), c +(c))
124 > (div 4 2)
146 > (div 4 2)
126 > (div 17 8)
149 > (div 17 8)
137−Tests whether `a` is greater than a number `b`.
154− ++ gte :: greater-equal
178−Tests whether `a` is greater than `b`.
195− ++ gth :: greater-than
218−Tests whether `a` is less than or equal to `b`.
235− ++ lte :: less-equal
261−Tests whether `a` is less than `b`.
286− $(a (dec a), b (dec b))
307−Computes the greater of `a` and `b`.
314−`b` is an atom.
152+ > (div 20 30)
348−Computes the lesser of `a` and `b`.
164+ > `@`0x9f ::`0x9f` is an atom represented in the hexadecimal soft atom type (`@ux`).
384−***
169+ > (div 0x29 0x9f)
389−Computes the remainder of dividing `a` by `b`.
411− (sub a (mul b (div a b)))
422−
172+ > (div ~sibtel-tallyd ~zod)
424−***
174+ > `@`~sibtel-tallyd
425−### `++mul`
175+ 7.303.014
426−
176+ > `@`~zod ::the above operation returned an error because `~zod` is a representation of `0`.
429−Multiplies `a` by `b`.
453− $(a (dec a), c (add b c))
179+ > `@p`2 ::this casts `2` to `@p` to produce the ship name which represents that atom.
181+ > (div ~sibtel-tallyd ~bud)
466−### `++sub`
186+### `++dvr`
468−Subtract
188+Divide with remainder
470−Subtracts `b` from `a`.
190+Computes `a` divided by `b` and the remainder of that operation.
490− ~| %subtract-underflow
493− $(a (dec a), b (dec b))
505− ! subtract-underflow
512−Decrements `a` by `1`.
517−`a` is an atom.
195+A cell of atoms.
527− ++ dec :: decrement
200+ ++ dvr
529− |= a=@
202+ |= [a=@ b=@]
530− ~| %decrement-underflow
533− |- ^- @
203+ ^- [p=@ q=@]
534− ?: =(a +(b)) b
204+ [(div a b) (mod a b)]
540− > (dec 7)
211+ > (dvr 17 6)
543− ! decrement-underflow
549−### `++div`
218+ [p=2 q=0]
551−Divide
220+ > (dvr 'ab 'a')
222+ > `@`'a' ::`a` is an atom represented as a different data type.
223+ 97 We can cast it to the aura `@` to see what its integer representation is.
553−Computes `a` divided by `b`.
227+ > (dvr '' 'a')
579− $(a (sub a b), c +(c))
@@ -595,7 +233,7 @@ Examples
596Greater-than/equal
234Greater-than/equal
598−Tests whether `a` is greater than a number `b`.
236+Tests whether a number `a` is greater than or equal a number `b`.
@@ -607,28 +245,41 @@ Accepts
610−A boolean.
248+A flag. Our version of a boolean, except that `0` is yes/true and `1` is no/false.
615− ++ gte :: greater-equal
253+ ++ gte
617 |= [a=@ b=@]
255 |= [a=@ b=@]
619 !(lth a b)
257 !(lth a b)
625 > (gte 100 10)
262 > (gte 100 10)
627 > (gte 4 4)
265 > (gte 4 4)
629 > (gte 3 4)
268 > (gte 3 4)
271+ > `@`'h' ::`h` is an atom represented as a `cord`, one of many different soft atom types.
272+ 104 ::We can cast it to the mold `@` to see what its integer representation is.
@@ -648,27 +299,41 @@ Accepts
651−A boolean.
302+A flag; our version of a boolean, except that `0` is yes/true and `1` is no/false.
656− ++ gth :: greater-than
307+ ++ gth
658 |= [a=@ b=@]
309 |= [a=@ b=@]
660 !(lte a b)
311 !(lte a b)
667 > (gth 'd' 'c')
321 > (gth 'd' 'c')
669− > (gth ~h1 ~m61)
323+ > `@`'d' ::`d` is an atom represented as a `cord`, one of many different soft atom types.
324+ 100 ::We can cast it to the mold `@` to see what its integer representation is.
328+ > (gth 'doug' 'catherine')
333+ 1.871.077.167.441.261.125.987
335+ > (gth ~h1 ~m61) ::~h1 and ~m61 are both relative dates. Cast an atom to `@dr` to see its representation in that soft atom type.
@@ -688,30 +353,43 @@ Accepts
691−A boolean.
356+A flag; our version of a boolean, except that `0` is yes/true and `1` is no/false.
696− ++ lte :: less-equal
361+ ++ lte
698 |= [a=@ b=@]
363 |= [a=@ b=@]
699 |(=(a b) (lth a b))
364 |(=(a b) (lth a b))
706 > (lte 4 5)
369 > (lte 4 5)
708 > (lte 5 4)
372 > (lte 5 4)
710 > (lte 5 5)
375 > (lte 5 5)
712 > (lte 0 0)
378 > (lte 0 0)
388+ > (lte 'abraham' 'bob')
391+ > (lte ~m61 ~h1) ::~m61 and ~h1 are both relative dates. Cast an atom to `@dr` to see its representation in that soft atom type.
@@ -731,12 +409,12 @@ Accepts
734−A boolean.
412+A flag; our version of a boolean, except that `0` is yes/true and `1` is no/false.
739− ++ lth :: less-than
417+ ++ lth
741 |= [a=@ b=@]
419 |= [a=@ b=@]
@@ -746,19 +424,36 @@ Source
746 ?& !=(0 b)
424 ?& !=(0 b)
747 $(a (dec a), b (dec b))
425 $(a (dec a), b (dec b))
753 > (lth 4 5)
431 > (lth 4 5)
755 > (lth 5 4)
434 > (lth 5 4)
757 > (lth 5 5)
437 > (lth 5 5)
759 > (lth 5 0)
440 > (lth 5 0)
445+ > `@`'a' ::`a` is an atom represented as a different data type.
446+ 97 ::We can cast it to the aura `@` to see what its integer representation is.
450+ > (lth 'abraham' 'bob')
453+ > 30.787.873.400.840.801
764### `++max`
459### `++max`
@@ -782,24 +477,39 @@ An atom.
785− ++ max :: maximum
480+ ++ max
787 |= [a=@ b=@]
482 |= [a=@ b=@]
789 ?: (gth a b) a
484 ?: (gth a b) a
795 > (max 10 100)
490 > (max 10 100)
797 > (max 10.443 9)
493 > (max 10.443 9)
799− > (max 0 1)
496+ > (max 1 1)
499+ > (max 'abraham' 'bob')
500+ 30.787.873.400.840.801
502+ > `@t`(max 'abraham' 'bob') ::`@t` displays the product as a `cord` (string) instead of a number.
505+ > `@t`(max 'abraham' 'benjamin')
508+ > `@dr`(max ~m6 ~h1) ::~m61 and ~h1 are relative dates. Cast an atom to `@dr` to see its representation in that soft atom type.
511+ >`@ux`(max 0xe1 0x1e) ::`0xe1` and `0x1e` are of the hexadecimal soft atom type (`@ux`).
805### `++min`
515### `++min`
@@ -823,23 +533,36 @@ An atom.
826− ++ min :: minimum
536+ ++ min
828 |= [a=@ b=@]
538 |= [a=@ b=@]
830 ?: (lth a b) a
540 ?: (lth a b) a
836 > (min 10 100)
546 > (min 10 100)
838 > (min 10.443 9)
549 > (min 10.443 9)
555+ > (min 'abraham' 'bob')
558+ > `@t`(min 'abraham' 'bob') ::`@t` causes the product to display as a `cord` instead of a number.
561+ > `@t`(min 'abraham' 'benjamin')
564+ > `@dr`(min ~m6 ~h1) ::~m61 and ~h1 are relative dates. Cast an atom to `@dr` to see its representation in that soft atom type.
@@ -864,22 +587,39 @@ An atom.
867− ++ mod :: remainder
590+ ++ mod
869 |: [a=`@`1 b=`@`1]
592 |: [a=`@`1 b=`@`1]
871 ?< =(0 b)
594 ?< =(0 b)
872 (sub a (mul b (div a b)))
595 (sub a (mul b (div a b)))
878 > (mod 5 2)
600 > (mod 5 2)
880 > (mod 5 5)
603 > (mod 5 5)
612+ > `@`'c' ::`a` is an atom represented as a different data type.
613+ 99 ::We can cast it to the aura `@` to see what its integer representation is.
619+ > (mod 0xe1 0x1e) ::`0xe1` and `0x1e` are of the hexadecimal soft atom type (`@ux`).
621+ > `@ux`(mod 0xe1 0x1e)
@@ -904,7 +644,7 @@ An atom.
907− ++ mul :: multiply
647+ ++ mul
909 |: [a=`@`1 b=`@`1]
649 |: [a=`@`1 b=`@`1]
@@ -912,15 +652,27 @@ Source
913 ?: =(0 a) c
653 ?: =(0 a) c
914 $(a (dec a), c (add b c))
654 $(a (dec a), c (add b c))
919 > (mul 3 4)
659 > (mul 3 4)
921− > (mul 0 1)
662+ > (mul 0 1)
665+ > `@`'a' ::`a` is an atom represented as a different data type.
666+ 97 ::We can cast it to the aura `@` to see what its integer representation is.
672+ > (mul 0x1f 0xe) ::`0x1f` and `0xe` are of the hexadecimal soft atom type (`@ux`).
674+ >`@ux`(mul 0x1f 0xe)
@@ -945,27 +697,41 @@ An atom.
948− ++ sub :: subtract
700+ ++ sub
950− |= [a=@ b=@]
702+ |= [a=@ b=@]
951− ~| %subtract-underflow
703+ ~| %subtract-underflow
953− ?: =(0 b) a
705+ ?: =(0 b) a
954− $(a (dec a), b (dec b))
706+ $(a (dec a), b (dec b))
959 > (sub 10 5)
711 > (sub 10 5)
961 > (sub 243 44)
714 > (sub 243 44)
963 > (sub 5 0)
717 > (sub 5 0)
965 > (sub 0 5)
720 > (sub 0 5)
966 ! subtract-underflow
721 ! subtract-underflow
726+ > `@`'c' ::`a` is an atom represented as a different data type.
727+ 99 ::We can cast it to the aura `@` to see what its integer representation is.
733+ > `@ux`(sub 0x1f 0xe) ::`0xe1` and `0x1e` are of the hexadecimal soft atom type (`@ux`).