mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-02 04:20:28 +08:00
RISC-V: NaN should return 0 for finite[f]
This commit is contained in:
parent
67f6939275
commit
906849c4f9
@ -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"
|
||||
|
@ -41,7 +41,7 @@
|
||||
int finitef(float x)
|
||||
{
|
||||
long fclass = _fclass_f (x);
|
||||
return (fclass & FCLASS_INF) == 0;
|
||||
return (fclass & (FCLASS_INF | FCLASS_NAN)) == 0;
|
||||
}
|
||||
#else
|
||||
#include "../../common/sf_finite.c"
|
||||
|
Loading…
x
Reference in New Issue
Block a user