diff options
author | Martin Storsjö <martin@martin.st> | 2019-07-25 00:13:13 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2019-08-20 19:15:16 +0300 |
commit | f7f296b46f2607814c326ea1ed9b3294eb746034 (patch) | |
tree | 0ae6b7b4d749819a261ead4e45cdb37308d5b85f /winsup/cygwin/math/erfl.c | |
parent | 8dee6fe6a5e7dd31af9c83ec2fe31d0d13dfa44f (diff) |
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>
Diffstat (limited to 'winsup/cygwin/math/erfl.c')
-rw-r--r-- | winsup/cygwin/math/erfl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/math/erfl.c b/winsup/cygwin/math/erfl.c index 3832fe9e0..bfd8d33d3 100644 --- a/winsup/cygwin/math/erfl.c +++ b/winsup/cygwin/math/erfl.c @@ -243,6 +243,9 @@ long double erfcl(long double a) if (isinf (a)) return (signbit(a) ? 2.0 : 0.0); + if (isnan (a)) + return (a); + x = fabsl (a); if (x < 1.0L) |