summaryrefslogtreecommitdiff
path: root/libm/s_fmin.c
diff options
context:
space:
mode:
Diffstat (limited to 'libm/s_fmin.c')
-rw-r--r--libm/s_fmin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libm/s_fmin.c b/libm/s_fmin.c
index 674d9a56b..a549678ee 100644
--- a/libm/s_fmin.c
+++ b/libm/s_fmin.c
@@ -9,10 +9,10 @@
double fmin(double x, double y)
{
- if (__fpclassify(x) == FP_NAN)
- return x;
- if (__fpclassify(y) == FP_NAN)
+ if (isnan(x))
return y;
+ if (isnan(y))
+ return x;
return x < y ? x : y;
}