diff options
Diffstat (limited to 'newlib/libm/common/s_lrint.c')
-rw-r--r-- | newlib/libm/common/s_lrint.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/newlib/libm/common/s_lrint.c b/newlib/libm/common/s_lrint.c index 7d3b561b1..5c15dd5e7 100644 --- a/newlib/libm/common/s_lrint.c +++ b/newlib/libm/common/s_lrint.c @@ -10,6 +10,44 @@ * is preserved. * ==================================================== */ +/* +FUNCTION +<<lrint>>, <<lrintf>>, <<llrint>>, <<llrintf>>--round to integer +INDEX + lrint +INDEX + lrintf +INDEX + llrint +INDEX + llrintf + +ANSI_SYNOPSIS + #include <math.h> + long int lrint(double <[x]>); + long int lrintf(float <[x]>); + long long int llrint(double <[x]>); + long long int llrintf(float <[x]>); + +DESCRIPTION +The <<lrint>> and <<llrint>> functions round their argument to the nearest +integer value, using the current rounding direction. If the rounded value is +outside the range of the return type, the numeric result is unspecified. A +range error may occur if the magnitude of <[x]> is too large. +The "inexact" floating-point exception is raised in implementations that +support it when the result differs in value from the argument (i.e., when +a fraction actually has been truncated). + +RETURNS +<[x]> rounded to an integral value, using the current rounding direction. + +SEEALSO +<<lround>> + +PORTABILITY +ANSI C, POSIX + +*/ /* * lrint(x) |