Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
9
Task/Arithmetic-Complex/Tcl/arithmetic-complex.tcl
Normal file
9
Task/Arithmetic-Complex/Tcl/arithmetic-complex.tcl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package require math::complexnumbers
|
||||
namespace import math::complexnumbers::*
|
||||
|
||||
set a [complex 1 1]
|
||||
set b [complex 3.14159 1.2]
|
||||
puts [tostring [+ $a $b]] ;# ==> 4.14159+2.2i
|
||||
puts [tostring [* $a $b]] ;# ==> 1.94159+4.34159i
|
||||
puts [tostring [pow $a [complex -1 0]]] ;# ==> 0.5-0.4999999999999999i
|
||||
puts [tostring [- $a]] ;# ==> -1.0-i
|
||||
Loading…
Add table
Add a link
Reference in a new issue