Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
10
Task/Arithmetic-Complex/EchoLisp/arithmetic-complex.echolisp
Normal file
10
Task/Arithmetic-Complex/EchoLisp/arithmetic-complex.echolisp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
(define a 42+666i) → a
|
||||
(define b 1+i) → b
|
||||
(- a) → -42-666i ; negate
|
||||
(+ a b) → 43+667i ; add
|
||||
(* a b) → -624+708i ; multiply
|
||||
(/ b) → 0.5-0.5i ; invert
|
||||
(conjugate b) → 1-i
|
||||
(angle b) → 0.7853981633974483 ; = PI/4
|
||||
(magnitude b) → 1.4142135623730951 ; = sqrt(2)
|
||||
(exp (* I PI)) → -1+0i ; Euler = e^(I*PI) = -1
|
||||
Loading…
Add table
Add a link
Reference in a new issue