2title = "1a: Basic Arithmetic"
11Produces the sum of `a` and `b`.
15`a` is an [`atom`](/docs/glossary/atom).
17`b` is an [`atom`](/docs/glossary/atom).
21An [`atom`](/docs/glossary/atom).
43 > (add 1.333 (mul 2 2))
68`a` is an [`atom`](/docs/glossary/atom).
72An [`atom`](/docs/glossary/atom).
80 ~| %decrement-underflow
115Computes `a` divided by `b` without remainder.
119`a` is an [`atom`](/docs/glossary/atom).
121`b` is an [`atom`](/docs/glossary/atom).
125An [`atom`](/docs/glossary/atom).
134 ~_ leaf+"divide-by-zero"
139 $(a (sub a b), c +(c))
170Computes `a` divided by `b`, producing the quotient and the remainder.
174`a` is an [`atom`](/docs/glossary/atom).
176`b` is an [`atom`](/docs/glossary/atom).
180A cell of [`atoms`](/docs/glossary/atom).
189 [(div a b) (mod a b)]
220Tests whether `a` is greater than or equal to `b`.
224`a` is an [`atom`](/docs/glossary/atom).
226`b` is an [`atom`](/docs/glossary/atom).
260Tests whether `a` is greater than `b`.
264`a` is an [`atom`](/docs/glossary/atom).
266`b` is an [`atom`](/docs/glossary/atom).
292 > (gth 'steak' 'brisket')
301Tests whether `a` is less than or equal to `b`.
305`a` is an [`atom`](/docs/glossary/atom).
307`b` is an [`atom`](/docs/glossary/atom).
345 > (lte 'abraham' 'bob')
358Tests whether `a` is less than `b`.
362`a` is an [`atom`](/docs/glossary/atom).
364`b` is an [`atom`](/docs/glossary/atom).
381 $(a (dec a), b (dec b))
407 > (lth 'abraham' 'bob')
416Computes the greater of `a` and `b`.
420`a` is an [`atom`](/docs/glossary/atom).
422`b` is an [`atom`](/docs/glossary/atom).
426An [`atom`](/docs/glossary/atom).
451 > (max 'abraham' 'bob')
452 30.787.873.400.840.801
454 > `@t`(max 'abraham' 'bob')
457 > `@t`(max 'abraham' 'benjamin')
463 >`@ux`(max 0xe1 0x1e)
472Computes the lesser of `a` and `b`.
476`a` is an [`atom`](/docs/glossary/atom).
478`b` is an [`atom`](/docs/glossary/atom).
482An [`atom`](/docs/glossary/atom).
507 > (min 'abraham' 'bob')
510 > `@t`(min 'abraham' 'bob')
513 > `@t`(min 'abraham' 'benjamin')
526Computes the remainder of dividing `a` by `b`.
530`a` is an [`atom`](/docs/glossary/atom).
532`b` is an [`atom`](/docs/glossary/atom).
536An [`atom`](/docs/glossary/atom).
546 (sub a (mul b (div a b)))
577Multiplies `a` by `b`.
581`a` is an [`atom`](/docs/glossary/atom).
583`b` is an [`atom`](/docs/glossary/atom).
587An [`atom`](/docs/glossary/atom).
599 $(a (dec a), c (add b c))
628Subtracts `b` from `a`.
632`a` is an [`atom`](/docs/glossary/atom).
634`b` is an [`atom`](/docs/glossary/atom).
638An [`atom`](/docs/glossary/atom).
646 ~_ leaf+"subtract-underflow"
649 $(a (dec a), b (dec b))
678 > `@ux`(sub 0x1f 0xe)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list