Re: [patch] rint.3: Document that halfway cases are rounded to even.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/13/2015 02:43 AM, Matt Turner wrote:
> Per IEEE-754 rounding rules.
> 
> The round(3) page describes the behavior of rint and nearbyint in the
> halfway cases by saying:
> 
>    These functions round x to the nearest integer, but round halfway
>    cases away from zero [...], instead of to the nearest even integer
>    like rint(3)

Thanks, Matt. Applied.

Cheers,

Michael


> Signed-off-by: Matt Turner <mattst88@xxxxxxxxx>
> ---
>  man3/rint.3 | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/man3/rint.3 b/man3/rint.3
> index d1bd302..59402a7 100644
> --- a/man3/rint.3
> +++ b/man3/rint.3
> @@ -94,7 +94,9 @@ format, using the current rounding direction (see
>  .BR fesetround (3))
>  and without raising the
>  .I inexact
> -exception.
> +exception. When the current rounding direction is to nearest, these
> +functions round halfway cases to the even integer in accordance with
> +IEEE-754.
>  .LP
>  The
>  .BR rint (),
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux