]> sourceware.org Git - newlib-cygwin.git/blob - newlib/libm/common/s_fmax.c
* libm/common/s_fdim.c: New file.
[newlib-cygwin.git] / newlib / libm / common / s_fmax.c
1 /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
2 *
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
5 */
6
7 #include "fdlibm.h"
8
9 #ifndef _DOUBLE_IS_32BITS
10
11 #ifdef __STDC__
12 double fmax(double x, double y)
13 #else
14 double fmax(x,y)
15 double x;
16 double y;
17 #endif
18 {
19 if (__fpclassifyd(x) == FP_NAN)
20 return x;
21 if (__fpclassifyd(y) == FP_NAN)
22 return y;
23
24 return x > y ? x : y;
25 }
26
27 #endif /* _DOUBLE_IS_32BITS */
This page took 0.035023 seconds and 5 git commands to generate.