Average Error: 43.5 → 43.5
Time: 34.1s
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.5

    \[\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.5

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

Reproduce

herbie shell --seed 1137770271 
(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))))

Details

Time bar (total: 33.6s)Debug log

sample960.0ms

Algorithm
halfpoints
Results

simplify10.0ms

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

prune14.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 42.1b

localize259.0ms

Local error

Found 4 expressions with local error:

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

rewrite10.0ms

Algorithm
rewrite-expression-head
Rules
+.c-commutative
frac-2neg-c
Counts
4 → 2
Calls
4 calls:
Slowest
6.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)))
0.0ms
(exp.c (complex xre xim))

series0.0ms

Counts
4 → 4
Calls
4 calls:
Slowest
0.0ms
(+.c (exp.c (complex xre xim)) (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))
0.0ms
(exp.c (complex xre xim))
0.0ms
(exp.c (neg.c (complex xre xim)))

simplify46.0ms

Counts
4 → 6
Calls
4 calls:
Slowest
14.0ms
(im (/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0)))
11.0ms
(im (/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0)))
11.0ms
(im (/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0)))
9.0ms
(im (/.c (+.c (exp.c (complex xre xim)) (exp.c (neg.c (complex xre xim)))) (complex 2 0)))

prune68.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 42.1b

end0.0ms

sample32.2s

Algorithm
halfpoints
Results