Average Error: 0 → 0
Time: 29.7s
Precision: 64
Internal Precision: 1088
\[\Im(\left(\left(\left(\left(\left(\left(\left(\left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) + \left(\left(\left(\left(\left(-2\right) + 0 i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right) + \left(\left(\left(5 + 0 i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right) + \left(\left(4 + 0 i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right) + \left(7 + 0 i\right)\right))\]
\[\Im(\left(\left(\left(\left(\left(\left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right) \cdot \left(\left(\left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right) + \left(\left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right) \cdot \left(\left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right) \cdot \left(\left(-2 + 0 i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right)\right)\right) + \left(\left(\left(5 + 0 i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right) + \left(\left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right) \cdot \left(4 + 0 i\right)\right)\right) + \left(7 + 0 i\right)\right))\]

Error

Derivation

  1. Initial program 0

    \[\Im(\left(\left(\left(\left(\left(\left(\left(\left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) + \left(\left(\left(\left(\left(-2\right) + 0 i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right) + \left(\left(\left(5 + 0 i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right) + \left(\left(4 + 0 i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right) + \left(7 + 0 i\right)\right))\]
  2. Final simplification0

    \[\leadsto \Im(\left(\left(\left(\left(\left(\left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right) \cdot \left(\left(\left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right) + \left(\left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right) \cdot \left(\left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right) \cdot \left(\left(-2 + 0 i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right)\right)\right) + \left(\left(\left(5 + 0 i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right) + \left(\left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right) \cdot \left(4 + 0 i\right)\right)\right) + \left(7 + 0 i\right)\right))\]

Reproduce

herbie shell --seed 1137770271 
(FPCore ()
  :name "3.9.2 imaginary part (p56)"
  (im (+.c (+.c (+.c (+.c (*.c (*.c (*.c (complex (/ (- 1) 2) (/ (sqrt 3) 2)) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (*.c (*.c (*.c (complex (- 2) 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (*.c (*.c (complex 5 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (*.c (complex 4 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (complex 7 0))))

Details

Time bar (total: 29.4s)Debug log

sample1.2s

Algorithm
halfpoints
Results

simplify955.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
954.0ms
(im (+.c (+.c (+.c (+.c (*.c (*.c (*.c (complex (/ (- 1) 2) (/ (sqrt 3) 2)) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (*.c (*.c (*.c (complex (- 2) 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (*.c (*.c (complex 5 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (*.c (complex 4 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (complex 7 0)))

prune18.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize383.0ms

Local error

Found 4 expressions with local error:

1.6b
(*.c (complex (/ (- 1) 2) (/ (sqrt 3) 2)) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))
1.6b
(+.c (+.c (*.c (*.c (*.c (complex (/ (- 1) 2) (/ (sqrt 3) 2)) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (*.c (*.c (*.c (complex (- 2) 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (*.c (*.c (complex 5 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))))
1.6b
(*.c (*.c (complex (- 2) 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))
1.0b
(*.c (*.c (complex 5 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))

rewrite26.0ms

Algorithm
rewrite-expression-head
Rules
13×complex-mul-def
*.c-commutative
associate-*l*.c
complex-add-def
+.c-commutative
associate-+l+.c
Counts
4 → 11
Calls
4 calls:
Slowest
13.0ms
(+.c (+.c (*.c (*.c (*.c (complex (/ (- 1) 2) (/ (sqrt 3) 2)) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (*.c (*.c (*.c (complex (- 2) 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (*.c (*.c (complex 5 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))))
4.0ms
(*.c (*.c (complex 5 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))
4.0ms
(*.c (*.c (complex (- 2) 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))
3.0ms
(*.c (complex (/ (- 1) 2) (/ (sqrt 3) 2)) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))

series0.0ms

Counts
4 → 4
Calls
4 calls:
Slowest
0.0ms
(+.c (+.c (*.c (*.c (*.c (complex (/ (- 1) 2) (/ (sqrt 3) 2)) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (*.c (*.c (*.c (complex (- 2) 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (*.c (*.c (complex 5 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))))
0.0ms
(*.c (complex (/ (- 1) 2) (/ (sqrt 3) 2)) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))
0.0ms
(*.c (*.c (complex (- 2) 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))
0.0ms
(*.c (*.c (complex 5 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))

simplify9.3s

Counts
15 → 15
Calls
15 calls:
Slowest
1.7s
(+ (* (- (* (- 2) (/ (- 1) 2)) (* 0 (/ (sqrt 3) 2))) (/ (sqrt 3) 2)) (* (+ (* (- 2) (/ (sqrt 3) 2)) (* 0 (/ (- 1) 2))) (/ (- 1) 2)))
1.6s
(+ (+ (- (* (- (* (- (* (/ (- 1) 2) (/ (- 1) 2)) (* (/ (sqrt 3) 2) (/ (sqrt 3) 2))) (/ (- 1) 2)) (* (+ (* (/ (- 1) 2) (/ (sqrt 3) 2)) (* (/ (sqrt 3) 2) (/ (- 1) 2))) (/ (sqrt 3) 2))) (/ (- 1) 2)) (* (+ (* (- (* (/ (- 1) 2) (/ (- 1) 2)) (* (/ (sqrt 3) 2) (/ (sqrt 3) 2))) (/ (sqrt 3) 2)) (* (+ (* (/ (- 1) 2) (/ (sqrt 3) 2)) (* (/ (sqrt 3) 2) (/ (- 1) 2))) (/ (- 1) 2))) (/ (sqrt 3) 2))) (- (* (- (* (- (* (- 2) (/ (- 1) 2)) (* 0 (/ (sqrt 3) 2))) (/ (- 1) 2)) (* (+ (* (- 2) (/ (sqrt 3) 2)) (* 0 (/ (- 1) 2))) (/ (sqrt 3) 2))) (/ (- 1) 2)) (* (+ (* (- (* (- 2) (/ (- 1) 2)) (* 0 (/ (sqrt 3) 2))) (/ (sqrt 3) 2)) (* (+ (* (- 2) (/ (sqrt 3) 2)) (* 0 (/ (- 1) 2))) (/ (- 1) 2))) (/ (sqrt 3) 2)))) (- (* (- (* 5 (/ (- 1) 2)) (* 0 (/ (sqrt 3) 2))) (/ (- 1) 2)) (* (+ (* 5 (/ (sqrt 3) 2)) (* 0 (/ (- 1) 2))) (/ (sqrt 3) 2))))
1.5s
(+ (+ (+ (* (- (* (- (* (/ (- 1) 2) (/ (- 1) 2)) (* (/ (sqrt 3) 2) (/ (sqrt 3) 2))) (/ (- 1) 2)) (* (+ (* (/ (- 1) 2) (/ (sqrt 3) 2)) (* (/ (sqrt 3) 2) (/ (- 1) 2))) (/ (sqrt 3) 2))) (/ (sqrt 3) 2)) (* (+ (* (- (* (/ (- 1) 2) (/ (- 1) 2)) (* (/ (sqrt 3) 2) (/ (sqrt 3) 2))) (/ (sqrt 3) 2)) (* (+ (* (/ (- 1) 2) (/ (sqrt 3) 2)) (* (/ (sqrt 3) 2) (/ (- 1) 2))) (/ (- 1) 2))) (/ (- 1) 2))) (+ (* (- (* (- (* (- 2) (/ (- 1) 2)) (* 0 (/ (sqrt 3) 2))) (/ (- 1) 2)) (* (+ (* (- 2) (/ (sqrt 3) 2)) (* 0 (/ (- 1) 2))) (/ (sqrt 3) 2))) (/ (sqrt 3) 2)) (* (+ (* (- (* (- 2) (/ (- 1) 2)) (* 0 (/ (sqrt 3) 2))) (/ (sqrt 3) 2)) (* (+ (* (- 2) (/ (sqrt 3) 2)) (* 0 (/ (- 1) 2))) (/ (- 1) 2))) (/ (- 1) 2)))) (+ (* (- (* 5 (/ (- 1) 2)) (* 0 (/ (sqrt 3) 2))) (/ (sqrt 3) 2)) (* (+ (* 5 (/ (sqrt 3) 2)) (* 0 (/ (- 1) 2))) (/ (- 1) 2))))
605.0ms
(- (* (- (* (- 2) (/ (- 1) 2)) (* 0 (/ (sqrt 3) 2))) (/ (- 1) 2)) (* (+ (* (- 2) (/ (sqrt 3) 2)) (* 0 (/ (- 1) 2))) (/ (sqrt 3) 2)))
576.0ms
(im (+.c (+.c (+.c (+.c (*.c (*.c (*.c (complex (/ (- 1) 2) (/ (sqrt 3) 2)) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (*.c (*.c (*.c (complex (- 2) 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (*.c (*.c (complex 5 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (*.c (complex 4 0) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (complex 7 0)))

prune291.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b

end0.0ms

sample17.2s

Algorithm
halfpoints
Results