diff options
Diffstat (limited to 'stdlib/source/test/lux/math/number/complex.lux')
-rw-r--r-- | stdlib/source/test/lux/math/number/complex.lux | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/stdlib/source/test/lux/math/number/complex.lux b/stdlib/source/test/lux/math/number/complex.lux index 9e002f43a..d8097380a 100644 --- a/stdlib/source/test/lux/math/number/complex.lux +++ b/stdlib/source/test/lux/math/number/complex.lux @@ -43,8 +43,8 @@ (def: angle (Random /.Complex) (\ random.monad each - (|>> (revised@ #/.real (f.% +1.0)) - (revised@ #/.imaginary (f.% +1.0))) + (|>> (revised@ /.#real (f.% +1.0)) + (revised@ /.#imaginary (f.% +1.0))) ..random)) (def: construction @@ -55,11 +55,11 @@ ($_ _.and (_.cover [/.complex] (and (let [r+i (/.complex real imaginary)] - (and (f.= real (value@ #/.real r+i)) - (f.= imaginary (value@ #/.imaginary r+i)))) + (and (f.= real (value@ /.#real r+i)) + (f.= imaginary (value@ /.#imaginary r+i)))) (let [r+i (/.complex real)] - (and (f.= real (value@ #/.real r+i)) - (f.= +0.0 (value@ #/.imaginary r+i)))))) + (and (f.= real (value@ /.#real r+i)) + (f.= +0.0 (value@ /.#imaginary r+i)))))) (_.cover [/.approximately?] (/.approximately? ..margin_of_error (/.complex real imaginary) @@ -135,18 +135,18 @@ (_.cover [/.+] (let [z (/.+ y x)] (and (/.= z - (/.complex (f.+ (value@ #/.real y) - (value@ #/.real x)) - (f.+ (value@ #/.imaginary y) - (value@ #/.imaginary x))))))) + (/.complex (f.+ (value@ /.#real y) + (value@ /.#real x)) + (f.+ (value@ /.#imaginary y) + (value@ /.#imaginary x))))))) (_.cover [/.-] (let [normal! (let [z (/.- y x)] (and (/.= z - (/.complex (f.- (value@ #/.real y) - (value@ #/.real x)) - (f.- (value@ #/.imaginary y) - (value@ #/.imaginary x)))))) + (/.complex (f.- (value@ /.#real y) + (value@ /.#real x)) + (f.- (value@ /.#imaginary y) + (value@ /.#imaginary x)))))) inverse! (and (|> x (/.+ y) (/.- y) (/.approximately? ..margin_of_error x)) @@ -161,8 +161,8 @@ (let [rem (/.% y x) quotient (|> x (/.- rem) (/./ y)) floored (|> quotient - (revised@ #/.real math.floor) - (revised@ #/.imaginary math.floor))] + (revised@ /.#real math.floor) + (revised@ /.#imaginary math.floor))] (/.approximately? +0.000000000001 x (|> quotient (/.* y) (/.+ rem))))) @@ -175,10 +175,10 @@ ($_ _.and (_.cover [/.conjugate] (let [cx (/.conjugate x)] - (and (f.= (value@ #/.real x) - (value@ #/.real cx)) - (f.= (f.opposite (value@ #/.imaginary x)) - (value@ #/.imaginary cx))))) + (and (f.= (value@ /.#real x) + (value@ /.#real cx)) + (f.= (f.opposite (value@ /.#imaginary x)) + (value@ /.#imaginary cx))))) (_.cover [/.reciprocal] (let [reciprocal! (|> x (/.* (/.reciprocal x)) (/.approximately? ..margin_of_error /.+one)) |