diff --git a/library/math_sqrt.c b/library/math_sqrt.c index a31f03e7..a0b944f7 100644 --- a/library/math_sqrt.c +++ b/library/math_sqrt.c @@ -251,7 +251,7 @@ sqrt(double x) } else { - result = 0; + result = NAN; __set_errno(EDOM); }