Average Error: 0.5 → 0.3
Time: 8.8m
Precision: 64
Internal Precision: 1408
\[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((3 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 3\right) - (2 \cdot x2 + x1)_*}{(x1 \cdot x1 + 1)_*}\right) + x1)_* + (\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \left(\frac{(x1 \cdot \left(x1 \cdot 3\right) + \left(\left(x2 - x1\right) + x2\right))_*}{(x1 \cdot x1 + 1)_*}\right) + \left({x1}^{3}\right))_*\right) + (\left((x1 \cdot x1 + 1)_*\right) \cdot \left((\left(x1 \cdot x1\right) \cdot \left(\frac{(x1 \cdot \left(x1 \cdot 3\right) + \left(\left(x2 - x1\right) + x2\right))_*}{\frac{(x1 \cdot x1 + 1)_*}{4}} - 6\right) + \left(\frac{\left(x1 + x1\right) \cdot \left(-3\right)}{(x1 \cdot x1 + 1)_*} \cdot (x1 \cdot \left(x1 \cdot 3\right) + \left(\left(x2 - x1\right) + x2\right))_*\right))_*\right) + \left(\frac{(x1 \cdot x1 + 1)_* \cdot (x1 \cdot \left(x1 \cdot 3\right) + \left(\left(x2 - x1\right) + x2\right))_*}{\frac{\frac{(x1 \cdot x1 + 1)_*}{x1 + x1}}{\frac{(x1 \cdot \left(x1 \cdot 3\right) + \left(\left(x2 - x1\right) + x2\right))_*}{(x1 \cdot x1 + 1)_*}}}\right))_*\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. Using strategy rm
  3. Applied sub-neg0.5

    \[\leadsto 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 \color{blue}{\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(-3\right)\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)\]
  4. Applied distribute-rgt-in0.5

    \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot \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) + \left(-3\right) \cdot \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)\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)\]
  5. Applied associate-+l+0.5

    \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot \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) + \left(\left(-3\right) \cdot \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) + \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)\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)\]
  6. Applied simplify0.5

    \[\leadsto x1 + \left(\left(\left(\left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot \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) + \color{blue}{(\left(x1 \cdot x1\right) \cdot \left(\frac{(3 \cdot \left(x1 \cdot x1\right) + \left(\left(x2 + x2\right) - x1\right))_*}{\frac{(x1 \cdot x1 + 1)_*}{4}} - 6\right) + \left(\left(\left(-3\right) \cdot \left(x1 + x1\right)\right) \cdot \frac{(3 \cdot \left(x1 \cdot x1\right) + \left(\left(x2 + x2\right) - x1\right))_*}{(x1 \cdot x1 + 1)_*}\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)\]
  7. Removed slow pow expressions.
  8. Applied simplify0.3

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

Runtime

Time bar (total: 8.8m)Debug log

herbie shell --seed '#(1889797285 268396849 4100589100 2067516092 3019009300 3748763710)' +o rules:numerics
(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))))))