diff options
author | Eduardo Julian | 2022-03-16 04:22:45 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-03-16 04:22:45 -0400 |
commit | d710d9f4fc098e7c243c8a5f23cd42683f13e07f (patch) | |
tree | e48633e5f21df572fbb133855e77f5c1adfd40fb /stdlib/source/test/lux/math/number/complex.lux | |
parent | b0093a3849baaeb5e12692b2cf6ac65ba74bbd54 (diff) |
Generalized/type-agnostic arithmetic.
Diffstat (limited to 'stdlib/source/test/lux/math/number/complex.lux')
-rw-r--r-- | stdlib/source/test/lux/math/number/complex.lux | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/stdlib/source/test/lux/math/number/complex.lux b/stdlib/source/test/lux/math/number/complex.lux index 53b8982a2..bfee3adcc 100644 --- a/stdlib/source/test/lux/math/number/complex.lux +++ b/stdlib/source/test/lux/math/number/complex.lux @@ -1,18 +1,15 @@ (.using [library [lux "*" - ["%" data/text/format {"+" format}] ["_" test {"+" Test}] [abstract [monad {"+" do}] [\\specification - ["$[0]" equivalence] - ["$[0]" order] - ["$[0]" codec]]] + ["$[0]" equivalence]]] [data [collection ["[0]" list ("[1]#[0]" functor)]]] - ["[0]" math + [math ["[0]" random {"+" Random}]]]] [\\library ["[0]" / @@ -161,8 +158,8 @@ (let [rem (/.% y x) quotient (|> x (/.- rem) (/./ y)) floored (|> quotient - (revised /.#real math.floor) - (revised /.#imaginary math.floor))] + (revised /.#real f.floor) + (revised /.#imaginary f.floor))] (/.approximately? +0.000000000001 x (|> quotient (/.* y) (/.+ rem))))) @@ -192,7 +189,7 @@ (let [signum_abs (|> x /.signum /.abs)] (or (f.= +0.0 signum_abs) (f.= +1.0 signum_abs) - (f.= (math.pow +0.5 +2.0) signum_abs)))) + (f.= (f.pow +0.5 +2.0) signum_abs)))) (_.cover [/.opposite] (let [own_inverse! (let [there (/.opposite x) |