llround


llround

Rounds a floating-point number to a long long integer

 #include <math.h> long long llround ( double x  ); long long llroundf ( float x  ); long long llroundl ( long double x  ); 

The llround( ) functions are like lround( ), except that they return an integer of type long long. llround( ) rounds a floating-point number to the nearest integer value. A value halfway between two integers is rounded away from zero. If the result is outside the range of long long, a range error may occur (this is implementation-dependent), and the return value is unspecified.

Example

See the example for lround( ) in this chapter.

See Also

rint( ), lrint( ), llrint( ), round( ), lround( ), nearbyint( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net