This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

definition of complex norm


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]