Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Arithmetic-Complex/R/arithmetic-complex.r
Normal file
13
Task/Arithmetic-Complex/R/arithmetic-complex.r
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
z1 <- 1.5 + 3i
|
||||
z2 <- 1.5 + 1.5i
|
||||
print(z1 + z2) # 3+4.5i
|
||||
print(z1 - z2) # 0+1.5i
|
||||
print(z1 * z2) # -2.25+6.75i
|
||||
print(z1 / z2) # 1.5+0.5i
|
||||
print(-z1) # -1.5-3i
|
||||
print(Conj(z1)) # 1.5-3i
|
||||
print(abs(z1)) # 3.354102
|
||||
print(z1^z2) # -1.102483-0.383064i
|
||||
print(exp(z1)) # -4.436839+0.632456i
|
||||
print(Re(z1)) # 1.5
|
||||
print(Im(z1)) # 3
|
||||
Loading…
Add table
Add a link
Reference in a new issue