Rounds to truncated integer value.
#include <math.h> double trunc (x) double x; float truncf (x) float x; long double truncl (x) long double x;
The trunc, truncf, and truncl subroutines round the x parameter to the integer value, in floating format, nearest to but no larger in magnitude than the x parameter.
x | Specifies the value to be rounded. |
Upon successful completion, the trunc, truncf, and truncl subroutines return the truncated integer value.
If x is NaN, a NaN is returned.
If x is ±0 or ±Inf, x is returned.
math.h in AIX 5L Version 5.2 Files Reference.