29 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Groff
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Groff
		
	
	
	
	
	
| .TH NEARBYINT 3  "December 18, 2009"
 | |
| .UC 4
 | |
| .SH NAME
 | |
| nearbyint, ceil, floor, trunc \- floating point rounding
 | |
| .SH SYNOPSIS
 | |
| .nf
 | |
| .ft B
 | |
| #include <math.h>
 | |
| 
 | |
| double ceil(double \fIx\fP);
 | |
| double floor(double \fIx\fP);
 | |
| double nearbyint(double \fIx\fP);
 | |
| double trunc(double \fIx\fP);
 | |
| .fi
 | |
| .SH DESCRIPTION
 | |
| These functions round the specified floating point number to a nearby integer.
 | |
| For nearbyint, the rounding mode is determined by the value set using the
 | |
| fesetround function. The other functions are not influenced by the rounding 
 | |
| mode. The ceil function rounds upwards, selecting the smallest integer that is
 | |
| larger than or equal to \fIx\fP. The floor function rounds downwards, selecting
 | |
| the largest integer that is smaller than or equal to \fIx\fP. The trunc function
 | |
| rounds towards zero, selecting the largest integer with the largest absolute 
 | |
| value of which the absolute value is smaller than or equal to the absolute 
 | |
| value of \fIx\fP.
 | |
| .SH "RETURN VALUE"
 | |
| The functions return an integer close to \fIx\fP.
 | |
| .SH "SEE ALSO"
 | |
| fesetround(3)
 | 
