Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/Arithmetic-Complex/LFE/arithmetic-complex-2.lfe
Normal file
17
Task/Arithmetic-Complex/LFE/arithmetic-complex-2.lfe
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
(defun add
|
||||
(((match-complex real r1 img i1)
|
||||
(match-complex real r2 img i2))
|
||||
(new (+ r1 r2) (+ i1 i2))))
|
||||
|
||||
(defun mult
|
||||
(((match-complex real r1 img i1)
|
||||
(match-complex real r2 img i2))
|
||||
(new (- (* r1 r2) (* i1 i2))
|
||||
(+ (* r1 i2) (* r2 i1)))))
|
||||
|
||||
(defun neg
|
||||
(((match-complex real r img i))
|
||||
(new (* -1 r) (* -1 i))))
|
||||
|
||||
(defun inv (cmplx)
|
||||
(div (conj cmplx) (modulus cmplx)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue