aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/math/number/rev.lux
blob: ba215f444c4eb9b9561fe592d3eb944db2647d4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
(.module:
  [library
   [lux {"-" [private]}
    ["$" documentation {"+" [documentation:]}]
    [data
     ["[0]" text {"+" [\n]}
      ["%" format {"+" [format]}]]]
    [macro
     ["[0]" template]]]]
  [\\library
   ["[0]" /]])

(documentation: /.=
  "Rev(olution) equivalence."
  [(= reference sample)])

(documentation: /.<
  "Rev(olution) less-than."
  [(< reference sample)])

(documentation: /.<=
  "Rev(olution) less-than or equal."
  [(<= reference sample)])

(documentation: /.>
  "Rev(olution) greater-than."
  [(> reference sample)])

(documentation: /.>=
  "Rev(olution) greater-than or equal."
  [(>= reference sample)])

(template [<name> <doc>]
  [(documentation: <name>
     <doc>)]

  [/.min "Rev(olution) minimum."]
  [/.max "Rev(olution) maximum."]
  )

(template [<name> <doc>]
  [(documentation: <name>
     <doc>)]

  [/.+ "Rev(olution) addition."]
  [/.- "Rev(olution) substraction."]
  [/.* "Rev(olution) multiplication."]
  [/./ "Rev(olution) division."]
  [/.% "Rev(olution) remainder."]
  [/.ratio "Ratio between two rev(olution)s."]
  )

(documentation: /.up
  ""
  [(up scale subject)])

(documentation: /.down
  ""
  [(down scale subject)])

(documentation: /.reciprocal
  "Rev(olution) reciprocal of a Nat(ural)."
  [(reciprocal numerator)])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..=
             ..<
             ..<=
             ..>
             ..>=
             ..min
             ..max
             ..+
             ..-
             ..*
             ../
             ..%
             ..ratio
             ..up
             ..down
             ..reciprocal
             ($.default /./1)
             ($.default /./2)
             ($.default /./4)
             ($.default /./8)
             ($.default /./16)
             ($.default /./32)
             ($.default /./64)
             ($.default /./128)
             ($.default /./256)
             ($.default /./512)
             ($.default /./1024)
             ($.default /./2048)
             ($.default /./4096)
             ($.default /./%)
             ($.default /.frac)
             ($.default /.equivalence)
             ($.default /.hash)
             ($.default /.order)
             ($.default /.enum)
             ($.default /.interval)
             ($.default /.addition)
             ($.default /.maximum)
             ($.default /.minimum)
             ($.default /.binary)
             ($.default /.octal)
             ($.default /.hex)
             ($.default /.decimal)]
            []))