Average Error: 0.5 → 0.5
Time: 9.3m
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)\]
\[\left(\left(x1 + \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(x1 \cdot x1\right) \cdot 3}{1 + x1 \cdot x1} \cdot \left(\left(x1 \cdot x1\right) \cdot 3\right) + \frac{3}{1 + x1 \cdot x1} \cdot \left(\left(x1 \cdot x1\right) \cdot 3 - \left(x1 + \left(x2 + x2\right)\right)\right)\right)\right) + \left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(x1 \cdot x1\right) \cdot 3}{\frac{1 + x1 \cdot x1}{4}} - 6\right) \cdot x1\right) \cdot x1 + \frac{\left(\left(\left(x2 + x2\right) - x1\right) + \left(x1 \cdot x1\right) \cdot 3\right) \cdot \left(x1 + x1\right)}{1 + x1 \cdot x1} \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(x1 \cdot x1\right) \cdot 3}{1 + x1 \cdot x1} - 3\right)\right)\right) + \left(x1 + {x1}^{3}\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. Applied simplify0.5

    \[\leadsto \color{blue}{\left(\left(x1 + \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(x1 \cdot x1\right) \cdot 3}{1 + x1 \cdot x1} \cdot \left(\left(x1 \cdot x1\right) \cdot 3\right) + \frac{3}{1 + x1 \cdot x1} \cdot \left(\left(x1 \cdot x1\right) \cdot 3 - \left(x1 + \left(x2 + x2\right)\right)\right)\right)\right) + \left(1 + x1 \cdot x1\right) \cdot \left(\left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(x1 \cdot x1\right) \cdot 3}{\frac{1 + x1 \cdot x1}{4}} - 6\right) \cdot \left(x1 \cdot x1\right) + \frac{\left(\left(\left(x2 + x2\right) - x1\right) + \left(x1 \cdot x1\right) \cdot 3\right) \cdot \left(x1 + x1\right)}{1 + x1 \cdot x1} \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(x1 \cdot x1\right) \cdot 3}{1 + x1 \cdot x1} - 3\right)\right)\right) + \left(x1 + {x1}^{3}\right)}\]
  3. Using strategy rm
  4. Applied associate-*r*0.5

    \[\leadsto \left(\left(x1 + \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(x1 \cdot x1\right) \cdot 3}{1 + x1 \cdot x1} \cdot \left(\left(x1 \cdot x1\right) \cdot 3\right) + \frac{3}{1 + x1 \cdot x1} \cdot \left(\left(x1 \cdot x1\right) \cdot 3 - \left(x1 + \left(x2 + x2\right)\right)\right)\right)\right) + \left(1 + x1 \cdot x1\right) \cdot \left(\color{blue}{\left(\left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(x1 \cdot x1\right) \cdot 3}{\frac{1 + x1 \cdot x1}{4}} - 6\right) \cdot x1\right) \cdot x1} + \frac{\left(\left(\left(x2 + x2\right) - x1\right) + \left(x1 \cdot x1\right) \cdot 3\right) \cdot \left(x1 + x1\right)}{1 + x1 \cdot x1} \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(x1 \cdot x1\right) \cdot 3}{1 + x1 \cdot x1} - 3\right)\right)\right) + \left(x1 + {x1}^{3}\right)\]
  5. Removed slow pow expressions.

Runtime

Time bar (total: 9.3m)Debug logProfile

herbie shell --seed '#(1062930989 876886121 3990119081 3032829768 3060892583 1929069376)' 
(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))))))