
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $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]]]]
\begin{array}{l}
\\
\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}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $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]]]]
\begin{array}{l}
\\
\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}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3 (/ (- (fma (* x1 x1) 3.0 (* 2.0 x2)) x1) (fma x1 x1 1.0))))
(if (<=
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
INFINITY)
(+
x1
(fma
(* x1 x1)
x1
(+
(fma
(fma (* (fma t_3 4.0 -6.0) x1) x1 (* (- t_3 3.0) (* (* x1 2.0) t_3)))
(fma x1 x1 1.0)
(* (/ (- (fma x2 2.0 t_0) x1) (fma x1 x1 1.0)) t_0))
(fma (/ (- (fma -2.0 x2 t_0) x1) (fma x1 x1 1.0)) 3.0 x1))))
(+ x1 (* (* (- 6.0 (/ 3.0 x1)) (* x1 x1)) (* x1 x1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = (fma((x1 * x1), 3.0, (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double tmp;
if ((x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= ((double) INFINITY)) {
tmp = x1 + fma((x1 * x1), x1, (fma(fma((fma(t_3, 4.0, -6.0) * x1), x1, ((t_3 - 3.0) * ((x1 * 2.0) * t_3))), fma(x1, x1, 1.0), (((fma(x2, 2.0, t_0) - x1) / fma(x1, x1, 1.0)) * t_0)) + fma(((fma(-2.0, x2, t_0) - x1) / fma(x1, x1, 1.0)), 3.0, x1)));
} else {
tmp = x1 + (((6.0 - (3.0 / x1)) * (x1 * x1)) * (x1 * x1));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(Float64(fma(Float64(x1 * x1), 3.0, Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) <= Inf) tmp = Float64(x1 + fma(Float64(x1 * x1), x1, Float64(fma(fma(Float64(fma(t_3, 4.0, -6.0) * x1), x1, Float64(Float64(t_3 - 3.0) * Float64(Float64(x1 * 2.0) * t_3))), fma(x1, x1, 1.0), Float64(Float64(Float64(fma(x2, 2.0, t_0) - x1) / fma(x1, x1, 1.0)) * t_0)) + fma(Float64(Float64(fma(-2.0, x2, t_0) - x1) / fma(x1, x1, 1.0)), 3.0, x1)))); else tmp = Float64(x1 + Float64(Float64(Float64(6.0 - Float64(3.0 / x1)) * Float64(x1 * x1)) * Float64(x1 * x1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x1 * x1), $MachinePrecision] * 3.0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $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[(N[(x1 * x1), $MachinePrecision] * x1 + N[(N[(N[(N[(N[(t$95$3 * 4.0 + -6.0), $MachinePrecision] * x1), $MachinePrecision] * x1 + N[(N[(t$95$3 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1 + 1.0), $MachinePrecision] + N[(N[(N[(N[(x2 * 2.0 + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(-2.0 * x2 + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 3.0 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\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}\\
t_3 := \frac{\mathsf{fma}\left(x1 \cdot x1, 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;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) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1 \cdot x1, x1, \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_3, 4, -6\right) \cdot x1, x1, \left(t\_3 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_3\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \frac{\mathsf{fma}\left(x2, 2, t\_0\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot t\_0\right) + \mathsf{fma}\left(\frac{\mathsf{fma}\left(-2, x2, t\_0\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot x1\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Applied rewrites99.7%
Applied rewrites99.7%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Applied rewrites11.9%
Taylor expanded in x1 around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f64100.0
Applied rewrites100.0%
Applied rewrites100.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(*
(- 6.0 (/ (- 3.0 (/ (fma (fma 2.0 x2 -3.0) 4.0 9.0) x1)) x1))
(pow x1 4.0))))
(if (<= x1 -2.8e+32)
t_0
(if (<= x1 1.65e+40)
(+
x1
(+
(+ (* (* (* (/ x1 (fma x1 x1 1.0)) 8.0) x2) x2) x1)
(*
3.0
(/ (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))))
(+ x1 t_0)))))
double code(double x1, double x2) {
double t_0 = (6.0 - ((3.0 - (fma(fma(2.0, x2, -3.0), 4.0, 9.0) / x1)) / x1)) * pow(x1, 4.0);
double tmp;
if (x1 <= -2.8e+32) {
tmp = t_0;
} else if (x1 <= 1.65e+40) {
tmp = x1 + ((((((x1 / fma(x1, x1, 1.0)) * 8.0) * x2) * x2) + x1) + (3.0 * (((((3.0 * x1) * x1) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))));
} else {
tmp = x1 + t_0;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(6.0 - Float64(Float64(3.0 - Float64(fma(fma(2.0, x2, -3.0), 4.0, 9.0) / x1)) / x1)) * (x1 ^ 4.0)) tmp = 0.0 if (x1 <= -2.8e+32) tmp = t_0; elseif (x1 <= 1.65e+40) tmp = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 / fma(x1, x1, 1.0)) * 8.0) * x2) * x2) + x1) + Float64(3.0 * Float64(Float64(Float64(Float64(Float64(3.0 * x1) * x1) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))))); else tmp = Float64(x1 + t_0); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(6.0 - N[(N[(3.0 - N[(N[(N[(2.0 * x2 + -3.0), $MachinePrecision] * 4.0 + 9.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.8e+32], t$95$0, If[LessEqual[x1, 1.65e+40], N[(x1 + N[(N[(N[(N[(N[(N[(x1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 8.0), $MachinePrecision] * x2), $MachinePrecision] * x2), $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], N[(x1 + t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}\\
\mathbf{if}\;x1 \leq -2.8 \cdot 10^{+32}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.65 \cdot 10^{+40}:\\
\;\;\;\;x1 + \left(\left(\left(\left(\frac{x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot 8\right) \cdot x2\right) \cdot x2 + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + t\_0\\
\end{array}
\end{array}
if x1 < -2.8e32Initial program 21.5%
Applied rewrites36.9%
Taylor expanded in x1 around 0
lower-*.f641.7
Applied rewrites1.7%
lift-+.f64N/A
Applied rewrites1.7%
Taylor expanded in x1 around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites97.0%
if -2.8e32 < x1 < 1.6499999999999999e40Initial program 99.3%
Taylor expanded in x2 around inf
associate-*r/N/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6497.6
Applied rewrites97.6%
if 1.6499999999999999e40 < x1 Initial program 39.9%
Applied rewrites39.9%
Taylor expanded in x1 around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites98.1%
Final simplification97.6%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -2.8e+32) (not (<= x1 1.65e+40)))
(*
(- 6.0 (/ (- 3.0 (/ (fma (fma 2.0 x2 -3.0) 4.0 9.0) x1)) x1))
(pow x1 4.0))
(+
x1
(+
(+ (* (* (* (/ x1 (fma x1 x1 1.0)) 8.0) x2) x2) x1)
(* 3.0 (/ (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.8e+32) || !(x1 <= 1.65e+40)) {
tmp = (6.0 - ((3.0 - (fma(fma(2.0, x2, -3.0), 4.0, 9.0) / x1)) / x1)) * pow(x1, 4.0);
} else {
tmp = x1 + ((((((x1 / fma(x1, x1, 1.0)) * 8.0) * x2) * x2) + x1) + (3.0 * (((((3.0 * x1) * x1) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if ((x1 <= -2.8e+32) || !(x1 <= 1.65e+40)) tmp = Float64(Float64(6.0 - Float64(Float64(3.0 - Float64(fma(fma(2.0, x2, -3.0), 4.0, 9.0) / x1)) / x1)) * (x1 ^ 4.0)); else tmp = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 / fma(x1, x1, 1.0)) * 8.0) * x2) * x2) + 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 return tmp end
code[x1_, x2_] := If[Or[LessEqual[x1, -2.8e+32], N[Not[LessEqual[x1, 1.65e+40]], $MachinePrecision]], N[(N[(6.0 - N[(N[(3.0 - N[(N[(N[(2.0 * x2 + -3.0), $MachinePrecision] * 4.0 + 9.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(N[(N[(N[(x1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 8.0), $MachinePrecision] * x2), $MachinePrecision] * x2), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.8 \cdot 10^{+32} \lor \neg \left(x1 \leq 1.65 \cdot 10^{+40}\right):\\
\;\;\;\;\left(6 - \frac{3 - \frac{\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right), 4, 9\right)}{x1}}{x1}\right) \cdot {x1}^{4}\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(\left(\left(\frac{x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot 8\right) \cdot x2\right) \cdot x2 + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\\
\end{array}
\end{array}
if x1 < -2.8e32 or 1.6499999999999999e40 < x1 Initial program 29.9%
Applied rewrites38.2%
Taylor expanded in x1 around 0
lower-*.f6436.7
Applied rewrites36.7%
lift-+.f64N/A
Applied rewrites36.7%
Taylor expanded in x1 around -inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites97.5%
if -2.8e32 < x1 < 1.6499999999999999e40Initial program 99.3%
Taylor expanded in x2 around inf
associate-*r/N/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6497.6
Applied rewrites97.6%
Final simplification97.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -7.5e+137)
(* (* (* x2 x2) -36.0) (pow (- x1 (* -6.0 x2)) -1.0))
(if (<= x1 3.5e+88)
(fma (fma (* (fma 2.0 x2 -3.0) x2) 4.0 -1.0) x1 (* -6.0 x2))
(fma (fma x1 x1 1.0) x1 (* -6.0 x2)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -7.5e+137) {
tmp = ((x2 * x2) * -36.0) * pow((x1 - (-6.0 * x2)), -1.0);
} else if (x1 <= 3.5e+88) {
tmp = fma(fma((fma(2.0, x2, -3.0) * x2), 4.0, -1.0), x1, (-6.0 * x2));
} else {
tmp = fma(fma(x1, x1, 1.0), x1, (-6.0 * x2));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -7.5e+137) tmp = Float64(Float64(Float64(x2 * x2) * -36.0) * (Float64(x1 - Float64(-6.0 * x2)) ^ -1.0)); elseif (x1 <= 3.5e+88) tmp = fma(fma(Float64(fma(2.0, x2, -3.0) * x2), 4.0, -1.0), x1, Float64(-6.0 * x2)); else tmp = fma(fma(x1, x1, 1.0), x1, Float64(-6.0 * x2)); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -7.5e+137], N[(N[(N[(x2 * x2), $MachinePrecision] * -36.0), $MachinePrecision] * N[Power[N[(x1 - N[(-6.0 * x2), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.5e+88], N[(N[(N[(N[(2.0 * x2 + -3.0), $MachinePrecision] * x2), $MachinePrecision] * 4.0 + -1.0), $MachinePrecision] * x1 + N[(-6.0 * x2), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * x1 + 1.0), $MachinePrecision] * x1 + N[(-6.0 * x2), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+137}:\\
\;\;\;\;\left(\left(x2 \cdot x2\right) \cdot -36\right) \cdot {\left(x1 - -6 \cdot x2\right)}^{-1}\\
\mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+88}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), x1, -6 \cdot x2\right)\\
\end{array}
\end{array}
if x1 < -7.50000000000000025e137Initial program 0.0%
Taylor expanded in x1 around 0
lower-*.f640.5
Applied rewrites0.5%
lift-+.f64N/A
Applied rewrites2.4%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6413.5
Applied rewrites13.5%
if -7.50000000000000025e137 < x1 < 3.4999999999999998e88Initial program 94.0%
Applied rewrites99.7%
Taylor expanded in x1 around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
lower-fma.f64N/A
metadata-evalN/A
lower-*.f6472.3
Applied rewrites72.3%
if 3.4999999999999998e88 < x1 Initial program 28.3%
Applied rewrites28.3%
Taylor expanded in x1 around 0
lower-*.f6492.3
Applied rewrites92.3%
lift-+.f64N/A
Applied rewrites92.3%
Final simplification66.2%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -1.2e+38) (not (<= x1 1.65e+40)))
(+ x1 (* (fma 6.0 x1 -3.0) (pow x1 3.0)))
(+
x1
(+
(+ (* (* (* (/ x1 (fma x1 x1 1.0)) 8.0) x2) x2) x1)
(* 3.0 (/ (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.2e+38) || !(x1 <= 1.65e+40)) {
tmp = x1 + (fma(6.0, x1, -3.0) * pow(x1, 3.0));
} else {
tmp = x1 + ((((((x1 / fma(x1, x1, 1.0)) * 8.0) * x2) * x2) + x1) + (3.0 * (((((3.0 * x1) * x1) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if ((x1 <= -1.2e+38) || !(x1 <= 1.65e+40)) tmp = Float64(x1 + Float64(fma(6.0, x1, -3.0) * (x1 ^ 3.0))); else tmp = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 / fma(x1, x1, 1.0)) * 8.0) * x2) * x2) + 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 return tmp end
code[x1_, x2_] := If[Or[LessEqual[x1, -1.2e+38], N[Not[LessEqual[x1, 1.65e+40]], $MachinePrecision]], N[(x1 + N[(N[(6.0 * x1 + -3.0), $MachinePrecision] * N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(N[(N[(N[(x1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 8.0), $MachinePrecision] * x2), $MachinePrecision] * x2), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.2 \cdot 10^{+38} \lor \neg \left(x1 \leq 1.65 \cdot 10^{+40}\right):\\
\;\;\;\;x1 + \mathsf{fma}\left(6, x1, -3\right) \cdot {x1}^{3}\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(\left(\left(\frac{x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot 8\right) \cdot x2\right) \cdot x2 + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\\
\end{array}
\end{array}
if x1 < -1.20000000000000009e38 or 1.6499999999999999e40 < x1 Initial program 28.7%
Applied rewrites37.2%
Taylor expanded in x1 around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f6496.3
Applied rewrites96.3%
Taylor expanded in x1 around 0
Applied rewrites96.3%
if -1.20000000000000009e38 < x1 < 1.6499999999999999e40Initial program 99.3%
Taylor expanded in x2 around inf
associate-*r/N/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6496.9
Applied rewrites96.9%
Final simplification96.7%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.2e+38)
(+ x1 (* (* (- 6.0 (/ 3.0 x1)) (* x1 x1)) (* x1 x1)))
(if (<= x1 1.65e+40)
(+
x1
(+
(+ (* (* (* (/ x1 (fma x1 x1 1.0)) 8.0) x2) x2) x1)
(* 3.0 (/ (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.2e+38) {
tmp = x1 + (((6.0 - (3.0 / x1)) * (x1 * x1)) * (x1 * x1));
} else if (x1 <= 1.65e+40) {
tmp = x1 + ((((((x1 / fma(x1, x1, 1.0)) * 8.0) * x2) * x2) + x1) + (3.0 * (((((3.0 * x1) * x1) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -1.2e+38) tmp = Float64(x1 + Float64(Float64(Float64(6.0 - Float64(3.0 / x1)) * Float64(x1 * x1)) * Float64(x1 * x1))); elseif (x1 <= 1.65e+40) tmp = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 / fma(x1, x1, 1.0)) * 8.0) * x2) * x2) + x1) + Float64(3.0 * Float64(Float64(Float64(Float64(Float64(3.0 * x1) * x1) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -1.2e+38], N[(x1 + N[(N[(N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.65e+40], N[(x1 + N[(N[(N[(N[(N[(N[(x1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 8.0), $MachinePrecision] * x2), $MachinePrecision] * x2), $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], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.2 \cdot 10^{+38}:\\
\;\;\;\;x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot x1\right)\\
\mathbf{elif}\;x1 \leq 1.65 \cdot 10^{+40}:\\
\;\;\;\;x1 + \left(\left(\left(\left(\frac{x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot 8\right) \cdot x2\right) \cdot x2 + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\end{array}
\end{array}
if x1 < -1.20000000000000009e38Initial program 19.0%
Applied rewrites34.9%
Taylor expanded in x1 around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f6496.8
Applied rewrites96.8%
Applied rewrites96.8%
if -1.20000000000000009e38 < x1 < 1.6499999999999999e40Initial program 99.3%
Taylor expanded in x2 around inf
associate-*r/N/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6496.9
Applied rewrites96.9%
if 1.6499999999999999e40 < x1 Initial program 39.9%
Applied rewrites39.9%
Taylor expanded in x1 around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f6495.8
Applied rewrites95.8%
Taylor expanded in x1 around inf
Applied rewrites95.8%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -1.2e+38) (not (<= x1 1.65e+40)))
(+ x1 (* (* (- 6.0 (/ 3.0 x1)) (* x1 x1)) (* x1 x1)))
(+
x1
(+
(+ (* (* (* (/ x1 (fma x1 x1 1.0)) 8.0) x2) x2) x1)
(* 3.0 (/ (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.2e+38) || !(x1 <= 1.65e+40)) {
tmp = x1 + (((6.0 - (3.0 / x1)) * (x1 * x1)) * (x1 * x1));
} else {
tmp = x1 + ((((((x1 / fma(x1, x1, 1.0)) * 8.0) * x2) * x2) + x1) + (3.0 * (((((3.0 * x1) * x1) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if ((x1 <= -1.2e+38) || !(x1 <= 1.65e+40)) tmp = Float64(x1 + Float64(Float64(Float64(6.0 - Float64(3.0 / x1)) * Float64(x1 * x1)) * Float64(x1 * x1))); else tmp = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(x1 / fma(x1, x1, 1.0)) * 8.0) * x2) * x2) + 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 return tmp end
code[x1_, x2_] := If[Or[LessEqual[x1, -1.2e+38], N[Not[LessEqual[x1, 1.65e+40]], $MachinePrecision]], N[(x1 + N[(N[(N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(N[(N[(N[(x1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 8.0), $MachinePrecision] * x2), $MachinePrecision] * x2), $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.2 \cdot 10^{+38} \lor \neg \left(x1 \leq 1.65 \cdot 10^{+40}\right):\\
\;\;\;\;x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot x1\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(\left(\left(\frac{x1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot 8\right) \cdot x2\right) \cdot x2 + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)\\
\end{array}
\end{array}
if x1 < -1.20000000000000009e38 or 1.6499999999999999e40 < x1 Initial program 28.7%
Applied rewrites37.2%
Taylor expanded in x1 around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f6496.3
Applied rewrites96.3%
Applied rewrites96.3%
if -1.20000000000000009e38 < x1 < 1.6499999999999999e40Initial program 99.3%
Taylor expanded in x2 around inf
associate-*r/N/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6496.9
Applied rewrites96.9%
Final simplification96.6%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -2.6e+37) (not (<= x1 1.75e+35)))
(+ x1 (* (* (- 6.0 (/ 3.0 x1)) (* x1 x1)) (* x1 x1)))
(+
x1
(fma
(/ (- (fma -2.0 x2 (* (* x1 x1) 3.0)) x1) (fma x1 x1 1.0))
3.0
(+ (* (fma (fma 6.0 x1 -12.0) x1 (* 8.0 (* x2 x1))) x2) x1)))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.6e+37) || !(x1 <= 1.75e+35)) {
tmp = x1 + (((6.0 - (3.0 / x1)) * (x1 * x1)) * (x1 * x1));
} else {
tmp = x1 + fma(((fma(-2.0, x2, ((x1 * x1) * 3.0)) - x1) / fma(x1, x1, 1.0)), 3.0, ((fma(fma(6.0, x1, -12.0), x1, (8.0 * (x2 * x1))) * x2) + x1));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if ((x1 <= -2.6e+37) || !(x1 <= 1.75e+35)) tmp = Float64(x1 + Float64(Float64(Float64(6.0 - Float64(3.0 / x1)) * Float64(x1 * x1)) * Float64(x1 * x1))); else tmp = Float64(x1 + fma(Float64(Float64(fma(-2.0, x2, Float64(Float64(x1 * x1) * 3.0)) - x1) / fma(x1, x1, 1.0)), 3.0, Float64(Float64(fma(fma(6.0, x1, -12.0), x1, Float64(8.0 * Float64(x2 * x1))) * x2) + x1))); end return tmp end
code[x1_, x2_] := If[Or[LessEqual[x1, -2.6e+37], N[Not[LessEqual[x1, 1.75e+35]], $MachinePrecision]], N[(x1 + N[(N[(N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(N[(-2.0 * x2 + N[(N[(x1 * x1), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 3.0 + N[(N[(N[(N[(6.0 * x1 + -12.0), $MachinePrecision] * x1 + N[(8.0 * N[(x2 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.6 \cdot 10^{+37} \lor \neg \left(x1 \leq 1.75 \cdot 10^{+35}\right):\\
\;\;\;\;x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot x1\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(\frac{\mathsf{fma}\left(-2, x2, \left(x1 \cdot x1\right) \cdot 3\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, \mathsf{fma}\left(\mathsf{fma}\left(6, x1, -12\right), x1, 8 \cdot \left(x2 \cdot x1\right)\right) \cdot x2 + x1\right)\\
\end{array}
\end{array}
if x1 < -2.5999999999999999e37 or 1.75e35 < x1 Initial program 29.3%
Applied rewrites37.7%
Taylor expanded in x1 around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f6495.6
Applied rewrites95.6%
Applied rewrites95.6%
if -2.5999999999999999e37 < x1 < 1.75e35Initial program 99.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites84.9%
Taylor expanded in x2 around 0
Applied rewrites73.8%
Taylor expanded in x2 around 0
Applied rewrites94.0%
Applied rewrites94.3%
Final simplification94.9%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -2.6e+37) (not (<= x1 1.75e+35)))
(+ x1 (* (* (- 6.0 (/ 3.0 x1)) (* x1 x1)) (* x1 x1)))
(fma
(fma
(fma
-4.0
x2
(+ (fma -4.0 x2 6.0) (fma (fma 2.0 x2 3.0) 3.0 (fma 14.0 x2 -6.0))))
x1
(fma (* (fma 2.0 x2 -3.0) x2) 4.0 -1.0))
x1
(* -6.0 x2))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.6e+37) || !(x1 <= 1.75e+35)) {
tmp = x1 + (((6.0 - (3.0 / x1)) * (x1 * x1)) * (x1 * x1));
} else {
tmp = fma(fma(fma(-4.0, x2, (fma(-4.0, x2, 6.0) + fma(fma(2.0, x2, 3.0), 3.0, fma(14.0, x2, -6.0)))), x1, fma((fma(2.0, x2, -3.0) * x2), 4.0, -1.0)), x1, (-6.0 * x2));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if ((x1 <= -2.6e+37) || !(x1 <= 1.75e+35)) tmp = Float64(x1 + Float64(Float64(Float64(6.0 - Float64(3.0 / x1)) * Float64(x1 * x1)) * Float64(x1 * x1))); else tmp = fma(fma(fma(-4.0, x2, Float64(fma(-4.0, x2, 6.0) + fma(fma(2.0, x2, 3.0), 3.0, fma(14.0, x2, -6.0)))), x1, fma(Float64(fma(2.0, x2, -3.0) * x2), 4.0, -1.0)), x1, Float64(-6.0 * x2)); end return tmp end
code[x1_, x2_] := If[Or[LessEqual[x1, -2.6e+37], N[Not[LessEqual[x1, 1.75e+35]], $MachinePrecision]], N[(x1 + N[(N[(N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-4.0 * x2 + N[(N[(-4.0 * x2 + 6.0), $MachinePrecision] + N[(N[(2.0 * x2 + 3.0), $MachinePrecision] * 3.0 + N[(14.0 * x2 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x1 + N[(N[(N[(2.0 * x2 + -3.0), $MachinePrecision] * x2), $MachinePrecision] * 4.0 + -1.0), $MachinePrecision]), $MachinePrecision] * x1 + N[(-6.0 * x2), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.6 \cdot 10^{+37} \lor \neg \left(x1 \leq 1.75 \cdot 10^{+35}\right):\\
\;\;\;\;x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot x1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-4, x2, \mathsf{fma}\left(-4, x2, 6\right) + \mathsf{fma}\left(\mathsf{fma}\left(2, x2, 3\right), 3, \mathsf{fma}\left(14, x2, -6\right)\right)\right), x1, \mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right)\right), x1, -6 \cdot x2\right)\\
\end{array}
\end{array}
if x1 < -2.5999999999999999e37 or 1.75e35 < x1 Initial program 29.3%
Applied rewrites37.7%
Taylor expanded in x1 around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f6495.6
Applied rewrites95.6%
Applied rewrites95.6%
if -2.5999999999999999e37 < x1 < 1.75e35Initial program 99.3%
Applied rewrites99.7%
Applied rewrites99.7%
Taylor expanded in x1 around 0
Applied rewrites85.4%
Final simplification90.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -2.6e+37) (not (<= x1 1.75e+35))) (+ x1 (* (* (- 6.0 (/ 3.0 x1)) (* x1 x1)) (* x1 x1))) (fma (fma (* (fma 2.0 x2 -3.0) x2) 4.0 -1.0) x1 (* -6.0 x2))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.6e+37) || !(x1 <= 1.75e+35)) {
tmp = x1 + (((6.0 - (3.0 / x1)) * (x1 * x1)) * (x1 * x1));
} else {
tmp = fma(fma((fma(2.0, x2, -3.0) * x2), 4.0, -1.0), x1, (-6.0 * x2));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if ((x1 <= -2.6e+37) || !(x1 <= 1.75e+35)) tmp = Float64(x1 + Float64(Float64(Float64(6.0 - Float64(3.0 / x1)) * Float64(x1 * x1)) * Float64(x1 * x1))); else tmp = fma(fma(Float64(fma(2.0, x2, -3.0) * x2), 4.0, -1.0), x1, Float64(-6.0 * x2)); end return tmp end
code[x1_, x2_] := If[Or[LessEqual[x1, -2.6e+37], N[Not[LessEqual[x1, 1.75e+35]], $MachinePrecision]], N[(x1 + N[(N[(N[(6.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 * x2 + -3.0), $MachinePrecision] * x2), $MachinePrecision] * 4.0 + -1.0), $MachinePrecision] * x1 + N[(-6.0 * x2), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.6 \cdot 10^{+37} \lor \neg \left(x1 \leq 1.75 \cdot 10^{+35}\right):\\
\;\;\;\;x1 + \left(\left(6 - \frac{3}{x1}\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(x1 \cdot x1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)\\
\end{array}
\end{array}
if x1 < -2.5999999999999999e37 or 1.75e35 < x1 Initial program 29.3%
Applied rewrites37.7%
Taylor expanded in x1 around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f6495.6
Applied rewrites95.6%
Applied rewrites95.6%
if -2.5999999999999999e37 < x1 < 1.75e35Initial program 99.3%
Applied rewrites99.7%
Taylor expanded in x1 around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
lower-fma.f64N/A
metadata-evalN/A
lower-*.f6485.1
Applied rewrites85.1%
Final simplification90.0%
(FPCore (x1 x2) :precision binary64 (if (<= x1 3.5e+88) (fma (fma (* (fma 2.0 x2 -3.0) x2) 4.0 -1.0) x1 (* -6.0 x2)) (fma (fma x1 x1 1.0) x1 (* -6.0 x2))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 3.5e+88) {
tmp = fma(fma((fma(2.0, x2, -3.0) * x2), 4.0, -1.0), x1, (-6.0 * x2));
} else {
tmp = fma(fma(x1, x1, 1.0), x1, (-6.0 * x2));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= 3.5e+88) tmp = fma(fma(Float64(fma(2.0, x2, -3.0) * x2), 4.0, -1.0), x1, Float64(-6.0 * x2)); else tmp = fma(fma(x1, x1, 1.0), x1, Float64(-6.0 * x2)); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, 3.5e+88], N[(N[(N[(N[(2.0 * x2 + -3.0), $MachinePrecision] * x2), $MachinePrecision] * 4.0 + -1.0), $MachinePrecision] * x1 + N[(-6.0 * x2), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * x1 + 1.0), $MachinePrecision] * x1 + N[(-6.0 * x2), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 3.5 \cdot 10^{+88}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(2, x2, -3\right) \cdot x2, 4, -1\right), x1, -6 \cdot x2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), x1, -6 \cdot x2\right)\\
\end{array}
\end{array}
if x1 < 3.4999999999999998e88Initial program 75.2%
Applied rewrites80.2%
Taylor expanded in x1 around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
lower-fma.f64N/A
metadata-evalN/A
lower-*.f6458.4
Applied rewrites58.4%
if 3.4999999999999998e88 < x1 Initial program 28.3%
Applied rewrites28.3%
Taylor expanded in x1 around 0
lower-*.f6492.3
Applied rewrites92.3%
lift-+.f64N/A
Applied rewrites92.3%
(FPCore (x1 x2) :precision binary64 (fma (fma x1 x1 1.0) x1 (* -6.0 x2)))
double code(double x1, double x2) {
return fma(fma(x1, x1, 1.0), x1, (-6.0 * x2));
}
function code(x1, x2) return fma(fma(x1, x1, 1.0), x1, Float64(-6.0 * x2)) end
code[x1_, x2_] := N[(N[(x1 * x1 + 1.0), $MachinePrecision] * x1 + N[(-6.0 * x2), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), x1, -6 \cdot x2\right)
\end{array}
Initial program 66.8%
Applied rewrites70.9%
Taylor expanded in x1 around 0
lower-*.f6441.6
Applied rewrites41.6%
lift-+.f64N/A
Applied rewrites41.6%
(FPCore (x1 x2) :precision binary64 (+ x1 (* -6.0 x2)))
double code(double x1, double x2) {
return x1 + (-6.0 * x2);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + ((-6.0d0) * x2)
end function
public static double code(double x1, double x2) {
return x1 + (-6.0 * x2);
}
def code(x1, x2): return x1 + (-6.0 * x2)
function code(x1, x2) return Float64(x1 + Float64(-6.0 * x2)) end
function tmp = code(x1, x2) tmp = x1 + (-6.0 * x2); end
code[x1_, x2_] := N[(x1 + N[(-6.0 * x2), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + -6 \cdot x2
\end{array}
Initial program 66.8%
Taylor expanded in x1 around 0
lower-*.f6425.8
Applied rewrites25.8%
herbie shell --seed 2024315
(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))))))