Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Arithmetic-Complex/Smalltalk/arithmetic-complex-1.st
Normal file
13
Task/Arithmetic-Complex/Smalltalk/arithmetic-complex-1.st
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
PackageLoader fileInPackage: 'Complex'.
|
||||
|a b|
|
||||
a := 1 + 1 i.
|
||||
b := 3.14159 + 1.2 i.
|
||||
(a + b) displayNl.
|
||||
(a * b) displayNl.
|
||||
(a / b) displayNl.
|
||||
a reciprocal displayNl.
|
||||
a conjugate displayNl.
|
||||
a abs displayNl.
|
||||
a real displayNl.
|
||||
a imaginary displayNl.
|
||||
a negated displayNl.
|
||||
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