Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
23
Task/Arithmetic-Complex/Smalltalk/arithmetic-complex-2.st
Normal file
23
Task/Arithmetic-Complex/Smalltalk/arithmetic-complex-2.st
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|a b|
|
||||
a := 1 + 1i.
|
||||
b := 3.14159 + 1.2i.
|
||||
Transcript show:'a => '; showCR:a.
|
||||
Transcript show:'b => '; showCR:b.
|
||||
Transcript show:'a+b => '; showCR:(a + b).
|
||||
Transcript show:'a-b => '; showCR:(a - b).
|
||||
Transcript show:'a*b => '; showCR:(a * b).
|
||||
Transcript show:'a/b => '; showCR:(a / b).
|
||||
Transcript show:'a reciprocal => '; showCR:a reciprocal.
|
||||
Transcript show:'a conjugated => '; showCR:a conjugated.
|
||||
Transcript show:'a abs => '; showCR:a abs.
|
||||
Transcript show:'a real => '; showCR:a real.
|
||||
Transcript show:'a imaginary => '; showCR:a imaginary.
|
||||
Transcript show:'a negated => '; showCR:a negated.
|
||||
Transcript show:'a sqrt => '; showCR:a sqrt.
|
||||
a2 := (1/2) + 1i.
|
||||
b2 := (2/3) + 2i.
|
||||
Transcript show:'a2+b2 => '; showCR:(a2 + b2).
|
||||
Transcript show:'a2-b2 => '; showCR:(a2 - b2).
|
||||
Transcript show:'a2*b2 => '; showCR:(a2 * b2).
|
||||
Transcript show:'a2/b2 => '; showCR:(a2 / b2).
|
||||
Transcript show:'a2 reciprocal => '; showCR:a2 reciprocal.
|
||||
Loading…
Add table
Add a link
Reference in a new issue