Lines Matching full:atan
27 // atan2(y, x) = atan( y/x ) if x >= 0 and y >= 0 (I-quadrant)
28 // = pi + atan( y/x ) if x < 0 and y >= 0 (II-quadrant)
29 // = -pi + atan( y/x ) if x < 0 and y < 0 (III-quadrant)
30 // = atan( y/x ) if x >= 0 and y < 0 (IV-quadrant)
31 // Since atan function is odd, we can use the formula:
32 // atan(-u) = -atan(u)
34 // atan2(y, x) = atan( |y|/|x| ) if x >= 0 and y >= 0 (I-quadrant)
35 // = pi - atan( |y|/|x| ) if x < 0 and y >= 0 (II-quadrant)
36 // = -pi + atan( |y|/|x| ) if x < 0 and y < 0 (III-quadrant)
37 // = -atan( |y|/|x| ) if x >= 0 and y < 0 (IV-quadrant)
39 // atan2(y, x) = sign(y) * atan( |y|/|x| ) if x >= 0
40 // = sign(y) * (pi - atan( |y|/|x| )) if x < 0
43 // Now that the argument inside atan is positive, we can use the formula:
44 // atan(1/x) = pi/2 - atan(x)
45 // to make the argument inside atan <= 1 as follow:
46 // atan2(y, x) = sign(y) * atan( |y|/|x|) if 0 <= |y| <= x
47 // = sign(y) * (pi/2 - atan( |x|/|y| ) if 0 <= x < |y|
48 // = sign(y) * (pi - atan( |y|/|x| )) if 0 <= |y| <= -x
49 // = sign(y) * (pi/2 + atan( |x|/|y| )) if 0 <= -x < |y|
53 // compute atan(u) with 0 <= u <= 1, or to be precise:
54 // atan( n / d ) where n = min(|x|, |y|) and d = max(|x|, |y|).
62 // atan( n/d ) ~ atan( idx/64 ) + (n/d - idx/64) * Q(n/d - idx/64)
64 // atan( n/d ) - atan( idx/64 ) = atan( (n/d - idx/64)/(1 + (n*idx)/(64*d)) )
65 // = atan( (n - d*(idx/64))/(d + n*(idx/64)) )
67 // atan(u) ~ P(u) = u - u^3/3 + u^5/5 - u^7/7 + u^9/9
69 // |atan(u) - P(u)| < |u|^11 / 11 < 2^-80
71 // |(atan(u) - P(u)) / P(u)| < u^10 / 11 < 2^-73.
173 // atan(n/d) - atan(k/64) = atan((n/d - k/64) / (1 + (n/d) * (k/64)))
174 // = atan((n - d * k/64)) / (d + n * k/64))
186 // p ~ atan(q)