
(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 26 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 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0))
(t_4 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_0
(+
(* (* t_3 (* x1 2.0)) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_2 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))))
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_4 4.0 -6.0)) (* (* x1 (* 2.0 t_4)) (+ t_4 -3.0)))
(fma t_1 t_4 (pow x1 3.0))))))
(pow (pow (fma x2 -6.0 x1) 3.0) 0.3333333333333333))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double tmp;
if ((x1 + ((x1 + (((t_0 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_2 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)))) <= ((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_4, 4.0, -6.0)), ((x1 * (2.0 * t_4)) * (t_4 + -3.0))), fma(t_1, t_4, pow(x1, 3.0)))));
} else {
tmp = pow(pow(fma(x2, -6.0, x1), 3.0), 0.3333333333333333);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(3.0 * 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(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_0 * 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_2 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)))) <= 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_4, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_4)) * Float64(t_4 + -3.0))), fma(t_1, t_4, (x1 ^ 3.0)))))); else tmp = (fma(x2, -6.0, x1) ^ 3.0) ^ 0.3333333333333333; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * 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[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$0 * 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$2 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $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$4 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$4), $MachinePrecision]), $MachinePrecision] * N[(t$95$4 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$4 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(x2 * -6.0 + x1), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 3 \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 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_0 \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\_2 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0}\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\_4, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_4\right)\right) \cdot \left(t\_4 + -3\right)\right), \mathsf{fma}\left(t\_1, t\_4, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\mathsf{fma}\left(x2, -6, x1\right)\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Simplified99.6%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 1.3%
Taylor expanded in x1 around 0 4.9%
*-commutative4.9%
Simplified4.9%
add-cbrt-cube48.7%
pow1/3100.0%
pow3100.0%
+-commutative100.0%
fma-define100.0%
Applied egg-rr100.0%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2)))
(t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_5 (* t_4 (* x1 2.0)))
(t_6 (* t_1 t_4)))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(* t_2 (+ (* t_5 (- t_4 3.0)) (* (* x1 x1) (- (* t_4 4.0) 6.0))))
t_6)
t_0))
t_3))
INFINITY)
(+
x1
(+
t_3
(+
x1
(+
t_0
(+
t_6
(*
t_2
(+
(*
t_5
(-
(*
(fma 3.0 (pow x1 2.0) (- (* 2.0 x2) x1))
(/ 1.0 (fma x1 x1 1.0)))
3.0))
(*
(* x1 x1)
(-
(* 4.0 (/ (- (+ (* 2.0 x2) (* 3.0 (pow x1 2.0))) x1) t_2))
6.0)))))))))
(pow (pow (fma x2 -6.0 x1) 3.0) 0.3333333333333333))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_5 = t_4 * (x1 * 2.0);
double t_6 = t_1 * t_4;
double tmp;
if ((x1 + ((x1 + (((t_2 * ((t_5 * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + t_6) + t_0)) + t_3)) <= ((double) INFINITY)) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_6 + (t_2 * ((t_5 * ((fma(3.0, pow(x1, 2.0), ((2.0 * x2) - x1)) * (1.0 / fma(x1, x1, 1.0))) - 3.0)) + ((x1 * x1) * ((4.0 * ((((2.0 * x2) + (3.0 * pow(x1, 2.0))) - x1) / t_2)) - 6.0))))))));
} else {
tmp = pow(pow(fma(x2, -6.0, x1), 3.0), 0.3333333333333333);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_5 = Float64(t_4 * Float64(x1 * 2.0)) t_6 = Float64(t_1 * t_4) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(t_5 * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)))) + t_6) + t_0)) + t_3)) <= Inf) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(t_6 + Float64(t_2 * Float64(Float64(t_5 * Float64(Float64(fma(3.0, (x1 ^ 2.0), Float64(Float64(2.0 * x2) - x1)) * Float64(1.0 / fma(x1, x1, 1.0))) - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(Float64(Float64(2.0 * x2) + Float64(3.0 * (x1 ^ 2.0))) - x1) / t_2)) - 6.0))))))))); else tmp = (fma(x2, -6.0, x1) ^ 3.0) ^ 0.3333333333333333; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$1 * t$95$4), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(t$95$5 * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(t$95$6 + N[(t$95$2 * N[(N[(t$95$5 * N[(N[(N[(3.0 * N[Power[x1, 2.0], $MachinePrecision] + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + N[(3.0 * N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(x2 * -6.0 + x1), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_5 := t\_4 \cdot \left(x1 \cdot 2\right)\\
t_6 := t\_1 \cdot t\_4\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(t\_5 \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_4 \cdot 4 - 6\right)\right) + t\_6\right) + t\_0\right)\right) + t\_3\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(t\_0 + \left(t\_6 + t\_2 \cdot \left(t\_5 \cdot \left(\mathsf{fma}\left(3, {x1}^{2}, 2 \cdot x2 - x1\right) \cdot \frac{1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(2 \cdot x2 + 3 \cdot {x1}^{2}\right) - x1}{t\_2} - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\mathsf{fma}\left(x2, -6, x1\right)\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
fma-define99.4%
div-inv99.4%
associate--l+99.4%
associate-*r*99.4%
fma-define99.4%
pow299.4%
Applied egg-rr99.4%
Taylor expanded in x1 around 0 99.5%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 1.3%
Taylor expanded in x1 around 0 4.9%
*-commutative4.9%
Simplified4.9%
add-cbrt-cube48.7%
pow1/3100.0%
pow3100.0%
+-commutative100.0%
fma-define100.0%
Applied egg-rr100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* 3.0 (pow x1 2.0)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_3)))
(t_5 (/ (- (+ t_1 (* 2.0 x2)) x1) t_3))
(t_6 (* t_5 (* x1 2.0)))
(t_7 (* t_1 t_5)))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(* t_3 (+ (* t_6 (- t_5 3.0)) (* (* x1 x1) (- (* t_5 4.0) 6.0))))
t_7)
t_0))
t_4))
INFINITY)
(+
x1
(+
t_4
(+
x1
(+
t_0
(+
t_7
(*
t_3
(+
(* (* x1 x1) (- (* 4.0 (/ (- (+ (* 2.0 x2) t_2) x1) t_3)) 6.0))
(* t_6 (- (/ (- (fma 2.0 x2 t_2) x1) (fma x1 x1 1.0)) 3.0)))))))))
(pow (pow (fma x2 -6.0 x1) 3.0) 0.3333333333333333))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * pow(x1, 2.0);
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3);
double t_5 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_6 = t_5 * (x1 * 2.0);
double t_7 = t_1 * t_5;
double tmp;
if ((x1 + ((x1 + (((t_3 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))) + t_7) + t_0)) + t_4)) <= ((double) INFINITY)) {
tmp = x1 + (t_4 + (x1 + (t_0 + (t_7 + (t_3 * (((x1 * x1) * ((4.0 * ((((2.0 * x2) + t_2) - x1) / t_3)) - 6.0)) + (t_6 * (((fma(2.0, x2, t_2) - x1) / fma(x1, x1, 1.0)) - 3.0))))))));
} else {
tmp = pow(pow(fma(x2, -6.0, x1), 3.0), 0.3333333333333333);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(3.0 * (x1 ^ 2.0)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_3)) t_5 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_3) t_6 = Float64(t_5 * Float64(x1 * 2.0)) t_7 = Float64(t_1 * t_5) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * Float64(Float64(t_6 * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)))) + t_7) + t_0)) + t_4)) <= Inf) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_0 + Float64(t_7 + Float64(t_3 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(Float64(Float64(2.0 * x2) + t_2) - x1) / t_3)) - 6.0)) + Float64(t_6 * Float64(Float64(Float64(fma(2.0, x2, t_2) - x1) / fma(x1, x1, 1.0)) - 3.0))))))))); else tmp = (fma(x2, -6.0, x1) ^ 3.0) ^ 0.3333333333333333; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$1 * t$95$5), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * N[(N[(t$95$6 * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$7), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$0 + N[(t$95$7 + N[(t$95$3 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$2), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$6 * N[(N[(N[(N[(2.0 * x2 + t$95$2), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(x2 * -6.0 + x1), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 3 \cdot {x1}^{2}\\
t_3 := x1 \cdot x1 + 1\\
t_4 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_3}\\
t_5 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_3}\\
t_6 := t\_5 \cdot \left(x1 \cdot 2\right)\\
t_7 := t\_1 \cdot t\_5\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_3 \cdot \left(t\_6 \cdot \left(t\_5 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right)\right) + t\_7\right) + t\_0\right)\right) + t\_4\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + \left(t\_0 + \left(t\_7 + t\_3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(2 \cdot x2 + t\_2\right) - x1}{t\_3} - 6\right) + t\_6 \cdot \left(\frac{\mathsf{fma}\left(2, x2, t\_2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\mathsf{fma}\left(x2, -6, x1\right)\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
fma-define99.4%
div-inv99.4%
associate--l+99.4%
associate-*r*99.4%
fma-define99.4%
pow299.4%
Applied egg-rr99.4%
Taylor expanded in x1 around 0 99.5%
fma-define99.5%
un-div-inv99.4%
fma-undefine99.4%
pow299.4%
associate-*l*99.4%
associate--l+99.4%
div-sub99.4%
+-commutative99.4%
fma-define99.4%
associate-*l*99.4%
pow299.4%
fma-define99.4%
fma-define99.4%
Applied egg-rr99.4%
div-sub99.4%
Simplified99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 1.3%
Taylor expanded in x1 around 0 4.9%
*-commutative4.9%
Simplified4.9%
add-cbrt-cube48.7%
pow1/3100.0%
pow3100.0%
+-commutative100.0%
fma-define100.0%
Applied egg-rr100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2)))
(t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_5 (* t_4 (* x1 2.0)))
(t_6 (* (* x1 x1) (- (* t_4 4.0) 6.0)))
(t_7 (* t_1 t_4)))
(if (<=
(+
x1
(+ (+ x1 (+ (+ (* t_2 (+ (* t_5 (- t_4 3.0)) t_6)) t_7) t_0)) t_3))
INFINITY)
(+
x1
(+
t_3
(+
x1
(+
t_0
(+
t_7
(*
t_2
(+
t_6
(*
t_5
(-
(*
(fma 3.0 (pow x1 2.0) (- (* 2.0 x2) x1))
(/ 1.0 (fma x1 x1 1.0)))
3.0)))))))))
(pow (pow (fma x2 -6.0 x1) 3.0) 0.3333333333333333))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_5 = t_4 * (x1 * 2.0);
double t_6 = (x1 * x1) * ((t_4 * 4.0) - 6.0);
double t_7 = t_1 * t_4;
double tmp;
if ((x1 + ((x1 + (((t_2 * ((t_5 * (t_4 - 3.0)) + t_6)) + t_7) + t_0)) + t_3)) <= ((double) INFINITY)) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_7 + (t_2 * (t_6 + (t_5 * ((fma(3.0, pow(x1, 2.0), ((2.0 * x2) - x1)) * (1.0 / fma(x1, x1, 1.0))) - 3.0))))))));
} else {
tmp = pow(pow(fma(x2, -6.0, x1), 3.0), 0.3333333333333333);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_5 = Float64(t_4 * Float64(x1 * 2.0)) t_6 = Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)) t_7 = Float64(t_1 * t_4) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(t_5 * Float64(t_4 - 3.0)) + t_6)) + t_7) + t_0)) + t_3)) <= Inf) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(t_7 + Float64(t_2 * Float64(t_6 + Float64(t_5 * Float64(Float64(fma(3.0, (x1 ^ 2.0), Float64(Float64(2.0 * x2) - x1)) * Float64(1.0 / fma(x1, x1, 1.0))) - 3.0))))))))); else tmp = (fma(x2, -6.0, x1) ^ 3.0) ^ 0.3333333333333333; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$1 * t$95$4), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(t$95$5 * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision] + t$95$7), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(t$95$7 + N[(t$95$2 * N[(t$95$6 + N[(t$95$5 * N[(N[(N[(3.0 * N[Power[x1, 2.0], $MachinePrecision] + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(x2 * -6.0 + x1), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_5 := t\_4 \cdot \left(x1 \cdot 2\right)\\
t_6 := \left(x1 \cdot x1\right) \cdot \left(t\_4 \cdot 4 - 6\right)\\
t_7 := t\_1 \cdot t\_4\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(t\_5 \cdot \left(t\_4 - 3\right) + t\_6\right) + t\_7\right) + t\_0\right)\right) + t\_3\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(t\_0 + \left(t\_7 + t\_2 \cdot \left(t\_6 + t\_5 \cdot \left(\mathsf{fma}\left(3, {x1}^{2}, 2 \cdot x2 - x1\right) \cdot \frac{1}{\mathsf{fma}\left(x1, x1, 1\right)} - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\mathsf{fma}\left(x2, -6, x1\right)\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
fma-define99.4%
div-inv99.4%
associate--l+99.4%
associate-*r*99.4%
fma-define99.4%
pow299.4%
Applied egg-rr99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 1.3%
Taylor expanded in x1 around 0 4.9%
*-commutative4.9%
Simplified4.9%
add-cbrt-cube48.7%
pow1/3100.0%
pow3100.0%
+-commutative100.0%
fma-define100.0%
Applied egg-rr100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2)))
(t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_5 (* (* t_4 (* x1 2.0)) (- t_4 3.0)))
(t_6 (* t_1 t_4)))
(if (<=
(+
x1
(+
(+
x1
(+ (+ (* t_2 (+ t_5 (* (* x1 x1) (- (* t_4 4.0) 6.0)))) t_6) t_0))
t_3))
INFINITY)
(+
x1
(+
t_3
(+
x1
(+
t_0
(+
t_6
(*
t_2
(+
t_5
(*
(* x1 x1)
(-
(*
4.0
(/ (fma 3.0 (pow x1 2.0) (- (* 2.0 x2) x1)) (fma x1 x1 1.0)))
6.0)))))))))
(pow (pow (fma x2 -6.0 x1) 3.0) 0.3333333333333333))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_5 = (t_4 * (x1 * 2.0)) * (t_4 - 3.0);
double t_6 = t_1 * t_4;
double tmp;
if ((x1 + ((x1 + (((t_2 * (t_5 + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + t_6) + t_0)) + t_3)) <= ((double) INFINITY)) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_6 + (t_2 * (t_5 + ((x1 * x1) * ((4.0 * (fma(3.0, pow(x1, 2.0), ((2.0 * x2) - x1)) / fma(x1, x1, 1.0))) - 6.0))))))));
} else {
tmp = pow(pow(fma(x2, -6.0, x1), 3.0), 0.3333333333333333);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_5 = Float64(Float64(t_4 * Float64(x1 * 2.0)) * Float64(t_4 - 3.0)) t_6 = Float64(t_1 * t_4) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)))) + t_6) + t_0)) + t_3)) <= Inf) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(t_6 + Float64(t_2 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(fma(3.0, (x1 ^ 2.0), Float64(Float64(2.0 * x2) - x1)) / fma(x1, x1, 1.0))) - 6.0))))))))); else tmp = (fma(x2, -6.0, x1) ^ 3.0) ^ 0.3333333333333333; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$1 * t$95$4), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(t$95$6 + N[(t$95$2 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(3.0 * N[Power[x1, 2.0], $MachinePrecision] + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(x2 * -6.0 + x1), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_5 := \left(t\_4 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(t\_4 - 3\right)\\
t_6 := t\_1 \cdot t\_4\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(t\_5 + \left(x1 \cdot x1\right) \cdot \left(t\_4 \cdot 4 - 6\right)\right) + t\_6\right) + t\_0\right)\right) + t\_3\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(t\_0 + \left(t\_6 + t\_2 \cdot \left(t\_5 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\mathsf{fma}\left(3, {x1}^{2}, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)} - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\mathsf{fma}\left(x2, -6, x1\right)\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
fma-define99.4%
*-un-lft-identity99.4%
associate--l+99.4%
associate-*r*99.4%
fma-define99.4%
pow299.4%
Applied egg-rr99.4%
*-lft-identity99.4%
Simplified99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 1.3%
Taylor expanded in x1 around 0 4.9%
*-commutative4.9%
Simplified4.9%
add-cbrt-cube48.7%
pow1/3100.0%
pow3100.0%
+-commutative100.0%
fma-define100.0%
Applied egg-rr100.0%
Final simplification99.6%
(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
(pow (pow (fma x2 -6.0 x1) 3.0) 0.3333333333333333))))
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 = pow(pow(fma(x2, -6.0, x1), 3.0), 0.3333333333333333);
}
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 = (fma(x2, -6.0, x1) ^ 3.0) ^ 0.3333333333333333; end return 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[Power[N[Power[N[(x2 * -6.0 + x1), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $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}:\\
\;\;\;\;{\left({\left(\mathsf{fma}\left(x2, -6, x1\right)\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 1.3%
Taylor expanded in x1 around 0 4.9%
*-commutative4.9%
Simplified4.9%
add-cbrt-cube48.7%
pow1/3100.0%
pow3100.0%
+-commutative100.0%
fma-define100.0%
Applied egg-rr100.0%
Final simplification99.6%
(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 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.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 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.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 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.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 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.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(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.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 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.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[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.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(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 1.3%
Taylor expanded in x1 around 0 39.7%
Taylor expanded in x1 around 0 54.3%
associate-*r*54.3%
cancel-sign-sub-inv54.3%
metadata-eval54.3%
*-commutative54.3%
*-commutative54.3%
Simplified54.3%
Taylor expanded in x2 around 0 90.5%
Final simplification96.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 6.0 (- (* 2.0 x2) 3.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 -4.5e+153)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -5.6e+102)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(*
x1
(+
t_0
(*
x1
(-
(+ (* x2 8.0) (* x1 (- (+ t_0 (* 6.0 (+ 3.0 (* x2 -2.0)))) 3.0)))
3.0)))))))
(if (<= x1 7e+83)
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_2
(+
(* (* t_3 (* x1 2.0)) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* 3.0 t_1))))
(* 3.0 (- (* x2 -2.0) x1))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 -3.0))
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2))))
2.0)))))))))
double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.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 <= -4.5e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 7e+83) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = 6.0d0 * ((2.0d0 * x2) - 3.0d0)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
if (x1 <= (-4.5d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else if (x1 <= (-5.6d+102)) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0d0) + (x1 * ((t_0 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 3.0d0))) - 3.0d0))))))
else if (x1 <= 7d+83) then
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * (((t_3 * (x1 * 2.0d0)) * (t_3 - 3.0d0)) + ((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)))) + (3.0d0 * t_1)))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * (-3.0d0))) + (x2 * ((x1 * 6.0d0) + ((x1 * ((x1 * 3.0d0) + 9.0d0)) / x2)))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.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 <= -4.5e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 7e+83) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = 6.0 * ((2.0 * x2) - 3.0) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 tmp = 0 if x1 <= -4.5e+153: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) elif x1 <= -5.6e+102: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0)))))) elif x1 <= 7e+83: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(6.0 * Float64(Float64(2.0 * x2) - 3.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 (x1 <= -4.5e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(x1 * Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_0 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 3.0))) - 3.0))))))); elseif (x1 <= 7e+83) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + 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(3.0 * t_1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * -3.0)) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) / x2)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 6.0 * ((2.0 * x2) - 3.0); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; tmp = 0.0; if (x1 <= -4.5e+153) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); elseif (x1 <= -5.6e+102) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0)))))); elseif (x1 <= 7e+83) tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.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[x1, -4.5e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$0 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7e+83], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + 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[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(2 \cdot x2 - 3\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 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2} + \left(x1 + x1 \cdot \left(t\_0 + x1 \cdot \left(\left(x2 \cdot 8 + x1 \cdot \left(\left(t\_0 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 3\right)\right) - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{+83}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \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) + 3 \cdot t\_1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot -3\right) + x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 65.6%
associate-*r*65.6%
cancel-sign-sub-inv65.6%
metadata-eval65.6%
*-commutative65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 87.5%
if -5.60000000000000037e102 < x1 < 6.99999999999999954e83Initial program 98.8%
Taylor expanded in x1 around inf 96.8%
Taylor expanded in x1 around 0 98.7%
mul-1-neg98.7%
unsub-neg98.7%
*-commutative98.7%
Simplified98.7%
if 6.99999999999999954e83 < x1 Initial program 21.3%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 83.4%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification98.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 6.0 (- (* 2.0 x2) 3.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
(if (<= x1 -4.4e+153)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -4.4e+102)
(+
x1
(+
t_4
(+
x1
(*
x1
(+
t_0
(*
x1
(-
(+ (* x2 8.0) (* x1 (- (+ t_0 (* 6.0 (+ 3.0 (* x2 -2.0)))) 3.0)))
3.0)))))))
(if (<= x1 7e+83)
(+
x1
(+
t_4
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_1)
(*
t_2
(+ (* (* t_3 (* x1 2.0)) (- t_3 3.0)) (* (* x1 x1) 6.0))))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 -3.0))
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2))))
2.0)))))))))
double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -4.4e+102) {
tmp = x1 + (t_4 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 7e+83) {
tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = 6.0d0 * ((2.0d0 * x2) - 3.0d0)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
t_4 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)
if (x1 <= (-4.4d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else if (x1 <= (-4.4d+102)) then
tmp = x1 + (t_4 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0d0) + (x1 * ((t_0 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 3.0d0))) - 3.0d0))))))
else if (x1 <= 7d+83) then
tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (t_2 * (((t_3 * (x1 * 2.0d0)) * (t_3 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * (-3.0d0))) + (x2 * ((x1 * 6.0d0) + ((x1 * ((x1 * 3.0d0) + 9.0d0)) / x2)))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -4.4e+102) {
tmp = x1 + (t_4 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 7e+83) {
tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = 6.0 * ((2.0 * x2) - 3.0) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2) tmp = 0 if x1 <= -4.4e+153: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) elif x1 <= -4.4e+102: tmp = x1 + (t_4 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0)))))) elif x1 <= 7e+83: tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * 6.0))))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(6.0 * Float64(Float64(2.0 * x2) - 3.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) tmp = 0.0 if (x1 <= -4.4e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); elseif (x1 <= -4.4e+102) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(x1 * Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_0 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 3.0))) - 3.0))))))); elseif (x1 <= 7e+83) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(t_2 * Float64(Float64(Float64(t_3 * Float64(x1 * 2.0)) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * -3.0)) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) / x2)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 6.0 * ((2.0 * x2) - 3.0); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2); tmp = 0.0; if (x1 <= -4.4e+153) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); elseif (x1 <= -4.4e+102) tmp = x1 + (t_4 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0)))))); elseif (x1 <= 7e+83) tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * 6.0))))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.4e+102], N[(x1 + N[(t$95$4 + N[(x1 + N[(x1 * N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$0 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7e+83], N[(x1 + N[(t$95$4 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] + 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] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(2 \cdot x2 - 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -4.4 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + x1 \cdot \left(t\_0 + x1 \cdot \left(\left(x2 \cdot 8 + x1 \cdot \left(\left(t\_0 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 3\right)\right) - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{+83}:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_1 + 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 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot -3\right) + x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 65.6%
associate-*r*65.6%
cancel-sign-sub-inv65.6%
metadata-eval65.6%
*-commutative65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -4.40000000000000015e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 87.5%
if -4.40000000000000015e102 < x1 < 6.99999999999999954e83Initial program 98.8%
Taylor expanded in x1 around inf 96.8%
Taylor expanded in x1 around inf 97.1%
if 6.99999999999999954e83 < x1 Initial program 21.3%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 83.4%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification97.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 6.0 (- (* 2.0 x2) 3.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 -4.4e+153)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -4.3e+102)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(*
x1
(+
t_0
(*
x1
(-
(+ (* x2 8.0) (* x1 (- (+ t_0 (* 6.0 (+ 3.0 (* x2 -2.0)))) 3.0)))
3.0)))))))
(if (<= x1 7e+83)
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_1)
(*
t_2
(+
(* (* x1 x1) (- (* t_3 4.0) 6.0))
(* (- t_3 3.0) (* (- (* 2.0 x2) x1) (* x1 2.0))))))))
(+ (* x2 -6.0) (* x1 -3.0))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 -3.0))
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2))))
2.0)))))))))
double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.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 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -4.3e+102) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 7e+83) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * (((2.0 * x2) - x1) * (x1 * 2.0)))))))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = 6.0d0 * ((2.0d0 * x2) - 3.0d0)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
if (x1 <= (-4.4d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else if (x1 <= (-4.3d+102)) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0d0) + (x1 * ((t_0 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 3.0d0))) - 3.0d0))))))
else if (x1 <= 7d+83) then
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (t_2 * (((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)) + ((t_3 - 3.0d0) * (((2.0d0 * x2) - x1) * (x1 * 2.0d0)))))))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * (-3.0d0))) + (x2 * ((x1 * 6.0d0) + ((x1 * ((x1 * 3.0d0) + 9.0d0)) / x2)))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.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 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -4.3e+102) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 7e+83) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * (((2.0 * x2) - x1) * (x1 * 2.0)))))))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = 6.0 * ((2.0 * x2) - 3.0) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 tmp = 0 if x1 <= -4.4e+153: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) elif x1 <= -4.3e+102: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0)))))) elif x1 <= 7e+83: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * (((2.0 * x2) - x1) * (x1 * 2.0)))))))) + ((x2 * -6.0) + (x1 * -3.0))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(6.0 * Float64(Float64(2.0 * x2) - 3.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 (x1 <= -4.4e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); elseif (x1 <= -4.3e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(x1 * Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_0 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 3.0))) - 3.0))))))); elseif (x1 <= 7e+83) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) + Float64(Float64(t_3 - 3.0) * Float64(Float64(Float64(2.0 * x2) - x1) * Float64(x1 * 2.0)))))))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * -3.0)) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) / x2)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 6.0 * ((2.0 * x2) - 3.0); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; tmp = 0.0; if (x1 <= -4.4e+153) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); elseif (x1 <= -4.3e+102) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0)))))); elseif (x1 <= 7e+83) tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * (((2.0 * x2) - x1) * (x1 * 2.0)))))))) + ((x2 * -6.0) + (x1 * -3.0))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.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[x1, -4.4e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.3e+102], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$0 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7e+83], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 - 3.0), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(2 \cdot x2 - 3\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 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -4.3 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2} + \left(x1 + x1 \cdot \left(t\_0 + x1 \cdot \left(\left(x2 \cdot 8 + x1 \cdot \left(\left(t\_0 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 3\right)\right) - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{+83}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_1 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right) + \left(t\_3 - 3\right) \cdot \left(\left(2 \cdot x2 - x1\right) \cdot \left(x1 \cdot 2\right)\right)\right)\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot -3\right) + x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 65.6%
associate-*r*65.6%
cancel-sign-sub-inv65.6%
metadata-eval65.6%
*-commutative65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -4.3000000000000001e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 87.5%
if -4.3000000000000001e102 < x1 < 6.99999999999999954e83Initial program 98.8%
Taylor expanded in x1 around inf 96.8%
Taylor expanded in x1 around 0 94.9%
+-commutative94.9%
mul-1-neg94.9%
sub-neg94.9%
Simplified94.9%
Taylor expanded in x1 around 0 95.5%
if 6.99999999999999954e83 < x1 Initial program 21.3%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 83.4%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification96.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (- (* x1 9.0) 2.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2)))
(t_4 (- (* 2.0 x2) 3.0))
(t_5 (* 6.0 t_4)))
(if (<= x1 -4.4e+153)
(+ x1 (+ (* x2 -6.0) t_1))
(if (<= x1 -1.1e+18)
(+
x1
(+
t_3
(+
x1
(*
x1
(+
t_5
(*
x1
(-
(+
(* x2 8.0)
(*
x1
(-
(+
(* 6.0 (+ 3.0 (* x2 -2.0)))
(+
t_5
(* x1 (- (+ (* x2 8.0) (* 4.0 (- 3.0 (* 2.0 x2)))) 6.0))))
3.0)))
3.0)))))))
(if (<= x1 2.3)
(+
x1
(+
(* x2 -6.0)
(+ t_1 (* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(if (<= x1 7e+83)
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_2
(+
(*
(* x1 x1)
(- (* (/ (- (+ t_0 (* 2.0 x2)) x1) t_2) 4.0) 6.0))
(* 4.0 (* x1 (* x2 t_4))))))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 -3.0))
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2))))
2.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * ((x1 * 9.0) - 2.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = (2.0 * x2) - 3.0;
double t_5 = 6.0 * t_4;
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + t_1);
} else if (x1 <= -1.1e+18) {
tmp = x1 + (t_3 + (x1 + (x1 * (t_5 + (x1 * (((x2 * 8.0) + (x1 * (((6.0 * (3.0 + (x2 * -2.0))) + (t_5 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 2.3) {
tmp = x1 + ((x2 * -6.0) + (t_1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else if (x1 <= 7e+83) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + (4.0 * (x1 * (x2 * t_4)))))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * ((x1 * 9.0d0) - 2.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)
t_4 = (2.0d0 * x2) - 3.0d0
t_5 = 6.0d0 * t_4
if (x1 <= (-4.4d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) + t_1)
else if (x1 <= (-1.1d+18)) then
tmp = x1 + (t_3 + (x1 + (x1 * (t_5 + (x1 * (((x2 * 8.0d0) + (x1 * (((6.0d0 * (3.0d0 + (x2 * (-2.0d0)))) + (t_5 + (x1 * (((x2 * 8.0d0) + (4.0d0 * (3.0d0 - (2.0d0 * x2)))) - 6.0d0)))) - 3.0d0))) - 3.0d0))))))
else if (x1 <= 2.3d0) then
tmp = x1 + ((x2 * (-6.0d0)) + (t_1 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else if (x1 <= 7d+83) then
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_2 * (((x1 * x1) * (((((t_0 + (2.0d0 * x2)) - x1) / t_2) * 4.0d0) - 6.0d0)) + (4.0d0 * (x1 * (x2 * t_4)))))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * (-3.0d0))) + (x2 * ((x1 * 6.0d0) + ((x1 * ((x1 * 3.0d0) + 9.0d0)) / x2)))) - 2.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 * 9.0) - 2.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = (2.0 * x2) - 3.0;
double t_5 = 6.0 * t_4;
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + t_1);
} else if (x1 <= -1.1e+18) {
tmp = x1 + (t_3 + (x1 + (x1 * (t_5 + (x1 * (((x2 * 8.0) + (x1 * (((6.0 * (3.0 + (x2 * -2.0))) + (t_5 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 2.3) {
tmp = x1 + ((x2 * -6.0) + (t_1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else if (x1 <= 7e+83) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + (4.0 * (x1 * (x2 * t_4)))))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 * ((x1 * 9.0) - 2.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2) t_4 = (2.0 * x2) - 3.0 t_5 = 6.0 * t_4 tmp = 0 if x1 <= -4.4e+153: tmp = x1 + ((x2 * -6.0) + t_1) elif x1 <= -1.1e+18: tmp = x1 + (t_3 + (x1 + (x1 * (t_5 + (x1 * (((x2 * 8.0) + (x1 * (((6.0 * (3.0 + (x2 * -2.0))) + (t_5 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0)))) - 3.0))) - 3.0)))))) elif x1 <= 2.3: tmp = x1 + ((x2 * -6.0) + (t_1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) elif x1 <= 7e+83: tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + (4.0 * (x1 * (x2 * t_4))))))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(Float64(2.0 * x2) - 3.0) t_5 = Float64(6.0 * t_4) tmp = 0.0 if (x1 <= -4.4e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_1)); elseif (x1 <= -1.1e+18) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(x1 * Float64(t_5 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0))) + Float64(t_5 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(4.0 * Float64(3.0 - Float64(2.0 * x2)))) - 6.0)))) - 3.0))) - 3.0))))))); elseif (x1 <= 2.3) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(t_1 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); elseif (x1 <= 7e+83) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + Float64(4.0 * Float64(x1 * Float64(x2 * t_4)))))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * -3.0)) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) / x2)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 * ((x1 * 9.0) - 2.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2); t_4 = (2.0 * x2) - 3.0; t_5 = 6.0 * t_4; tmp = 0.0; if (x1 <= -4.4e+153) tmp = x1 + ((x2 * -6.0) + t_1); elseif (x1 <= -1.1e+18) tmp = x1 + (t_3 + (x1 + (x1 * (t_5 + (x1 * (((x2 * 8.0) + (x1 * (((6.0 * (3.0 + (x2 * -2.0))) + (t_5 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0)))) - 3.0))) - 3.0)))))); elseif (x1 <= 2.3) tmp = x1 + ((x2 * -6.0) + (t_1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); elseif (x1 <= 7e+83) tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + (4.0 * (x1 * (x2 * t_4))))))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.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[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$5 = N[(6.0 * t$95$4), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.1e+18], N[(x1 + N[(t$95$3 + N[(x1 + N[(x1 * N[(t$95$5 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(4.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.3], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$1 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7e+83], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x1 * N[(x2 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 2 \cdot x2 - 3\\
t_5 := 6 \cdot t\_4\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_1\right)\\
\mathbf{elif}\;x1 \leq -1.1 \cdot 10^{+18}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + x1 \cdot \left(t\_5 + x1 \cdot \left(\left(x2 \cdot 8 + x1 \cdot \left(\left(6 \cdot \left(3 + x2 \cdot -2\right) + \left(t\_5 + x1 \cdot \left(\left(x2 \cdot 8 + 4 \cdot \left(3 - 2 \cdot x2\right)\right) - 6\right)\right)\right) - 3\right)\right) - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.3:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(t\_1 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{+83}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_0 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2} \cdot 4 - 6\right) + 4 \cdot \left(x1 \cdot \left(x2 \cdot t\_4\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot -3\right) + x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 65.6%
associate-*r*65.6%
cancel-sign-sub-inv65.6%
metadata-eval65.6%
*-commutative65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -1.1e18Initial program 66.3%
Taylor expanded in x1 around inf 66.3%
Taylor expanded in x1 around inf 57.9%
Taylor expanded in x1 around 0 78.9%
if -1.1e18 < x1 < 2.2999999999999998Initial program 98.7%
Taylor expanded in x1 around 0 89.7%
Taylor expanded in x1 around 0 89.3%
Taylor expanded in x1 around 0 89.4%
associate-*r*89.4%
cancel-sign-sub-inv89.4%
metadata-eval89.4%
*-commutative89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in x2 around 0 97.3%
if 2.2999999999999998 < x1 < 6.99999999999999954e83Initial program 99.2%
Taylor expanded in x1 around inf 90.4%
Taylor expanded in x1 around 0 81.3%
+-commutative81.3%
mul-1-neg81.3%
sub-neg81.3%
Simplified81.3%
Taylor expanded in x1 around 0 75.5%
if 6.99999999999999954e83 < x1 Initial program 21.3%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 83.4%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification95.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 6.0 (- (* 2.0 x2) 3.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
(if (<= x1 -4.4e+153)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -4.5e+102)
(+
x1
(+
t_3
(+
x1
(*
x1
(+
t_0
(*
x1
(-
(+ (* x2 8.0) (* x1 (- (+ t_0 (* 6.0 (+ 3.0 (* x2 -2.0)))) 3.0)))
3.0)))))))
(if (<= x1 7e+83)
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_1)
(*
t_2
(+
(* (* x1 x1) 6.0)
(*
(- (/ (- (+ t_1 (* 2.0 x2)) x1) t_2) 3.0)
(* (- (* 2.0 x2) x1) (* x1 2.0))))))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 -3.0))
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2))))
2.0)))))))))
double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -4.5e+102) {
tmp = x1 + (t_3 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 7e+83) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * 6.0) + (((((t_1 + (2.0 * x2)) - x1) / t_2) - 3.0) * (((2.0 * x2) - x1) * (x1 * 2.0)))))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = 6.0d0 * ((2.0d0 * x2) - 3.0d0)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)
if (x1 <= (-4.4d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else if (x1 <= (-4.5d+102)) then
tmp = x1 + (t_3 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0d0) + (x1 * ((t_0 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 3.0d0))) - 3.0d0))))))
else if (x1 <= 7d+83) then
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (t_2 * (((x1 * x1) * 6.0d0) + (((((t_1 + (2.0d0 * x2)) - x1) / t_2) - 3.0d0) * (((2.0d0 * x2) - x1) * (x1 * 2.0d0)))))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * (-3.0d0))) + (x2 * ((x1 * 6.0d0) + ((x1 * ((x1 * 3.0d0) + 9.0d0)) / x2)))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= -4.5e+102) {
tmp = x1 + (t_3 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 7e+83) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * 6.0) + (((((t_1 + (2.0 * x2)) - x1) / t_2) - 3.0) * (((2.0 * x2) - x1) * (x1 * 2.0)))))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = 6.0 * ((2.0 * x2) - 3.0) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2) tmp = 0 if x1 <= -4.4e+153: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) elif x1 <= -4.5e+102: tmp = x1 + (t_3 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0)))))) elif x1 <= 7e+83: tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * 6.0) + (((((t_1 + (2.0 * x2)) - x1) / t_2) - 3.0) * (((2.0 * x2) - x1) * (x1 * 2.0))))))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(6.0 * Float64(Float64(2.0 * x2) - 3.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) tmp = 0.0 if (x1 <= -4.4e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); elseif (x1 <= -4.5e+102) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(x1 * Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_0 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 3.0))) - 3.0))))))); elseif (x1 <= 7e+83) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(Float64(Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) - 3.0) * Float64(Float64(Float64(2.0 * x2) - x1) * Float64(x1 * 2.0)))))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * -3.0)) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) / x2)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 6.0 * ((2.0 * x2) - 3.0); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2); tmp = 0.0; if (x1 <= -4.4e+153) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); elseif (x1 <= -4.5e+102) tmp = x1 + (t_3 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0)))))); elseif (x1 <= 7e+83) tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * 6.0) + (((((t_1 + (2.0 * x2)) - x1) / t_2) - 3.0) * (((2.0 * x2) - x1) * (x1 * 2.0))))))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.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[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.5e+102], N[(x1 + N[(t$95$3 + N[(x1 + N[(x1 * N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$0 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7e+83], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(N[(N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(2 \cdot x2 - 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -4.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + x1 \cdot \left(t\_0 + x1 \cdot \left(\left(x2 \cdot 8 + x1 \cdot \left(\left(t\_0 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 3\right)\right) - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{+83}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_1 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(\frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2} - 3\right) \cdot \left(\left(2 \cdot x2 - x1\right) \cdot \left(x1 \cdot 2\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot -3\right) + x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 65.6%
associate-*r*65.6%
cancel-sign-sub-inv65.6%
metadata-eval65.6%
*-commutative65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -4.50000000000000021e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 87.5%
if -4.50000000000000021e102 < x1 < 6.99999999999999954e83Initial program 98.8%
Taylor expanded in x1 around inf 96.8%
Taylor expanded in x1 around 0 94.9%
+-commutative94.9%
mul-1-neg94.9%
sub-neg94.9%
Simplified94.9%
Taylor expanded in x1 around inf 95.4%
if 6.99999999999999954e83 < x1 Initial program 21.3%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 83.4%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification96.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (- (* x1 9.0) 2.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2)))
(t_4 (- (* 2.0 x2) 3.0))
(t_5 (* 6.0 t_4)))
(if (<= x1 -4.4e+153)
(+ x1 (+ (* x2 -6.0) t_1))
(if (<= x1 -5.6e+102)
(+
x1
(+
t_3
(+
x1
(*
x1
(+
t_5
(*
x1
(-
(+ (* x2 8.0) (* x1 (- (+ t_5 (* 6.0 (+ 3.0 (* x2 -2.0)))) 3.0)))
3.0)))))))
(if (<= x1 -9.5e+17)
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_2
(+
(* (* x1 x1) (- (* (/ (- (+ t_0 (* 2.0 x2)) x1) t_2) 4.0) 6.0))
(* x1 2.0))))))))
(if (<= x1 5.6e+27)
(+
x1
(+
(* x2 -6.0)
(+ t_1 (* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2)))
(* 4.0 (* x2 t_4)))
2.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * ((x1 * 9.0) - 2.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = (2.0 * x2) - 3.0;
double t_5 = 6.0 * t_4;
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + t_1);
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_3 + (x1 + (x1 * (t_5 + (x1 * (((x2 * 8.0) + (x1 * ((t_5 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= -9.5e+17) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + (x1 * 2.0)))))));
} else if (x1 <= 5.6e+27) {
tmp = x1 + ((x2 * -6.0) + (t_1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * t_4))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * ((x1 * 9.0d0) - 2.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)
t_4 = (2.0d0 * x2) - 3.0d0
t_5 = 6.0d0 * t_4
if (x1 <= (-4.4d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) + t_1)
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (t_3 + (x1 + (x1 * (t_5 + (x1 * (((x2 * 8.0d0) + (x1 * ((t_5 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 3.0d0))) - 3.0d0))))))
else if (x1 <= (-9.5d+17)) then
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_2 * (((x1 * x1) * (((((t_0 + (2.0d0 * x2)) - x1) / t_2) * 4.0d0) - 6.0d0)) + (x1 * 2.0d0)))))))
else if (x1 <= 5.6d+27) then
tmp = x1 + ((x2 * (-6.0d0)) + (t_1 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * ((x1 * 6.0d0) + ((x1 * ((x1 * 3.0d0) + 9.0d0)) / x2))) + (4.0d0 * (x2 * t_4))) - 2.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 * 9.0) - 2.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = (2.0 * x2) - 3.0;
double t_5 = 6.0 * t_4;
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + t_1);
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_3 + (x1 + (x1 * (t_5 + (x1 * (((x2 * 8.0) + (x1 * ((t_5 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= -9.5e+17) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + (x1 * 2.0)))))));
} else if (x1 <= 5.6e+27) {
tmp = x1 + ((x2 * -6.0) + (t_1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * t_4))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 * ((x1 * 9.0) - 2.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2) t_4 = (2.0 * x2) - 3.0 t_5 = 6.0 * t_4 tmp = 0 if x1 <= -4.4e+153: tmp = x1 + ((x2 * -6.0) + t_1) elif x1 <= -5.6e+102: tmp = x1 + (t_3 + (x1 + (x1 * (t_5 + (x1 * (((x2 * 8.0) + (x1 * ((t_5 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0)))))) elif x1 <= -9.5e+17: tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + (x1 * 2.0))))))) elif x1 <= 5.6e+27: tmp = x1 + ((x2 * -6.0) + (t_1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * t_4))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(Float64(2.0 * x2) - 3.0) t_5 = Float64(6.0 * t_4) tmp = 0.0 if (x1 <= -4.4e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_1)); elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(x1 * Float64(t_5 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_5 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 3.0))) - 3.0))))))); elseif (x1 <= -9.5e+17) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + Float64(x1 * 2.0)))))))); elseif (x1 <= 5.6e+27) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(t_1 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) / x2))) + Float64(4.0 * Float64(x2 * t_4))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 * ((x1 * 9.0) - 2.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2); t_4 = (2.0 * x2) - 3.0; t_5 = 6.0 * t_4; tmp = 0.0; if (x1 <= -4.4e+153) tmp = x1 + ((x2 * -6.0) + t_1); elseif (x1 <= -5.6e+102) tmp = x1 + (t_3 + (x1 + (x1 * (t_5 + (x1 * (((x2 * 8.0) + (x1 * ((t_5 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0)))))); elseif (x1 <= -9.5e+17) tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + (x1 * 2.0))))))); elseif (x1 <= 5.6e+27) tmp = x1 + ((x2 * -6.0) + (t_1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * t_4))) - 2.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[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$5 = N[(6.0 * t$95$4), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e+102], N[(x1 + N[(t$95$3 + N[(x1 + N[(x1 * N[(t$95$5 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$5 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -9.5e+17], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.6e+27], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$1 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 2 \cdot x2 - 3\\
t_5 := 6 \cdot t\_4\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_1\right)\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + x1 \cdot \left(t\_5 + x1 \cdot \left(\left(x2 \cdot 8 + x1 \cdot \left(\left(t\_5 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 3\right)\right) - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -9.5 \cdot 10^{+17}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_0 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2} \cdot 4 - 6\right) + x1 \cdot 2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5.6 \cdot 10^{+27}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(t\_1 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right) + 4 \cdot \left(x2 \cdot t\_4\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 65.6%
associate-*r*65.6%
cancel-sign-sub-inv65.6%
metadata-eval65.6%
*-commutative65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 87.5%
if -5.60000000000000037e102 < x1 < -9.5e17Initial program 99.4%
Taylor expanded in x1 around inf 99.4%
Taylor expanded in x1 around 0 99.5%
+-commutative99.5%
mul-1-neg99.5%
sub-neg99.5%
Simplified99.5%
Taylor expanded in x1 around inf 86.9%
*-commutative86.9%
Simplified86.9%
if -9.5e17 < x1 < 5.5999999999999999e27Initial program 98.7%
Taylor expanded in x1 around 0 88.2%
Taylor expanded in x1 around 0 87.2%
Taylor expanded in x1 around 0 87.3%
associate-*r*87.3%
cancel-sign-sub-inv87.3%
metadata-eval87.3%
*-commutative87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in x2 around 0 95.6%
if 5.5999999999999999e27 < x1 Initial program 32.6%
Taylor expanded in x1 around 0 10.1%
Taylor expanded in x1 around 0 77.4%
Taylor expanded in x2 around inf 91.6%
Final simplification94.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* 6.0 t_0))
(t_2 (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -4.4e+153)
(+ x1 (+ (* x2 -6.0) t_2))
(if (<= x1 -9.5e+17)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+
x1
(*
x1
(+
t_1
(*
x1
(-
(+
(* x2 8.0)
(*
x1
(-
(+
(* 6.0 (+ 3.0 (* x2 -2.0)))
(+
t_1
(* x1 (- (+ (* x2 8.0) (* 4.0 (- 3.0 (* 2.0 x2)))) 6.0))))
3.0)))
3.0)))))))
(if (<= x1 1.55e+29)
(+
x1
(+
(* x2 -6.0)
(+ t_2 (* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2)))
(* 4.0 (* x2 t_0)))
2.0)))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 6.0 * t_0;
double t_2 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + t_2);
} else if (x1 <= -9.5e+17) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 8.0) + (x1 * (((6.0 * (3.0 + (x2 * -2.0))) + (t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 1.55e+29) {
tmp = x1 + ((x2 * -6.0) + (t_2 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * t_0))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = 6.0d0 * t_0
t_2 = x1 * ((x1 * 9.0d0) - 2.0d0)
if (x1 <= (-4.4d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) + t_2)
else if (x1 <= (-9.5d+17)) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 8.0d0) + (x1 * (((6.0d0 * (3.0d0 + (x2 * (-2.0d0)))) + (t_1 + (x1 * (((x2 * 8.0d0) + (4.0d0 * (3.0d0 - (2.0d0 * x2)))) - 6.0d0)))) - 3.0d0))) - 3.0d0))))))
else if (x1 <= 1.55d+29) then
tmp = x1 + ((x2 * (-6.0d0)) + (t_2 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * ((x1 * 6.0d0) + ((x1 * ((x1 * 3.0d0) + 9.0d0)) / x2))) + (4.0d0 * (x2 * t_0))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 6.0 * t_0;
double t_2 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + t_2);
} else if (x1 <= -9.5e+17) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 8.0) + (x1 * (((6.0 * (3.0 + (x2 * -2.0))) + (t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 1.55e+29) {
tmp = x1 + ((x2 * -6.0) + (t_2 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * t_0))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = 6.0 * t_0 t_2 = x1 * ((x1 * 9.0) - 2.0) tmp = 0 if x1 <= -4.4e+153: tmp = x1 + ((x2 * -6.0) + t_2) elif x1 <= -9.5e+17: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 8.0) + (x1 * (((6.0 * (3.0 + (x2 * -2.0))) + (t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0)))) - 3.0))) - 3.0)))))) elif x1 <= 1.55e+29: tmp = x1 + ((x2 * -6.0) + (t_2 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * t_0))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(6.0 * t_0) t_2 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) tmp = 0.0 if (x1 <= -4.4e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_2)); elseif (x1 <= -9.5e+17) 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(x1 * Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0))) + Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(4.0 * Float64(3.0 - Float64(2.0 * x2)))) - 6.0)))) - 3.0))) - 3.0))))))); elseif (x1 <= 1.55e+29) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(t_2 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) / x2))) + Float64(4.0 * Float64(x2 * t_0))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = 6.0 * t_0; t_2 = x1 * ((x1 * 9.0) - 2.0); tmp = 0.0; if (x1 <= -4.4e+153) tmp = x1 + ((x2 * -6.0) + t_2); elseif (x1 <= -9.5e+17) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 8.0) + (x1 * (((6.0 * (3.0 + (x2 * -2.0))) + (t_1 + (x1 * (((x2 * 8.0) + (4.0 * (3.0 - (2.0 * x2)))) - 6.0)))) - 3.0))) - 3.0)))))); elseif (x1 <= 1.55e+29) tmp = x1 + ((x2 * -6.0) + (t_2 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * t_0))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -9.5e+17], 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[(x1 * N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(4.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.55e+29], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$2 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := 6 \cdot t\_0\\
t_2 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_2\right)\\
\mathbf{elif}\;x1 \leq -9.5 \cdot 10^{+17}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(\left(x2 \cdot 8 + x1 \cdot \left(\left(6 \cdot \left(3 + x2 \cdot -2\right) + \left(t\_1 + x1 \cdot \left(\left(x2 \cdot 8 + 4 \cdot \left(3 - 2 \cdot x2\right)\right) - 6\right)\right)\right) - 3\right)\right) - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.55 \cdot 10^{+29}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(t\_2 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right) + 4 \cdot \left(x2 \cdot t\_0\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 65.6%
associate-*r*65.6%
cancel-sign-sub-inv65.6%
metadata-eval65.6%
*-commutative65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -9.5e17Initial program 66.3%
Taylor expanded in x1 around inf 66.3%
Taylor expanded in x1 around inf 57.9%
Taylor expanded in x1 around 0 78.9%
if -9.5e17 < x1 < 1.5499999999999999e29Initial program 98.7%
Taylor expanded in x1 around 0 88.2%
Taylor expanded in x1 around 0 87.2%
Taylor expanded in x1 around 0 87.3%
associate-*r*87.3%
cancel-sign-sub-inv87.3%
metadata-eval87.3%
*-commutative87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in x2 around 0 95.6%
if 1.5499999999999999e29 < x1 Initial program 32.6%
Taylor expanded in x1 around 0 10.1%
Taylor expanded in x1 around 0 77.4%
Taylor expanded in x2 around inf 91.6%
Final simplification93.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* 6.0 t_0))
(t_2 (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -4.4e+153)
(+ x1 (+ (* x2 -6.0) t_2))
(if (<= x1 -4.5e+79)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+
x1
(*
x1
(+
t_1
(*
x1
(-
(+ (* x2 8.0) (* x1 (- (+ t_1 (* 6.0 (+ 3.0 (* x2 -2.0)))) 3.0)))
3.0)))))))
(if (<= x1 1.9e+27)
(+
x1
(+
(* x2 -6.0)
(+ t_2 (* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2)))
(* 4.0 (* x2 t_0)))
2.0)))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 6.0 * t_0;
double t_2 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + t_2);
} else if (x1 <= -4.5e+79) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 8.0) + (x1 * ((t_1 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 1.9e+27) {
tmp = x1 + ((x2 * -6.0) + (t_2 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * t_0))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = 6.0d0 * t_0
t_2 = x1 * ((x1 * 9.0d0) - 2.0d0)
if (x1 <= (-4.4d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) + t_2)
else if (x1 <= (-4.5d+79)) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 8.0d0) + (x1 * ((t_1 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 3.0d0))) - 3.0d0))))))
else if (x1 <= 1.9d+27) then
tmp = x1 + ((x2 * (-6.0d0)) + (t_2 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * ((x1 * 6.0d0) + ((x1 * ((x1 * 3.0d0) + 9.0d0)) / x2))) + (4.0d0 * (x2 * t_0))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 6.0 * t_0;
double t_2 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + ((x2 * -6.0) + t_2);
} else if (x1 <= -4.5e+79) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 8.0) + (x1 * ((t_1 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0))))));
} else if (x1 <= 1.9e+27) {
tmp = x1 + ((x2 * -6.0) + (t_2 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * t_0))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = 6.0 * t_0 t_2 = x1 * ((x1 * 9.0) - 2.0) tmp = 0 if x1 <= -4.4e+153: tmp = x1 + ((x2 * -6.0) + t_2) elif x1 <= -4.5e+79: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 8.0) + (x1 * ((t_1 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0)))))) elif x1 <= 1.9e+27: tmp = x1 + ((x2 * -6.0) + (t_2 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * t_0))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(6.0 * t_0) t_2 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) tmp = 0.0 if (x1 <= -4.4e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_2)); elseif (x1 <= -4.5e+79) 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(x1 * Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 3.0))) - 3.0))))))); elseif (x1 <= 1.9e+27) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(t_2 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) / x2))) + Float64(4.0 * Float64(x2 * t_0))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = 6.0 * t_0; t_2 = x1 * ((x1 * 9.0) - 2.0); tmp = 0.0; if (x1 <= -4.4e+153) tmp = x1 + ((x2 * -6.0) + t_2); elseif (x1 <= -4.5e+79) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 8.0) + (x1 * ((t_1 + (6.0 * (3.0 + (x2 * -2.0)))) - 3.0))) - 3.0)))))); elseif (x1 <= 1.9e+27) tmp = x1 + ((x2 * -6.0) + (t_2 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * t_0))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.5e+79], 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[(x1 * N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.9e+27], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$2 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := 6 \cdot t\_0\\
t_2 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_2\right)\\
\mathbf{elif}\;x1 \leq -4.5 \cdot 10^{+79}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(\left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 3\right)\right) - 3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.9 \cdot 10^{+27}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(t\_2 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right) + 4 \cdot \left(x2 \cdot t\_0\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 65.6%
associate-*r*65.6%
cancel-sign-sub-inv65.6%
metadata-eval65.6%
*-commutative65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -4.49999999999999994e79Initial program 33.3%
Taylor expanded in x1 around inf 33.3%
Taylor expanded in x1 around inf 33.3%
Taylor expanded in x1 around 0 68.7%
if -4.49999999999999994e79 < x1 < 1.90000000000000011e27Initial program 98.7%
Taylor expanded in x1 around 0 82.8%
Taylor expanded in x1 around 0 81.2%
Taylor expanded in x1 around 0 81.6%
associate-*r*81.6%
cancel-sign-sub-inv81.6%
metadata-eval81.6%
*-commutative81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in x2 around 0 89.9%
if 1.90000000000000011e27 < x1 Initial program 32.6%
Taylor expanded in x1 around 0 10.1%
Taylor expanded in x1 around 0 77.4%
Taylor expanded in x2 around inf 91.6%
Final simplification90.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -6.6e+93)
(+ x1 (+ (* x2 -6.0) t_0))
(if (<= x1 7e+28)
(+
x1
(+
(* x2 -6.0)
(+ t_0 (* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2)))
(* 4.0 (* x2 (- (* 2.0 x2) 3.0))))
2.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -6.6e+93) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= 7e+28) {
tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) - 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 * ((x1 * 9.0d0) - 2.0d0)
if (x1 <= (-6.6d+93)) then
tmp = x1 + ((x2 * (-6.0d0)) + t_0)
else if (x1 <= 7d+28) then
tmp = x1 + ((x2 * (-6.0d0)) + (t_0 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * ((x1 * 6.0d0) + ((x1 * ((x1 * 3.0d0) + 9.0d0)) / x2))) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -6.6e+93) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= 7e+28) {
tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) - 2.0) tmp = 0 if x1 <= -6.6e+93: tmp = x1 + ((x2 * -6.0) + t_0) elif x1 <= 7e+28: tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) tmp = 0.0 if (x1 <= -6.6e+93) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_0)); elseif (x1 <= 7e+28) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) / x2))) + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) - 2.0); tmp = 0.0; if (x1 <= -6.6e+93) tmp = x1 + ((x2 * -6.0) + t_0); elseif (x1 <= 7e+28) tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.6e+93], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7e+28], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{if}\;x1 \leq -6.6 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_0\right)\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{+28}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right) + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -6.60000000000000017e93Initial program 4.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 50.8%
associate-*r*50.8%
cancel-sign-sub-inv50.8%
metadata-eval50.8%
*-commutative50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in x2 around 0 77.8%
if -6.60000000000000017e93 < x1 < 6.9999999999999999e28Initial program 98.7%
Taylor expanded in x1 around 0 81.7%
Taylor expanded in x1 around 0 80.2%
Taylor expanded in x1 around 0 80.6%
associate-*r*80.6%
cancel-sign-sub-inv80.6%
metadata-eval80.6%
*-commutative80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in x2 around 0 88.9%
if 6.9999999999999999e28 < x1 Initial program 32.6%
Taylor expanded in x1 around 0 10.1%
Taylor expanded in x1 around 0 77.4%
Taylor expanded in x2 around inf 91.6%
Final simplification87.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -7.2e+93)
(+ x1 (+ (* x2 -6.0) t_0))
(if (<= x1 1.4e+41)
(+
x1
(+
(* x2 -6.0)
(+ t_0 (* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 -3.0))
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2))))
2.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -7.2e+93) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= 1.4e+41) {
tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 * ((x1 * 9.0d0) - 2.0d0)
if (x1 <= (-7.2d+93)) then
tmp = x1 + ((x2 * (-6.0d0)) + t_0)
else if (x1 <= 1.4d+41) then
tmp = x1 + ((x2 * (-6.0d0)) + (t_0 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * (-3.0d0))) + (x2 * ((x1 * 6.0d0) + ((x1 * ((x1 * 3.0d0) + 9.0d0)) / x2)))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -7.2e+93) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= 1.4e+41) {
tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) - 2.0) tmp = 0 if x1 <= -7.2e+93: tmp = x1 + ((x2 * -6.0) + t_0) elif x1 <= 1.4e+41: tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) tmp = 0.0 if (x1 <= -7.2e+93) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_0)); elseif (x1 <= 1.4e+41) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * -3.0)) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) / x2)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) - 2.0); tmp = 0.0; if (x1 <= -7.2e+93) tmp = x1 + ((x2 * -6.0) + t_0); elseif (x1 <= 1.4e+41) tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * -3.0)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.2e+93], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4e+41], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{if}\;x1 \leq -7.2 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_0\right)\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+41}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot -3\right) + x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -7.1999999999999998e93Initial program 4.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 50.8%
associate-*r*50.8%
cancel-sign-sub-inv50.8%
metadata-eval50.8%
*-commutative50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in x2 around 0 77.8%
if -7.1999999999999998e93 < x1 < 1.4e41Initial program 98.8%
Taylor expanded in x1 around 0 81.0%
Taylor expanded in x1 around 0 79.6%
Taylor expanded in x1 around 0 80.0%
associate-*r*80.0%
cancel-sign-sub-inv80.0%
metadata-eval80.0%
*-commutative80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in x2 around 0 88.0%
if 1.4e41 < x1 Initial program 27.4%
Taylor expanded in x1 around 0 6.8%
Taylor expanded in x1 around 0 79.2%
Taylor expanded in x2 around inf 94.5%
Taylor expanded in x2 around 0 94.5%
*-commutative94.5%
Simplified94.5%
Final simplification87.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.85e+121)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 3.9e+102)
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* x2 (* x1 (+ 6.0 (/ 9.0 x2)))))
2.0))))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.85e+121) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= 3.9e+102) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x2 * (x1 * (6.0 + (9.0 / x2))))) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.85d+121)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else if (x1 <= 3.9d+102) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x2 * (x1 * (6.0d0 + (9.0d0 / x2))))) - 2.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.85e+121) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= 3.9e+102) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x2 * (x1 * (6.0 + (9.0 / x2))))) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.85e+121: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) elif x1 <= 3.9e+102: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x2 * (x1 * (6.0 + (9.0 / x2))))) - 2.0))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.85e+121) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); elseif (x1 <= 3.9e+102) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x2 * Float64(x1 * Float64(6.0 + Float64(9.0 / x2))))) - 2.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.85e+121) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); elseif (x1 <= 3.9e+102) tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x2 * (x1 * (6.0 + (9.0 / x2))))) - 2.0))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.85e+121], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.9e+102], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(x1 * N[(6.0 + N[(9.0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.85 \cdot 10^{+121}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x2 \cdot \left(x1 \cdot \left(6 + \frac{9}{x2}\right)\right)\right) - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.85000000000000006e121Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 55.9%
associate-*r*55.9%
cancel-sign-sub-inv55.9%
metadata-eval55.9%
*-commutative55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in x2 around 0 85.4%
if -1.85000000000000006e121 < x1 < 3.8999999999999998e102Initial program 97.7%
Taylor expanded in x1 around 0 77.2%
Taylor expanded in x1 around 0 75.9%
Taylor expanded in x2 around inf 77.5%
Taylor expanded in x1 around 0 76.2%
associate-*r*76.8%
*-commutative76.8%
associate-*l*78.4%
+-commutative78.4%
associate-*r/78.4%
metadata-eval78.4%
Simplified78.4%
if 3.8999999999999998e102 < x1 Initial program 15.9%
Taylor expanded in x1 around 0 2.9%
Taylor expanded in x1 around 0 86.4%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification83.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -7.2e+93)
(+ x1 (+ (* x2 -6.0) t_0))
(if (<= x1 2.9e+84)
(+
x1
(+
(* x2 -6.0)
(+ t_0 (* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -7.2e+93) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= 2.9e+84) {
tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 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 * ((x1 * 9.0d0) - 2.0d0)
if (x1 <= (-7.2d+93)) then
tmp = x1 + ((x2 * (-6.0d0)) + t_0)
else if (x1 <= 2.9d+84) then
tmp = x1 + ((x2 * (-6.0d0)) + (t_0 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -7.2e+93) {
tmp = x1 + ((x2 * -6.0) + t_0);
} else if (x1 <= 2.9e+84) {
tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) - 2.0) tmp = 0 if x1 <= -7.2e+93: tmp = x1 + ((x2 * -6.0) + t_0) elif x1 <= 2.9e+84: tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) tmp = 0.0 if (x1 <= -7.2e+93) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_0)); elseif (x1 <= 2.9e+84) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) - 2.0); tmp = 0.0; if (x1 <= -7.2e+93) tmp = x1 + ((x2 * -6.0) + t_0); elseif (x1 <= 2.9e+84) tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.2e+93], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.9e+84], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{if}\;x1 \leq -7.2 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_0\right)\\
\mathbf{elif}\;x1 \leq 2.9 \cdot 10^{+84}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -7.1999999999999998e93Initial program 4.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 50.8%
associate-*r*50.8%
cancel-sign-sub-inv50.8%
metadata-eval50.8%
*-commutative50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in x2 around 0 77.8%
if -7.1999999999999998e93 < x1 < 2.89999999999999989e84Initial program 98.8%
Taylor expanded in x1 around 0 79.9%
Taylor expanded in x1 around 0 78.5%
Taylor expanded in x1 around 0 78.8%
associate-*r*78.8%
cancel-sign-sub-inv78.8%
metadata-eval78.8%
*-commutative78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in x2 around 0 86.6%
if 2.89999999999999989e84 < x1 Initial program 19.6%
Taylor expanded in x1 around 0 2.9%
Taylor expanded in x1 around 0 83.0%
Taylor expanded in x2 around 0 96.1%
*-commutative96.1%
Simplified96.1%
Final simplification86.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -9e+86)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 1.22e+85)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -9e+86) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= 1.22e+85) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-9d+86)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else if (x1 <= 1.22d+85) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -9e+86) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x1 <= 1.22e+85) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -9e+86: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) elif x1 <= 1.22e+85: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -9e+86) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); elseif (x1 <= 1.22e+85) 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)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -9e+86) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); elseif (x1 <= 1.22e+85) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -9e+86], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.22e+85], 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], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -9 \cdot 10^{+86}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 1.22 \cdot 10^{+85}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -8.99999999999999986e86Initial program 9.1%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 48.7%
associate-*r*48.7%
cancel-sign-sub-inv48.7%
metadata-eval48.7%
*-commutative48.7%
*-commutative48.7%
Simplified48.7%
Taylor expanded in x2 around 0 74.5%
if -8.99999999999999986e86 < x1 < 1.22e85Initial program 98.8%
Taylor expanded in x1 around 0 80.8%
Taylor expanded in x1 around 0 80.6%
if 1.22e85 < x1 Initial program 19.6%
Taylor expanded in x1 around 0 2.9%
Taylor expanded in x1 around 0 83.0%
Taylor expanded in x2 around 0 96.1%
*-commutative96.1%
Simplified96.1%
Final simplification82.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.42e+203) (not (<= x2 1.35e+130))) (+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))) (+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.42e+203) || !(x2 <= 1.35e+130)) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.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.42d+203)) .or. (.not. (x2 <= 1.35d+130))) then
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.42e+203) || !(x2 <= 1.35e+130)) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.42e+203) or not (x2 <= 1.35e+130): tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.42e+203) || !(x2 <= 1.35e+130)) tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.42e+203) || ~((x2 <= 1.35e+130))) tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.42e+203], N[Not[LessEqual[x2, 1.35e+130]], $MachinePrecision]], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.42 \cdot 10^{+203} \lor \neg \left(x2 \leq 1.35 \cdot 10^{+130}\right):\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x2 < -1.41999999999999999e203 or 1.3499999999999999e130 < x2 Initial program 62.8%
Taylor expanded in x1 around 0 49.7%
Taylor expanded in x1 around inf 70.7%
if -1.41999999999999999e203 < x2 < 1.3499999999999999e130Initial program 71.1%
Taylor expanded in x1 around 0 54.0%
Taylor expanded in x1 around 0 69.2%
Taylor expanded in x1 around 0 72.4%
associate-*r*72.4%
cancel-sign-sub-inv72.4%
metadata-eval72.4%
*-commutative72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in x2 around 0 76.6%
Final simplification75.2%
(FPCore (x1 x2) :precision binary64 (+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0)))))
double code(double x1, double x2) {
return x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
end function
public static double code(double x1, double x2) {
return x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
def code(x1, x2): return x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)))
function code(x1, x2) return Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))) end
function tmp = code(x1, x2) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); end
code[x1_, x2_] := N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)
\end{array}
Initial program 69.1%
Taylor expanded in x1 around 0 53.0%
Taylor expanded in x1 around 0 66.4%
Taylor expanded in x1 around 0 68.5%
associate-*r*68.5%
cancel-sign-sub-inv68.5%
metadata-eval68.5%
*-commutative68.5%
*-commutative68.5%
Simplified68.5%
Taylor expanded in x2 around 0 67.9%
Final simplification67.9%
(FPCore (x1 x2) :precision binary64 (* x2 (- (/ x1 x2) 6.0)))
double code(double x1, double x2) {
return x2 * ((x1 / x2) - 6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * ((x1 / x2) - 6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * ((x1 / x2) - 6.0);
}
def code(x1, x2): return x2 * ((x1 / x2) - 6.0)
function code(x1, x2) return Float64(x2 * Float64(Float64(x1 / x2) - 6.0)) end
function tmp = code(x1, x2) tmp = x2 * ((x1 / x2) - 6.0); end
code[x1_, x2_] := N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot \left(\frac{x1}{x2} - 6\right)
\end{array}
Initial program 69.1%
Taylor expanded in x1 around 0 53.0%
Taylor expanded in x1 around 0 28.6%
*-commutative28.6%
Simplified28.6%
Taylor expanded in x2 around inf 32.6%
Final simplification32.6%
(FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x2 * (-6.0d0))
end function
public static double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
def code(x1, x2): return x1 + (x2 * -6.0)
function code(x1, x2) return Float64(x1 + Float64(x2 * -6.0)) end
function tmp = code(x1, x2) tmp = x1 + (x2 * -6.0); end
code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + x2 \cdot -6
\end{array}
Initial program 69.1%
Taylor expanded in x1 around 0 53.0%
Taylor expanded in x1 around 0 28.6%
*-commutative28.6%
Simplified28.6%
Final simplification28.6%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 69.1%
Taylor expanded in x1 around 0 53.0%
Taylor expanded in x1 around 0 28.6%
*-commutative28.6%
Simplified28.6%
Taylor expanded in x1 around 0 28.4%
Final simplification28.4%
(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.1%
Taylor expanded in x1 around 0 53.0%
Taylor expanded in x1 around 0 28.6%
*-commutative28.6%
Simplified28.6%
Taylor expanded in x1 around inf 3.4%
Final simplification3.4%
herbie shell --seed 2024059
(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))))))