1TRUNC(3)                   Linux Programmer's Manual                  TRUNC(3)
2
3
4

NAME

6       trunc, truncf, truncl - round to integer, towards zero
7

SYNOPSIS

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

DESCRIPTION

18       These  functions  round x to the nearest integer not larger in absolute
19       value.
20

RETURN VALUE

22       The rounded integer value.  If x is integral, infinite or NaN, x itself
23       is returned.
24

ERRORS

26       None.
27

CONFORMING TO

29       C99.
30

SEE ALSO

32       ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)
33
34
35
36                                  2001-05-31                          TRUNC(3)
Impressum