Home > database >  What is the logic behind this nvidia 's arctan2?
What is the logic behind this nvidia 's arctan2?

Time:10-19

Nvidia has some functions in Cg 3.1 Toolkit Documentation

arctan2 is error plot

which shows the described error behavior of the minmaxed polynomial and the Taylor polynomial of equal degree.


With a little more function calls, the procedure in question could also be formulated as

def atan2(y,x):
    if y<0: return -atan2(-y,x)
    if x<0: return pi-atan2(y,-x)
    if x<y: return 0.5*pi-atan2(x,y)
    return p(y/x)
  • Related