Average Error: 0.5 → 0.3
Time: 59.4s
Precision: binary64
Cost: 109184
\[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) \]
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 4\right)\\ t_1 := \left(x2 + x2\right) - x1\\ t_2 := \mathsf{fma}\left(3 \cdot x1, x1, t_1\right)\\ x1 + \mathsf{fma}\left(3, \frac{\mathsf{fma}\left(3 \cdot x1, x1, -\mathsf{fma}\left(x2, 2, x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \left(\left(\frac{x1 + x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot t_2\right) \cdot \left(\frac{t_2}{\mathsf{fma}\left(x1, x1, 1\right)} + -3\right) + \frac{t_1 \cdot t_0 + t_0 \cdot \left(\left(3 \cdot x1\right) \cdot x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right) + \left(x1 \cdot x1\right) \cdot -6, \mathsf{fma}\left(3 \cdot x1, \frac{x1 \cdot \mathsf{fma}\left(3 \cdot x1, x1, \mathsf{fma}\left(x2, 2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, {x1}^{3}\right)\right) + x1\right) \end{array} \]
(FPCore (x1 x2)
 :precision binary64
 (+
  x1
  (+
   (+
    (+
     (+
      (*
       (+
        (*
         (*
          (* 2.0 x1)
          (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
         (- (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)) 3.0))
        (*
         (* x1 x1)
         (-
          (* 4.0 (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
          6.0)))
       (+ (* x1 x1) 1.0))
      (*
       (* (* 3.0 x1) x1)
       (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))))
     (* (* x1 x1) x1))
    x1)
   (* 3.0 (/ (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))))))
(FPCore (x1 x2)
 :precision binary64
 (let* ((t_0 (* x1 (* x1 4.0)))
        (t_1 (- (+ x2 x2) x1))
        (t_2 (fma (* 3.0 x1) x1 t_1)))
   (+
    x1
    (fma
     3.0
     (/ (fma (* 3.0 x1) x1 (- (fma x2 2.0 x1))) (fma x1 x1 1.0))
     (+
      (fma
       (fma x1 x1 1.0)
       (+
        (+
         (*
          (* (/ (+ x1 x1) (fma x1 x1 1.0)) t_2)
          (+ (/ t_2 (fma x1 x1 1.0)) -3.0))
         (/ (+ (* t_1 t_0) (* t_0 (* (* 3.0 x1) x1))) (fma x1 x1 1.0)))
        (* (* x1 x1) -6.0))
       (fma
        (* 3.0 x1)
        (/ (* x1 (fma (* 3.0 x1) x1 (fma x2 2.0 (- x1)))) (fma x1 x1 1.0))
        (pow x1 3.0)))
      x1)))))
double code(double x1, double x2) {
	return x1 + (((((((((2.0 * x1) * (((((3.0 * x1) * x1) + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) * ((((((3.0 * x1) * x1) + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0)) - 3.0)) + ((x1 * x1) * ((4.0 * (((((3.0 * x1) * x1) + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - 6.0))) * ((x1 * x1) + 1.0)) + (((3.0 * x1) * x1) * (((((3.0 * x1) * x1) + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0)))) + ((x1 * x1) * x1)) + x1) + (3.0 * (((((3.0 * x1) * x1) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))));
}
double code(double x1, double x2) {
	double t_0 = x1 * (x1 * 4.0);
	double t_1 = (x2 + x2) - x1;
	double t_2 = fma((3.0 * x1), x1, t_1);
	return x1 + fma(3.0, (fma((3.0 * x1), x1, -fma(x2, 2.0, x1)) / fma(x1, x1, 1.0)), (fma(fma(x1, x1, 1.0), ((((((x1 + x1) / fma(x1, x1, 1.0)) * t_2) * ((t_2 / fma(x1, x1, 1.0)) + -3.0)) + (((t_1 * t_0) + (t_0 * ((3.0 * x1) * x1))) / fma(x1, x1, 1.0))) + ((x1 * x1) * -6.0)), fma((3.0 * x1), ((x1 * fma((3.0 * x1), x1, fma(x2, 2.0, -x1))) / fma(x1, x1, 1.0)), pow(x1, 3.0))) + x1));
}
function code(x1, x2)
	return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * Float64(Float64(Float64(Float64(Float64(3.0 * x1) * x1) + Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) * Float64(Float64(Float64(Float64(Float64(Float64(3.0 * x1) * x1) + Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0)) - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(Float64(Float64(Float64(3.0 * x1) * x1) + Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) - 6.0))) * Float64(Float64(x1 * x1) + 1.0)) + Float64(Float64(Float64(3.0 * x1) * x1) * Float64(Float64(Float64(Float64(Float64(3.0 * x1) * x1) + Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0)))) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(Float64(Float64(3.0 * x1) * x1) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0)))))
end
function code(x1, x2)
	t_0 = Float64(x1 * Float64(x1 * 4.0))
	t_1 = Float64(Float64(x2 + x2) - x1)
	t_2 = fma(Float64(3.0 * x1), x1, t_1)
	return Float64(x1 + fma(3.0, Float64(fma(Float64(3.0 * x1), x1, Float64(-fma(x2, 2.0, x1))) / fma(x1, x1, 1.0)), Float64(fma(fma(x1, x1, 1.0), Float64(Float64(Float64(Float64(Float64(Float64(x1 + x1) / fma(x1, x1, 1.0)) * t_2) * Float64(Float64(t_2 / fma(x1, x1, 1.0)) + -3.0)) + Float64(Float64(Float64(t_1 * t_0) + Float64(t_0 * Float64(Float64(3.0 * x1) * x1))) / fma(x1, x1, 1.0))) + Float64(Float64(x1 * x1) * -6.0)), fma(Float64(3.0 * x1), Float64(Float64(x1 * fma(Float64(3.0 * x1), x1, fma(x2, 2.0, Float64(-x1)))) / fma(x1, x1, 1.0)), (x1 ^ 3.0))) + x1)))
end
code[x1_, x2_] := N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision] * N[(N[(N[(N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x2 + x2), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(3.0 * x1), $MachinePrecision] * x1 + t$95$1), $MachinePrecision]}, N[(x1 + N[(3.0 * N[(N[(N[(3.0 * x1), $MachinePrecision] * x1 + (-N[(x2 * 2.0 + x1), $MachinePrecision])), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(x1 + x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(N[(t$95$2 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$1 * t$95$0), $MachinePrecision] + N[(t$95$0 * N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * x1), $MachinePrecision] * N[(N[(x1 * N[(N[(3.0 * x1), $MachinePrecision] * x1 + N[(x2 * 2.0 + (-x1)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
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)
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 4\right)\\
t_1 := \left(x2 + x2\right) - x1\\
t_2 := \mathsf{fma}\left(3 \cdot x1, x1, t_1\right)\\
x1 + \mathsf{fma}\left(3, \frac{\mathsf{fma}\left(3 \cdot x1, x1, -\mathsf{fma}\left(x2, 2, x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \left(\left(\frac{x1 + x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot t_2\right) \cdot \left(\frac{t_2}{\mathsf{fma}\left(x1, x1, 1\right)} + -3\right) + \frac{t_1 \cdot t_0 + t_0 \cdot \left(\left(3 \cdot x1\right) \cdot x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right) + \left(x1 \cdot x1\right) \cdot -6, \mathsf{fma}\left(3 \cdot x1, \frac{x1 \cdot \mathsf{fma}\left(3 \cdot x1, x1, \mathsf{fma}\left(x2, 2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, {x1}^{3}\right)\right) + x1\right)
\end{array}

Error

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.3

    \[\leadsto \color{blue}{x1 + \mathsf{fma}\left(3, \frac{\mathsf{fma}\left(3 \cdot x1, x1, -\mathsf{fma}\left(x2, 2, x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(\frac{\left(2 \cdot x1\right) \cdot \mathsf{fma}\left(3 \cdot x1, x1, \mathsf{fma}\left(x2, 2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \frac{\mathsf{fma}\left(3 \cdot x1, x1, \mathsf{fma}\left(x2, 2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)} + -3, x1 \cdot \left(x1 \cdot \mathsf{fma}\left(4, \frac{\mathsf{fma}\left(3 \cdot x1, x1, \mathsf{fma}\left(x2, 2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, -6\right)\right)\right), \mathsf{fma}\left(3 \cdot x1, \frac{x1 \cdot \mathsf{fma}\left(3 \cdot x1, x1, \mathsf{fma}\left(x2, 2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, {x1}^{3}\right)\right) + x1\right)} \]
    Proof
  3. Applied egg-rr0.3

    \[\leadsto x1 + \mathsf{fma}\left(3, \frac{\mathsf{fma}\left(3 \cdot x1, x1, -\mathsf{fma}\left(x2, 2, x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \color{blue}{\left(\left(\frac{x1 + x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \mathsf{fma}\left(3 \cdot x1, x1, \left(x2 + x2\right) - x1\right)\right) \cdot \left(\frac{\mathsf{fma}\left(3 \cdot x1, x1, \left(x2 + x2\right) - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)} + -3\right) + \frac{\left(x1 \cdot x1\right) \cdot \left(4 \cdot \mathsf{fma}\left(3 \cdot x1, x1, \left(x2 + x2\right) - x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right) + \left(x1 \cdot x1\right) \cdot -6}, \mathsf{fma}\left(3 \cdot x1, \frac{x1 \cdot \mathsf{fma}\left(3 \cdot x1, x1, \mathsf{fma}\left(x2, 2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, {x1}^{3}\right)\right) + x1\right) \]
  4. Applied egg-rr0.3

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

Alternatives

Alternative 1
Error0.5
Cost47168
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := 1 + {x1}^{2}\\ t_2 := x1 \cdot x1 + 1\\ t_3 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left({x1}^{2} \cdot \left(4 \cdot \left(3 \cdot \frac{{x1}^{2}}{t_1} - \frac{x1}{t_1}\right) - 6\right) + 8 \cdot \frac{x2 \cdot {x1}^{2}}{t_1}\right)\right) \cdot t_2 + t_0 \cdot t_3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\right) \end{array} \]
Alternative 2
Error0.5
Cost20928
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot \left(x1 \cdot \left(\left(\mathsf{fma}\left(3 \cdot x1, x1, 2 \cdot x2\right) - x1\right) \cdot \frac{4}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right) + x1 \cdot \left(x1 \cdot -6\right)\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \end{array} \]
Alternative 3
Error0.5
Cost20800
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + x1 \cdot \left(\frac{\left(x1 \cdot 4\right) \cdot \mathsf{fma}\left(x1, 3 \cdot x1, \left(x2 + x2\right) - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)} + x1 \cdot -6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \end{array} \]
Alternative 4
Error0.5
Cost8128
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \end{array} \]
Alternative 5
Error2.0
Cost7104
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 6\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \end{array} \]
Alternative 6
Error2.7
Cost6848
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + 6 \cdot \left(x1 \cdot x1\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \end{array} \]
Alternative 7
Error4.7
Cost6344
\[\begin{array}{l} t_0 := \left(x1 \cdot x1\right) \cdot x1\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ t_2 := x1 \cdot \left(2 \cdot x2 - 3\right)\\ t_3 := x1 \cdot x1 + 1\\ t_4 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_3}\\ t_5 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_3}\\ t_6 := x1 + \left(\left(\left(\left(\left(6 \cdot t_2 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_5 - 6\right)\right) \cdot t_3 + t_1 \cdot t_5\right) + t_0\right) + x1\right) + t_4\right)\\ \mathbf{if}\;x1 \leq -1.6:\\ \;\;\;\;t_6\\ \mathbf{elif}\;x1 \leq 5500:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(4 \cdot \left(x2 \cdot t_2\right)\right) \cdot t_3 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 6\right) + t_0\right) + x1\right) + t_4\right)\\ \mathbf{else}:\\ \;\;\;\;t_6\\ \end{array} \]
Alternative 8
Error3.4
Cost6344
\[\begin{array}{l} t_0 := \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 6\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ t_2 := \left(x1 \cdot x1\right) \cdot x1\\ t_3 := x1 \cdot x1 + 1\\ t_4 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_3}\\ t_5 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_3}\\ t_6 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_4\right) \cdot \frac{-1}{x1} + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\right) \cdot t_3 + t_0\right) + t_2\right) + x1\right) + t_5\right)\\ \mathbf{if}\;x1 \leq -1.7:\\ \;\;\;\;t_6\\ \mathbf{elif}\;x1 \leq 5500:\\ \;\;\;\;x1 + \left(\left(\left(\left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) \cdot t_3 + t_0\right) + t_2\right) + x1\right) + t_5\right)\\ \mathbf{else}:\\ \;\;\;\;t_6\\ \end{array} \]
Alternative 9
Error4.6
Cost6208
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(2 \cdot x2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 6\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \end{array} \]
Alternative 10
Error11.8
Cost4544
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ x1 + \left(\left(\left(\left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) \cdot t_0 + t_1 \cdot \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_0}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0}\right) \end{array} \]
Alternative 11
Error11.8
Cost3520
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ x1 + \left(\left(\left(\left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) \cdot t_0 + \left(\left(x1 \cdot x1\right) \cdot x2\right) \cdot 6\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}{t_0}\right) \end{array} \]
Alternative 12
Error15.7
Cost1480
\[\begin{array}{l} \mathbf{if}\;x2 \leq -4.8 \cdot 10^{+153}:\\ \;\;\;\;-6 \cdot x2\\ \mathbf{elif}\;x2 \leq 4.8 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right) + -6 \cdot x2\right)\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot x2\\ \end{array} \]
Alternative 13
Error34.2
Cost192
\[-6 \cdot x2 \]
Alternative 14
Error61.8
Cost64
\[x1 \]

Error

Reproduce

herbie shell --seed 2023010 
(FPCore (x1 x2)
  :name "Rosa's FloatVsDoubleBenchmark"
  :precision binary64
  (+ x1 (+ (+ (+ (+ (* (+ (* (* (* 2.0 x1) (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))) (- (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)) 3.0)) (* (* x1 x1) (- (* 4.0 (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))) 6.0))) (+ (* x1 x1) 1.0)) (* (* (* 3.0 x1) x1) (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))) (* (* x1 x1) x1)) x1) (* 3.0 (/ (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))))))