diff options
author | Kito Cheng <kito.cheng@sifive.com> | 2020-10-28 18:41:26 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2020-10-29 11:39:35 +0300 |
commit | 0020d2dd7c0eedcc19d20edeb7d66006927e202a (patch) | |
tree | 69cd1b158b9118eb596321fb8d58ce3705805bec /newlib/libm/machine/riscv/s_finite.c | |
parent | 7fa743ca9468d7725953ebdfb0d0b53ad126c14c (diff) |
RISC-V: NaN should return 0 for finite[f]
Diffstat (limited to 'newlib/libm/machine/riscv/s_finite.c')
-rw-r--r-- | newlib/libm/machine/riscv/s_finite.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libm/machine/riscv/s_finite.c b/newlib/libm/machine/riscv/s_finite.c index f5336e5dc..1f1f2244d 100644 --- a/newlib/libm/machine/riscv/s_finite.c +++ b/newlib/libm/machine/riscv/s_finite.c @@ -44,7 +44,7 @@ int finite(double x) { long fclass = _fclass_d (x); - return (fclass & FCLASS_INF) == 0; + return (fclass & (FCLASS_INF | FCLASS_NAN)) == 0; } #else #include "../../common/s_finite.c" |