Re: (same) errors in ceil.3, floor.3, rint.3, and round.3

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

 



Hello Dr. Wolfgang Armbruster,

Thanks for the precise report.
I applied the following patch.

Thanks,

Alex

---

    ceil.3, floor.3, rint.3, round.3: Fix floating-point limit values

    According to IEEE 754 - 2008 , section 3.3, table 3.2
    <https://irem.univ-reunion.fr/IMG/pdf/ieee-754-2008.pdf>
    the value of emax is described as
    emax = +127 / +1023

    <https://en.wikipedia.org/wiki/IEEE_754#Basic_and_interchange_formats>
    states the same values.

    Also, to be more precise about the number of mantissa bits,
    clarify that the implicit bit is included in the count.

    Reported-by: "Dr. Wolfgang Armbruster" <dr.w.e.armbruster@xxxxxxxxx>
    Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>

diff --git a/man3/ceil.3 b/man3/ceil.3
index a01b75c5e..1b83258c1 100644
--- a/man3/ceil.3
+++ b/man3/ceil.3
@@ -93,8 +93,10 @@ so this error-handling stuff is just nonsense.
 (More precisely, overflow can happen only when the maximum value
 of the exponent is smaller than the number of mantissa bits.
 For the IEEE-754 standard 32-bit and 64-bit floating-point numbers
-the maximum value of the exponent is 128 (respectively, 1024),
-and the number of mantissa bits is 24 (respectively, 53).)
+the maximum value of the exponent is 127 (respectively, 1023),
+and the number of mantissa bits
+including the implicit bit
+is 24 (respectively, 53).)
 .PP
 The integral value returned by these functions may be too large
 to store in an integer type
diff --git a/man3/floor.3 b/man3/floor.3
index f502be22f..d64e4a512 100644
--- a/man3/floor.3
+++ b/man3/floor.3
@@ -92,8 +92,10 @@ so this error-handling stuff is just nonsense.
 (More precisely, overflow can happen only when the maximum value
 of the exponent is smaller than the number of mantissa bits.
 For the IEEE-754 standard 32-bit and 64-bit floating-point numbers
-the maximum value of the exponent is 128 (respectively, 1024),
-and the number of mantissa bits is 24 (respectively, 53).)
+the maximum value of the exponent is 127 (respectively, 1023),
+and the number of mantissa bits
+including the implicit bit
+is 24 (respectively, 53).)
 .SH SEE ALSO
 .BR ceil (3),
 .BR lrint (3),
diff --git a/man3/rint.3 b/man3/rint.3
index 70d2205d2..a15ca0d79 100644
--- a/man3/rint.3
+++ b/man3/rint.3
@@ -128,8 +128,10 @@ so this error-handling stuff is just nonsense.
 (More precisely, overflow can happen only when the maximum value
 of the exponent is smaller than the number of mantissa bits.
 For the IEEE-754 standard 32-bit and 64-bit floating-point numbers
-the maximum value of the exponent is 128 (respectively, 1024),
-and the number of mantissa bits is 24 (respectively, 53).)
+the maximum value of the exponent is 127 (respectively, 1023),
+and the number of mantissa bits
+including the implicit bit
+is 24 (respectively, 53).)
 .PP
 If you want to store the rounded value in an integer type,
 you probably want to use one of the functions described in
diff --git a/man3/round.3 b/man3/round.3
index 5b6169823..a3968ca88 100644
--- a/man3/round.3
+++ b/man3/round.3
@@ -93,8 +93,10 @@ so this error-handling stuff is just nonsense.
 (More precisely, overflow can happen only when the maximum value
 of the exponent is smaller than the number of mantissa bits.
 For the IEEE-754 standard 32-bit and 64-bit floating-point numbers
-the maximum value of the exponent is 128 (respectively, 1024),
-and the number of mantissa bits is 24 (respectively, 53).)
+the maximum value of the exponent is 127 (respectively, 1023),
+and the number of mantissa bits
+including the implicit bit
+is 24 (respectively, 53).)
 .PP
 If you want to store the rounded value in an integer type,
 you probably want to use one of the functions described in



[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