aboutsummaryrefslogtreecommitdiff
path: root/math/exp2.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2018-07-03 18:54:51 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2018-07-04 15:45:21 +0100
commitbc4b90122bd3e281f8086a83ef0616357c1f5d33 (patch)
tree99dae525965540686243ee06733daf57b93ee46e /math/exp2.c
parent2105bad5901834fa5ac38c16d8b6ce70a887caf4 (diff)
downloadarm-optimized-routines-bc4b90122bd3e281f8086a83ef0616357c1f5d33.tar.gz
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.
Diffstat (limited to 'math/exp2.c')
-rw-r--r--math/exp2.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/math/exp2.c b/math/exp2.c
index a64a26c..e6c5c20 100644
--- a/math/exp2.c
+++ b/math/exp2.c
@@ -31,10 +31,13 @@
#define C5 __exp_data.exp2_poly[4]
#define C6 __exp_data.exp2_poly[5]
-/* 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)
{