Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
22
Task/Arithmetic-Complex/Langur/arithmetic-complex.langur
Normal file
22
Task/Arithmetic-Complex/Langur/arithmetic-complex.langur
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
val conjugate = fn(c) {
|
||||
if c is not complex: throw "expected complex number"
|
||||
return complex(c[1], -c[2])
|
||||
}
|
||||
|
||||
val examples = {
|
||||
"-(1+1i)": -(1+1i),
|
||||
"abs(1+1i)": abs(1+1i),
|
||||
"(2+2i) + (5+13.2i)": (2+2i) + (5+13.2i),
|
||||
"5 + (2+2i)": 5 + (2+2i),
|
||||
"5i + (2+2i)": 5i + (2+2i),
|
||||
"5i - (2+2i)": 5i - (2+2i),
|
||||
"(1+1i) * (3.141592653589793+1.2i)": (1+1i) * (3.141592653589793+1.2i),
|
||||
"(5+3i) / (4-3i)": (5+3i) / (4-3i),
|
||||
"1 / (4-3i)": 1 / (4-3i),
|
||||
"(4-3i) ^ 3": (4-3i) ^ 3,
|
||||
"conjugate(7+21.0i)": conjugate(7+21.0i),
|
||||
}
|
||||
|
||||
for e of examples {
|
||||
writeln "{{e : 20}}: ", examples[e]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue