Average Error: 0.5 → 0.5
Time: 2.2m
Precision: 64
Internal Precision: 128
\[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)\]
\[\left(\left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x1\right) - x2 \cdot 2}{x1 \cdot x1 + 1} + x1\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{x2 \cdot 2 + \left(x1 \cdot \left(x1 \cdot 3\right) - x1\right)}{x1 \cdot x1 + 1}\right) + \left(x1 + \left(\left(2 \cdot \left(x1 \cdot \left(\frac{x2 \cdot 2 + \left(x1 \cdot \left(x1 \cdot 3\right) - x1\right)}{x1 \cdot x1 + 1} - 3\right)\right)\right) \cdot \frac{x2 \cdot 2 + \left(x1 \cdot \left(x1 \cdot 3\right) - x1\right)}{x1 \cdot x1 + 1} + \left(x1 \cdot x1\right) \cdot \left(\frac{x2 \cdot 2 + \left(x1 \cdot \left(x1 \cdot 3\right) - x1\right)}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right)\right) \cdot \left(x1 \cdot x1 + 1\right)\]

Error

Bits error versus x1

Bits error versus x2

Derivation

  1. Initial program 0.5

    \[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)\]
  2. Simplified0.5

    \[\leadsto \color{blue}{\left(\left(x1 + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - x1\right) - x2 \cdot 2}{1 + x1 \cdot x1}\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - x1\right) + x2 \cdot 2}{1 + x1 \cdot x1}\right) + \left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - x1\right) + x2 \cdot 2}{1 + x1 \cdot x1} - 6\right) \cdot \left(x1 \cdot x1\right) + \left(2 \cdot \left(x1 \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 - x1\right) + x2 \cdot 2}{1 + x1 \cdot x1} - 3\right)\right)\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - x1\right) + x2 \cdot 2}{1 + x1 \cdot x1}\right) + x1\right)}\]
  3. Final simplification0.5

    \[\leadsto \left(\left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x1\right) - x2 \cdot 2}{x1 \cdot x1 + 1} + x1\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{x2 \cdot 2 + \left(x1 \cdot \left(x1 \cdot 3\right) - x1\right)}{x1 \cdot x1 + 1}\right) + \left(x1 + \left(\left(2 \cdot \left(x1 \cdot \left(\frac{x2 \cdot 2 + \left(x1 \cdot \left(x1 \cdot 3\right) - x1\right)}{x1 \cdot x1 + 1} - 3\right)\right)\right) \cdot \frac{x2 \cdot 2 + \left(x1 \cdot \left(x1 \cdot 3\right) - x1\right)}{x1 \cdot x1 + 1} + \left(x1 \cdot x1\right) \cdot \left(\frac{x2 \cdot 2 + \left(x1 \cdot \left(x1 \cdot 3\right) - x1\right)}{x1 \cdot x1 + 1} \cdot 4 - 6\right)\right)\right) \cdot \left(x1 \cdot x1 + 1\right)\]

Reproduce

herbie shell --seed 2019051 
(FPCore (x1 x2)
  :name "Rosa's FloatVsDoubleBenchmark"
  (+ 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))))))