diff options
Diffstat (limited to 'stdlib/source/library/lux/math/number/complex.lux')
-rw-r--r-- | stdlib/source/library/lux/math/number/complex.lux | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/library/lux/math/number/complex.lux b/stdlib/source/library/lux/math/number/complex.lux index b1c14d1bb..52947b51b 100644 --- a/stdlib/source/library/lux/math/number/complex.lux +++ b/stdlib/source/library/lux/math/number/complex.lux @@ -111,7 +111,7 @@ (def: .public (/ param input) (-> Complex Complex Complex) - (let [(^open "[0]") param] + (let [(open "[0]") param] (if (f.< (f.abs #imaginary) (f.abs #real)) (let [quot (f./ #imaginary #real) @@ -125,7 +125,7 @@ (def: .public (/' param subject) (-> Frac Complex Complex) - (let [(^open "[0]") subject] + (let [(open "[0]") subject] [..#real (f./ param #real) ..#imaginary (f./ param #imaginary)])) @@ -140,7 +140,7 @@ (def: .public (cos subject) (-> Complex Complex) - (let [(^open "[0]") subject] + (let [(open "[0]") subject] [..#real (f.* (math.cosh #imaginary) (math.cos #real)) ..#imaginary (f.opposite (f.* (math.sinh #imaginary) @@ -148,7 +148,7 @@ (def: .public (cosh subject) (-> Complex Complex) - (let [(^open "[0]") subject] + (let [(open "[0]") subject] [..#real (f.* (math.cos #imaginary) (math.cosh #real)) ..#imaginary (f.* (math.sin #imaginary) @@ -156,7 +156,7 @@ (def: .public (sin subject) (-> Complex Complex) - (let [(^open "[0]") subject] + (let [(open "[0]") subject] [..#real (f.* (math.cosh #imaginary) (math.sin #real)) ..#imaginary (f.* (math.sinh #imaginary) @@ -164,7 +164,7 @@ (def: .public (sinh subject) (-> Complex Complex) - (let [(^open "[0]") subject] + (let [(open "[0]") subject] [..#real (f.* (math.cos #imaginary) (math.sinh #real)) ..#imaginary (f.* (math.sin #imaginary) @@ -172,7 +172,7 @@ (def: .public (tan subject) (-> Complex Complex) - (let [(^open "[0]") subject + (let [(open "[0]") subject r2 (f.* +2.0 #real) i2 (f.* +2.0 #imaginary) d (f.+ (math.cos r2) (math.cosh i2))] @@ -181,7 +181,7 @@ (def: .public (tanh subject) (-> Complex Complex) - (let [(^open "[0]") subject + (let [(open "[0]") subject r2 (f.* +2.0 #real) i2 (f.* +2.0 #imaginary) d (f.+ (math.cosh r2) (math.cos i2))] @@ -190,7 +190,7 @@ (def: .public (abs subject) (-> Complex Frac) - (let [(^open "[0]") subject] + (let [(open "[0]") subject] (if (f.< (f.abs #imaginary) (f.abs #real)) (if (f.= +0.0 #imaginary) @@ -206,14 +206,14 @@ (def: .public (exp subject) (-> Complex Complex) - (let [(^open "[0]") subject + (let [(open "[0]") subject r_exp (math.exp #real)] [..#real (f.* r_exp (math.cos #imaginary)) ..#imaginary (f.* r_exp (math.sin #imaginary))])) (def: .public (log subject) (-> Complex Complex) - (let [(^open "[0]") subject] + (let [(open "[0]") subject] [..#real (|> subject ..abs math.log) ..#imaginary (math.atan/2 #real #imaginary)])) @@ -232,7 +232,7 @@ (def: .public (root/2 input) (-> Complex Complex) - (let [(^open "[0]") input + (let [(open "[0]") input t (|> input ..abs (f.+ (f.abs #real)) (f./ +2.0) (math.pow +0.5))] (if (f.< +0.0 #real) [..#real (f./ (f.* +2.0 t) @@ -246,7 +246,7 @@ (-> Complex Complex) (|> (complex +1.0) (- (* input input)) ..root/2)) -(def: .public (reciprocal (^open "[0]")) +(def: .public (reciprocal (open "[0]")) (-> Complex Complex) (if (f.< (f.abs #imaginary) (f.abs #real)) @@ -284,7 +284,7 @@ ..log (..* (../ (..complex +2.0) ..i)))) -(def: .public (argument (^open "[0]")) +(def: .public (argument (open "[0]")) (-> Complex Frac) (math.atan/2 #real #imaginary)) |