Why isn't there a round()-type function that returns an int?
Because the l*
-functions cover the i*
functions' functionallity.
So the follow-up question is:
Why do we have l*
functions as we also have ll*
functions?
The answer is that C99 added the new long long
data type, accompanied by the related new library functions.
For rounding integers C90 already provided the
lrint*()
lround*()
functions which needed to stay around for compatiblitiy reasons.
With the new C99 data type long long
the new functions
llrint*()
llround*()
were introduced.