This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
definition of complex norm
- To: boost at yahoogroups dot com
- Subject: definition of complex norm
- From: nbecker at fred dot net
- Date: 01 Nov 2001 08:34:28 -0500
- cc: gcc at gcc dot gnu dot org
In the current gcc, norm of complex is defined in terms of abs. I
believe the definition should be changed to:
norm(z) = sqr(real(z)) + sqr (imag (z))
My reasons are:
1. More efficient
2. Works for complex<int> (important in DSP)
3. Possibly more accurate
I have started a discussion on gcc@gcc.gnu.org on this subject. I'm
wondering if any of you have an opinion.