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

Error

Bits error versus x1

Bits error versus x2

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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. Initial simplification0.5

    \[\leadsto \left(x1 + x1\right) + \left(\left(\left(\frac{\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} - 3\right) \cdot \left(\left(\frac{x1 \cdot 2}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)\right)\right) \cdot \left(1 + x1 \cdot x1\right)\right) + \left(\frac{4}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)\right) - 6\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(1 + x1 \cdot x1\right)\right)\right) + \left(\left(\frac{\left(3 \cdot x1\right) \cdot x1}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)\right) + {x1}^{3}\right) + \frac{3}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 - \left(x1 + x2 \cdot 2\right)\right)\right)\right)\]
  3. Using strategy rm
  4. Applied distribute-lft-in0.5

    \[\leadsto \left(x1 + x1\right) + \left(\left(\left(\frac{\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} - 3\right) \cdot \color{blue}{\left(\left(\frac{x1 \cdot 2}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)\right)\right) \cdot 1 + \left(\frac{x1 \cdot 2}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)\right)\right) \cdot \left(x1 \cdot x1\right)\right)} + \left(\frac{4}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)\right) - 6\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(1 + x1 \cdot x1\right)\right)\right) + \left(\left(\frac{\left(3 \cdot x1\right) \cdot x1}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)\right) + {x1}^{3}\right) + \frac{3}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 - \left(x1 + x2 \cdot 2\right)\right)\right)\right)\]
  5. Applied distribute-lft-in0.5

    \[\leadsto \left(x1 + x1\right) + \left(\left(\color{blue}{\left(\left(\frac{\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} - 3\right) \cdot \left(\left(\frac{x1 \cdot 2}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)\right)\right) \cdot 1\right) + \left(\frac{\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} - 3\right) \cdot \left(\left(\frac{x1 \cdot 2}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)\right)\right) \cdot \left(x1 \cdot x1\right)\right)\right)} + \left(\frac{4}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)\right) - 6\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(1 + x1 \cdot x1\right)\right)\right) + \left(\left(\frac{\left(3 \cdot x1\right) \cdot x1}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 + \left(x2 \cdot 2 - x1\right)\right) + {x1}^{3}\right) + \frac{3}{1 + x1 \cdot x1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 - \left(x1 + x2 \cdot 2\right)\right)\right)\right)\]
  6. Applied associate-+l+0.5

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

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

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

Runtime

Time bar (total: 9.0m)Debug logProfile

herbie shell --seed 2018234 
(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))))))