aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/math/number/frac.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-09-12 15:39:55 -0400
committerEduardo Julian2021-09-12 15:39:55 -0400
commit2dbbaaec93a53f8dd0b96a0028b9cf125c9066cd (patch)
tree14bc8b5abe09b46ef005c3ff7cf132f1d98ddf0d /stdlib/source/test/lux/math/number/frac.lux
parentdda05bca0956af5e5b3875c4cc36e61aa04772e4 (diff)
Re-named \ => # && \\ => ##
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/math/number/frac.lux26
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux
index 459edd275..f3dd864ad 100644
--- a/stdlib/source/test/lux/math/number/frac.lux
+++ b/stdlib/source/test/lux/math/number/frac.lux
@@ -13,7 +13,7 @@
["$[0]" monoid]
["$[0]" codec]]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]]
+ ["[0]" bit ("[1]#[0]" equivalence)]]
[math
["[0]" random {"+" [Random]}]]]]
[\\library
@@ -26,7 +26,7 @@
(def: random
(Random Frac)
- (\ random.monad each (|>> (i.% +1,000,000) i.frac) random.int))
+ (# random.monad each (|>> (i.% +1,000,000) i.frac) random.int))
(def: constant
Test
@@ -38,7 +38,7 @@
(_.cover [/.positive_infinity]
(/.< /.positive_infinity sample))
(_.cover [/.smallest]
- (bit\= (/.positive? sample)
+ (bit#= (/.positive? sample)
(/.>= /.smallest sample)))
(_.cover [/.negative_infinity]
(/.> /.negative_infinity sample))
@@ -52,16 +52,16 @@
Test
(do [! random.monad]
[sample ..random
- shift (\ ! each /.abs ..random)]
+ shift (# ! each /.abs ..random)]
($_ _.and
(_.cover [/.negative?]
- (bit\= (/.negative? sample)
+ (bit#= (/.negative? sample)
(/.< +0.0 sample)))
(_.cover [/.positive?]
- (bit\= (/.positive? sample)
+ (bit#= (/.positive? sample)
(/.> +0.0 sample)))
(_.cover [/.zero?]
- (bit\= (/.zero? sample)
+ (bit#= (/.zero? sample)
(/.= +0.0 sample)))
(_.cover [/.approximately?]
(and (/.approximately? /.smallest sample sample)
@@ -77,15 +77,15 @@
Test
($_ _.and
(do [! random.monad]
- [expected (\ ! each (n.% 1,000,000) random.nat)]
+ [expected (# ! each (n.% 1,000,000) random.nat)]
(_.cover [/.nat]
(|> expected n.frac /.nat (n.= expected))))
(do [! random.monad]
- [expected (\ ! each (i.% +1,000,000) random.int)]
+ [expected (# ! each (i.% +1,000,000) random.int)]
(_.cover [/.int]
(|> expected i.frac /.int (i.= expected))))
(do [! random.monad]
- [expected (\ ! each (|>> (i64.left_shifted 52) .rev)
+ [expected (# ! each (|>> (i64.left_shifted 52) .rev)
random.nat)]
(_.cover [/.rev]
(|> expected r.frac /.rev (r.= expected))))
@@ -136,10 +136,10 @@
right random.safe_frac]
($_ _.and
(_.cover [/.>]
- (bit\= (/.> left right)
+ (bit#= (/.> left right)
(/.< right left)))
(_.cover [/.<= /.>=]
- (bit\= (/.<= left right)
+ (bit#= (/.<= left right)
(/.>= right left)))
))
(do random.monad
@@ -154,7 +154,7 @@
(and (/.= +1.0 (/./ sample sample))
(/.= sample (/./ +1.0 sample))))
(_.cover [/.abs]
- (bit\= (/.> sample (/.abs sample))
+ (bit#= (/.> sample (/.abs sample))
(/.negative? sample)))
(_.cover [/.signum]
(/.= (/.abs sample)