Re: [Algorithms] (no subject)
Brought to you by:
vexxed72
From: Dave E. <eb...@ma...> - 2000-09-29 00:43:55
|
From: "Matthew Davies" <MD...@ac...> > I have assembly code versions of sine, cosine and tangent functions but now > I need arcsine, arccosine and arctangent functions, some of which are needed > in my quaternion code. Can anyone provide references to how these can be > implemented on the Pentium processor using the FPU? http://www.magic-software.com/MgcNumerics.html , files MgcFastFunction.{h,cpp} The code includes polynomial approximations for sin, cos, tan, atan, a couple of other approximations for atan, and approximations for asin and acos that involve polynomials multiplied by sqrt(1-x) for 0 <= x <= 1. This code alone ran 2.5 times faster than using calls to asin/acos, but it should be easy enough for you to swap out sqrt for your own Pentium-specific fast square root calculator. -- Dave Eberly eb...@ma... http://www.magic-software.com |