\[\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.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.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.0 i\right) \cdot \left(\frac{-1}{2} + \frac{\sqrt{3}}{2} i\right)\right)\right) + \left(7 + 0.0 i\right)\right))\]

Reproduce

Please include this information when filing a bug report:

herbie shell --seed 2020079 +o rules:numerics
(FPCore ()
  :name "3.9.2 imaginary part (p56)"
  :precision binary64
  (im (+ (+ (+ (+ (* (* (* (complex (/ (- 1) 2) (/ (sqrt 3) 2)) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (* (* (* (complex (- 2) 0.0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (* (* (complex 5 0.0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (* (complex 4 0.0) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (complex 7 0.0))))

Backtrace

cdr: contract violation expected: pair? given: '()LC
loopunknown
prog-cost/data/pavpan/nightlies/herbie/simpler-alts/src/core/alt-table.rkt1330
for-loop/data/pavpan/nightlies/herbie/simpler-alts/src/core/alt-table.rkt3415
make-alt-table/data/pavpan/nightlies/herbie/simpler-alts/src/core/alt-table.rkt320
(unnamed)/opt/racket-7.5/collects/racket/contract/private/arrow-val-first.rkt48618
run-improve47/data/pavpan/nightlies/herbie/simpler-alts/src/mainloop.rkt3650
.../more-scheme.rkt:261:28unknown
run/opt/racket-7.5/share/pkgs/profile-lib/main.rkt392
profile-thunk16/opt/racket-7.5/share/pkgs/profile-lib/main.rkt90
(unnamed)/opt/racket-7.5/collects/racket/private/more-scheme.rkt26128

Reproduce

herbie shell --seed 2020079 +o rules:numerics
(FPCore ()
  :name "3.9.2 imaginary part (p56)"
  :precision binary64
  (im (+ (+ (+ (+ (* (* (* (complex (/ (- 1) 2) (/ (sqrt 3) 2)) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (* (* (* (complex (- 2) 0.0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (* (* (complex 5 0.0) (complex (/ (- 1) 2) (/ (sqrt 3) 2))) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (* (complex 4 0.0) (complex (/ (- 1) 2) (/ (sqrt 3) 2)))) (complex 7 0.0))))