In Macaulay 2, complex numbers are represented as floating point numbers, and so are only approximate. The symbol
ii represents the square root of -1.
i1 : z = 3-4*ii
o1 = 3. - 4.ii
o1 : CC
|
i2 : z^5
o2 = - 237. + 3116.ii
o2 : CC
|
i3 : 1/z
o3 = 0.12 + 0.16ii
o3 : CC
|
Arithmetic involving ZZ, QQ, RR, and CC works as one might expect.
i4 : 3 + ii
o4 = 3. + 1.ii
o4 : CC
|
i5 : 4/5 + 12*ii
o5 = 0.8 + 12.ii
o5 : CC
|
i6 : 3 == 3 + 0*ii
o6 = true
|
i7 : (2-ii)^5
o7 = - 38. - 41.ii
o7 : CC
|
i8 : (1+ii)/3
o8 = 0.333333 + 0.333333ii
o8 : CC
|