Ask Your Question
0

Finding Re() and Im() for complex numbers

asked 2012-02-18 17:39:49 -0500

SirFibonacci gravatar image

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.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2012-02-18 17:45:36 -0500

Shashank gravatar image

.real() for real part .imag() for imaginary part

For eg.

(3+i*4).real()=3

(3+i*4).imag()=4
edit flag offensive delete link more

Comments

Derp. Thanks so much.

SirFibonacci gravatar imageSirFibonacci ( 2012-02-18 17:46:39 -0500 )edit
0

answered 2012-02-19 12:10:13 -0500

calc314 gravatar image

real_part(z) and imag_part(z) also work.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-02-18 17:39:49 -0500

Seen: 4,121 times

Last updated: Feb 19 '12