Re: [eigen] MathFunctions.h patch |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] MathFunctions.h patch
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Thu, 7 Jan 2010 16:04:46 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=rMk58XpWUczXYb0gN0bu2qmFubekOxLWflWH58GsXe8=; b=tIdwQ3zhe+VAM0RTNHKDkmmtThya+ebCiD/sLlcRmMKZORLAxPtRjaDN8/qR6ycLP0 dT5a/FyyFiNVb33fZWqrh1wHHTqM+ZOfxGp3/txxYQIyy63fNNvEItvgBRpVEQY8wmAK ky+g8+rD4nwkiLLuuj4X6sQCadz+07UWjW67o=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=tO1pUWWrZhxRPXm7Py6mVqf8tRypixBxCWR3a2xQ8/sLWIqptF1mFuf9E2n90pFT2b 7dH9vdCZuH/IdI/SkFnc89urHeESU5ymgyuNuyvurKM3IG8wvEa2SpX+guGzmlkZ0J4Y 3hIyrcXDv9aVr4/6BKIy55GT3rFUeJNWMd64Y=
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
>