Ask Your Question
1

Finding Re() and Im() for complex numbers

asked 2012-02-19 00:39:49 +0100

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
3

answered 2012-02-19 00:45:36 +0100

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-19 00:46:39 +0100 )edit
1

answered 2012-02-19 19:10:13 +0100

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-19 00:39:49 +0100

Seen: 14,577 times

Last updated: Feb 19 '12