aboutsummaryrefslogtreecommitdiff
path: root/math/pow.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2018-06-29 09:56:54 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2018-06-29 13:25:58 +0100
commit5e8389113b47a48622d1de8beb9a4adc2b332694 (patch)
tree88e1303e741d50737c310a13e3fa49a2d2c92d37 /math/pow.c
parent4aa92161d340899eaf3cd1b599a72109ba818c22 (diff)
downloadarm-optimized-routines-5e8389113b47a48622d1de8beb9a4adc2b332694.tar.gz
Fix GNU style issues
Whitespace changes only.
Diffstat (limited to 'math/pow.c')
-rw-r--r--math/pow.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/math/pow.c b/math/pow.c
index 0d6e709..90f2976 100644
--- a/math/pow.c
+++ b/math/pow.c
@@ -99,7 +99,8 @@ log_inline (uint64_t ix, double_t *tail)
#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;
@@ -211,26 +212,26 @@ exp_inline (double x, double xtail, uint32_t sign_bias)
ki = asuint64 (kd);
kd -= Shift;
#endif
- r = x + kd*NegLn2hiN + kd*NegLn2loN;
+ r = x + kd * NegLn2hiN + kd * NegLn2loN;
/* The code assumes 2^-200 < |xtail| < 2^-8/N. */
r += xtail;
/* 2^(k/N) ~= scale * (1 + tail). */
- idx = 2*(ki % N);
+ idx = 2 * (ki % N);
top = (ki + sign_bias) << (52 - EXP_TABLE_BITS);
tail = asdouble (T[idx]);
/* This is only a valid scale when -1023*N < k < 1024*N. */
sbits = T[idx + 1] + top;
/* exp(x) = 2^(k/N) * exp(r) ~= scale + scale * (tail + exp(r) - 1). */
/* Evaluation is optimized assuming superscalar pipelined execution. */
- r2 = r*r;
+ r2 = r * r;
/* Without fma the worst case error is 0.25/N ulp larger. */
/* Worst case error is less than 0.5+1.11/N+(abs poly error * 2^53) ulp. */
#if EXP_POLY_ORDER == 4
- tmp = tail + r + r2*C2 + r*r2*(C3 + r*C4);
+ tmp = tail + r + r2 * C2 + r * r2 * (C3 + r * C4);
#elif EXP_POLY_ORDER == 5
- tmp = tail + r + r2*(C2 + r*C3) + r2*r2*(C4 + r*C5);
+ tmp = tail + r + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);
#elif EXP_POLY_ORDER == 6
- tmp = tail + r + r2*(0.5 + r*C3) + r2*r2*(C4 + r*C5 + r2*C6);
+ tmp = tail + r + r2 * (0.5 + r * C3) + r2 * r2 * (C4 + r * C5 + r2 * C6);
#endif
if (unlikely (abstop == 0))
return specialcase (tmp, sbits, ki);