Standards / Extensions | C or C++ | Dependencies |
---|---|---|
C99 |
both | z/OS V1R5 |
#define _ISOC99_SOURCE
#include <math.h>
double trunc(double x);
float truncf(float x);
long double Truncl(long double x);
#define _TR1_C99
#include <math.h>
float trunc(float x);
long double trunc(long double x);
Function | Hex | IEEE |
---|---|---|
trunc | X | X |
truncf | X | X |
truncl | X | X |
The trunc functions return the truncated integer value of x.