Cygwin: math: Properly propagate input NANs in a few functions

While the C99 standard doesn't explicitly require this, the standard
says it is recommended (F.9.13).

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö
2019-07-25 00:13:13 +03:00
committed by Corinna Vinschen
parent 8dee6fe6a5
commit f7f296b46f
6 changed files with 20 additions and 8 deletions

View File

@@ -216,7 +216,7 @@ long double __lgammal_r(long double x, int* sgngaml)
*sgngaml = 1;
#ifdef NANS
if (isnanl(x))
return(NANL);
return x;
#endif
#ifdef INFINITIES
if (!isfinitel(x))