
(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 24 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)))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* t_3 (* x1 2.0)) (- 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_1 (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)) (* t_0 (* (* x1 2.0) (+ t_0 -3.0))))
(fma t_1 t_0 (pow x1 3.0))))))
(+ x1 (+ 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 tmp;
if ((x1 + ((x1 + (((t_2 * (((t_3 * (x1 * 2.0)) * (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_1 - 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)), (t_0 * ((x1 * 2.0) * (t_0 + -3.0)))), fma(t_1, t_0, pow(x1, 3.0)))));
} else {
tmp = x1 + (x1 + (6.0 * pow(x1, 4.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(fma(x1, Float64(x1 * 3.0), Float64(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) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(t_3 * Float64(x1 * 2.0)) * 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_1 - 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(t_0 * Float64(Float64(x1 * 2.0) * Float64(t_0 + -3.0)))), fma(t_1, t_0, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $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]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(t$95$3 * N[(x1 * 2.0), $MachinePrecision]), $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$1 - 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[(t$95$0 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$0 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$0 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2 - x1\right)}{\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}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(\left(t_3 \cdot \left(x1 \cdot 2\right)\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_1 - \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), t_0 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(t_0 + -3\right)\right)\right), \mathsf{fma}\left(t_1, t_0, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 6 \cdot {x1}^{4}\right)\\
\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.7%
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%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
+-commutative0.0%
cube-mult0.0%
unpow20.0%
distribute-rgt-out0.0%
unpow20.0%
Simplified0.0%
Taylor expanded in x1 around inf 14.3%
*-commutative14.3%
Simplified14.3%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_0
(+
(* (* t_2 (* x1 2.0)) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_1 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))))
(if (<= t_3 INFINITY) t_3 (+ x1 (+ x1 (* 6.0 (pow x1 4.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_3 = x1 + ((x1 + (((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_1 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 + (x1 + (6.0 * pow(x1, 4.0)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_3 = x1 + ((x1 + (((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_1 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = x1 + (x1 + (6.0 * Math.pow(x1, 4.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 t_3 = x1 + ((x1 + (((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_1 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = x1 + (x1 + (6.0 * math.pow(x1, 4.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_0 * Float64(Float64(Float64(t_2 * Float64(x1 * 2.0)) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_1 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; t_3 = x1 + ((x1 + (((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_1 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = x1 + (x1 + (6.0 * (x1 ^ 4.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 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$0 * N[(N[(N[(t$95$2 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$2), $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$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_0}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t_0 \cdot \left(\left(t_2 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + t_1 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0}\right)\\
\mathbf{if}\;t_3 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + 6 \cdot {x1}^{4}\right)\\
\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%
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%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
+-commutative0.0%
cube-mult0.0%
unpow20.0%
distribute-rgt-out0.0%
unpow20.0%
Simplified0.0%
Taylor expanded in x1 around inf 14.3%
*-commutative14.3%
Simplified14.3%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -2e+94) (not (<= x1 1e+75)))
(+ x1 (+ x1 (* 6.0 (pow x1 4.0))))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+
(* (* x1 x1) (- (* t_2 4.0) 6.0))
(* (- t_2 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1)))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -2e+94) || !(x1 <= 1e+75)) {
tmp = x1 + (x1 + (6.0 * pow(x1, 4.0)));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
}
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) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-2d+94)) .or. (.not. (x1 <= 1d+75))) then
tmp = x1 + (x1 + (6.0d0 * (x1 ** 4.0d0)))
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)) + ((t_2 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -2e+94) || !(x1 <= 1e+75)) {
tmp = x1 + (x1 + (6.0 * Math.pow(x1, 4.0)));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -2e+94) or not (x1 <= 1e+75): tmp = x1 + (x1 + (6.0 * math.pow(x1, 4.0))) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -2e+94) || !(x1 <= 1e+75)) tmp = Float64(x1 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0)))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) + Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -2e+94) || ~((x1 <= 1e+75))) tmp = x1 + (x1 + (6.0 * (x1 ^ 4.0))); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))); 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[(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]}, If[Or[LessEqual[x1, -2e+94], N[Not[LessEqual[x1, 1e+75]], $MachinePrecision]], N[(x1 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $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 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+94} \lor \neg \left(x1 \leq 10^{+75}\right):\\
\;\;\;\;x1 + \left(x1 + 6 \cdot {x1}^{4}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_2 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right) + \left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2e94 or 9.99999999999999927e74 < x1 Initial program 13.5%
Simplified13.5%
Taylor expanded in x1 around inf 13.5%
+-commutative13.5%
cube-mult13.5%
unpow213.5%
distribute-rgt-out13.5%
unpow213.5%
Simplified13.5%
Taylor expanded in x1 around inf 25.8%
*-commutative25.8%
Simplified25.8%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -2e94 < x1 < 9.99999999999999927e74Initial program 99.4%
Taylor expanded in x1 around 0 97.6%
Final simplification98.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -2e+94) (not (<= x1 6e+76)))
(+ x1 (+ x1 (* 6.0 (pow x1 4.0))))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+
(* (* x1 x1) (- (* t_2 4.0) 6.0))
(* (* t_2 (* x1 2.0)) (- (+ x2 x2) 3.0))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -2e+94) || !(x1 <= 6e+76)) {
tmp = x1 + (x1 + (6.0 * pow(x1, 4.0)));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 * (x1 * 2.0)) * ((x2 + 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) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-2d+94)) .or. (.not. (x1 <= 6d+76))) then
tmp = x1 + (x1 + (6.0d0 * (x1 ** 4.0d0)))
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)) + ((t_2 * (x1 * 2.0d0)) * ((x2 + 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 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -2e+94) || !(x1 <= 6e+76)) {
tmp = x1 + (x1 + (6.0 * Math.pow(x1, 4.0)));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 * (x1 * 2.0)) * ((x2 + x2) - 3.0))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -2e+94) or not (x1 <= 6e+76): tmp = x1 + (x1 + (6.0 * math.pow(x1, 4.0))) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 * (x1 * 2.0)) * ((x2 + x2) - 3.0)))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -2e+94) || !(x1 <= 6e+76)) tmp = Float64(x1 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0)))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) + Float64(Float64(t_2 * Float64(x1 * 2.0)) * Float64(Float64(x2 + x2) - 3.0))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -2e+94) || ~((x1 <= 6e+76))) tmp = x1 + (x1 + (6.0 * (x1 ^ 4.0))); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 * (x1 * 2.0)) * ((x2 + 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[(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]}, If[Or[LessEqual[x1, -2e+94], N[Not[LessEqual[x1, 6e+76]], $MachinePrecision]], N[(x1 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x2 + x2), $MachinePrecision] - 3.0), $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 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+94} \lor \neg \left(x1 \leq 6 \cdot 10^{+76}\right):\\
\;\;\;\;x1 + \left(x1 + 6 \cdot {x1}^{4}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_2 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right) + \left(t_2 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(\left(x2 + x2\right) - 3\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2e94 or 5.9999999999999996e76 < x1 Initial program 13.5%
Simplified13.5%
Taylor expanded in x1 around inf 13.5%
+-commutative13.5%
cube-mult13.5%
unpow213.5%
distribute-rgt-out13.5%
unpow213.5%
Simplified13.5%
Taylor expanded in x1 around inf 25.8%
*-commutative25.8%
Simplified25.8%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -2e94 < x1 < 5.9999999999999996e76Initial program 99.4%
Taylor expanded in x1 around 0 97.0%
count-295.5%
Simplified97.0%
Final simplification98.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -3e+66) (not (<= x1 2400.0)))
(+ x1 (+ x1 (* 6.0 (pow x1 4.0))))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_1
(+
(* (* x1 x1) (- (* t_2 4.0) 6.0))
(* (* t_2 (* x1 2.0)) (- (+ x2 x2) 3.0))))
(* t_0 (+ x2 x2))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -3e+66) || !(x1 <= 2400.0)) {
tmp = x1 + (x1 + (6.0 * pow(x1, 4.0)));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 * (x1 * 2.0)) * ((x2 + x2) - 3.0)))) + (t_0 * (x2 + 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) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-3d+66)) .or. (.not. (x1 <= 2400.0d0))) then
tmp = x1 + (x1 + (6.0d0 * (x1 ** 4.0d0)))
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)) + ((t_2 * (x1 * 2.0d0)) * ((x2 + x2) - 3.0d0)))) + (t_0 * (x2 + x2))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -3e+66) || !(x1 <= 2400.0)) {
tmp = x1 + (x1 + (6.0 * Math.pow(x1, 4.0)));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 * (x1 * 2.0)) * ((x2 + x2) - 3.0)))) + (t_0 * (x2 + x2))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -3e+66) or not (x1 <= 2400.0): tmp = x1 + (x1 + (6.0 * math.pow(x1, 4.0))) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 * (x1 * 2.0)) * ((x2 + x2) - 3.0)))) + (t_0 * (x2 + x2)))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -3e+66) || !(x1 <= 2400.0)) tmp = Float64(x1 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0)))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) + Float64(Float64(t_2 * Float64(x1 * 2.0)) * Float64(Float64(x2 + x2) - 3.0)))) + Float64(t_0 * Float64(x2 + x2))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -3e+66) || ~((x1 <= 2400.0))) tmp = x1 + (x1 + (6.0 * (x1 ^ 4.0))); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 * (x1 * 2.0)) * ((x2 + x2) - 3.0)))) + (t_0 * (x2 + x2)))))); 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[(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]}, If[Or[LessEqual[x1, -3e+66], N[Not[LessEqual[x1, 2400.0]], $MachinePrecision]], N[(x1 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x2 + x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -3 \cdot 10^{+66} \lor \neg \left(x1 \leq 2400\right):\\
\;\;\;\;x1 + \left(x1 + 6 \cdot {x1}^{4}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right) + \left(t_2 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(\left(x2 + x2\right) - 3\right)\right) + t_0 \cdot \left(x2 + x2\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -3.00000000000000002e66 or 2400 < x1 Initial program 26.6%
Simplified26.5%
Taylor expanded in x1 around inf 26.3%
+-commutative26.3%
cube-mult26.3%
unpow226.3%
distribute-rgt-out26.3%
unpow226.3%
Simplified26.3%
Taylor expanded in x1 around inf 32.9%
*-commutative32.9%
Simplified32.9%
Taylor expanded in x1 around inf 95.7%
*-commutative95.7%
Simplified95.7%
if -3.00000000000000002e66 < x1 < 2400Initial program 99.4%
Taylor expanded in x1 around 0 98.0%
count-298.0%
Simplified98.0%
Taylor expanded in x1 around 0 97.9%
count-298.0%
Simplified97.9%
Final simplification97.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -1e+104) (not (<= x1 5e+74)))
(+ x1 (+ x1 (* 6.0 (pow x1 4.0))))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+ (* (* t_2 (* x1 2.0)) (- t_2 3.0)) (* (* x1 x1) 6.0)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -1e+104) || !(x1 <= 5e+74)) {
tmp = x1 + (x1 + (6.0 * pow(x1, 4.0)));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * 6.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) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-1d+104)) .or. (.not. (x1 <= 5d+74))) then
tmp = x1 + (x1 + (6.0d0 * (x1 ** 4.0d0)))
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 * (x1 * 2.0d0)) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.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 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -1e+104) || !(x1 <= 5e+74)) {
tmp = x1 + (x1 + (6.0 * Math.pow(x1, 4.0)));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -1e+104) or not (x1 <= 5e+74): tmp = x1 + (x1 + (6.0 * math.pow(x1, 4.0))) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -1e+104) || !(x1 <= 5e+74)) tmp = Float64(x1 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0)))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(t_2 * Float64(x1 * 2.0)) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -1e+104) || ~((x1 <= 5e+74))) tmp = x1 + (x1 + (6.0 * (x1 ^ 4.0))); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * 6.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[(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]}, If[Or[LessEqual[x1, -1e+104], N[Not[LessEqual[x1, 5e+74]], $MachinePrecision]], N[(x1 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(t$95$2 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $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 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+104} \lor \neg \left(x1 \leq 5 \cdot 10^{+74}\right):\\
\;\;\;\;x1 + \left(x1 + 6 \cdot {x1}^{4}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_2 + t_1 \cdot \left(\left(t_2 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1e104 or 4.99999999999999963e74 < x1 Initial program 14.4%
Simplified14.4%
Taylor expanded in x1 around inf 14.4%
+-commutative14.4%
cube-mult14.4%
unpow214.4%
distribute-rgt-out14.4%
unpow214.4%
Simplified14.4%
Taylor expanded in x1 around inf 26.6%
*-commutative26.6%
Simplified26.6%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -1e104 < x1 < 4.99999999999999963e74Initial program 99.4%
Taylor expanded in x1 around inf 96.7%
Final simplification97.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0)))
(if (<= x1 1.32e+154)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* x1 x1) (- (* t_2 4.0) 6.0))
(* (- t_2 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1)))))
(* t_1 (+ x2 x2)))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= 1.32e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))) + (t_1 * (x2 + x2))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= 1.32d+154) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)) + ((t_2 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))))) + (t_1 * (x2 + x2))))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.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 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= 1.32e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))) + (t_1 * (x2 + x2))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= 1.32e+154: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))) + (t_1 * (x2 + x2)))))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= 1.32e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) + Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))))) + Float64(t_1 * Float64(x2 + x2))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= 1.32e+154) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))) + (t_1 * (x2 + x2)))))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, 1.32e+154], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right) + \left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right) + t_1 \cdot \left(x2 + x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < 1.31999999999999998e154Initial program 78.1%
Taylor expanded in x1 around 0 74.8%
count-274.8%
Simplified74.8%
Taylor expanded in x1 around 0 74.1%
if 1.31999999999999998e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.8%
*-commutative5.8%
Simplified5.8%
flip-+75.0%
Applied egg-rr75.0%
swap-sqr75.0%
metadata-eval75.0%
Simplified75.0%
Final simplification74.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0)))
(if (<= x1 1.35e+154)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* x1 x1) (- (* t_2 4.0) 6.0))
(* (* t_2 (* x1 2.0)) (- (+ x2 x2) 3.0))))
(* t_1 (+ x2 x2)))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 * (x1 * 2.0)) * ((x2 + x2) - 3.0)))) + (t_1 * (x2 + x2))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= 1.35d+154) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)) + ((t_2 * (x1 * 2.0d0)) * ((x2 + x2) - 3.0d0)))) + (t_1 * (x2 + x2))))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.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 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 * (x1 * 2.0)) * ((x2 + x2) - 3.0)))) + (t_1 * (x2 + x2))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= 1.35e+154: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 * (x1 * 2.0)) * ((x2 + x2) - 3.0)))) + (t_1 * (x2 + x2)))))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) + Float64(Float64(t_2 * Float64(x1 * 2.0)) * Float64(Float64(x2 + x2) - 3.0)))) + Float64(t_1 * Float64(x2 + x2))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= 1.35e+154) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 * (x1 * 2.0)) * ((x2 + x2) - 3.0)))) + (t_1 * (x2 + x2)))))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, 1.35e+154], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x2 + x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right) + \left(t_2 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(\left(x2 + x2\right) - 3\right)\right) + t_1 \cdot \left(x2 + x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < 1.35000000000000003e154Initial program 78.1%
Taylor expanded in x1 around 0 74.8%
count-274.8%
Simplified74.8%
Taylor expanded in x1 around 0 73.7%
count-274.8%
Simplified73.7%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.8%
*-commutative5.8%
Simplified5.8%
flip-+75.0%
Applied egg-rr75.0%
swap-sqr75.0%
metadata-eval75.0%
Simplified75.0%
Final simplification73.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0)))
(if (<= x1 1.35e+154)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (+ (* (* t_2 (* x1 2.0)) (- t_2 3.0)) (* (* x1 x1) 6.0)))
(* t_1 (+ x2 x2)))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (x2 + x2))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= 1.35d+154) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_2 * (x1 * 2.0d0)) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0))) + (t_1 * (x2 + x2))))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.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 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (x2 + x2))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= 1.35e+154: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (x2 + x2)))))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(t_2 * Float64(x1 * 2.0)) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0))) + Float64(t_1 * Float64(x2 + x2))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= 1.35e+154) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (x2 + x2)))))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, 1.35e+154], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(t$95$2 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \left(\left(t_2 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right) + t_1 \cdot \left(x2 + x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < 1.35000000000000003e154Initial program 78.1%
Taylor expanded in x1 around 0 74.8%
count-274.8%
Simplified74.8%
Taylor expanded in x1 around inf 73.5%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.8%
*-commutative5.8%
Simplified5.8%
flip-+75.0%
Applied egg-rr75.0%
swap-sqr75.0%
metadata-eval75.0%
Simplified75.0%
Final simplification73.6%
(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 (* t_2 (+ x2 x2)))
(t_5
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+
x1
(+
t_1
(+
t_4
(*
t_0
(+
(* (* x1 x1) (- (* t_3 4.0) 6.0))
(* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))))))))
(if (<= x1 -1.08e-184)
t_5
(if (<= x1 2.8e-234)
(+
x1
(+
(+
x1
(+
t_1
(+
t_4
(*
t_0
(+
(* (- t_3 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* (* x1 x1) 6.0))))))
(* 3.0 (* x2 -2.0))))
(if (<= x1 1.35e+154)
t_5
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.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 = t_2 * (x2 + x2);
double t_5 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_4 + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))));
double tmp;
if (x1 <= -1.08e-184) {
tmp = t_5;
} else if (x1 <= 2.8e-234) {
tmp = x1 + ((x1 + (t_1 + (t_4 + (t_0 * (((t_3 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 1.35e+154) {
tmp = t_5;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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) + 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 = t_2 * (x2 + x2)
t_5 = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_4 + (t_0 * (((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)) + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))))))))
if (x1 <= (-1.08d-184)) then
tmp = t_5
else if (x1 <= 2.8d-234) then
tmp = x1 + ((x1 + (t_1 + (t_4 + (t_0 * (((t_3 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + ((x1 * x1) * 6.0d0)))))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 1.35d+154) then
tmp = t_5
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.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 = t_2 * (x2 + x2);
double t_5 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_4 + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))));
double tmp;
if (x1 <= -1.08e-184) {
tmp = t_5;
} else if (x1 <= 2.8e-234) {
tmp = x1 + ((x1 + (t_1 + (t_4 + (t_0 * (((t_3 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 1.35e+154) {
tmp = t_5;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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 = t_2 * (x2 + x2) t_5 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_4 + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))))) tmp = 0 if x1 <= -1.08e-184: tmp = t_5 elif x1 <= 2.8e-234: tmp = x1 + ((x1 + (t_1 + (t_4 + (t_0 * (((t_3 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))) elif x1 <= 1.35e+154: tmp = t_5 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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(t_2 * Float64(x2 + x2)) t_5 = 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_4 + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))))))))) tmp = 0.0 if (x1 <= -1.08e-184) tmp = t_5; elseif (x1 <= 2.8e-234) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(t_4 + Float64(t_0 * Float64(Float64(Float64(t_3 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(Float64(x1 * x1) * 6.0)))))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 1.35e+154) tmp = t_5; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.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 = t_2 * (x2 + x2); t_5 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_4 + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))))); tmp = 0.0; if (x1 <= -1.08e-184) tmp = t_5; elseif (x1 <= 2.8e-234) tmp = x1 + ((x1 + (t_1 + (t_4 + (t_0 * (((t_3 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 1.35e+154) tmp = t_5; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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[(t$95$2 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = 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$4 + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $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]), $MachinePrecision]}, If[LessEqual[x1, -1.08e-184], t$95$5, If[LessEqual[x1, 2.8e-234], N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(t$95$4 + N[(t$95$0 * N[(N[(N[(t$95$3 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $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], If[LessEqual[x1, 1.35e+154], t$95$5, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $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 := t_2 \cdot \left(x2 + x2\right)\\
t_5 := x1 + \left(3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(t_1 + \left(t_4 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right) + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.08 \cdot 10^{-184}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq 2.8 \cdot 10^{-234}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t_1 + \left(t_4 + t_0 \cdot \left(\left(t_3 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.07999999999999995e-184 or 2.7999999999999999e-234 < x1 < 1.35000000000000003e154Initial program 72.7%
Taylor expanded in x1 around 0 68.6%
count-268.6%
Simplified68.6%
Taylor expanded in x1 around 0 67.8%
Taylor expanded in x1 around 0 64.8%
if -1.07999999999999995e-184 < x1 < 2.7999999999999999e-234Initial program 99.7%
Taylor expanded in x1 around 0 99.7%
count-299.7%
Simplified99.7%
Taylor expanded in x1 around 0 99.7%
Taylor expanded in x1 around inf 99.7%
Taylor expanded in x1 around 0 95.5%
*-commutative69.9%
Simplified95.5%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.8%
*-commutative5.8%
Simplified5.8%
flip-+75.0%
Applied egg-rr75.0%
swap-sqr75.0%
metadata-eval75.0%
Simplified75.0%
Final simplification71.3%
(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 (* 2.0 x2)) x1) t_0)))
(t_4 (* t_2 (+ x2 x2)))
(t_5 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0)))
(if (<= x1 -2.65e+22)
(+
x1
(+ t_3 (+ x1 (+ t_1 (+ t_4 (* t_0 (+ (* x1 2.0) (* (* x1 x1) 6.0))))))))
(if (<= x1 1000.0)
(+
x1
(+
t_3
(+
x1
(+
t_1
(+
t_4
(*
t_0
(+
(* (* t_5 (* x1 2.0)) (- (+ x2 x2) 3.0))
(* (* x1 x1) (- (* 4.0 (+ x2 x2)) 6.0)))))))))
(if (<= x1 1.35e+154)
(+
x1
(+
t_3
(+
x1
(+
t_1
(+
t_4
(* t_0 (+ (* (* x1 x1) (- (* t_5 4.0) 6.0)) (* x1 2.0))))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.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 - (2.0 * x2)) - x1) / t_0);
double t_4 = t_2 * (x2 + x2);
double t_5 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -2.65e+22) {
tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * ((x1 * 2.0) + ((x1 * x1) * 6.0)))))));
} else if (x1 <= 1000.0) {
tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * (((t_5 * (x1 * 2.0)) * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0))))))));
} else if (x1 <= 1.35e+154) {
tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (x1 * 2.0)))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = 3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)
t_4 = t_2 * (x2 + x2)
t_5 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-2.65d+22)) then
tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * ((x1 * 2.0d0) + ((x1 * x1) * 6.0d0)))))))
else if (x1 <= 1000.0d0) then
tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * (((t_5 * (x1 * 2.0d0)) * ((x2 + x2) - 3.0d0)) + ((x1 * x1) * ((4.0d0 * (x2 + x2)) - 6.0d0))))))))
else if (x1 <= 1.35d+154) then
tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * (((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)) + (x1 * 2.0d0)))))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.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 - (2.0 * x2)) - x1) / t_0);
double t_4 = t_2 * (x2 + x2);
double t_5 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -2.65e+22) {
tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * ((x1 * 2.0) + ((x1 * x1) * 6.0)))))));
} else if (x1 <= 1000.0) {
tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * (((t_5 * (x1 * 2.0)) * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0))))))));
} else if (x1 <= 1.35e+154) {
tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (x1 * 2.0)))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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 - (2.0 * x2)) - x1) / t_0) t_4 = t_2 * (x2 + x2) t_5 = ((t_2 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= -2.65e+22: tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * ((x1 * 2.0) + ((x1 * x1) * 6.0))))))) elif x1 <= 1000.0: tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * (((t_5 * (x1 * 2.0)) * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0)))))))) elif x1 <= 1.35e+154: tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (x1 * 2.0))))))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) t_4 = Float64(t_2 * Float64(x2 + x2)) t_5 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= -2.65e+22) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_1 + Float64(t_4 + Float64(t_0 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * 6.0)))))))); elseif (x1 <= 1000.0) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_1 + Float64(t_4 + Float64(t_0 * Float64(Float64(Float64(t_5 * Float64(x1 * 2.0)) * Float64(Float64(x2 + x2) - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(x2 + x2)) - 6.0))))))))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_1 + Float64(t_4 + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) + Float64(x1 * 2.0)))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.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 - (2.0 * x2)) - x1) / t_0); t_4 = t_2 * (x2 + x2); t_5 = ((t_2 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= -2.65e+22) tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * ((x1 * 2.0) + ((x1 * x1) * 6.0))))))); elseif (x1 <= 1000.0) tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * (((t_5 * (x1 * 2.0)) * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0)))))))); elseif (x1 <= 1.35e+154) tmp = x1 + (t_3 + (x1 + (t_1 + (t_4 + (t_0 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (x1 * 2.0))))))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -2.65e+22], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$1 + N[(t$95$4 + N[(t$95$0 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1000.0], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$1 + N[(t$95$4 + N[(t$95$0 * N[(N[(N[(t$95$5 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x2 + x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$1 + N[(t$95$4 + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $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 \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0}\\
t_4 := t_2 \cdot \left(x2 + x2\right)\\
t_5 := \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -2.65 \cdot 10^{+22}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_4 + t_0 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1000:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_4 + t_0 \cdot \left(\left(t_5 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(\left(x2 + x2\right) - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(x2 + x2\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_4 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_5 \cdot 4 - 6\right) + x1 \cdot 2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -2.6499999999999999e22Initial program 25.6%
Taylor expanded in x1 around 0 22.6%
count-222.6%
Simplified22.6%
Taylor expanded in x1 around 0 21.1%
Taylor expanded in x1 around inf 21.1%
Taylor expanded in x1 around inf 22.6%
*-commutative22.6%
Simplified22.6%
if -2.6499999999999999e22 < x1 < 1e3Initial program 99.4%
Taylor expanded in x1 around 0 98.6%
count-298.6%
Simplified98.6%
Taylor expanded in x1 around 0 98.5%
count-298.6%
Simplified98.5%
Taylor expanded in x1 around 0 97.9%
count-298.6%
Simplified97.9%
if 1e3 < x1 < 1.35000000000000003e154Initial program 99.6%
Taylor expanded in x1 around 0 80.9%
count-280.9%
Simplified80.9%
Taylor expanded in x1 around 0 80.4%
Taylor expanded in x1 around inf 80.3%
*-commutative80.2%
Simplified80.3%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.8%
*-commutative5.8%
Simplified5.8%
flip-+75.0%
Applied egg-rr75.0%
swap-sqr75.0%
metadata-eval75.0%
Simplified75.0%
Final simplification74.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0)) (t_1 (* x1 (* x1 3.0))))
(if (<= x1 1.32e+154)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 (+ x2 x2))
(*
t_0
(+
(*
(- (/ (- (+ t_1 (* 2.0 x2)) x1) t_0) 3.0)
(* (* x1 2.0) (- (* 2.0 x2) x1)))
(* (* x1 x1) 6.0))))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= 1.32e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * ((((((t_1 + (2.0 * x2)) - x1) / t_0) - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
if (x1 <= 1.32d+154) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * ((((((t_1 + (2.0d0 * x2)) - x1) / t_0) - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + ((x1 * x1) * 6.0d0)))))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.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 * 3.0);
double tmp;
if (x1 <= 1.32e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * ((((((t_1 + (2.0 * x2)) - x1) / t_0) - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) tmp = 0 if x1 <= 1.32e+154: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * ((((((t_1 + (2.0 * x2)) - x1) / t_0) - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0))))))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) tmp = 0.0 if (x1 <= 1.32e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(x2 + x2)) + Float64(t_0 * Float64(Float64(Float64(Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); tmp = 0.0; if (x1 <= 1.32e+154) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * ((((((t_1 + (2.0 * x2)) - x1) / t_0) - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0))))))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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 * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, 1.32e+154], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
\mathbf{if}\;x1 \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot \left(x2 + x2\right) + t_0 \cdot \left(\left(\frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_0} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < 1.31999999999999998e154Initial program 78.1%
Taylor expanded in x1 around 0 74.8%
count-274.8%
Simplified74.8%
Taylor expanded in x1 around 0 74.1%
Taylor expanded in x1 around inf 73.4%
if 1.31999999999999998e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.8%
*-commutative5.8%
Simplified5.8%
flip-+75.0%
Applied egg-rr75.0%
swap-sqr75.0%
metadata-eval75.0%
Simplified75.0%
Final simplification73.6%
(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 (+ x2 x2)))
(t_4 (* (* x1 x1) 6.0))
(t_5
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+
x1
(+
t_1
(+
t_3
(* t_0 (+ t_4 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))))))))
(if (<= x1 -5.6e-175)
t_5
(if (<= x1 1.1e-233)
(+
x1
(+
(+
x1
(+
t_1
(+
t_3
(*
t_0
(+
(*
(- (/ (- (+ t_2 (* 2.0 x2)) x1) t_0) 3.0)
(* (* x1 2.0) (- (* 2.0 x2) x1)))
t_4)))))
(* 3.0 (* x2 -2.0))))
(if (<= x1 1.35e+154)
t_5
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.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 * (x2 + x2);
double t_4 = (x1 * x1) * 6.0;
double t_5 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_3 + (t_0 * (t_4 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))));
double tmp;
if (x1 <= -5.6e-175) {
tmp = t_5;
} else if (x1 <= 1.1e-233) {
tmp = x1 + ((x1 + (t_1 + (t_3 + (t_0 * ((((((t_2 + (2.0 * x2)) - x1) / t_0) - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + t_4))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 1.35e+154) {
tmp = t_5;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = t_2 * (x2 + x2)
t_4 = (x1 * x1) * 6.0d0
t_5 = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_3 + (t_0 * (t_4 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))))))))
if (x1 <= (-5.6d-175)) then
tmp = t_5
else if (x1 <= 1.1d-233) then
tmp = x1 + ((x1 + (t_1 + (t_3 + (t_0 * ((((((t_2 + (2.0d0 * x2)) - x1) / t_0) - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + t_4))))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 1.35d+154) then
tmp = t_5
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.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 * (x2 + x2);
double t_4 = (x1 * x1) * 6.0;
double t_5 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_3 + (t_0 * (t_4 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))));
double tmp;
if (x1 <= -5.6e-175) {
tmp = t_5;
} else if (x1 <= 1.1e-233) {
tmp = x1 + ((x1 + (t_1 + (t_3 + (t_0 * ((((((t_2 + (2.0 * x2)) - x1) / t_0) - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + t_4))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 1.35e+154) {
tmp = t_5;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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 * (x2 + x2) t_4 = (x1 * x1) * 6.0 t_5 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_3 + (t_0 * (t_4 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))))) tmp = 0 if x1 <= -5.6e-175: tmp = t_5 elif x1 <= 1.1e-233: tmp = x1 + ((x1 + (t_1 + (t_3 + (t_0 * ((((((t_2 + (2.0 * x2)) - x1) / t_0) - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + t_4))))) + (3.0 * (x2 * -2.0))) elif x1 <= 1.35e+154: tmp = t_5 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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(t_2 * Float64(x2 + x2)) t_4 = Float64(Float64(x1 * x1) * 6.0) t_5 = 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(t_4 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))))))))) tmp = 0.0 if (x1 <= -5.6e-175) tmp = t_5; elseif (x1 <= 1.1e-233) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(t_3 + Float64(t_0 * Float64(Float64(Float64(Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + t_4))))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 1.35e+154) tmp = t_5; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.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 * (x2 + x2); t_4 = (x1 * x1) * 6.0; t_5 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_3 + (t_0 * (t_4 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))))); tmp = 0.0; if (x1 <= -5.6e-175) tmp = t_5; elseif (x1 <= 1.1e-233) tmp = x1 + ((x1 + (t_1 + (t_3 + (t_0 * ((((((t_2 + (2.0 * x2)) - x1) / t_0) - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + t_4))))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 1.35e+154) tmp = t_5; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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[(t$95$2 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]}, Block[{t$95$5 = 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[(t$95$4 + 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]), $MachinePrecision]}, If[LessEqual[x1, -5.6e-175], t$95$5, If[LessEqual[x1, 1.1e-233], N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(t$95$3 + N[(t$95$0 * N[(N[(N[(N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], t$95$5, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $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 := t_2 \cdot \left(x2 + x2\right)\\
t_4 := \left(x1 \cdot x1\right) \cdot 6\\
t_5 := 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(t_4 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{-175}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq 1.1 \cdot 10^{-233}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t_1 + \left(t_3 + t_0 \cdot \left(\left(\frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_0} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + t_4\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -5.6e-175 or 1.1e-233 < x1 < 1.35000000000000003e154Initial program 72.7%
Taylor expanded in x1 around 0 68.6%
count-268.6%
Simplified68.6%
Taylor expanded in x1 around 0 67.8%
Taylor expanded in x1 around inf 67.0%
Taylor expanded in x1 around 0 64.5%
if -5.6e-175 < x1 < 1.1e-233Initial program 99.7%
Taylor expanded in x1 around 0 99.7%
count-299.7%
Simplified99.7%
Taylor expanded in x1 around 0 99.7%
Taylor expanded in x1 around inf 99.7%
Taylor expanded in x1 around 0 95.5%
*-commutative69.9%
Simplified95.5%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.8%
*-commutative5.8%
Simplified5.8%
flip-+75.0%
Applied egg-rr75.0%
swap-sqr75.0%
metadata-eval75.0%
Simplified75.0%
Final simplification71.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 (+ x2 x2))
(*
t_0
(+
(* (* x1 x1) 6.0)
(* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))))))))
(if (<= x1 -1.18e-220)
t_2
(if (<= x1 1.3e-177)
(- (* x2 -6.0) x1)
(if (<= x1 1.35e+154)
t_2
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * (((x1 * x1) * 6.0) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))));
double tmp;
if (x1 <= -1.18e-220) {
tmp = t_2;
} else if (x1 <= 1.3e-177) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 1.35e+154) {
tmp = t_2;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * (((x1 * x1) * 6.0d0) + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))))))))
if (x1 <= (-1.18d-220)) then
tmp = t_2
else if (x1 <= 1.3d-177) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 1.35d+154) then
tmp = t_2
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.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 * 3.0);
double t_2 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * (((x1 * x1) * 6.0) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))));
double tmp;
if (x1 <= -1.18e-220) {
tmp = t_2;
} else if (x1 <= 1.3e-177) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 1.35e+154) {
tmp = t_2;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * (((x1 * x1) * 6.0) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))))) tmp = 0 if x1 <= -1.18e-220: tmp = t_2 elif x1 <= 1.3e-177: tmp = (x2 * -6.0) - x1 elif x1 <= 1.35e+154: tmp = t_2 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(x2 + x2)) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))))))))) tmp = 0.0 if (x1 <= -1.18e-220) tmp = t_2; elseif (x1 <= 1.3e-177) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 1.35e+154) tmp = t_2; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * (((x1 * x1) * 6.0) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))))); tmp = 0.0; if (x1 <= -1.18e-220) tmp = t_2; elseif (x1 <= 1.3e-177) tmp = (x2 * -6.0) - x1; elseif (x1 <= 1.35e+154) tmp = t_2; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.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]), $MachinePrecision]}, If[LessEqual[x1, -1.18e-220], t$95$2, If[LessEqual[x1, 1.3e-177], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.35e+154], t$95$2, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot \left(x2 + x2\right) + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.18 \cdot 10^{-220}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x1 \leq 1.3 \cdot 10^{-177}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.1799999999999999e-220 or 1.3e-177 < x1 < 1.35000000000000003e154Initial program 72.3%
Taylor expanded in x1 around 0 68.1%
count-268.1%
Simplified68.1%
Taylor expanded in x1 around 0 67.3%
Taylor expanded in x1 around inf 66.5%
Taylor expanded in x1 around 0 63.5%
if -1.1799999999999999e-220 < x1 < 1.3e-177Initial program 99.6%
Simplified99.8%
Taylor expanded in x1 around inf 99.8%
+-commutative99.8%
cube-mult99.8%
unpow299.8%
distribute-rgt-out99.8%
unpow299.8%
Simplified99.8%
Taylor expanded in x1 around inf 94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x1 around 0 94.6%
fma-def94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x1 around 0 94.6%
mul-1-neg94.6%
unsub-neg94.6%
*-commutative94.6%
Simplified94.6%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.8%
*-commutative5.8%
Simplified5.8%
flip-+75.0%
Applied egg-rr75.0%
swap-sqr75.0%
metadata-eval75.0%
Simplified75.0%
Final simplification70.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0)))
(t_3
(+
x1
(+
t_2
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 (+ x2 x2))
(* t_0 (+ (* x1 2.0) (* (* x1 x1) 6.0))))))))))
(if (<= x1 -2.65e+22)
t_3
(if (<= x1 -1.5e-220)
(+ x1 (+ t_2 (+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))
(if (<= x1 2.1e-179)
(- (* x2 -6.0) x1)
(if (<= x1 2250.0)
(+ x1 (+ t_2 (+ x1 (* 4.0 (* 2.0 (* x1 (* x2 x2)))))))
(if (<= x1 1.35e+154)
t_3
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * ((x1 * 2.0) + ((x1 * x1) * 6.0)))))));
double tmp;
if (x1 <= -2.65e+22) {
tmp = t_3;
} else if (x1 <= -1.5e-220) {
tmp = x1 + (t_2 + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))));
} else if (x1 <= 2.1e-179) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 2250.0) {
tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2))))));
} else if (x1 <= 1.35e+154) {
tmp = t_3;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)
t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * ((x1 * 2.0d0) + ((x1 * x1) * 6.0d0)))))))
if (x1 <= (-2.65d+22)) then
tmp = t_3
else if (x1 <= (-1.5d-220)) then
tmp = x1 + (t_2 + (x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))))
else if (x1 <= 2.1d-179) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 2250.0d0) then
tmp = x1 + (t_2 + (x1 + (4.0d0 * (2.0d0 * (x1 * (x2 * x2))))))
else if (x1 <= 1.35d+154) then
tmp = t_3
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.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 * 3.0);
double t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * ((x1 * 2.0) + ((x1 * x1) * 6.0)))))));
double tmp;
if (x1 <= -2.65e+22) {
tmp = t_3;
} else if (x1 <= -1.5e-220) {
tmp = x1 + (t_2 + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))));
} else if (x1 <= 2.1e-179) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 2250.0) {
tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2))))));
} else if (x1 <= 1.35e+154) {
tmp = t_3;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0) t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * ((x1 * 2.0) + ((x1 * x1) * 6.0))))))) tmp = 0 if x1 <= -2.65e+22: tmp = t_3 elif x1 <= -1.5e-220: tmp = x1 + (t_2 + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) elif x1 <= 2.1e-179: tmp = (x2 * -6.0) - x1 elif x1 <= 2250.0: tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2)))))) elif x1 <= 1.35e+154: tmp = t_3 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) t_3 = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(x2 + x2)) + Float64(t_0 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * 6.0)))))))) tmp = 0.0 if (x1 <= -2.65e+22) tmp = t_3; elseif (x1 <= -1.5e-220) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))))); elseif (x1 <= 2.1e-179) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 2250.0) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(4.0 * Float64(2.0 * Float64(x1 * Float64(x2 * x2))))))); elseif (x1 <= 1.35e+154) tmp = t_3; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0); t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (x2 + x2)) + (t_0 * ((x1 * 2.0) + ((x1 * x1) * 6.0))))))); tmp = 0.0; if (x1 <= -2.65e+22) tmp = t_3; elseif (x1 <= -1.5e-220) tmp = x1 + (t_2 + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))); elseif (x1 <= 2.1e-179) tmp = (x2 * -6.0) - x1; elseif (x1 <= 2250.0) tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2)))))); elseif (x1 <= 1.35e+154) tmp = t_3; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(t$95$2 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.65e+22], t$95$3, If[LessEqual[x1, -1.5e-220], N[(x1 + N[(t$95$2 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.1e-179], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 2250.0], N[(x1 + N[(t$95$2 + N[(x1 + N[(4.0 * N[(2.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], t$95$3, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0}\\
t_3 := x1 + \left(t_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot \left(x2 + x2\right) + t_0 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.65 \cdot 10^{+22}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x1 \leq -1.5 \cdot 10^{-220}:\\
\;\;\;\;x1 + \left(t_2 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.1 \cdot 10^{-179}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 2250:\\
\;\;\;\;x1 + \left(t_2 + \left(x1 + 4 \cdot \left(2 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -2.6499999999999999e22 or 2250 < x1 < 1.35000000000000003e154Initial program 45.3%
Taylor expanded in x1 around 0 38.1%
count-238.1%
Simplified38.1%
Taylor expanded in x1 around 0 36.9%
Taylor expanded in x1 around inf 36.8%
Taylor expanded in x1 around inf 38.0%
*-commutative38.0%
Simplified38.0%
if -2.6499999999999999e22 < x1 < -1.50000000000000009e-220Initial program 99.5%
Taylor expanded in x1 around 0 90.0%
if -1.50000000000000009e-220 < x1 < 2.0999999999999999e-179Initial program 99.6%
Simplified99.8%
Taylor expanded in x1 around inf 99.8%
+-commutative99.8%
cube-mult99.8%
unpow299.8%
distribute-rgt-out99.8%
unpow299.8%
Simplified99.8%
Taylor expanded in x1 around inf 94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x1 around 0 94.6%
fma-def94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x1 around 0 94.6%
mul-1-neg94.6%
unsub-neg94.6%
*-commutative94.6%
Simplified94.6%
if 2.0999999999999999e-179 < x1 < 2250Initial program 99.1%
Taylor expanded in x1 around 0 96.2%
Taylor expanded in x2 around inf 96.2%
unpow296.2%
Simplified96.2%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.8%
*-commutative5.8%
Simplified5.8%
flip-+75.0%
Applied egg-rr75.0%
swap-sqr75.0%
metadata-eval75.0%
Simplified75.0%
Final simplification71.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -9.5e-221)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))
(if (<= x1 2.1e-179)
(- (* x2 -6.0) x1)
(if (<= x1 1.35e+154)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* 2.0 (* x1 (* x2 x2)))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -9.5e-221) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else if (x1 <= 2.1e-179) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-9.5d-221)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
else if (x1 <= 2.1d-179) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 1.35d+154) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (2.0d0 * (x1 * (x2 * x2))))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -9.5e-221) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else if (x1 <= 2.1e-179) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -9.5e-221: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) elif x1 <= 2.1e-179: tmp = (x2 * -6.0) - x1 elif x1 <= 1.35e+154: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2)))))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -9.5e-221) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))); elseif (x1 <= 2.1e-179) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(2.0 * Float64(x1 * Float64(x2 * x2))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -9.5e-221) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); elseif (x1 <= 2.1e-179) tmp = (x2 * -6.0) - x1; elseif (x1 <= 1.35e+154) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2)))))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -9.5e-221], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.1e-179], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(2.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -9.5 \cdot 10^{-221}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 2.1 \cdot 10^{-179}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(2 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -9.50000000000000022e-221Initial program 57.5%
Taylor expanded in x1 around 0 41.5%
Taylor expanded in x1 around 0 42.3%
if -9.50000000000000022e-221 < x1 < 2.0999999999999999e-179Initial program 99.6%
Simplified99.8%
Taylor expanded in x1 around inf 99.8%
+-commutative99.8%
cube-mult99.8%
unpow299.8%
distribute-rgt-out99.8%
unpow299.8%
Simplified99.8%
Taylor expanded in x1 around inf 94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x1 around 0 94.6%
fma-def94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x1 around 0 94.6%
mul-1-neg94.6%
unsub-neg94.6%
*-commutative94.6%
Simplified94.6%
if 2.0999999999999999e-179 < x1 < 1.35000000000000003e154Initial program 99.3%
Taylor expanded in x1 around 0 71.1%
Taylor expanded in x2 around inf 71.1%
unpow271.1%
Simplified71.1%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.8%
*-commutative5.8%
Simplified5.8%
flip-+75.0%
Applied egg-rr75.0%
swap-sqr75.0%
metadata-eval75.0%
Simplified75.0%
Final simplification62.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))))
(if (<= x1 -1.3e-220)
t_0
(if (<= x1 2.1e-179)
(- (* x2 -6.0) x1)
(if (<= x1 2.7e+132)
t_0
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -1.3e-220) {
tmp = t_0;
} else if (x1 <= 2.1e-179) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 2.7e+132) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.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) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
if (x1 <= (-1.3d-220)) then
tmp = t_0
else if (x1 <= 2.1d-179) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 2.7d+132) then
tmp = t_0
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -1.3e-220) {
tmp = t_0;
} else if (x1 <= 2.1e-179) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 2.7e+132) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) tmp = 0 if x1 <= -1.3e-220: tmp = t_0 elif x1 <= 2.1e-179: tmp = (x2 * -6.0) - x1 elif x1 <= 2.7e+132: tmp = t_0 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))) tmp = 0.0 if (x1 <= -1.3e-220) tmp = t_0; elseif (x1 <= 2.1e-179) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 2.7e+132) tmp = t_0; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); tmp = 0.0; if (x1 <= -1.3e-220) tmp = t_0; elseif (x1 <= 2.1e-179) tmp = (x2 * -6.0) - x1; elseif (x1 <= 2.7e+132) tmp = t_0; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.3e-220], t$95$0, If[LessEqual[x1, 2.1e-179], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 2.7e+132], t$95$0, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -1.3 \cdot 10^{-220}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 2.1 \cdot 10^{-179}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 2.7 \cdot 10^{+132}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.3e-220 or 2.0999999999999999e-179 < x1 < 2.7e132Initial program 71.7%
Taylor expanded in x1 around 0 53.1%
Taylor expanded in x1 around 0 53.2%
if -1.3e-220 < x1 < 2.0999999999999999e-179Initial program 99.6%
Simplified99.8%
Taylor expanded in x1 around inf 99.8%
+-commutative99.8%
cube-mult99.8%
unpow299.8%
distribute-rgt-out99.8%
unpow299.8%
Simplified99.8%
Taylor expanded in x1 around inf 94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x1 around 0 94.6%
fma-def94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x1 around 0 94.6%
mul-1-neg94.6%
unsub-neg94.6%
*-commutative94.6%
Simplified94.6%
if 2.7e132 < x1 Initial program 12.5%
Taylor expanded in x1 around 0 0.6%
Taylor expanded in x1 around 0 5.7%
*-commutative5.7%
Simplified5.7%
flip-+66.2%
Applied egg-rr66.2%
swap-sqr66.2%
metadata-eval66.2%
Simplified66.2%
Final simplification62.6%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x2 -3.8e+99)
(not
(or (<= x2 5.5e+49) (and (not (<= x2 4.4e+106)) (<= x2 3.8e+198)))))
(* x1 (+ 2.0 (* (* x2 x2) 8.0)))
(- (* x2 -6.0) x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -3.8e+99) || !((x2 <= 5.5e+49) || (!(x2 <= 4.4e+106) && (x2 <= 3.8e+198)))) {
tmp = x1 * (2.0 + ((x2 * x2) * 8.0));
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-3.8d+99)) .or. (.not. (x2 <= 5.5d+49) .or. (.not. (x2 <= 4.4d+106)) .and. (x2 <= 3.8d+198))) then
tmp = x1 * (2.0d0 + ((x2 * x2) * 8.0d0))
else
tmp = (x2 * (-6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -3.8e+99) || !((x2 <= 5.5e+49) || (!(x2 <= 4.4e+106) && (x2 <= 3.8e+198)))) {
tmp = x1 * (2.0 + ((x2 * x2) * 8.0));
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -3.8e+99) or not ((x2 <= 5.5e+49) or (not (x2 <= 4.4e+106) and (x2 <= 3.8e+198))): tmp = x1 * (2.0 + ((x2 * x2) * 8.0)) else: tmp = (x2 * -6.0) - x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -3.8e+99) || !((x2 <= 5.5e+49) || (!(x2 <= 4.4e+106) && (x2 <= 3.8e+198)))) tmp = Float64(x1 * Float64(2.0 + Float64(Float64(x2 * x2) * 8.0))); else tmp = Float64(Float64(x2 * -6.0) - x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -3.8e+99) || ~(((x2 <= 5.5e+49) || (~((x2 <= 4.4e+106)) && (x2 <= 3.8e+198))))) tmp = x1 * (2.0 + ((x2 * x2) * 8.0)); else tmp = (x2 * -6.0) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -3.8e+99], N[Not[Or[LessEqual[x2, 5.5e+49], And[N[Not[LessEqual[x2, 4.4e+106]], $MachinePrecision], LessEqual[x2, 3.8e+198]]]], $MachinePrecision]], N[(x1 * N[(2.0 + N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -3.8 \cdot 10^{+99} \lor \neg \left(x2 \leq 5.5 \cdot 10^{+49} \lor \neg \left(x2 \leq 4.4 \cdot 10^{+106}\right) \land x2 \leq 3.8 \cdot 10^{+198}\right):\\
\;\;\;\;x1 \cdot \left(2 + \left(x2 \cdot x2\right) \cdot 8\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\end{array}
\end{array}
if x2 < -3.8e99 or 5.50000000000000042e49 < x2 < 4.39999999999999983e106 or 3.79999999999999988e198 < x2 Initial program 60.1%
Taylor expanded in x1 around 0 51.5%
Taylor expanded in x2 around inf 51.5%
unpow251.5%
Simplified51.5%
Taylor expanded in x1 around 0 67.4%
*-commutative67.4%
Simplified67.4%
Taylor expanded in x1 around inf 62.2%
unpow262.2%
Simplified62.2%
if -3.8e99 < x2 < 5.50000000000000042e49 or 4.39999999999999983e106 < x2 < 3.79999999999999988e198Initial program 74.4%
Simplified74.7%
Taylor expanded in x1 around inf 73.0%
+-commutative73.0%
cube-mult73.0%
unpow273.0%
distribute-rgt-out73.0%
unpow273.0%
Simplified73.0%
Taylor expanded in x1 around inf 75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in x1 around 0 54.5%
fma-def54.5%
*-commutative54.5%
Simplified54.5%
Taylor expanded in x1 around 0 54.5%
mul-1-neg54.5%
unsub-neg54.5%
*-commutative54.5%
Simplified54.5%
Final simplification57.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ 2.0 (* (* x2 x2) 8.0)))))
(if (<= x2 -5e+98)
t_0
(if (<= x2 5.5e+49)
(- (* x2 -6.0) x1)
(if (or (<= x2 1.8e+107) (not (<= x2 3.7e+198)))
t_0
(+ x1 (+ (* x2 -6.0) (* x1 -2.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (2.0 + ((x2 * x2) * 8.0));
double tmp;
if (x2 <= -5e+98) {
tmp = t_0;
} else if (x2 <= 5.5e+49) {
tmp = (x2 * -6.0) - x1;
} else if ((x2 <= 1.8e+107) || !(x2 <= 3.7e+198)) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -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) :: tmp
t_0 = x1 * (2.0d0 + ((x2 * x2) * 8.0d0))
if (x2 <= (-5d+98)) then
tmp = t_0
else if (x2 <= 5.5d+49) then
tmp = (x2 * (-6.0d0)) - x1
else if ((x2 <= 1.8d+107) .or. (.not. (x2 <= 3.7d+198))) then
tmp = t_0
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (2.0 + ((x2 * x2) * 8.0));
double tmp;
if (x2 <= -5e+98) {
tmp = t_0;
} else if (x2 <= 5.5e+49) {
tmp = (x2 * -6.0) - x1;
} else if ((x2 <= 1.8e+107) || !(x2 <= 3.7e+198)) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (2.0 + ((x2 * x2) * 8.0)) tmp = 0 if x2 <= -5e+98: tmp = t_0 elif x2 <= 5.5e+49: tmp = (x2 * -6.0) - x1 elif (x2 <= 1.8e+107) or not (x2 <= 3.7e+198): tmp = t_0 else: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(2.0 + Float64(Float64(x2 * x2) * 8.0))) tmp = 0.0 if (x2 <= -5e+98) tmp = t_0; elseif (x2 <= 5.5e+49) tmp = Float64(Float64(x2 * -6.0) - x1); elseif ((x2 <= 1.8e+107) || !(x2 <= 3.7e+198)) tmp = t_0; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (2.0 + ((x2 * x2) * 8.0)); tmp = 0.0; if (x2 <= -5e+98) tmp = t_0; elseif (x2 <= 5.5e+49) tmp = (x2 * -6.0) - x1; elseif ((x2 <= 1.8e+107) || ~((x2 <= 3.7e+198))) tmp = t_0; else tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(2.0 + N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -5e+98], t$95$0, If[LessEqual[x2, 5.5e+49], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[Or[LessEqual[x2, 1.8e+107], N[Not[LessEqual[x2, 3.7e+198]], $MachinePrecision]], t$95$0, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(2 + \left(x2 \cdot x2\right) \cdot 8\right)\\
\mathbf{if}\;x2 \leq -5 \cdot 10^{+98}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x2 \leq 5.5 \cdot 10^{+49}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x2 \leq 1.8 \cdot 10^{+107} \lor \neg \left(x2 \leq 3.7 \cdot 10^{+198}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\end{array}
\end{array}
if x2 < -4.9999999999999998e98 or 5.50000000000000042e49 < x2 < 1.7999999999999999e107 or 3.6999999999999998e198 < x2 Initial program 60.1%
Taylor expanded in x1 around 0 51.5%
Taylor expanded in x2 around inf 51.5%
unpow251.5%
Simplified51.5%
Taylor expanded in x1 around 0 67.4%
*-commutative67.4%
Simplified67.4%
Taylor expanded in x1 around inf 62.2%
unpow262.2%
Simplified62.2%
if -4.9999999999999998e98 < x2 < 5.50000000000000042e49Initial program 73.6%
Simplified73.8%
Taylor expanded in x1 around inf 71.9%
+-commutative71.9%
cube-mult71.9%
unpow271.9%
distribute-rgt-out71.9%
unpow271.9%
Simplified71.9%
Taylor expanded in x1 around inf 76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in x1 around 0 52.6%
fma-def52.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in x1 around 0 52.6%
mul-1-neg52.6%
unsub-neg52.6%
*-commutative52.6%
Simplified52.6%
if 1.7999999999999999e107 < x2 < 3.6999999999999998e198Initial program 82.0%
Simplified82.3%
Taylor expanded in x1 around inf 82.3%
+-commutative82.3%
cube-mult82.3%
unpow282.3%
distribute-rgt-out82.3%
unpow282.3%
Simplified82.3%
Taylor expanded in x1 around inf 70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in x1 around 0 71.1%
Final simplification57.1%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -1.05e-261) (* x2 -6.0) (if (<= x2 4.8e-111) (- x1) (+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -1.05e-261) {
tmp = x2 * -6.0;
} else if (x2 <= 4.8e-111) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-1.05d-261)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 4.8d-111) then
tmp = -x1
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -1.05e-261) {
tmp = x2 * -6.0;
} else if (x2 <= 4.8e-111) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -1.05e-261: tmp = x2 * -6.0 elif x2 <= 4.8e-111: tmp = -x1 else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -1.05e-261) tmp = Float64(x2 * -6.0); elseif (x2 <= 4.8e-111) tmp = Float64(-x1); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -1.05e-261) tmp = x2 * -6.0; elseif (x2 <= 4.8e-111) tmp = -x1; else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -1.05e-261], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 4.8e-111], (-x1), N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.05 \cdot 10^{-261}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 4.8 \cdot 10^{-111}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -1.04999999999999998e-261Initial program 69.0%
Taylor expanded in x1 around 0 50.8%
Taylor expanded in x1 around 0 30.1%
*-commutative30.1%
Simplified30.1%
Taylor expanded in x1 around 0 30.7%
*-commutative30.7%
Simplified30.7%
if -1.04999999999999998e-261 < x2 < 4.8000000000000001e-111Initial program 67.1%
Simplified67.8%
Taylor expanded in x1 around inf 65.9%
+-commutative65.9%
cube-mult65.9%
unpow265.9%
distribute-rgt-out65.9%
unpow265.9%
Simplified65.9%
Taylor expanded in x1 around inf 69.0%
*-commutative69.0%
Simplified69.0%
Taylor expanded in x1 around 0 52.6%
fma-def52.6%
*-commutative52.6%
Simplified52.6%
Taylor expanded in x1 around inf 43.6%
mul-1-neg43.6%
Simplified43.6%
if 4.8000000000000001e-111 < x2 Initial program 71.6%
Taylor expanded in x1 around 0 51.0%
Taylor expanded in x1 around 0 35.5%
*-commutative35.5%
Simplified35.5%
Final simplification35.0%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -1.05e-261) (* x2 -6.0) (if (<= x2 3.8e-111) (- x1) (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -1.05e-261) {
tmp = x2 * -6.0;
} else if (x2 <= 3.8e-111) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-1.05d-261)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 3.8d-111) then
tmp = -x1
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -1.05e-261) {
tmp = x2 * -6.0;
} else if (x2 <= 3.8e-111) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -1.05e-261: tmp = x2 * -6.0 elif x2 <= 3.8e-111: tmp = -x1 else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -1.05e-261) tmp = Float64(x2 * -6.0); elseif (x2 <= 3.8e-111) tmp = Float64(-x1); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -1.05e-261) tmp = x2 * -6.0; elseif (x2 <= 3.8e-111) tmp = -x1; else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -1.05e-261], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 3.8e-111], (-x1), N[(x2 * -6.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.05 \cdot 10^{-261}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 3.8 \cdot 10^{-111}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -1.04999999999999998e-261 or 3.80000000000000022e-111 < x2 Initial program 70.2%
Taylor expanded in x1 around 0 50.9%
Taylor expanded in x1 around 0 32.5%
*-commutative32.5%
Simplified32.5%
Taylor expanded in x1 around 0 32.6%
*-commutative32.6%
Simplified32.6%
if -1.04999999999999998e-261 < x2 < 3.80000000000000022e-111Initial program 67.1%
Simplified67.8%
Taylor expanded in x1 around inf 65.9%
+-commutative65.9%
cube-mult65.9%
unpow265.9%
distribute-rgt-out65.9%
unpow265.9%
Simplified65.9%
Taylor expanded in x1 around inf 69.0%
*-commutative69.0%
Simplified69.0%
Taylor expanded in x1 around 0 52.6%
fma-def52.6%
*-commutative52.6%
Simplified52.6%
Taylor expanded in x1 around inf 43.6%
mul-1-neg43.6%
Simplified43.6%
Final simplification34.8%
(FPCore (x1 x2) :precision binary64 (- (* x2 -6.0) x1))
double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = (x2 * (-6.0d0)) - x1
end function
public static double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
def code(x1, x2): return (x2 * -6.0) - x1
function code(x1, x2) return Float64(Float64(x2 * -6.0) - x1) end
function tmp = code(x1, x2) tmp = (x2 * -6.0) - x1; end
code[x1_, x2_] := N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6 - x1
\end{array}
Initial program 69.5%
Simplified69.7%
Taylor expanded in x1 around inf 68.6%
+-commutative68.6%
cube-mult68.6%
unpow268.6%
distribute-rgt-out68.6%
unpow268.6%
Simplified68.6%
Taylor expanded in x1 around inf 56.6%
*-commutative56.6%
Simplified56.6%
Taylor expanded in x1 around 0 39.8%
fma-def39.8%
*-commutative39.8%
Simplified39.8%
Taylor expanded in x1 around 0 39.8%
mul-1-neg39.8%
unsub-neg39.8%
*-commutative39.8%
Simplified39.8%
Final simplification39.8%
(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 Float64(-x1) end
function tmp = code(x1, x2) tmp = -x1; end
code[x1_, x2_] := (-x1)
\begin{array}{l}
\\
-x1
\end{array}
Initial program 69.5%
Simplified69.7%
Taylor expanded in x1 around inf 68.6%
+-commutative68.6%
cube-mult68.6%
unpow268.6%
distribute-rgt-out68.6%
unpow268.6%
Simplified68.6%
Taylor expanded in x1 around inf 56.6%
*-commutative56.6%
Simplified56.6%
Taylor expanded in x1 around 0 39.8%
fma-def39.8%
*-commutative39.8%
Simplified39.8%
Taylor expanded in x1 around inf 13.8%
mul-1-neg13.8%
Simplified13.8%
Final simplification13.8%
(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 69.5%
Taylor expanded in x1 around 0 51.1%
Taylor expanded in x1 around 0 28.2%
*-commutative28.2%
Simplified28.2%
Taylor expanded in x1 around inf 3.2%
Final simplification3.2%
herbie shell --seed 2023287
(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))))))