7

What methods would a modern FPU use to compute transcendental functions?

For example, Intel CPUs provide instructions such as FSIN, FCOS, FYL2X, etc. I am curious as to what algorithms would be used to actually implement these in hardware.

My naïve guess would be Taylor series perhaps combined with some lookup tables, but that's nothing more than a wild guess. Please enlighten me.

P.S. This question is more general than just Intel hardware.

NPE
  • 486,780
  • 108
  • 951
  • 1,012
  • 5
    Even when a polynomial approximation is the best approach, the Taylor polynomials are unnecessarily precise near the point of interpolation and very bad at the limits of the intended interval. For uniformly precise polynomials, people use this instead: http://lol.zoy.org/blog/2011/12/21/better-function-approximations – Pascal Cuoq Dec 14 '12 at 11:38

2 Answers2

8

One place to start could be "New Algorithms for Improved Transcendental Functions on IA-64" by Shane Story and Ping Tak Peter Tang, both from Intel. It probably doesn't have as many details as you might like, but it includes several references.

Update 08/13/2014

The original link is broken. IEEE's public abstract/citation page can be found here:

http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=762822&tag=1

jimhark
  • 4,938
  • 2
  • 27
  • 28
  • @Calmarius, it's been over a year and a half. It was easy enough to find, so I posted a link. This is for the official IEEE site and doesn't include a free copy of the article, but does include the references which are very good. – jimhark Aug 13 '14 at 17:57
0

In hardware (as well as software where hardware multiply instruction is not available) it is usually implemented in CORDIC since this requires only addition, subtraction, bit shift and table lookup

Related:

phuclv
  • 37,963
  • 15
  • 156
  • 475