Rosa's FloatVsDoubleBenchmark

?

Percentage Accurate: 69.9% → 99.5%
Time: 58.2s
Precision: binary64
Cost: 103044

?

\[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 3\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := t_0 + 2 \cdot x2\\ t_3 := \frac{t_2 - x1}{t_1}\\ t_4 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)\\ \mathbf{if}\;x1 + \left(\left(x1 + \left(\left(\left(-1 - x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t_3 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(3 + \frac{x1 - t_2}{t_1}\right)\right) + t_0 \cdot t_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \leq \infty:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_0 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot \frac{t_4}{\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_4}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{t_4}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\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 (* x1 (* x1 3.0)))
        (t_1 (+ (* x1 x1) 1.0))
        (t_2 (+ t_0 (* 2.0 x2)))
        (t_3 (/ (- t_2 x1) t_1))
        (t_4 (fma x1 (* x1 3.0) (fma 2.0 x2 (- x1)))))
   (if (<=
        (+
         x1
         (+
          (+
           x1
           (+
            (+
             (*
              (- -1.0 (* x1 x1))
              (+
               (* (* x1 x1) (- 6.0 (* t_3 4.0)))
               (* (* (* x1 2.0) t_3) (+ 3.0 (/ (- x1 t_2) t_1)))))
             (* t_0 t_3))
            (* x1 (* x1 x1))))
          (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
        INFINITY)
     (+
      x1
      (fma
       3.0
       (/ (- t_0 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
       (fma
        x1
        (* x1 (/ t_4 (/ (fma x1 x1 1.0) 3.0)))
        (*
         (fma x1 x1 1.0)
         (+
          x1
          (+
           (* x1 (* x1 -6.0))
           (*
            (/ t_4 (fma x1 x1 1.0))
            (+
             (* x1 (+ -6.0 (/ t_4 (/ (fma x1 x1 1.0) 2.0))))
             (* (* x1 x1) 4.0)))))))))
     (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.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 = x1 * (x1 * 3.0);
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = t_0 + (2.0 * x2);
	double t_3 = (t_2 - x1) / t_1;
	double t_4 = fma(x1, (x1 * 3.0), fma(2.0, x2, -x1));
	double tmp;
	if ((x1 + ((x1 + ((((-1.0 - (x1 * x1)) * (((x1 * x1) * (6.0 - (t_3 * 4.0))) + (((x1 * 2.0) * t_3) * (3.0 + ((x1 - t_2) / t_1))))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= ((double) INFINITY)) {
		tmp = x1 + fma(3.0, ((t_0 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, (x1 * (t_4 / (fma(x1, x1, 1.0) / 3.0))), (fma(x1, x1, 1.0) * (x1 + ((x1 * (x1 * -6.0)) + ((t_4 / fma(x1, x1, 1.0)) * ((x1 * (-6.0 + (t_4 / (fma(x1, x1, 1.0) / 2.0)))) + ((x1 * x1) * 4.0))))))));
	} else {
		tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
	}
	return tmp;
}
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 * 3.0))
	t_1 = Float64(Float64(x1 * x1) + 1.0)
	t_2 = Float64(t_0 + Float64(2.0 * x2))
	t_3 = Float64(Float64(t_2 - x1) / t_1)
	t_4 = fma(x1, Float64(x1 * 3.0), fma(2.0, x2, Float64(-x1)))
	tmp = 0.0
	if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(Float64(-1.0 - Float64(x1 * x1)) * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_3 * 4.0))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + Float64(Float64(x1 - t_2) / t_1))))) + Float64(t_0 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) <= Inf)
		tmp = Float64(x1 + fma(3.0, Float64(Float64(t_0 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, Float64(x1 * Float64(t_4 / 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_4 / fma(x1, x1, 1.0)) * Float64(Float64(x1 * Float64(-6.0 + Float64(t_4 / Float64(fma(x1, x1, 1.0) / 2.0)))) + Float64(Float64(x1 * x1) * 4.0)))))))));
	else
		tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0))));
	end
	return tmp
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]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2 + (-x1)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$3 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + N[(N[(x1 - t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$0 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * N[(t$95$4 / 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$4 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(t$95$4 / 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], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $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 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := t_0 + 2 \cdot x2\\
t_3 := \frac{t_2 - x1}{t_1}\\
t_4 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(\left(-1 - x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t_3 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(3 + \frac{x1 - t_2}{t_1}\right)\right) + t_0 \cdot t_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_0 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot \frac{t_4}{\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_4}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{t_4}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\


\end{array}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Herbie found 26 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Bogosity?

Bogosity

Derivation?

  1. Split input into 2 regimes
  2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0

    1. Initial program 99.4%

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

      \[\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)} \]
      Step-by-step derivation

      [Start]99.4%

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

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

    if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))))

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.0%

      \[\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 \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 \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    3. Simplified0.0%

      \[\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 \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 \color{blue}{\left(x2 \cdot -2\right)}\right) \]
      Step-by-step derivation

      [Start]0.0%

      \[ 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 \left(-2 \cdot x2\right)\right) \]

      *-commutative [=>]0.0%

      \[ 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 \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    4. Taylor expanded in x1 around inf 98.5%

      \[\leadsto x1 + \left(\left(\color{blue}{6 \cdot {x1}^{4}} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 + \left(\left(x1 + \left(\left(\left(-1 - x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(3 + \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{x1 \cdot x1 + 1}\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \leq \infty:\\ \;\;\;\;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)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy99.5%
Cost103044
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := t_0 + 2 \cdot x2\\ t_3 := \frac{t_2 - x1}{t_1}\\ t_4 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)\\ \mathbf{if}\;x1 + \left(\left(x1 + \left(\left(\left(-1 - x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t_3 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(3 + \frac{x1 - t_2}{t_1}\right)\right) + t_0 \cdot t_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \leq \infty:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_0 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot \frac{t_4}{\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_4}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{t_4}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\ \end{array} \]
Alternative 2
Accuracy99.3%
Cost28996
\[\begin{array}{l} t_0 := -1 - x1 \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := x1 \cdot \left(x1 \cdot 3\right)\\ t_3 := t_2 + 2 \cdot x2\\ t_4 := 3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_1}\\ t_5 := \frac{t_3 - x1}{t_1}\\ t_6 := \left(x1 \cdot 2\right) \cdot t_5\\ t_7 := \left(x1 \cdot x1\right) \cdot \left(6 - t_5 \cdot 4\right)\\ t_8 := \frac{x1 - t_3}{t_1}\\ t_9 := x1 \cdot \left(x1 \cdot x1\right)\\ \mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t_0 \cdot \left(t_7 + t_6 \cdot \left(3 + t_8\right)\right) + t_2 \cdot t_5\right) + t_9\right)\right) + t_4\right) \leq \infty:\\ \;\;\;\;x1 + \left(t_4 - \left(\left(\left(t_2 \cdot t_8 - t_0 \cdot \left(t_7 + t_6 \cdot \left(3 + \left(\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right) - x1\right) \cdot \frac{-1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right)\right) - t_9\right) - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\ \end{array} \]
Alternative 3
Accuracy99.3%
Cost28996
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0}\\ t_3 := t_1 + 2 \cdot x2\\ t_4 := \frac{t_3 - x1}{t_0}\\ t_5 := \left(x1 \cdot 2\right) \cdot t_4\\ t_6 := \left(x1 \cdot x1\right) \cdot \left(6 - t_4 \cdot 4\right)\\ t_7 := t_1 \cdot t_4\\ t_8 := x1 \cdot \left(x1 \cdot x1\right)\\ \mathbf{if}\;x1 + \left(\left(x1 + \left(\left(\left(-1 - x1 \cdot x1\right) \cdot \left(t_6 + t_5 \cdot \left(3 + \frac{x1 - t_3}{t_0}\right)\right) + t_7\right) + t_8\right)\right) + t_2\right) \leq \infty:\\ \;\;\;\;x1 + \left(t_2 + \left(x1 + \left(t_8 + \left(t_7 - t_0 \cdot \left(t_6 + t_5 \cdot \left(3 + \frac{-1}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}}\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\ \end{array} \]
Alternative 4
Accuracy99.3%
Cost16324
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := t_0 + 2 \cdot x2\\ t_2 := x1 \cdot x1 + 1\\ t_3 := \frac{t_1 - x1}{t_2}\\ t_4 := x1 + \left(\left(x1 + \left(\left(\left(-1 - x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t_3 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(3 + \frac{x1 - t_1}{t_2}\right)\right) + t_0 \cdot t_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\right)\\ \mathbf{if}\;t_4 \leq \infty:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\ \end{array} \]
Alternative 5
Accuracy86.7%
Cost7892
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := t_0 + 2 \cdot x2\\ t_2 := x1 \cdot x1 + 1\\ t_3 := \frac{t_1 - x1}{t_2}\\ t_4 := \left(x1 \cdot x1\right) \cdot \left(6 - t_3 \cdot 4\right)\\ t_5 := 3 - 2 \cdot x2\\ t_6 := x1 \cdot \left(x1 \cdot x1\right)\\ t_7 := \left(x1 \cdot 2\right) \cdot t_3\\ t_8 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(t_6 + \left(t_0 \cdot t_3 - t_2 \cdot \left(t_4 + t_7 \cdot \left(\left(\frac{1}{x1} + \frac{3}{x1 \cdot x1}\right) - 2 \cdot \frac{x2}{x1 \cdot x1}\right)\right)\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -4.8 \cdot 10^{+158}:\\ \;\;\;\;x1 + \left(\left(x1 - 4 \cdot \left(x2 \cdot \left(x1 \cdot t_5\right)\right)\right) + \frac{\left(x1 \cdot x1\right) \cdot 9 - \left(x2 \cdot x2\right) \cdot 36}{x1 \cdot -3 - x2 \cdot -6}\right)\\ \mathbf{elif}\;x1 \leq -5.8 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(\left(x1 + x1 \cdot -3\right) - x2 \cdot \left(6 - x1 \cdot -12\right)\right)\\ \mathbf{elif}\;x1 \leq -0.78:\\ \;\;\;\;t_8\\ \mathbf{elif}\;x1 \leq 1.15:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2} + \left(x1 + \left(t_6 - \left(t_0 \cdot \frac{x1 - t_1}{t_2} + t_2 \cdot \left(t_4 + t_7 \cdot t_5\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.1 \cdot 10^{+154}:\\ \;\;\;\;t_8\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x1, x1, \left(x2 \cdot x2\right) \cdot -36\right)}{x1 + x2 \cdot 6}\\ \end{array} \]
Alternative 6
Accuracy85.9%
Cost7764
\[\begin{array}{l} t_0 := x1 - 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \left(x2 \cdot x2\right) \cdot 36\\ t_3 := x1 \cdot \left(x1 \cdot 3\right)\\ t_4 := \frac{\left(t_3 + 2 \cdot x2\right) - x1}{t_1}\\ t_5 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_3 \cdot t_4 - t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t_4 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(\left(\frac{1}{x1} + \frac{3}{x1 \cdot x1}\right) - 2 \cdot \frac{x2}{x1 \cdot x1}\right)\right)\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -4.8 \cdot 10^{+158}:\\ \;\;\;\;x1 + \left(t_0 + \frac{\left(x1 \cdot x1\right) \cdot 9 - t_2}{x1 \cdot -3 - x2 \cdot -6}\right)\\ \mathbf{elif}\;x1 \leq -5.8 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(\left(x1 + x1 \cdot -3\right) - x2 \cdot \left(6 - x1 \cdot -12\right)\right)\\ \mathbf{elif}\;x1 \leq -0.55:\\ \;\;\;\;t_5\\ \mathbf{elif}\;x1 \leq 0.33:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_3 - 2 \cdot x2\right) - x1}{t_1} + t_0\right)\\ \mathbf{elif}\;x1 \leq 1.1 \cdot 10^{+154}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_2}{x1 - x2 \cdot -6}\\ \end{array} \]
Alternative 7
Accuracy85.9%
Cost7764
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := 3 - 2 \cdot x2\\ t_2 := x1 \cdot \left(x1 \cdot x1\right)\\ t_3 := \left(x2 \cdot x2\right) \cdot 36\\ t_4 := x1 \cdot \left(x1 \cdot 3\right)\\ t_5 := t_4 + 2 \cdot x2\\ t_6 := \frac{t_5 - x1}{t_0}\\ t_7 := \left(x1 \cdot x1\right) \cdot \left(6 - t_6 \cdot 4\right)\\ t_8 := \left(x1 \cdot 2\right) \cdot t_6\\ t_9 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(t_2 + \left(t_4 \cdot t_6 - t_0 \cdot \left(t_7 + t_8 \cdot \left(\left(\frac{1}{x1} + \frac{3}{x1 \cdot x1}\right) - 2 \cdot \frac{x2}{x1 \cdot x1}\right)\right)\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -9.5 \cdot 10^{+159}:\\ \;\;\;\;x1 + \left(\left(x1 - 4 \cdot \left(x2 \cdot \left(x1 \cdot t_1\right)\right)\right) + \frac{\left(x1 \cdot x1\right) \cdot 9 - t_3}{x1 \cdot -3 - x2 \cdot -6}\right)\\ \mathbf{elif}\;x1 \leq -5.8 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(\left(x1 + x1 \cdot -3\right) - x2 \cdot \left(6 - x1 \cdot -12\right)\right)\\ \mathbf{elif}\;x1 \leq -0.82:\\ \;\;\;\;t_9\\ \mathbf{elif}\;x1 \leq 1.25:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_4 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(t_2 - \left(t_4 \cdot \frac{x1 - t_5}{t_0} + t_0 \cdot \left(t_7 + t_8 \cdot t_1\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 8.5 \cdot 10^{+153}:\\ \;\;\;\;t_9\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_3}{x1 - x2 \cdot -6}\\ \end{array} \]
Alternative 8
Accuracy96.6%
Cost7561
\[\begin{array}{l} t_0 := x1 \cdot x1 + 1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := t_1 + 2 \cdot x2\\ t_3 := \frac{x1 - t_2}{t_0}\\ \mathbf{if}\;x1 \leq -5 \cdot 10^{+100} \lor \neg \left(x1 \leq 1.06 \cdot 10^{+55}\right):\\ \;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 - \left(\left(t_1 \cdot t_3 + t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{t_2 - x1}{t_0}\right) \cdot \left(3 + t_3\right) - \left(x1 \cdot x1\right) \cdot 6\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\ \end{array} \]
Alternative 9
Accuracy80.7%
Cost6604
\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 \cdot \left(x1 \cdot x1\right)\\ t_2 := \left(x2 \cdot x2\right) \cdot 36\\ t_3 := t_0 + 2 \cdot x2\\ t_4 := 3 \cdot \left(x2 \cdot -2\right)\\ t_5 := x1 - 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\ t_6 := x1 \cdot x1 + 1\\ t_7 := \frac{t_3 - x1}{t_6}\\ \mathbf{if}\;x1 \leq -4.8 \cdot 10^{+158}:\\ \;\;\;\;x1 + \left(t_5 + \frac{\left(x1 \cdot x1\right) \cdot 9 - t_2}{x1 \cdot -3 - x2 \cdot -6}\right)\\ \mathbf{elif}\;x1 \leq -5.8 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(\left(x1 + x1 \cdot -3\right) - x2 \cdot \left(6 - x1 \cdot -12\right)\right)\\ \mathbf{elif}\;x1 \leq -1.15 \cdot 10^{+29}:\\ \;\;\;\;x1 - \left(\left(\left(\left(t_0 \cdot \frac{x1 - t_3}{t_6} + t_6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t_7 \cdot 4\right) - \left(\left(x1 \cdot 2\right) \cdot t_7\right) \cdot \frac{-1}{x1}\right)\right) - t_1\right) - x1\right) - t_4\right)\\ \mathbf{elif}\;x1 \leq 3.9 \cdot 10^{+24}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_6} + t_5\right)\\ \mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(t_4 + \left(x1 + \left(t_1 + \left(t_0 \cdot t_7 + t_6 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_2}{x1 - x2 \cdot -6}\\ \end{array} \]
Alternative 10
Accuracy79.9%
Cost3924
\[\begin{array}{l} t_0 := \left(x2 \cdot x2\right) \cdot 36\\ t_1 := x1 - 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\ t_2 := x1 \cdot \left(x1 \cdot 3\right)\\ t_3 := x1 \cdot x1 + 1\\ t_4 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 - \left(\left(\left(\left(x1 \cdot x1\right) \cdot 6\right) \cdot \left(-1 - x1 \cdot x1\right) - t_2 \cdot \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_3}\right) - x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -4.8 \cdot 10^{+158}:\\ \;\;\;\;x1 + \left(t_1 + \frac{\left(x1 \cdot x1\right) \cdot 9 - t_0}{x1 \cdot -3 - x2 \cdot -6}\right)\\ \mathbf{elif}\;x1 \leq -5.8 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(\left(x1 + x1 \cdot -3\right) - x2 \cdot \left(6 - x1 \cdot -12\right)\right)\\ \mathbf{elif}\;x1 \leq -8.5 \cdot 10^{+28}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x1 \leq 5.7 \cdot 10^{+23}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_3} + t_1\right)\\ \mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_0}{x1 - x2 \cdot -6}\\ \end{array} \]
Alternative 11
Accuracy79.9%
Cost3924
\[\begin{array}{l} t_0 := x1 - 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \left(x2 \cdot x2\right) \cdot 36\\ t_3 := x1 \cdot \left(x1 \cdot 3\right)\\ t_4 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_3 \cdot \frac{\left(t_3 + 2 \cdot x2\right) - x1}{t_1} + t_1 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -2.15 \cdot 10^{+159}:\\ \;\;\;\;x1 + \left(t_0 + \frac{\left(x1 \cdot x1\right) \cdot 9 - t_2}{x1 \cdot -3 - x2 \cdot -6}\right)\\ \mathbf{elif}\;x1 \leq -5.8 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(\left(x1 + x1 \cdot -3\right) - x2 \cdot \left(6 - x1 \cdot -12\right)\right)\\ \mathbf{elif}\;x1 \leq -8.5 \cdot 10^{+28}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x1 \leq 1.3 \cdot 10^{+24}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_3 - 2 \cdot x2\right) - x1}{t_1} + t_0\right)\\ \mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_2}{x1 - x2 \cdot -6}\\ \end{array} \]
Alternative 12
Accuracy71.5%
Cost2636
\[\begin{array}{l} t_0 := \left(x2 \cdot x2\right) \cdot 36\\ t_1 := x1 - 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\ \mathbf{if}\;x1 \leq -4.8 \cdot 10^{+158}:\\ \;\;\;\;x1 + \left(t_1 + \frac{\left(x1 \cdot x1\right) \cdot 9 - t_0}{x1 \cdot -3 - x2 \cdot -6}\right)\\ \mathbf{elif}\;x1 \leq -2.45 \cdot 10^{+89}:\\ \;\;\;\;x1 + \left(\left(x1 + x1 \cdot -3\right) - x2 \cdot \left(6 - x1 \cdot -12\right)\right)\\ \mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + t_1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - t_0}{x1 - x2 \cdot -6}\\ \end{array} \]
Alternative 13
Accuracy67.7%
Cost2504
\[\begin{array}{l} \mathbf{if}\;x1 \leq -1.9 \cdot 10^{+90}:\\ \;\;\;\;x1 + \left(\left(x1 + x1 \cdot -3\right) - x2 \cdot \left(6 - x1 \cdot -12\right)\right)\\ \mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 - 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]
Alternative 14
Accuracy63.3%
Cost1744
\[\begin{array}{l} t_0 := x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -6.4 \cdot 10^{+81}:\\ \;\;\;\;x1 + \left(\left(x1 + x1 \cdot -3\right) - x2 \cdot \left(6 - x1 \cdot -12\right)\right)\\ \mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-233}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x1 \leq 5.2 \cdot 10^{-245}:\\ \;\;\;\;x2 \cdot -6 - x1\\ \mathbf{elif}\;x1 \leq 3 \cdot 10^{+170}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]
Alternative 15
Accuracy66.9%
Cost1736
\[\begin{array}{l} \mathbf{if}\;x1 \leq -4.3 \cdot 10^{+84}:\\ \;\;\;\;x1 + \left(\left(x1 + x1 \cdot -3\right) - x2 \cdot \left(6 - x1 \cdot -12\right)\right)\\ \mathbf{elif}\;x1 \leq 3 \cdot 10^{+170}:\\ \;\;\;\;x1 + \left(\left(x1 - 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\ \end{array} \]
Alternative 16
Accuracy60.5%
Cost1481
\[\begin{array}{l} \mathbf{if}\;x2 \leq -1.35 \lor \neg \left(x2 \leq 2.65 \cdot 10^{+20}\right):\\ \;\;\;\;x1 + \left(\left(x1 - 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right) + x2 \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 - x1\\ \end{array} \]
Alternative 17
Accuracy53.5%
Cost1357
\[\begin{array}{l} \mathbf{if}\;x1 \leq -1.5 \cdot 10^{+88}:\\ \;\;\;\;x1 + \left(\left(x1 + x1 \cdot -3\right) - x2 \cdot \left(6 - x1 \cdot -12\right)\right)\\ \mathbf{elif}\;x1 \leq -6.2 \cdot 10^{-98} \lor \neg \left(x1 \leq 1.95 \cdot 10^{-171}\right):\\ \;\;\;\;x1 - x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 - x1\\ \end{array} \]
Alternative 18
Accuracy50.5%
Cost1225
\[\begin{array}{l} \mathbf{if}\;x1 \leq -4.1 \cdot 10^{-98} \lor \neg \left(x1 \leq 3 \cdot 10^{-171}\right):\\ \;\;\;\;x1 - x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 - x1\\ \end{array} \]
Alternative 19
Accuracy55.3%
Cost1225
\[\begin{array}{l} \mathbf{if}\;x2 \leq -27.5 \lor \neg \left(x2 \leq 6.2 \cdot 10^{+16}\right):\\ \;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 + 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 - x1\\ \end{array} \]
Alternative 20
Accuracy49.8%
Cost964
\[\begin{array}{l} t_0 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ \mathbf{if}\;x2 \leq -2 \cdot 10^{+73}:\\ \;\;\;\;x1 + \left(9 + \left(x1 + t_0\right)\right)\\ \mathbf{elif}\;x2 \leq 6.8 \cdot 10^{+119}:\\ \;\;\;\;x2 \cdot -6 - x1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 21
Accuracy49.8%
Cost713
\[\begin{array}{l} \mathbf{if}\;x2 \leq -4.3 \cdot 10^{+73} \lor \neg \left(x2 \leq 1.8 \cdot 10^{+117}\right):\\ \;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6 - x1\\ \end{array} \]
Alternative 22
Accuracy32.4%
Cost585
\[\begin{array}{l} \mathbf{if}\;x2 \leq -1.25 \cdot 10^{-115} \lor \neg \left(x2 \leq 1.9 \cdot 10^{-81}\right):\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;-x1\\ \end{array} \]
Alternative 23
Accuracy32.2%
Cost456
\[\begin{array}{l} \mathbf{if}\;x2 \leq -2.15 \cdot 10^{-100}:\\ \;\;\;\;x2 \cdot -6\\ \mathbf{elif}\;x2 \leq 3 \cdot 10^{-82}:\\ \;\;\;\;-x1\\ \mathbf{else}:\\ \;\;\;\;x2 \cdot -6\\ \end{array} \]
Alternative 24
Accuracy38.9%
Cost320
\[x2 \cdot -6 - x1 \]
Alternative 25
Accuracy14.4%
Cost128
\[-x1 \]
Alternative 26
Accuracy3.3%
Cost64
\[x1 \]

Reproduce?

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