]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
math/math.h (HUGE_VAL): Improve commentary.
authorZack Weinberg <zackw@panix.com>
Fri, 1 Sep 2017 15:19:47 +0000 (11:19 -0400)
committerZack Weinberg <zackw@panix.com>
Fri, 1 Sep 2017 15:19:47 +0000 (11:19 -0400)
ChangeLog
math/math.h

index 4f8a12ca7c2abd80f39cd4152f9887967df1aefb..32b304b8acbeac3d845f1d0f1bf1dce81c085e74 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-09-01  Zack Weinberg  <zackw@panix.com>
+
+       * math/math.h (HUGE_VAL): Improve commentary.
+
 2017-09-01  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
            Andreas Schwab  <schwab@suse.de>
 
index bbc1ab9bfab12c5369b18d54c292f14f05981be0..547b36d10ed9548422fdf2f425acb9b70a2d46f0 100644 (file)
@@ -37,11 +37,16 @@ __BEGIN_DECLS
 /* Gather machine dependent type support.  */
 #include <bits/floatn.h>
 
-/* Value returned on overflow.  On all IEEE754 machines, this is
-   +Infinity.  */
+/* Value returned on overflow.  With IEEE 754 floating point, this is
+   +Infinity, otherwise the largest representable positive value.  */
 #if __GNUC_PREREQ (3, 3)
 # define HUGE_VAL (__builtin_huge_val ())
 #else
+/* This may provoke compiler warnings, and may not be rounded to
+   +Infinity in all IEEE 754 rounding modes, but is the best that can
+   be done in ISO C while remaining a constant expression.  10,000 is
+   greater than the maximum (decimal) exponent for all supported
+   floating-point formats and widths.  */
 # define HUGE_VAL 1e10000
 #endif
 #ifdef __USE_ISOC99