diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2018-06-29 11:06:13 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2018-06-29 13:25:58 +0100 |
commit | 58ce45c060855f525a26760a2aff22d30bbce7e9 (patch) | |
tree | 2e96ba9f96e517f52bbba1cc6cd48cbe5228928a /math/exp.c | |
parent | 5e8389113b47a48622d1de8beb9a4adc2b332694 (diff) | |
download | arm-optimized-routines-58ce45c060855f525a26760a2aff22d30bbce7e9.tar.gz |
Add documentation comments to internal functions
Explain the semantics of internal functions.
Diffstat (limited to 'math/exp.c')
-rw-r--r-- | math/exp.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -33,6 +33,10 @@ #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. */ static inline double specialcase (double_t tmp, uint64_t sbits, uint64_t ki) { @@ -71,12 +75,15 @@ specialcase (double_t tmp, uint64_t sbits, uint64_t ki) return check_uflow (y); } +/* Top 12 bits of a double (sign and exponent bits). */ static inline uint32_t top12 (double x) { return asuint64 (x) >> 52; } +/* Computes exp(x+xtail) where |xtail| < 2^-8/N and |xtail| <= |x|. + If hastail is 0 then xtail is assumed to be 0 too. */ static inline double exp_inline (double x, double xtail, int hastail) { |