aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/math.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/math.lux24
1 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/test/lux/math.lux b/stdlib/source/test/lux/math.lux
index 02eac6b3e..17f53064b 100644
--- a/stdlib/source/test/lux/math.lux
+++ b/stdlib/source/test/lux/math.lux
@@ -37,7 +37,7 @@
($_ _.and
(do [! random.monad]
[.let [~= (f.approximately? ..margin_of_error)]
- angle (|> random.safe_frac (\ ! each (f.* /.tau)))]
+ angle (|> random.safe_frac (# ! each (f.* /.tau)))]
($_ _.and
(_.cover [/.sin /.asin]
(trigonometric_symmetry /.sin /.asin angle))
@@ -61,7 +61,7 @@
(~= (f./ +2.0 /.tau) /.pi))
))
(do [! random.monad]
- [sample (|> random.safe_frac (\ ! each (f.* +1000.0)))]
+ [sample (|> random.safe_frac (# ! each (f.* +1000.0)))]
($_ _.and
(_.cover [/.ceil]
(let [ceil'd (/.ceil sample)]
@@ -91,8 +91,8 @@
))
(do [! random.monad]
[.let [~= (f.approximately? ..margin_of_error)]
- sample (\ ! each (f.* +10.0) random.safe_frac)
- power (\ ! each (|>> (n.% 10) ++ n.frac) random.nat)]
+ sample (# ! each (f.* +10.0) random.safe_frac)
+ power (# ! each (|>> (n.% 10) ++ n.frac) random.nat)]
($_ _.and
(_.cover [/.exp /.log]
(|> sample /.exp /.log (f.approximately? +0.000000000000001 sample)))
@@ -107,9 +107,9 @@
))
(do [! random.monad]
[.let [~= (f.approximately? ..margin_of_error)]
- angle (\ ! each (f.* /.tau) random.safe_frac)
- sample (\ ! each f.abs random.safe_frac)
- big (\ ! each (f.* +1,000,000,000.00) random.safe_frac)]
+ angle (# ! each (f.* /.tau) random.safe_frac)
+ sample (# ! each f.abs random.safe_frac)
+ big (# ! each (f.* +1,000,000,000.00) random.safe_frac)]
(template.let [(odd! <function>)
[(_.cover [<function>]
(~= (f.opposite (<function> angle))
@@ -137,8 +137,8 @@
(inverse! /.atanh /.acoth big)
)))
(do [! random.monad]
- [x (\ ! each (|>> (f.* +10.0) f.abs) random.safe_frac)
- y (\ ! each (|>> (f.* +10.0) f.abs) random.safe_frac)]
+ [x (# ! each (|>> (f.* +10.0) f.abs) random.safe_frac)
+ y (# ! each (|>> (f.* +10.0) f.abs) random.safe_frac)]
(_.cover [/.hypotenuse]
(let [h (/.hypotenuse x y)]
(and (f.>= x h)
@@ -146,8 +146,8 @@
(do [! random.monad]
[.let [~= (f.approximately? ..margin_of_error)
tau/4 (f./ +4.0 /.tau)]
- x (\ ! each (f.* tau/4) random.safe_frac)
- y (\ ! each (f.* tau/4) random.safe_frac)]
+ x (# ! each (f.* tau/4) random.safe_frac)
+ y (# ! each (f.* tau/4) random.safe_frac)]
(_.cover [/.atan/2]
(let [expected (/.atan/2 x y)
actual (if (f.> +0.0 x)
@@ -160,7 +160,7 @@
(~= (f.opposite tau/4) (/.atan/2 +0.0 (f.opposite (f.abs y))))
(f.not_a_number? (/.atan/2 +0.0 +0.0))))))
(do [! random.monad]
- [of (\ ! each (|>> (n.% 10) ++) random.nat)]
+ [of (# ! each (|>> (n.% 10) ++) random.nat)]
(_.cover [/.factorial]
(and (n.= 1 (/.factorial 0))
(|> (/.factorial of) (n.% of) (n.= 0)))))