Penguin
Annotated edit history of round(3) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 ROUND
2 !!!ROUND
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 ERRORS
8 NOTES
9 CONFORMING TO
10 SEE ALSO
11 ----
12 !!NAME
13
14
15 round, roundf, roundl - round to nearest integer, away from zero
16 !!SYNOPSIS
17
18
19 __#include
20 __ ''x''__);
21 float roundf(float__ ''x''__);
22 long double roundl(long double__ ''x''__);
23 __
24 !!DESCRIPTION
25
26
27 These functions round ''x'' to the nearest integer, but
28 round halfway cases away from zero (regardless of the
29 current rounding direction), instead of to the nearest even
30 integer like rint().
31 !!RETURN VALUE
32
33
34 The rounded integer value. If ''x'' is integral or
35 infinite, ''x'' itself is returned.
36 !!ERRORS
37
38
39 No errors other than EDOM and ERANGE can occur. If ''x''
40 is NaN, then NaN is returned and ''errno'' may be set to
41 EDOM.
42 !!NOTES
43
44
45 The Austin draft contains text about overflow (which might
46 set ''errno'' to ERANGE, or raise an exception). In
47 practice, the result cannot overflow on any current machine,
48 so this error-handling stuff is just nonsense. (More
49 precisely, overflow can happen only when the maximum value
50 of the exponent is smaller than the number of mantissa bits.
51 For the IEEE-754 standard 32-bit and 64-bit floating point
52 numbers the maximum value of the exponent is 128 (resp.
53 1024), and the number of mantissa bits is 24 (resp.
54 53).)
55 !!CONFORMING TO
56
57
58 C99.
59 !!SEE ALSO
60
61
62 ceil(3), floor(3), lround(3),
63 nearbyint(3), rint(3),
64 trunc(3)
65 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.