]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
ceil.3, floor.3, rint.3, round.3: Fix floating-point limit values
authorAlejandro Colomar <alx.manpages@gmail.com>
Wed, 27 Apr 2022 11:45:52 +0000 (13:45 +0200)
committerAlejandro Colomar <alx.manpages@gmail.com>
Wed, 27 Apr 2022 11:45:54 +0000 (13:45 +0200)
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@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
man3/ceil.3
man3/floor.3
man3/rint.3
man3/round.3

index a01b75c5e00160d1659332564be7c03252cd756e..1b83258c1288d79bf368aab67c06eaca3ac1ca56 100644 (file)
@@ -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
index f502be22f8a1be20759f6be16ead82d52b8157a0..d64e4a512fa031f8039276fc060f4a0b71b2ceb1 100644 (file)
@@ -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),
index 70d2205d28f6ec613990a8449162d7d5931e175a..a15ca0d7979313a879fc3760a5a9989d74ab61ed 100644 (file)
@@ -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
index 5b6169823e8ef0c2d81ec2581e096d918fc74d7a..a3968ca888015416259320aebfdd88d5a624deb0 100644 (file)
@@ -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