void DoIt( void )
{
WF_CORDIC TRIGFUNCS;
double sqr = TRIGFUNCS.Sqrt( x );
}
Just a thought I have been pondering about.
Regards,
Jumpster
Semper Fi
CORDIC: Ok, which is it?
While surfing the Internet on information that may help increase the execution speed of many of the trigomometric functions (sqrt, sin, cos etc); I discovered an algorithim used in the late 1950''s for navigational systems on airplanes.
For those of you who may want a brief background on the topic: CORDIC (COordinate Rotation DIgital Computer) algorithms were used to calculate the sin, cos functions in real-time navigational systems by performing a recursive series of add, subtract, multiply and divide (the multiply/divides are mainly bit-shift operations). The recursion is basically one cycle (for loop) for each digit of precision desired in the final result (ex: 8-digits = 8 loops).
My question is this: during the research I have performed so far, I have encountered conflicting statements regarding the PC''s use of CORDIC algorithms. One statement claims the Intel numeric-processors (80387 and above) use this system where as another says that Intel does not. Both statements claim that the Cyrix processors use a polynomial algorithm based on the Taylor series. Does anybody know for sure which process Intel uses? That question is just to ease my mind, I hate not knowing the behind the scenes stuff like that.
Also, does anybody have any "open source" code that they may contribute to someone like myself to review and learn more about the topic? One more, I am considering writing a CORDIC class that would utilize these algorithms just to do it. Would anybody be interested in using such a class?
The class would be used in a fashion similar to:
Regards,JumpsterSemper Fi
I created a thread just a few days ago (named "Trigonometric functions?"), where I asked how computers calculate sine-functions... 2/3 of the replys thought that it was the Taylor series... Antknei even gave me the speed of the functions...
//Ksero
quote: Original post by Antknei
Okay, I don''t know how they do it either, but I was skeptical of NBGH response. So looking at the Pentium Developers Manual from Intel a fcos takes 18-124 cycles, a fsin 16-126, and a sqrt 70.
I would guess that the computer uses the taylor series expansion to get sin and cos values. but just a guess.
//Ksero
Well, to answer your question in the other thread then, every reference to scientific calculators (with the exception of three from TI) use the CORDIC method for calculating trig functions. The three from TI that don''t use the CORDIC method are: CC-40, TI-74 and TI-95. They use the polynomial approximations method.
Regards,
Jumpster
Semper Fi
Regards,
Jumpster
Semper Fi
Regards,JumpsterSemper Fi
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement