Average Error: 0.0 → 0.0
Time: 13.5s
Precision: 64
Internal Precision: 576
\[\Re(\left(\frac{\left(\left(e^{\left(xre + xim i\right)}\right) + \left(e^{\left(-\left(xre + xim i\right)\right)}\right)\right)}{\left(2 + 0 i\right)}\right))\]
\[\Re(\left(\frac{\left(\left(e^{\left(-\left(xre + xim i\right)\right)}\right) + \left(e^{\left(xre + xim i\right)}\right)\right)}{\left(2 + 0 i\right)}\right))\]

Error

Bits error versus xre

Bits error versus xim

Derivation

  1. Initial program 0.0

    \[\Re(\left(\frac{\left(\left(e^{\left(xre + xim i\right)}\right) + \left(e^{\left(-\left(xre + xim i\right)\right)}\right)\right)}{\left(2 + 0 i\right)}\right))\]
  2. Final simplification0.0

    \[\leadsto \Re(\left(\frac{\left(\left(e^{\left(-\left(xre + xim i\right)\right)}\right) + \left(e^{\left(xre + xim i\right)}\right)\right)}{\left(2 + 0 i\right)}\right))\]

Reproduce

herbie shell --seed 2019016 +o rules:numerics
(FPCore (xre xim)
  :name "exp with complex power real part (p55)"
  (re (/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0))))

Details

Time bar (total: 12.4s)Debug log

sample1.4s

Algorithm
halfpoints
Results

simplify25.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
24.0ms
(re (/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0)))

prune12.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize99.0ms

Local error

Found 3 expressions with local error:

16.7b
(+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim))))
0.0b
(exp.c (complex xre xim))
0.0b
(exp.c (neg.c (complex xre xim)))

rewrite34.0ms

Algorithm
rewrite-expression-head
Rules
+.c-commutative
Counts
3 → 1
Calls
3 calls:
Slowest
5.0ms
(+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim))))
1.0ms
(exp.c (neg.c (complex xre xim)))
0.0ms
(exp.c (complex xre xim))

series1.0ms

Counts
3 → 3
Calls
3 calls:
Slowest
0.0ms
(+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim))))
0.0ms
(exp.c (complex xre xim))
0.0ms
(exp.c (neg.c (complex xre xim)))

simplify29.0ms

Counts
3 → 4
Calls
3 calls:
Slowest
10.0ms
(re (/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0)))
9.0ms
(re (/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0)))
9.0ms
(re (/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0)))

prune37.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0.0b

end0.0ms

sample10.8s

Algorithm
halfpoints
Results