[eigen] sse asin implementation

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

This file has the patch for sse implementation of asin. I have written
it along the lines of the cephes library. I have dropped one branch
which cephes takes that for x<1e-4 asin(x) is the same as x. Also I
don't know how to handle out of range inputs, so I dropped the error
checking. Perhaps, the user should be more careful before calling this
function. I dunno if it will return NaN for out of range inputs. I
wrote this in the MathFunctions.h file using as much of eigen's
abstraction so someone porting it to Altivec won't curse me too much.

Also I noted that Gael while committing my input had to write a fair
amount of top level code since I was writing pure intrinsic functions.
So I cut some slack here and decided to write it as close to eigen's
final implementation as I could. Unfortunately, it means that since I
am not sure of what else do I need to patch, I couldn't test it. :(
But it is a very simple one, so perhaps no errors made it through. :)

On a related note, perhaps we should have an ei_psel function since it
is going to be used a lot (in transcendental functions atleast) so
would help with porting to altivec.

Rohit Garg


Senior Undergraduate
Department of Physics
Indian Institute of Technology

Attachment: asin_patch
Description: Binary data

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