From: Alan Cox Date: Mon, 5 Mar 2018 20:29:00 +0000 (+0000) Subject: sqrt: fix SNaN X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=91fe9ddb49719e21d7ad0ef2919ff44647356c63;p=FUZIX.git sqrt: fix SNaN --- diff --git a/Library/libs/sqrt.c b/Library/libs/sqrt.c index bf62cfc8..0d307870 100644 --- a/Library/libs/sqrt.c +++ b/Library/libs/sqrt.c @@ -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 */