fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libm / common / s_fmin.c
blobf9eb51cdd50bcc9441c7724e58ae59f9a204d045
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 #ifndef _DOUBLE_IS_32BITS
11 #ifdef __STDC__
12 double fmin(double x, double y)
13 #else
14 double fmin(x,y)
15 double x;
16 double y;
17 #endif
19 if (__fpclassifyd(x) == FP_NAN)
20 return x;
21 if (__fpclassifyd(y) == FP_NAN)
22 return y;
24 return x < y ? x : y;
27 #endif /* _DOUBLE_IS_32BITS */