
Boost : 
From: Luis Pedro Coelho (deepblack9_at_[hidden])
Date: 20011102 02:52:46
Em Quinta, 1 de Novembro de 2001 13:34, escreveste:
> 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 suppose you meant sqr(x) = x * x.
This number above sqr(real(z)) + sqr (imag(z)) is indeed useful, but it is
not the usual norm, it is the square of the usual norm. Call it norm_squared
or even norm2 to avoid misunderstandings.
Regards,
 Luis Pedro Coelho. Check out my game of Hearts, a card game, for KDE at: http://hearts.sourceforge.net/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk