1round(3M)               Mathematical Library Functions               round(3M)
2
3
4

NAME

6       round,  roundf,  roundl  -  round to nearest integer value in floating-
7       point format
8

SYNOPSIS

10       c99 [ flag... ] file... -lm [ library... ]
11       #include <math.h>
12
13       double round(double x);
14
15
16       float roundf(float x);
17
18
19       long double roundl(long double x);
20
21

DESCRIPTION

23       These functions round their argument to the nearest  integer  value  in
24       floating-point  format,  rounding halfway cases away from 0, regardless
25       of the current rounding direction.
26

RETURN VALUES

28       Upon successful completion, these functions return the rounded  integer
29       value.
30
31
32       If x is NaN, a NaN is returned.
33
34
35       If x is ±0 or ± Inf, x is returned.
36

ATTRIBUTES

38       See attributes(5) for descriptions of the following attributes:
39
40
41
42
43       ┌─────────────────────────────┬─────────────────────────────┐
44       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
45       ├─────────────────────────────┼─────────────────────────────┤
46       │Interface Stability          │Standard                     │
47       ├─────────────────────────────┼─────────────────────────────┤
48       │MT-Level                     │MT-Safe                      │
49       └─────────────────────────────┴─────────────────────────────┘
50

SEE ALSO

52       feclearexcept(3M),   fetestexcept(3M),   math.h(3HEAD),  attributes(5),
53       standards(5)
54
55
56
57SunOS 5.11                        12 Jul 2006                        round(3M)
Impressum