More detailed documentation comments
Rewrote some documentation text and fixed a GNU style issue based on
feedback from Joseph Myers on libc-alpha mailing list.
diff --git a/math/pow.c b/math/pow.c
index ec9bc37..805d2ce 100644
--- a/math/pow.c
+++ b/math/pow.c
@@ -105,8 +105,8 @@
#endif
/* p = log1p(r) - r - A[0]*r*r. */
#if POW_LOG_POLY_ORDER == 8
- p = ar3
- * (A[1] + r * A[2] + ar2 * (A[3] + r * A[4] + ar2 * (A[5] + r * A[6])));
+ p = (ar3
+ * (A[1] + r * A[2] + ar2 * (A[3] + r * A[4] + ar2 * (A[5] + r * A[6]))));
#endif
lo = lo1 + lo2 + lo3 + lo4 + p;
y = hi + lo;
@@ -128,10 +128,13 @@
#define C5 __exp_data.poly[8 - EXP_POLY_ORDER]
#define C6 __exp_data.poly[9 - EXP_POLY_ORDER]
-/* Handle inputs that may overflow or underflow when computing the result
- that is scale*(1+tmp), the exponent bits of scale might have overflown
- into the sign bit so that needs correction before sbits is used as a
- double, ki is only used to determine the sign of the exponent. */
+/* Handle cases that may overflow or underflow when computing the result that
+ is scale*(1+TMP) without intermediate rounding. The bit representation of
+ scale is in SBITS, however it has a computed exponent that may have
+ overflown into the sign bit so that needs to be adjusted before using it as
+ a double. (int32_t)KI is the k used in the argument reduction and exponent
+ adjustment of scale, positive k here means the result may overflow and
+ negative k means the result may underflow. */
static inline double
specialcase (double_t tmp, uint64_t sbits, uint64_t ki)
{