Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
rintl(3) OSS Library Calls Reference Manual
NAME
rintl - Rounds long double number to nearest integral 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 double rintl(
long double x);
PARAMETERS
x Is the long double value to be rounded.
DESCRIPTION
The rintl() function is a long double version of the rint() function; it takes a long double argu-
ment and returns a long double result.
The rintl() function returns the integral value (as a long double) nearest the value of the x
parameter in the direction of the current rounding mode.
If the current rounding mode rounds in the direction of negative infinity, the rintl( ) function is
identical to the floorl( ) function. If the current rounding mode rounds in the direction of positive
infinity, the rintl( ) function is identical to the ceill( ) function.
NOTES
The rintl() function can be called only by native processes.
This function supports both IEEE Std 754-1985 floating-point and Tandem floating-point values.
IEEE values can include NaN and infinity, and the sign of 0.0 (zero) can be either positive or
negative. Refer to the fp_class(3) reference page for a description of IEEE value classes.
Guardian functions are available to convert between floating-point formats. Refer to the Guar-
dian Programmer’s Guide for a discussion of floating-point conversions.
Remember the following rules when using any special floating-point mode:
• Do not assume that functions such as printf( ) or tanhl( ) behave correctly if you call
them after setting a nondefault operating mode (such as rounding toward zero). Unless a
function is documented as tolerating such modes, you should restore the default operat-
ing mode before calling the function.
• The exception bits of the floating-point status register stay set until they are explicitly
cleared.
RETURN VALUES
On successful completion, the rintl( ) function returns the integral value (as a long double)
nearest the value of the x parameter in the direction of the current rounding mode.
For IEEE floating-point values, when the value of x is positive or negative infinity, the rintl()
function returns the value of x. If the value of x is NaN, the function returns NaN.
ERRORS
5−200 Hewlett-Packard Company 527187-017