aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/data/number/complex.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/data/number/complex.lux')
-rw-r--r--stdlib/source/test/lux/data/number/complex.lux16
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/test/lux/data/number/complex.lux b/stdlib/source/test/lux/data/number/complex.lux
index a622ef6b3..106edf33d 100644
--- a/stdlib/source/test/lux/data/number/complex.lux
+++ b/stdlib/source/test/lux/data/number/complex.lux
@@ -5,10 +5,10 @@
pipe]
[data
["." number
- ["." frac ("#/." number)]
+ ["." frac ("#;." number)]
["&" complex]]
[collection
- ["." list ("#/." functor)]]]
+ ["." list ("#;." functor)]]]
["." math
["r" random]]]
lux/test)
@@ -17,9 +17,9 @@
(def: (within? margin standard value)
(-> Frac &.Complex &.Complex Bit)
- (let [real-dist (frac/abs (f/- (get@ #&.real standard)
+ (let [real-dist (frac;abs (f/- (get@ #&.real standard)
(get@ #&.real value)))
- imgn-dist (frac/abs (f/- (get@ #&.imaginary standard)
+ imgn-dist (frac;abs (f/- (get@ #&.imaginary standard)
(get@ #&.imaginary value)))]
(and (f/< margin real-dist)
(f/< margin imgn-dist))))
@@ -64,8 +64,8 @@
(test "Absolute value of complex >= absolute value of any of the parts."
(let [r+i (&.complex real imaginary)
abs (get@ #&.real (&.abs r+i))]
- (and (f/>= (frac/abs real) abs)
- (f/>= (frac/abs imaginary) abs))))
+ (and (f/>= (frac;abs real) abs)
+ (f/>= (frac;abs imaginary) abs))))
(test "The absolute value of a complex number involving a NaN on either dimension, results in a NaN value."
(and (number.not-a-number? (get@ #&.real (&.abs (&.complex number.not-a-number imaginary))))
@@ -131,7 +131,7 @@
(let [cx (&.conjugate x)]
(and (f/= (get@ #&.real x)
(get@ #&.real cx))
- (f/= (frac/negate (get@ #&.imaginary x))
+ (f/= (frac;negate (get@ #&.imaginary x))
(get@ #&.imaginary cx)))))
(test "The reciprocal functions is its own inverse."
@@ -198,5 +198,5 @@
(test "Can calculate the N roots for any complex number."
(|> sample
(&.roots degree)
- (list/map (&.pow' (|> degree .int int-to-frac)))
+ (list;map (&.pow' (|> degree .int int-to-frac)))
(list.every? (within? margin-of-error sample)))))))