7.12.9.8 The trunc functions

Synopsis

1

#include <math.h>
double trunc(double x);
float truncf(float x);
long double truncl(long double x);

Description

2

The trunc functions round their argument to the integer value, in floating format, nearest to but no larger in magnitude than the argument.

Returns

3

The trunc functions return the truncated integer value.