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
13
Task/Arithmetic-Complex/Sidef/arithmetic-complex.sidef
Normal file
13
Task/Arithmetic-Complex/Sidef/arithmetic-complex.sidef
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
var a = 1:1; # Complex(1, 1)
|
||||
var b = 3.14159:1.25; # Complex(3.14159, 1.25)
|
||||
|
||||
[ a + b, # addition
|
||||
a * b, # multiplication
|
||||
-a, # negation
|
||||
1 / a, # multiplicative inverse
|
||||
~a, # complex conjugate
|
||||
a.abs, # abs
|
||||
a.sqrt, # sqrt
|
||||
b.re, # real
|
||||
b.im, # imaginary
|
||||
].each { |c| say c }
|
||||
Loading…
Add table
Add a link
Reference in a new issue