
(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 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* 3.0 (* x1 x1))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_4 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_0 4.0 -6.0)) (* (* x1 (* 2.0 t_0)) (+ t_0 -3.0)))
(fma t_4 t_0 (pow x1 3.0))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0)))))))
double code(double x1, double x2) {
double t_0 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (x1 * x1);
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_0, 4.0, -6.0)), ((x1 * (2.0 * t_0)) * (t_0 + -3.0))), fma(t_4, t_0, pow(x1, 3.0)))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(3.0 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_0, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_0)) * Float64(t_0 + -3.0))), fma(t_4, t_0, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$4 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * t$95$0 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 3 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_4 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_0, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_0\right)\right) \cdot \left(t\_0 + -3\right)\right), \mathsf{fma}\left(t\_4, t\_0, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -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%
Simplified99.7%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* t_1 t_3))
(t_5 (* (* (* x1 2.0) t_3) (- t_3 3.0)))
(t_6 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
(if (<=
(+
x1
(+
(+
x1
(+ (+ (* t_2 (+ t_5 (* (* x1 x1) (- (* t_3 4.0) 6.0)))) t_4) t_0))
t_6))
INFINITY)
(+
x1
(+
t_6
(+
x1
(+
t_0
(+
t_4
(*
t_2
(+
t_5
(*
(* x1 x1)
(-
(* 4.0 (/ (- (+ (* 2.0 x2) (* 3.0 (pow x1 2.0))) x1) t_2))
6.0)))))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_1 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if ((x1 + ((x1 + (((t_2 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= ((double) INFINITY)) {
tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_2 * (t_5 + ((x1 * x1) * ((4.0 * ((((2.0 * x2) + (3.0 * pow(x1, 2.0))) - x1) / t_2)) - 6.0))))))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_1 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if ((x1 + ((x1 + (((t_2 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Double.POSITIVE_INFINITY) {
tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_2 * (t_5 + ((x1 * x1) * ((4.0 * ((((2.0 * x2) + (3.0 * Math.pow(x1, 2.0))) - x1) / t_2)) - 6.0))))))));
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_4 = t_1 * t_3 t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0) t_6 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2) tmp = 0 if (x1 + ((x1 + (((t_2 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= math.inf: tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_2 * (t_5 + ((x1 * x1) * ((4.0 * ((((2.0 * x2) + (3.0 * math.pow(x1, 2.0))) - x1) / t_2)) - 6.0)))))))) else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(t_1 * t_3) t_5 = Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) t_6 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Inf) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_2 * Float64(t_5 + 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 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_4 = t_1 * t_3; t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0); t_6 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2); tmp = 0.0; if ((x1 + ((x1 + (((t_2 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Inf) tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_2 * (t_5 + ((x1 * x1) * ((4.0 * ((((2.0 * x2) + (3.0 * (x1 ^ 2.0))) - x1) / t_2)) - 6.0)))))))); else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $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$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$2 * N[(t$95$5 + 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[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := t\_1 \cdot t\_3\\
t_5 := \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right)\\
t_6 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(t\_5 + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_4\right) + t\_0\right)\right) + t\_6\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + \left(t\_0 + \left(t\_4 + t\_2 \cdot \left(t\_5 + \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}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -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%
Taylor expanded in x1 around 0 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 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))))
(if (<= (+ x1 (+ t_3 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1)))) INFINITY)
(+ x1 (+ t_3 (* 3.0 (/ (- (* x1 (+ (* x1 3.0) -1.0)) (* 2.0 x2)) t_1))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)));
double tmp;
if ((x1 + (t_3 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= ((double) INFINITY)) {
tmp = x1 + (t_3 + (3.0 * (((x1 * ((x1 * 3.0) + -1.0)) - (2.0 * x2)) / t_1)));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)));
double tmp;
if ((x1 + (t_3 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= Double.POSITIVE_INFINITY) {
tmp = x1 + (t_3 + (3.0 * (((x1 * ((x1 * 3.0) + -1.0)) - (2.0 * x2)) / t_1)));
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1))) tmp = 0 if (x1 + (t_3 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= math.inf: tmp = x1 + (t_3 + (3.0 * (((x1 * ((x1 * 3.0) + -1.0)) - (2.0 * x2)) / t_1))) else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) tmp = 0.0 if (Float64(x1 + Float64(t_3 + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) <= Inf) tmp = Float64(x1 + Float64(t_3 + Float64(3.0 * Float64(Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0)) - Float64(2.0 * x2)) / t_1)))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1))); tmp = 0.0; if ((x1 + (t_3 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= Inf) tmp = x1 + (t_3 + (3.0 * (((x1 * ((x1 * 3.0) + -1.0)) - (2.0 * x2)) / t_1))); else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.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[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $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$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(t$95$3 + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$3 + N[(3.0 * N[(N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{if}\;x1 + \left(t\_3 + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_3 + 3 \cdot \frac{x1 \cdot \left(x1 \cdot 3 + -1\right) - 2 \cdot x2}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -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%
associate-*r*99.4%
expm1-log1p-u99.4%
expm1-undefine99.2%
pow299.2%
Applied egg-rr99.2%
Taylor expanded in x1 around 0 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 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 2.0 (+ 1.0 (* 3.0 (- (* 2.0 x2) 3.0)))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0))
(t_4
(/
(+
t_1
(*
x1
(-
(+
(* x2 -6.0)
(* x1 (+ -1.0 (+ t_1 (* 3.0 (* x1 (- 3.0 (* x2 -2.0))))))))
6.0)))
x1))
(t_5
(+
x1
(+
(+
x1
(+
(+
(*
t_0
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_2 t_3))
(* x1 (* x1 x1))))
9.0))))
(if (<= x1 -1e+231)
(/ (+ t_1 (* x1 (- (+ (* x2 -6.0) (* x1 (+ -1.0 t_1))) 6.0))) x1)
(if (<= x1 -5.5e+102)
t_4
(if (<= x1 -0.185)
t_5
(if (<= x1 0.023)
(- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
(if (<= x1 1.14e+154) t_5 t_4)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)));
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = (t_1 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_1 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_5 = x1 + ((x1 + (((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_2 * t_3)) + (x1 * (x1 * x1)))) + 9.0);
double tmp;
if (x1 <= -1e+231) {
tmp = (t_1 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_1))) - 6.0))) / x1;
} else if (x1 <= -5.5e+102) {
tmp = t_4;
} else if (x1 <= -0.185) {
tmp = t_5;
} else if (x1 <= 0.023) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = t_5;
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = 2.0d0 * (1.0d0 + (3.0d0 * ((2.0d0 * x2) - 3.0d0)))
t_2 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
t_4 = (t_1 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (t_1 + (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))))))) - 6.0d0))) / x1
t_5 = x1 + ((x1 + (((t_0 * ((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)))) + (t_2 * t_3)) + (x1 * (x1 * x1)))) + 9.0d0)
if (x1 <= (-1d+231)) then
tmp = (t_1 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + t_1))) - 6.0d0))) / x1
else if (x1 <= (-5.5d+102)) then
tmp = t_4
else if (x1 <= (-0.185d0)) then
tmp = t_5
else if (x1 <= 0.023d0) then
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
else if (x1 <= 1.14d+154) then
tmp = t_5
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)));
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = (t_1 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_1 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_5 = x1 + ((x1 + (((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_2 * t_3)) + (x1 * (x1 * x1)))) + 9.0);
double tmp;
if (x1 <= -1e+231) {
tmp = (t_1 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_1))) - 6.0))) / x1;
} else if (x1 <= -5.5e+102) {
tmp = t_4;
} else if (x1 <= -0.185) {
tmp = t_5;
} else if (x1 <= 0.023) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = t_5;
} else {
tmp = t_4;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0))) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0 t_4 = (t_1 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_1 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1 t_5 = x1 + ((x1 + (((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_2 * t_3)) + (x1 * (x1 * x1)))) + 9.0) tmp = 0 if x1 <= -1e+231: tmp = (t_1 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_1))) - 6.0))) / x1 elif x1 <= -5.5e+102: tmp = t_4 elif x1 <= -0.185: tmp = t_5 elif x1 <= 0.023: tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 elif x1 <= 1.14e+154: tmp = t_5 else: tmp = t_4 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(2.0 * Float64(1.0 + Float64(3.0 * Float64(Float64(2.0 * x2) - 3.0)))) 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(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(t_1 + Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))))))) - 6.0))) / x1) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_2 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + 9.0)) tmp = 0.0 if (x1 <= -1e+231) tmp = Float64(Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + t_1))) - 6.0))) / x1); elseif (x1 <= -5.5e+102) tmp = t_4; elseif (x1 <= -0.185) tmp = t_5; elseif (x1 <= 0.023) tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); elseif (x1 <= 1.14e+154) tmp = t_5; else tmp = t_4; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0))); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0; t_4 = (t_1 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_1 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1; t_5 = x1 + ((x1 + (((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_2 * t_3)) + (x1 * (x1 * x1)))) + 9.0); tmp = 0.0; if (x1 <= -1e+231) tmp = (t_1 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_1))) - 6.0))) / x1; elseif (x1 <= -5.5e+102) tmp = t_4; elseif (x1 <= -0.185) tmp = t_5; elseif (x1 <= 0.023) tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; elseif (x1 <= 1.14e+154) tmp = t_5; else tmp = t_4; 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[(2.0 * N[(1.0 + N[(3.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $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[(t$95$1 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(t$95$1 + N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 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] + 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+231], N[(N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], If[LessEqual[x1, -5.5e+102], t$95$4, If[LessEqual[x1, -0.185], t$95$5, If[LessEqual[x1, 0.023], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.14e+154], t$95$5, t$95$4]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\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{t\_1 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + \left(t\_1 + 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\right) - 6\right)}{x1}\\
t_5 := x1 + \left(\left(x1 + \left(\left(t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_2 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 9\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+231}:\\
\;\;\;\;\frac{t\_1 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + t\_1\right)\right) - 6\right)}{x1}\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq -0.185:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 0.023:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\mathbf{elif}\;x1 \leq 1.14 \cdot 10^{+154}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if x1 < -1.0000000000000001e231Initial program 0.0%
fma-define0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r*0.0%
fma-undefine0.0%
add-cube-cbrt0.0%
Applied egg-rr0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 93.3%
if -1.0000000000000001e231 < x1 < -5.49999999999999981e102 or 1.13999999999999997e154 < x1 Initial program 1.8%
fma-define1.8%
associate-*r*1.8%
*-commutative1.8%
associate-*r*1.8%
fma-undefine1.8%
add-cube-cbrt1.8%
Applied egg-rr1.8%
Taylor expanded in x1 around inf 1.8%
Taylor expanded in x1 around 0 0.4%
Taylor expanded in x1 around 0 82.1%
if -5.49999999999999981e102 < x1 < -0.185 or 0.023 < x1 < 1.13999999999999997e154Initial program 99.3%
Taylor expanded in x1 around inf 98.8%
if -0.185 < x1 < 0.023Initial program 99.4%
Simplified99.3%
Taylor expanded in x1 around 0 89.6%
Taylor expanded in x2 around 0 98.0%
Final simplification94.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0)))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0))
(t_4
(+
x1
(+
(+
x1
(+
(+
(*
t_0
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_2 t_3))
(* x1 (* x1 x1))))
9.0))))
(if (<= x1 -1e+103)
t_1
(if (<= x1 -0.185)
t_4
(if (<= x1 0.112)
(- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
(if (<= x1 5e+88) t_4 t_1))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = x1 + ((x1 + (((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_2 * t_3)) + (x1 * (x1 * x1)))) + 9.0);
double tmp;
if (x1 <= -1e+103) {
tmp = t_1;
} else if (x1 <= -0.185) {
tmp = t_4;
} else if (x1 <= 0.112) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 5e+88) {
tmp = t_4;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + (3.0d0 * (x2 * (-2.0d0))))
t_2 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
t_4 = x1 + ((x1 + (((t_0 * ((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)))) + (t_2 * t_3)) + (x1 * (x1 * x1)))) + 9.0d0)
if (x1 <= (-1d+103)) then
tmp = t_1
else if (x1 <= (-0.185d0)) then
tmp = t_4
else if (x1 <= 0.112d0) then
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
else if (x1 <= 5d+88) then
tmp = t_4
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = x1 + ((x1 + (((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_2 * t_3)) + (x1 * (x1 * x1)))) + 9.0);
double tmp;
if (x1 <= -1e+103) {
tmp = t_1;
} else if (x1 <= -0.185) {
tmp = t_4;
} else if (x1 <= 0.112) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 5e+88) {
tmp = t_4;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0 t_4 = x1 + ((x1 + (((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_2 * t_3)) + (x1 * (x1 * x1)))) + 9.0) tmp = 0 if x1 <= -1e+103: tmp = t_1 elif x1 <= -0.185: tmp = t_4 elif x1 <= 0.112: tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 elif x1 <= 5e+88: tmp = t_4 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))) 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(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_2 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + 9.0)) tmp = 0.0 if (x1 <= -1e+103) tmp = t_1; elseif (x1 <= -0.185) tmp = t_4; elseif (x1 <= 0.112) tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); elseif (x1 <= 5e+88) tmp = t_4; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -2.0))); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0; t_4 = x1 + ((x1 + (((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_2 * t_3)) + (x1 * (x1 * x1)))) + 9.0); tmp = 0.0; if (x1 <= -1e+103) tmp = t_1; elseif (x1 <= -0.185) tmp = t_4; elseif (x1 <= 0.112) tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; elseif (x1 <= 5e+88) tmp = t_4; else tmp = t_1; 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[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $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[(x1 + N[(N[(x1 + N[(N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 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] + 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+103], t$95$1, If[LessEqual[x1, -0.185], t$95$4, If[LessEqual[x1, 0.112], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 5e+88], t$95$4, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\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 := x1 + \left(\left(x1 + \left(\left(t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_2 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 9\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -0.185:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq 0.112:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+88}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -1e103 or 4.99999999999999997e88 < x1 Initial program 14.6%
Taylor expanded in x1 around 0 14.6%
*-commutative14.6%
Simplified14.6%
Taylor expanded in x1 around inf 100.0%
if -1e103 < x1 < -0.185 or 0.112000000000000002 < x1 < 4.99999999999999997e88Initial program 99.2%
Taylor expanded in x1 around inf 98.5%
if -0.185 < x1 < 0.112000000000000002Initial program 99.4%
Simplified99.3%
Taylor expanded in x1 around 0 89.6%
Taylor expanded in x2 around 0 98.0%
Final simplification98.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* 2.0 (+ 1.0 (* 3.0 (- (* 2.0 x2) 3.0)))))
(t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_4
(/
(+
t_2
(*
x1
(-
(+
(* x2 -6.0)
(* x1 (+ -1.0 (+ t_2 (* 3.0 (* x1 (- 3.0 (* x2 -2.0))))))))
6.0)))
x1))
(t_5
(+
x1
(+
(* 3.0 (* x2 -2.0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_3)
(*
t_1
(+
(* (* x1 x1) (- (* t_3 4.0) 6.0))
(*
(* (* x1 2.0) t_3)
(/ (+ (* 2.0 (/ x2 x1)) (- -1.0 (/ 3.0 x1))) x1)))))))))))
(if (<= x1 -5e+221)
(/ (+ t_2 (* x1 (- (+ (* x2 -6.0) (* x1 (+ -1.0 t_2))) 6.0))) x1)
(if (<= x1 -5.5e+102)
t_4
(if (<= x1 -0.48)
t_5
(if (<= x1 0.185)
(- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
(if (<= x1 7.6e+153) t_5 t_4)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)));
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_4 = (t_2 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_2 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_5 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_3) + (t_1 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (((x1 * 2.0) * t_3) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1))))))));
double tmp;
if (x1 <= -5e+221) {
tmp = (t_2 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_2))) - 6.0))) / x1;
} else if (x1 <= -5.5e+102) {
tmp = t_4;
} else if (x1 <= -0.48) {
tmp = t_5;
} else if (x1 <= 0.185) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 7.6e+153) {
tmp = t_5;
} else {
tmp = t_4;
}
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) + 1.0d0
t_2 = 2.0d0 * (1.0d0 + (3.0d0 * ((2.0d0 * x2) - 3.0d0)))
t_3 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
t_4 = (t_2 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (t_2 + (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))))))) - 6.0d0))) / x1
t_5 = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_3) + (t_1 * (((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * t_3) * (((2.0d0 * (x2 / x1)) + ((-1.0d0) - (3.0d0 / x1))) / x1))))))))
if (x1 <= (-5d+221)) then
tmp = (t_2 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + t_2))) - 6.0d0))) / x1
else if (x1 <= (-5.5d+102)) then
tmp = t_4
else if (x1 <= (-0.48d0)) then
tmp = t_5
else if (x1 <= 0.185d0) then
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
else if (x1 <= 7.6d+153) then
tmp = t_5
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)));
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_4 = (t_2 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_2 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_5 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_3) + (t_1 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (((x1 * 2.0) * t_3) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1))))))));
double tmp;
if (x1 <= -5e+221) {
tmp = (t_2 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_2))) - 6.0))) / x1;
} else if (x1 <= -5.5e+102) {
tmp = t_4;
} else if (x1 <= -0.48) {
tmp = t_5;
} else if (x1 <= 0.185) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 7.6e+153) {
tmp = t_5;
} else {
tmp = t_4;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0))) t_3 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_4 = (t_2 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_2 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1 t_5 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_3) + (t_1 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (((x1 * 2.0) * t_3) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))))))) tmp = 0 if x1 <= -5e+221: tmp = (t_2 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_2))) - 6.0))) / x1 elif x1 <= -5.5e+102: tmp = t_4 elif x1 <= -0.48: tmp = t_5 elif x1 <= 0.185: tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 elif x1 <= 7.6e+153: tmp = t_5 else: tmp = t_4 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(2.0 * Float64(1.0 + Float64(3.0 * Float64(Float64(2.0 * x2) - 3.0)))) t_3 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_4 = Float64(Float64(t_2 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(t_2 + Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))))))) - 6.0))) / x1) t_5 = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_3) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(Float64(Float64(2.0 * Float64(x2 / x1)) + Float64(-1.0 - Float64(3.0 / x1))) / x1))))))))) tmp = 0.0 if (x1 <= -5e+221) tmp = Float64(Float64(t_2 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + t_2))) - 6.0))) / x1); elseif (x1 <= -5.5e+102) tmp = t_4; elseif (x1 <= -0.48) tmp = t_5; elseif (x1 <= 0.185) tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); elseif (x1 <= 7.6e+153) tmp = t_5; else tmp = t_4; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0))); t_3 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_4 = (t_2 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_2 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1; t_5 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_3) + (t_1 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (((x1 * 2.0) * t_3) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))))))); tmp = 0.0; if (x1 <= -5e+221) tmp = (t_2 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_2))) - 6.0))) / x1; elseif (x1 <= -5.5e+102) tmp = t_4; elseif (x1 <= -0.48) tmp = t_5; elseif (x1 <= 0.185) tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; elseif (x1 <= 7.6e+153) tmp = t_5; else tmp = t_4; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(1.0 + N[(3.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$2 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(t$95$2 + N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$3), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(N[(N[(2.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5e+221], N[(N[(t$95$2 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], If[LessEqual[x1, -5.5e+102], t$95$4, If[LessEqual[x1, -0.48], t$95$5, If[LessEqual[x1, 0.185], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 7.6e+153], t$95$5, t$95$4]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := 2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)\\
t_3 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_4 := \frac{t\_2 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + \left(t\_2 + 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\right) - 6\right)}{x1}\\
t_5 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_3 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \frac{2 \cdot \frac{x2}{x1} + \left(-1 - \frac{3}{x1}\right)}{x1}\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+221}:\\
\;\;\;\;\frac{t\_2 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + t\_2\right)\right) - 6\right)}{x1}\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq -0.48:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 0.185:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+153}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if x1 < -5.0000000000000002e221Initial program 0.0%
fma-define0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r*0.0%
fma-undefine0.0%
add-cube-cbrt0.0%
Applied egg-rr0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 93.3%
if -5.0000000000000002e221 < x1 < -5.49999999999999981e102 or 7.59999999999999933e153 < x1 Initial program 1.8%
fma-define1.8%
associate-*r*1.8%
*-commutative1.8%
associate-*r*1.8%
fma-undefine1.8%
add-cube-cbrt1.8%
Applied egg-rr1.8%
Taylor expanded in x1 around inf 1.8%
Taylor expanded in x1 around 0 0.4%
Taylor expanded in x1 around 0 82.1%
if -5.49999999999999981e102 < x1 < -0.47999999999999998 or 0.185 < x1 < 7.59999999999999933e153Initial program 99.3%
Taylor expanded in x1 around 0 98.3%
*-commutative98.3%
Simplified98.3%
Taylor expanded in x1 around inf 98.3%
associate-*r/98.3%
metadata-eval98.3%
Simplified98.3%
if -0.47999999999999998 < x1 < 0.185Initial program 99.4%
Simplified99.3%
Taylor expanded in x1 around 0 89.6%
Taylor expanded in x2 around 0 98.0%
Final simplification94.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (- t_3 3.0))
(t_5 (* (* x1 x1) (- (* t_3 4.0) 6.0)))
(t_6 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0)))))
(t_7 (* t_1 t_3)))
(if (<= x1 -1e+99)
t_6
(if (<= x1 0.0195)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(+
t_0
(+ t_7 (* t_2 (+ t_5 (* t_4 (* (* x1 2.0) (- (* 2.0 x2) x1))))))))))
(if (<= x1 2e+93)
(+
x1
(+
(+ x1 (+ (+ (* t_2 (+ (* (* (* x1 2.0) t_3) t_4) t_5)) t_7) t_0))
(* 3.0 (+ 3.0 (/ -1.0 x1)))))
t_6)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_3 - 3.0;
double t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0);
double t_6 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
double t_7 = t_1 * t_3;
double tmp;
if (x1 <= -1e+99) {
tmp = t_6;
} else if (x1 <= 0.0195) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_7 + (t_2 * (t_5 + (t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else if (x1 <= 2e+93) {
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_4) + t_5)) + t_7) + t_0)) + (3.0 * (3.0 + (-1.0 / x1))));
} else {
tmp = t_6;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
t_4 = t_3 - 3.0d0
t_5 = (x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)
t_6 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + (3.0d0 * (x2 * (-2.0d0))))
t_7 = t_1 * t_3
if (x1 <= (-1d+99)) then
tmp = t_6
else if (x1 <= 0.0195d0) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_7 + (t_2 * (t_5 + (t_4 * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1)))))))))
else if (x1 <= 2d+93) then
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0d0) * t_3) * t_4) + t_5)) + t_7) + t_0)) + (3.0d0 * (3.0d0 + ((-1.0d0) / x1))))
else
tmp = t_6
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_3 - 3.0;
double t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0);
double t_6 = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
double t_7 = t_1 * t_3;
double tmp;
if (x1 <= -1e+99) {
tmp = t_6;
} else if (x1 <= 0.0195) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_7 + (t_2 * (t_5 + (t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else if (x1 <= 2e+93) {
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_4) + t_5)) + t_7) + t_0)) + (3.0 * (3.0 + (-1.0 / x1))));
} else {
tmp = t_6;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_4 = t_3 - 3.0 t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0) t_6 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) t_7 = t_1 * t_3 tmp = 0 if x1 <= -1e+99: tmp = t_6 elif x1 <= 0.0195: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_7 + (t_2 * (t_5 + (t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))) elif x1 <= 2e+93: tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_4) + t_5)) + t_7) + t_0)) + (3.0 * (3.0 + (-1.0 / x1)))) else: tmp = t_6 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(t_3 - 3.0) t_5 = Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) t_6 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))) t_7 = Float64(t_1 * t_3) tmp = 0.0 if (x1 <= -1e+99) tmp = t_6; elseif (x1 <= 0.0195) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(t_0 + Float64(t_7 + Float64(t_2 * Float64(t_5 + Float64(t_4 * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)))))))))); elseif (x1 <= 2e+93) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * t_4) + t_5)) + t_7) + t_0)) + Float64(3.0 * Float64(3.0 + Float64(-1.0 / x1))))); else tmp = t_6; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_4 = t_3 - 3.0; t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0); t_6 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -2.0))); t_7 = t_1 * t_3; tmp = 0.0; if (x1 <= -1e+99) tmp = t_6; elseif (x1 <= 0.0195) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_7 + (t_2 * (t_5 + (t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))); elseif (x1 <= 2e+93) tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_4) + t_5)) + t_7) + t_0)) + (3.0 * (3.0 + (-1.0 / x1)))); else tmp = t_6; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 - 3.0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$1 * t$95$3), $MachinePrecision]}, If[LessEqual[x1, -1e+99], t$95$6, If[LessEqual[x1, 0.0195], 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[(t$95$0 + N[(t$95$7 + N[(t$95$2 * N[(t$95$5 + N[(t$95$4 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+93], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * t$95$4), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision] + t$95$7), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$6]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := t\_3 - 3\\
t_5 := \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\\
t_6 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
t_7 := t\_1 \cdot t\_3\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+99}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x1 \leq 0.0195:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2} + \left(x1 + \left(t\_0 + \left(t\_7 + t\_2 \cdot \left(t\_5 + t\_4 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot t\_4 + t\_5\right) + t\_7\right) + t\_0\right)\right) + 3 \cdot \left(3 + \frac{-1}{x1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_6\\
\end{array}
\end{array}
if x1 < -9.9999999999999997e98 or 2.00000000000000009e93 < x1 Initial program 14.6%
Taylor expanded in x1 around 0 14.6%
*-commutative14.6%
Simplified14.6%
Taylor expanded in x1 around inf 100.0%
if -9.9999999999999997e98 < x1 < 0.0195Initial program 99.3%
Taylor expanded in x1 around 0 97.2%
+-commutative97.2%
mul-1-neg97.2%
unsub-neg97.2%
Simplified97.2%
if 0.0195 < x1 < 2.00000000000000009e93Initial program 99.0%
Taylor expanded in x1 around inf 99.0%
Final simplification98.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (- t_3 3.0))
(t_5 (* (* x1 x1) (- (* t_3 4.0) 6.0)))
(t_6 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0)))))
(t_7 (* t_1 t_3)))
(if (<= x1 -1e+103)
t_6
(if (<= x1 0.047)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(+
t_0
(+ t_7 (* t_2 (+ t_5 (* t_4 (* (* x1 2.0) (- (* 2.0 x2) x1))))))))))
(if (<= x1 2e+93)
(+
x1
(+
(+ x1 (+ (+ (* t_2 (+ (* (* (* x1 2.0) t_3) t_4) t_5)) t_7) t_0))
9.0))
t_6)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_3 - 3.0;
double t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0);
double t_6 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
double t_7 = t_1 * t_3;
double tmp;
if (x1 <= -1e+103) {
tmp = t_6;
} else if (x1 <= 0.047) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_7 + (t_2 * (t_5 + (t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else if (x1 <= 2e+93) {
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_4) + t_5)) + t_7) + t_0)) + 9.0);
} else {
tmp = t_6;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
t_4 = t_3 - 3.0d0
t_5 = (x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)
t_6 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + (3.0d0 * (x2 * (-2.0d0))))
t_7 = t_1 * t_3
if (x1 <= (-1d+103)) then
tmp = t_6
else if (x1 <= 0.047d0) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_7 + (t_2 * (t_5 + (t_4 * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1)))))))))
else if (x1 <= 2d+93) then
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0d0) * t_3) * t_4) + t_5)) + t_7) + t_0)) + 9.0d0)
else
tmp = t_6
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_3 - 3.0;
double t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0);
double t_6 = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
double t_7 = t_1 * t_3;
double tmp;
if (x1 <= -1e+103) {
tmp = t_6;
} else if (x1 <= 0.047) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_7 + (t_2 * (t_5 + (t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else if (x1 <= 2e+93) {
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_4) + t_5)) + t_7) + t_0)) + 9.0);
} else {
tmp = t_6;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_4 = t_3 - 3.0 t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0) t_6 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) t_7 = t_1 * t_3 tmp = 0 if x1 <= -1e+103: tmp = t_6 elif x1 <= 0.047: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_7 + (t_2 * (t_5 + (t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))) elif x1 <= 2e+93: tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_4) + t_5)) + t_7) + t_0)) + 9.0) else: tmp = t_6 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(t_3 - 3.0) t_5 = Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) t_6 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))) t_7 = Float64(t_1 * t_3) tmp = 0.0 if (x1 <= -1e+103) tmp = t_6; elseif (x1 <= 0.047) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(t_0 + Float64(t_7 + Float64(t_2 * Float64(t_5 + Float64(t_4 * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)))))))))); elseif (x1 <= 2e+93) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * t_4) + t_5)) + t_7) + t_0)) + 9.0)); else tmp = t_6; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_4 = t_3 - 3.0; t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0); t_6 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -2.0))); t_7 = t_1 * t_3; tmp = 0.0; if (x1 <= -1e+103) tmp = t_6; elseif (x1 <= 0.047) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_7 + (t_2 * (t_5 + (t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))); elseif (x1 <= 2e+93) tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_4) + t_5)) + t_7) + t_0)) + 9.0); else tmp = t_6; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 - 3.0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$1 * t$95$3), $MachinePrecision]}, If[LessEqual[x1, -1e+103], t$95$6, If[LessEqual[x1, 0.047], 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[(t$95$0 + N[(t$95$7 + N[(t$95$2 * N[(t$95$5 + N[(t$95$4 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+93], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * t$95$4), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision] + t$95$7), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], t$95$6]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := t\_3 - 3\\
t_5 := \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\\
t_6 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
t_7 := t\_1 \cdot t\_3\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+103}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x1 \leq 0.047:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2} + \left(x1 + \left(t\_0 + \left(t\_7 + t\_2 \cdot \left(t\_5 + t\_4 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot t\_4 + t\_5\right) + t\_7\right) + t\_0\right)\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;t\_6\\
\end{array}
\end{array}
if x1 < -1e103 or 2.00000000000000009e93 < x1 Initial program 14.6%
Taylor expanded in x1 around 0 14.6%
*-commutative14.6%
Simplified14.6%
Taylor expanded in x1 around inf 100.0%
if -1e103 < x1 < 0.047Initial program 99.3%
Taylor expanded in x1 around 0 97.2%
+-commutative97.2%
mul-1-neg97.2%
unsub-neg97.2%
Simplified97.2%
if 0.047 < x1 < 2.00000000000000009e93Initial program 99.0%
Taylor expanded in x1 around inf 99.0%
Final simplification98.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (- (* 2.0 x2) 3.0))
(t_3 (* 2.0 (+ 1.0 (* 3.0 t_2))))
(t_4 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_5
(/
(+
t_3
(*
x1
(-
(+
(* x2 -6.0)
(* x1 (+ -1.0 (+ t_3 (* 3.0 (* x1 (- 3.0 (* x2 -2.0))))))))
6.0)))
x1))
(t_6
(+
x1
(+
9.0
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_4)
(*
t_1
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(+ (* 4.0 t_2) (* x1 (- (* x1 6.0) 4.0))))))))))))
(if (<= x1 -2e+222)
(/ (+ t_3 (* x1 (- (+ (* x2 -6.0) (* x1 (+ -1.0 t_3))) 6.0))) x1)
(if (<= x1 -1e+103)
t_5
(if (<= x1 -0.21)
t_6
(if (<= x1 0.019)
(- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
(if (<= x1 1.14e+154) t_6 t_5)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (2.0 * x2) - 3.0;
double t_3 = 2.0 * (1.0 + (3.0 * t_2));
double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_5 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_6 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_1 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((4.0 * t_2) + (x1 * ((x1 * 6.0) - 4.0)))))))));
double tmp;
if (x1 <= -2e+222) {
tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1;
} else if (x1 <= -1e+103) {
tmp = t_5;
} else if (x1 <= -0.21) {
tmp = t_6;
} else if (x1 <= 0.019) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = t_6;
} else {
tmp = t_5;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = (2.0d0 * x2) - 3.0d0
t_3 = 2.0d0 * (1.0d0 + (3.0d0 * t_2))
t_4 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
t_5 = (t_3 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (t_3 + (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))))))) - 6.0d0))) / x1
t_6 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_1 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + ((4.0d0 * t_2) + (x1 * ((x1 * 6.0d0) - 4.0d0)))))))))
if (x1 <= (-2d+222)) then
tmp = (t_3 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + t_3))) - 6.0d0))) / x1
else if (x1 <= (-1d+103)) then
tmp = t_5
else if (x1 <= (-0.21d0)) then
tmp = t_6
else if (x1 <= 0.019d0) then
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
else if (x1 <= 1.14d+154) then
tmp = t_6
else
tmp = t_5
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (2.0 * x2) - 3.0;
double t_3 = 2.0 * (1.0 + (3.0 * t_2));
double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_5 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_6 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_1 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((4.0 * t_2) + (x1 * ((x1 * 6.0) - 4.0)))))))));
double tmp;
if (x1 <= -2e+222) {
tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1;
} else if (x1 <= -1e+103) {
tmp = t_5;
} else if (x1 <= -0.21) {
tmp = t_6;
} else if (x1 <= 0.019) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = t_6;
} else {
tmp = t_5;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = (2.0 * x2) - 3.0 t_3 = 2.0 * (1.0 + (3.0 * t_2)) t_4 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_5 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1 t_6 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_1 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((4.0 * t_2) + (x1 * ((x1 * 6.0) - 4.0))))))))) tmp = 0 if x1 <= -2e+222: tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1 elif x1 <= -1e+103: tmp = t_5 elif x1 <= -0.21: tmp = t_6 elif x1 <= 0.019: tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 elif x1 <= 1.14e+154: tmp = t_6 else: tmp = t_5 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(2.0 * x2) - 3.0) t_3 = Float64(2.0 * Float64(1.0 + Float64(3.0 * t_2))) t_4 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_5 = Float64(Float64(t_3 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(t_3 + Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))))))) - 6.0))) / x1) t_6 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_4) + Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(4.0 * t_2) + Float64(x1 * Float64(Float64(x1 * 6.0) - 4.0)))))))))) tmp = 0.0 if (x1 <= -2e+222) tmp = Float64(Float64(t_3 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + t_3))) - 6.0))) / x1); elseif (x1 <= -1e+103) tmp = t_5; elseif (x1 <= -0.21) tmp = t_6; elseif (x1 <= 0.019) tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); elseif (x1 <= 1.14e+154) tmp = t_6; else tmp = t_5; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = (2.0 * x2) - 3.0; t_3 = 2.0 * (1.0 + (3.0 * t_2)); t_4 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_5 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1; t_6 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_1 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((4.0 * t_2) + (x1 * ((x1 * 6.0) - 4.0))))))))); tmp = 0.0; if (x1 <= -2e+222) tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1; elseif (x1 <= -1e+103) tmp = t_5; elseif (x1 <= -0.21) tmp = t_6; elseif (x1 <= 0.019) tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; elseif (x1 <= 1.14e+154) tmp = t_6; else tmp = t_5; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(1.0 + N[(3.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$3 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(t$95$3 + N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$4), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(4.0 * t$95$2), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2e+222], N[(N[(t$95$3 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], If[LessEqual[x1, -1e+103], t$95$5, If[LessEqual[x1, -0.21], t$95$6, If[LessEqual[x1, 0.019], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.14e+154], t$95$6, t$95$5]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := 2 \cdot x2 - 3\\
t_3 := 2 \cdot \left(1 + 3 \cdot t\_2\right)\\
t_4 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_5 := \frac{t\_3 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + \left(t\_3 + 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\right) - 6\right)}{x1}\\
t_6 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_4 + t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(4 \cdot t\_2 + x1 \cdot \left(x1 \cdot 6 - 4\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+222}:\\
\;\;\;\;\frac{t\_3 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + t\_3\right)\right) - 6\right)}{x1}\\
\mathbf{elif}\;x1 \leq -1 \cdot 10^{+103}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq -0.21:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x1 \leq 0.019:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\mathbf{elif}\;x1 \leq 1.14 \cdot 10^{+154}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if x1 < -2.0000000000000001e222Initial program 0.0%
fma-define0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r*0.0%
fma-undefine0.0%
add-cube-cbrt0.0%
Applied egg-rr0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 93.3%
if -2.0000000000000001e222 < x1 < -1e103 or 1.13999999999999997e154 < x1 Initial program 1.8%
fma-define1.8%
associate-*r*1.8%
*-commutative1.8%
associate-*r*1.8%
fma-undefine1.8%
add-cube-cbrt1.8%
Applied egg-rr1.8%
Taylor expanded in x1 around inf 1.8%
Taylor expanded in x1 around 0 0.4%
Taylor expanded in x1 around 0 82.1%
if -1e103 < x1 < -0.209999999999999992 or 0.0189999999999999995 < x1 < 1.13999999999999997e154Initial program 99.3%
Taylor expanded in x1 around -inf 98.0%
Taylor expanded in x1 around 0 98.1%
Taylor expanded in x1 around inf 98.1%
if -0.209999999999999992 < x1 < 0.0189999999999999995Initial program 99.4%
Simplified99.3%
Taylor expanded in x1 around 0 89.6%
Taylor expanded in x2 around 0 98.0%
Final simplification94.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (- (* 2.0 x2) 3.0)))
(t_4 (* 2.0 (+ 1.0 t_3)))
(t_5
(/
(+
t_4
(*
x1
(-
(+
(* x2 -6.0)
(* x1 (+ -1.0 (+ t_4 (* 3.0 (* x1 (- 3.0 (* x2 -2.0))))))))
6.0)))
x1))
(t_6 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_7 (* t_1 t_6))
(t_8 (* (* x1 x1) (- (* t_6 4.0) 6.0))))
(if (<= x1 -1e+231)
(/ (+ t_4 (* x1 (- (+ (* x2 -6.0) (* x1 (+ -1.0 t_4))) 6.0))) x1)
(if (<= x1 -3.6e+102)
t_5
(if (<= x1 -0.55)
(+
x1
(+
(* 3.0 (* x2 -2.0))
(+
x1
(+
t_0
(+
t_7
(*
t_2
(+ t_8 (* (- t_6 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1))))))))))
(if (<= x1 8.8)
(- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
(if (<= x1 1.14e+154)
(+
x1
(+
9.0
(+
x1
(+
t_0
(+
t_7
(*
t_2
(+
t_8
(-
(/
(+
(* -2.0 (- -1.0 t_3))
(* 2.0 (/ (- 9.0 (* x2 4.0)) x1)))
x1)
6.0))))))))
t_5)))))))
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 * ((2.0 * x2) - 3.0);
double t_4 = 2.0 * (1.0 + t_3);
double t_5 = (t_4 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_4 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_6 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_7 = t_1 * t_6;
double t_8 = (x1 * x1) * ((t_6 * 4.0) - 6.0);
double tmp;
if (x1 <= -1e+231) {
tmp = (t_4 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_4))) - 6.0))) / x1;
} else if (x1 <= -3.6e+102) {
tmp = t_5;
} else if (x1 <= -0.55) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_0 + (t_7 + (t_2 * (t_8 + ((t_6 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else if (x1 <= 8.8) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = x1 + (9.0 + (x1 + (t_0 + (t_7 + (t_2 * (t_8 + ((((-2.0 * (-1.0 - t_3)) + (2.0 * ((9.0 - (x2 * 4.0)) / x1))) / x1) - 6.0)))))));
} else {
tmp = t_5;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * ((2.0d0 * x2) - 3.0d0)
t_4 = 2.0d0 * (1.0d0 + t_3)
t_5 = (t_4 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (t_4 + (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))))))) - 6.0d0))) / x1
t_6 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
t_7 = t_1 * t_6
t_8 = (x1 * x1) * ((t_6 * 4.0d0) - 6.0d0)
if (x1 <= (-1d+231)) then
tmp = (t_4 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + t_4))) - 6.0d0))) / x1
else if (x1 <= (-3.6d+102)) then
tmp = t_5
else if (x1 <= (-0.55d0)) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + (t_0 + (t_7 + (t_2 * (t_8 + ((t_6 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1)))))))))
else if (x1 <= 8.8d0) then
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
else if (x1 <= 1.14d+154) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + (t_7 + (t_2 * (t_8 + (((((-2.0d0) * ((-1.0d0) - t_3)) + (2.0d0 * ((9.0d0 - (x2 * 4.0d0)) / x1))) / x1) - 6.0d0)))))))
else
tmp = t_5
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * ((2.0 * x2) - 3.0);
double t_4 = 2.0 * (1.0 + t_3);
double t_5 = (t_4 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_4 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_6 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_7 = t_1 * t_6;
double t_8 = (x1 * x1) * ((t_6 * 4.0) - 6.0);
double tmp;
if (x1 <= -1e+231) {
tmp = (t_4 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_4))) - 6.0))) / x1;
} else if (x1 <= -3.6e+102) {
tmp = t_5;
} else if (x1 <= -0.55) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_0 + (t_7 + (t_2 * (t_8 + ((t_6 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else if (x1 <= 8.8) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = x1 + (9.0 + (x1 + (t_0 + (t_7 + (t_2 * (t_8 + ((((-2.0 * (-1.0 - t_3)) + (2.0 * ((9.0 - (x2 * 4.0)) / x1))) / x1) - 6.0)))))));
} else {
tmp = t_5;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * ((2.0 * x2) - 3.0) t_4 = 2.0 * (1.0 + t_3) t_5 = (t_4 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_4 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1 t_6 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_7 = t_1 * t_6 t_8 = (x1 * x1) * ((t_6 * 4.0) - 6.0) tmp = 0 if x1 <= -1e+231: tmp = (t_4 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_4))) - 6.0))) / x1 elif x1 <= -3.6e+102: tmp = t_5 elif x1 <= -0.55: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_0 + (t_7 + (t_2 * (t_8 + ((t_6 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))) elif x1 <= 8.8: tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 elif x1 <= 1.14e+154: tmp = x1 + (9.0 + (x1 + (t_0 + (t_7 + (t_2 * (t_8 + ((((-2.0 * (-1.0 - t_3)) + (2.0 * ((9.0 - (x2 * 4.0)) / x1))) / x1) - 6.0))))))) else: tmp = t_5 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(2.0 * x2) - 3.0)) t_4 = Float64(2.0 * Float64(1.0 + t_3)) t_5 = Float64(Float64(t_4 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(t_4 + Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))))))) - 6.0))) / x1) t_6 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_7 = Float64(t_1 * t_6) t_8 = Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0)) tmp = 0.0 if (x1 <= -1e+231) tmp = Float64(Float64(t_4 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + t_4))) - 6.0))) / x1); elseif (x1 <= -3.6e+102) tmp = t_5; elseif (x1 <= -0.55) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(t_0 + Float64(t_7 + Float64(t_2 * Float64(t_8 + Float64(Float64(t_6 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)))))))))); elseif (x1 <= 8.8) tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); elseif (x1 <= 1.14e+154) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(t_7 + Float64(t_2 * Float64(t_8 + Float64(Float64(Float64(Float64(-2.0 * Float64(-1.0 - t_3)) + Float64(2.0 * Float64(Float64(9.0 - Float64(x2 * 4.0)) / x1))) / x1) - 6.0)))))))); else tmp = t_5; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * ((2.0 * x2) - 3.0); t_4 = 2.0 * (1.0 + t_3); t_5 = (t_4 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_4 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1; t_6 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_7 = t_1 * t_6; t_8 = (x1 * x1) * ((t_6 * 4.0) - 6.0); tmp = 0.0; if (x1 <= -1e+231) tmp = (t_4 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_4))) - 6.0))) / x1; elseif (x1 <= -3.6e+102) tmp = t_5; elseif (x1 <= -0.55) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_0 + (t_7 + (t_2 * (t_8 + ((t_6 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))); elseif (x1 <= 8.8) tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; elseif (x1 <= 1.14e+154) tmp = x1 + (9.0 + (x1 + (t_0 + (t_7 + (t_2 * (t_8 + ((((-2.0 * (-1.0 - t_3)) + (2.0 * ((9.0 - (x2 * 4.0)) / x1))) / x1) - 6.0))))))); else tmp = t_5; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(2.0 * N[(1.0 + t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(t$95$4 + N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$1 * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+231], N[(N[(t$95$4 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], If[LessEqual[x1, -3.6e+102], t$95$5, If[LessEqual[x1, -0.55], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$0 + N[(t$95$7 + N[(t$95$2 * N[(t$95$8 + N[(N[(t$95$6 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.8], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.14e+154], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(t$95$7 + N[(t$95$2 * N[(t$95$8 + N[(N[(N[(N[(-2.0 * N[(-1.0 - t$95$3), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(9.0 - N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$5]]]]]]]]]]]]]]
\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 \left(2 \cdot x2 - 3\right)\\
t_4 := 2 \cdot \left(1 + t\_3\right)\\
t_5 := \frac{t\_4 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + \left(t\_4 + 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\right) - 6\right)}{x1}\\
t_6 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_7 := t\_1 \cdot t\_6\\
t_8 := \left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+231}:\\
\;\;\;\;\frac{t\_4 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + t\_4\right)\right) - 6\right)}{x1}\\
\mathbf{elif}\;x1 \leq -3.6 \cdot 10^{+102}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq -0.55:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(t\_0 + \left(t\_7 + t\_2 \cdot \left(t\_8 + \left(t\_6 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8.8:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\mathbf{elif}\;x1 \leq 1.14 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_0 + \left(t\_7 + t\_2 \cdot \left(t\_8 + \left(\frac{-2 \cdot \left(-1 - t\_3\right) + 2 \cdot \frac{9 - x2 \cdot 4}{x1}}{x1} - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if x1 < -1.0000000000000001e231Initial program 0.0%
fma-define0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r*0.0%
fma-undefine0.0%
add-cube-cbrt0.0%
Applied egg-rr0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 93.3%
if -1.0000000000000001e231 < x1 < -3.6000000000000002e102 or 1.13999999999999997e154 < x1 Initial program 1.8%
fma-define1.8%
associate-*r*1.8%
*-commutative1.8%
associate-*r*1.8%
fma-undefine1.8%
add-cube-cbrt1.8%
Applied egg-rr1.8%
Taylor expanded in x1 around inf 1.8%
Taylor expanded in x1 around 0 0.4%
Taylor expanded in x1 around 0 82.1%
if -3.6000000000000002e102 < x1 < -0.55000000000000004Initial program 99.2%
Taylor expanded in x1 around 0 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in x1 around 0 94.2%
+-commutative94.2%
mul-1-neg94.2%
unsub-neg94.2%
Simplified94.2%
if -0.55000000000000004 < x1 < 8.8000000000000007Initial program 99.4%
Simplified99.3%
Taylor expanded in x1 around 0 89.6%
Taylor expanded in x2 around 0 98.0%
if 8.8000000000000007 < x1 < 1.13999999999999997e154Initial program 99.5%
fma-define99.5%
associate-*r*99.5%
*-commutative99.5%
associate-*r*99.5%
fma-undefine99.5%
add-cube-cbrt99.3%
Applied egg-rr99.3%
Taylor expanded in x1 around -inf 80.5%
Taylor expanded in x1 around inf 80.5%
Final simplification92.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* 3.0 (- (* 2.0 x2) 3.0)))
(t_3 (* 2.0 (+ 1.0 t_2)))
(t_4
(/
(+
t_3
(*
x1
(-
(+
(* x2 -6.0)
(* x1 (+ -1.0 (+ t_3 (* 3.0 (* x1 (- 3.0 (* x2 -2.0))))))))
6.0)))
x1))
(t_5 (* x1 (* x1 3.0)))
(t_6 (/ (- (+ t_5 (* 2.0 x2)) x1) t_1))
(t_7 (* (* x1 x1) (- (* t_6 4.0) 6.0))))
(if (<= x1 -2.22e+229)
(/ (+ t_3 (* x1 (- (+ (* x2 -6.0) (* x1 (+ -1.0 t_3))) 6.0))) x1)
(if (<= x1 -3.6e+102)
t_4
(if (<= x1 -0.185)
(+
x1
(+
(* 3.0 (* x2 -2.0))
(+
x1
(+
t_0
(+
(* t_1 (+ (* (* (* x1 2.0) t_6) (- t_6 3.0)) t_7))
(* t_5 (* 2.0 x2)))))))
(if (<= x1 15.5)
(- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
(if (<= x1 1.14e+154)
(+
x1
(+
9.0
(+
x1
(+
t_0
(+
(* t_5 t_6)
(*
t_1
(+
t_7
(-
(/
(+
(* -2.0 (- -1.0 t_2))
(* 2.0 (/ (- 9.0 (* x2 4.0)) x1)))
x1)
6.0))))))))
t_4)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * ((2.0 * x2) - 3.0);
double t_3 = 2.0 * (1.0 + t_2);
double t_4 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_5 = x1 * (x1 * 3.0);
double t_6 = ((t_5 + (2.0 * x2)) - x1) / t_1;
double t_7 = (x1 * x1) * ((t_6 * 4.0) - 6.0);
double tmp;
if (x1 <= -2.22e+229) {
tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1;
} else if (x1 <= -3.6e+102) {
tmp = t_4;
} else if (x1 <= -0.185) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_0 + ((t_1 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + t_7)) + (t_5 * (2.0 * x2))))));
} else if (x1 <= 15.5) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_5 * t_6) + (t_1 * (t_7 + ((((-2.0 * (-1.0 - t_2)) + (2.0 * ((9.0 - (x2 * 4.0)) / x1))) / x1) - 6.0)))))));
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
t_2 = 3.0d0 * ((2.0d0 * x2) - 3.0d0)
t_3 = 2.0d0 * (1.0d0 + t_2)
t_4 = (t_3 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (t_3 + (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))))))) - 6.0d0))) / x1
t_5 = x1 * (x1 * 3.0d0)
t_6 = ((t_5 + (2.0d0 * x2)) - x1) / t_1
t_7 = (x1 * x1) * ((t_6 * 4.0d0) - 6.0d0)
if (x1 <= (-2.22d+229)) then
tmp = (t_3 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + t_3))) - 6.0d0))) / x1
else if (x1 <= (-3.6d+102)) then
tmp = t_4
else if (x1 <= (-0.185d0)) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + (t_0 + ((t_1 * ((((x1 * 2.0d0) * t_6) * (t_6 - 3.0d0)) + t_7)) + (t_5 * (2.0d0 * x2))))))
else if (x1 <= 15.5d0) then
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
else if (x1 <= 1.14d+154) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + ((t_5 * t_6) + (t_1 * (t_7 + (((((-2.0d0) * ((-1.0d0) - t_2)) + (2.0d0 * ((9.0d0 - (x2 * 4.0d0)) / x1))) / x1) - 6.0d0)))))))
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * ((2.0 * x2) - 3.0);
double t_3 = 2.0 * (1.0 + t_2);
double t_4 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_5 = x1 * (x1 * 3.0);
double t_6 = ((t_5 + (2.0 * x2)) - x1) / t_1;
double t_7 = (x1 * x1) * ((t_6 * 4.0) - 6.0);
double tmp;
if (x1 <= -2.22e+229) {
tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1;
} else if (x1 <= -3.6e+102) {
tmp = t_4;
} else if (x1 <= -0.185) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_0 + ((t_1 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + t_7)) + (t_5 * (2.0 * x2))))));
} else if (x1 <= 15.5) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_5 * t_6) + (t_1 * (t_7 + ((((-2.0 * (-1.0 - t_2)) + (2.0 * ((9.0 - (x2 * 4.0)) / x1))) / x1) - 6.0)))))));
} else {
tmp = t_4;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = 3.0 * ((2.0 * x2) - 3.0) t_3 = 2.0 * (1.0 + t_2) t_4 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1 t_5 = x1 * (x1 * 3.0) t_6 = ((t_5 + (2.0 * x2)) - x1) / t_1 t_7 = (x1 * x1) * ((t_6 * 4.0) - 6.0) tmp = 0 if x1 <= -2.22e+229: tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1 elif x1 <= -3.6e+102: tmp = t_4 elif x1 <= -0.185: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_0 + ((t_1 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + t_7)) + (t_5 * (2.0 * x2)))))) elif x1 <= 15.5: tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 elif x1 <= 1.14e+154: tmp = x1 + (9.0 + (x1 + (t_0 + ((t_5 * t_6) + (t_1 * (t_7 + ((((-2.0 * (-1.0 - t_2)) + (2.0 * ((9.0 - (x2 * 4.0)) / x1))) / x1) - 6.0))))))) else: tmp = t_4 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(3.0 * Float64(Float64(2.0 * x2) - 3.0)) t_3 = Float64(2.0 * Float64(1.0 + t_2)) t_4 = Float64(Float64(t_3 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(t_3 + Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))))))) - 6.0))) / x1) t_5 = Float64(x1 * Float64(x1 * 3.0)) t_6 = Float64(Float64(Float64(t_5 + Float64(2.0 * x2)) - x1) / t_1) t_7 = Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0)) tmp = 0.0 if (x1 <= -2.22e+229) tmp = Float64(Float64(t_3 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + t_3))) - 6.0))) / x1); elseif (x1 <= -3.6e+102) tmp = t_4; elseif (x1 <= -0.185) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(t_0 + Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_6) * Float64(t_6 - 3.0)) + t_7)) + Float64(t_5 * Float64(2.0 * x2))))))); elseif (x1 <= 15.5) tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); elseif (x1 <= 1.14e+154) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(Float64(t_5 * t_6) + Float64(t_1 * Float64(t_7 + Float64(Float64(Float64(Float64(-2.0 * Float64(-1.0 - t_2)) + Float64(2.0 * Float64(Float64(9.0 - Float64(x2 * 4.0)) / x1))) / x1) - 6.0)))))))); else tmp = t_4; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = 3.0 * ((2.0 * x2) - 3.0); t_3 = 2.0 * (1.0 + t_2); t_4 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1; t_5 = x1 * (x1 * 3.0); t_6 = ((t_5 + (2.0 * x2)) - x1) / t_1; t_7 = (x1 * x1) * ((t_6 * 4.0) - 6.0); tmp = 0.0; if (x1 <= -2.22e+229) tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1; elseif (x1 <= -3.6e+102) tmp = t_4; elseif (x1 <= -0.185) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (t_0 + ((t_1 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + t_7)) + (t_5 * (2.0 * x2)))))); elseif (x1 <= 15.5) tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; elseif (x1 <= 1.14e+154) tmp = x1 + (9.0 + (x1 + (t_0 + ((t_5 * t_6) + (t_1 * (t_7 + ((((-2.0 * (-1.0 - t_2)) + (2.0 * ((9.0 - (x2 * 4.0)) / x1))) / x1) - 6.0))))))); else tmp = t_4; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(t$95$3 + N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$5 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.22e+229], N[(N[(t$95$3 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], If[LessEqual[x1, -3.6e+102], t$95$4, If[LessEqual[x1, -0.185], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$0 + N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * N[(t$95$6 - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$7), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 15.5], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.14e+154], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(N[(t$95$5 * t$95$6), $MachinePrecision] + N[(t$95$1 * N[(t$95$7 + N[(N[(N[(N[(-2.0 * N[(-1.0 - t$95$2), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(9.0 - N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := 3 \cdot \left(2 \cdot x2 - 3\right)\\
t_3 := 2 \cdot \left(1 + t\_2\right)\\
t_4 := \frac{t\_3 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + \left(t\_3 + 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\right) - 6\right)}{x1}\\
t_5 := x1 \cdot \left(x1 \cdot 3\right)\\
t_6 := \frac{\left(t\_5 + 2 \cdot x2\right) - x1}{t\_1}\\
t_7 := \left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right)\\
\mathbf{if}\;x1 \leq -2.22 \cdot 10^{+229}:\\
\;\;\;\;\frac{t\_3 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + t\_3\right)\right) - 6\right)}{x1}\\
\mathbf{elif}\;x1 \leq -3.6 \cdot 10^{+102}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq -0.185:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(t\_0 + \left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_6\right) \cdot \left(t\_6 - 3\right) + t\_7\right) + t\_5 \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 15.5:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\mathbf{elif}\;x1 \leq 1.14 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_0 + \left(t\_5 \cdot t\_6 + t\_1 \cdot \left(t\_7 + \left(\frac{-2 \cdot \left(-1 - t\_2\right) + 2 \cdot \frac{9 - x2 \cdot 4}{x1}}{x1} - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if x1 < -2.2200000000000001e229Initial program 0.0%
fma-define0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r*0.0%
fma-undefine0.0%
add-cube-cbrt0.0%
Applied egg-rr0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 93.3%
if -2.2200000000000001e229 < x1 < -3.6000000000000002e102 or 1.13999999999999997e154 < x1 Initial program 1.8%
fma-define1.8%
associate-*r*1.8%
*-commutative1.8%
associate-*r*1.8%
fma-undefine1.8%
add-cube-cbrt1.8%
Applied egg-rr1.8%
Taylor expanded in x1 around inf 1.8%
Taylor expanded in x1 around 0 0.4%
Taylor expanded in x1 around 0 82.1%
if -3.6000000000000002e102 < x1 < -0.185Initial program 99.2%
Taylor expanded in x1 around 0 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in x1 around 0 89.0%
if -0.185 < x1 < 15.5Initial program 99.4%
Simplified99.3%
Taylor expanded in x1 around 0 89.6%
Taylor expanded in x2 around 0 98.0%
if 15.5 < x1 < 1.13999999999999997e154Initial program 99.5%
fma-define99.5%
associate-*r*99.5%
*-commutative99.5%
associate-*r*99.5%
fma-undefine99.5%
add-cube-cbrt99.3%
Applied egg-rr99.3%
Taylor expanded in x1 around -inf 80.5%
Taylor expanded in x1 around inf 80.5%
Final simplification91.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 (- (* 2.0 x2) 3.0)))
(t_4 (+ 1.0 t_3))
(t_5 (* 2.0 t_4))
(t_6
(/
(+
t_5
(*
x1
(-
(+
(* x2 -6.0)
(* x1 (+ -1.0 (+ t_5 (* 3.0 (* x1 (- 3.0 (* x2 -2.0))))))))
6.0)))
x1))
(t_7 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_8 (* t_1 t_7))
(t_9 (* (* x1 x1) (- (* t_7 4.0) 6.0))))
(if (<= x1 -1e+223)
(/ (+ t_5 (* x1 (- (+ (* x2 -6.0) (* x1 (+ -1.0 t_5))) 6.0))) x1)
(if (<= x1 -5.5e+102)
t_6
(if (<= x1 -920000000.0)
(+
x1
(+
9.0
(+ x1 (+ t_0 (+ t_8 (* t_2 (+ t_9 (- (* 2.0 (/ t_4 x1)) 6.0))))))))
(if (<= x1 105.0)
(- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
(if (<= x1 1.14e+154)
(+
x1
(+
9.0
(+
x1
(+
t_0
(+
t_8
(*
t_2
(+
t_9
(-
(/
(+
(* -2.0 (- -1.0 t_3))
(* 2.0 (/ (- 9.0 (* x2 4.0)) x1)))
x1)
6.0))))))))
t_6)))))))
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 * ((2.0 * x2) - 3.0);
double t_4 = 1.0 + t_3;
double t_5 = 2.0 * t_4;
double t_6 = (t_5 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_5 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_7 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_8 = t_1 * t_7;
double t_9 = (x1 * x1) * ((t_7 * 4.0) - 6.0);
double tmp;
if (x1 <= -1e+223) {
tmp = (t_5 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_5))) - 6.0))) / x1;
} else if (x1 <= -5.5e+102) {
tmp = t_6;
} else if (x1 <= -920000000.0) {
tmp = x1 + (9.0 + (x1 + (t_0 + (t_8 + (t_2 * (t_9 + ((2.0 * (t_4 / x1)) - 6.0)))))));
} else if (x1 <= 105.0) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = x1 + (9.0 + (x1 + (t_0 + (t_8 + (t_2 * (t_9 + ((((-2.0 * (-1.0 - t_3)) + (2.0 * ((9.0 - (x2 * 4.0)) / x1))) / x1) - 6.0)))))));
} else {
tmp = t_6;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * ((2.0d0 * x2) - 3.0d0)
t_4 = 1.0d0 + t_3
t_5 = 2.0d0 * t_4
t_6 = (t_5 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (t_5 + (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))))))) - 6.0d0))) / x1
t_7 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
t_8 = t_1 * t_7
t_9 = (x1 * x1) * ((t_7 * 4.0d0) - 6.0d0)
if (x1 <= (-1d+223)) then
tmp = (t_5 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + t_5))) - 6.0d0))) / x1
else if (x1 <= (-5.5d+102)) then
tmp = t_6
else if (x1 <= (-920000000.0d0)) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + (t_8 + (t_2 * (t_9 + ((2.0d0 * (t_4 / x1)) - 6.0d0)))))))
else if (x1 <= 105.0d0) then
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
else if (x1 <= 1.14d+154) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + (t_8 + (t_2 * (t_9 + (((((-2.0d0) * ((-1.0d0) - t_3)) + (2.0d0 * ((9.0d0 - (x2 * 4.0d0)) / x1))) / x1) - 6.0d0)))))))
else
tmp = t_6
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * ((2.0 * x2) - 3.0);
double t_4 = 1.0 + t_3;
double t_5 = 2.0 * t_4;
double t_6 = (t_5 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_5 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_7 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_8 = t_1 * t_7;
double t_9 = (x1 * x1) * ((t_7 * 4.0) - 6.0);
double tmp;
if (x1 <= -1e+223) {
tmp = (t_5 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_5))) - 6.0))) / x1;
} else if (x1 <= -5.5e+102) {
tmp = t_6;
} else if (x1 <= -920000000.0) {
tmp = x1 + (9.0 + (x1 + (t_0 + (t_8 + (t_2 * (t_9 + ((2.0 * (t_4 / x1)) - 6.0)))))));
} else if (x1 <= 105.0) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = x1 + (9.0 + (x1 + (t_0 + (t_8 + (t_2 * (t_9 + ((((-2.0 * (-1.0 - t_3)) + (2.0 * ((9.0 - (x2 * 4.0)) / x1))) / x1) - 6.0)))))));
} else {
tmp = t_6;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * ((2.0 * x2) - 3.0) t_4 = 1.0 + t_3 t_5 = 2.0 * t_4 t_6 = (t_5 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_5 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1 t_7 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_8 = t_1 * t_7 t_9 = (x1 * x1) * ((t_7 * 4.0) - 6.0) tmp = 0 if x1 <= -1e+223: tmp = (t_5 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_5))) - 6.0))) / x1 elif x1 <= -5.5e+102: tmp = t_6 elif x1 <= -920000000.0: tmp = x1 + (9.0 + (x1 + (t_0 + (t_8 + (t_2 * (t_9 + ((2.0 * (t_4 / x1)) - 6.0))))))) elif x1 <= 105.0: tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 elif x1 <= 1.14e+154: tmp = x1 + (9.0 + (x1 + (t_0 + (t_8 + (t_2 * (t_9 + ((((-2.0 * (-1.0 - t_3)) + (2.0 * ((9.0 - (x2 * 4.0)) / x1))) / x1) - 6.0))))))) else: tmp = t_6 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(2.0 * x2) - 3.0)) t_4 = Float64(1.0 + t_3) t_5 = Float64(2.0 * t_4) t_6 = Float64(Float64(t_5 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(t_5 + Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))))))) - 6.0))) / x1) t_7 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_8 = Float64(t_1 * t_7) t_9 = Float64(Float64(x1 * x1) * Float64(Float64(t_7 * 4.0) - 6.0)) tmp = 0.0 if (x1 <= -1e+223) tmp = Float64(Float64(t_5 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + t_5))) - 6.0))) / x1); elseif (x1 <= -5.5e+102) tmp = t_6; elseif (x1 <= -920000000.0) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(t_8 + Float64(t_2 * Float64(t_9 + Float64(Float64(2.0 * Float64(t_4 / x1)) - 6.0)))))))); elseif (x1 <= 105.0) tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); elseif (x1 <= 1.14e+154) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(t_8 + Float64(t_2 * Float64(t_9 + Float64(Float64(Float64(Float64(-2.0 * Float64(-1.0 - t_3)) + Float64(2.0 * Float64(Float64(9.0 - Float64(x2 * 4.0)) / x1))) / x1) - 6.0)))))))); else tmp = t_6; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * ((2.0 * x2) - 3.0); t_4 = 1.0 + t_3; t_5 = 2.0 * t_4; t_6 = (t_5 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_5 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1; t_7 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_8 = t_1 * t_7; t_9 = (x1 * x1) * ((t_7 * 4.0) - 6.0); tmp = 0.0; if (x1 <= -1e+223) tmp = (t_5 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_5))) - 6.0))) / x1; elseif (x1 <= -5.5e+102) tmp = t_6; elseif (x1 <= -920000000.0) tmp = x1 + (9.0 + (x1 + (t_0 + (t_8 + (t_2 * (t_9 + ((2.0 * (t_4 / x1)) - 6.0))))))); elseif (x1 <= 105.0) tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; elseif (x1 <= 1.14e+154) tmp = x1 + (9.0 + (x1 + (t_0 + (t_8 + (t_2 * (t_9 + ((((-2.0 * (-1.0 - t_3)) + (2.0 * ((9.0 - (x2 * 4.0)) / x1))) / x1) - 6.0))))))); else tmp = t_6; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(2.0 * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$5 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(t$95$5 + N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]}, Block[{t$95$7 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$1 * t$95$7), $MachinePrecision]}, Block[{t$95$9 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$7 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+223], N[(N[(t$95$5 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], If[LessEqual[x1, -5.5e+102], t$95$6, If[LessEqual[x1, -920000000.0], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(t$95$8 + N[(t$95$2 * N[(t$95$9 + N[(N[(2.0 * N[(t$95$4 / x1), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 105.0], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.14e+154], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(t$95$8 + N[(t$95$2 * N[(t$95$9 + N[(N[(N[(N[(-2.0 * N[(-1.0 - t$95$3), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(9.0 - N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$6]]]]]]]]]]]]]]]
\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 \left(2 \cdot x2 - 3\right)\\
t_4 := 1 + t\_3\\
t_5 := 2 \cdot t\_4\\
t_6 := \frac{t\_5 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + \left(t\_5 + 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\right) - 6\right)}{x1}\\
t_7 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_8 := t\_1 \cdot t\_7\\
t_9 := \left(x1 \cdot x1\right) \cdot \left(t\_7 \cdot 4 - 6\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+223}:\\
\;\;\;\;\frac{t\_5 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + t\_5\right)\right) - 6\right)}{x1}\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x1 \leq -920000000:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_0 + \left(t\_8 + t\_2 \cdot \left(t\_9 + \left(2 \cdot \frac{t\_4}{x1} - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 105:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\mathbf{elif}\;x1 \leq 1.14 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_0 + \left(t\_8 + t\_2 \cdot \left(t\_9 + \left(\frac{-2 \cdot \left(-1 - t\_3\right) + 2 \cdot \frac{9 - x2 \cdot 4}{x1}}{x1} - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_6\\
\end{array}
\end{array}
if x1 < -1.00000000000000005e223Initial program 0.0%
fma-define0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r*0.0%
fma-undefine0.0%
add-cube-cbrt0.0%
Applied egg-rr0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 93.3%
if -1.00000000000000005e223 < x1 < -5.49999999999999981e102 or 1.13999999999999997e154 < x1 Initial program 1.8%
fma-define1.8%
associate-*r*1.8%
*-commutative1.8%
associate-*r*1.8%
fma-undefine1.8%
add-cube-cbrt1.8%
Applied egg-rr1.8%
Taylor expanded in x1 around inf 1.8%
Taylor expanded in x1 around 0 0.4%
Taylor expanded in x1 around 0 82.1%
if -5.49999999999999981e102 < x1 < -9.2e8Initial program 99.3%
fma-define99.3%
associate-*r*99.3%
*-commutative99.3%
associate-*r*99.3%
fma-undefine99.3%
add-cube-cbrt99.3%
Applied egg-rr99.3%
Taylor expanded in x1 around inf 88.2%
Taylor expanded in x1 around inf 88.2%
if -9.2e8 < x1 < 105Initial program 99.3%
Simplified99.3%
Taylor expanded in x1 around 0 89.1%
Taylor expanded in x2 around 0 97.3%
if 105 < x1 < 1.13999999999999997e154Initial program 99.5%
fma-define99.5%
associate-*r*99.5%
*-commutative99.5%
associate-*r*99.5%
fma-undefine99.5%
add-cube-cbrt99.3%
Applied egg-rr99.3%
Taylor expanded in x1 around -inf 80.5%
Taylor expanded in x1 around inf 80.5%
Final simplification91.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* 3.0 (- (* 2.0 x2) 3.0))))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 2.0 t_1))
(t_4
(/
(+
t_3
(*
x1
(-
(+
(* x2 -6.0)
(* x1 (+ -1.0 (+ t_3 (* 3.0 (* x1 (- 3.0 (* x2 -2.0))))))))
6.0)))
x1))
(t_5 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_6
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_5)
(*
t_2
(+
(* (* x1 x1) (- (* t_5 4.0) 6.0))
(- (* 2.0 (/ t_1 x1)) 6.0))))))))
(if (<= x1 -1e+223)
(/ (+ t_3 (* x1 (- (+ (* x2 -6.0) (* x1 (+ -1.0 t_3))) 6.0))) x1)
(if (<= x1 -5.5e+102)
t_4
(if (<= x1 -920000000.0)
(+ x1 (+ 9.0 t_6))
(if (<= x1 61.0)
(- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
(if (<= x1 1.14e+154)
(+ x1 (+ (* 3.0 (+ 3.0 (/ -1.0 x1))) t_6))
t_4)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (3.0 * ((2.0 * x2) - 3.0));
double t_2 = (x1 * x1) + 1.0;
double t_3 = 2.0 * t_1;
double t_4 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_5 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_6 = x1 + ((x1 * (x1 * x1)) + ((t_0 * t_5) + (t_2 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((2.0 * (t_1 / x1)) - 6.0)))));
double tmp;
if (x1 <= -1e+223) {
tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1;
} else if (x1 <= -5.5e+102) {
tmp = t_4;
} else if (x1 <= -920000000.0) {
tmp = x1 + (9.0 + t_6);
} else if (x1 <= 61.0) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = x1 + ((3.0 * (3.0 + (-1.0 / x1))) + t_6);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 1.0d0 + (3.0d0 * ((2.0d0 * x2) - 3.0d0))
t_2 = (x1 * x1) + 1.0d0
t_3 = 2.0d0 * t_1
t_4 = (t_3 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (t_3 + (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))))))) - 6.0d0))) / x1
t_5 = ((t_0 + (2.0d0 * x2)) - x1) / t_2
t_6 = x1 + ((x1 * (x1 * x1)) + ((t_0 * t_5) + (t_2 * (((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)) + ((2.0d0 * (t_1 / x1)) - 6.0d0)))))
if (x1 <= (-1d+223)) then
tmp = (t_3 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + t_3))) - 6.0d0))) / x1
else if (x1 <= (-5.5d+102)) then
tmp = t_4
else if (x1 <= (-920000000.0d0)) then
tmp = x1 + (9.0d0 + t_6)
else if (x1 <= 61.0d0) then
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
else if (x1 <= 1.14d+154) then
tmp = x1 + ((3.0d0 * (3.0d0 + ((-1.0d0) / x1))) + t_6)
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (3.0 * ((2.0 * x2) - 3.0));
double t_2 = (x1 * x1) + 1.0;
double t_3 = 2.0 * t_1;
double t_4 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_5 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_6 = x1 + ((x1 * (x1 * x1)) + ((t_0 * t_5) + (t_2 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((2.0 * (t_1 / x1)) - 6.0)))));
double tmp;
if (x1 <= -1e+223) {
tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1;
} else if (x1 <= -5.5e+102) {
tmp = t_4;
} else if (x1 <= -920000000.0) {
tmp = x1 + (9.0 + t_6);
} else if (x1 <= 61.0) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = x1 + ((3.0 * (3.0 + (-1.0 / x1))) + t_6);
} else {
tmp = t_4;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 1.0 + (3.0 * ((2.0 * x2) - 3.0)) t_2 = (x1 * x1) + 1.0 t_3 = 2.0 * t_1 t_4 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1 t_5 = ((t_0 + (2.0 * x2)) - x1) / t_2 t_6 = x1 + ((x1 * (x1 * x1)) + ((t_0 * t_5) + (t_2 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((2.0 * (t_1 / x1)) - 6.0))))) tmp = 0 if x1 <= -1e+223: tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1 elif x1 <= -5.5e+102: tmp = t_4 elif x1 <= -920000000.0: tmp = x1 + (9.0 + t_6) elif x1 <= 61.0: tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 elif x1 <= 1.14e+154: tmp = x1 + ((3.0 * (3.0 + (-1.0 / x1))) + t_6) else: tmp = t_4 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(1.0 + Float64(3.0 * Float64(Float64(2.0 * x2) - 3.0))) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(2.0 * t_1) t_4 = Float64(Float64(t_3 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(t_3 + Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))))))) - 6.0))) / x1) t_5 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) t_6 = Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_5) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) + Float64(Float64(2.0 * Float64(t_1 / x1)) - 6.0)))))) tmp = 0.0 if (x1 <= -1e+223) tmp = Float64(Float64(t_3 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + t_3))) - 6.0))) / x1); elseif (x1 <= -5.5e+102) tmp = t_4; elseif (x1 <= -920000000.0) tmp = Float64(x1 + Float64(9.0 + t_6)); elseif (x1 <= 61.0) tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); elseif (x1 <= 1.14e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(3.0 + Float64(-1.0 / x1))) + t_6)); else tmp = t_4; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = 1.0 + (3.0 * ((2.0 * x2) - 3.0)); t_2 = (x1 * x1) + 1.0; t_3 = 2.0 * t_1; t_4 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1; t_5 = ((t_0 + (2.0 * x2)) - x1) / t_2; t_6 = x1 + ((x1 * (x1 * x1)) + ((t_0 * t_5) + (t_2 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((2.0 * (t_1 / x1)) - 6.0))))); tmp = 0.0; if (x1 <= -1e+223) tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1; elseif (x1 <= -5.5e+102) tmp = t_4; elseif (x1 <= -920000000.0) tmp = x1 + (9.0 + t_6); elseif (x1 <= 61.0) tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; elseif (x1 <= 1.14e+154) tmp = x1 + ((3.0 * (3.0 + (-1.0 / x1))) + t_6); else tmp = t_4; 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[(1.0 + N[(3.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(t$95$3 + N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$5), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t$95$1 / x1), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+223], N[(N[(t$95$3 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], If[LessEqual[x1, -5.5e+102], t$95$4, If[LessEqual[x1, -920000000.0], N[(x1 + N[(9.0 + t$95$6), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 61.0], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.14e+154], N[(x1 + N[(N[(3.0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 1 + 3 \cdot \left(2 \cdot x2 - 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 2 \cdot t\_1\\
t_4 := \frac{t\_3 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + \left(t\_3 + 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\right) - 6\right)}{x1}\\
t_5 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
t_6 := x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_5 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right) + \left(2 \cdot \frac{t\_1}{x1} - 6\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+223}:\\
\;\;\;\;\frac{t\_3 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + t\_3\right)\right) - 6\right)}{x1}\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq -920000000:\\
\;\;\;\;x1 + \left(9 + t\_6\right)\\
\mathbf{elif}\;x1 \leq 61:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\mathbf{elif}\;x1 \leq 1.14 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \left(3 + \frac{-1}{x1}\right) + t\_6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if x1 < -1.00000000000000005e223Initial program 0.0%
fma-define0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r*0.0%
fma-undefine0.0%
add-cube-cbrt0.0%
Applied egg-rr0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 93.3%
if -1.00000000000000005e223 < x1 < -5.49999999999999981e102 or 1.13999999999999997e154 < x1 Initial program 1.8%
fma-define1.8%
associate-*r*1.8%
*-commutative1.8%
associate-*r*1.8%
fma-undefine1.8%
add-cube-cbrt1.8%
Applied egg-rr1.8%
Taylor expanded in x1 around inf 1.8%
Taylor expanded in x1 around 0 0.4%
Taylor expanded in x1 around 0 82.1%
if -5.49999999999999981e102 < x1 < -9.2e8Initial program 99.3%
fma-define99.3%
associate-*r*99.3%
*-commutative99.3%
associate-*r*99.3%
fma-undefine99.3%
add-cube-cbrt99.3%
Applied egg-rr99.3%
Taylor expanded in x1 around inf 88.2%
Taylor expanded in x1 around inf 88.2%
if -9.2e8 < x1 < 61Initial program 99.3%
Simplified99.3%
Taylor expanded in x1 around 0 89.1%
Taylor expanded in x2 around 0 97.3%
if 61 < x1 < 1.13999999999999997e154Initial program 99.5%
fma-define99.5%
associate-*r*99.5%
*-commutative99.5%
associate-*r*99.5%
fma-undefine99.5%
add-cube-cbrt99.3%
Applied egg-rr99.3%
Taylor expanded in x1 around inf 79.8%
Taylor expanded in x1 around inf 79.8%
Final simplification91.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* 3.0 (- (* 2.0 x2) 3.0))))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 2.0 t_1))
(t_4 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_5
(/
(+
t_3
(*
x1
(-
(+
(* x2 -6.0)
(* x1 (+ -1.0 (+ t_3 (* 3.0 (* x1 (- 3.0 (* x2 -2.0))))))))
6.0)))
x1))
(t_6
(+
x1
(+
9.0
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_4)
(*
t_2
(+
(* (* x1 x1) (- (* t_4 4.0) 6.0))
(- (* 2.0 (/ t_1 x1)) 6.0))))))))))
(if (<= x1 -3e+223)
(/ (+ t_3 (* x1 (- (+ (* x2 -6.0) (* x1 (+ -1.0 t_3))) 6.0))) x1)
(if (<= x1 -5.5e+102)
t_5
(if (<= x1 -920000000.0)
t_6
(if (<= x1 7.2)
(- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
(if (<= x1 1.14e+154) t_6 t_5)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (3.0 * ((2.0 * x2) - 3.0));
double t_2 = (x1 * x1) + 1.0;
double t_3 = 2.0 * t_1;
double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_5 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_6 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + ((2.0 * (t_1 / x1)) - 6.0)))))));
double tmp;
if (x1 <= -3e+223) {
tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1;
} else if (x1 <= -5.5e+102) {
tmp = t_5;
} else if (x1 <= -920000000.0) {
tmp = t_6;
} else if (x1 <= 7.2) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = t_6;
} else {
tmp = t_5;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 1.0d0 + (3.0d0 * ((2.0d0 * x2) - 3.0d0))
t_2 = (x1 * x1) + 1.0d0
t_3 = 2.0d0 * t_1
t_4 = ((t_0 + (2.0d0 * x2)) - x1) / t_2
t_5 = (t_3 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (t_3 + (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))))))) - 6.0d0))) / x1
t_6 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * (((x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)) + ((2.0d0 * (t_1 / x1)) - 6.0d0)))))))
if (x1 <= (-3d+223)) then
tmp = (t_3 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + t_3))) - 6.0d0))) / x1
else if (x1 <= (-5.5d+102)) then
tmp = t_5
else if (x1 <= (-920000000.0d0)) then
tmp = t_6
else if (x1 <= 7.2d0) then
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
else if (x1 <= 1.14d+154) then
tmp = t_6
else
tmp = t_5
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (3.0 * ((2.0 * x2) - 3.0));
double t_2 = (x1 * x1) + 1.0;
double t_3 = 2.0 * t_1;
double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_5 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
double t_6 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + ((2.0 * (t_1 / x1)) - 6.0)))))));
double tmp;
if (x1 <= -3e+223) {
tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1;
} else if (x1 <= -5.5e+102) {
tmp = t_5;
} else if (x1 <= -920000000.0) {
tmp = t_6;
} else if (x1 <= 7.2) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else if (x1 <= 1.14e+154) {
tmp = t_6;
} else {
tmp = t_5;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 1.0 + (3.0 * ((2.0 * x2) - 3.0)) t_2 = (x1 * x1) + 1.0 t_3 = 2.0 * t_1 t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2 t_5 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1 t_6 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + ((2.0 * (t_1 / x1)) - 6.0))))))) tmp = 0 if x1 <= -3e+223: tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1 elif x1 <= -5.5e+102: tmp = t_5 elif x1 <= -920000000.0: tmp = t_6 elif x1 <= 7.2: tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 elif x1 <= 1.14e+154: tmp = t_6 else: tmp = t_5 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(1.0 + Float64(3.0 * Float64(Float64(2.0 * x2) - 3.0))) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(2.0 * t_1) t_4 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) t_5 = Float64(Float64(t_3 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(t_3 + Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))))))) - 6.0))) / x1) t_6 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_4) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)) + Float64(Float64(2.0 * Float64(t_1 / x1)) - 6.0)))))))) tmp = 0.0 if (x1 <= -3e+223) tmp = Float64(Float64(t_3 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + t_3))) - 6.0))) / x1); elseif (x1 <= -5.5e+102) tmp = t_5; elseif (x1 <= -920000000.0) tmp = t_6; elseif (x1 <= 7.2) tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); elseif (x1 <= 1.14e+154) tmp = t_6; else tmp = t_5; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = 1.0 + (3.0 * ((2.0 * x2) - 3.0)); t_2 = (x1 * x1) + 1.0; t_3 = 2.0 * t_1; t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2; t_5 = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_3 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1; t_6 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + ((2.0 * (t_1 / x1)) - 6.0))))))); tmp = 0.0; if (x1 <= -3e+223) tmp = (t_3 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_3))) - 6.0))) / x1; elseif (x1 <= -5.5e+102) tmp = t_5; elseif (x1 <= -920000000.0) tmp = t_6; elseif (x1 <= 7.2) tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; elseif (x1 <= 1.14e+154) tmp = t_6; else tmp = t_5; 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[(1.0 + N[(3.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$3 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(t$95$3 + N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$4), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(t$95$1 / x1), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3e+223], N[(N[(t$95$3 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], If[LessEqual[x1, -5.5e+102], t$95$5, If[LessEqual[x1, -920000000.0], t$95$6, If[LessEqual[x1, 7.2], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 1.14e+154], t$95$6, t$95$5]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 1 + 3 \cdot \left(2 \cdot x2 - 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 2 \cdot t\_1\\
t_4 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
t_5 := \frac{t\_3 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + \left(t\_3 + 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\right) - 6\right)}{x1}\\
t_6 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_4 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_4 \cdot 4 - 6\right) + \left(2 \cdot \frac{t\_1}{x1} - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -3 \cdot 10^{+223}:\\
\;\;\;\;\frac{t\_3 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + t\_3\right)\right) - 6\right)}{x1}\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq -920000000:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x1 \leq 7.2:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\mathbf{elif}\;x1 \leq 1.14 \cdot 10^{+154}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if x1 < -3.00000000000000001e223Initial program 0.0%
fma-define0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r*0.0%
fma-undefine0.0%
add-cube-cbrt0.0%
Applied egg-rr0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 93.3%
if -3.00000000000000001e223 < x1 < -5.49999999999999981e102 or 1.13999999999999997e154 < x1 Initial program 1.8%
fma-define1.8%
associate-*r*1.8%
*-commutative1.8%
associate-*r*1.8%
fma-undefine1.8%
add-cube-cbrt1.8%
Applied egg-rr1.8%
Taylor expanded in x1 around inf 1.8%
Taylor expanded in x1 around 0 0.4%
Taylor expanded in x1 around 0 82.1%
if -5.49999999999999981e102 < x1 < -9.2e8 or 7.20000000000000018 < x1 < 1.13999999999999997e154Initial program 99.4%
fma-define99.4%
associate-*r*99.4%
*-commutative99.4%
associate-*r*99.4%
fma-undefine99.4%
add-cube-cbrt99.3%
Applied egg-rr99.3%
Taylor expanded in x1 around inf 84.3%
Taylor expanded in x1 around inf 84.3%
if -9.2e8 < x1 < 7.20000000000000018Initial program 99.3%
Simplified99.3%
Taylor expanded in x1 around 0 89.1%
Taylor expanded in x2 around 0 97.3%
Final simplification91.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 2.0 (+ 1.0 (* 3.0 (- (* 2.0 x2) 3.0))))))
(if (<= x1 -2e+224)
(/ (+ t_0 (* x1 (- (+ (* x2 -6.0) (* x1 (+ -1.0 t_0))) 6.0))) x1)
(if (or (<= x1 -2.1e+57) (not (<= x1 1.7e+71)))
(/
(+
t_0
(*
x1
(-
(+
(* x2 -6.0)
(* x1 (+ -1.0 (+ t_0 (* 3.0 (* x1 (- 3.0 (* x2 -2.0))))))))
6.0)))
x1)
(- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)))))
double code(double x1, double x2) {
double t_0 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)));
double tmp;
if (x1 <= -2e+224) {
tmp = (t_0 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_0))) - 6.0))) / x1;
} else if ((x1 <= -2.1e+57) || !(x1 <= 1.7e+71)) {
tmp = (t_0 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_0 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
} else {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 2.0d0 * (1.0d0 + (3.0d0 * ((2.0d0 * x2) - 3.0d0)))
if (x1 <= (-2d+224)) then
tmp = (t_0 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + t_0))) - 6.0d0))) / x1
else if ((x1 <= (-2.1d+57)) .or. (.not. (x1 <= 1.7d+71))) then
tmp = (t_0 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (t_0 + (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))))))) - 6.0d0))) / x1
else
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)));
double tmp;
if (x1 <= -2e+224) {
tmp = (t_0 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_0))) - 6.0))) / x1;
} else if ((x1 <= -2.1e+57) || !(x1 <= 1.7e+71)) {
tmp = (t_0 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_0 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1;
} else {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
}
return tmp;
}
def code(x1, x2): t_0 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0))) tmp = 0 if x1 <= -2e+224: tmp = (t_0 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_0))) - 6.0))) / x1 elif (x1 <= -2.1e+57) or not (x1 <= 1.7e+71): tmp = (t_0 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_0 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1 else: tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 return tmp
function code(x1, x2) t_0 = Float64(2.0 * Float64(1.0 + Float64(3.0 * Float64(Float64(2.0 * x2) - 3.0)))) tmp = 0.0 if (x1 <= -2e+224) tmp = Float64(Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + t_0))) - 6.0))) / x1); elseif ((x1 <= -2.1e+57) || !(x1 <= 1.7e+71)) tmp = Float64(Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(t_0 + Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))))))) - 6.0))) / x1); else tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0))); tmp = 0.0; if (x1 <= -2e+224) tmp = (t_0 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_0))) - 6.0))) / x1; elseif ((x1 <= -2.1e+57) || ~((x1 <= 1.7e+71))) tmp = (t_0 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + (t_0 + (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) - 6.0))) / x1; else tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(2.0 * N[(1.0 + N[(3.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2e+224], N[(N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], If[Or[LessEqual[x1, -2.1e+57], N[Not[LessEqual[x1, 1.7e+71]], $MachinePrecision]], N[(N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(t$95$0 + N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+224}:\\
\;\;\;\;\frac{t\_0 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + t\_0\right)\right) - 6\right)}{x1}\\
\mathbf{elif}\;x1 \leq -2.1 \cdot 10^{+57} \lor \neg \left(x1 \leq 1.7 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{t\_0 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + \left(t\_0 + 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\right) - 6\right)}{x1}\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\end{array}
\end{array}
if x1 < -1.99999999999999994e224Initial program 0.0%
fma-define0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r*0.0%
fma-undefine0.0%
add-cube-cbrt0.0%
Applied egg-rr0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 93.3%
if -1.99999999999999994e224 < x1 < -2.09999999999999991e57 or 1.6999999999999999e71 < x1 Initial program 30.4%
fma-define30.4%
associate-*r*30.4%
*-commutative30.4%
associate-*r*30.4%
fma-undefine30.4%
add-cube-cbrt30.4%
Applied egg-rr30.4%
Taylor expanded in x1 around inf 30.4%
Taylor expanded in x1 around 0 4.5%
Taylor expanded in x1 around 0 76.3%
if -2.09999999999999991e57 < x1 < 1.6999999999999999e71Initial program 99.3%
Simplified99.3%
Taylor expanded in x1 around 0 78.6%
Taylor expanded in x2 around 0 85.4%
Final simplification83.1%
(FPCore (x1 x2)
:precision binary64
(if (or (<= (* 2.0 x2) -2e+33) (not (<= (* 2.0 x2) 5e+110)))
(- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)
(+
(* x2 -6.0)
(*
x1
(+
-1.0
(+
(* -4.0 (* x2 (+ 3.0 (* x2 -2.0))))
(*
x1
(-
(+
(* 2.0 (+ 3.0 (* x2 -4.0)))
(+ (* 3.0 (- 3.0 (* x2 -2.0))) (+ (* x2 6.0) (* x2 8.0))))
6.0))))))))
double code(double x1, double x2) {
double tmp;
if (((2.0 * x2) <= -2e+33) || !((2.0 * x2) <= 5e+110)) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((-4.0 * (x2 * (3.0 + (x2 * -2.0)))) + (x1 * (((2.0 * (3.0 + (x2 * -4.0))) + ((3.0 * (3.0 - (x2 * -2.0))) + ((x2 * 6.0) + (x2 * 8.0)))) - 6.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (((2.0d0 * x2) <= (-2d+33)) .or. (.not. ((2.0d0 * x2) <= 5d+110))) then
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (((-4.0d0) * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (x1 * (((2.0d0 * (3.0d0 + (x2 * (-4.0d0)))) + ((3.0d0 * (3.0d0 - (x2 * (-2.0d0)))) + ((x2 * 6.0d0) + (x2 * 8.0d0)))) - 6.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (((2.0 * x2) <= -2e+33) || !((2.0 * x2) <= 5e+110)) {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((-4.0 * (x2 * (3.0 + (x2 * -2.0)))) + (x1 * (((2.0 * (3.0 + (x2 * -4.0))) + ((3.0 * (3.0 - (x2 * -2.0))) + ((x2 * 6.0) + (x2 * 8.0)))) - 6.0)))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if ((2.0 * x2) <= -2e+33) or not ((2.0 * x2) <= 5e+110): tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 else: tmp = (x2 * -6.0) + (x1 * (-1.0 + ((-4.0 * (x2 * (3.0 + (x2 * -2.0)))) + (x1 * (((2.0 * (3.0 + (x2 * -4.0))) + ((3.0 * (3.0 - (x2 * -2.0))) + ((x2 * 6.0) + (x2 * 8.0)))) - 6.0))))) return tmp
function code(x1, x2) tmp = 0.0 if ((Float64(2.0 * x2) <= -2e+33) || !(Float64(2.0 * x2) <= 5e+110)) tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(Float64(-4.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(x1 * Float64(Float64(Float64(2.0 * Float64(3.0 + Float64(x2 * -4.0))) + Float64(Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0))) + Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0)))) - 6.0)))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (((2.0 * x2) <= -2e+33) || ~(((2.0 * x2) <= 5e+110))) tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; else tmp = (x2 * -6.0) + (x1 * (-1.0 + ((-4.0 * (x2 * (3.0 + (x2 * -2.0)))) + (x1 * (((2.0 * (3.0 + (x2 * -4.0))) + ((3.0 * (3.0 - (x2 * -2.0))) + ((x2 * 6.0) + (x2 * 8.0)))) - 6.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[N[(2.0 * x2), $MachinePrecision], -2e+33], N[Not[LessEqual[N[(2.0 * x2), $MachinePrecision], 5e+110]], $MachinePrecision]], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(N[(-4.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(N[(2.0 * N[(3.0 + N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot x2 \leq -2 \cdot 10^{+33} \lor \neg \left(2 \cdot x2 \leq 5 \cdot 10^{+110}\right):\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(-4 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + x1 \cdot \left(\left(2 \cdot \left(3 + x2 \cdot -4\right) + \left(3 \cdot \left(3 - x2 \cdot -2\right) + \left(x2 \cdot 6 + x2 \cdot 8\right)\right)\right) - 6\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) x2) < -1.9999999999999999e33 or 4.99999999999999978e110 < (*.f64 #s(literal 2 binary64) x2) Initial program 73.7%
Simplified73.7%
Taylor expanded in x1 around 0 61.6%
Taylor expanded in x2 around 0 74.2%
if -1.9999999999999999e33 < (*.f64 #s(literal 2 binary64) x2) < 4.99999999999999978e110Initial program 71.4%
Simplified75.3%
Taylor expanded in x1 around 0 77.6%
Final simplification76.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 2.0 (+ 1.0 (* 3.0 (- (* 2.0 x2) 3.0))))))
(if (<= x1 -2e+90)
(/ (+ t_0 (* x1 (- (+ (* x2 -6.0) (* x1 (+ -1.0 t_0))) 6.0))) x1)
(- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1))))
double code(double x1, double x2) {
double t_0 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)));
double tmp;
if (x1 <= -2e+90) {
tmp = (t_0 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_0))) - 6.0))) / x1;
} else {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 2.0d0 * (1.0d0 + (3.0d0 * ((2.0d0 * x2) - 3.0d0)))
if (x1 <= (-2d+90)) then
tmp = (t_0 + (x1 * (((x2 * (-6.0d0)) + (x1 * ((-1.0d0) + t_0))) - 6.0d0))) / x1
else
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)));
double tmp;
if (x1 <= -2e+90) {
tmp = (t_0 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_0))) - 6.0))) / x1;
} else {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
}
return tmp;
}
def code(x1, x2): t_0 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0))) tmp = 0 if x1 <= -2e+90: tmp = (t_0 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_0))) - 6.0))) / x1 else: tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 return tmp
function code(x1, x2) t_0 = Float64(2.0 * Float64(1.0 + Float64(3.0 * Float64(Float64(2.0 * x2) - 3.0)))) tmp = 0.0 if (x1 <= -2e+90) tmp = Float64(Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + t_0))) - 6.0))) / x1); else tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0))); tmp = 0.0; if (x1 <= -2e+90) tmp = (t_0 + (x1 * (((x2 * -6.0) + (x1 * (-1.0 + t_0))) - 6.0))) / x1; else tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(2.0 * N[(1.0 + N[(3.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2e+90], N[(N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+90}:\\
\;\;\;\;\frac{t\_0 + x1 \cdot \left(\left(x2 \cdot -6 + x1 \cdot \left(-1 + t\_0\right)\right) - 6\right)}{x1}\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\end{array}
\end{array}
if x1 < -1.99999999999999993e90Initial program 8.7%
fma-define8.7%
associate-*r*8.7%
*-commutative8.7%
associate-*r*8.7%
fma-undefine8.7%
add-cube-cbrt8.7%
Applied egg-rr8.7%
Taylor expanded in x1 around inf 8.7%
Taylor expanded in x1 around 0 0.6%
Taylor expanded in x1 around 0 61.5%
if -1.99999999999999993e90 < x1 Initial program 86.1%
Simplified86.1%
Taylor expanded in x1 around 0 66.5%
Taylor expanded in x2 around 0 71.8%
Final simplification70.0%
(FPCore (x1 x2) :precision binary64 (if (or (<= (* 2.0 x2) -1e+91) (not (<= (* 2.0 x2) 5e+103))) (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))) (* x2 (- (- 6.0) (/ x1 x2)))))
double code(double x1, double x2) {
double tmp;
if (((2.0 * x2) <= -1e+91) || !((2.0 * x2) <= 5e+103)) {
tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = x2 * (-6.0 - (x1 / x2));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (((2.0d0 * x2) <= (-1d+91)) .or. (.not. ((2.0d0 * x2) <= 5d+103))) then
tmp = x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
else
tmp = x2 * (-6.0d0 - (x1 / x2))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (((2.0 * x2) <= -1e+91) || !((2.0 * x2) <= 5e+103)) {
tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = x2 * (-6.0 - (x1 / x2));
}
return tmp;
}
def code(x1, x2): tmp = 0 if ((2.0 * x2) <= -1e+91) or not ((2.0 * x2) <= 5e+103): tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) else: tmp = x2 * (-6.0 - (x1 / x2)) return tmp
function code(x1, x2) tmp = 0.0 if ((Float64(2.0 * x2) <= -1e+91) || !(Float64(2.0 * x2) <= 5e+103)) tmp = Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); else tmp = Float64(x2 * Float64(Float64(-6.0) - Float64(x1 / x2))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (((2.0 * x2) <= -1e+91) || ~(((2.0 * x2) <= 5e+103))) tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); else tmp = x2 * (-6.0 - (x1 / x2)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[N[(2.0 * x2), $MachinePrecision], -1e+91], N[Not[LessEqual[N[(2.0 * x2), $MachinePrecision], 5e+103]], $MachinePrecision]], N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[((-6.0) - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot x2 \leq -1 \cdot 10^{+91} \lor \neg \left(2 \cdot x2 \leq 5 \cdot 10^{+103}\right):\\
\;\;\;\;x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) x2) < -1.00000000000000008e91 or 5e103 < (*.f64 #s(literal 2 binary64) x2) Initial program 70.1%
Simplified70.1%
Taylor expanded in x1 around 0 60.9%
Taylor expanded in x1 around inf 54.1%
if -1.00000000000000008e91 < (*.f64 #s(literal 2 binary64) x2) < 5e103Initial program 73.0%
Simplified73.0%
Taylor expanded in x1 around 0 52.7%
Taylor expanded in x2 around 0 49.2%
neg-mul-149.2%
Simplified49.2%
Taylor expanded in x2 around -inf 55.9%
mul-1-neg55.9%
*-commutative55.9%
distribute-rgt-neg-in55.9%
+-commutative55.9%
Simplified55.9%
Final simplification55.4%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -2.6e+90) (* x2 (- (- 6.0) (/ x1 x2))) (- (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0)) x1)))
double code(double x1, double x2) {
double tmp;
if (x1 <= -2.6e+90) {
tmp = x2 * (-6.0 - (x1 / x2));
} else {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-2.6d+90)) then
tmp = x2 * (-6.0d0 - (x1 / x2))
else
tmp = (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -2.6e+90) {
tmp = x2 * (-6.0 - (x1 / x2));
} else {
tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -2.6e+90: tmp = x2 * (-6.0 - (x1 / x2)) else: tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1 return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -2.6e+90) tmp = Float64(x2 * Float64(Float64(-6.0) - Float64(x1 / x2))); else tmp = Float64(Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)) - x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -2.6e+90) tmp = x2 * (-6.0 - (x1 / x2)); else tmp = (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -2.6e+90], N[(x2 * N[((-6.0) - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.6 \cdot 10^{+90}:\\
\;\;\;\;x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) - x1\\
\end{array}
\end{array}
if x1 < -2.5999999999999998e90Initial program 8.7%
Simplified8.7%
Taylor expanded in x1 around 0 2.7%
Taylor expanded in x2 around 0 5.4%
neg-mul-15.4%
Simplified5.4%
Taylor expanded in x2 around -inf 32.0%
mul-1-neg32.0%
*-commutative32.0%
distribute-rgt-neg-in32.0%
+-commutative32.0%
Simplified32.0%
if -2.5999999999999998e90 < x1 Initial program 86.1%
Simplified86.1%
Taylor expanded in x1 around 0 66.5%
Taylor expanded in x2 around 0 71.8%
Final simplification64.7%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -8.2e+86) (* x2 (- (- 6.0) (/ x1 x2))) (+ (* x2 -6.0) (* x1 (+ -1.0 (* x2 (- (* x2 8.0) 12.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -8.2e+86) {
tmp = x2 * (-6.0 - (x1 / x2));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * ((x2 * 8.0) - 12.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-8.2d+86)) then
tmp = x2 * (-6.0d0 - (x1 / x2))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x2 * ((x2 * 8.0d0) - 12.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -8.2e+86) {
tmp = x2 * (-6.0 - (x1 / x2));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * ((x2 * 8.0) - 12.0))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -8.2e+86: tmp = x2 * (-6.0 - (x1 / x2)) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * ((x2 * 8.0) - 12.0)))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -8.2e+86) tmp = Float64(x2 * Float64(Float64(-6.0) - Float64(x1 / x2))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x2 * Float64(Float64(x2 * 8.0) - 12.0))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -8.2e+86) tmp = x2 * (-6.0 - (x1 / x2)); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * ((x2 * 8.0) - 12.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -8.2e+86], N[(x2 * N[((-6.0) - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x2 * N[(N[(x2 * 8.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -8.2 \cdot 10^{+86}:\\
\;\;\;\;x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x2 \cdot \left(x2 \cdot 8 - 12\right)\right)\\
\end{array}
\end{array}
if x1 < -8.1999999999999998e86Initial program 8.7%
Simplified8.7%
Taylor expanded in x1 around 0 2.7%
Taylor expanded in x2 around 0 5.4%
neg-mul-15.4%
Simplified5.4%
Taylor expanded in x2 around -inf 32.0%
mul-1-neg32.0%
*-commutative32.0%
distribute-rgt-neg-in32.0%
+-commutative32.0%
Simplified32.0%
if -8.1999999999999998e86 < x1 Initial program 86.1%
Simplified86.1%
Taylor expanded in x1 around 0 66.5%
Taylor expanded in x2 around 0 66.5%
Final simplification60.3%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -1.75e+154) (* x2 (- (- 6.0) (/ x1 x2))) (+ (* x2 -6.0) (* x1 (+ -1.0 (* x2 -12.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.75e+154) {
tmp = x2 * (-6.0 - (x1 / x2));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * -12.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.75d+154)) then
tmp = x2 * (-6.0d0 - (x1 / x2))
else
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x2 * (-12.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.75e+154) {
tmp = x2 * (-6.0 - (x1 / x2));
} else {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * -12.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.75e+154: tmp = x2 * (-6.0 - (x1 / x2)) else: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * -12.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.75e+154) tmp = Float64(x2 * Float64(Float64(-6.0) - Float64(x1 / x2))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x2 * -12.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.75e+154) tmp = x2 * (-6.0 - (x1 / x2)); else tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * -12.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.75e+154], N[(x2 * N[((-6.0) - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.75 \cdot 10^{+154}:\\
\;\;\;\;x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\end{array}
\end{array}
if x1 < -1.7500000000000001e154Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 2.9%
Taylor expanded in x2 around 0 6.1%
neg-mul-16.1%
Simplified6.1%
Taylor expanded in x2 around -inf 40.9%
mul-1-neg40.9%
*-commutative40.9%
distribute-rgt-neg-in40.9%
+-commutative40.9%
Simplified40.9%
if -1.7500000000000001e154 < x1 Initial program 83.6%
Simplified83.6%
Taylor expanded in x1 around 0 63.3%
Taylor expanded in x2 around 0 47.9%
*-commutative47.9%
Simplified47.9%
Final simplification47.0%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -7.5e+153) (* x2 (- (- 6.0) (/ x1 x2))) (- (* x2 (- (* x1 -12.0) 6.0)) x1)))
double code(double x1, double x2) {
double tmp;
if (x1 <= -7.5e+153) {
tmp = x2 * (-6.0 - (x1 / x2));
} else {
tmp = (x2 * ((x1 * -12.0) - 6.0)) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-7.5d+153)) then
tmp = x2 * (-6.0d0 - (x1 / x2))
else
tmp = (x2 * ((x1 * (-12.0d0)) - 6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -7.5e+153) {
tmp = x2 * (-6.0 - (x1 / x2));
} else {
tmp = (x2 * ((x1 * -12.0) - 6.0)) - x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -7.5e+153: tmp = x2 * (-6.0 - (x1 / x2)) else: tmp = (x2 * ((x1 * -12.0) - 6.0)) - x1 return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -7.5e+153) tmp = Float64(x2 * Float64(Float64(-6.0) - Float64(x1 / x2))); else tmp = Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) - x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -7.5e+153) tmp = x2 * (-6.0 - (x1 / x2)); else tmp = (x2 * ((x1 * -12.0) - 6.0)) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -7.5e+153], N[(x2 * N[((-6.0) - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+153}:\\
\;\;\;\;x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot -12 - 6\right) - x1\\
\end{array}
\end{array}
if x1 < -7.50000000000000065e153Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 2.9%
Taylor expanded in x2 around 0 6.1%
neg-mul-16.1%
Simplified6.1%
Taylor expanded in x2 around -inf 40.9%
mul-1-neg40.9%
*-commutative40.9%
distribute-rgt-neg-in40.9%
+-commutative40.9%
Simplified40.9%
if -7.50000000000000065e153 < x1 Initial program 83.6%
Simplified83.6%
Taylor expanded in x1 around 0 63.3%
Taylor expanded in x2 around 0 47.9%
Final simplification47.0%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.32e-139) (not (<= x2 2.3e-139))) (* x2 -6.0) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.32e-139) || !(x2 <= 2.3e-139)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-1.32d-139)) .or. (.not. (x2 <= 2.3d-139))) then
tmp = x2 * (-6.0d0)
else
tmp = -x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.32e-139) || !(x2 <= 2.3e-139)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.32e-139) or not (x2 <= 2.3e-139): tmp = x2 * -6.0 else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.32e-139) || !(x2 <= 2.3e-139)) tmp = Float64(x2 * -6.0); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.32e-139) || ~((x2 <= 2.3e-139))) tmp = x2 * -6.0; else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.32e-139], N[Not[LessEqual[x2, 2.3e-139]], $MachinePrecision]], N[(x2 * -6.0), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.32 \cdot 10^{-139} \lor \neg \left(x2 \leq 2.3 \cdot 10^{-139}\right):\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -1.31999999999999995e-139 or 2.30000000000000012e-139 < x2 Initial program 73.8%
Simplified73.8%
Taylor expanded in x1 around 0 31.3%
*-commutative31.3%
Simplified31.3%
if -1.31999999999999995e-139 < x2 < 2.30000000000000012e-139Initial program 68.2%
Simplified68.2%
Taylor expanded in x1 around 0 45.8%
Taylor expanded in x2 around 0 45.8%
neg-mul-145.8%
Simplified45.8%
Taylor expanded in x2 around 0 36.7%
neg-mul-136.7%
Simplified36.7%
Final simplification32.9%
(FPCore (x1 x2) :precision binary64 (* x2 (- (- 6.0) (/ x1 x2))))
double code(double x1, double x2) {
return x2 * (-6.0 - (x1 / x2));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0 - (x1 / x2))
end function
public static double code(double x1, double x2) {
return x2 * (-6.0 - (x1 / x2));
}
def code(x1, x2): return x2 * (-6.0 - (x1 / x2))
function code(x1, x2) return Float64(x2 * Float64(Float64(-6.0) - Float64(x1 / x2))) end
function tmp = code(x1, x2) tmp = x2 * (-6.0 - (x1 / x2)); end
code[x1_, x2_] := N[(x2 * N[((-6.0) - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right)
\end{array}
Initial program 72.2%
Simplified72.2%
Taylor expanded in x1 around 0 55.1%
Taylor expanded in x2 around 0 38.5%
neg-mul-138.5%
Simplified38.5%
Taylor expanded in x2 around -inf 43.2%
mul-1-neg43.2%
*-commutative43.2%
distribute-rgt-neg-in43.2%
+-commutative43.2%
Simplified43.2%
Final simplification43.2%
(FPCore (x1 x2) :precision binary64 (- (* x2 -6.0) x1))
double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = (x2 * (-6.0d0)) - x1
end function
public static double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
def code(x1, x2): return (x2 * -6.0) - x1
function code(x1, x2) return Float64(Float64(x2 * -6.0) - x1) end
function tmp = code(x1, x2) tmp = (x2 * -6.0) - x1; end
code[x1_, x2_] := N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6 - x1
\end{array}
Initial program 72.2%
Simplified72.2%
Taylor expanded in x1 around 0 55.1%
Taylor expanded in x2 around 0 38.5%
neg-mul-138.5%
Simplified38.5%
Taylor expanded in x2 around 0 38.5%
Final simplification38.5%
(FPCore (x1 x2) :precision binary64 (- x1))
double code(double x1, double x2) {
return -x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = -x1
end function
public static double code(double x1, double x2) {
return -x1;
}
def code(x1, x2): return -x1
function code(x1, x2) return Float64(-x1) end
function tmp = code(x1, x2) tmp = -x1; end
code[x1_, x2_] := (-x1)
\begin{array}{l}
\\
-x1
\end{array}
Initial program 72.2%
Simplified72.2%
Taylor expanded in x1 around 0 55.1%
Taylor expanded in x2 around 0 38.5%
neg-mul-138.5%
Simplified38.5%
Taylor expanded in x2 around 0 15.4%
neg-mul-115.4%
Simplified15.4%
herbie shell --seed 2024180
(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))))))