Average Error: 43.3 → 43.3
Time: 28.6s
Precision: 64
Internal Precision: 1344
\[\Im(\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))\]
\[\Im(\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 43.3

    \[\Im(\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 simplification43.3

    \[\leadsto \Im(\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))\]

Runtime

Time bar (total: 28.6s)Debug logProfile

start884.0ms

Algorithm
halfpoints

setup62.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 44.5b

localize125.0ms

Local error

Found 4 expressions with local error:

44.3b
(+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim))))
0.3b
(exp.c (neg.c (complex xre xim)))
0.2b
(/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0))
0.0b
(exp.c (complex xre xim))

rewrite7.0ms

Algorithm
rewrite-expression-head
Counts
4 → 2
Calls

4 calls. Slowest were:

3.0ms
(/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0))
3.0ms
(+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim))))
0.0ms
(exp.c (neg.c (complex xre xim)))

series1.0ms

Counts
4 → 4
Calls

4 calls. Slowest were:

0.0ms
(+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim))))
0.0ms
(exp.c (neg.c (complex xre xim)))
0.0ms
(/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0))

simplify21.0ms

Counts
4 → 6
Calls

4 calls. Slowest were:

5.0ms
(im (/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0)))
5.0ms
(im (/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0)))
5.0ms
(im (/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0)))

prune48.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 44.5b

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