Lines Matching full:sqrt
18 * Return correctly rounded sqrt.
20 * | Use the hardware sqrt if you have one |
27 * sqrt(x) = 2^k * sqrt(y)
29 * Let q = sqrt(y) truncated to i bit after binary point (q = 1),
78 * sqrt(+-0) = +-0 ... exact
79 * sqrt(inf) = inf
80 * sqrt(-ve) = NaN ... with invalid signal
81 * sqrt(NaN) = NaN ... with invalid signal for signaling NaN
106 return x*x+x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf
107 sqrt(-inf)=sNaN */
111 if(((ix0&(~sign))|ix1)==0) return x;/* sqrt(+-0) = +-0 */
113 return (x-x)/(x-x); /* sqrt(-ve) = sNaN */
135 /* generate sqrt(x) bit by bit */
138 q = q1 = s0 = s1 = 0; /* [q,q1] = sqrt(x) */
192 __weak_reference(sqrt, sqrtl);
201 Two algorithms are given here to implement sqrt(x)
203 Both supply sqrt(x) correctly rounded. The first algorithm (in
214 A. sqrt(x) by Newton Iteration
233 as integers), we obtain an 8-bit approximation of sqrt(x) as
237 y0 := k - T1[31&(k>>15)]. ... y ~ sqrt(x) to 8 bits
241 approximates sqrt(x) to almost 8-bit.
253 sqrt(x) to within 1 ulp (Unit in the Last Place):
263 y := (y+x/y) ... almost 17 sig. bits to 2*sqrt(x)
264 y := y - 0x00100006 ... almost 18 sig. bits to sqrt(x)
298 return sqrt(x):=y.
303 i := TRUE; ... sqrt(x) is inexact
312 return sqrt(x):=y.
320 B. sqrt(x) by Reciproot Iteration
327 we obtain a 7.8-bit approximation of 1/sqrt(x) as follows.
330 y0:= k - T2[63&(k>>14)]. ... y ~ 1/sqrt(x) to 7.8 bits
335 its trailing word y1 is set to zero) approximates 1/sqrt(x)
352 result by x to get an approximation z that matches sqrt(x)
354 -1ulp < sqrt(x)-z<1.0625ulp.
357 y := y*(1.5-0.5*x*y*y) ... almost 15 sig. bits to 1/sqrt(x)
358 y := y*((1.5-2^-30)+0.5*x*y*y)... about 29 sig. bits to 1/sqrt(x)
360 z := x*y ... 29 bits to sqrt(x), with z*y<1
361 z := z + 0.5*z*(1-z*y) ... about 1 ulp to sqrt(x)
366 -1 ulp < sqrt(x) - z < 1.0625 ulp
367 instead of |sqrt(x)-z|<1.03125ulp.
416 return sqrt(x):=z.