Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libm/common/s_nearbyint.c')
-rw-r--r--newlib/libm/common/s_nearbyint.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/newlib/libm/common/s_nearbyint.c b/newlib/libm/common/s_nearbyint.c
index 25e629b65..e7a022072 100644
--- a/newlib/libm/common/s_nearbyint.c
+++ b/newlib/libm/common/s_nearbyint.c
@@ -8,6 +8,43 @@
* is preserved.
* ====================================================
*/
+/*
+FUNCTION
+<<nearbyint>>, <<nearbyintf>>--round to integer
+INDEX
+ nearbyint
+INDEX
+ nearbyintf
+
+ANSI_SYNOPSIS
+ #include <math.h>
+ double nearbyint(double <[x]>);
+ float nearbyintf(float <[x]>);
+
+DESCRIPTION
+The <<nearbyint>> functions round their argument to an integer value in
+floating-point format, using the current rounding direction and
+(supposedly) without raising the "inexact" floating-point exception.
+See the <<rint>> functions for the same function with the "inexact"
+floating-point exception being raised when appropriate.
+
+BUGS
+Newlib does not support the floating-point exception model, so that
+the floating-point exception control is not present and thereby what may
+be seen will be compiler and hardware dependent in this regard.
+The Newlib <<nearbyint>> functions are identical to the <<rint>>
+functions with respect to the floating-point exception behavior, and
+will cause the "inexact" exception to be raised for most targets.
+
+RETURNS
+<[x]> rounded to an integral value, using the current rounding direction.
+
+PORTABILITY
+ANSI C, POSIX
+
+SEEALSO
+<<rint>>, <<round>>
+*/
#include <math.h>
#include "fdlibm.h"