summaryrefslogtreecommitdiff
path: root/libm/s_fmax.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-03-18 22:32:22 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-03-18 22:32:22 +0100
commit6c4538905e65ceb203f59aaa9a61728e81c6bc0a (patch)
tree241337035488fb2b179340d79a5ec4539f5fc09a /libm/s_fmax.c
parent78e6494c2cf677d170a5c4ce0f46d152d478abc0 (diff)
libm: Add missing C99 float/ld wrappers
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libm/s_fmax.c')
-rw-r--r--libm/s_fmax.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libm/s_fmax.c b/libm/s_fmax.c
index 21dfaa981..5f29ad8e3 100644
--- a/libm/s_fmax.c
+++ b/libm/s_fmax.c
@@ -9,10 +9,10 @@
double fmax(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;
}