Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libm / common / sf_fmax.c
blobac1bf46f5f7d86a3d34181582f7e5ff5d3fe2a9e
1 /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
5 */
7 #include "fdlibm.h"
9 #ifdef __STDC__
10 float fmaxf(float x, float y)
11 #else
12 float fmaxf(x,y)
13 float x;
14 float y;
15 #endif
17 if (__fpclassifyf(x) == FP_NAN)
18 return y;
19 if (__fpclassifyf(y) == FP_NAN)
20 return x;
22 return x > y ? x : y;
25 #ifdef _DOUBLE_IS_32BITS
27 #ifdef __STDC__
28 double fmax(double x, double y)
29 #else
30 double fmax(x,y)
31 double x;
32 double y;
33 #endif
35 return (double) fmaxf((float) x, (float) y);
38 #endif /* defined(_DOUBLE_IS_32BITS) */