Bug 194601

Summary: lround(3) rounding mode description is wrong
Product: Documentation Reporter: David Eckardt (david.eckardt)
Component: man-pagesAssignee: documentation_man-pages (documentation_man-pages)
Status: RESOLVED CODE_FIX    
Severity: normal CC: mtk.manpages
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description David Eckardt 2017-02-15 16:37:30 UTC
The lround(3) manpage implies it rounds all numbers away from zero. This is wrong: It rounds only halfway cases away from zero.
Comment 1 Michael Kerrisk 2017-09-24 07:55:33 UTC
Thanks for the report. I changed the opening sentence to read:

       These functions round their argument to the nearest integer value,
       rounding halfway cases away from zero, regardless of  the  current
       rounding direction (see fenv(3)).
Comment 2 David Eckardt 2017-09-26 17:00:05 UTC
I'm glad to help. Note that not only the sentence you changed is affected but also the NAME section, which incorrectly says:

"lround, lroundf, lroundl, llround, llroundf, llroundl - round to nearest integer, away from zero"

Just for the sake of completeness, I you probably corrected that, too.
Comment 3 Michael Kerrisk 2017-09-28 06:58:38 UTC
Fair enough. But, I decided to just remove the words "away from zero". The reader can of course discover the details in the text.