diff --git a/winsup/cygwin/math/sqrt.def.h b/winsup/cygwin/math/sqrt.def.h index cf8b5cbe6..3d1a00908 100644 --- a/winsup/cygwin/math/sqrt.def.h +++ b/winsup/cygwin/math/sqrt.def.h @@ -73,8 +73,11 @@ __FLT_ABI (sqrt) (__FLT_TYPE x) if (x_class == FP_ZERO) return __FLT_CST (-0.0); + if (x_class == FP_NAN) + return x; + errno = EDOM; - return x; + return -__FLT_NAN; } else if (x_class == FP_ZERO) return __FLT_CST (0.0); diff --git a/winsup/cygwin/release/3.2.0 b/winsup/cygwin/release/3.2.0 index 11de87dbc..22f78e7a7 100644 --- a/winsup/cygwin/release/3.2.0 +++ b/winsup/cygwin/release/3.2.0 @@ -37,5 +37,8 @@ Bug Fixes - Fix assertion failure on an invalid path under /proc//fd/. Addresses: https://cygwin.com/pipermail/cygwin/2020-September/246160.html -- Fix crash on stat(2)'ing /dev/ptmx on 32 bit +- Fix crash on stat(2)'ing /dev/ptmx on 32 bit. Addresses: https://cygwin.com/pipermail/cygwin/2020-September/246218.html + +- Fix return value of sqrtl on negative infinity. + Addresses: https://cygwin.com/pipermail/cygwin/2020-October/246606.html