Ask Your Question
1

Complex number norm

asked 2018-01-14 19:06:29 +0100

paradox gravatar image

I'm new to sage so sorry if this is a stupid question.

When I try to compute the norm of a complex number Sage doesn't evaluate it:

abs(sqrt(3) + I)

gives the exact same thing ( instead of sqrt(10) ):

abs(sqrt(3) + I)

What am I doing wrong

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-01-14 21:11:04 +0100

tmonteil gravatar image

You can further simplify as follows:

sage: abs(sqrt(3) + I).full_simplify()
2

Or use the norm function:

sage: sqrt(norm(sqrt(3) + I))
2
edit flag offensive delete link more

Comments

Thanks for your help!!!

paradox gravatar imageparadox ( 2018-01-29 19:14:51 +0100 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-01-14 19:06:29 +0100

Seen: 1,198 times

Last updated: Jan 14 '18