13 #if defined(LIBM_SCCS) && !defined(lint) 14 static const char rcsid[] =
15 "$NetBSD: e_sqrt.c,v 1.8 1995/05/10 20:46:17 jtc Exp $";
92 static const double one = 1.0,
tiny = 1.0e-300;
107 int32_t sign = (int) 0x80000000;
114 if ((ix0 & 0x7ff00000) == 0x7ff00000) {
120 if (((ix0 & (~sign)) | ix1) == 0)
123 return (x - x) / (x -
x);
133 for (i = 0; (ix0 & 0x00100000) == 0; i++)
136 ix0 |= (ix1 >> (32 -
i));
140 ix0 = (ix0 & 0x000fffff) | 0x00100000;
142 ix0 += ix0 + ((ix1 & sign) >> 31);
148 ix0 += ix0 + ((ix1 & sign) >> 31);
150 q = q1 = s0 = s1 = 0;
160 ix0 += ix0 + ((ix1 & sign) >> 31);
169 if ((t < ix0) || ((t == ix0) && (t1 <= ix1))) {
171 if (((t1 & sign) == sign) && (s1 & sign) == 0)
179 ix0 += ix0 + ((ix1 & sign) >> 31);
185 if ((ix0 | ix1) != 0) {
192 }
else if (z >
one) {
200 ix0 = (q >> 1) + 0x3fe00000;
GLdouble GLdouble GLdouble r
GLdouble GLdouble GLdouble GLdouble q
GLint GLint GLint GLint GLint x
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
#define EXTRACT_WORDS(ix0, ix1, d)
#define INSERT_WORDS(d, ix0, ix1)
double attribute_hidden __ieee754_sqrt(double x)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s0
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)