Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

trunc, truncf, truncl - round to truncated integer value

&pagelevel(4)&pagelevel

Syntax

#include <math.h>

C11
double trunc(double x);
float truncf(float x);
long double truncl(long double x); (End)

Description

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

Return val.

Integer part of x with the sign of x.

See also

frexp(), ldexp(), modf(),  math.h.