December 2005
Beginner to intermediate
618 pages
20h 19m
English
llround
Rounds a floating-point number to a long long integer
#include <math.h> long longllround( doublex); long longllroundf( floatx); long longllroundl( long doublex);
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.
See the example for lround() in this
chapter.
Read now
Unlock full access