Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
truncf(3) Guardian Native C Library Calls Reference Manual
NAME
truncf - Rounds float number to truncated 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>
float truncf(
float x);
PARAMETERS
x Is the float value to be rounded.
DESCRIPTION
The truncf( ) function is a float version of the trunc( ) function; it takes a float argument and
returns a float result.
The truncf( ) function rounds the value of the x parameter to the integer value, in floating-point
format, nearest to, but no larger in magnitude than x .
NOTES
This function can be implemented only for the IEEE_float floating-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 truncated integer value.
If the value of x is NaN, the function returns NaN.
If the value of x is positive or negative zero, the function returns x.
If the value of x is positive or negative infinity, the function returns x.
ERRORS
No errors are defined.
RELATED INFORMATION
Functions: ceil(3), fabs(3), fegetround(3), fesetround(3), floor(3), fmod(3), lrint(3), llrint(3),
lround(3), llround(3), rint(3), round(3), trunc(3), truncl(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.
7−46 Hewlett-Packard Company 527192-018