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
9 * ====================================================
13 <<nearbyint>>, <<nearbyintf>>---round to integer
21 double nearbyint(double <[x]>);
22 float nearbyintf(float <[x]>);
25 The <<nearbyint>> functions round their argument to an integer value in
26 floating-point format, using the current rounding direction and
27 (supposedly) without raising the "inexact" floating-point exception.
28 See the <<rint>> functions for the same function with the "inexact"
29 floating-point exception being raised when appropriate.
32 Newlib does not support the floating-point exception model, so that
33 the floating-point exception control is not present and thereby what may
34 be seen will be compiler and hardware dependent in this regard.
35 The Newlib <<nearbyint>> functions are identical to the <<rint>>
36 functions with respect to the floating-point exception behavior, and
37 will cause the "inexact" exception to be raised for most targets.
40 <[x]> rounded to an integral value, using the current rounding direction.
52 #ifndef _DOUBLE_IS_32BITS
55 double nearbyint(double x
)
64 #endif /* _DOUBLE_IS_32BITS */