Re: [eigen] MathFunctions.h patch

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


Now you got me started on pedantry!

Indeed real numbers are no better than complex numbers; but the subset
of *nonnegative* real numbers is much better: for any nonnegative real
number, there is a unique nonnegative square root.

Benoit

2010/1/7 Mark Borgerding <mark@xxxxxxxxxxxxxx>:
> Benoit Jacob wrote:
>>
>> It is on purpose that we excluded sqrt for complex numbers:
>>  - there is no canonical choice between the 2 determinations of the square
>> root.
>
> Just a pedantic note. There are two square roots of real numbers too.
>  Conventionally, sqrt(4) returns 2, not -2.
>
> Returning the root in the right half plane (non-negative real) would seem a
> logical generalization of this convention.
>
>
>
>



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