Hacker News new | ask | show | jobs
by clarry 2344 days ago
> The manpage doesn't specify that lrint() will set FE_INEXACT, but it seems weird to me that it wouldn't.

Annex F:

The lrint and llrint functions provide floating-to-integer conversion as prescribed by IEC 60559. They round according to the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and the ''invalid'' floating-point exception is raised. When they raise no other floating-point exception and the result differs from the argument, they raise the ''inexact'' floating-point exception.

1 comments

Thanks. I should file a bug about this against the Linux man-pages project.