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

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

 



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)

Signed-off-by: Matt Turner <mattst88@xxxxxxxxx>
---
 man3/rint.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man3/rint.3 b/man3/rint.3
index d1bd302..06724e3 100644
--- a/man3/rint.3
+++ b/man3/rint.3
@@ -92,7 +92,7 @@ and
 functions round their argument to an integer value in floating-point
 format, using the current rounding direction (see
 .BR fesetround (3))
-and without raising the
+and round halfway cases to the nearest even integer, without raising the
 .I inexact
 exception.
 .LP
-- 
2.0.5

--
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