Lines Matching full:atan

26 // atan(i/64) with i = 0..64, generated by Sollya with:
28 // a = round(atan(i/64), D, RN);
29 // b = round(atan(i/64) - a, D, RN);
100 // Approximate atan(x) for |x| <= 2^-7.
104 // |atan(x) - P(x)| < |x|^11/11 < 2^(-7*11) / 11 < 2^-80.
106 // |(atan(x) - P(x))/atan(x)| < |x|^10 / 10 < 2^-73.
144 // atan2(y, x) = atan( y/x ) if x >= 0 and y >= 0 (I-quadrant)
145 // = pi + atan( y/x ) if x < 0 and y >= 0 (II-quadrant)
146 // = -pi + atan( y/x ) if x < 0 and y < 0 (III-quadrant)
147 // = atan( y/x ) if x >= 0 and y < 0 (IV-quadrant)
148 // Since atan function is odd, we can use the formula:
149 // atan(-u) = -atan(u)
151 // atan2(y, x) = atan( |y|/|x| ) if x >= 0 and y >= 0 (I-quadrant)
152 // = pi - atan( |y|/|x| ) if x < 0 and y >= 0 (II-quadrant)
153 // = -pi + atan( |y|/|x| ) if x < 0 and y < 0 (III-quadrant)
154 // = -atan( |y|/|x| ) if x >= 0 and y < 0 (IV-quadrant)
156 // atan2(y, x) = sign(y) * atan( |y|/|x| ) if x >= 0
157 // = sign(y) * (pi - atan( |y|/|x| )) if x < 0
160 // Now that the argument inside atan is positive, we can use the formula:
161 // atan(1/x) = pi/2 - atan(x)
162 // to make the argument inside atan <= 1 as follow:
163 // atan2(y, x) = sign(y) * atan( |y|/|x|) if 0 <= |y| <= x
164 // = sign(y) * (pi/2 - atan( |x|/|y| ) if 0 <= x < |y|
165 // = sign(y) * (pi - atan( |y|/|x| )) if 0 <= |y| <= -x
166 // = sign(y) * (pi/2 + atan( |x|/|y| )) if 0 <= -x < |y|
170 // compute atan(u) with 0 <= u <= 1, or to be precise:
171 // atan( n / d ) where n = min(|x|, |y|) and d = max(|x|, |y|).
179 // atan( n/d ) ~ atan( idx/64 ) + (n/d - idx/64) * Q(n/d - idx/64)
181 // atan( n/d ) - atan( idx/64 ) = atan( (n/d - idx/64)/(1 + (n*idx)/(64*d)) )
182 // = atan( (n - d*(idx/64))/(d + n*(idx/64)) )
184 // atan(u) ~ P(u) = u - u^3/3 + u^5/5 - u^7/7 + u^9/9
186 // |atan(u) - P(u)| < |u|^11 / 11 < 2^-80
188 // |(atan(u) - P(u)) / P(u)| < u^10 / 11 < 2^-73.
290 // atan(n/d) - atan(k/64) = atan((n/d - k/64) / (1 + (n/d) * (k/64)))
291 // = atan((n - d * k/64)) / (d + n * k/64))
303 // p ~ atan(q)