Re: [eigen] MathFunctions.h patch

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


It is on purpose that we excluded sqrt for complex numbers:
 - there is no canonical choice between the 2 determinations of the square root.
 - no important use case was known to us.

Do you have a use case?

Benoit

2010/1/7 Trevor Irons <trevorirons@xxxxxxxxx>:
> Any problem adding the following patch, or something similiar, to
> MathFunctions.h to support std::complex<>.sqrt() ?
>
> 218d217
> < inline std::complex<float> ei_sqrt(std::complex<float>x)  { return
> std::sqrt(x); }
> 256d254
> < inline std::complex<double> ei_sqrt(std::complex<double>x)  { return
> std::sqrt(x); }
>
>
> -trevor
>



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