
(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 17 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 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* 3.0 (* x1 x1))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_4 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_0 4.0 -6.0)) (* (* x1 (* 2.0 t_0)) (+ t_0 -3.0)))
(fma t_4 t_0 (pow x1 3.0))))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (x1 * x1);
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_0, 4.0, -6.0)), ((x1 * (2.0 * t_0)) * (t_0 + -3.0))), fma(t_4, t_0, pow(x1, 3.0)))));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(3.0 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_0, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_0)) * Float64(t_0 + -3.0))), fma(t_4, t_0, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$4 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * t$95$0 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 3 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_4 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_0, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_0\right)\right) \cdot \left(t\_0 + -3\right)\right), \mathsf{fma}\left(t\_4, t\_0, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\end{array}
\end{array}
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.0Initial program 99.4%
Simplified99.6%
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))))) Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
fma-define0.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
+-commutative0.0%
unpow30.0%
unpow20.0%
distribute-lft-out0.0%
cancel-sign-sub-inv0.0%
metadata-eval0.0%
+-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 98.7%
*-commutative98.7%
Simplified98.7%
Final simplification99.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* (* (* x1 2.0) t_3) (- t_3 3.0))))
(if (<=
(+
x1
(+
(+
x1
(+
(+ (* t_2 (+ t_4 (* (* x1 x1) (- (* t_3 4.0) 6.0)))) (* t_1 t_3))
t_0))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(+
(+
x1
(+
t_0
(+
(*
t_2
(+
t_4
(*
(* x1 x1)
(-
(*
4.0
(-
(/ (fma 3.0 (pow x1 2.0) (* 2.0 x2)) (fma x1 x1 1.0))
(/ x1 (fma x1 x1 1.0))))
6.0))))
(* 3.0 t_1))))
(* 3.0 (- (* x2 -2.0) x1))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double tmp;
if ((x1 + ((x1 + (((t_2 * (t_4 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + ((x1 + (t_0 + ((t_2 * (t_4 + ((x1 * x1) * ((4.0 * ((fma(3.0, pow(x1, 2.0), (2.0 * x2)) / fma(x1, x1, 1.0)) - (x1 / fma(x1, x1, 1.0)))) - 6.0)))) + (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(t_4 + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + t_0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_0 + Float64(Float64(t_2 * Float64(t_4 + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(fma(3.0, (x1 ^ 2.0), Float64(2.0 * x2)) / fma(x1, x1, 1.0)) - Float64(x1 / fma(x1, x1, 1.0)))) - 6.0)))) + Float64(3.0 * t_1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(t$95$4 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(x1 + N[(t$95$0 + N[(N[(t$95$2 * N[(t$95$4 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(3.0 * N[Power[x1, 2.0], $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] - N[(x1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(t\_4 + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + t\_0\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_0 + \left(t\_2 \cdot \left(t\_4 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(\frac{\mathsf{fma}\left(3, {x1}^{2}, 2 \cdot x2\right)}{\mathsf{fma}\left(x1, x1, 1\right)} - \frac{x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right) - 6\right)\right) + 3 \cdot t\_1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\end{array}
\end{array}
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.0Initial program 99.4%
Taylor expanded in x1 around inf 98.1%
Taylor expanded in x1 around 0 99.4%
mul-1-neg99.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
div-sub99.4%
*-commutative99.4%
fma-define99.4%
*-commutative99.4%
fma-undefine99.4%
*-commutative99.4%
*-commutative99.4%
associate-*r*99.5%
fma-define99.5%
pow299.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
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))))) Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
fma-define0.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
+-commutative0.0%
unpow30.0%
unpow20.0%
distribute-lft-out0.0%
cancel-sign-sub-inv0.0%
metadata-eval0.0%
+-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 98.7%
*-commutative98.7%
Simplified98.7%
Final simplification99.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))))
(if (<=
(+
x1
(+
(+ x1 (+ (+ t_4 (* t_1 t_3)) t_0))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+ x1 (+ (* 3.0 (- (* x2 -2.0) x1)) (+ x1 (+ t_0 (+ t_4 (* 3.0 t_1))))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)));
double tmp;
if ((x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_0 + (t_4 + (3.0 * t_1)))));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)));
double tmp;
if ((x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= Double.POSITIVE_INFINITY) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_0 + (t_4 + (3.0 * t_1)))));
} else {
tmp = x1 + (6.0 * Math.pow(x1, 4.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_4 = t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))) tmp = 0 if (x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= math.inf: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_0 + (t_4 + (3.0 * t_1))))) else: tmp = x1 + (6.0 * math.pow(x1, 4.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(t_4 + Float64(t_1 * t_3)) + t_0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(3.0 * t_1)))))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_4 = t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))); tmp = 0.0; if ((x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_0 + (t_4 + (3.0 * t_1))))); else tmp = x1 + (6.0 * (x1 ^ 4.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(t$95$4 + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_4 + t\_1 \cdot t\_3\right) + t\_0\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(t\_0 + \left(t\_4 + 3 \cdot t\_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\end{array}
\end{array}
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.0Initial program 99.4%
Taylor expanded in x1 around inf 98.1%
Taylor expanded in x1 around 0 99.4%
mul-1-neg99.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
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))))) Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
fma-define0.0%
+-commutative0.0%
mul-1-neg0.0%
unsub-neg0.0%
+-commutative0.0%
unpow30.0%
unpow20.0%
distribute-lft-out0.0%
cancel-sign-sub-inv0.0%
metadata-eval0.0%
+-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 98.7%
*-commutative98.7%
Simplified98.7%
Final simplification99.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* 3.0 (- (* x2 -2.0) x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (* 3.0 t_3))
(t_5 (/ (- (+ t_3 (* 2.0 x2)) x1) t_1)))
(if (<= x1 7.8e+148)
(+
x1
(+
t_2
(+
x1
(+
t_0
(+
(*
t_1
(+
(* (* (* x1 2.0) t_5) (- t_5 3.0))
(* (* x1 x1) (- (* t_5 4.0) 6.0))))
t_4)))))
(+
x1
(+
t_2
(+
x1
(+ t_0 (+ t_4 (* t_1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * ((x2 * -2.0) - x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * t_3;
double t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= 7.8e+148) {
tmp = x1 + (t_2 + (x1 + (t_0 + ((t_1 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))) + t_4))));
} else {
tmp = x1 + (t_2 + (x1 + (t_0 + (t_4 + (t_1 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
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
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
t_2 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = 3.0d0 * t_3
t_5 = ((t_3 + (2.0d0 * x2)) - x1) / t_1
if (x1 <= 7.8d+148) then
tmp = x1 + (t_2 + (x1 + (t_0 + ((t_1 * ((((x1 * 2.0d0) * t_5) * (t_5 - 3.0d0)) + ((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)))) + t_4))))
else
tmp = x1 + (t_2 + (x1 + (t_0 + (t_4 + (t_1 * (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * ((x2 * -2.0) - x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * t_3;
double t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= 7.8e+148) {
tmp = x1 + (t_2 + (x1 + (t_0 + ((t_1 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))) + t_4))));
} else {
tmp = x1 + (t_2 + (x1 + (t_0 + (t_4 + (t_1 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = 3.0 * ((x2 * -2.0) - x1) t_3 = x1 * (x1 * 3.0) t_4 = 3.0 * t_3 t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1 tmp = 0 if x1 <= 7.8e+148: tmp = x1 + (t_2 + (x1 + (t_0 + ((t_1 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))) + t_4)))) else: tmp = x1 + (t_2 + (x1 + (t_0 + (t_4 + (t_1 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(3.0 * t_3) t_5 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if (x1 <= 7.8e+148) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(t_0 + Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)))) + t_4))))); else tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_1 * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = 3.0 * ((x2 * -2.0) - x1); t_3 = x1 * (x1 * 3.0); t_4 = 3.0 * t_3; t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if (x1 <= 7.8e+148) tmp = x1 + (t_2 + (x1 + (t_0 + ((t_1 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))) + t_4)))); else tmp = x1 + (t_2 + (x1 + (t_0 + (t_4 + (t_1 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, 7.8e+148], N[(x1 + N[(t$95$2 + N[(x1 + N[(t$95$0 + N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$2 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$1 * N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := 3 \cdot t\_3\\
t_5 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq 7.8 \cdot 10^{+148}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + \left(t\_0 + \left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \left(t\_5 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right)\right) + t\_4\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + \left(t\_0 + \left(t\_4 + t\_1 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < 7.80000000000000004e148Initial program 79.9%
Taylor expanded in x1 around inf 78.8%
Taylor expanded in x1 around 0 79.9%
mul-1-neg79.9%
unsub-neg79.9%
*-commutative79.9%
Simplified79.9%
if 7.80000000000000004e148 < x1 Initial program 3.1%
Taylor expanded in x1 around inf 3.1%
Taylor expanded in x1 around 0 3.1%
mul-1-neg3.1%
unsub-neg3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 84.4%
Final simplification80.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0))
(t_4 (* 3.0 t_2)))
(if (or (<= x1 -0.00225)
(and (not (<= x1 -3.25e-225))
(or (<= x1 6.8e-218)
(and (not (<= x1 2.4)) (<= x1 8.5e+148)))))
(+
x1
(+
(+
x1
(+
t_1
(+
t_4
(* t_0 (+ (* (* (* x1 2.0) t_3) (- t_3 3.0)) (* (* x1 x1) 6.0))))))
(* 3.0 (* x2 -2.0))))
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+ t_1 (+ t_4 (* t_0 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = 3.0 * t_2;
double tmp;
if ((x1 <= -0.00225) || (!(x1 <= -3.25e-225) && ((x1 <= 6.8e-218) || (!(x1 <= 2.4) && (x1 <= 8.5e+148))))) {
tmp = x1 + ((x1 + (t_1 + (t_4 + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_1 + (t_4 + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
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
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
t_4 = 3.0d0 * t_2
if ((x1 <= (-0.00225d0)) .or. (.not. (x1 <= (-3.25d-225))) .and. (x1 <= 6.8d-218) .or. (.not. (x1 <= 2.4d0)) .and. (x1 <= 8.5d+148)) then
tmp = x1 + ((x1 + (t_1 + (t_4 + (t_0 * ((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))) + (3.0d0 * (x2 * (-2.0d0))))
else
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (t_1 + (t_4 + (t_0 * (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = 3.0 * t_2;
double tmp;
if ((x1 <= -0.00225) || (!(x1 <= -3.25e-225) && ((x1 <= 6.8e-218) || (!(x1 <= 2.4) && (x1 <= 8.5e+148))))) {
tmp = x1 + ((x1 + (t_1 + (t_4 + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_1 + (t_4 + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0 t_4 = 3.0 * t_2 tmp = 0 if (x1 <= -0.00225) or (not (x1 <= -3.25e-225) and ((x1 <= 6.8e-218) or (not (x1 <= 2.4) and (x1 <= 8.5e+148)))): tmp = x1 + ((x1 + (t_1 + (t_4 + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))) else: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_1 + (t_4 + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) t_4 = Float64(3.0 * t_2) tmp = 0.0 if ((x1 <= -0.00225) || (!(x1 <= -3.25e-225) && ((x1 <= 6.8e-218) || (!(x1 <= 2.4) && (x1 <= 8.5e+148))))) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(t_4 + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))) + Float64(3.0 * Float64(x2 * -2.0)))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(t_1 + Float64(t_4 + Float64(t_0 * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0; t_4 = 3.0 * t_2; tmp = 0.0; if ((x1 <= -0.00225) || (~((x1 <= -3.25e-225)) && ((x1 <= 6.8e-218) || (~((x1 <= 2.4)) && (x1 <= 8.5e+148))))) tmp = x1 + ((x1 + (t_1 + (t_4 + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))); else tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_1 + (t_4 + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * t$95$2), $MachinePrecision]}, If[Or[LessEqual[x1, -0.00225], And[N[Not[LessEqual[x1, -3.25e-225]], $MachinePrecision], Or[LessEqual[x1, 6.8e-218], And[N[Not[LessEqual[x1, 2.4]], $MachinePrecision], LessEqual[x1, 8.5e+148]]]]], N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(t$95$4 + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 + N[(t$95$4 + N[(t$95$0 * N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_0}\\
t_4 := 3 \cdot t\_2\\
\mathbf{if}\;x1 \leq -0.00225 \lor \neg \left(x1 \leq -3.25 \cdot 10^{-225}\right) \land \left(x1 \leq 6.8 \cdot 10^{-218} \lor \neg \left(x1 \leq 2.4\right) \land x1 \leq 8.5 \cdot 10^{+148}\right):\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_1 + \left(t\_4 + t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(t\_1 + \left(t\_4 + t\_0 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -0.00224999999999999983 or -3.2500000000000002e-225 < x1 < 6.79999999999999971e-218 or 2.39999999999999991 < x1 < 8.4999999999999996e148Initial program 64.7%
Taylor expanded in x1 around inf 64.7%
Taylor expanded in x1 around inf 60.9%
Taylor expanded in x1 around 0 60.2%
*-commutative60.2%
Simplified60.2%
if -0.00224999999999999983 < x1 < -3.2500000000000002e-225 or 6.79999999999999971e-218 < x1 < 2.39999999999999991 or 8.4999999999999996e148 < x1 Initial program 75.7%
Taylor expanded in x1 around inf 73.8%
Taylor expanded in x1 around 0 75.7%
mul-1-neg75.7%
unsub-neg75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in x1 around 0 90.6%
Final simplification75.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* 3.0 t_1))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (* 3.0 (- (* x2 -2.0) x1)))
(t_5 (/ (- (+ t_1 (* 2.0 x2)) x1) t_3))
(t_6 (- t_5 3.0)))
(if (<= x1 -310.0)
(+
x1
(+
t_4
(+
x1
(+
t_0
(+
t_2
(*
t_3
(+
(* (* x1 x1) (- (* t_5 4.0) 6.0))
(* t_6 (* (* x1 2.0) 3.0)))))))))
(if (or (<= x1 -2.06e-225)
(not
(or (<= x1 1.7e-214) (and (not (<= x1 2.4)) (<= x1 1e+147)))))
(+
x1
(+
t_4
(+
x1
(+ t_0 (+ t_2 (* t_3 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0))))))))))
(+
x1
(+
(+
x1
(+
t_0
(+ t_2 (* t_3 (+ (* (* (* x1 2.0) t_5) t_6) (* (* x1 x1) 6.0))))))
(* 3.0 (* x2 -2.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * t_1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 * ((x2 * -2.0) - x1);
double t_5 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_6 = t_5 - 3.0;
double tmp;
if (x1 <= -310.0) {
tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * ((x1 * 2.0) * 3.0))))))));
} else if ((x1 <= -2.06e-225) || !((x1 <= 1.7e-214) || (!(x1 <= 2.4) && (x1 <= 1e+147)))) {
tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
} else {
tmp = x1 + ((x1 + (t_0 + (t_2 + (t_3 * ((((x1 * 2.0) * t_5) * t_6) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
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
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = 3.0d0 * t_1
t_3 = (x1 * x1) + 1.0d0
t_4 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_5 = ((t_1 + (2.0d0 * x2)) - x1) / t_3
t_6 = t_5 - 3.0d0
if (x1 <= (-310.0d0)) then
tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)) + (t_6 * ((x1 * 2.0d0) * 3.0d0))))))))
else if ((x1 <= (-2.06d-225)) .or. (.not. (x1 <= 1.7d-214) .or. (.not. (x1 <= 2.4d0)) .and. (x1 <= 1d+147))) then
tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))))))))
else
tmp = x1 + ((x1 + (t_0 + (t_2 + (t_3 * ((((x1 * 2.0d0) * t_5) * t_6) + ((x1 * x1) * 6.0d0)))))) + (3.0d0 * (x2 * (-2.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * t_1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 * ((x2 * -2.0) - x1);
double t_5 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_6 = t_5 - 3.0;
double tmp;
if (x1 <= -310.0) {
tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * ((x1 * 2.0) * 3.0))))))));
} else if ((x1 <= -2.06e-225) || !((x1 <= 1.7e-214) || (!(x1 <= 2.4) && (x1 <= 1e+147)))) {
tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
} else {
tmp = x1 + ((x1 + (t_0 + (t_2 + (t_3 * ((((x1 * 2.0) * t_5) * t_6) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = 3.0 * t_1 t_3 = (x1 * x1) + 1.0 t_4 = 3.0 * ((x2 * -2.0) - x1) t_5 = ((t_1 + (2.0 * x2)) - x1) / t_3 t_6 = t_5 - 3.0 tmp = 0 if x1 <= -310.0: tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * ((x1 * 2.0) * 3.0)))))))) elif (x1 <= -2.06e-225) or not ((x1 <= 1.7e-214) or (not (x1 <= 2.4) and (x1 <= 1e+147))): tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))) else: tmp = x1 + ((x1 + (t_0 + (t_2 + (t_3 * ((((x1 * 2.0) * t_5) * t_6) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(3.0 * t_1) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_5 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_3) t_6 = Float64(t_5 - 3.0) tmp = 0.0 if (x1 <= -310.0) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_0 + Float64(t_2 + Float64(t_3 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) + Float64(t_6 * Float64(Float64(x1 * 2.0) * 3.0))))))))); elseif ((x1 <= -2.06e-225) || !((x1 <= 1.7e-214) || (!(x1 <= 2.4) && (x1 <= 1e+147)))) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_0 + Float64(t_2 + Float64(t_3 * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_0 + Float64(t_2 + Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * t_6) + Float64(Float64(x1 * x1) * 6.0)))))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = 3.0 * t_1; t_3 = (x1 * x1) + 1.0; t_4 = 3.0 * ((x2 * -2.0) - x1); t_5 = ((t_1 + (2.0 * x2)) - x1) / t_3; t_6 = t_5 - 3.0; tmp = 0.0; if (x1 <= -310.0) tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * ((x1 * 2.0) * 3.0)))))))); elseif ((x1 <= -2.06e-225) || ~(((x1 <= 1.7e-214) || (~((x1 <= 2.4)) && (x1 <= 1e+147))))) tmp = x1 + (t_4 + (x1 + (t_0 + (t_2 + (t_3 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))); else tmp = x1 + ((x1 + (t_0 + (t_2 + (t_3 * ((((x1 * 2.0) * t_5) * t_6) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 - 3.0), $MachinePrecision]}, If[LessEqual[x1, -310.0], N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$0 + N[(t$95$2 + N[(t$95$3 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$6 * N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -2.06e-225], N[Not[Or[LessEqual[x1, 1.7e-214], And[N[Not[LessEqual[x1, 2.4]], $MachinePrecision], LessEqual[x1, 1e+147]]]], $MachinePrecision]], N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$0 + N[(t$95$2 + N[(t$95$3 * N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(t$95$0 + N[(t$95$2 + N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * t$95$6), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 3 \cdot t\_1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_5 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_3}\\
t_6 := t\_5 - 3\\
\mathbf{if}\;x1 \leq -310:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + \left(t\_0 + \left(t\_2 + t\_3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right) + t\_6 \cdot \left(\left(x1 \cdot 2\right) \cdot 3\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.06 \cdot 10^{-225} \lor \neg \left(x1 \leq 1.7 \cdot 10^{-214} \lor \neg \left(x1 \leq 2.4\right) \land x1 \leq 10^{+147}\right):\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + \left(t\_0 + \left(t\_2 + t\_3 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_0 + \left(t\_2 + t\_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot t\_6 + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if x1 < -310Initial program 30.4%
Taylor expanded in x1 around inf 30.4%
Taylor expanded in x1 around 0 30.4%
mul-1-neg30.4%
unsub-neg30.4%
*-commutative30.4%
Simplified30.4%
Taylor expanded in x1 around inf 27.2%
if -310 < x1 < -2.06e-225 or 1.7e-214 < x1 < 2.39999999999999991 or 9.9999999999999998e146 < x1 Initial program 75.7%
Taylor expanded in x1 around inf 73.8%
Taylor expanded in x1 around 0 75.7%
mul-1-neg75.7%
unsub-neg75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in x1 around 0 90.6%
if -2.06e-225 < x1 < 1.7e-214 or 2.39999999999999991 < x1 < 9.9999999999999998e146Initial program 97.9%
Taylor expanded in x1 around inf 97.9%
Taylor expanded in x1 around inf 93.9%
Taylor expanded in x1 around 0 92.5%
*-commutative92.5%
Simplified92.5%
Final simplification75.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* 3.0 t_1))
(t_3 (* 3.0 (- (* x2 -2.0) x1)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (/ (- (+ t_1 (* 2.0 x2)) x1) t_4))
(t_6 (* (* x1 2.0) t_5))
(t_7 (- (* 2.0 x2) 3.0)))
(if (<= x1 0.0038)
(+
x1
(+
t_3
(+
x1
(+
t_0
(+ t_2 (* t_4 (+ (* (* x1 x1) (- (* t_5 4.0) 6.0)) (* t_6 t_7))))))))
(if (<= x1 1e+145)
(+
x1
(+
t_3
(+
x1
(+
t_0
(+
t_2
(*
t_4
(+
(* t_6 (- t_5 3.0))
(* (* x1 x1) (- (* 4.0 (+ 3.0 (/ -1.0 x1))) 6.0)))))))))
(+
x1
(+ t_3 (+ x1 (+ t_0 (+ t_2 (* t_4 (* 4.0 (* x1 (* x2 t_7)))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * t_1;
double t_3 = 3.0 * ((x2 * -2.0) - x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = ((t_1 + (2.0 * x2)) - x1) / t_4;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = (2.0 * x2) - 3.0;
double tmp;
if (x1 <= 0.0038) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * t_7)))))));
} else if (x1 <= 1e+145) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0))))))));
} else {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (4.0 * (x1 * (x2 * t_7))))))));
}
return tmp;
}
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
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = 3.0d0 * t_1
t_3 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_4 = (x1 * x1) + 1.0d0
t_5 = ((t_1 + (2.0d0 * x2)) - x1) / t_4
t_6 = (x1 * 2.0d0) * t_5
t_7 = (2.0d0 * x2) - 3.0d0
if (x1 <= 0.0038d0) then
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)) + (t_6 * t_7)))))))
else if (x1 <= 1d+145) then
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * ((t_6 * (t_5 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * (3.0d0 + ((-1.0d0) / x1))) - 6.0d0))))))))
else
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (4.0d0 * (x1 * (x2 * t_7))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * t_1;
double t_3 = 3.0 * ((x2 * -2.0) - x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = ((t_1 + (2.0 * x2)) - x1) / t_4;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = (2.0 * x2) - 3.0;
double tmp;
if (x1 <= 0.0038) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * t_7)))))));
} else if (x1 <= 1e+145) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0))))))));
} else {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (4.0 * (x1 * (x2 * t_7))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = 3.0 * t_1 t_3 = 3.0 * ((x2 * -2.0) - x1) t_4 = (x1 * x1) + 1.0 t_5 = ((t_1 + (2.0 * x2)) - x1) / t_4 t_6 = (x1 * 2.0) * t_5 t_7 = (2.0 * x2) - 3.0 tmp = 0 if x1 <= 0.0038: tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * t_7))))))) elif x1 <= 1e+145: tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0)))))))) else: tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (4.0 * (x1 * (x2 * t_7)))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(3.0 * t_1) t_3 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_4) t_6 = Float64(Float64(x1 * 2.0) * t_5) t_7 = Float64(Float64(2.0 * x2) - 3.0) tmp = 0.0 if (x1 <= 0.0038) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(t_2 + Float64(t_4 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) + Float64(t_6 * t_7)))))))); elseif (x1 <= 1e+145) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(t_2 + Float64(t_4 * Float64(Float64(t_6 * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(3.0 + Float64(-1.0 / x1))) - 6.0))))))))); else tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(t_2 + Float64(t_4 * Float64(4.0 * Float64(x1 * Float64(x2 * t_7))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = 3.0 * t_1; t_3 = 3.0 * ((x2 * -2.0) - x1); t_4 = (x1 * x1) + 1.0; t_5 = ((t_1 + (2.0 * x2)) - x1) / t_4; t_6 = (x1 * 2.0) * t_5; t_7 = (2.0 * x2) - 3.0; tmp = 0.0; if (x1 <= 0.0038) tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * t_7))))))); elseif (x1 <= 1e+145) tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0)))))))); else tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (4.0 * (x1 * (x2 * t_7)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, If[LessEqual[x1, 0.0038], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(t$95$2 + N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$6 * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+145], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(t$95$2 + N[(t$95$4 * N[(N[(t$95$6 * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(t$95$2 + N[(t$95$4 * N[(4.0 * N[(x1 * N[(x2 * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 3 \cdot t\_1\\
t_3 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_4}\\
t_6 := \left(x1 \cdot 2\right) \cdot t\_5\\
t_7 := 2 \cdot x2 - 3\\
\mathbf{if}\;x1 \leq 0.0038:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(t\_0 + \left(t\_2 + t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right) + t\_6 \cdot t\_7\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{+145}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(t\_0 + \left(t\_2 + t\_4 \cdot \left(t\_6 \cdot \left(t\_5 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 + \frac{-1}{x1}\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(t\_0 + \left(t\_2 + t\_4 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot t\_7\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < 0.00379999999999999999Initial program 76.9%
Taylor expanded in x1 around inf 76.0%
Taylor expanded in x1 around 0 76.9%
mul-1-neg76.9%
unsub-neg76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in x1 around 0 75.5%
if 0.00379999999999999999 < x1 < 9.9999999999999999e144Initial program 96.4%
Taylor expanded in x1 around inf 94.2%
Taylor expanded in x1 around 0 96.4%
mul-1-neg96.4%
unsub-neg96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in x1 around inf 87.4%
if 9.9999999999999999e144 < x1 Initial program 3.1%
Taylor expanded in x1 around inf 3.1%
Taylor expanded in x1 around 0 3.1%
mul-1-neg3.1%
unsub-neg3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 84.4%
Final simplification78.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* 3.0 t_2))
(t_4 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0)))
(if (<= x1 8.5e+148)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+
x1
(+
t_1
(+
t_3
(* t_0 (+ (* (* (* x1 2.0) t_4) (- t_4 3.0)) (* (* x1 x1) 6.0))))))))
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+ t_1 (+ t_3 (* t_0 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * t_2;
double t_4 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= 8.5e+148) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_3 + (t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_1 + (t_3 + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
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
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = 3.0d0 * t_2
t_4 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= 8.5d+148) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_3 + (t_0 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (t_1 + (t_3 + (t_0 * (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * t_2;
double t_4 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= 8.5e+148) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_3 + (t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_1 + (t_3 + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = 3.0 * t_2 t_4 = ((t_2 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= 8.5e+148: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_3 + (t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0))))))) else: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_1 + (t_3 + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(3.0 * t_2) t_4 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= 8.5e+148) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(t_1 + Float64(t_3 + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(t_1 + Float64(t_3 + Float64(t_0 * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = 3.0 * t_2; t_4 = ((t_2 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= 8.5e+148) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_3 + (t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0))))))); else tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_1 + (t_3 + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, 8.5e+148], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 + N[(t$95$3 + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 + N[(t$95$3 + N[(t$95$0 * N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 3 \cdot t\_2\\
t_4 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq 8.5 \cdot 10^{+148}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(t\_1 + \left(t\_3 + t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(t\_1 + \left(t\_3 + t\_0 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < 8.4999999999999996e148Initial program 79.9%
Taylor expanded in x1 around inf 78.8%
Taylor expanded in x1 around inf 76.6%
if 8.4999999999999996e148 < x1 Initial program 3.1%
Taylor expanded in x1 around inf 3.1%
Taylor expanded in x1 around 0 3.1%
mul-1-neg3.1%
unsub-neg3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 84.4%
Final simplification77.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* 3.0 t_1))
(t_3 (* 3.0 (- (* x2 -2.0) x1)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (/ (- (+ t_1 (* 2.0 x2)) x1) t_4))
(t_6 (* (* x1 2.0) t_5))
(t_7 (- (* 2.0 x2) 3.0)))
(if (<= x1 0.0255)
(+
x1
(+
t_3
(+
x1
(+
t_0
(+ t_2 (* t_4 (+ (* (* x1 x1) (- (* t_5 4.0) 6.0)) (* t_6 t_7))))))))
(if (<= x1 8e+148)
(+
x1
(+
(+
x1
(+ t_0 (+ t_2 (* t_4 (+ (* t_6 (- t_5 3.0)) (* (* x1 x1) 6.0))))))
(* 3.0 (* x2 -2.0))))
(+
x1
(+ t_3 (+ x1 (+ t_0 (+ t_2 (* t_4 (* 4.0 (* x1 (* x2 t_7)))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * t_1;
double t_3 = 3.0 * ((x2 * -2.0) - x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = ((t_1 + (2.0 * x2)) - x1) / t_4;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = (2.0 * x2) - 3.0;
double tmp;
if (x1 <= 0.0255) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * t_7)))))));
} else if (x1 <= 8e+148) {
tmp = x1 + ((x1 + (t_0 + (t_2 + (t_4 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (4.0 * (x1 * (x2 * t_7))))))));
}
return tmp;
}
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
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = 3.0d0 * t_1
t_3 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_4 = (x1 * x1) + 1.0d0
t_5 = ((t_1 + (2.0d0 * x2)) - x1) / t_4
t_6 = (x1 * 2.0d0) * t_5
t_7 = (2.0d0 * x2) - 3.0d0
if (x1 <= 0.0255d0) then
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)) + (t_6 * t_7)))))))
else if (x1 <= 8d+148) then
tmp = x1 + ((x1 + (t_0 + (t_2 + (t_4 * ((t_6 * (t_5 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))) + (3.0d0 * (x2 * (-2.0d0))))
else
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (4.0d0 * (x1 * (x2 * t_7))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * t_1;
double t_3 = 3.0 * ((x2 * -2.0) - x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = ((t_1 + (2.0 * x2)) - x1) / t_4;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = (2.0 * x2) - 3.0;
double tmp;
if (x1 <= 0.0255) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * t_7)))))));
} else if (x1 <= 8e+148) {
tmp = x1 + ((x1 + (t_0 + (t_2 + (t_4 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (4.0 * (x1 * (x2 * t_7))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = 3.0 * t_1 t_3 = 3.0 * ((x2 * -2.0) - x1) t_4 = (x1 * x1) + 1.0 t_5 = ((t_1 + (2.0 * x2)) - x1) / t_4 t_6 = (x1 * 2.0) * t_5 t_7 = (2.0 * x2) - 3.0 tmp = 0 if x1 <= 0.0255: tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * t_7))))))) elif x1 <= 8e+148: tmp = x1 + ((x1 + (t_0 + (t_2 + (t_4 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))) else: tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (4.0 * (x1 * (x2 * t_7)))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(3.0 * t_1) t_3 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_4) t_6 = Float64(Float64(x1 * 2.0) * t_5) t_7 = Float64(Float64(2.0 * x2) - 3.0) tmp = 0.0 if (x1 <= 0.0255) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(t_2 + Float64(t_4 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) + Float64(t_6 * t_7)))))))); elseif (x1 <= 8e+148) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_0 + Float64(t_2 + Float64(t_4 * Float64(Float64(t_6 * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))) + Float64(3.0 * Float64(x2 * -2.0)))); else tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(t_2 + Float64(t_4 * Float64(4.0 * Float64(x1 * Float64(x2 * t_7))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = 3.0 * t_1; t_3 = 3.0 * ((x2 * -2.0) - x1); t_4 = (x1 * x1) + 1.0; t_5 = ((t_1 + (2.0 * x2)) - x1) / t_4; t_6 = (x1 * 2.0) * t_5; t_7 = (2.0 * x2) - 3.0; tmp = 0.0; if (x1 <= 0.0255) tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * t_7))))))); elseif (x1 <= 8e+148) tmp = x1 + ((x1 + (t_0 + (t_2 + (t_4 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))); else tmp = x1 + (t_3 + (x1 + (t_0 + (t_2 + (t_4 * (4.0 * (x1 * (x2 * t_7)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, If[LessEqual[x1, 0.0255], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(t$95$2 + N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$6 * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8e+148], N[(x1 + N[(N[(x1 + N[(t$95$0 + N[(t$95$2 + N[(t$95$4 * N[(N[(t$95$6 * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(t$95$2 + N[(t$95$4 * N[(4.0 * N[(x1 * N[(x2 * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 3 \cdot t\_1\\
t_3 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_4}\\
t_6 := \left(x1 \cdot 2\right) \cdot t\_5\\
t_7 := 2 \cdot x2 - 3\\
\mathbf{if}\;x1 \leq 0.0255:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(t\_0 + \left(t\_2 + t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right) + t\_6 \cdot t\_7\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8 \cdot 10^{+148}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_0 + \left(t\_2 + t\_4 \cdot \left(t\_6 \cdot \left(t\_5 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(t\_0 + \left(t\_2 + t\_4 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot t\_7\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < 0.0254999999999999984Initial program 76.9%
Taylor expanded in x1 around inf 76.0%
Taylor expanded in x1 around 0 76.9%
mul-1-neg76.9%
unsub-neg76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in x1 around 0 75.5%
if 0.0254999999999999984 < x1 < 8.0000000000000004e148Initial program 96.4%
Taylor expanded in x1 around inf 94.2%
Taylor expanded in x1 around inf 86.6%
Taylor expanded in x1 around 0 86.6%
*-commutative86.6%
Simplified86.6%
if 8.0000000000000004e148 < x1 Initial program 3.1%
Taylor expanded in x1 around inf 3.1%
Taylor expanded in x1 around 0 3.1%
mul-1-neg3.1%
unsub-neg3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 84.4%
Final simplification78.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* 3.0 t_0))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* x1 (* x1 x1))))
(if (or (<= x1 -9800.0) (and (not (<= x1 1700000.0)) (<= x1 8.5e+148)))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(+
x1
(+
t_3
(+
t_1
(*
t_2
(+
(* x1 2.0)
(*
(* x1 x1)
(- (* (/ (- (+ t_0 (* 2.0 x2)) x1) t_2) 4.0) 6.0)))))))))
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+ t_3 (+ t_1 (* t_2 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 3.0 * t_0;
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 * (x1 * x1);
double tmp;
if ((x1 <= -9800.0) || (!(x1 <= 1700000.0) && (x1 <= 8.5e+148))) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_3 + (t_1 + (t_2 * ((x1 * 2.0) + ((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0))))))));
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_3 + (t_1 + (t_2 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
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
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 3.0d0 * t_0
t_2 = (x1 * x1) + 1.0d0
t_3 = x1 * (x1 * x1)
if ((x1 <= (-9800.0d0)) .or. (.not. (x1 <= 1700000.0d0)) .and. (x1 <= 8.5d+148)) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (t_3 + (t_1 + (t_2 * ((x1 * 2.0d0) + ((x1 * x1) * (((((t_0 + (2.0d0 * x2)) - x1) / t_2) * 4.0d0) - 6.0d0))))))))
else
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (t_3 + (t_1 + (t_2 * (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 3.0 * t_0;
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 * (x1 * x1);
double tmp;
if ((x1 <= -9800.0) || (!(x1 <= 1700000.0) && (x1 <= 8.5e+148))) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_3 + (t_1 + (t_2 * ((x1 * 2.0) + ((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0))))))));
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_3 + (t_1 + (t_2 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 3.0 * t_0 t_2 = (x1 * x1) + 1.0 t_3 = x1 * (x1 * x1) tmp = 0 if (x1 <= -9800.0) or (not (x1 <= 1700000.0) and (x1 <= 8.5e+148)): tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_3 + (t_1 + (t_2 * ((x1 * 2.0) + ((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)))))))) else: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_3 + (t_1 + (t_2 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(3.0 * t_0) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if ((x1 <= -9800.0) || (!(x1 <= 1700000.0) && (x1 <= 8.5e+148))) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(t_3 + Float64(t_1 + Float64(t_2 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) * 4.0) - 6.0))))))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(t_3 + Float64(t_1 + Float64(t_2 * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = 3.0 * t_0; t_2 = (x1 * x1) + 1.0; t_3 = x1 * (x1 * x1); tmp = 0.0; if ((x1 <= -9800.0) || (~((x1 <= 1700000.0)) && (x1 <= 8.5e+148))) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_3 + (t_1 + (t_2 * ((x1 * 2.0) + ((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)))))))); else tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_3 + (t_1 + (t_2 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x1, -9800.0], And[N[Not[LessEqual[x1, 1700000.0]], $MachinePrecision], LessEqual[x1, 8.5e+148]]], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$3 + N[(t$95$1 + N[(t$95$2 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$3 + N[(t$95$1 + N[(t$95$2 * N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 3 \cdot t\_0\\
t_2 := x1 \cdot x1 + 1\\
t_3 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 \leq -9800 \lor \neg \left(x1 \leq 1700000\right) \land x1 \leq 8.5 \cdot 10^{+148}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2} + \left(x1 + \left(t\_3 + \left(t\_1 + t\_2 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2} \cdot 4 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(t\_3 + \left(t\_1 + t\_2 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -9800 or 1.7e6 < x1 < 8.4999999999999996e148Initial program 52.4%
Taylor expanded in x1 around 0 42.5%
+-commutative42.5%
mul-1-neg42.5%
sub-neg42.5%
Simplified42.5%
Taylor expanded in x1 around inf 43.5%
Taylor expanded in x1 around inf 43.5%
if -9800 < x1 < 1.7e6 or 8.4999999999999996e148 < x1 Initial program 80.5%
Taylor expanded in x1 around inf 79.0%
Taylor expanded in x1 around 0 80.5%
mul-1-neg80.5%
unsub-neg80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x1 around 0 86.8%
Final simplification71.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* t_0 (+ (* x1 2.0) (* (* x1 x1) 6.0))))
(t_3 (* x1 (* x1 3.0)))
(t_4 (* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_0)))
(t_5 (* 3.0 t_3)))
(if (<= x1 -104000.0)
(+ x1 (+ t_4 (+ x1 (+ t_1 (+ t_5 t_2)))))
(if (or (<= x1 38000000.0) (not (<= x1 1e+145)))
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+ t_1 (+ t_5 (* t_0 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0))))))))))
(+ x1 (+ t_4 (+ x1 (+ t_1 (+ t_2 (* t_3 (* 2.0 x2)))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = t_0 * ((x1 * 2.0) + ((x1 * x1) * 6.0));
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0);
double t_5 = 3.0 * t_3;
double tmp;
if (x1 <= -104000.0) {
tmp = x1 + (t_4 + (x1 + (t_1 + (t_5 + t_2))));
} else if ((x1 <= 38000000.0) || !(x1 <= 1e+145)) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_1 + (t_5 + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
} else {
tmp = x1 + (t_4 + (x1 + (t_1 + (t_2 + (t_3 * (2.0 * x2))))));
}
return tmp;
}
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
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = t_0 * ((x1 * 2.0d0) + ((x1 * x1) * 6.0d0))
t_3 = x1 * (x1 * 3.0d0)
t_4 = 3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_0)
t_5 = 3.0d0 * t_3
if (x1 <= (-104000.0d0)) then
tmp = x1 + (t_4 + (x1 + (t_1 + (t_5 + t_2))))
else if ((x1 <= 38000000.0d0) .or. (.not. (x1 <= 1d+145))) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (t_1 + (t_5 + (t_0 * (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))))))))
else
tmp = x1 + (t_4 + (x1 + (t_1 + (t_2 + (t_3 * (2.0d0 * x2))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = t_0 * ((x1 * 2.0) + ((x1 * x1) * 6.0));
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0);
double t_5 = 3.0 * t_3;
double tmp;
if (x1 <= -104000.0) {
tmp = x1 + (t_4 + (x1 + (t_1 + (t_5 + t_2))));
} else if ((x1 <= 38000000.0) || !(x1 <= 1e+145)) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_1 + (t_5 + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
} else {
tmp = x1 + (t_4 + (x1 + (t_1 + (t_2 + (t_3 * (2.0 * x2))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = t_0 * ((x1 * 2.0) + ((x1 * x1) * 6.0)) t_3 = x1 * (x1 * 3.0) t_4 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0) t_5 = 3.0 * t_3 tmp = 0 if x1 <= -104000.0: tmp = x1 + (t_4 + (x1 + (t_1 + (t_5 + t_2)))) elif (x1 <= 38000000.0) or not (x1 <= 1e+145): tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_1 + (t_5 + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))) else: tmp = x1 + (t_4 + (x1 + (t_1 + (t_2 + (t_3 * (2.0 * x2)))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(t_0 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * 6.0))) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_0)) t_5 = Float64(3.0 * t_3) tmp = 0.0 if (x1 <= -104000.0) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_1 + Float64(t_5 + t_2))))); elseif ((x1 <= 38000000.0) || !(x1 <= 1e+145)) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(t_1 + Float64(t_5 + Float64(t_0 * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))))))); else tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_1 + Float64(t_2 + Float64(t_3 * Float64(2.0 * x2))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = t_0 * ((x1 * 2.0) + ((x1 * x1) * 6.0)); t_3 = x1 * (x1 * 3.0); t_4 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0); t_5 = 3.0 * t_3; tmp = 0.0; if (x1 <= -104000.0) tmp = x1 + (t_4 + (x1 + (t_1 + (t_5 + t_2)))); elseif ((x1 <= 38000000.0) || ~((x1 <= 1e+145))) tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_1 + (t_5 + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))); else tmp = x1 + (t_4 + (x1 + (t_1 + (t_2 + (t_3 * (2.0 * x2)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * t$95$3), $MachinePrecision]}, If[LessEqual[x1, -104000.0], N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$1 + N[(t$95$5 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, 38000000.0], N[Not[LessEqual[x1, 1e+145]], $MachinePrecision]], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 + N[(t$95$5 + N[(t$95$0 * N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$1 + N[(t$95$2 + N[(t$95$3 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := t\_0 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot 6\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_0}\\
t_5 := 3 \cdot t\_3\\
\mathbf{if}\;x1 \leq -104000:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + \left(t\_1 + \left(t\_5 + t\_2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 38000000 \lor \neg \left(x1 \leq 10^{+145}\right):\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(t\_1 + \left(t\_5 + t\_0 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + \left(t\_1 + \left(t\_2 + t\_3 \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -104000Initial program 30.4%
Taylor expanded in x1 around 0 25.0%
+-commutative25.0%
mul-1-neg25.0%
sub-neg25.0%
Simplified25.0%
Taylor expanded in x1 around inf 26.4%
Taylor expanded in x1 around inf 23.6%
Taylor expanded in x1 around inf 23.7%
if -104000 < x1 < 3.8e7 or 9.9999999999999999e144 < x1 Initial program 80.5%
Taylor expanded in x1 around inf 79.0%
Taylor expanded in x1 around 0 80.5%
mul-1-neg80.5%
unsub-neg80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x1 around 0 86.8%
if 3.8e7 < x1 < 9.9999999999999999e144Initial program 96.2%
Taylor expanded in x1 around 0 77.7%
+-commutative77.7%
mul-1-neg77.7%
sub-neg77.7%
Simplified77.7%
Taylor expanded in x1 around inf 77.6%
Taylor expanded in x1 around inf 71.0%
Taylor expanded in x1 around 0 72.5%
Final simplification69.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* 3.0 t_0))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* x1 (* x1 x1))))
(if (or (<= x1 -22000.0) (and (not (<= x1 11000000.0)) (<= x1 8e+148)))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(+ x1 (+ t_3 (+ t_1 (* t_2 (+ (* x1 2.0) (* (* x1 x1) 6.0))))))))
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+ t_3 (+ t_1 (* t_2 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 3.0 * t_0;
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 * (x1 * x1);
double tmp;
if ((x1 <= -22000.0) || (!(x1 <= 11000000.0) && (x1 <= 8e+148))) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_3 + (t_1 + (t_2 * ((x1 * 2.0) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_3 + (t_1 + (t_2 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
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
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 3.0d0 * t_0
t_2 = (x1 * x1) + 1.0d0
t_3 = x1 * (x1 * x1)
if ((x1 <= (-22000.0d0)) .or. (.not. (x1 <= 11000000.0d0)) .and. (x1 <= 8d+148)) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (t_3 + (t_1 + (t_2 * ((x1 * 2.0d0) + ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (t_3 + (t_1 + (t_2 * (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 3.0 * t_0;
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 * (x1 * x1);
double tmp;
if ((x1 <= -22000.0) || (!(x1 <= 11000000.0) && (x1 <= 8e+148))) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_3 + (t_1 + (t_2 * ((x1 * 2.0) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_3 + (t_1 + (t_2 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 3.0 * t_0 t_2 = (x1 * x1) + 1.0 t_3 = x1 * (x1 * x1) tmp = 0 if (x1 <= -22000.0) or (not (x1 <= 11000000.0) and (x1 <= 8e+148)): tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_3 + (t_1 + (t_2 * ((x1 * 2.0) + ((x1 * x1) * 6.0))))))) else: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_3 + (t_1 + (t_2 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(3.0 * t_0) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if ((x1 <= -22000.0) || (!(x1 <= 11000000.0) && (x1 <= 8e+148))) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(t_3 + Float64(t_1 + Float64(t_2 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(t_3 + Float64(t_1 + Float64(t_2 * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = 3.0 * t_0; t_2 = (x1 * x1) + 1.0; t_3 = x1 * (x1 * x1); tmp = 0.0; if ((x1 <= -22000.0) || (~((x1 <= 11000000.0)) && (x1 <= 8e+148))) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_3 + (t_1 + (t_2 * ((x1 * 2.0) + ((x1 * x1) * 6.0))))))); else tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (t_3 + (t_1 + (t_2 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x1, -22000.0], And[N[Not[LessEqual[x1, 11000000.0]], $MachinePrecision], LessEqual[x1, 8e+148]]], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$3 + N[(t$95$1 + N[(t$95$2 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$3 + N[(t$95$1 + N[(t$95$2 * N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 3 \cdot t\_0\\
t_2 := x1 \cdot x1 + 1\\
t_3 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 \leq -22000 \lor \neg \left(x1 \leq 11000000\right) \land x1 \leq 8 \cdot 10^{+148}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2} + \left(x1 + \left(t\_3 + \left(t\_1 + t\_2 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(t\_3 + \left(t\_1 + t\_2 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -22000 or 1.1e7 < x1 < 8.0000000000000004e148Initial program 52.4%
Taylor expanded in x1 around 0 42.5%
+-commutative42.5%
mul-1-neg42.5%
sub-neg42.5%
Simplified42.5%
Taylor expanded in x1 around inf 43.5%
Taylor expanded in x1 around inf 39.4%
Taylor expanded in x1 around inf 39.5%
if -22000 < x1 < 1.1e7 or 8.0000000000000004e148 < x1 Initial program 80.5%
Taylor expanded in x1 around inf 79.0%
Taylor expanded in x1 around 0 80.5%
mul-1-neg80.5%
unsub-neg80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x1 around 0 86.8%
Final simplification69.6%
(FPCore (x1 x2)
:precision binary64
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 (* x1 (* x1 3.0)))
(* (+ (* x1 x1) 1.0) (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))))))
double code(double x1, double x2) {
return x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * (x1 * (x1 * 3.0))) + (((x1 * x1) + 1.0) * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * (x1 * (x1 * 3.0d0))) + (((x1 * x1) + 1.0d0) * (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))))))))
end function
public static double code(double x1, double x2) {
return x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * (x1 * (x1 * 3.0))) + (((x1 * x1) + 1.0) * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
def code(x1, x2): return x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * (x1 * (x1 * 3.0))) + (((x1 * x1) + 1.0) * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))))
function code(x1, x2) return Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * Float64(x1 * Float64(x1 * 3.0))) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))))))) end
function tmp = code(x1, x2) tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * (x1 * (x1 * 3.0))) + (((x1 * x1) + 1.0) * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))); end
code[x1_, x2_] := N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)
\end{array}
Initial program 70.3%
Taylor expanded in x1 around inf 69.3%
Taylor expanded in x1 around 0 70.3%
mul-1-neg70.3%
unsub-neg70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in x1 around 0 60.9%
Final simplification60.9%
(FPCore (x1 x2) :precision binary64 (+ x1 (+ (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0)) (* x2 -6.0))))
double code(double x1, double x2) {
return x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + ((x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)) + (x2 * (-6.0d0)))
end function
public static double code(double x1, double x2) {
return x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0));
}
def code(x1, x2): return x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0))
function code(x1, x2) return Float64(x1 + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)) + Float64(x2 * -6.0))) end
function tmp = code(x1, x2) tmp = x1 + ((x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)) + (x2 * -6.0)); end
code[x1_, x2_] := N[(x1 + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right) + x2 \cdot -6\right)
\end{array}
Initial program 70.3%
Taylor expanded in x1 around 0 67.4%
*-commutative67.4%
fma-define67.4%
+-commutative67.4%
mul-1-neg67.4%
unsub-neg67.4%
+-commutative67.4%
unpow367.4%
unpow267.4%
distribute-lft-out67.4%
cancel-sign-sub-inv67.4%
metadata-eval67.4%
+-commutative67.4%
Simplified67.4%
Taylor expanded in x1 around 0 54.2%
Final simplification54.2%
(FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x2 * (-6.0d0))
end function
public static double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
def code(x1, x2): return x1 + (x2 * -6.0)
function code(x1, x2) return Float64(x1 + Float64(x2 * -6.0)) end
function tmp = code(x1, x2) tmp = x1 + (x2 * -6.0); end
code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + x2 \cdot -6
\end{array}
Initial program 70.3%
Taylor expanded in x1 around 0 67.4%
*-commutative67.4%
fma-define67.4%
+-commutative67.4%
mul-1-neg67.4%
unsub-neg67.4%
+-commutative67.4%
unpow367.4%
unpow267.4%
distribute-lft-out67.4%
cancel-sign-sub-inv67.4%
metadata-eval67.4%
+-commutative67.4%
Simplified67.4%
Taylor expanded in x1 around 0 24.9%
*-commutative24.9%
Simplified24.9%
Final simplification24.9%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 70.3%
Taylor expanded in x1 around 0 67.4%
*-commutative67.4%
fma-define67.4%
+-commutative67.4%
mul-1-neg67.4%
unsub-neg67.4%
+-commutative67.4%
unpow367.4%
unpow267.4%
distribute-lft-out67.4%
cancel-sign-sub-inv67.4%
metadata-eval67.4%
+-commutative67.4%
Simplified67.4%
Taylor expanded in x1 around 0 24.9%
*-commutative24.9%
Simplified24.9%
Taylor expanded in x1 around 0 24.6%
*-commutative24.6%
Simplified24.6%
Final simplification24.6%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 70.3%
Taylor expanded in x1 around 0 67.4%
*-commutative67.4%
fma-define67.4%
+-commutative67.4%
mul-1-neg67.4%
unsub-neg67.4%
+-commutative67.4%
unpow367.4%
unpow267.4%
distribute-lft-out67.4%
cancel-sign-sub-inv67.4%
metadata-eval67.4%
+-commutative67.4%
Simplified67.4%
Taylor expanded in x1 around 0 24.9%
*-commutative24.9%
Simplified24.9%
Taylor expanded in x1 around inf 3.3%
Final simplification3.3%
herbie shell --seed 2024039
(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))))))