Average Error: 0.0 → 0.0
Time: 14.9s
Precision: 64
Internal Precision: 128
\[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)\]
\[0.5 \cdot (\left(e^{im}\right) \cdot \left(\sin re\right) + \left(\frac{\sin re}{e^{im}}\right))_*\]

Error

Bits error versus re

Bits error versus im

Derivation

  1. Initial program 0.0

    \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)\]
  2. Initial simplification0.0

    \[\leadsto 0.5 \cdot (\left(e^{im}\right) \cdot \left(\sin re\right) + \left(\frac{\sin re}{e^{im}}\right))_*\]
  3. Final simplification0.0

    \[\leadsto 0.5 \cdot (\left(e^{im}\right) \cdot \left(\sin re\right) + \left(\frac{\sin re}{e^{im}}\right))_*\]

Reproduce

herbie shell --seed 2018362 +o rules:numerics
(FPCore (re im)
  :name "math.sin on complex, real part"
  (* (* 0.5 (sin re)) (+ (exp (- 0 im)) (exp im))))

Details

Time bar (total: 1.7s)Debug log

start316.0ms

Algorithm
intervals

setup502.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize24.0ms

Local error

Found 1 expressions with local error:

0.0b
(/ (sin re) (exp im))

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
1 → 29
Calls

1 calls. Slowest were:

7.0ms
(/ (sin re) (exp im))

series48.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

48.0ms
(/ (sin re) (exp im))

simplify428.0ms

Counts
28 → 32
Calls

28 calls. Slowest were:

219.0ms
(- re (+ (* re im) (* 1/6 (pow re 3))))
121.0ms
(/ (* (* (sin re) (sin re)) (sin re)) (* (* (exp im) (exp im)) (exp im)))
17.0ms
(/ (* (cbrt (sin re)) (cbrt (sin re))) (* (cbrt (exp im)) (cbrt (exp im))))

prune392.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b