aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/math/number/frac.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/documentation/lux/math/number/frac.lux')
-rw-r--r--stdlib/source/documentation/lux/math/number/frac.lux127
1 files changed, 127 insertions, 0 deletions
diff --git a/stdlib/source/documentation/lux/math/number/frac.lux b/stdlib/source/documentation/lux/math/number/frac.lux
new file mode 100644
index 000000000..a161327fa
--- /dev/null
+++ b/stdlib/source/documentation/lux/math/number/frac.lux
@@ -0,0 +1,127 @@
+(.module:
+ [library
+ [lux (#- private)
+ ["$" documentation (#+ documentation:)]
+ [data
+ ["." text (#+ \n)
+ ["%" format (#+ format)]]]
+ [macro
+ ["." template]]]]
+ [\\library
+ ["." /]])
+
+(documentation: /.=
+ "Frac(tion) equivalence."
+ [(= reference sample)])
+
+(documentation: /.<
+ "Frac(tion) less-than."
+ [(< reference sample)])
+
+(documentation: /.<=
+ "Frac(tion) less-than or equal."
+ [(<= reference sample)])
+
+(documentation: /.>
+ "Frac(tion) greater-than."
+ [(> reference sample)])
+
+(documentation: /.>=
+ "Frac(tion) greater-than or equal."
+ [(>= reference sample)])
+
+(template [<name> <doc>]
+ [(documentation: <name>
+ <doc>
+ [(<name> param subject)])]
+
+ [/.+ "Frac(tion) addition."]
+ [/.- "Frac(tion) substraction."]
+ [/.* "Frac(tion) multiplication."]
+ [/./ "Frac(tion) division."]
+ [/.% "Frac(tion) remainder."]
+ )
+
+(documentation: /./%
+ ""
+ [(/% param subject)])
+
+(template [<name> <doc>]
+ [(documentation: <name>
+ <doc>
+ [(<name> left right)])]
+
+ [/.min "Frac(tion) minimum."]
+ [/.max "Frac(tion) minimum."]
+ )
+
+(template [<name> <doc>]
+ [(documentation: <name>
+ <doc>)]
+
+ [/.not_a_number "Not a number."]
+ [/.positive_infinity "Positive infinity."]
+ [/.negative_infinity "Negative infinity."]
+ )
+
+(documentation: /.not_a_number?
+ "Tests whether a frac is actually not-a-number."
+ [(not_a_number? it)])
+
+(documentation: /.approximately?
+ ""
+ [(approximately? margin_of_error standard value)])
+
+(documentation: /.mod
+ ""
+ [(mod divisor dividend)])
+
+(.def: .public documentation
+ (.List $.Module)
+ ($.module /._
+ ""
+ [..=
+ ..<
+ ..<=
+ ..>
+ ..>=
+ ..+
+ ..-
+ ..*
+ ../
+ ..%
+ ../%
+ ..min
+ ..max
+ ..not_a_number
+ ..positive_infinity
+ ..negative_infinity
+ ..not_a_number?
+ ..approximately?
+ ..mod
+ ($.default /.positive?)
+ ($.default /.negative?)
+ ($.default /.zero?)
+ ($.default /.opposite)
+ ($.default /.abs)
+ ($.default /.signum)
+ ($.default /.nat)
+ ($.default /.int)
+ ($.default /.rev)
+ ($.default /.equivalence)
+ ($.default /.order)
+ ($.default /.smallest)
+ ($.default /.biggest)
+ ($.default /.addition)
+ ($.default /.addition)
+ ($.default /.minimum)
+ ($.default /.maximum)
+ ($.default /.number?)
+ ($.default /.decimal)
+ ($.default /.bits)
+ ($.default /.of_bits)
+ ($.default /.binary)
+ ($.default /.octal)
+ ($.default /.hex)
+ ($.default /.hash)]
+ []))