Penguin
Blame: nearbyintf(3)
EditPageHistoryDiffInfoLikePages
Annotated edit history of nearbyintf(3) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 RINT
2 !!!RINT
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 nearbyint, nearbyintf, nearbyintl, rint, rintf, rintl - round to nearest integer
16 !!SYNOPSIS
17
18
19 __#include
20 __ ''x''__);
21 float nearbyintf(float__ ''x''__);
22 long double nearbyintl(long double__ ''x''__);
23 double rint(double__ ''x''__);
24 float rintf(float__ ''x''__);
25 long double rintl(long double__ ''x''__);
26 __
27 !!DESCRIPTION
28
29
30 The __nearbyint__ functions round their argument to an
31 integer value in floating point format, using the current
32 rounding direction and without raising the ''inexact''
33 exception.
34
35
36 The __rint__ functions do the same, but will raise the
37 ''inexact'' exception when the result differs in value
38 from the argument.
39 !!RETURN VALUE
40
41
42 The rounded integer value. If ''x'' is integral or
43 infinite, ''x'' itself is returned.
44 !!ERRORS
45
46
47 No errors other than EDOM and ERANGE can occur. If ''x''
48 is NaN, then NaN is returned and ''errno'' may be set to
49 EDOM.
50 !!NOTES
51
52
53 The SUSv2 and Austin draft contain text about overflow
54 (which might set ''errno'' to ERANGE, or raise an
55 exception). In practice, the result cannot overflow on any
56 current machine, so this error-handling stuff is just
57 nonsense. (More precisely, overflow can happen only when the
58 maximum value of the exponent is smaller than the number of
59 mantissa bits. For the IEEE-754 standard 32-bit and 64-bit
60 floating point numbers the maximum value of the exponent is
61 128 (resp. 1024), and the number of mantissa bits is 24
62 (resp. 53).)
63 !!CONFORMING TO
64
65
66 The __rint()__ function conforms to BSD 4.3. The other
67 functions are from C99.
68 !!SEE ALSO
69
70
71 ceil(3), floor(3), lrint(3),
72 nearbyint(3), round(3),
73 trunc(3)
74 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.