public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a099185
)
sqrt: fix SNaN
author
Alan Cox
<alan@linux.intel.com>
Mon, 5 Mar 2018 20:29:00 +0000
(20:29 +0000)
committer
Alan Cox
<alan@linux.intel.com>
Mon, 5 Mar 2018 20:29:00 +0000
(20:29 +0000)
Library/libs/sqrt.c
patch
|
blob
|
history
diff --git
a/Library/libs/sqrt.c
b/Library/libs/sqrt.c
index
bf62cfc
..
0d30787
100644
(file)
--- 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 */