1TRUNC(3) Linux Programmer's Manual TRUNC(3)
2
3
4
6 trunc, truncf, truncl - round to integer, towards zero
7
9 #include <math.h>
10
11 double trunc(double x);
12 float truncf(float x);
13 long double truncl(long double x);
14
15 Compile with -std=c99; link with -lm.
16
18 These functions round x to the nearest integer not larger in absolute
19 value.
20
22 The rounded integer value. If x is integral, infinite or NaN, x itself
23 is returned.
24
26 None.
27
29 C99.
30
32 ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)
33
34
35
36 2001-05-31 TRUNC(3)