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
152 return x*x+x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf
153 sqrt(-inf)=sNaN */
157 if(((ix0&(~sign))|ix1)==0) return x;/* sqrt(+-0) = +-0 */
159 return (x-x)/(x-x); /* sqrt(-ve) = sNaN */
181 /* generate sqrt(x) bit by bit */
184 q = q1 = s0 = s1 = 0; /* [q,q1] = sqrt(x) */
243 Two algorithms are given here to implement sqrt(x)
245 Both supply sqrt(x) correctly rounded. The first algorithm (in
256 A. sqrt(x) by Newton Iteration
275 as integers), we obtain an 8-bit approximation of sqrt(x) as
279 y0 := k - T1[31&(k>>15)]. ... y ~ sqrt(x) to 8 bits
283 approximates sqrt(x) to almost 8-bit.
295 sqrt(x) to within 1 ulp (Unit in the Last Place):
305 y := (y+x/y) ... almost 17 sig. bits to 2*sqrt(x)
306 y := y - 0x00100006 ... almost 18 sig. bits to sqrt(x)
340 return sqrt(x):=y.
345 i := TRUE; ... sqrt(x) is inexact
354 return sqrt(x):=y.
362 B. sqrt(x) by Reciproot Iteration
369 we obtain a 7.8-bit approximation of 1/sqrt(x) as follows.
372 y0:= k - T2[63&(k>>14)]. ... y ~ 1/sqrt(x) to 7.8 bits
377 its trailing word y1 is set to zero) approximates 1/sqrt(x)
394 result by x to get an approximation z that matches sqrt(x)
396 -1ulp < sqrt(x)-z<1.0625ulp.
399 y := y*(1.5-0.5*x*y*y) ... almost 15 sig. bits to 1/sqrt(x)
400 y := y*((1.5-2^-30)+0.5*x*y*y)... about 29 sig. bits to 1/sqrt(x)
402 z := x*y ... 29 bits to sqrt(x), with z*y<1
403 z := z + 0.5*z*(1-z*y) ... about 1 ulp to sqrt(x)
408 -1 ulp < sqrt(x) - z < 1.0625 ulp
409 instead of |sqrt(x)-z|<1.03125ulp.
458 return sqrt(x):=z.