Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

lroundl(3) OSS Library Calls Reference Manual
NAME
lroundl - Rounds long double number to nearest long integer value
LIBRARY
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <math.h>
long int lroundl(
long double x);
PARAMETERS
x Is the long double value to be rounded.
DESCRIPTION
The lroundl( ) function is a long double version of the lround( ) function; it takes a long double
argument.
The lroundl( ) function rounds the value of the x parameter to the nearest long integer value. If
the value of x is exactly halfway between two integers, the result is rounded away from zero,
regardless of the current rounding direction.
NOTES
This function is implemented only for the IEEE_float oating-point option. Applications using
this function cannot be compiled if the specified floating-point option is Tandem_float.
RETURN VALUES
On successful completion, the function returns the rounded long integer value.
If the value of x is NaN, the function returns 0 (zero) and sets errno to [EDOM].
If the value of x is positive or negative infinity, the function returns LONG_MAX or
LONG_MIN and sets errno to [EDOM].
If the correct value is not representable as a long integer, the function returns LONG_MAX or
LONG_MIN and sets errno to [EDOM].
ERRORS
If the following condition exists, the lroundl( ) function sets errno to the corresponding value:
[EDOM] The value of x is NaN, positive or negative infinity, or is not representable as a
long integer.
RELATED INFORMATION
Functions: ceil(3), fabs(3), fegetround(3), fesetround(3), floor(3), fmod(3), lrint(3), llrint(3),
lround(3), lroundf(3), llround(3), nearbyint(3), rint(3), round(3), trunc(3).
Files: math(4).
STANDARDS CONFORMANCE
This function conforms to the ISO/IEC 9899:1999 standard.
This function conforms to the IEEE Std 1003.1, 2004 Edition.
4148 Hewlett-Packard Company 527187-017