vm: use assert() instead of vm_assert(); remove vm_assert().
[minix.git] / man / man3 / nearbyint.3
blob6b9b4861843ebaa99aaed089e2c8af809480a605
1 .TH NEARBYINT 3  "December 18, 2009"
2 .UC 4
3 .SH NAME
4 nearbyint, ceil, floor, trunc \- floating point rounding
5 .SH SYNOPSIS
6 .nf
7 .ft B
8 #include <math.h>
10 double ceil(double \fIx\fP);
11 double floor(double \fIx\fP);
12 double nearbyint(double \fIx\fP);
13 double trunc(double \fIx\fP);
14 .fi
15 .SH DESCRIPTION
16 These functions round the specified floating point number to a nearby integer.
17 For nearbyint, the rounding mode is determined by the value set using the
18 fesetround function. The other functions are not influenced by the rounding 
19 mode. The ceil function rounds upwards, selecting the smallest integer that is
20 larger than or equal to \fIx\fP. The floor function rounds downwards, selecting
21 the largest integer that is smaller than or equal to \fIx\fP. The trunc function
22 rounds towards zero, selecting the largest integer with the largest absolute 
23 value of which the absolute value is smaller than or equal to the absolute 
24 value of \fIx\fP.
25 .SH "RETURN VALUE"
26 The functions return an integer close to \fIx\fP.
27 .SH "SEE ALSO"
28 fesetround(3)