First time here? Check out the FAQ!

Ask Your Question
1

Complex number norm

asked 7 years ago

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 7 years ago

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
Preview: (hide)
link

Comments

Thanks for your help!!!

paradox gravatar imageparadox ( 7 years ago )

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: 7 years ago

Seen: 1,373 times

Last updated: Jan 14 '18