Re: [eigen] Does c++ use of "norm" bother anyone else?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Yes, the word "norm" is not normalized across mathematics...

Personnally I just stay away from using the word "norm" in relation to
complex numbers, instead I say "absolute value" and "squared absolute
value". So in Eigen we do abs and abs2.

So in Eigen::Complex, one may or may not implement norm() for
compatibility with std::complex, i don't have a strong opinion, but
what we must have for sure is abs and abs2.

Benoit

2009/6/17 Mark Borgerding <mark@xxxxxxxxxxxxxx>
>
> According to matlab/octave and http://en.wikipedia.org/wiki/Norm_(mathematics)
>  norm(3+4j) =  abs(3+4j) == 5
>
> but in C++:
>  norm( complex<float>(3,4) ) == 25
>  abs( complex<float>(3,4) ) == 5
>
>
> Just thought I'd mention it while we are thinking about problems to solve with Eigen::Complex.
>
>
> -- Mark
>
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/