Re: [eigen] sse asin implementation

[ Thread Index | Date Index | More Archives ]

On Wed, 1 Apr 2009, Gael Guennebaud wrote:

let me remind that currently the packet versions of sin, cos, exp, log
and sqrt are enabled by default (regardless of the fast-math option).
The vectorized version of sin, cos and sqrt can be disabled by
defining a preprocessor token. If there are good argument I'm still ok
to change this behavior for "disabled by default" and "enabled if
either EIGEN_FAST_MATH or _FAST_MATH_ are defined".

I did not follow the previous discussion about the sse implementation of sqrt in detail, but I believe the conclusion was that we're willing to lose one or two bits of precision. That's probably no problem in the vast majority of cases. However, it's against the IEEE floating point standard, which says that sqrt should be computed to full precision. Thus, this is what I'd expect sqrt to do in the default case. Of course, you may decide otherwise, but at least stick a fat warning in the documentation.

I'm not sure how relevant this is to your question. Perhaps not very.

Incidentally, Eigen/src/Core/GenericPacketMath.h:197 reads

   template<typename Packet> inline static Packet ei_psqrt(Packet a)
   { return ei_log(a); }

It seems weird to call ei_log in the body ...


Mail converted by MHonArc 2.6.19+