#6471: clarify differences between c.abs() and c.norm() for complex c
---------------------+------------------------------------------------------
Reporter: mvngu | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone:
Component: algebra | Keywords:
Reviewer: | Author:
Merged: |
---------------------+------------------------------------------------------
If {{{c}}} is of type {{{CC}}}, then {{{c.abs()}}} returns the absolute
value of a complex number and {{{c.norm()}}} returns the norm of a complex
number. One problem with this is that the absolute value of a complex
number is also referred to as the complex norm. This problem was noticed
in IRC:
{{{
15:32 < greg> the sage command norm() returns the modulus squared of
complex
numbers, is this the desired behavior?
15:44 < mvngu> greg: If c is a complex number (type CC), then c.norm()
returns
the complex norm of c. That is, if c = a + bi then c.norm()
returns a^2 + b^2.
15:44 < mvngu> Is that what you mean?
15:46 < greg> isn't the complex norm typicaly sqrt(a^2 + b^2)
15:50 < mvngu> greg: That's the absolute value. In that case, use c.abs().
15:53 < mvngu> And I agree that there's various names for this: modulue of
complex number, absolute value of complex number, complex
norm.
15:54 < greg> mvngu: okay thanks
15:54 < mvngu> So it clarifies for you?
15:56 < greg> yeah, I think so.
15:56 < greg> out of curiosity, where is a^2 + b^2 typically used as the
norm?
I'm checking mathworld and wikipedia and my complex analysis
books and they all use the L2 norm
15:58 < mvngu> You know Gaussian integers?
15:58 < greg> yeah
15:58 < greg> okay i see that
15:58 < greg> cool thanks
15:58 < mvngu> yeah... the norm of a Gaussian integer is defined like
that.
15:59 < greg> okay i see
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6471>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---