Finding Re() and Im() for complex numbers
Hey guys,
Is there a way to find the real and imaginary parts of a complex number in Sage? If so, how is it done?
Thanks.
Hey guys,
Is there a way to find the real and imaginary parts of a complex number in Sage? If so, how is it done?
Thanks.
.real() for real part .imag() for imaginary part
For eg.
(3+i*4).real()=3
(3+i*4).imag()=4
real_part(z) and imag_part(z) also work.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2012-02-19 00:39:49 +0100
Seen: 14,603 times
Last updated: Feb 19 '12
check if the result is a real number
How does sage deal with choosing branches? Examples?
exponential equation real solution
Differentiating Complex Conjugated Functions
Additional conditions for expression
Complex forms and differentials
solve gives 1, 2, or 3 answers depending if one value in my equation is a real, rational, or integer