Groups
Groups
Sign in
Groups
Groups
sympy
Conversations
About
Send feedback
Help
Magnitude of a complex number
35 views
Skip to first unread message
Oscar Benjamin
unread,
May 19, 2015, 5:00:30 PM
5/19/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sympy
Am I misunderstanding something here (using master):
$ isympy
Couldn't locate IPython. Having IPython installed is greatly recommended.
...
>>> z = (4+3*I)/(3-4*I)
>>> z
4 + 3⋅ⅈ
───────
3 - 4⋅ⅈ
>>> abs(z)
│ 1 │
5⋅│───────│
│3 - 4⋅ⅈ│
>>> simplify(abs(z))
│ 1 │
5⋅│───────│
│3 - 4⋅ⅈ│
>>> abs(z).evalf()
1.00000000000000
>>> abs(z) ** 2
2
│ 1 │
25⋅│───────│
│3 - 4⋅ⅈ│
>>> z * z.conjugate()
(4 - 3⋅ⅈ)⋅(4 + 3⋅ⅈ)
───────────────────
(3 - 4⋅ⅈ)⋅(3 + 4⋅ⅈ)
>>> simplify(z * z.conjugate())
1
Why doesn't abs(z) simplify (or should I open an issue)?
--
Oscar
Aaron Meurer
unread,
May 20, 2015, 4:46:27 PM
5/20/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sy...@googlegroups.com
I guess simplify() just doesn't know about abs. You can open an issue.
Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
sympy+un...@googlegroups.com
.
> To post to this group, send email to
sy...@googlegroups.com
.
> Visit this group at
http://groups.google.com/group/sympy
.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/CAHVvXxS6DNZR8dPJ5AZ96V7MKtZQrvug_Pjs2%3DLejVOP6e73aw%40mail.gmail.com
.
> For more options, visit
https://groups.google.com/d/optout
.
Reply all
Reply to author
Forward
0 new messages