fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libm / common / sf_nearbyint.c
blob0073b6d65d3ea354dd4f0cb226dadac541bb3930
1 /*
2 * ====================================================
3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
5 * Developed at SunPro, a Sun Microsystems, Inc. business.
6 * Permission to use, copy, modify, and distribute this
7 * software is freely granted, provided that this notice
8 * is preserved.
9 * ====================================================
13 #include <math.h>
14 #include "fdlibm.h"
16 #ifdef __STDC__
17 float nearbyintf(float x)
18 #else
19 float nearbyintf(x)
20 float x;
21 #endif
23 return rintf(x);
26 #ifdef _DOUBLE_IS_32BITS
28 #ifdef __STDC__
29 double nearbyint(double x)
30 #else
31 double nearbyint(x)
32 double x;
33 #endif
35 return (double) nearbyintf((float) x);
38 #endif /* defined(_DOUBLE_IS_32BITS) */