Average Error: 44.2 → 44.2
Time: 28.3s
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\right) + \left(-xim\right) i\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 44.2

    \[\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. Initial simplification44.2

    \[\leadsto \Im(\left(\frac{\left(\left(e^{\left(\left(-xre\right) + \left(-xim\right) i\right)}\right) + \left(e^{\left(xre + xim i\right)}\right)\right)}{\left(2 + 0 i\right)}\right))\]
  3. Final simplification44.2

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

Runtime

Time bar (total: 28.3s)Debug log

start841.0ms

Algorithm
halfpoints

setup509.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 40.0b

localize176.0ms

Local error

Found 3 expressions with local error:

40.0b
(+.c (exp.c (complex (- xre) (- xim))) (exp.c (complex xre xim)))
0.0b
(exp.c (complex xre xim))
0.0b
(exp.c (complex (- xre) (- xim)))

rewrite7.0ms

Algorithm
rewrite-expression-head
Counts
3 → 1
Calls

3 calls. Slowest were:

4.0ms
(+.c (exp.c (complex (- xre) (- xim))) (exp.c (complex xre xim)))
0.0ms
(exp.c (complex xre xim))
0.0ms
(exp.c (complex (- xre) (- xim)))

series1.0ms

Counts
3 → 3
Calls

3 calls. Slowest were:

0.0ms
(+.c (exp.c (complex (- xre) (- xim))) (exp.c (complex xre xim)))
0.0ms
(exp.c (complex xre xim))
0.0ms
(exp.c (complex (- xre) (- xim)))

simplify33.0ms

Counts
3 → 4
Calls

3 calls. Slowest were:

11.0ms
(im (/.c (+.c (exp.c (complex (- xre) (- xim))) (exp.c (complex xre xim))) (complex 2 0)))
11.0ms
(im (/.c (+.c (exp.c (complex (- xre) (- xim))) (exp.c (complex xre xim))) (complex 2 0)))
10.0ms
(im (/.c (+.c (exp.c (complex (- xre) (- xim))) (exp.c (complex xre xim))) (complex 2 0)))

prune36.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 40.0b

herbie shell --seed 2018359 +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))))