LRINT(3) Linux Programmer's Manual LRINT(3) NNAAMMEE lrint, lrintf, lrintl, llrint, llrintf, llrintl - round to nearest integer SSYYNNOOPPSSIISS ##iinncclluuddee <> lloonngg iinntt llrriinntt((ddoouubbllee _x));; lloonngg iinntt llrriinnttff((ffllooaatt _x));; lloonngg iinntt llrriinnttll((lloonngg ddoouubbllee _x));; lloonngg lloonngg iinntt llllrriinntt((ddoouubbllee _x));; lloonngg lloonngg iinntt llllrriinnttff((ffllooaatt _x));; lloonngg lloonngg iinntt llllrriinnttll((lloonngg ddoouubbllee _x));; DDEESSCCRRIIPPTTIIOONN These functions round their argument to the nearest inte­ ger value, using the current rounding direction. If _x is infinite or NaN, or if the rounded value is outside the range of the return type, the numeric result is unspeci­ fied. A domain error may occur if the magnitude of _x is too large. RREETTUURRNN VVAALLUUEE The rounded integer value. EERRRROORRSS EEDDOOMM The magnitude of _x is too large and _(_m_a_t_h___e_r_r_h_a_n_­ _d_l_i_n_g _& _M_A_T_H___E_R_R_N_O_) is non-zero. CCOONNFFOORRMMIINNGG TTOO C99. SSEEEE AALLSSOO cceeiill(3), fflloooorr(3), llrroouunndd(3), nneeaarrbbyyiinntt(3), rriinntt(3), rroouunndd(3) 2001-05-31 LRINT(3)