?

Average Accuracy: 99.2% → 99.6%
Time: 51.0s
Precision: binary64
Cost: 94848

?

\[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 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)\\ x1 + \mathsf{fma}\left(3, \frac{x1 \cdot \left(x1 \cdot 3\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot \frac{t_0}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{3}}, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{t_0}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{t_0}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\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 (fma x1 (* x1 3.0) (fma 2.0 x2 (- x1)))))
   (+
    x1
    (fma
     3.0
     (/ (- (* x1 (* x1 3.0)) (fma 2.0 x2 x1)) (fma x1 x1 1.0))
     (fma
      x1
      (* x1 (/ t_0 (/ (fma x1 x1 1.0) 3.0)))
      (*
       (fma x1 x1 1.0)
       (+
        x1
        (+
         (* x1 (* x1 -6.0))
         (*
          (/ t_0 (fma x1 x1 1.0))
          (+
           (* x1 (+ -6.0 (/ t_0 (/ (fma x1 x1 1.0) 2.0))))
           (* (* x1 x1) 4.0)))))))))))
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 = fma(x1, (x1 * 3.0), fma(2.0, x2, -x1));
	return x1 + fma(3.0, (((x1 * (x1 * 3.0)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, (x1 * (t_0 / (fma(x1, x1, 1.0) / 3.0))), (fma(x1, x1, 1.0) * (x1 + ((x1 * (x1 * -6.0)) + ((t_0 / fma(x1, x1, 1.0)) * ((x1 * (-6.0 + (t_0 / (fma(x1, x1, 1.0) / 2.0)))) + ((x1 * x1) * 4.0))))))));
}
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 = fma(x1, Float64(x1 * 3.0), fma(2.0, x2, Float64(-x1)))
	return Float64(x1 + fma(3.0, Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, Float64(x1 * Float64(t_0 / Float64(fma(x1, x1, 1.0) / 3.0))), Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(Float64(x1 * Float64(x1 * -6.0)) + Float64(Float64(t_0 / fma(x1, x1, 1.0)) * Float64(Float64(x1 * Float64(-6.0 + Float64(t_0 / Float64(fma(x1, x1, 1.0) / 2.0)))) + Float64(Float64(x1 * x1) * 4.0)))))))))
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 * 3.0), $MachinePrecision] + N[(2.0 * x2 + (-x1)), $MachinePrecision]), $MachinePrecision]}, N[(x1 + N[(3.0 * N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * N[(t$95$0 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(N[(x1 * N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(t$95$0 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)\\
x1 + \mathsf{fma}\left(3, \frac{x1 \cdot \left(x1 \cdot 3\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot \frac{t_0}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{3}}, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{t_0}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{t_0}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right)
\end{array}

Error?

Derivation?

  1. Initial program 99.2%

    \[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. Simplified99.6%

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

    [Start]99.2

    \[ 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) \]

    +-commutative [=>]99.2

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

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

Alternatives

Alternative 1
Accuracy99.2%
Cost20928
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_2 + t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(-6 \cdot \left(x1 \cdot x1\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right)\right)\right)\right)\right)\right) \end{array} \]
Alternative 2
Accuracy99.2%
Cost20928
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ x1 + \left(\left(x1 + \left(\left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(\frac{\left(x1 \cdot x1\right) \cdot 4}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}} + -6 \cdot \left(x1 \cdot x1\right)\right)\right) + t_0 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \end{array} \]
Alternative 3
Accuracy99.2%
Cost8128
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_2 + t_1 \cdot \left(\left(\left(x1 \cdot 2\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)\right)\right)\right)\right) \end{array} \]
Alternative 4
Accuracy97.9%
Cost7113
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ t_3 := x1 \cdot \left(x1 \cdot x1\right)\\ t_4 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\\ \mathbf{if}\;x1 \leq -0.78 \lor \neg \left(x1 \leq 0.41\right):\\ \;\;\;\;x1 + \left(t_4 + \left(x1 + \left(t_3 + \left(t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(\frac{2 \cdot x2}{x1 \cdot x1} - \left(\frac{1}{x1} + \frac{3}{x1 \cdot x1}\right)\right)\right) + \left(x1 \cdot x1\right) \cdot 9\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_4 + \left(x1 + \left(t_3 + \left(t_0 \cdot t_2 + t_1 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 5
Accuracy97.8%
Cost6976
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot \left(\left(\left(x1 \cdot 2\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) + x1 \cdot \left(x1 \cdot 9\right)\right)\right)\right)\right) \end{array} \]
Alternative 6
Accuracy95.7%
Cost6848
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_2 + t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right) \end{array} \]
Alternative 7
Accuracy97.7%
Cost6473
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\ t_3 := x1 \cdot \left(x1 \cdot x1\right)\\ t_4 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\\ \mathbf{if}\;x1 \leq -0.155 \lor \neg \left(x1 \leq 0.88\right):\\ \;\;\;\;x1 + \left(t_4 + \left(x1 + \left(t_3 + \left(\left(x1 \cdot x1\right) \cdot 9 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(2 \cdot \frac{x2}{x1 \cdot x1}\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_4 + \left(x1 + \left(t_3 + \left(t_0 \cdot t_2 + t_1 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 8
Accuracy95.6%
Cost5956
\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := x1 \cdot \left(x1 \cdot 3\right)\\ t_3 := 3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0}\\ t_4 := \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_0}\\ t_5 := t_2 \cdot t_4\\ \mathbf{if}\;x1 \leq -1.58:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_5 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right) + \left(-6 + \frac{-16}{x1}\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 0.88:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_5 + t_0 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(\left(x1 \cdot x1\right) \cdot 9 + t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(\frac{2 \cdot x2}{x1 \cdot x1} - \left(\frac{1}{x1} + \frac{3}{x1 \cdot x1}\right)\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 9
Accuracy95.5%
Cost5832
\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := \left(x1 \cdot x1\right) \cdot 9\\ t_3 := 2 \cdot x2 - 3\\ t_4 := x1 \cdot \left(x1 \cdot 3\right)\\ t_5 := \frac{\left(t_4 + 2 \cdot x2\right) - x1}{t_0}\\ t_6 := 3 \cdot \frac{\left(t_4 - 2 \cdot x2\right) - x1}{t_0}\\ \mathbf{if}\;x1 \leq -2:\\ \;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_1 + \left(t_2 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_5 - 6\right) + \left(2 \cdot \frac{1 + 3 \cdot t_3}{x1} - 6\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 2.15:\\ \;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_1 + \left(t_4 \cdot t_5 + t_0 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot t_3\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_1 + \left(t_2 + t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_5\right) \cdot \left(\frac{2 \cdot x2}{x1 \cdot x1} - \left(\frac{1}{x1} + \frac{3}{x1 \cdot x1}\right)\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 10
Accuracy95.5%
Cost5444
\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := \left(x1 \cdot x1\right) \cdot 9\\ t_3 := 2 \cdot x2 - 3\\ t_4 := x1 \cdot \left(x1 \cdot 3\right)\\ t_5 := \frac{\left(t_4 + 2 \cdot x2\right) - x1}{t_0}\\ t_6 := 3 \cdot \frac{\left(t_4 - 2 \cdot x2\right) - x1}{t_0}\\ \mathbf{if}\;x1 \leq -1.5:\\ \;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_1 + \left(t_2 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_5 - 6\right) + \left(2 \cdot \frac{1 + 3 \cdot t_3}{x1} - 6\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 0.88:\\ \;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_1 + \left(t_4 \cdot t_5 + t_0 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot t_3\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_1 + \left(t_2 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(\left(x1 \cdot 2\right) \cdot t_5\right) \cdot \left(\frac{x2}{x1} \cdot \frac{2}{x1}\right)\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 11
Accuracy95.8%
Cost5193
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := 1 + x1 \cdot x1\\ t_3 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\ t_4 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2}\\ \mathbf{if}\;x1 \leq -0.59 \lor \neg \left(x1 \leq 2.2\right):\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(\left(x1 \cdot x1\right) \cdot 9 + t_2 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(\frac{x2}{x1} \cdot \frac{2}{x1}\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_0 \cdot t_4 + t_2 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 12
Accuracy95.4%
Cost4809
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := 1 + x1 \cdot x1\\ t_3 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\ t_4 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2}\\ \mathbf{if}\;x1 \leq -3.1 \lor \neg \left(x1 \leq 0.12\right):\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(\left(x1 \cdot x1\right) \cdot 9 + t_2 \cdot \left(-6 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_0 \cdot t_4 + t_2 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 13
Accuracy95.4%
Cost4681
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := x1 \cdot \left(x1 \cdot x1\right)\\ t_3 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\\ \mathbf{if}\;x1 \leq -1.55 \lor \neg \left(x1 \leq 0.4\right):\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_2 + \left(\left(x1 \cdot x1\right) \cdot 9 + t_1 \cdot \left(-6 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1} - 6\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_2 + \left(t_1 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + x2 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 14
Accuracy94.1%
Cost4553
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := x1 \cdot \left(x1 \cdot x1\right)\\ t_3 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\\ \mathbf{if}\;x1 \leq -1.18 \lor \neg \left(x1 \leq 3.45\right):\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_2 + \left(t_0 \cdot \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1} + t_1 \cdot \left(x1 \cdot \left(x1 \cdot 6 + -4\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_2 + \left(t_1 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + x2 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 15
Accuracy93.6%
Cost4296
\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{t_0}\\ t_3 := \left(x1 \cdot x1\right) \cdot 9\\ t_4 := 2 \cdot x2 - 3\\ t_5 := \left(x1 \cdot x1\right) \cdot 6\\ \mathbf{if}\;x1 \leq -1.6:\\ \;\;\;\;x1 + \left(t_2 + \left(x1 + \left(t_1 + \left(t_3 + t_0 \cdot \left(-6 + t_5\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 0.108:\\ \;\;\;\;x1 + \left(t_2 + \left(x1 + \left(t_1 + \left(t_0 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot t_4\right)\right)\right) + x2 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_2 + \left(x1 + \left(t_1 + \left(t_3 + t_0 \cdot \left(t_5 + \left(2 \cdot \frac{1 + 3 \cdot t_4}{x1} - 6\right)\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 16
Accuracy93.6%
Cost4296
\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := x1 \cdot \left(x1 \cdot 3\right)\\ t_3 := 3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0}\\ t_4 := x1 \cdot \left(x1 \cdot 6\right)\\ t_5 := 2 \cdot x2 - 3\\ \mathbf{if}\;x1 \leq -0.45:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_2 \cdot \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_0} + t_0 \cdot t_4\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 0.4:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_0 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot t_5\right)\right)\right) + x2 \cdot t_4\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(\left(x1 \cdot x1\right) \cdot 9 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(2 \cdot \frac{1 + 3 \cdot t_5}{x1} - 6\right)\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 17
Accuracy93.6%
Cost3785
\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{t_0}\\ \mathbf{if}\;x1 \leq -0.89 \lor \neg \left(x1 \leq 2.9\right):\\ \;\;\;\;x1 + \left(t_2 + \left(x1 + \left(t_1 + \left(\left(x1 \cdot x1\right) \cdot 9 + t_0 \cdot \left(-6 + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_2 + \left(x1 + \left(t_1 + \left(t_0 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + x2 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 18
Accuracy84.2%
Cost3664
\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right) + x2 \cdot -6\right)\\ t_2 := x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot x1\right) \cdot 9 + t_0 \cdot \left(-6 + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -1.18:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x1 \leq -3.6 \cdot 10^{-204}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq 3.05 \cdot 10^{-257}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot -5\\ \mathbf{elif}\;x1 \leq 1.38:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 19
Accuracy93.1%
Cost3657
\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{t_0}\\ t_3 := \left(x1 \cdot x1\right) \cdot 9\\ \mathbf{if}\;x1 \leq -1.45 \lor \neg \left(x1 \leq 0.85\right):\\ \;\;\;\;x1 + \left(t_2 + \left(x1 + \left(t_1 + \left(t_3 + t_0 \cdot \left(-6 + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t_2 + \left(x1 + \left(t_1 + \left(t_3 + t_0 \cdot \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
Alternative 20
Accuracy74.2%
Cost1480
\[\begin{array}{l} \mathbf{if}\;x2 \leq -4.7 \cdot 10^{+153}:\\ \;\;\;\;x2 \cdot -6\\ \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) + x2 \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 + x1 \cdot -5\\ \end{array} \]
Alternative 21
Accuracy49.8%
Cost448
\[x2 \cdot -6 + x1 \cdot -5 \]
Alternative 22
Accuracy47.1%
Cost192
\[x2 \cdot -6 \]

Error

Reproduce?

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