sqrt: fix SNaN
authorAlan Cox <alan@linux.intel.com>
Mon, 5 Mar 2018 20:29:00 +0000 (20:29 +0000)
committerAlan Cox <alan@linux.intel.com>
Mon, 5 Mar 2018 20:29:00 +0000 (20:29 +0000)
Library/libs/sqrt.c

index bf62cfc..0d30787 100644 (file)
@@ -101,8 +101,7 @@ double sqrt(double x)
                        return x;  /* sqrt(+-0) = +-0 */
                if (ix0 < 0) {
                        raise(SIGFPE);
-                       return __sNAN;
-                       /* return (x-x)/(x-x); */ /* sqrt(-ve) = sNaN */
+                       return (x-x)/(x-x); /* sqrt(-ve) = sNaN */
                }
        }
        /* normalize x */