source: trunk/libs/newlib/src/newlib/libm/common/sf_nearbyint.c @ 567

Last change on this file since 567 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 733 bytes
Line 
1/*
2 * ====================================================
3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
4 *
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 * ====================================================
10 */
11
12
13#include <math.h>
14#include "fdlibm.h"
15
16#ifdef __STDC__
17        float nearbyintf(float x)
18#else
19        float nearbyintf(x)
20        float x;
21#endif
22{
23  return rintf(x);
24}
25
26#ifdef _DOUBLE_IS_32BITS
27
28#ifdef __STDC__
29        double nearbyint(double x)
30#else
31        double nearbyint(x)
32        double x;
33#endif
34{
35  return (double) nearbyintf((float) x);
36}
37
38#endif /* defined(_DOUBLE_IS_32BITS) */
Note: See TracBrowser for help on using the repository browser.