aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/math/number
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/documentation/lux/math/number')
-rw-r--r--stdlib/source/documentation/lux/math/number/complex.lux99
-rw-r--r--stdlib/source/documentation/lux/math/number/frac.lux289
-rw-r--r--stdlib/source/documentation/lux/math/number/i16.lux25
-rw-r--r--stdlib/source/documentation/lux/math/number/i32.lux25
-rw-r--r--stdlib/source/documentation/lux/math/number/i64.lux159
-rw-r--r--stdlib/source/documentation/lux/math/number/i8.lux25
-rw-r--r--stdlib/source/documentation/lux/math/number/int.lux187
-rw-r--r--stdlib/source/documentation/lux/math/number/nat.lux109
-rw-r--r--stdlib/source/documentation/lux/math/number/ratio.lux61
-rw-r--r--stdlib/source/documentation/lux/math/number/rev.lux147
10 files changed, 568 insertions, 558 deletions
diff --git a/stdlib/source/documentation/lux/math/number/complex.lux b/stdlib/source/documentation/lux/math/number/complex.lux
index b47992832..2df1f2a71 100644
--- a/stdlib/source/documentation/lux/math/number/complex.lux
+++ b/stdlib/source/documentation/lux/math/number/complex.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except private)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,53 +8,54 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- "Complex arithmetic."
- [($.definition /.i)
- ($.definition /.+one)
- ($.definition /.-one)
- ($.definition /.zero)
- ($.definition /.not_a_number?)
- ($.definition /.=)
- ($.definition /.+)
- ($.definition /.-)
- ($.definition /.equivalence)
- ($.definition /.opposite)
- ($.definition /.signum)
- ($.definition /.conjugate)
- ($.definition /.*')
- ($.definition /.*)
- ($.definition /./)
- ($.definition /./')
- ($.definition /.%)
- ($.definition /.cos)
- ($.definition /.cosh)
- ($.definition /.sin)
- ($.definition /.sinh)
- ($.definition /.tan)
- ($.definition /.tanh)
- ($.definition /.abs)
- ($.definition /.exp)
- ($.definition /.log)
- ($.definition /.pow)
- ($.definition /.pow')
- ($.definition /.root_2)
- ($.definition /.reciprocal)
- ($.definition /.acos)
- ($.definition /.asin)
- ($.definition /.atan)
- ($.definition /.argument)
- ($.definition /.roots)
- ($.definition /.approximately?)
+(def .public documentation
+ (.List $.Documentation)
+ (list ($.module /._
+ "Complex arithmetic.")
- ($.definition /.Complex
- "A complex number.")
+ ($.definition /.i)
+ ($.definition /.+one)
+ ($.definition /.-one)
+ ($.definition /.zero)
+ ($.definition /.not_a_number?)
+ ($.definition /.=)
+ ($.definition /.+)
+ ($.definition /.-)
+ ($.definition /.equivalence)
+ ($.definition /.opposite)
+ ($.definition /.signum)
+ ($.definition /.conjugate)
+ ($.definition /.*')
+ ($.definition /.*)
+ ($.definition /./)
+ ($.definition /./')
+ ($.definition /.%)
+ ($.definition /.cos)
+ ($.definition /.cosh)
+ ($.definition /.sin)
+ ($.definition /.sinh)
+ ($.definition /.tan)
+ ($.definition /.tanh)
+ ($.definition /.abs)
+ ($.definition /.exp)
+ ($.definition /.log)
+ ($.definition /.pow)
+ ($.definition /.pow')
+ ($.definition /.root_2)
+ ($.definition /.reciprocal)
+ ($.definition /.acos)
+ ($.definition /.asin)
+ ($.definition /.atan)
+ ($.definition /.argument)
+ ($.definition /.roots)
+ ($.definition /.approximately?)
- ($.definition /.complex
- "Complex literals."
- [(complex real imaginary)]
- ["The imaginary part can be omitted if it's +0.0."
- (complex real)])]
- []))
+ ($.definition /.Complex
+ "A complex number.")
+
+ ($.definition /.complex
+ "Complex literals."
+ [(complex real imaginary)]
+ ["The imaginary part can be omitted if it's +0.0."
+ (complex real)])
+ ))
diff --git a/stdlib/source/documentation/lux/math/number/frac.lux b/stdlib/source/documentation/lux/math/number/frac.lux
index 67b334fd3..5094916d2 100644
--- a/stdlib/source/documentation/lux/math/number/frac.lux
+++ b/stdlib/source/documentation/lux/math/number/frac.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except private)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,146 +8,147 @@
[\\library
["[0]" /]])
-(`` (.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.positive?)
- ($.definition /.negative?)
- ($.definition /.zero?)
- ($.definition /.opposite)
- ($.definition /.abs)
- ($.definition /.signum)
- ($.definition /.nat)
- ($.definition /.int)
- ($.definition /.rev)
- ($.definition /.equivalence)
- ($.definition /.order)
- ($.definition /.smallest)
- ($.definition /.biggest)
- ($.definition /.addition)
- ($.definition /.multiplication)
- ($.definition /.minimum)
- ($.definition /.maximum)
- ($.definition /.number?)
- ($.definition /.decimal)
- ($.definition /.bits)
- ($.definition /.of_bits)
- ($.definition /.binary)
- ($.definition /.octal)
- ($.definition /.hex)
- ($.definition /.hash)
-
- ($.definition /.cos)
- ($.definition /.sin)
- ($.definition /.tan)
- ($.definition /.acos)
- ($.definition /.asin)
- ($.definition /.atan)
- ($.definition /.exp)
- ($.definition /.log)
- ($.definition /.ceil)
- ($.definition /.floor)
- ($.definition /.root_2)
- ($.definition /.root_3)
- ($.definition /.round)
- ($.definition /.factorial)
- ($.definition /.hypotenuse)
- ($.definition /.sinh)
- ($.definition /.csch)
- ($.definition /.cosh)
- ($.definition /.sech)
- ($.definition /.tanh)
- ($.definition /.coth)
- ($.definition /.asinh)
- ($.definition /.acosh)
- ($.definition /.atanh)
- ($.definition /.acoth)
- ($.definition /.asech)
- ($.definition /.acsch)
-
- ($.definition /.=
- "Frac(tion) equivalence."
- [(= reference sample)])
-
- ($.definition /.<
- "Frac(tion) less-than."
- [(< reference sample)])
-
- ($.definition /.<=
- "Frac(tion) less-than or equal."
- [(<= reference sample)])
-
- ($.definition /.>
- "Frac(tion) greater-than."
- [(> reference sample)])
-
- ($.definition /.>=
- "Frac(tion) greater-than or equal."
- [(>= reference sample)])
-
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
-
- [/.+ "Frac(tion) addition."]
- [/.- "Frac(tion) substraction."]
- [/.* "Frac(tion) multiplication."]
- [/./ "Frac(tion) division."]
- [/.% "Frac(tion) remainder."]
- ))
-
- ($.definition /./%
- ""
- [(/% param subject)])
-
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
-
- [/.min "Frac(tion) minimum."]
- [/.max "Frac(tion) minimum."]
- ))
-
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
-
- [/.not_a_number "Not a number."]
- [/.positive_infinity "Positive infinity."]
- [/.negative_infinity "Negative infinity."]
- ))
-
- ($.definition /.not_a_number?
- "Tests whether a frac is actually not-a-number."
- [(not_a_number? it)])
-
- ($.definition /.approximately?
- ""
- [(approximately? margin_of_error standard value)])
-
- ($.definition /.mod
- ""
- [(mod divisor dividend)])
-
- ($.definition /.e
- "The base of the natural logarithm.")
-
- ($.definition /.pi
- "The ratio of a circle's circumference to its diameter.")
-
- ($.definition /.tau
- "The ratio of a circle's circumference to its radius.")
-
- ($.definition /.pow
- ""
- [(pow param subject)])
-
- ($.definition /.atan_2
- ""
- [(atan_2 x y)])
-
- ($.definition /.log_by
- ""
- [(log_by base it)])]
- [])))
+(`` (def .public documentation
+ (.List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.positive?)
+ ($.definition /.negative?)
+ ($.definition /.zero?)
+ ($.definition /.opposite)
+ ($.definition /.abs)
+ ($.definition /.signum)
+ ($.definition /.nat)
+ ($.definition /.int)
+ ($.definition /.rev)
+ ($.definition /.equivalence)
+ ($.definition /.order)
+ ($.definition /.smallest)
+ ($.definition /.biggest)
+ ($.definition /.addition)
+ ($.definition /.multiplication)
+ ($.definition /.minimum)
+ ($.definition /.maximum)
+ ($.definition /.number?)
+ ($.definition /.decimal)
+ ($.definition /.bits)
+ ($.definition /.of_bits)
+ ($.definition /.binary)
+ ($.definition /.octal)
+ ($.definition /.hex)
+ ($.definition /.hash)
+
+ ($.definition /.cos)
+ ($.definition /.sin)
+ ($.definition /.tan)
+ ($.definition /.acos)
+ ($.definition /.asin)
+ ($.definition /.atan)
+ ($.definition /.exp)
+ ($.definition /.log)
+ ($.definition /.ceil)
+ ($.definition /.floor)
+ ($.definition /.root_2)
+ ($.definition /.root_3)
+ ($.definition /.round)
+ ($.definition /.factorial)
+ ($.definition /.hypotenuse)
+ ($.definition /.sinh)
+ ($.definition /.csch)
+ ($.definition /.cosh)
+ ($.definition /.sech)
+ ($.definition /.tanh)
+ ($.definition /.coth)
+ ($.definition /.asinh)
+ ($.definition /.acosh)
+ ($.definition /.atanh)
+ ($.definition /.acoth)
+ ($.definition /.asech)
+ ($.definition /.acsch)
+
+ ($.definition /.=
+ "Frac(tion) equivalence."
+ [(= reference sample)])
+
+ ($.definition /.<
+ "Frac(tion) less-than."
+ [(< reference sample)])
+
+ ($.definition /.<=
+ "Frac(tion) less-than or equal."
+ [(<= reference sample)])
+
+ ($.definition /.>
+ "Frac(tion) greater-than."
+ [(> reference sample)])
+
+ ($.definition /.>=
+ "Frac(tion) greater-than or equal."
+ [(>= reference sample)])
+
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
+
+ [/.+ "Frac(tion) addition."]
+ [/.- "Frac(tion) substraction."]
+ [/.* "Frac(tion) multiplication."]
+ [/./ "Frac(tion) division."]
+ [/.% "Frac(tion) remainder."]
+ ))
+
+ ($.definition /./%
+ ""
+ [(/% param subject)])
+
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
+
+ [/.min "Frac(tion) minimum."]
+ [/.max "Frac(tion) minimum."]
+ ))
+
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
+
+ [/.not_a_number "Not a number."]
+ [/.positive_infinity "Positive infinity."]
+ [/.negative_infinity "Negative infinity."]
+ ))
+
+ ($.definition /.not_a_number?
+ "Tests whether a frac is actually not-a-number."
+ [(not_a_number? it)])
+
+ ($.definition /.approximately?
+ ""
+ [(approximately? margin_of_error standard value)])
+
+ ($.definition /.mod
+ ""
+ [(mod divisor dividend)])
+
+ ($.definition /.e
+ "The base of the natural logarithm.")
+
+ ($.definition /.pi
+ "The ratio of a circle's circumference to its diameter.")
+
+ ($.definition /.tau
+ "The ratio of a circle's circumference to its radius.")
+
+ ($.definition /.pow
+ ""
+ [(pow param subject)])
+
+ ($.definition /.atan_2
+ ""
+ [(atan_2 x y)])
+
+ ($.definition /.log_by
+ ""
+ [(log_by base it)])
+ )))
diff --git a/stdlib/source/documentation/lux/math/number/i16.lux b/stdlib/source/documentation/lux/math/number/i16.lux
index 63a53e2f7..29ee5c5c7 100644
--- a/stdlib/source/documentation/lux/math/number/i16.lux
+++ b/stdlib/source/documentation/lux/math/number/i16.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except private)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,15 +8,16 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.equivalence)
- ($.definition /.width)
- ($.definition /.i16)
- ($.definition /.i64)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.I16
- "A 16-bit integer.")]
- []))
+ ($.definition /.equivalence)
+ ($.definition /.width)
+ ($.definition /.i16)
+ ($.definition /.i64)
+
+ ($.definition /.I16
+ "A 16-bit integer.")
+ ))
diff --git a/stdlib/source/documentation/lux/math/number/i32.lux b/stdlib/source/documentation/lux/math/number/i32.lux
index a0f912eab..7415545e1 100644
--- a/stdlib/source/documentation/lux/math/number/i32.lux
+++ b/stdlib/source/documentation/lux/math/number/i32.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except private)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,15 +8,16 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.equivalence)
- ($.definition /.width)
- ($.definition /.i32)
- ($.definition /.i64)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.I32
- "A 32-bit integer.")]
- []))
+ ($.definition /.equivalence)
+ ($.definition /.width)
+ ($.definition /.i32)
+ ($.definition /.i64)
+
+ ($.definition /.I32
+ "A 32-bit integer.")
+ ))
diff --git a/stdlib/source/documentation/lux/math/number/i64.lux b/stdlib/source/documentation/lux/math/number/i64.lux
index 2f7909ac2..644c6e7e3 100644
--- a/stdlib/source/documentation/lux/math/number/i64.lux
+++ b/stdlib/source/documentation/lux/math/number/i64.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except or and not)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,81 +8,82 @@
[\\library
["[0]" /]])
-(`` (.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.bits_per_byte)
- ($.definition /.bytes_per_i64)
- ($.definition /.width)
- ($.definition /.false)
- ($.definition /.true)
- ($.definition /.equivalence)
- ($.definition /.hash)
- ($.definition /.disjunction)
- ($.definition /.conjunction)
- ($.definition /.reversed)
- ($.definition /.left_rotated)
- ($.definition /.right_rotated)
-
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
-
- [/.or "Bitwise or."]
- [/.xor "Bitwise xor."]
- [/.and "Bitwise and."]
-
- [/.left_shifted "Bitwise left-shift."]
- [/.right_shifted "Unsigned/logic bitwise right-shift."]
- ))
-
- ($.definition /.Mask
- "A pattern of bits that can be imposed on I64 values.")
-
- ($.definition /.bit
- "A mask with only a specific bit set."
- [(bit position)])
-
- ($.definition /.sign
- "A mask for the sign bit of ints.")
-
- ($.definition /.not
- "Bitwise negation.")
-
- ($.definition /.mask
- "Mask a block of bits of the specified size."
- [(mask amount_of_bits)])
-
- ($.definition /.ones
- "Count the number of 1s in a bit-map."
- [(ones it)])
-
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
-
- [/.zero "Clear bit at the given index."]
- [/.one "Set bit at given index."]
- [/.flipped "Flip bit at given index."]
- ))
-
- ($.definition /.one?
- ""
- [(one? index input)])
-
- ($.definition /.zero?
- ""
- [(zero? index input)])
-
- ($.definition /.region
- "A mask for a block of bits of the given size, starting at the given offset."
- [(region offset size)])
-
- ($.definition (/.Sub width)
- "A sub-space of I64 with a reduce amount of bits.")
-
- ($.definition /.sub
- "Given a width in the interval (0,64), yields an implementation for integers of that width."
- [(sub width)])]
- [])))
+(`` (def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.bits_per_byte)
+ ($.definition /.bytes_per_i64)
+ ($.definition /.width)
+ ($.definition /.false)
+ ($.definition /.true)
+ ($.definition /.equivalence)
+ ($.definition /.hash)
+ ($.definition /.disjunction)
+ ($.definition /.conjunction)
+ ($.definition /.reversed)
+ ($.definition /.left_rotated)
+ ($.definition /.right_rotated)
+
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
+
+ [/.or "Bitwise or."]
+ [/.xor "Bitwise xor."]
+ [/.and "Bitwise and."]
+
+ [/.left_shifted "Bitwise left-shift."]
+ [/.right_shifted "Unsigned/logic bitwise right-shift."]
+ ))
+
+ ($.definition /.Mask
+ "A pattern of bits that can be imposed on I64 values.")
+
+ ($.definition /.bit
+ "A mask with only a specific bit set."
+ [(bit position)])
+
+ ($.definition /.sign
+ "A mask for the sign bit of ints.")
+
+ ($.definition /.not
+ "Bitwise negation.")
+
+ ($.definition /.mask
+ "Mask a block of bits of the specified size."
+ [(mask amount_of_bits)])
+
+ ($.definition /.ones
+ "Count the number of 1s in a bit-map."
+ [(ones it)])
+
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
+
+ [/.zero "Clear bit at the given index."]
+ [/.one "Set bit at given index."]
+ [/.flipped "Flip bit at given index."]
+ ))
+
+ ($.definition /.one?
+ ""
+ [(one? index input)])
+
+ ($.definition /.zero?
+ ""
+ [(zero? index input)])
+
+ ($.definition /.region
+ "A mask for a block of bits of the given size, starting at the given offset."
+ [(region offset size)])
+
+ ($.definition (/.Sub width)
+ "A sub-space of I64 with a reduce amount of bits.")
+
+ ($.definition /.sub
+ "Given a width in the interval (0,64), yields an implementation for integers of that width."
+ [(sub width)])
+ )))
diff --git a/stdlib/source/documentation/lux/math/number/i8.lux b/stdlib/source/documentation/lux/math/number/i8.lux
index f2bbc58f6..122c3030d 100644
--- a/stdlib/source/documentation/lux/math/number/i8.lux
+++ b/stdlib/source/documentation/lux/math/number/i8.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except private)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,15 +8,16 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.equivalence)
- ($.definition /.width)
- ($.definition /.i8)
- ($.definition /.i64)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.I8
- "A 8-bit integer.")]
- []))
+ ($.definition /.equivalence)
+ ($.definition /.width)
+ ($.definition /.i8)
+ ($.definition /.i64)
+
+ ($.definition /.I8
+ "A 8-bit integer.")
+ ))
diff --git a/stdlib/source/documentation/lux/math/number/int.lux b/stdlib/source/documentation/lux/math/number/int.lux
index c70ddafad..f7805842d 100644
--- a/stdlib/source/documentation/lux/math/number/int.lux
+++ b/stdlib/source/documentation/lux/math/number/int.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except private)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,95 +8,96 @@
[\\library
["[0]" /]])
-(`` (.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.positive?)
- ($.definition /.negative?)
- ($.definition /.zero?)
- ($.definition /.even?)
- ($.definition /.odd?)
- ($.definition /.co_prime?)
- ($.definition /.frac)
- ($.definition /.equivalence)
- ($.definition /.order)
- ($.definition /.enum)
- ($.definition /.interval)
- ($.definition /.addition)
- ($.definition /.multiplication)
- ($.definition /.maximum)
- ($.definition /.minimum)
- ($.definition /.binary)
- ($.definition /.octal)
- ($.definition /.decimal)
- ($.definition /.hex)
- ($.definition /.hash)
-
- ($.definition /.=
- "Int(eger) equivalence."
- [(= reference sample)])
-
- ($.definition /.<
- "Int(eger) less-than."
- [(< reference sample)])
-
- ($.definition /.<=
- "Int(eger) less-than or equal."
- [(<= reference sample)])
-
- ($.definition /.>
- "Int(eger) greater-than."
- [(> reference sample)])
-
- ($.definition /.>=
- "Int(eger) greater-than or equal."
- [(>= reference sample)])
-
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
-
- [/.min "Int(eger) minimum."]
- [/.max "Int(eger) maximum."]
- ))
-
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
-
- [/.+ "Int(eger) addition."]
- [/.- "Int(eger) substraction."]
- [/.* "Int(eger) multiplication."]
- [/./ "Int(eger) division."]
- [/.% "Int(eger) remainder."]
- [/./% "Int(eger) [division remainder]."]
- ))
-
- ($.definition /.opposite
- "A value of equal magnitude and opposite sign.")
-
- ($.definition /.abs
- "A value of equal magnitude and positive sign.")
-
- ($.definition /.signum
- "A value (either -1, 0 or +0) which represents the sign.")
-
- ($.definition /.mod
- (format "Integer modulo."
- \n "Note: The modulo and the remainder are not the same.")
- [(mod divisor dividend)])
-
- ($.definition /.gcd
- "Greatest Common Divisor.")
-
- ($.definition /.extended_gcd
- "Extended euclidean algorithm.")
-
- ($.definition /.lcm
- "Least Common Multiple.")
-
- ($.definition /.right_shifted
- "Signed/arithmetic bitwise right-shift."
- [(right_shifted parameter subject)])]
- [])))
+(`` (def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.positive?)
+ ($.definition /.negative?)
+ ($.definition /.zero?)
+ ($.definition /.even?)
+ ($.definition /.odd?)
+ ($.definition /.co_prime?)
+ ($.definition /.frac)
+ ($.definition /.equivalence)
+ ($.definition /.order)
+ ($.definition /.enum)
+ ($.definition /.interval)
+ ($.definition /.addition)
+ ($.definition /.multiplication)
+ ($.definition /.maximum)
+ ($.definition /.minimum)
+ ($.definition /.binary)
+ ($.definition /.octal)
+ ($.definition /.decimal)
+ ($.definition /.hex)
+ ($.definition /.hash)
+
+ ($.definition /.=
+ "Int(eger) equivalence."
+ [(= reference sample)])
+
+ ($.definition /.<
+ "Int(eger) less-than."
+ [(< reference sample)])
+
+ ($.definition /.<=
+ "Int(eger) less-than or equal."
+ [(<= reference sample)])
+
+ ($.definition /.>
+ "Int(eger) greater-than."
+ [(> reference sample)])
+
+ ($.definition /.>=
+ "Int(eger) greater-than or equal."
+ [(>= reference sample)])
+
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
+
+ [/.min "Int(eger) minimum."]
+ [/.max "Int(eger) maximum."]
+ ))
+
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
+
+ [/.+ "Int(eger) addition."]
+ [/.- "Int(eger) substraction."]
+ [/.* "Int(eger) multiplication."]
+ [/./ "Int(eger) division."]
+ [/.% "Int(eger) remainder."]
+ [/./% "Int(eger) [division remainder]."]
+ ))
+
+ ($.definition /.opposite
+ "A value of equal magnitude and opposite sign.")
+
+ ($.definition /.abs
+ "A value of equal magnitude and positive sign.")
+
+ ($.definition /.signum
+ "A value (either -1, 0 or +0) which represents the sign.")
+
+ ($.definition /.mod
+ (format "Integer modulo."
+ \n "Note: The modulo and the remainder are not the same.")
+ [(mod divisor dividend)])
+
+ ($.definition /.gcd
+ "Greatest Common Divisor.")
+
+ ($.definition /.extended_gcd
+ "Extended euclidean algorithm.")
+
+ ($.definition /.lcm
+ "Least Common Multiple.")
+
+ ($.definition /.right_shifted
+ "Signed/arithmetic bitwise right-shift."
+ [(right_shifted parameter subject)])
+ )))
diff --git a/stdlib/source/documentation/lux/math/number/nat.lux b/stdlib/source/documentation/lux/math/number/nat.lux
index 72e7773c3..677393fdd 100644
--- a/stdlib/source/documentation/lux/math/number/nat.lux
+++ b/stdlib/source/documentation/lux/math/number/nat.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except private)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,56 +8,57 @@
[\\library
["[0]" /]])
-(`` (.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /.co_prime?)
- ($.definition /.even?)
- ($.definition /.odd?)
- ($.definition /.frac)
- ($.definition /.equivalence)
- ($.definition /.order)
- ($.definition /.enum)
- ($.definition /.interval)
- ($.definition /.addition)
- ($.definition /.multiplication)
- ($.definition /.minimum)
- ($.definition /.maximum)
- ($.definition /.binary)
- ($.definition /.octal)
- ($.definition /.hex)
- ($.definition /.decimal)
- ($.definition /.hash)
-
- (,, (with_template [<name> <documentation>]
- [($.definition <name>
- <documentation>)]
-
- [/.= "Nat(ural) equivalence."]
- [/.+ "Nat(ural) addition."]
- [/.- "Nat(ural) substraction."]
- [/.< "Nat(ural) less-than."]
- [/.<= "Nat(ural) less-than or equal."]
- [/.> "Nat(ural) greater-than."]
- [/.>= "Nat(ural) greater-than or equal."]
- [/.* "Nat(ural) multiplication."]
- [/./ "Nat(ural) division."]
- [/./% "Nat(ural) [division remainder]."]
- [/.% "Nat(ural) remainder."]
- ))
-
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
-
- [/.min "Nat(ural) minimum."]
- [/.max "Nat(ural) maximum."]
- ))
-
- ($.definition /.gcd
- "Greatest Common Divisor.")
-
- ($.definition /.lcm
- "Least Common Multiple.")]
- [])))
+(`` (def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
+
+ ($.definition /.co_prime?)
+ ($.definition /.even?)
+ ($.definition /.odd?)
+ ($.definition /.frac)
+ ($.definition /.equivalence)
+ ($.definition /.order)
+ ($.definition /.enum)
+ ($.definition /.interval)
+ ($.definition /.addition)
+ ($.definition /.multiplication)
+ ($.definition /.minimum)
+ ($.definition /.maximum)
+ ($.definition /.binary)
+ ($.definition /.octal)
+ ($.definition /.hex)
+ ($.definition /.decimal)
+ ($.definition /.hash)
+
+ (,, (with_template [<name> <documentation>]
+ [($.definition <name>
+ <documentation>)]
+
+ [/.= "Nat(ural) equivalence."]
+ [/.+ "Nat(ural) addition."]
+ [/.- "Nat(ural) substraction."]
+ [/.< "Nat(ural) less-than."]
+ [/.<= "Nat(ural) less-than or equal."]
+ [/.> "Nat(ural) greater-than."]
+ [/.>= "Nat(ural) greater-than or equal."]
+ [/.* "Nat(ural) multiplication."]
+ [/./ "Nat(ural) division."]
+ [/./% "Nat(ural) [division remainder]."]
+ [/.% "Nat(ural) remainder."]
+ ))
+
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
+
+ [/.min "Nat(ural) minimum."]
+ [/.max "Nat(ural) maximum."]
+ ))
+
+ ($.definition /.gcd
+ "Greatest Common Divisor.")
+
+ ($.definition /.lcm
+ "Least Common Multiple.")
+ )))
diff --git a/stdlib/source/documentation/lux/math/number/ratio.lux b/stdlib/source/documentation/lux/math/number/ratio.lux
index 4857d55fe..e74805a90 100644
--- a/stdlib/source/documentation/lux/math/number/ratio.lux
+++ b/stdlib/source/documentation/lux/math/number/ratio.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except private)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,34 +8,35 @@
[\\library
["[0]" /]])
-(.def .public documentation
- (.List $.Module)
- ($.module /._
- "Rational numbers."
- [($.definition /.nat)
- ($.definition /.=)
- ($.definition /.equivalence)
- ($.definition /.<)
- ($.definition /.<=)
- ($.definition /.>)
- ($.definition /.>=)
- ($.definition /.order)
- ($.definition /.+)
- ($.definition /.-)
- ($.definition /.*)
- ($.definition /./)
- ($.definition /.%)
- ($.definition /.reciprocal)
- ($.definition /.codec)
- ($.definition /.addition)
- ($.definition /.multiplication)
+(def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "Rational numbers.")
- ($.definition /.Ratio
- "An unsigned ratio of numbers.")
+ ($.definition /.nat)
+ ($.definition /.=)
+ ($.definition /.equivalence)
+ ($.definition /.<)
+ ($.definition /.<=)
+ ($.definition /.>)
+ ($.definition /.>=)
+ ($.definition /.order)
+ ($.definition /.+)
+ ($.definition /.-)
+ ($.definition /.*)
+ ($.definition /./)
+ ($.definition /.%)
+ ($.definition /.reciprocal)
+ ($.definition /.codec)
+ ($.definition /.addition)
+ ($.definition /.multiplication)
- ($.definition /.ratio
- "Rational literals."
- [(ratio numerator denominator)]
- ["The denominator can be omitted if it is 1."
- (ratio numerator)])]
- []))
+ ($.definition /.Ratio
+ "An unsigned ratio of numbers.")
+
+ ($.definition /.ratio
+ "Rational literals."
+ [(ratio numerator denominator)]
+ ["The denominator can be omitted if it is 1."
+ (ratio numerator)])
+ ))
diff --git a/stdlib/source/documentation/lux/math/number/rev.lux b/stdlib/source/documentation/lux/math/number/rev.lux
index 0b629eb7d..323ccc467 100644
--- a/stdlib/source/documentation/lux/math/number/rev.lux
+++ b/stdlib/source/documentation/lux/math/number/rev.lux
@@ -1,6 +1,6 @@
(.require
[library
- [lux (.except private)
+ [lux (.except)
["$" documentation]
[data
["[0]" text (.only \n)
@@ -8,87 +8,88 @@
[\\library
["[0]" /]])
-(`` (.def .public documentation
- (.List $.Module)
- ($.module /._
- ""
- [($.definition /./1)
- ($.definition /./2)
- ($.definition /./4)
- ($.definition /./8)
- ($.definition /./16)
- ($.definition /./32)
- ($.definition /./64)
- ($.definition /./128)
- ($.definition /./256)
- ($.definition /./512)
- ($.definition /./1024)
- ($.definition /./2048)
- ($.definition /./4096)
- ($.definition /./%)
- ($.definition /.frac)
- ($.definition /.equivalence)
- ($.definition /.hash)
- ($.definition /.order)
- ($.definition /.enum)
- ($.definition /.interval)
- ($.definition /.addition)
- ($.definition /.maximum)
- ($.definition /.minimum)
- ($.definition /.binary)
- ($.definition /.octal)
- ($.definition /.hex)
- ($.definition /.decimal)
+(`` (def .public documentation
+ (List $.Documentation)
+ (list ($.module /._
+ "")
- ($.definition /.=
- "Rev(olution) equivalence."
- [(= reference sample)])
+ ($.definition /./1)
+ ($.definition /./2)
+ ($.definition /./4)
+ ($.definition /./8)
+ ($.definition /./16)
+ ($.definition /./32)
+ ($.definition /./64)
+ ($.definition /./128)
+ ($.definition /./256)
+ ($.definition /./512)
+ ($.definition /./1024)
+ ($.definition /./2048)
+ ($.definition /./4096)
+ ($.definition /./%)
+ ($.definition /.frac)
+ ($.definition /.equivalence)
+ ($.definition /.hash)
+ ($.definition /.order)
+ ($.definition /.enum)
+ ($.definition /.interval)
+ ($.definition /.addition)
+ ($.definition /.maximum)
+ ($.definition /.minimum)
+ ($.definition /.binary)
+ ($.definition /.octal)
+ ($.definition /.hex)
+ ($.definition /.decimal)
- ($.definition /.<
- "Rev(olution) less-than."
- [(< reference sample)])
+ ($.definition /.=
+ "Rev(olution) equivalence."
+ [(= reference sample)])
- ($.definition /.<=
- "Rev(olution) less-than or equal."
- [(<= reference sample)])
+ ($.definition /.<
+ "Rev(olution) less-than."
+ [(< reference sample)])
- ($.definition /.>
- "Rev(olution) greater-than."
- [(> reference sample)])
+ ($.definition /.<=
+ "Rev(olution) less-than or equal."
+ [(<= reference sample)])
- ($.definition /.>=
- "Rev(olution) greater-than or equal."
- [(>= reference sample)])
+ ($.definition /.>
+ "Rev(olution) greater-than."
+ [(> reference sample)])
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
+ ($.definition /.>=
+ "Rev(olution) greater-than or equal."
+ [(>= reference sample)])
- [/.min "Rev(olution) minimum."]
- [/.max "Rev(olution) maximum."]
- ))
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
- (,, (with_template [<name> <doc>]
- [($.definition <name>
- <doc>)]
+ [/.min "Rev(olution) minimum."]
+ [/.max "Rev(olution) maximum."]
+ ))
- [/.+ "Rev(olution) addition."]
- [/.- "Rev(olution) substraction."]
- [/.* "Rev(olution) multiplication."]
- [/./ "Rev(olution) division."]
- [/.% "Rev(olution) remainder."]
- [/.ratio "Ratio between two rev(olution)s."]
- ))
+ (,, (with_template [<name> <doc>]
+ [($.definition <name>
+ <doc>)]
- ($.definition /.up
- ""
- [(up scale subject)])
+ [/.+ "Rev(olution) addition."]
+ [/.- "Rev(olution) substraction."]
+ [/.* "Rev(olution) multiplication."]
+ [/./ "Rev(olution) division."]
+ [/.% "Rev(olution) remainder."]
+ [/.ratio "Ratio between two rev(olution)s."]
+ ))
- ($.definition /.down
- ""
- [(down scale subject)])
+ ($.definition /.up
+ ""
+ [(up scale subject)])
- ($.definition /.reciprocal
- "Rev(olution) reciprocal of a Nat(ural)."
- [(reciprocal numerator)])]
- [])))
+ ($.definition /.down
+ ""
+ [(down scale subject)])
+
+ ($.definition /.reciprocal
+ "Rev(olution) reciprocal of a Nat(ural)."
+ [(reciprocal numerator)])
+ )))