\[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\]
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)
double f(double x1, double x2) {
        double r8335 = x1;
        double r8336 = 2.0;
        double r8337 = r8336 * r8335;
        double r8338 = 3.0;
        double r8339 = r8338 * r8335;
        double r8340 = r8339 * r8335;
        double r8341 = x2;
        double r8342 = r8336 * r8341;
        double r8343 = r8340 + r8342;
        double r8344 = r8343 - r8335;
        double r8345 = r8335 * r8335;
        double r8346 = 1.0;
        double r8347 = r8345 + r8346;
        double r8348 = r8344 / r8347;
        double r8349 = r8337 * r8348;
        double r8350 = r8348 - r8338;
        double r8351 = r8349 * r8350;
        double r8352 = 4.0;
        double r8353 = r8352 * r8348;
        double r8354 = 6.0;
        double r8355 = r8353 - r8354;
        double r8356 = r8345 * r8355;
        double r8357 = r8351 + r8356;
        double r8358 = r8357 * r8347;
        double r8359 = r8340 * r8348;
        double r8360 = r8358 + r8359;
        double r8361 = r8345 * r8335;
        double r8362 = r8360 + r8361;
        double r8363 = r8362 + r8335;
        double r8364 = r8340 - r8342;
        double r8365 = r8364 - r8335;
        double r8366 = r8365 / r8347;
        double r8367 = r8338 * r8366;
        double r8368 = r8363 + r8367;
        double r8369 = r8335 + r8368;
        return r8369;
}

Reproduce

Please include this information when filing a bug report:

herbie shell --seed 2019305 
(FPCore (x1 x2)
  :name "Rosa's FloatVsDoubleBenchmark"
  :precision binary64
  (+ x1 (+ (+ (+ (+ (* (+ (* (* (* 2 x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (- (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)) (* (* x1 x1) (- (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6))) (+ (* x1 x1) 1)) (* (* (* 3 x1) x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))) (* (* x1 x1) x1)) x1) (* 3 (/ (- (- (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))))))

Backtrace

exact?: contract violation expected: number? given: 'h0LC
egg-parsed->expr/data/pavpan/nightlies/herbie/eggmath-testversion/src/core/eggmath.rkt650
for-loop/data/pavpan/nightlies/herbie/eggmath-testversion/src/core/eggmath.rkt706
egg-parsed->expr/data/pavpan/nightlies/herbie/eggmath-testversion/src/core/eggmath.rkt650
for-loop/data/pavpan/nightlies/herbie/eggmath-testversion/src/core/eggmath.rkt706
egg-parsed->expr/data/pavpan/nightlies/herbie/eggmath-testversion/src/core/eggmath.rkt650
for-loop/data/pavpan/nightlies/herbie/eggmath-testversion/src/core/eggmath.rkt706
egg-parsed->expr/data/pavpan/nightlies/herbie/eggmath-testversion/src/core/eggmath.rkt650
(unnamed)/data/pavpan/nightlies/herbie/eggmath-testversion/src/core/simplify.rkt498
egraph-add-exprs/data/pavpan/nightlies/herbie/eggmath-testversion/src/core/eggmath.rkt1220
egraph-run/data/pavpan/nightlies/herbie/eggmath-testversion/src/core/eggmath.rkt550
(unnamed)/data/pavpan/nightlies/herbie/eggmath-testversion/src/core/simplify.rkt380
simplify!/data/pavpan/nightlies/herbie/eggmath-testversion/src/mainloop.rkt2230
run-improve47/data/pavpan/nightlies/herbie/eggmath-testversion/src/mainloop.rkt3450
(unnamed)/opt/racket-7.2/collects/racket/private/more-scheme.rkt26128
run/opt/racket-7.2/share/pkgs/profile-lib/main.rkt392
profile-thunk16/opt/racket-7.2/share/pkgs/profile-lib/main.rkt90
(unnamed)/opt/racket-7.2/collects/racket/private/more-scheme.rkt26128