\[\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y\]
\left(x \cdot x + \left(x \cdot 2\right) \cdot y\right) + y \cdot y
double code(double x, double y) {
	return ((double) (((double) (((double) (x * x)) + ((double) (((double) (x * 2.0)) * y)))) + ((double) (y * y))));
}

Reproduce

Please include this information when filing a bug report:

herbie shell --seed 2020165 
(FPCore (x y)
  :name "Examples.Basics.ProofTests:f4 from sbv-4.4"
  :precision binary64

  :herbie-target
  (+ (* x x) (+ (* y y) (* (* x y) 2.0)))

  (+ (+ (* x x) (* (* x 2.0) y)) (* y y)))

Backtrace

ival-hi: contract violation expected: ival? given: #<procedure:interval>LC
for-loop/data/pavpan/nightlies/herbie/ival-find-range/src/sampling.rkt3711
hyperrect-weight/data/pavpan/nightlies/herbie/ival-find-range/src/sampling.rkt360
total-weight/data/pavpan/nightlies/herbie/ival-find-range/src/sampling.rkt1132
log-space-improvement/data/pavpan/nightlies/herbie/ival-find-range/src/sampling.rkt1100
(unnamed)/opt/racket-7.5/collects/racket/contract/private/arrow-higher-order.rkt37533
get-hyperrects/data/pavpan/nightlies/herbie/ival-find-range/src/sampling.rkt1230
make-sampler/data/pavpan/nightlies/herbie/ival-find-range/src/sampling.rkt1470
prepare-points-intervals/data/pavpan/nightlies/herbie/ival-find-range/src/points.rkt900
run-improve47/data/pavpan/nightlies/herbie/ival-find-range/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 2020165 
(FPCore (x y)
  :name "Examples.Basics.ProofTests:f4 from sbv-4.4"
  :precision binary64

  :herbie-target
  (+ (* x x) (+ (* y y) (* (* x y) 2.0)))

  (+ (+ (* x x) (* (* x 2.0) y)) (* y y)))