
(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 29 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)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- x1 t_0) (fma x1 x1 1.0)))
(t_3 (* 3.0 (* x1 x1)))
(t_4 (* x1 (* x1 3.0)))
(t_5 (/ (- (+ t_4 (* 2.0 x2)) x1) t_1))
(t_6 (/ (- t_0 x1) (fma x1 x1 1.0))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_5) (- t_5 3.0))
(* (* x1 x1) (- (* t_5 4.0) 6.0))))
(* t_4 t_5))
(* x1 (* x1 x1))))
(* 3.0 (/ (- x1 (- t_4 (* 2.0 x2))) (- -1.0 (* x1 x1))))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_3 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_6 4.0 -6.0)) (* (* x1 (* 2.0 t_2)) (- t_2 -3.0)))
(fma t_3 t_6 (pow x1 3.0))))))
(* 6.0 (pow x1 4.0)))))
double code(double x1, double x2) {
double t_0 = fma(x1, (x1 * 3.0), (2.0 * x2));
double t_1 = (x1 * x1) + 1.0;
double t_2 = (x1 - t_0) / fma(x1, x1, 1.0);
double t_3 = 3.0 * (x1 * x1);
double t_4 = x1 * (x1 * 3.0);
double t_5 = ((t_4 + (2.0 * x2)) - x1) / t_1;
double t_6 = (t_0 - x1) / fma(x1, x1, 1.0);
double tmp;
if ((x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))) + (t_4 * t_5)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_4 - (2.0 * x2))) / (-1.0 - (x1 * x1)))))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_3 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_6, 4.0, -6.0)), ((x1 * (2.0 * t_2)) * (t_2 - -3.0))), fma(t_3, t_6, pow(x1, 3.0)))));
} else {
tmp = 6.0 * pow(x1, 4.0);
}
return tmp;
}
function code(x1, x2) t_0 = fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(x1 - t_0) / fma(x1, x1, 1.0)) t_3 = Float64(3.0 * Float64(x1 * x1)) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(Float64(Float64(t_4 + Float64(2.0 * x2)) - x1) / t_1) t_6 = Float64(Float64(t_0 - x1) / fma(x1, x1, 1.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)))) + Float64(t_4 * t_5)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x1 - Float64(t_4 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_3 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_6, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_2)) * Float64(t_2 - -3.0))), fma(t_3, t_6, (x1 ^ 3.0)))))); else tmp = Float64(6.0 * (x1 ^ 4.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 - t$95$0), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$4 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$0 - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x1 - N[(t$95$4 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$3 - 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$6 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 - -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * t$95$6 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{x1 - t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_3 := 3 \cdot \left(x1 \cdot x1\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := \frac{\left(t\_4 + 2 \cdot x2\right) - x1}{t\_1}\\
t_6 := \frac{t\_0 - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \left(t\_5 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right)\right) + t\_4 \cdot t\_5\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{x1 - \left(t\_4 - 2 \cdot x2\right)}{-1 - x1 \cdot x1}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_3 - \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\_6, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_2\right)\right) \cdot \left(t\_2 - -3\right)\right), \mathsf{fma}\left(t\_3, t\_6, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\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.3%
Simplified99.6%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ 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 (/ (- x1 (- t_1 (* 2.0 x2))) (- -1.0 (* x1 x1))))))
(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)
(-
6.0
(*
4.0
(/ (- (+ (* 2.0 x2) (* 3.0 (pow x1 2.0))) x1) t_2)))))))))))
(* 6.0 (pow x1 4.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_1 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * ((x1 - (t_1 - (2.0 * x2))) / (-1.0 - (x1 * x1)));
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) * (6.0 - (4.0 * ((((2.0 * x2) + (3.0 * pow(x1, 2.0))) - x1) / t_2))))))))));
} else {
tmp = 6.0 * pow(x1, 4.0);
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_1 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * ((x1 - (t_1 - (2.0 * x2))) / (-1.0 - (x1 * x1)));
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) * (6.0 - (4.0 * ((((2.0 * x2) + (3.0 * Math.pow(x1, 2.0))) - x1) / t_2))))))))));
} else {
tmp = 6.0 * Math.pow(x1, 4.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_4 = t_1 * t_3 t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0) t_6 = 3.0 * ((x1 - (t_1 - (2.0 * x2))) / (-1.0 - (x1 * x1))) 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) * (6.0 - (4.0 * ((((2.0 * x2) + (3.0 * math.pow(x1, 2.0))) - x1) / t_2)))))))))) else: tmp = 6.0 * math.pow(x1, 4.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(t_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(x1 - Float64(t_1 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) 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(6.0 - Float64(4.0 * Float64(Float64(Float64(Float64(2.0 * x2) + Float64(3.0 * (x1 ^ 2.0))) - x1) / t_2))))))))))); else tmp = Float64(6.0 * (x1 ^ 4.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_4 = t_1 * t_3; t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0); t_6 = 3.0 * ((x1 - (t_1 - (2.0 * x2))) / (-1.0 - (x1 * x1))); 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) * (6.0 - (4.0 * ((((2.0 * x2) + (3.0 * (x1 ^ 2.0))) - x1) / t_2)))))))))); else tmp = 6.0 * (x1 ^ 4.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$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[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $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[(6.0 - 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]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[Power[x1, 4.0], $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{x1 - \left(t\_1 - 2 \cdot x2\right)}{-1 - x1 \cdot x1}\\
\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(6 - 4 \cdot \frac{\left(2 \cdot x2 + 3 \cdot {x1}^{2}\right) - x1}{t\_2}\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\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.3%
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%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.5%
(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
(+
(+
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))))
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))))))
(if (<= t_3 INFINITY) t_3 (* 6.0 (pow x1 4.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 + ((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)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = 6.0 * pow(x1, 4.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 + ((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)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = 6.0 * Math.pow(x1, 4.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 + ((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)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1))))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = 6.0 * math.pow(x1, 4.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(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)))) + Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(6.0 * (x1 ^ 4.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 + ((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)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1))))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = 6.0 * (x1 ^ 4.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[(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] + N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(6.0 * N[Power[x1, 4.0], $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(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)\right) + 3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{-1 - x1 \cdot x1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\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.3%
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%
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 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0)))
(if (<= x1 -5.2e+53)
(*
(pow x1 4.0)
(+ 6.0 (/ (- (/ (- 9.0 (* 4.0 (- 3.0 (* 2.0 x2)))) x1) 3.0) x1)))
(if (<= x1 2.1e+54)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* 3.0 t_1))))))
(* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -5.2e+53) {
tmp = pow(x1, 4.0) * (6.0 + ((((9.0 - (4.0 * (3.0 - (2.0 * x2)))) / x1) - 3.0) / x1));
} else if (x1 <= 2.1e+54) {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1)))));
} else {
tmp = 6.0 * pow(x1, 4.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-5.2d+53)) then
tmp = (x1 ** 4.0d0) * (6.0d0 + ((((9.0d0 - (4.0d0 * (3.0d0 - (2.0d0 * x2)))) / x1) - 3.0d0) / x1))
else if (x1 <= 2.1d+54) then
tmp = x1 + ((3.0d0 * ((x1 - (t_1 - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (3.0d0 * t_1)))))
else
tmp = 6.0d0 * (x1 ** 4.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -5.2e+53) {
tmp = Math.pow(x1, 4.0) * (6.0 + ((((9.0 - (4.0 * (3.0 - (2.0 * x2)))) / x1) - 3.0) / x1));
} else if (x1 <= 2.1e+54) {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1)))));
} else {
tmp = 6.0 * Math.pow(x1, 4.0);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= -5.2e+53: tmp = math.pow(x1, 4.0) * (6.0 + ((((9.0 - (4.0 * (3.0 - (2.0 * x2)))) / x1) - 3.0) / x1)) elif x1 <= 2.1e+54: tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1))))) else: tmp = 6.0 * math.pow(x1, 4.0) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= -5.2e+53) tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(Float64(9.0 - Float64(4.0 * Float64(3.0 - Float64(2.0 * x2)))) / x1) - 3.0) / x1))); elseif (x1 <= 2.1e+54) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * 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(3.0 * t_1)))))); else tmp = Float64(6.0 * (x1 ^ 4.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= -5.2e+53) tmp = (x1 ^ 4.0) * (6.0 + ((((9.0 - (4.0 * (3.0 - (2.0 * x2)))) / x1) - 3.0) / x1)); elseif (x1 <= 2.1e+54) tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1))))); else tmp = 6.0 * (x1 ^ 4.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.2e+53], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(9.0 - N[(4.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.1e+54], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * 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[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -5.2 \cdot 10^{+53}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{9 - 4 \cdot \left(3 - 2 \cdot x2\right)}{x1} - 3}{x1}\right)\\
\mathbf{elif}\;x1 \leq 2.1 \cdot 10^{+54}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \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) + 3 \cdot t\_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\end{array}
\end{array}
if x1 < -5.19999999999999996e53Initial program 23.9%
Simplified23.9%
Taylor expanded in x1 around -inf 100.0%
if -5.19999999999999996e53 < x1 < 2.09999999999999986e54Initial program 99.3%
Taylor expanded in x1 around inf 97.8%
if 2.09999999999999986e54 < x1 Initial program 26.8%
Simplified26.8%
Taylor expanded in x1 around inf 100.0%
Final simplification98.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x2 (- 3.0 (* 2.0 x2))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* 3.0 (- (* x2 -2.0) 3.0)))
(t_4 (+ 3.0 (* x2 -2.0)))
(t_5 (* x2 t_4))
(t_6 (+ (* x1 x1) 1.0))
(t_7 (/ (- (+ t_2 (* 2.0 x2)) x1) t_6))
(t_8 (* t_2 t_7))
(t_9 (* -4.0 t_5))
(t_10 (- -1.0 (* x1 x1)))
(t_11
(*
(+
(* (* x1 x1) (- 6.0 (* t_7 4.0)))
(* (- t_7 3.0) (* (* x1 2.0) (- (/ 1.0 x1) 3.0))))
t_10))
(t_12 (* 3.0 (/ (- x1 (- t_2 (* 2.0 x2))) t_10))))
(if (<= x1 -5.7e+102)
(-
(* x2 -6.0)
(*
x1
(-
(-
(*
x1
(+
6.0
(-
(-
t_3
(+
(* x2 6.0)
(+
(* x2 8.0)
(*
x1
(-
(+
t_9
(*
2.0
(- (+ 1.0 (+ (* -3.0 t_4) (* 2.0 t_1))) (* -2.0 t_5))))
3.0)))))
(* 2.0 (+ 3.0 (* x2 -4.0))))))
t_9)
-1.0)))
(if (<= x1 -7.4e+31)
(+ x1 (+ t_12 (+ x1 (+ t_0 (+ (* 3.0 t_2) t_11)))))
(if (<= x1 7.5e+28)
(+
x1
(+
t_12
(+
x1
(+
t_0
(+
t_8
(*
t_6
(+
(* (* x1 x1) 6.0)
(* (* (* x1 2.0) t_7) (- (- (* 2.0 x2) x1) 3.0)))))))))
(if (<= x1 5e+97)
(+ x1 (+ (+ x1 (+ t_0 (+ t_8 t_11))) (* 3.0 (* x2 -2.0))))
(+
x1
(-
(* x2 -6.0)
(* x1 (+ 2.0 (+ (* x1 (- t_3 (* x1 3.0))) (* 4.0 t_1))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x2 * (3.0 - (2.0 * x2));
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * ((x2 * -2.0) - 3.0);
double t_4 = 3.0 + (x2 * -2.0);
double t_5 = x2 * t_4;
double t_6 = (x1 * x1) + 1.0;
double t_7 = ((t_2 + (2.0 * x2)) - x1) / t_6;
double t_8 = t_2 * t_7;
double t_9 = -4.0 * t_5;
double t_10 = -1.0 - (x1 * x1);
double t_11 = (((x1 * x1) * (6.0 - (t_7 * 4.0))) + ((t_7 - 3.0) * ((x1 * 2.0) * ((1.0 / x1) - 3.0)))) * t_10;
double t_12 = 3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_10);
double tmp;
if (x1 <= -5.7e+102) {
tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_3 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_9 + (2.0 * ((1.0 + ((-3.0 * t_4) + (2.0 * t_1))) - (-2.0 * t_5)))) - 3.0))))) - (2.0 * (3.0 + (x2 * -4.0)))))) - t_9) - -1.0));
} else if (x1 <= -7.4e+31) {
tmp = x1 + (t_12 + (x1 + (t_0 + ((3.0 * t_2) + t_11))));
} else if (x1 <= 7.5e+28) {
tmp = x1 + (t_12 + (x1 + (t_0 + (t_8 + (t_6 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * t_7) * (((2.0 * x2) - x1) - 3.0))))))));
} else if (x1 <= 5e+97) {
tmp = x1 + ((x1 + (t_0 + (t_8 + t_11))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_3 - (x1 * 3.0))) + (4.0 * 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_10
real(8) :: t_11
real(8) :: t_12
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 = x2 * (3.0d0 - (2.0d0 * x2))
t_2 = x1 * (x1 * 3.0d0)
t_3 = 3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)
t_4 = 3.0d0 + (x2 * (-2.0d0))
t_5 = x2 * t_4
t_6 = (x1 * x1) + 1.0d0
t_7 = ((t_2 + (2.0d0 * x2)) - x1) / t_6
t_8 = t_2 * t_7
t_9 = (-4.0d0) * t_5
t_10 = (-1.0d0) - (x1 * x1)
t_11 = (((x1 * x1) * (6.0d0 - (t_7 * 4.0d0))) + ((t_7 - 3.0d0) * ((x1 * 2.0d0) * ((1.0d0 / x1) - 3.0d0)))) * t_10
t_12 = 3.0d0 * ((x1 - (t_2 - (2.0d0 * x2))) / t_10)
if (x1 <= (-5.7d+102)) then
tmp = (x2 * (-6.0d0)) - (x1 * (((x1 * (6.0d0 + ((t_3 - ((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_9 + (2.0d0 * ((1.0d0 + (((-3.0d0) * t_4) + (2.0d0 * t_1))) - ((-2.0d0) * t_5)))) - 3.0d0))))) - (2.0d0 * (3.0d0 + (x2 * (-4.0d0))))))) - t_9) - (-1.0d0)))
else if (x1 <= (-7.4d+31)) then
tmp = x1 + (t_12 + (x1 + (t_0 + ((3.0d0 * t_2) + t_11))))
else if (x1 <= 7.5d+28) then
tmp = x1 + (t_12 + (x1 + (t_0 + (t_8 + (t_6 * (((x1 * x1) * 6.0d0) + (((x1 * 2.0d0) * t_7) * (((2.0d0 * x2) - x1) - 3.0d0))))))))
else if (x1 <= 5d+97) then
tmp = x1 + ((x1 + (t_0 + (t_8 + t_11))) + (3.0d0 * (x2 * (-2.0d0))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * (t_3 - (x1 * 3.0d0))) + (4.0d0 * t_1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x2 * (3.0 - (2.0 * x2));
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * ((x2 * -2.0) - 3.0);
double t_4 = 3.0 + (x2 * -2.0);
double t_5 = x2 * t_4;
double t_6 = (x1 * x1) + 1.0;
double t_7 = ((t_2 + (2.0 * x2)) - x1) / t_6;
double t_8 = t_2 * t_7;
double t_9 = -4.0 * t_5;
double t_10 = -1.0 - (x1 * x1);
double t_11 = (((x1 * x1) * (6.0 - (t_7 * 4.0))) + ((t_7 - 3.0) * ((x1 * 2.0) * ((1.0 / x1) - 3.0)))) * t_10;
double t_12 = 3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_10);
double tmp;
if (x1 <= -5.7e+102) {
tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_3 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_9 + (2.0 * ((1.0 + ((-3.0 * t_4) + (2.0 * t_1))) - (-2.0 * t_5)))) - 3.0))))) - (2.0 * (3.0 + (x2 * -4.0)))))) - t_9) - -1.0));
} else if (x1 <= -7.4e+31) {
tmp = x1 + (t_12 + (x1 + (t_0 + ((3.0 * t_2) + t_11))));
} else if (x1 <= 7.5e+28) {
tmp = x1 + (t_12 + (x1 + (t_0 + (t_8 + (t_6 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * t_7) * (((2.0 * x2) - x1) - 3.0))))))));
} else if (x1 <= 5e+97) {
tmp = x1 + ((x1 + (t_0 + (t_8 + t_11))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_3 - (x1 * 3.0))) + (4.0 * t_1)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x2 * (3.0 - (2.0 * x2)) t_2 = x1 * (x1 * 3.0) t_3 = 3.0 * ((x2 * -2.0) - 3.0) t_4 = 3.0 + (x2 * -2.0) t_5 = x2 * t_4 t_6 = (x1 * x1) + 1.0 t_7 = ((t_2 + (2.0 * x2)) - x1) / t_6 t_8 = t_2 * t_7 t_9 = -4.0 * t_5 t_10 = -1.0 - (x1 * x1) t_11 = (((x1 * x1) * (6.0 - (t_7 * 4.0))) + ((t_7 - 3.0) * ((x1 * 2.0) * ((1.0 / x1) - 3.0)))) * t_10 t_12 = 3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_10) tmp = 0 if x1 <= -5.7e+102: tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_3 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_9 + (2.0 * ((1.0 + ((-3.0 * t_4) + (2.0 * t_1))) - (-2.0 * t_5)))) - 3.0))))) - (2.0 * (3.0 + (x2 * -4.0)))))) - t_9) - -1.0)) elif x1 <= -7.4e+31: tmp = x1 + (t_12 + (x1 + (t_0 + ((3.0 * t_2) + t_11)))) elif x1 <= 7.5e+28: tmp = x1 + (t_12 + (x1 + (t_0 + (t_8 + (t_6 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * t_7) * (((2.0 * x2) - x1) - 3.0)))))))) elif x1 <= 5e+97: tmp = x1 + ((x1 + (t_0 + (t_8 + t_11))) + (3.0 * (x2 * -2.0))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_3 - (x1 * 3.0))) + (4.0 * t_1))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x2 * Float64(3.0 - Float64(2.0 * x2))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(3.0 * Float64(Float64(x2 * -2.0) - 3.0)) t_4 = Float64(3.0 + Float64(x2 * -2.0)) t_5 = Float64(x2 * t_4) t_6 = Float64(Float64(x1 * x1) + 1.0) t_7 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_6) t_8 = Float64(t_2 * t_7) t_9 = Float64(-4.0 * t_5) t_10 = Float64(-1.0 - Float64(x1 * x1)) t_11 = Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_7 * 4.0))) + Float64(Float64(t_7 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(1.0 / x1) - 3.0)))) * t_10) t_12 = Float64(3.0 * Float64(Float64(x1 - Float64(t_2 - Float64(2.0 * x2))) / t_10)) tmp = 0.0 if (x1 <= -5.7e+102) tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(t_3 - Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_9 + Float64(2.0 * Float64(Float64(1.0 + Float64(Float64(-3.0 * t_4) + Float64(2.0 * t_1))) - Float64(-2.0 * t_5)))) - 3.0))))) - Float64(2.0 * Float64(3.0 + Float64(x2 * -4.0)))))) - t_9) - -1.0))); elseif (x1 <= -7.4e+31) tmp = Float64(x1 + Float64(t_12 + Float64(x1 + Float64(t_0 + Float64(Float64(3.0 * t_2) + t_11))))); elseif (x1 <= 7.5e+28) tmp = Float64(x1 + Float64(t_12 + Float64(x1 + Float64(t_0 + Float64(t_8 + Float64(t_6 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(Float64(Float64(x1 * 2.0) * t_7) * Float64(Float64(Float64(2.0 * x2) - x1) - 3.0))))))))); elseif (x1 <= 5e+97) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_0 + Float64(t_8 + t_11))) + Float64(3.0 * Float64(x2 * -2.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(t_3 - Float64(x1 * 3.0))) + Float64(4.0 * t_1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x2 * (3.0 - (2.0 * x2)); t_2 = x1 * (x1 * 3.0); t_3 = 3.0 * ((x2 * -2.0) - 3.0); t_4 = 3.0 + (x2 * -2.0); t_5 = x2 * t_4; t_6 = (x1 * x1) + 1.0; t_7 = ((t_2 + (2.0 * x2)) - x1) / t_6; t_8 = t_2 * t_7; t_9 = -4.0 * t_5; t_10 = -1.0 - (x1 * x1); t_11 = (((x1 * x1) * (6.0 - (t_7 * 4.0))) + ((t_7 - 3.0) * ((x1 * 2.0) * ((1.0 / x1) - 3.0)))) * t_10; t_12 = 3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_10); tmp = 0.0; if (x1 <= -5.7e+102) tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_3 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_9 + (2.0 * ((1.0 + ((-3.0 * t_4) + (2.0 * t_1))) - (-2.0 * t_5)))) - 3.0))))) - (2.0 * (3.0 + (x2 * -4.0)))))) - t_9) - -1.0)); elseif (x1 <= -7.4e+31) tmp = x1 + (t_12 + (x1 + (t_0 + ((3.0 * t_2) + t_11)))); elseif (x1 <= 7.5e+28) tmp = x1 + (t_12 + (x1 + (t_0 + (t_8 + (t_6 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * t_7) * (((2.0 * x2) - x1) - 3.0)))))))); elseif (x1 <= 5e+97) tmp = x1 + ((x1 + (t_0 + (t_8 + t_11))) + (3.0 * (x2 * -2.0))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_3 - (x1 * 3.0))) + (4.0 * t_1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x2 * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$7 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$2 * t$95$7), $MachinePrecision]}, Block[{t$95$9 = N[(-4.0 * t$95$5), $MachinePrecision]}, Block[{t$95$10 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$11 = N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$7 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$7 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(1.0 / x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$10), $MachinePrecision]}, Block[{t$95$12 = N[(3.0 * N[(N[(x1 - N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$10), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.7e+102], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(N[(N[(x1 * N[(6.0 + N[(N[(t$95$3 - N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$9 + N[(2.0 * N[(N[(1.0 + N[(N[(-3.0 * t$95$4), $MachinePrecision] + N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-2.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(3.0 + N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$9), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -7.4e+31], N[(x1 + N[(t$95$12 + N[(x1 + N[(t$95$0 + N[(N[(3.0 * t$95$2), $MachinePrecision] + t$95$11), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.5e+28], N[(x1 + N[(t$95$12 + N[(x1 + N[(t$95$0 + N[(t$95$8 + N[(t$95$6 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$7), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+97], N[(x1 + N[(N[(x1 + N[(t$95$0 + N[(t$95$8 + t$95$11), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(x1 * N[(t$95$3 - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x2 \cdot \left(3 - 2 \cdot x2\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 3 \cdot \left(x2 \cdot -2 - 3\right)\\
t_4 := 3 + x2 \cdot -2\\
t_5 := x2 \cdot t\_4\\
t_6 := x1 \cdot x1 + 1\\
t_7 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_6}\\
t_8 := t\_2 \cdot t\_7\\
t_9 := -4 \cdot t\_5\\
t_10 := -1 - x1 \cdot x1\\
t_11 := \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_7 \cdot 4\right) + \left(t\_7 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(\frac{1}{x1} - 3\right)\right)\right) \cdot t\_10\\
t_12 := 3 \cdot \frac{x1 - \left(t\_2 - 2 \cdot x2\right)}{t\_10}\\
\mathbf{if}\;x1 \leq -5.7 \cdot 10^{+102}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(\left(x1 \cdot \left(6 + \left(\left(t\_3 - \left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_9 + 2 \cdot \left(\left(1 + \left(-3 \cdot t\_4 + 2 \cdot t\_1\right)\right) - -2 \cdot t\_5\right)\right) - 3\right)\right)\right)\right) - 2 \cdot \left(3 + x2 \cdot -4\right)\right)\right) - t\_9\right) - -1\right)\\
\mathbf{elif}\;x1 \leq -7.4 \cdot 10^{+31}:\\
\;\;\;\;x1 + \left(t\_12 + \left(x1 + \left(t\_0 + \left(3 \cdot t\_2 + t\_11\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{+28}:\\
\;\;\;\;x1 + \left(t\_12 + \left(x1 + \left(t\_0 + \left(t\_8 + t\_6 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(\left(x1 \cdot 2\right) \cdot t\_7\right) \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+97}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_0 + \left(t\_8 + t\_11\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(x1 \cdot \left(t\_3 - x1 \cdot 3\right) + 4 \cdot t\_1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.6999999999999999e102Initial program 0.0%
Simplified22.0%
Taylor expanded in x1 around 0 70.7%
if -5.6999999999999999e102 < x1 < -7.3999999999999996e31Initial program 99.3%
Taylor expanded in x1 around inf 99.3%
Taylor expanded in x1 around inf 99.3%
if -7.3999999999999996e31 < x1 < 7.4999999999999998e28Initial program 99.3%
Taylor expanded in x1 around 0 92.1%
Taylor expanded in x1 around inf 91.7%
if 7.4999999999999998e28 < x1 < 4.99999999999999999e97Initial program 99.6%
Taylor expanded in x1 around inf 82.9%
Taylor expanded in x1 around 0 82.9%
*-commutative82.9%
Simplified82.9%
if 4.99999999999999999e97 < x1 Initial program 14.3%
Simplified14.3%
Taylor expanded in x1 around 0 6.1%
associate-*r*6.1%
fmm-def6.1%
metadata-eval6.1%
Simplified6.1%
Taylor expanded in x1 around 0 97.1%
Final simplification89.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 2.0 (+ 3.0 (* x2 -4.0))))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x2 (- 3.0 (* 2.0 x2))))
(t_3 (* x1 (* x1 3.0)))
(t_4 (/ (- (+ t_3 (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(t_5 (* 3.0 (- (* x2 -2.0) 3.0)))
(t_6 (+ 3.0 (* x2 -2.0)))
(t_7 (* x2 t_6))
(t_8 (* -4.0 t_7))
(t_9 (- -1.0 (* x1 x1)))
(t_10
(*
(+
(* (* x1 x1) (- 6.0 (* t_4 4.0)))
(* (- t_4 3.0) (* (* x1 2.0) (- (/ 1.0 x1) 3.0))))
t_9)))
(if (<= x1 -5.7e+102)
(-
(* x2 -6.0)
(*
x1
(-
(-
(*
x1
(+
6.0
(-
(-
t_5
(+
(* x2 6.0)
(+
(* x2 8.0)
(*
x1
(-
(+
t_8
(*
2.0
(- (+ 1.0 (+ (* -3.0 t_6) (* 2.0 t_2))) (* -2.0 t_7))))
3.0)))))
t_0)))
t_8)
-1.0)))
(if (<= x1 -7.4e+31)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_3 (* 2.0 x2))) t_9))
(+ x1 (+ t_1 (+ (* 3.0 t_3) t_10)))))
(if (<= x1 7.5e+28)
(+
(* x2 -6.0)
(*
x1
(+
-1.0
(+ t_8 (* x1 (- (- t_0 (- t_5 (+ (* x2 6.0) (* x2 8.0)))) 6.0))))))
(if (<= x1 5e+97)
(+ x1 (+ (+ x1 (+ t_1 (+ (* t_3 t_4) t_10))) (* 3.0 (* x2 -2.0))))
(+
x1
(-
(* x2 -6.0)
(* x1 (+ 2.0 (+ (* x1 (- t_5 (* x1 3.0))) (* 4.0 t_2))))))))))))
double code(double x1, double x2) {
double t_0 = 2.0 * (3.0 + (x2 * -4.0));
double t_1 = x1 * (x1 * x1);
double t_2 = x2 * (3.0 - (2.0 * x2));
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0);
double t_5 = 3.0 * ((x2 * -2.0) - 3.0);
double t_6 = 3.0 + (x2 * -2.0);
double t_7 = x2 * t_6;
double t_8 = -4.0 * t_7;
double t_9 = -1.0 - (x1 * x1);
double t_10 = (((x1 * x1) * (6.0 - (t_4 * 4.0))) + ((t_4 - 3.0) * ((x1 * 2.0) * ((1.0 / x1) - 3.0)))) * t_9;
double tmp;
if (x1 <= -5.7e+102) {
tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_5 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_8 + (2.0 * ((1.0 + ((-3.0 * t_6) + (2.0 * t_2))) - (-2.0 * t_7)))) - 3.0))))) - t_0))) - t_8) - -1.0));
} else if (x1 <= -7.4e+31) {
tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_9)) + (x1 + (t_1 + ((3.0 * t_3) + t_10))));
} else if (x1 <= 7.5e+28) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (t_8 + (x1 * ((t_0 - (t_5 - ((x2 * 6.0) + (x2 * 8.0)))) - 6.0)))));
} else if (x1 <= 5e+97) {
tmp = x1 + ((x1 + (t_1 + ((t_3 * t_4) + t_10))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_5 - (x1 * 3.0))) + (4.0 * t_2)))));
}
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_10
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 = 2.0d0 * (3.0d0 + (x2 * (-4.0d0)))
t_1 = x1 * (x1 * x1)
t_2 = x2 * (3.0d0 - (2.0d0 * x2))
t_3 = x1 * (x1 * 3.0d0)
t_4 = ((t_3 + (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0)
t_5 = 3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)
t_6 = 3.0d0 + (x2 * (-2.0d0))
t_7 = x2 * t_6
t_8 = (-4.0d0) * t_7
t_9 = (-1.0d0) - (x1 * x1)
t_10 = (((x1 * x1) * (6.0d0 - (t_4 * 4.0d0))) + ((t_4 - 3.0d0) * ((x1 * 2.0d0) * ((1.0d0 / x1) - 3.0d0)))) * t_9
if (x1 <= (-5.7d+102)) then
tmp = (x2 * (-6.0d0)) - (x1 * (((x1 * (6.0d0 + ((t_5 - ((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_8 + (2.0d0 * ((1.0d0 + (((-3.0d0) * t_6) + (2.0d0 * t_2))) - ((-2.0d0) * t_7)))) - 3.0d0))))) - t_0))) - t_8) - (-1.0d0)))
else if (x1 <= (-7.4d+31)) then
tmp = x1 + ((3.0d0 * ((x1 - (t_3 - (2.0d0 * x2))) / t_9)) + (x1 + (t_1 + ((3.0d0 * t_3) + t_10))))
else if (x1 <= 7.5d+28) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (t_8 + (x1 * ((t_0 - (t_5 - ((x2 * 6.0d0) + (x2 * 8.0d0)))) - 6.0d0)))))
else if (x1 <= 5d+97) then
tmp = x1 + ((x1 + (t_1 + ((t_3 * t_4) + t_10))) + (3.0d0 * (x2 * (-2.0d0))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * (t_5 - (x1 * 3.0d0))) + (4.0d0 * t_2)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 2.0 * (3.0 + (x2 * -4.0));
double t_1 = x1 * (x1 * x1);
double t_2 = x2 * (3.0 - (2.0 * x2));
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0);
double t_5 = 3.0 * ((x2 * -2.0) - 3.0);
double t_6 = 3.0 + (x2 * -2.0);
double t_7 = x2 * t_6;
double t_8 = -4.0 * t_7;
double t_9 = -1.0 - (x1 * x1);
double t_10 = (((x1 * x1) * (6.0 - (t_4 * 4.0))) + ((t_4 - 3.0) * ((x1 * 2.0) * ((1.0 / x1) - 3.0)))) * t_9;
double tmp;
if (x1 <= -5.7e+102) {
tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_5 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_8 + (2.0 * ((1.0 + ((-3.0 * t_6) + (2.0 * t_2))) - (-2.0 * t_7)))) - 3.0))))) - t_0))) - t_8) - -1.0));
} else if (x1 <= -7.4e+31) {
tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_9)) + (x1 + (t_1 + ((3.0 * t_3) + t_10))));
} else if (x1 <= 7.5e+28) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (t_8 + (x1 * ((t_0 - (t_5 - ((x2 * 6.0) + (x2 * 8.0)))) - 6.0)))));
} else if (x1 <= 5e+97) {
tmp = x1 + ((x1 + (t_1 + ((t_3 * t_4) + t_10))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_5 - (x1 * 3.0))) + (4.0 * t_2)))));
}
return tmp;
}
def code(x1, x2): t_0 = 2.0 * (3.0 + (x2 * -4.0)) t_1 = x1 * (x1 * x1) t_2 = x2 * (3.0 - (2.0 * x2)) t_3 = x1 * (x1 * 3.0) t_4 = ((t_3 + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0) t_5 = 3.0 * ((x2 * -2.0) - 3.0) t_6 = 3.0 + (x2 * -2.0) t_7 = x2 * t_6 t_8 = -4.0 * t_7 t_9 = -1.0 - (x1 * x1) t_10 = (((x1 * x1) * (6.0 - (t_4 * 4.0))) + ((t_4 - 3.0) * ((x1 * 2.0) * ((1.0 / x1) - 3.0)))) * t_9 tmp = 0 if x1 <= -5.7e+102: tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_5 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_8 + (2.0 * ((1.0 + ((-3.0 * t_6) + (2.0 * t_2))) - (-2.0 * t_7)))) - 3.0))))) - t_0))) - t_8) - -1.0)) elif x1 <= -7.4e+31: tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_9)) + (x1 + (t_1 + ((3.0 * t_3) + t_10)))) elif x1 <= 7.5e+28: tmp = (x2 * -6.0) + (x1 * (-1.0 + (t_8 + (x1 * ((t_0 - (t_5 - ((x2 * 6.0) + (x2 * 8.0)))) - 6.0))))) elif x1 <= 5e+97: tmp = x1 + ((x1 + (t_1 + ((t_3 * t_4) + t_10))) + (3.0 * (x2 * -2.0))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_5 - (x1 * 3.0))) + (4.0 * t_2))))) return tmp
function code(x1, x2) t_0 = Float64(2.0 * Float64(3.0 + Float64(x2 * -4.0))) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x2 * Float64(3.0 - Float64(2.0 * x2))) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0)) t_5 = Float64(3.0 * Float64(Float64(x2 * -2.0) - 3.0)) t_6 = Float64(3.0 + Float64(x2 * -2.0)) t_7 = Float64(x2 * t_6) t_8 = Float64(-4.0 * t_7) t_9 = Float64(-1.0 - Float64(x1 * x1)) t_10 = Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_4 * 4.0))) + Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(1.0 / x1) - 3.0)))) * t_9) tmp = 0.0 if (x1 <= -5.7e+102) tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(t_5 - Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_8 + Float64(2.0 * Float64(Float64(1.0 + Float64(Float64(-3.0 * t_6) + Float64(2.0 * t_2))) - Float64(-2.0 * t_7)))) - 3.0))))) - t_0))) - t_8) - -1.0))); elseif (x1 <= -7.4e+31) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_3 - Float64(2.0 * x2))) / t_9)) + Float64(x1 + Float64(t_1 + Float64(Float64(3.0 * t_3) + t_10))))); elseif (x1 <= 7.5e+28) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(t_8 + Float64(x1 * Float64(Float64(t_0 - Float64(t_5 - Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0)))) - 6.0)))))); elseif (x1 <= 5e+97) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(Float64(t_3 * t_4) + t_10))) + Float64(3.0 * Float64(x2 * -2.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(t_5 - Float64(x1 * 3.0))) + Float64(4.0 * t_2)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 2.0 * (3.0 + (x2 * -4.0)); t_1 = x1 * (x1 * x1); t_2 = x2 * (3.0 - (2.0 * x2)); t_3 = x1 * (x1 * 3.0); t_4 = ((t_3 + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0); t_5 = 3.0 * ((x2 * -2.0) - 3.0); t_6 = 3.0 + (x2 * -2.0); t_7 = x2 * t_6; t_8 = -4.0 * t_7; t_9 = -1.0 - (x1 * x1); t_10 = (((x1 * x1) * (6.0 - (t_4 * 4.0))) + ((t_4 - 3.0) * ((x1 * 2.0) * ((1.0 / x1) - 3.0)))) * t_9; tmp = 0.0; if (x1 <= -5.7e+102) tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_5 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_8 + (2.0 * ((1.0 + ((-3.0 * t_6) + (2.0 * t_2))) - (-2.0 * t_7)))) - 3.0))))) - t_0))) - t_8) - -1.0)); elseif (x1 <= -7.4e+31) tmp = x1 + ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_9)) + (x1 + (t_1 + ((3.0 * t_3) + t_10)))); elseif (x1 <= 7.5e+28) tmp = (x2 * -6.0) + (x1 * (-1.0 + (t_8 + (x1 * ((t_0 - (t_5 - ((x2 * 6.0) + (x2 * 8.0)))) - 6.0))))); elseif (x1 <= 5e+97) tmp = x1 + ((x1 + (t_1 + ((t_3 * t_4) + t_10))) + (3.0 * (x2 * -2.0))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_5 - (x1 * 3.0))) + (4.0 * t_2))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(2.0 * N[(3.0 + N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(x2 * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(-4.0 * t$95$7), $MachinePrecision]}, Block[{t$95$9 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$10 = N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$4 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(1.0 / x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$9), $MachinePrecision]}, If[LessEqual[x1, -5.7e+102], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(N[(N[(x1 * N[(6.0 + N[(N[(t$95$5 - N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$8 + N[(2.0 * N[(N[(1.0 + N[(N[(-3.0 * t$95$6), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-2.0 * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$8), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -7.4e+31], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$9), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 + N[(N[(3.0 * t$95$3), $MachinePrecision] + t$95$10), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.5e+28], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(t$95$8 + N[(x1 * N[(N[(t$95$0 - N[(t$95$5 - N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+97], N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(N[(t$95$3 * t$95$4), $MachinePrecision] + t$95$10), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(x1 * N[(t$95$5 - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(3 + x2 \cdot -4\right)\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x2 \cdot \left(3 - 2 \cdot x2\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\\
t_5 := 3 \cdot \left(x2 \cdot -2 - 3\right)\\
t_6 := 3 + x2 \cdot -2\\
t_7 := x2 \cdot t\_6\\
t_8 := -4 \cdot t\_7\\
t_9 := -1 - x1 \cdot x1\\
t_10 := \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_4 \cdot 4\right) + \left(t\_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(\frac{1}{x1} - 3\right)\right)\right) \cdot t\_9\\
\mathbf{if}\;x1 \leq -5.7 \cdot 10^{+102}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(\left(x1 \cdot \left(6 + \left(\left(t\_5 - \left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_8 + 2 \cdot \left(\left(1 + \left(-3 \cdot t\_6 + 2 \cdot t\_2\right)\right) - -2 \cdot t\_7\right)\right) - 3\right)\right)\right)\right) - t\_0\right)\right) - t\_8\right) - -1\right)\\
\mathbf{elif}\;x1 \leq -7.4 \cdot 10^{+31}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_3 - 2 \cdot x2\right)}{t\_9} + \left(x1 + \left(t\_1 + \left(3 \cdot t\_3 + t\_10\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{+28}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(t\_8 + x1 \cdot \left(\left(t\_0 - \left(t\_5 - \left(x2 \cdot 6 + x2 \cdot 8\right)\right)\right) - 6\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+97}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_1 + \left(t\_3 \cdot t\_4 + t\_10\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(x1 \cdot \left(t\_5 - x1 \cdot 3\right) + 4 \cdot t\_2\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.6999999999999999e102Initial program 0.0%
Simplified22.0%
Taylor expanded in x1 around 0 70.7%
if -5.6999999999999999e102 < x1 < -7.3999999999999996e31Initial program 99.3%
Taylor expanded in x1 around inf 99.3%
Taylor expanded in x1 around inf 99.3%
if -7.3999999999999996e31 < x1 < 7.4999999999999998e28Initial program 99.3%
Simplified88.6%
Taylor expanded in x1 around 0 82.8%
if 7.4999999999999998e28 < x1 < 4.99999999999999999e97Initial program 99.6%
Taylor expanded in x1 around inf 82.9%
Taylor expanded in x1 around 0 82.9%
*-commutative82.9%
Simplified82.9%
if 4.99999999999999999e97 < x1 Initial program 14.3%
Simplified14.3%
Taylor expanded in x1 around 0 6.1%
associate-*r*6.1%
fmm-def6.1%
metadata-eval6.1%
Simplified6.1%
Taylor expanded in x1 around 0 97.1%
Final simplification83.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0)))
(if (or (<= x1 -5.5e+102) (not (<= x1 2.1e+54)))
(* 6.0 (pow x1 4.0))
(+
x1
(+
(* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* 3.0 t_1)))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if ((x1 <= -5.5e+102) || !(x1 <= 2.1e+54)) {
tmp = 6.0 * pow(x1, 4.0);
} else {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
if ((x1 <= (-5.5d+102)) .or. (.not. (x1 <= 2.1d+54))) then
tmp = 6.0d0 * (x1 ** 4.0d0)
else
tmp = x1 + ((3.0d0 * ((x1 - (t_1 - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (3.0d0 * 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 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if ((x1 <= -5.5e+102) || !(x1 <= 2.1e+54)) {
tmp = 6.0 * Math.pow(x1, 4.0);
} else {
tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1)))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 tmp = 0 if (x1 <= -5.5e+102) or not (x1 <= 2.1e+54): tmp = 6.0 * math.pow(x1, 4.0) else: tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if ((x1 <= -5.5e+102) || !(x1 <= 2.1e+54)) tmp = Float64(6.0 * (x1 ^ 4.0)); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * 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(3.0 * t_1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if ((x1 <= -5.5e+102) || ~((x1 <= 2.1e+54))) tmp = 6.0 * (x1 ^ 4.0); else tmp = x1 + ((3.0 * ((x1 - (t_1 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * 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[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[Or[LessEqual[x1, -5.5e+102], N[Not[LessEqual[x1, 2.1e+54]], $MachinePrecision]], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * 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[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102} \lor \neg \left(x1 \leq 2.1 \cdot 10^{+54}\right):\\
\;\;\;\;6 \cdot {x1}^{4}\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \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) + 3 \cdot t\_1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102 or 2.09999999999999986e54 < x1 Initial program 13.4%
Simplified13.4%
Taylor expanded in x1 around inf 100.0%
if -5.49999999999999981e102 < x1 < 2.09999999999999986e54Initial program 99.3%
Taylor expanded in x1 around inf 97.9%
Final simplification98.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 2.0 (+ 3.0 (* x2 -4.0))))
(t_1 (* x2 (- 3.0 (* 2.0 x2))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(t_4 (* 3.0 (- (* x2 -2.0) 3.0)))
(t_5 (+ 3.0 (* x2 -2.0)))
(t_6 (* x2 t_5))
(t_7 (* -4.0 t_6))
(t_8 (- -1.0 (* x1 x1)))
(t_9
(+
x1
(+
(* 3.0 (/ (- x1 (- t_2 (* 2.0 x2))) t_8))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_2)
(*
(+
(* (* x1 x1) (- 6.0 (* t_3 4.0)))
(* (- t_3 3.0) (* (* x1 2.0) (- (/ 1.0 x1) 3.0))))
t_8))))))))
(if (<= x1 -5.7e+102)
(-
(* x2 -6.0)
(*
x1
(-
(-
(*
x1
(+
6.0
(-
(-
t_4
(+
(* x2 6.0)
(+
(* x2 8.0)
(*
x1
(-
(+
t_7
(*
2.0
(- (+ 1.0 (+ (* -3.0 t_5) (* 2.0 t_1))) (* -2.0 t_6))))
3.0)))))
t_0)))
t_7)
-1.0)))
(if (<= x1 -7.4e+31)
t_9
(if (<= x1 7.5e+28)
(+
(* x2 -6.0)
(*
x1
(+
-1.0
(+ t_7 (* x1 (- (- t_0 (- t_4 (+ (* x2 6.0) (* x2 8.0)))) 6.0))))))
(if (<= x1 5e+97)
t_9
(+
x1
(-
(* x2 -6.0)
(* x1 (+ 2.0 (+ (* x1 (- t_4 (* x1 3.0))) (* 4.0 t_1))))))))))))
double code(double x1, double x2) {
double t_0 = 2.0 * (3.0 + (x2 * -4.0));
double t_1 = x2 * (3.0 - (2.0 * x2));
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0);
double t_4 = 3.0 * ((x2 * -2.0) - 3.0);
double t_5 = 3.0 + (x2 * -2.0);
double t_6 = x2 * t_5;
double t_7 = -4.0 * t_6;
double t_8 = -1.0 - (x1 * x1);
double t_9 = x1 + ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_8)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) + ((((x1 * x1) * (6.0 - (t_3 * 4.0))) + ((t_3 - 3.0) * ((x1 * 2.0) * ((1.0 / x1) - 3.0)))) * t_8)))));
double tmp;
if (x1 <= -5.7e+102) {
tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_4 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_7 + (2.0 * ((1.0 + ((-3.0 * t_5) + (2.0 * t_1))) - (-2.0 * t_6)))) - 3.0))))) - t_0))) - t_7) - -1.0));
} else if (x1 <= -7.4e+31) {
tmp = t_9;
} else if (x1 <= 7.5e+28) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (t_7 + (x1 * ((t_0 - (t_4 - ((x2 * 6.0) + (x2 * 8.0)))) - 6.0)))));
} else if (x1 <= 5e+97) {
tmp = t_9;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_4 - (x1 * 3.0))) + (4.0 * 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) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_0 = 2.0d0 * (3.0d0 + (x2 * (-4.0d0)))
t_1 = x2 * (3.0d0 - (2.0d0 * x2))
t_2 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0)
t_4 = 3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)
t_5 = 3.0d0 + (x2 * (-2.0d0))
t_6 = x2 * t_5
t_7 = (-4.0d0) * t_6
t_8 = (-1.0d0) - (x1 * x1)
t_9 = x1 + ((3.0d0 * ((x1 - (t_2 - (2.0d0 * x2))) / t_8)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_2) + ((((x1 * x1) * (6.0d0 - (t_3 * 4.0d0))) + ((t_3 - 3.0d0) * ((x1 * 2.0d0) * ((1.0d0 / x1) - 3.0d0)))) * t_8)))))
if (x1 <= (-5.7d+102)) then
tmp = (x2 * (-6.0d0)) - (x1 * (((x1 * (6.0d0 + ((t_4 - ((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_7 + (2.0d0 * ((1.0d0 + (((-3.0d0) * t_5) + (2.0d0 * t_1))) - ((-2.0d0) * t_6)))) - 3.0d0))))) - t_0))) - t_7) - (-1.0d0)))
else if (x1 <= (-7.4d+31)) then
tmp = t_9
else if (x1 <= 7.5d+28) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (t_7 + (x1 * ((t_0 - (t_4 - ((x2 * 6.0d0) + (x2 * 8.0d0)))) - 6.0d0)))))
else if (x1 <= 5d+97) then
tmp = t_9
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * (t_4 - (x1 * 3.0d0))) + (4.0d0 * t_1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 2.0 * (3.0 + (x2 * -4.0));
double t_1 = x2 * (3.0 - (2.0 * x2));
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0);
double t_4 = 3.0 * ((x2 * -2.0) - 3.0);
double t_5 = 3.0 + (x2 * -2.0);
double t_6 = x2 * t_5;
double t_7 = -4.0 * t_6;
double t_8 = -1.0 - (x1 * x1);
double t_9 = x1 + ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_8)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) + ((((x1 * x1) * (6.0 - (t_3 * 4.0))) + ((t_3 - 3.0) * ((x1 * 2.0) * ((1.0 / x1) - 3.0)))) * t_8)))));
double tmp;
if (x1 <= -5.7e+102) {
tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_4 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_7 + (2.0 * ((1.0 + ((-3.0 * t_5) + (2.0 * t_1))) - (-2.0 * t_6)))) - 3.0))))) - t_0))) - t_7) - -1.0));
} else if (x1 <= -7.4e+31) {
tmp = t_9;
} else if (x1 <= 7.5e+28) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (t_7 + (x1 * ((t_0 - (t_4 - ((x2 * 6.0) + (x2 * 8.0)))) - 6.0)))));
} else if (x1 <= 5e+97) {
tmp = t_9;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_4 - (x1 * 3.0))) + (4.0 * t_1)))));
}
return tmp;
}
def code(x1, x2): t_0 = 2.0 * (3.0 + (x2 * -4.0)) t_1 = x2 * (3.0 - (2.0 * x2)) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0) t_4 = 3.0 * ((x2 * -2.0) - 3.0) t_5 = 3.0 + (x2 * -2.0) t_6 = x2 * t_5 t_7 = -4.0 * t_6 t_8 = -1.0 - (x1 * x1) t_9 = x1 + ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_8)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) + ((((x1 * x1) * (6.0 - (t_3 * 4.0))) + ((t_3 - 3.0) * ((x1 * 2.0) * ((1.0 / x1) - 3.0)))) * t_8))))) tmp = 0 if x1 <= -5.7e+102: tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_4 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_7 + (2.0 * ((1.0 + ((-3.0 * t_5) + (2.0 * t_1))) - (-2.0 * t_6)))) - 3.0))))) - t_0))) - t_7) - -1.0)) elif x1 <= -7.4e+31: tmp = t_9 elif x1 <= 7.5e+28: tmp = (x2 * -6.0) + (x1 * (-1.0 + (t_7 + (x1 * ((t_0 - (t_4 - ((x2 * 6.0) + (x2 * 8.0)))) - 6.0))))) elif x1 <= 5e+97: tmp = t_9 else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_4 - (x1 * 3.0))) + (4.0 * t_1))))) return tmp
function code(x1, x2) t_0 = Float64(2.0 * Float64(3.0 + Float64(x2 * -4.0))) t_1 = Float64(x2 * Float64(3.0 - Float64(2.0 * x2))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0)) t_4 = Float64(3.0 * Float64(Float64(x2 * -2.0) - 3.0)) t_5 = Float64(3.0 + Float64(x2 * -2.0)) t_6 = Float64(x2 * t_5) t_7 = Float64(-4.0 * t_6) t_8 = Float64(-1.0 - Float64(x1 * x1)) t_9 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_2 - Float64(2.0 * x2))) / t_8)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_2) + Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_3 * 4.0))) + Float64(Float64(t_3 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(1.0 / x1) - 3.0)))) * t_8)))))) tmp = 0.0 if (x1 <= -5.7e+102) tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(t_4 - Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_7 + Float64(2.0 * Float64(Float64(1.0 + Float64(Float64(-3.0 * t_5) + Float64(2.0 * t_1))) - Float64(-2.0 * t_6)))) - 3.0))))) - t_0))) - t_7) - -1.0))); elseif (x1 <= -7.4e+31) tmp = t_9; elseif (x1 <= 7.5e+28) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(t_7 + Float64(x1 * Float64(Float64(t_0 - Float64(t_4 - Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0)))) - 6.0)))))); elseif (x1 <= 5e+97) tmp = t_9; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(t_4 - Float64(x1 * 3.0))) + Float64(4.0 * t_1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 2.0 * (3.0 + (x2 * -4.0)); t_1 = x2 * (3.0 - (2.0 * x2)); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0); t_4 = 3.0 * ((x2 * -2.0) - 3.0); t_5 = 3.0 + (x2 * -2.0); t_6 = x2 * t_5; t_7 = -4.0 * t_6; t_8 = -1.0 - (x1 * x1); t_9 = x1 + ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / t_8)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) + ((((x1 * x1) * (6.0 - (t_3 * 4.0))) + ((t_3 - 3.0) * ((x1 * 2.0) * ((1.0 / x1) - 3.0)))) * t_8))))); tmp = 0.0; if (x1 <= -5.7e+102) tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_4 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_7 + (2.0 * ((1.0 + ((-3.0 * t_5) + (2.0 * t_1))) - (-2.0 * t_6)))) - 3.0))))) - t_0))) - t_7) - -1.0)); elseif (x1 <= -7.4e+31) tmp = t_9; elseif (x1 <= 7.5e+28) tmp = (x2 * -6.0) + (x1 * (-1.0 + (t_7 + (x1 * ((t_0 - (t_4 - ((x2 * 6.0) + (x2 * 8.0)))) - 6.0))))); elseif (x1 <= 5e+97) tmp = t_9; else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_4 - (x1 * 3.0))) + (4.0 * t_1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(2.0 * N[(3.0 + N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * N[(3.0 - N[(2.0 * x2), $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] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x2 * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(-4.0 * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$8), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$2), $MachinePrecision] + N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$3 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(1.0 / x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.7e+102], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(N[(N[(x1 * N[(6.0 + N[(N[(t$95$4 - N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$7 + N[(2.0 * N[(N[(1.0 + N[(N[(-3.0 * t$95$5), $MachinePrecision] + N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-2.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$7), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -7.4e+31], t$95$9, If[LessEqual[x1, 7.5e+28], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(t$95$7 + N[(x1 * N[(N[(t$95$0 - N[(t$95$4 - N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+97], t$95$9, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(x1 * N[(t$95$4 - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(3 + x2 \cdot -4\right)\\
t_1 := x2 \cdot \left(3 - 2 \cdot x2\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\\
t_4 := 3 \cdot \left(x2 \cdot -2 - 3\right)\\
t_5 := 3 + x2 \cdot -2\\
t_6 := x2 \cdot t\_5\\
t_7 := -4 \cdot t\_6\\
t_8 := -1 - x1 \cdot x1\\
t_9 := x1 + \left(3 \cdot \frac{x1 - \left(t\_2 - 2 \cdot x2\right)}{t\_8} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_2 + \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_3 \cdot 4\right) + \left(t\_3 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(\frac{1}{x1} - 3\right)\right)\right) \cdot t\_8\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.7 \cdot 10^{+102}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(\left(x1 \cdot \left(6 + \left(\left(t\_4 - \left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_7 + 2 \cdot \left(\left(1 + \left(-3 \cdot t\_5 + 2 \cdot t\_1\right)\right) - -2 \cdot t\_6\right)\right) - 3\right)\right)\right)\right) - t\_0\right)\right) - t\_7\right) - -1\right)\\
\mathbf{elif}\;x1 \leq -7.4 \cdot 10^{+31}:\\
\;\;\;\;t\_9\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{+28}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(t\_7 + x1 \cdot \left(\left(t\_0 - \left(t\_4 - \left(x2 \cdot 6 + x2 \cdot 8\right)\right)\right) - 6\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+97}:\\
\;\;\;\;t\_9\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(x1 \cdot \left(t\_4 - x1 \cdot 3\right) + 4 \cdot t\_1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.6999999999999999e102Initial program 0.0%
Simplified22.0%
Taylor expanded in x1 around 0 70.7%
if -5.6999999999999999e102 < x1 < -7.3999999999999996e31 or 7.4999999999999998e28 < x1 < 4.99999999999999999e97Initial program 99.4%
Taylor expanded in x1 around inf 91.7%
Taylor expanded in x1 around inf 91.7%
if -7.3999999999999996e31 < x1 < 7.4999999999999998e28Initial program 99.3%
Simplified88.6%
Taylor expanded in x1 around 0 82.8%
if 4.99999999999999999e97 < x1 Initial program 14.3%
Simplified14.3%
Taylor expanded in x1 around 0 6.1%
associate-*r*6.1%
fmm-def6.1%
metadata-eval6.1%
Simplified6.1%
Taylor expanded in x1 around 0 97.1%
Final simplification83.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (<= x1 -8e+59)
(* 6.0 (pow x1 4.0))
(if (<= x1 7e+44)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(- (* (* x1 x1) 6.0) (* (* (* x1 2.0) t_2) (- 3.0 t_2)))))))))
(* (pow x1 3.0) (- (* x1 6.0) 3.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -8e+59) {
tmp = 6.0 * pow(x1, 4.0);
} else if (x1 <= 7e+44) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_2) * (3.0 - t_2))))))));
} else {
tmp = pow(x1, 3.0) * ((x1 * 6.0) - 3.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if (x1 <= (-8d+59)) then
tmp = 6.0d0 * (x1 ** 4.0d0)
else if (x1 <= 7d+44) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * 6.0d0) - (((x1 * 2.0d0) * t_2) * (3.0d0 - t_2))))))))
else
tmp = (x1 ** 3.0d0) * ((x1 * 6.0d0) - 3.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -8e+59) {
tmp = 6.0 * Math.pow(x1, 4.0);
} else if (x1 <= 7e+44) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_2) * (3.0 - t_2))))))));
} else {
tmp = Math.pow(x1, 3.0) * ((x1 * 6.0) - 3.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if x1 <= -8e+59: tmp = 6.0 * math.pow(x1, 4.0) elif x1 <= 7e+44: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_2) * (3.0 - t_2)))))))) else: tmp = math.pow(x1, 3.0) * ((x1 * 6.0) - 3.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if (x1 <= -8e+59) tmp = Float64(6.0 * (x1 ^ 4.0)); elseif (x1 <= 7e+44) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * 6.0) - Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(3.0 - t_2))))))))); else tmp = Float64((x1 ^ 3.0) * Float64(Float64(x1 * 6.0) - 3.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if (x1 <= -8e+59) tmp = 6.0 * (x1 ^ 4.0); elseif (x1 <= 7e+44) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_2) * (3.0 - t_2)))))))); else tmp = (x1 ^ 3.0) * ((x1 * 6.0) - 3.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -8e+59], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7e+44], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] - N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(3.0 - t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 3.0], $MachinePrecision] * N[(N[(x1 * 6.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -8 \cdot 10^{+59}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{+44}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_2 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 - \left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(3 - t\_2\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{3} \cdot \left(x1 \cdot 6 - 3\right)\\
\end{array}
\end{array}
if x1 < -7.99999999999999977e59Initial program 22.5%
Simplified22.5%
Taylor expanded in x1 around inf 98.1%
if -7.99999999999999977e59 < x1 < 6.9999999999999998e44Initial program 99.3%
Taylor expanded in x1 around inf 95.1%
if 6.9999999999999998e44 < x1 Initial program 31.7%
Simplified31.7%
Taylor expanded in x1 around inf 97.7%
associate-*r/97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in x1 around 0 97.7%
Final simplification96.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (<= x1 -1.35e+51)
(* 6.0 (pow x1 4.0))
(if (<= x1 3e+44)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+
(* (* x1 x1) (- (* t_2 4.0) 6.0))
(* (* (* x1 2.0) (* 2.0 x2)) (- (- (* 2.0 x2) x1) 3.0)))))))))
(* (pow x1 3.0) (- (* x1 6.0) 3.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -1.35e+51) {
tmp = 6.0 * pow(x1, 4.0);
} else if (x1 <= 3e+44) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0))))))));
} else {
tmp = pow(x1, 3.0) * ((x1 * 6.0) - 3.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if (x1 <= (-1.35d+51)) then
tmp = 6.0d0 * (x1 ** 4.0d0)
else if (x1 <= 3d+44) then
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * (2.0d0 * x2)) * (((2.0d0 * x2) - x1) - 3.0d0))))))))
else
tmp = (x1 ** 3.0d0) * ((x1 * 6.0d0) - 3.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -1.35e+51) {
tmp = 6.0 * Math.pow(x1, 4.0);
} else if (x1 <= 3e+44) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0))))))));
} else {
tmp = Math.pow(x1, 3.0) * ((x1 * 6.0) - 3.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if x1 <= -1.35e+51: tmp = 6.0 * math.pow(x1, 4.0) elif x1 <= 3e+44: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))))))) else: tmp = math.pow(x1, 3.0) * ((x1 * 6.0) - 3.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if (x1 <= -1.35e+51) tmp = Float64(6.0 * (x1 ^ 4.0)); elseif (x1 <= 3e+44) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)) * Float64(Float64(Float64(2.0 * x2) - x1) - 3.0))))))))); else tmp = Float64((x1 ^ 3.0) * Float64(Float64(x1 * 6.0) - 3.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if (x1 <= -1.35e+51) tmp = 6.0 * (x1 ^ 4.0); elseif (x1 <= 3e+44) tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))))))); else tmp = (x1 ^ 3.0) * ((x1 * 6.0) - 3.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -1.35e+51], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3e+44], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 3.0], $MachinePrecision] * N[(N[(x1 * 6.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{+51}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\mathbf{elif}\;x1 \leq 3 \cdot 10^{+44}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_2 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right) \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{3} \cdot \left(x1 \cdot 6 - 3\right)\\
\end{array}
\end{array}
if x1 < -1.34999999999999996e51Initial program 23.9%
Simplified23.9%
Taylor expanded in x1 around inf 98.1%
if -1.34999999999999996e51 < x1 < 2.99999999999999987e44Initial program 99.3%
Taylor expanded in x1 around 0 90.5%
Taylor expanded in x1 around 0 92.8%
if 2.99999999999999987e44 < x1 Initial program 31.7%
Simplified31.7%
Taylor expanded in x1 around inf 97.7%
associate-*r/97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in x1 around 0 97.7%
Final simplification94.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (<= x1 -2.3e+49)
(* 6.0 (pow x1 4.0))
(if (<= x1 6.5e+42)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+
(* (* x1 x1) (- (* t_2 4.0) 6.0))
(* (* (* x1 2.0) (* 2.0 x2)) (- (- (* 2.0 x2) x1) 3.0)))))))))
(* (pow x1 3.0) (* x1 6.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -2.3e+49) {
tmp = 6.0 * pow(x1, 4.0);
} else if (x1 <= 6.5e+42) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0))))))));
} else {
tmp = pow(x1, 3.0) * (x1 * 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if (x1 <= (-2.3d+49)) then
tmp = 6.0d0 * (x1 ** 4.0d0)
else if (x1 <= 6.5d+42) then
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * (2.0d0 * x2)) * (((2.0d0 * x2) - x1) - 3.0d0))))))))
else
tmp = (x1 ** 3.0d0) * (x1 * 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -2.3e+49) {
tmp = 6.0 * Math.pow(x1, 4.0);
} else if (x1 <= 6.5e+42) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0))))))));
} else {
tmp = Math.pow(x1, 3.0) * (x1 * 6.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if x1 <= -2.3e+49: tmp = 6.0 * math.pow(x1, 4.0) elif x1 <= 6.5e+42: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))))))) else: tmp = math.pow(x1, 3.0) * (x1 * 6.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if (x1 <= -2.3e+49) tmp = Float64(6.0 * (x1 ^ 4.0)); elseif (x1 <= 6.5e+42) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)) * Float64(Float64(Float64(2.0 * x2) - x1) - 3.0))))))))); else tmp = Float64((x1 ^ 3.0) * Float64(x1 * 6.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if (x1 <= -2.3e+49) tmp = 6.0 * (x1 ^ 4.0); elseif (x1 <= 6.5e+42) tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))))))); else tmp = (x1 ^ 3.0) * (x1 * 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -2.3e+49], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.5e+42], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 3.0], $MachinePrecision] * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -2.3 \cdot 10^{+49}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{+42}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_2 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right) \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{3} \cdot \left(x1 \cdot 6\right)\\
\end{array}
\end{array}
if x1 < -2.30000000000000002e49Initial program 23.9%
Simplified23.9%
Taylor expanded in x1 around inf 98.1%
if -2.30000000000000002e49 < x1 < 6.50000000000000052e42Initial program 99.3%
Taylor expanded in x1 around 0 90.5%
Taylor expanded in x1 around 0 92.8%
if 6.50000000000000052e42 < x1 Initial program 31.7%
Simplified31.7%
Taylor expanded in x1 around inf 97.7%
associate-*r/97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in x1 around 0 97.7%
Taylor expanded in x1 around inf 97.7%
*-commutative97.7%
Simplified97.7%
Final simplification94.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -3.1e+50) (not (<= x1 2.8e+53)))
(* 6.0 (pow x1 4.0))
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+
(* (* x1 x1) (- (* t_2 4.0) 6.0))
(* (* (* x1 2.0) (* 2.0 x2)) (- (- (* 2.0 x2) x1) 3.0))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -3.1e+50) || !(x1 <= 2.8e+53)) {
tmp = 6.0 * pow(x1, 4.0);
} else {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-3.1d+50)) .or. (.not. (x1 <= 2.8d+53))) then
tmp = 6.0d0 * (x1 ** 4.0d0)
else
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * (2.0d0 * x2)) * (((2.0d0 * x2) - x1) - 3.0d0))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -3.1e+50) || !(x1 <= 2.8e+53)) {
tmp = 6.0 * Math.pow(x1, 4.0);
} else {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -3.1e+50) or not (x1 <= 2.8e+53): tmp = 6.0 * math.pow(x1, 4.0) else: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -3.1e+50) || !(x1 <= 2.8e+53)) tmp = Float64(6.0 * (x1 ^ 4.0)); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)) * Float64(Float64(Float64(2.0 * x2) - x1) - 3.0))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -3.1e+50) || ~((x1 <= 2.8e+53))) tmp = 6.0 * (x1 ^ 4.0); else tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -3.1e+50], N[Not[LessEqual[x1, 2.8e+53]], $MachinePrecision]], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -3.1 \cdot 10^{+50} \lor \neg \left(x1 \leq 2.8 \cdot 10^{+53}\right):\\
\;\;\;\;6 \cdot {x1}^{4}\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_2 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right) \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -3.10000000000000003e50 or 2.8e53 < x1 Initial program 25.1%
Simplified25.1%
Taylor expanded in x1 around inf 98.9%
if -3.10000000000000003e50 < x1 < 2.8e53Initial program 99.3%
Taylor expanded in x1 around 0 88.9%
Taylor expanded in x1 around 0 92.3%
Final simplification94.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x2 (- 3.0 (* 2.0 x2))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0))
(t_4 (* 3.0 (- (* x2 -2.0) 3.0)))
(t_5 (+ 3.0 (* x2 -2.0)))
(t_6 (* x2 t_5))
(t_7 (* -4.0 t_6)))
(if (<= x1 -4.6e+102)
(-
(* x2 -6.0)
(*
x1
(-
(-
(*
x1
(+
6.0
(-
(-
t_4
(+
(* x2 6.0)
(+
(* x2 8.0)
(*
x1
(-
(+
t_7
(*
2.0
(- (+ 1.0 (+ (* -3.0 t_5) (* 2.0 t_1))) (* -2.0 t_6))))
3.0)))))
(* 2.0 (+ 3.0 (* x2 -4.0))))))
t_7)
-1.0)))
(if (<= x1 5.6e+94)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_2 (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 t_3)
(*
t_0
(+
(* (* x1 x1) (- (* t_3 4.0) 6.0))
(* (* (* x1 2.0) (* 2.0 x2)) (- (- (* 2.0 x2) x1) 3.0)))))))))
(+
x1
(-
(* x2 -6.0)
(* x1 (+ 2.0 (+ (* x1 (- t_4 (* x1 3.0))) (* 4.0 t_1))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x2 * (3.0 - (2.0 * x2));
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = 3.0 * ((x2 * -2.0) - 3.0);
double t_5 = 3.0 + (x2 * -2.0);
double t_6 = x2 * t_5;
double t_7 = -4.0 * t_6;
double tmp;
if (x1 <= -4.6e+102) {
tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_4 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_7 + (2.0 * ((1.0 + ((-3.0 * t_5) + (2.0 * t_1))) - (-2.0 * t_6)))) - 3.0))))) - (2.0 * (3.0 + (x2 * -4.0)))))) - t_7) - -1.0));
} else if (x1 <= 5.6e+94) {
tmp = x1 + ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0))))))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_4 - (x1 * 3.0))) + (4.0 * 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) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x2 * (3.0d0 - (2.0d0 * x2))
t_2 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
t_4 = 3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)
t_5 = 3.0d0 + (x2 * (-2.0d0))
t_6 = x2 * t_5
t_7 = (-4.0d0) * t_6
if (x1 <= (-4.6d+102)) then
tmp = (x2 * (-6.0d0)) - (x1 * (((x1 * (6.0d0 + ((t_4 - ((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_7 + (2.0d0 * ((1.0d0 + (((-3.0d0) * t_5) + (2.0d0 * t_1))) - ((-2.0d0) * t_6)))) - 3.0d0))))) - (2.0d0 * (3.0d0 + (x2 * (-4.0d0))))))) - t_7) - (-1.0d0)))
else if (x1 <= 5.6d+94) then
tmp = x1 + ((3.0d0 * ((x1 - (t_2 - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_0 * (((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * (2.0d0 * x2)) * (((2.0d0 * x2) - x1) - 3.0d0))))))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * (t_4 - (x1 * 3.0d0))) + (4.0d0 * 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 = x2 * (3.0 - (2.0 * x2));
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = 3.0 * ((x2 * -2.0) - 3.0);
double t_5 = 3.0 + (x2 * -2.0);
double t_6 = x2 * t_5;
double t_7 = -4.0 * t_6;
double tmp;
if (x1 <= -4.6e+102) {
tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_4 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_7 + (2.0 * ((1.0 + ((-3.0 * t_5) + (2.0 * t_1))) - (-2.0 * t_6)))) - 3.0))))) - (2.0 * (3.0 + (x2 * -4.0)))))) - t_7) - -1.0));
} else if (x1 <= 5.6e+94) {
tmp = x1 + ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0))))))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_4 - (x1 * 3.0))) + (4.0 * t_1)))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x2 * (3.0 - (2.0 * x2)) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0 t_4 = 3.0 * ((x2 * -2.0) - 3.0) t_5 = 3.0 + (x2 * -2.0) t_6 = x2 * t_5 t_7 = -4.0 * t_6 tmp = 0 if x1 <= -4.6e+102: tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_4 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_7 + (2.0 * ((1.0 + ((-3.0 * t_5) + (2.0 * t_1))) - (-2.0 * t_6)))) - 3.0))))) - (2.0 * (3.0 + (x2 * -4.0)))))) - t_7) - -1.0)) elif x1 <= 5.6e+94: tmp = x1 + ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))))))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_4 - (x1 * 3.0))) + (4.0 * t_1))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x2 * Float64(3.0 - Float64(2.0 * x2))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) t_4 = Float64(3.0 * Float64(Float64(x2 * -2.0) - 3.0)) t_5 = Float64(3.0 + Float64(x2 * -2.0)) t_6 = Float64(x2 * t_5) t_7 = Float64(-4.0 * t_6) tmp = 0.0 if (x1 <= -4.6e+102) tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(t_4 - Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_7 + Float64(2.0 * Float64(Float64(1.0 + Float64(Float64(-3.0 * t_5) + Float64(2.0 * t_1))) - Float64(-2.0 * t_6)))) - 3.0))))) - Float64(2.0 * Float64(3.0 + Float64(x2 * -4.0)))))) - t_7) - -1.0))); elseif (x1 <= 5.6e+94) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_2 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * t_3) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)) * Float64(Float64(Float64(2.0 * x2) - x1) - 3.0))))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(t_4 - Float64(x1 * 3.0))) + Float64(4.0 * t_1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x2 * (3.0 - (2.0 * x2)); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0; t_4 = 3.0 * ((x2 * -2.0) - 3.0); t_5 = 3.0 + (x2 * -2.0); t_6 = x2 * t_5; t_7 = -4.0 * t_6; tmp = 0.0; if (x1 <= -4.6e+102) tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_4 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_7 + (2.0 * ((1.0 + ((-3.0 * t_5) + (2.0 * t_1))) - (-2.0 * t_6)))) - 3.0))))) - (2.0 * (3.0 + (x2 * -4.0)))))) - t_7) - -1.0)); elseif (x1 <= 5.6e+94) tmp = x1 + ((3.0 * ((x1 - (t_2 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))))))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_4 - (x1 * 3.0))) + (4.0 * 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[(x2 * N[(3.0 - N[(2.0 * x2), $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[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x2 * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(-4.0 * t$95$6), $MachinePrecision]}, If[LessEqual[x1, -4.6e+102], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(N[(N[(x1 * N[(6.0 + N[(N[(t$95$4 - N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$7 + N[(2.0 * N[(N[(1.0 + N[(N[(-3.0 * t$95$5), $MachinePrecision] + N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-2.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(3.0 + N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$7), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.6e+94], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * t$95$3), $MachinePrecision] + N[(t$95$0 * 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] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(x1 * N[(t$95$4 - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x2 \cdot \left(3 - 2 \cdot x2\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_0}\\
t_4 := 3 \cdot \left(x2 \cdot -2 - 3\right)\\
t_5 := 3 + x2 \cdot -2\\
t_6 := x2 \cdot t\_5\\
t_7 := -4 \cdot t\_6\\
\mathbf{if}\;x1 \leq -4.6 \cdot 10^{+102}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(\left(x1 \cdot \left(6 + \left(\left(t\_4 - \left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_7 + 2 \cdot \left(\left(1 + \left(-3 \cdot t\_5 + 2 \cdot t\_1\right)\right) - -2 \cdot t\_6\right)\right) - 3\right)\right)\right)\right) - 2 \cdot \left(3 + x2 \cdot -4\right)\right)\right) - t\_7\right) - -1\right)\\
\mathbf{elif}\;x1 \leq 5.6 \cdot 10^{+94}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_2 - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_2 \cdot t\_3 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right) \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(x1 \cdot \left(t\_4 - x1 \cdot 3\right) + 4 \cdot t\_1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5999999999999998e102Initial program 2.4%
Simplified23.8%
Taylor expanded in x1 around 0 71.4%
if -4.5999999999999998e102 < x1 < 5.59999999999999997e94Initial program 99.3%
Taylor expanded in x1 around 0 82.1%
Taylor expanded in x1 around 0 91.6%
if 5.59999999999999997e94 < x1 Initial program 18.9%
Simplified18.9%
Taylor expanded in x1 around 0 6.1%
associate-*r*6.1%
fmm-def6.1%
metadata-eval6.1%
Simplified6.1%
Taylor expanded in x1 around 0 92.4%
Final simplification88.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 3.0 (* x2 -2.0)))
(t_1 (* x2 t_0))
(t_2 (* -4.0 t_1))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (* 3.0 (- 3.0 (* x2 -2.0))))
(t_5 (* x1 (* x1 3.0)))
(t_6 (/ (- (+ t_5 (* 2.0 x2)) x1) t_3)))
(if (<= x1 -5.7e+102)
(+
(* x2 -6.0)
(*
x1
(+
-1.0
(+
t_2
(*
x1
(-
(+
(* 2.0 (+ 3.0 (* x2 -4.0)))
(+
t_4
(+
(* x2 6.0)
(+
(* x2 8.0)
(*
x1
(-
(+
t_2
(*
2.0
(-
(+ 1.0 (+ (* -3.0 t_0) (* 2.0 (* x2 (- 3.0 (* 2.0 x2))))))
(* -2.0 t_1))))
3.0))))))
6.0))))))
(if (<= x1 -8e+24)
(+
x1
(+
(* 3.0 (/ (- (- t_5 (* 2.0 x2)) x1) t_3))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_5 t_6)
(*
t_3
(-
(* (* x1 x1) 6.0)
(* (* (* x1 2.0) (+ 3.0 (/ -1.0 x1))) (- 3.0 t_6)))))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* x1 (+ (* x1 3.0) t_4)))
2.0))))))))
double code(double x1, double x2) {
double t_0 = 3.0 + (x2 * -2.0);
double t_1 = x2 * t_0;
double t_2 = -4.0 * t_1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 * (3.0 - (x2 * -2.0));
double t_5 = x1 * (x1 * 3.0);
double t_6 = ((t_5 + (2.0 * x2)) - x1) / t_3;
double tmp;
if (x1 <= -5.7e+102) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (t_2 + (x1 * (((2.0 * (3.0 + (x2 * -4.0))) + (t_4 + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_2 + (2.0 * ((1.0 + ((-3.0 * t_0) + (2.0 * (x2 * (3.0 - (2.0 * x2)))))) - (-2.0 * t_1)))) - 3.0)))))) - 6.0)))));
} else if (x1 <= -8e+24) {
tmp = x1 + ((3.0 * (((t_5 - (2.0 * x2)) - x1) / t_3)) + (x1 + ((x1 * (x1 * x1)) + ((t_5 * t_6) + (t_3 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * (3.0 + (-1.0 / x1))) * (3.0 - t_6))))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + t_4))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = 3.0d0 + (x2 * (-2.0d0))
t_1 = x2 * t_0
t_2 = (-4.0d0) * t_1
t_3 = (x1 * x1) + 1.0d0
t_4 = 3.0d0 * (3.0d0 - (x2 * (-2.0d0)))
t_5 = x1 * (x1 * 3.0d0)
t_6 = ((t_5 + (2.0d0 * x2)) - x1) / t_3
if (x1 <= (-5.7d+102)) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (t_2 + (x1 * (((2.0d0 * (3.0d0 + (x2 * (-4.0d0)))) + (t_4 + ((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_2 + (2.0d0 * ((1.0d0 + (((-3.0d0) * t_0) + (2.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))))) - ((-2.0d0) * t_1)))) - 3.0d0)))))) - 6.0d0)))))
else if (x1 <= (-8d+24)) then
tmp = x1 + ((3.0d0 * (((t_5 - (2.0d0 * x2)) - x1) / t_3)) + (x1 + ((x1 * (x1 * x1)) + ((t_5 * t_6) + (t_3 * (((x1 * x1) * 6.0d0) - (((x1 * 2.0d0) * (3.0d0 + ((-1.0d0) / x1))) * (3.0d0 - t_6))))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * ((x1 * 3.0d0) + t_4))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 + (x2 * -2.0);
double t_1 = x2 * t_0;
double t_2 = -4.0 * t_1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 * (3.0 - (x2 * -2.0));
double t_5 = x1 * (x1 * 3.0);
double t_6 = ((t_5 + (2.0 * x2)) - x1) / t_3;
double tmp;
if (x1 <= -5.7e+102) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (t_2 + (x1 * (((2.0 * (3.0 + (x2 * -4.0))) + (t_4 + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_2 + (2.0 * ((1.0 + ((-3.0 * t_0) + (2.0 * (x2 * (3.0 - (2.0 * x2)))))) - (-2.0 * t_1)))) - 3.0)))))) - 6.0)))));
} else if (x1 <= -8e+24) {
tmp = x1 + ((3.0 * (((t_5 - (2.0 * x2)) - x1) / t_3)) + (x1 + ((x1 * (x1 * x1)) + ((t_5 * t_6) + (t_3 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * (3.0 + (-1.0 / x1))) * (3.0 - t_6))))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + t_4))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 + (x2 * -2.0) t_1 = x2 * t_0 t_2 = -4.0 * t_1 t_3 = (x1 * x1) + 1.0 t_4 = 3.0 * (3.0 - (x2 * -2.0)) t_5 = x1 * (x1 * 3.0) t_6 = ((t_5 + (2.0 * x2)) - x1) / t_3 tmp = 0 if x1 <= -5.7e+102: tmp = (x2 * -6.0) + (x1 * (-1.0 + (t_2 + (x1 * (((2.0 * (3.0 + (x2 * -4.0))) + (t_4 + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_2 + (2.0 * ((1.0 + ((-3.0 * t_0) + (2.0 * (x2 * (3.0 - (2.0 * x2)))))) - (-2.0 * t_1)))) - 3.0)))))) - 6.0))))) elif x1 <= -8e+24: tmp = x1 + ((3.0 * (((t_5 - (2.0 * x2)) - x1) / t_3)) + (x1 + ((x1 * (x1 * x1)) + ((t_5 * t_6) + (t_3 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * (3.0 + (-1.0 / x1))) * (3.0 - t_6)))))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + t_4))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(3.0 + Float64(x2 * -2.0)) t_1 = Float64(x2 * t_0) t_2 = Float64(-4.0 * t_1) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0))) t_5 = Float64(x1 * Float64(x1 * 3.0)) t_6 = Float64(Float64(Float64(t_5 + Float64(2.0 * x2)) - x1) / t_3) tmp = 0.0 if (x1 <= -5.7e+102) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(t_2 + Float64(x1 * Float64(Float64(Float64(2.0 * Float64(3.0 + Float64(x2 * -4.0))) + Float64(t_4 + Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_2 + Float64(2.0 * Float64(Float64(1.0 + Float64(Float64(-3.0 * t_0) + Float64(2.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))) - Float64(-2.0 * t_1)))) - 3.0)))))) - 6.0)))))); elseif (x1 <= -8e+24) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_5 - Float64(2.0 * x2)) - x1) / t_3)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_5 * t_6) + Float64(t_3 * Float64(Float64(Float64(x1 * x1) * 6.0) - Float64(Float64(Float64(x1 * 2.0) * Float64(3.0 + Float64(-1.0 / x1))) * Float64(3.0 - t_6))))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(Float64(x1 * 3.0) + t_4))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 + (x2 * -2.0); t_1 = x2 * t_0; t_2 = -4.0 * t_1; t_3 = (x1 * x1) + 1.0; t_4 = 3.0 * (3.0 - (x2 * -2.0)); t_5 = x1 * (x1 * 3.0); t_6 = ((t_5 + (2.0 * x2)) - x1) / t_3; tmp = 0.0; if (x1 <= -5.7e+102) tmp = (x2 * -6.0) + (x1 * (-1.0 + (t_2 + (x1 * (((2.0 * (3.0 + (x2 * -4.0))) + (t_4 + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_2 + (2.0 * ((1.0 + ((-3.0 * t_0) + (2.0 * (x2 * (3.0 - (2.0 * x2)))))) - (-2.0 * t_1)))) - 3.0)))))) - 6.0))))); elseif (x1 <= -8e+24) tmp = x1 + ((3.0 * (((t_5 - (2.0 * x2)) - x1) / t_3)) + (x1 + ((x1 * (x1 * x1)) + ((t_5 * t_6) + (t_3 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * (3.0 + (-1.0 / x1))) * (3.0 - t_6)))))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + t_4))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $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$3), $MachinePrecision]}, If[LessEqual[x1, -5.7e+102], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(t$95$2 + N[(x1 * N[(N[(N[(2.0 * N[(3.0 + N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 + N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$2 + N[(2.0 * N[(N[(1.0 + N[(N[(-3.0 * t$95$0), $MachinePrecision] + N[(2.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -8e+24], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$5 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$5 * t$95$6), $MachinePrecision] + N[(t$95$3 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] - N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(3.0 - t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 + x2 \cdot -2\\
t_1 := x2 \cdot t\_0\\
t_2 := -4 \cdot t\_1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := 3 \cdot \left(3 - x2 \cdot -2\right)\\
t_5 := x1 \cdot \left(x1 \cdot 3\right)\\
t_6 := \frac{\left(t\_5 + 2 \cdot x2\right) - x1}{t\_3}\\
\mathbf{if}\;x1 \leq -5.7 \cdot 10^{+102}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(t\_2 + x1 \cdot \left(\left(2 \cdot \left(3 + x2 \cdot -4\right) + \left(t\_4 + \left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_2 + 2 \cdot \left(\left(1 + \left(-3 \cdot t\_0 + 2 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right) - -2 \cdot t\_1\right)\right) - 3\right)\right)\right)\right)\right) - 6\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -8 \cdot 10^{+24}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_5 - 2 \cdot x2\right) - x1}{t\_3} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_5 \cdot t\_6 + t\_3 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 - \left(\left(x1 \cdot 2\right) \cdot \left(3 + \frac{-1}{x1}\right)\right) \cdot \left(3 - t\_6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot 3 + t\_4\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.6999999999999999e102Initial program 0.0%
Simplified22.0%
Taylor expanded in x1 around 0 70.7%
if -5.6999999999999999e102 < x1 < -7.9999999999999999e24Initial program 99.2%
Taylor expanded in x1 around inf 93.0%
Taylor expanded in x1 around inf 87.9%
if -7.9999999999999999e24 < x1 Initial program 84.4%
Simplified84.6%
Taylor expanded in x1 around 0 65.8%
associate-*r*73.3%
fmm-def73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in x1 around 0 80.9%
Final simplification79.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x2 (- 3.0 (* 2.0 x2))))
(t_1 (* 3.0 (- (* x2 -2.0) 3.0)))
(t_2 (+ 3.0 (* x2 -2.0)))
(t_3 (* x2 t_2))
(t_4 (* -4.0 t_3)))
(if (<= x1 -1.05e+35)
(-
(* x2 -6.0)
(*
x1
(-
(-
(*
x1
(+
6.0
(-
(-
t_1
(+
(* x2 6.0)
(+
(* x2 8.0)
(*
x1
(-
(+
t_4
(*
2.0
(- (+ 1.0 (+ (* -3.0 t_2) (* 2.0 t_0))) (* -2.0 t_3))))
3.0)))))
(* 2.0 (+ 3.0 (* x2 -4.0))))))
t_4)
-1.0)))
(+
x1
(-
(* x2 -6.0)
(* x1 (+ 2.0 (+ (* x1 (- t_1 (* x1 3.0))) (* 4.0 t_0)))))))))
double code(double x1, double x2) {
double t_0 = x2 * (3.0 - (2.0 * x2));
double t_1 = 3.0 * ((x2 * -2.0) - 3.0);
double t_2 = 3.0 + (x2 * -2.0);
double t_3 = x2 * t_2;
double t_4 = -4.0 * t_3;
double tmp;
if (x1 <= -1.05e+35) {
tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_1 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (2.0 * ((1.0 + ((-3.0 * t_2) + (2.0 * t_0))) - (-2.0 * t_3)))) - 3.0))))) - (2.0 * (3.0 + (x2 * -4.0)))))) - t_4) - -1.0));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_1 - (x1 * 3.0))) + (4.0 * t_0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x2 * (3.0d0 - (2.0d0 * x2))
t_1 = 3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)
t_2 = 3.0d0 + (x2 * (-2.0d0))
t_3 = x2 * t_2
t_4 = (-4.0d0) * t_3
if (x1 <= (-1.05d+35)) then
tmp = (x2 * (-6.0d0)) - (x1 * (((x1 * (6.0d0 + ((t_1 - ((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_4 + (2.0d0 * ((1.0d0 + (((-3.0d0) * t_2) + (2.0d0 * t_0))) - ((-2.0d0) * t_3)))) - 3.0d0))))) - (2.0d0 * (3.0d0 + (x2 * (-4.0d0))))))) - t_4) - (-1.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * (t_1 - (x1 * 3.0d0))) + (4.0d0 * t_0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x2 * (3.0 - (2.0 * x2));
double t_1 = 3.0 * ((x2 * -2.0) - 3.0);
double t_2 = 3.0 + (x2 * -2.0);
double t_3 = x2 * t_2;
double t_4 = -4.0 * t_3;
double tmp;
if (x1 <= -1.05e+35) {
tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_1 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (2.0 * ((1.0 + ((-3.0 * t_2) + (2.0 * t_0))) - (-2.0 * t_3)))) - 3.0))))) - (2.0 * (3.0 + (x2 * -4.0)))))) - t_4) - -1.0));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_1 - (x1 * 3.0))) + (4.0 * t_0)))));
}
return tmp;
}
def code(x1, x2): t_0 = x2 * (3.0 - (2.0 * x2)) t_1 = 3.0 * ((x2 * -2.0) - 3.0) t_2 = 3.0 + (x2 * -2.0) t_3 = x2 * t_2 t_4 = -4.0 * t_3 tmp = 0 if x1 <= -1.05e+35: tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_1 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (2.0 * ((1.0 + ((-3.0 * t_2) + (2.0 * t_0))) - (-2.0 * t_3)))) - 3.0))))) - (2.0 * (3.0 + (x2 * -4.0)))))) - t_4) - -1.0)) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_1 - (x1 * 3.0))) + (4.0 * t_0))))) return tmp
function code(x1, x2) t_0 = Float64(x2 * Float64(3.0 - Float64(2.0 * x2))) t_1 = Float64(3.0 * Float64(Float64(x2 * -2.0) - 3.0)) t_2 = Float64(3.0 + Float64(x2 * -2.0)) t_3 = Float64(x2 * t_2) t_4 = Float64(-4.0 * t_3) tmp = 0.0 if (x1 <= -1.05e+35) tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(t_1 - Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_4 + Float64(2.0 * Float64(Float64(1.0 + Float64(Float64(-3.0 * t_2) + Float64(2.0 * t_0))) - Float64(-2.0 * t_3)))) - 3.0))))) - Float64(2.0 * Float64(3.0 + Float64(x2 * -4.0)))))) - t_4) - -1.0))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(t_1 - Float64(x1 * 3.0))) + Float64(4.0 * t_0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x2 * (3.0 - (2.0 * x2)); t_1 = 3.0 * ((x2 * -2.0) - 3.0); t_2 = 3.0 + (x2 * -2.0); t_3 = x2 * t_2; t_4 = -4.0 * t_3; tmp = 0.0; if (x1 <= -1.05e+35) tmp = (x2 * -6.0) - (x1 * (((x1 * (6.0 + ((t_1 - ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (2.0 * ((1.0 + ((-3.0 * t_2) + (2.0 * t_0))) - (-2.0 * t_3)))) - 3.0))))) - (2.0 * (3.0 + (x2 * -4.0)))))) - t_4) - -1.0)); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * (t_1 - (x1 * 3.0))) + (4.0 * t_0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x2 * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(-4.0 * t$95$3), $MachinePrecision]}, If[LessEqual[x1, -1.05e+35], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(N[(N[(x1 * N[(6.0 + N[(N[(t$95$1 - N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$4 + N[(2.0 * N[(N[(1.0 + N[(N[(-3.0 * t$95$2), $MachinePrecision] + N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-2.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(3.0 + N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(x1 * N[(t$95$1 - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot \left(3 - 2 \cdot x2\right)\\
t_1 := 3 \cdot \left(x2 \cdot -2 - 3\right)\\
t_2 := 3 + x2 \cdot -2\\
t_3 := x2 \cdot t\_2\\
t_4 := -4 \cdot t\_3\\
\mathbf{if}\;x1 \leq -1.05 \cdot 10^{+35}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(\left(x1 \cdot \left(6 + \left(\left(t\_1 - \left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_4 + 2 \cdot \left(\left(1 + \left(-3 \cdot t\_2 + 2 \cdot t\_0\right)\right) - -2 \cdot t\_3\right)\right) - 3\right)\right)\right)\right) - 2 \cdot \left(3 + x2 \cdot -4\right)\right)\right) - t\_4\right) - -1\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(x1 \cdot \left(t\_1 - x1 \cdot 3\right) + 4 \cdot t\_0\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.0499999999999999e35Initial program 25.3%
Simplified41.7%
Taylor expanded in x1 around 0 57.7%
if -1.0499999999999999e35 < x1 Initial program 84.5%
Simplified84.8%
Taylor expanded in x1 around 0 65.6%
associate-*r*73.1%
fmm-def73.1%
metadata-eval73.1%
Simplified73.1%
Taylor expanded in x1 around 0 80.6%
Final simplification75.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (- 3.0 (* x2 -2.0)))
(t_2 (- 3.0 (* 2.0 x2)))
(t_3 (* 4.0 (* x2 t_0))))
(if (<= x1 -1.35e+154)
(+ x1 (+ (* x2 -6.0) (* x1 (- (+ t_3 (* 3.0 (* x1 t_1))) 2.0))))
(if (<= x1 -3.05e+25)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+
x1
(*
x1
(-
(+
(* 2.0 (+ 1.0 (* 3.0 t_0)))
(*
x1
(+
(* x2 6.0)
(*
x1
(- (- (* 3.0 (* x1 t_2)) (* 2.0 (+ -1.0 (* 3.0 t_2)))) 6.0)))))
4.0)))))
(+
x1
(+
(* x2 -6.0)
(* x1 (- (+ t_3 (* x1 (+ (* x1 3.0) (* 3.0 t_1)))) 2.0))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 3.0 - (x2 * -2.0);
double t_2 = 3.0 - (2.0 * x2);
double t_3 = 4.0 * (x2 * t_0);
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((t_3 + (3.0 * (x1 * t_1))) - 2.0)));
} else if (x1 <= -3.05e+25) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (((2.0 * (1.0 + (3.0 * t_0))) + (x1 * ((x2 * 6.0) + (x1 * (((3.0 * (x1 * t_2)) - (2.0 * (-1.0 + (3.0 * t_2)))) - 6.0))))) - 4.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((t_3 + (x1 * ((x1 * 3.0) + (3.0 * t_1)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = 3.0d0 - (x2 * (-2.0d0))
t_2 = 3.0d0 - (2.0d0 * x2)
t_3 = 4.0d0 * (x2 * t_0)
if (x1 <= (-1.35d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((t_3 + (3.0d0 * (x1 * t_1))) - 2.0d0)))
else if (x1 <= (-3.05d+25)) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (x1 * (((2.0d0 * (1.0d0 + (3.0d0 * t_0))) + (x1 * ((x2 * 6.0d0) + (x1 * (((3.0d0 * (x1 * t_2)) - (2.0d0 * ((-1.0d0) + (3.0d0 * t_2)))) - 6.0d0))))) - 4.0d0))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((t_3 + (x1 * ((x1 * 3.0d0) + (3.0d0 * t_1)))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 3.0 - (x2 * -2.0);
double t_2 = 3.0 - (2.0 * x2);
double t_3 = 4.0 * (x2 * t_0);
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((t_3 + (3.0 * (x1 * t_1))) - 2.0)));
} else if (x1 <= -3.05e+25) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (((2.0 * (1.0 + (3.0 * t_0))) + (x1 * ((x2 * 6.0) + (x1 * (((3.0 * (x1 * t_2)) - (2.0 * (-1.0 + (3.0 * t_2)))) - 6.0))))) - 4.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((t_3 + (x1 * ((x1 * 3.0) + (3.0 * t_1)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = 3.0 - (x2 * -2.0) t_2 = 3.0 - (2.0 * x2) t_3 = 4.0 * (x2 * t_0) tmp = 0 if x1 <= -1.35e+154: tmp = x1 + ((x2 * -6.0) + (x1 * ((t_3 + (3.0 * (x1 * t_1))) - 2.0))) elif x1 <= -3.05e+25: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (((2.0 * (1.0 + (3.0 * t_0))) + (x1 * ((x2 * 6.0) + (x1 * (((3.0 * (x1 * t_2)) - (2.0 * (-1.0 + (3.0 * t_2)))) - 6.0))))) - 4.0)))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((t_3 + (x1 * ((x1 * 3.0) + (3.0 * t_1)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(3.0 - Float64(x2 * -2.0)) t_2 = Float64(3.0 - Float64(2.0 * x2)) t_3 = Float64(4.0 * Float64(x2 * t_0)) tmp = 0.0 if (x1 <= -1.35e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(t_3 + Float64(3.0 * Float64(x1 * t_1))) - 2.0)))); elseif (x1 <= -3.05e+25) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(x1 * Float64(Float64(Float64(2.0 * Float64(1.0 + Float64(3.0 * t_0))) + Float64(x1 * Float64(Float64(x2 * 6.0) + Float64(x1 * Float64(Float64(Float64(3.0 * Float64(x1 * t_2)) - Float64(2.0 * Float64(-1.0 + Float64(3.0 * t_2)))) - 6.0))))) - 4.0))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(t_3 + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * t_1)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = 3.0 - (x2 * -2.0); t_2 = 3.0 - (2.0 * x2); t_3 = 4.0 * (x2 * t_0); tmp = 0.0; if (x1 <= -1.35e+154) tmp = x1 + ((x2 * -6.0) + (x1 * ((t_3 + (3.0 * (x1 * t_1))) - 2.0))); elseif (x1 <= -3.05e+25) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (((2.0 * (1.0 + (3.0 * t_0))) + (x1 * ((x2 * 6.0) + (x1 * (((3.0 * (x1 * t_2)) - (2.0 * (-1.0 + (3.0 * t_2)))) - 6.0))))) - 4.0)))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((t_3 + (x1 * ((x1 * 3.0) + (3.0 * t_1)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.35e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$3 + N[(3.0 * N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.05e+25], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(N[(N[(2.0 * N[(1.0 + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x2 * 6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(3.0 * N[(x1 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(-1.0 + N[(3.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$3 + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := 3 - x2 \cdot -2\\
t_2 := 3 - 2 \cdot x2\\
t_3 := 4 \cdot \left(x2 \cdot t\_0\right)\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(t\_3 + 3 \cdot \left(x1 \cdot t\_1\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -3.05 \cdot 10^{+25}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + x1 \cdot \left(\left(2 \cdot \left(1 + 3 \cdot t\_0\right) + x1 \cdot \left(x2 \cdot 6 + x1 \cdot \left(\left(3 \cdot \left(x1 \cdot t\_2\right) - 2 \cdot \left(-1 + 3 \cdot t\_2\right)\right) - 6\right)\right)\right) - 4\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(t\_3 + x1 \cdot \left(x1 \cdot 3 + 3 \cdot t\_1\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.35000000000000003e154Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
associate-*r*0.0%
fmm-def0.0%
metadata-eval0.0%
Simplified0.0%
Taylor expanded in x1 around 0 65.6%
if -1.35000000000000003e154 < x1 < -3.0500000000000001e25Initial program 63.5%
Taylor expanded in x1 around 0 12.5%
Taylor expanded in x1 around inf 15.4%
Taylor expanded in x1 around 0 53.9%
if -3.0500000000000001e25 < x1 Initial program 84.4%
Simplified84.6%
Taylor expanded in x1 around 0 65.8%
associate-*r*73.3%
fmm-def73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in x1 around 0 80.9%
Final simplification76.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* x2 -2.0) 3.0))
(t_1 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))
(t_2
(*
3.0
(/ (- x1 (- (* x1 (* x1 3.0)) (* 2.0 x2))) (- -1.0 (* x1 x1))))))
(if (<= x1 -1.22e+154)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (+ (* 3.0 (* x1 t_0)) t_1)))))
(if (<= x1 -4.5e-238)
(+
x1
(+
t_2
(+
x1
(*
x1
(+
(* 4.0 (* x2 (- (* 2.0 x2) 3.0)))
(* x1 (+ (* x1 -22.0) (* x2 (+ 6.0 (* x1 12.0))))))))))
(if (<= x1 2.2e-187)
(+ x1 (+ t_2 (+ x1 (* 12.0 (* x1 x2)))))
(+
x1
(-
(* x2 -6.0)
(* x1 (+ 2.0 (+ (* x1 (- (* 3.0 t_0) (* x1 3.0))) t_1))))))))))
double code(double x1, double x2) {
double t_0 = (x2 * -2.0) - 3.0;
double t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_2 = 3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)));
double tmp;
if (x1 <= -1.22e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1))));
} else if (x1 <= -4.5e-238) {
tmp = x1 + (t_2 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * -22.0) + (x2 * (6.0 + (x1 * 12.0)))))))));
} else if (x1 <= 2.2e-187) {
tmp = x1 + (t_2 + (x1 + (12.0 * (x1 * x2))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * t_0) - (x1 * 3.0))) + 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) :: tmp
t_0 = (x2 * (-2.0d0)) - 3.0d0
t_1 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
t_2 = 3.0d0 * ((x1 - ((x1 * (x1 * 3.0d0)) - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))
if (x1 <= (-1.22d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((3.0d0 * (x1 * t_0)) + t_1))))
else if (x1 <= (-4.5d-238)) then
tmp = x1 + (t_2 + (x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * ((x1 * (-22.0d0)) + (x2 * (6.0d0 + (x1 * 12.0d0)))))))))
else if (x1 <= 2.2d-187) then
tmp = x1 + (t_2 + (x1 + (12.0d0 * (x1 * x2))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * t_0) - (x1 * 3.0d0))) + t_1))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * -2.0) - 3.0;
double t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_2 = 3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)));
double tmp;
if (x1 <= -1.22e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1))));
} else if (x1 <= -4.5e-238) {
tmp = x1 + (t_2 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * -22.0) + (x2 * (6.0 + (x1 * 12.0)))))))));
} else if (x1 <= 2.2e-187) {
tmp = x1 + (t_2 + (x1 + (12.0 * (x1 * x2))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * t_0) - (x1 * 3.0))) + t_1))));
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * -2.0) - 3.0 t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2))) t_2 = 3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1))) tmp = 0 if x1 <= -1.22e+154: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1)))) elif x1 <= -4.5e-238: tmp = x1 + (t_2 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * -22.0) + (x2 * (6.0 + (x1 * 12.0))))))))) elif x1 <= 2.2e-187: tmp = x1 + (t_2 + (x1 + (12.0 * (x1 * x2)))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * t_0) - (x1 * 3.0))) + t_1)))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * -2.0) - 3.0) t_1 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) t_2 = Float64(3.0 * Float64(Float64(x1 - Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) tmp = 0.0 if (x1 <= -1.22e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(3.0 * Float64(x1 * t_0)) + t_1))))); elseif (x1 <= -4.5e-238) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(Float64(x1 * -22.0) + Float64(x2 * Float64(6.0 + Float64(x1 * 12.0)))))))))); elseif (x1 <= 2.2e-187) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(12.0 * Float64(x1 * x2))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(Float64(3.0 * t_0) - Float64(x1 * 3.0))) + t_1))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * -2.0) - 3.0; t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2))); t_2 = 3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1))); tmp = 0.0; if (x1 <= -1.22e+154) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1)))); elseif (x1 <= -4.5e-238) tmp = x1 + (t_2 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * -22.0) + (x2 * (6.0 + (x1 * 12.0))))))))); elseif (x1 <= 2.2e-187) tmp = x1 + (t_2 + (x1 + (12.0 * (x1 * x2)))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * t_0) - (x1 * 3.0))) + t_1)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(x1 - N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.22e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(3.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.5e-238], N[(x1 + N[(t$95$2 + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * -22.0), $MachinePrecision] + N[(x2 * N[(6.0 + N[(x1 * 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.2e-187], N[(x1 + N[(t$95$2 + N[(x1 + N[(12.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(x1 * N[(N[(3.0 * t$95$0), $MachinePrecision] - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot -2 - 3\\
t_1 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
t_2 := 3 \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right)}{-1 - x1 \cdot x1}\\
\mathbf{if}\;x1 \leq -1.22 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(3 \cdot \left(x1 \cdot t\_0\right) + t\_1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -4.5 \cdot 10^{-238}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot -22 + x2 \cdot \left(6 + x1 \cdot 12\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.2 \cdot 10^{-187}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + 12 \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(x1 \cdot \left(3 \cdot t\_0 - x1 \cdot 3\right) + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.22e154Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
associate-*r*0.0%
fmm-def0.0%
metadata-eval0.0%
Simplified0.0%
Taylor expanded in x1 around 0 65.6%
if -1.22e154 < x1 < -4.49999999999999996e-238Initial program 86.7%
Taylor expanded in x1 around 0 65.2%
Taylor expanded in x1 around 0 52.2%
Taylor expanded in x2 around 0 65.5%
if -4.49999999999999996e-238 < x1 < 2.20000000000000008e-187Initial program 99.6%
Taylor expanded in x1 around 0 99.6%
Taylor expanded in x1 around inf 87.7%
Taylor expanded in x1 around 0 87.7%
Taylor expanded in x2 around inf 96.6%
*-commutative96.6%
Simplified96.6%
if 2.20000000000000008e-187 < x1 Initial program 68.5%
Simplified68.8%
Taylor expanded in x1 around 0 46.6%
associate-*r*48.4%
fmm-def48.4%
metadata-eval48.4%
Simplified48.4%
Taylor expanded in x1 around 0 77.7%
Final simplification76.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* x2 -2.0) 3.0)) (t_1 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))
(if (<= x1 -1.35e+154)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (+ (* 3.0 (* x1 t_0)) t_1)))))
(if (<= x1 7e+89)
(+
x1
(+
(* 3.0 (/ (- x1 (- (* x1 (* x1 3.0)) (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+ x1 (* x1 (- (* x1 (* x1 -22.0)) t_1)))))
(+
x1
(-
(* x2 -6.0)
(* x1 (+ 2.0 (+ (* x1 (- (* 3.0 t_0) (* x1 3.0))) t_1)))))))))
double code(double x1, double x2) {
double t_0 = (x2 * -2.0) - 3.0;
double t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1))));
} else if (x1 <= 7e+89) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (x1 * ((x1 * (x1 * -22.0)) - t_1))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * t_0) - (x1 * 3.0))) + 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) :: tmp
t_0 = (x2 * (-2.0d0)) - 3.0d0
t_1 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
if (x1 <= (-1.35d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((3.0d0 * (x1 * t_0)) + t_1))))
else if (x1 <= 7d+89) then
tmp = x1 + ((3.0d0 * ((x1 - ((x1 * (x1 * 3.0d0)) - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + (x1 * ((x1 * (x1 * (-22.0d0))) - t_1))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * t_0) - (x1 * 3.0d0))) + t_1))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * -2.0) - 3.0;
double t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1))));
} else if (x1 <= 7e+89) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (x1 * ((x1 * (x1 * -22.0)) - t_1))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * t_0) - (x1 * 3.0))) + t_1))));
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * -2.0) - 3.0 t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2))) tmp = 0 if x1 <= -1.35e+154: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1)))) elif x1 <= 7e+89: tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (x1 * ((x1 * (x1 * -22.0)) - t_1)))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * t_0) - (x1 * 3.0))) + t_1)))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * -2.0) - 3.0) t_1 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) tmp = 0.0 if (x1 <= -1.35e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(3.0 * Float64(x1 * t_0)) + t_1))))); elseif (x1 <= 7e+89) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(x1 * -22.0)) - t_1))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(Float64(3.0 * t_0) - Float64(x1 * 3.0))) + t_1))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * -2.0) - 3.0; t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2))); tmp = 0.0; if (x1 <= -1.35e+154) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1)))); elseif (x1 <= 7e+89) tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (x1 * ((x1 * (x1 * -22.0)) - t_1)))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * t_0) - (x1 * 3.0))) + t_1)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.35e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(3.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7e+89], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(x1 * N[(N[(3.0 * t$95$0), $MachinePrecision] - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot -2 - 3\\
t_1 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(3 \cdot \left(x1 \cdot t\_0\right) + t\_1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{+89}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot -22\right) - t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(x1 \cdot \left(3 \cdot t\_0 - x1 \cdot 3\right) + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.35000000000000003e154Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
associate-*r*0.0%
fmm-def0.0%
metadata-eval0.0%
Simplified0.0%
Taylor expanded in x1 around 0 65.6%
if -1.35000000000000003e154 < x1 < 7.0000000000000001e89Initial program 94.5%
Taylor expanded in x1 around 0 78.3%
Taylor expanded in x1 around 0 61.4%
Taylor expanded in x2 around 0 73.2%
*-commutative73.2%
Simplified73.2%
if 7.0000000000000001e89 < x1 Initial program 18.9%
Simplified18.9%
Taylor expanded in x1 around 0 6.1%
associate-*r*6.1%
fmm-def6.1%
metadata-eval6.1%
Simplified6.1%
Taylor expanded in x1 around 0 92.4%
Final simplification75.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* x2 -2.0) 3.0)) (t_1 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))
(if (<= x1 -4.9e-238)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (+ (* 3.0 (* x1 t_0)) t_1)))))
(if (<= x1 2.4e-187)
(+
x1
(+
(* 3.0 (/ (- x1 (- (* x1 (* x1 3.0)) (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+ x1 (* 12.0 (* x1 x2)))))
(+
x1
(-
(* x2 -6.0)
(* x1 (+ 2.0 (+ (* x1 (- (* 3.0 t_0) (* x1 3.0))) t_1)))))))))
double code(double x1, double x2) {
double t_0 = (x2 * -2.0) - 3.0;
double t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -4.9e-238) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1))));
} else if (x1 <= 2.4e-187) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (12.0 * (x1 * x2))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * t_0) - (x1 * 3.0))) + 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) :: tmp
t_0 = (x2 * (-2.0d0)) - 3.0d0
t_1 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
if (x1 <= (-4.9d-238)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((3.0d0 * (x1 * t_0)) + t_1))))
else if (x1 <= 2.4d-187) then
tmp = x1 + ((3.0d0 * ((x1 - ((x1 * (x1 * 3.0d0)) - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + (12.0d0 * (x1 * x2))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * t_0) - (x1 * 3.0d0))) + t_1))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * -2.0) - 3.0;
double t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -4.9e-238) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1))));
} else if (x1 <= 2.4e-187) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (12.0 * (x1 * x2))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * t_0) - (x1 * 3.0))) + t_1))));
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * -2.0) - 3.0 t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2))) tmp = 0 if x1 <= -4.9e-238: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1)))) elif x1 <= 2.4e-187: tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (12.0 * (x1 * x2)))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * t_0) - (x1 * 3.0))) + t_1)))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * -2.0) - 3.0) t_1 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) tmp = 0.0 if (x1 <= -4.9e-238) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(3.0 * Float64(x1 * t_0)) + t_1))))); elseif (x1 <= 2.4e-187) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(12.0 * Float64(x1 * x2))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(Float64(3.0 * t_0) - Float64(x1 * 3.0))) + t_1))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * -2.0) - 3.0; t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2))); tmp = 0.0; if (x1 <= -4.9e-238) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1)))); elseif (x1 <= 2.4e-187) tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (12.0 * (x1 * x2)))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * t_0) - (x1 * 3.0))) + t_1)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.9e-238], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(3.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.4e-187], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(12.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(x1 * N[(N[(3.0 * t$95$0), $MachinePrecision] - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot -2 - 3\\
t_1 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -4.9 \cdot 10^{-238}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(3 \cdot \left(x1 \cdot t\_0\right) + t\_1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.4 \cdot 10^{-187}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + 12 \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(x1 \cdot \left(3 \cdot t\_0 - x1 \cdot 3\right) + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.8999999999999998e-238Initial program 59.8%
Simplified60.0%
Taylor expanded in x1 around 0 37.5%
associate-*r*43.8%
fmm-def43.8%
metadata-eval43.8%
Simplified43.8%
Taylor expanded in x1 around 0 58.6%
if -4.8999999999999998e-238 < x1 < 2.40000000000000013e-187Initial program 99.6%
Taylor expanded in x1 around 0 99.6%
Taylor expanded in x1 around inf 87.7%
Taylor expanded in x1 around 0 87.7%
Taylor expanded in x2 around inf 96.6%
*-commutative96.6%
Simplified96.6%
if 2.40000000000000013e-187 < x1 Initial program 68.5%
Simplified68.8%
Taylor expanded in x1 around 0 46.6%
associate-*r*48.4%
fmm-def48.4%
metadata-eval48.4%
Simplified48.4%
Taylor expanded in x1 around 0 77.7%
Final simplification74.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- 3.0 (* 2.0 x2))))
(if (<= x1 -8.5e+98)
(+
x1
(+
(- x1 (* x1 (+ 4.0 (* 2.0 (+ -1.0 (* 3.0 t_0))))))
(* 3.0 (+ (* x2 -2.0) (* x1 (+ -1.0 (* x1 (- 3.0 (* x2 -2.0)))))))))
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0)))
(* 4.0 (* x2 t_0))))))))))
double code(double x1, double x2) {
double t_0 = 3.0 - (2.0 * x2);
double tmp;
if (x1 <= -8.5e+98) {
tmp = x1 + ((x1 - (x1 * (4.0 + (2.0 * (-1.0 + (3.0 * t_0)))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * t_0))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 3.0d0 - (2.0d0 * x2)
if (x1 <= (-8.5d+98)) then
tmp = x1 + ((x1 - (x1 * (4.0d0 + (2.0d0 * ((-1.0d0) + (3.0d0 * t_0)))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x1 * (3.0d0 - (x2 * (-2.0d0)))))))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + (4.0d0 * (x2 * t_0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 - (2.0 * x2);
double tmp;
if (x1 <= -8.5e+98) {
tmp = x1 + ((x1 - (x1 * (4.0 + (2.0 * (-1.0 + (3.0 * t_0)))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * t_0))))));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 - (2.0 * x2) tmp = 0 if x1 <= -8.5e+98: tmp = x1 + ((x1 - (x1 * (4.0 + (2.0 * (-1.0 + (3.0 * t_0)))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0)))))))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * t_0)))))) return tmp
function code(x1, x2) t_0 = Float64(3.0 - Float64(2.0 * x2)) tmp = 0.0 if (x1 <= -8.5e+98) tmp = Float64(x1 + Float64(Float64(x1 - Float64(x1 * Float64(4.0 + Float64(2.0 * Float64(-1.0 + Float64(3.0 * t_0)))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(3.0 - Float64(x2 * -2.0))))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - 3.0)) - Float64(x1 * 3.0))) + Float64(4.0 * Float64(x2 * t_0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 - (2.0 * x2); tmp = 0.0; if (x1 <= -8.5e+98) tmp = x1 + ((x1 - (x1 * (4.0 + (2.0 * (-1.0 + (3.0 * t_0)))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0)))))))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * t_0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -8.5e+98], N[(x1 + N[(N[(x1 - N[(x1 * N[(4.0 + N[(2.0 * N[(-1.0 + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(x1 * N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 - 2 \cdot x2\\
\mathbf{if}\;x1 \leq -8.5 \cdot 10^{+98}:\\
\;\;\;\;x1 + \left(\left(x1 - x1 \cdot \left(4 + 2 \cdot \left(-1 + 3 \cdot t\_0\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 + x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(x1 \cdot \left(3 \cdot \left(x2 \cdot -2 - 3\right) - x1 \cdot 3\right) + 4 \cdot \left(x2 \cdot t\_0\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -8.4999999999999996e98Initial program 4.7%
Taylor expanded in x1 around 0 2.3%
Taylor expanded in x1 around inf 2.3%
Taylor expanded in x1 around 0 0.8%
Taylor expanded in x1 around 0 54.3%
if -8.4999999999999996e98 < x1 Initial program 85.4%
Simplified85.6%
Taylor expanded in x1 around 0 62.4%
associate-*r*69.4%
fmm-def69.4%
metadata-eval69.4%
Simplified69.4%
Taylor expanded in x1 around 0 76.6%
Final simplification72.8%
(FPCore (x1 x2)
:precision binary64
(if (<= (* 2.0 x2) -10000.0)
(+ (* x2 -6.0) (* x1 (- -1.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))))
2.0))))))
double code(double x1, double x2) {
double tmp;
if ((2.0 * x2) <= -10000.0) {
tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (3.0 * (x1 * (3.0 - (x2 * -2.0))))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((2.0d0 * x2) <= (-10000.0d0)) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) - (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0)))))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((2.0 * x2) <= -10000.0) {
tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (3.0 * (x1 * (3.0 - (x2 * -2.0))))) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (2.0 * x2) <= -10000.0: tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (3.0 * (x1 * (3.0 - (x2 * -2.0))))) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if (Float64(2.0 * x2) <= -10000.0) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 - Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0))))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((2.0 * x2) <= -10000.0) tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (3.0 * (x1 * (3.0 - (x2 * -2.0))))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[N[(2.0 * x2), $MachinePrecision], -10000.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 - N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot x2 \leq -10000:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 - 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) x2) < -1e4Initial program 77.5%
Simplified77.5%
Taylor expanded in x1 around 0 54.8%
if -1e4 < (*.f64 #s(literal 2 binary64) x2) Initial program 70.3%
Simplified70.5%
Taylor expanded in x1 around 0 52.7%
associate-*r*56.4%
fmm-def56.4%
metadata-eval56.4%
Simplified56.4%
Taylor expanded in x1 around 0 76.9%
Final simplification72.3%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.8e+102)
(+
x1
(+
(+ x1 (* x1 (- (* 2.0 (+ 1.0 (* 3.0 (- (* 2.0 x2) 3.0)))) 4.0)))
(* 3.0 (- (* x2 -2.0) x1))))
(if (<= x1 1.92e+198)
(+ (* x2 -6.0) (* x1 (- -1.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))
(* x2 (- (/ x1 x2) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.8e+102) {
tmp = x1 + ((x1 + (x1 * ((2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)))) - 4.0))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 1.92e+198) {
tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.8d+102)) then
tmp = x1 + ((x1 + (x1 * ((2.0d0 * (1.0d0 + (3.0d0 * ((2.0d0 * x2) - 3.0d0)))) - 4.0d0))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else if (x1 <= 1.92d+198) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) - (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.8e+102) {
tmp = x1 + ((x1 + (x1 * ((2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)))) - 4.0))) + (3.0 * ((x2 * -2.0) - x1)));
} else if (x1 <= 1.92e+198) {
tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.8e+102: tmp = x1 + ((x1 + (x1 * ((2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)))) - 4.0))) + (3.0 * ((x2 * -2.0) - x1))) elif x1 <= 1.92e+198: tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))))) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.8e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(x1 * Float64(Float64(2.0 * Float64(1.0 + Float64(3.0 * Float64(Float64(2.0 * x2) - 3.0)))) - 4.0))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); elseif (x1 <= 1.92e+198) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 - Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.8e+102) tmp = x1 + ((x1 + (x1 * ((2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)))) - 4.0))) + (3.0 * ((x2 * -2.0) - x1))); elseif (x1 <= 1.92e+198) tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))))); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.8e+102], N[(x1 + N[(N[(x1 + N[(x1 * N[(N[(2.0 * N[(1.0 + N[(3.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.92e+198], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 - N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.8 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + x1 \cdot \left(2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right) - 4\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 1.92 \cdot 10^{+198}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 - 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -1.8000000000000001e102Initial program 4.7%
Taylor expanded in x1 around 0 2.3%
Taylor expanded in x1 around inf 2.3%
Taylor expanded in x1 around 0 0.8%
Taylor expanded in x1 around 0 18.1%
mul-1-neg18.1%
unsub-neg18.1%
*-commutative18.1%
Simplified18.1%
if -1.8000000000000001e102 < x1 < 1.9199999999999999e198Initial program 94.2%
Simplified94.5%
Taylor expanded in x1 around 0 70.7%
if 1.9199999999999999e198 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
associate-*r*0.0%
fmm-def0.0%
metadata-eval0.0%
Simplified0.0%
Taylor expanded in x1 around 0 8.5%
*-commutative8.5%
Simplified8.5%
Taylor expanded in x2 around inf 63.1%
Final simplification61.2%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -4.1e+101)
(+
x1
(+
(* 3.0 (* x2 -2.0))
(+ x1 (* x1 (- (* 2.0 (+ 1.0 (* 3.0 (- (* 2.0 x2) 3.0)))) 4.0)))))
(if (<= x1 1.8e+199)
(+ (* x2 -6.0) (* x1 (- -1.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))
(* x2 (- (/ x1 x2) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -4.1e+101) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (x1 * ((2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)))) - 4.0))));
} else if (x1 <= 1.8e+199) {
tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-4.1d+101)) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + (x1 * ((2.0d0 * (1.0d0 + (3.0d0 * ((2.0d0 * x2) - 3.0d0)))) - 4.0d0))))
else if (x1 <= 1.8d+199) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) - (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -4.1e+101) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (x1 * ((2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)))) - 4.0))));
} else if (x1 <= 1.8e+199) {
tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -4.1e+101: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (x1 * ((2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)))) - 4.0)))) elif x1 <= 1.8e+199: tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))))) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -4.1e+101) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(x1 * Float64(Float64(2.0 * Float64(1.0 + Float64(3.0 * Float64(Float64(2.0 * x2) - 3.0)))) - 4.0))))); elseif (x1 <= 1.8e+199) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 - Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -4.1e+101) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (x1 * ((2.0 * (1.0 + (3.0 * ((2.0 * x2) - 3.0)))) - 4.0)))); elseif (x1 <= 1.8e+199) tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))))); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -4.1e+101], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(N[(2.0 * N[(1.0 + N[(3.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e+199], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 - N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4.1 \cdot 10^{+101}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + x1 \cdot \left(2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right) - 4\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{+199}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 - 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -4.1e101Initial program 4.7%
Taylor expanded in x1 around 0 2.3%
Taylor expanded in x1 around inf 2.3%
Taylor expanded in x1 around 0 0.8%
Taylor expanded in x1 around 0 18.1%
*-commutative4.7%
Simplified18.1%
if -4.1e101 < x1 < 1.80000000000000001e199Initial program 94.2%
Simplified94.5%
Taylor expanded in x1 around 0 70.7%
if 1.80000000000000001e199 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
associate-*r*0.0%
fmm-def0.0%
metadata-eval0.0%
Simplified0.0%
Taylor expanded in x1 around 0 8.5%
*-commutative8.5%
Simplified8.5%
Taylor expanded in x2 around inf 63.1%
Final simplification61.2%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -2.3e+136) (not (<= x2 5.4e+149))) (+ x1 (* x1 (- 1.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -2.3e+136) || !(x2 <= 5.4e+149)) {
tmp = x1 + (x1 * (1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-2.3d+136)) .or. (.not. (x2 <= 5.4d+149))) then
tmp = x1 + (x1 * (1.0d0 - (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -2.3e+136) || !(x2 <= 5.4e+149)) {
tmp = x1 + (x1 * (1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -2.3e+136) or not (x2 <= 5.4e+149): tmp = x1 + (x1 * (1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))))) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -2.3e+136) || !(x2 <= 5.4e+149)) tmp = Float64(x1 + Float64(x1 * Float64(1.0 - Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -2.3e+136) || ~((x2 <= 5.4e+149))) tmp = x1 + (x1 * (1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))))); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -2.3e+136], N[Not[LessEqual[x2, 5.4e+149]], $MachinePrecision]], N[(x1 + N[(x1 * N[(1.0 - N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -2.3 \cdot 10^{+136} \lor \neg \left(x2 \leq 5.4 \cdot 10^{+149}\right):\\
\;\;\;\;x1 + x1 \cdot \left(1 - 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x2 < -2.3e136 or 5.4000000000000002e149 < x2 Initial program 69.1%
Simplified69.1%
Taylor expanded in x1 around 0 40.3%
associate-*r*63.2%
fmm-def63.2%
metadata-eval63.2%
Simplified63.2%
Taylor expanded in x1 around inf 52.6%
if -2.3e136 < x2 < 5.4000000000000002e149Initial program 72.7%
Simplified73.0%
Taylor expanded in x1 around 0 55.9%
associate-*r*55.9%
fmm-def55.9%
metadata-eval55.9%
Simplified55.9%
Taylor expanded in x1 around 0 36.0%
*-commutative36.0%
Simplified36.0%
Taylor expanded in x2 around inf 43.2%
Final simplification45.6%
(FPCore (x1 x2) :precision binary64 (if (<= x1 3.15e+196) (+ (* x2 -6.0) (* x1 (- -1.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 3.15e+196) {
tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 3.15d+196) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) - (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 3.15e+196) {
tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 3.15e+196: tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))))) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 3.15e+196) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 - Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 3.15e+196) tmp = (x2 * -6.0) + (x1 * (-1.0 - (4.0 * (x2 * (3.0 - (2.0 * x2)))))); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 3.15e+196], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 - N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 3.15 \cdot 10^{+196}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 - 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 3.15000000000000001e196Initial program 77.9%
Simplified78.1%
Taylor expanded in x1 around 0 58.4%
if 3.15000000000000001e196 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 0.0%
associate-*r*0.0%
fmm-def0.0%
metadata-eval0.0%
Simplified0.0%
Taylor expanded in x1 around 0 8.5%
*-commutative8.5%
Simplified8.5%
Taylor expanded in x2 around inf 63.1%
Final simplification58.8%
(FPCore (x1 x2) :precision binary64 (* x2 (- (/ x1 x2) 6.0)))
double code(double x1, double x2) {
return x2 * ((x1 / x2) - 6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * ((x1 / x2) - 6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * ((x1 / x2) - 6.0);
}
def code(x1, x2): return x2 * ((x1 / x2) - 6.0)
function code(x1, x2) return Float64(x2 * Float64(Float64(x1 / x2) - 6.0)) end
function tmp = code(x1, x2) tmp = x2 * ((x1 / x2) - 6.0); end
code[x1_, x2_] := N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot \left(\frac{x1}{x2} - 6\right)
\end{array}
Initial program 71.8%
Simplified72.0%
Taylor expanded in x1 around 0 52.0%
associate-*r*57.8%
fmm-def57.8%
metadata-eval57.8%
Simplified57.8%
Taylor expanded in x1 around 0 30.5%
*-commutative30.5%
Simplified30.5%
Taylor expanded in x2 around inf 35.9%
(FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x2 * (-6.0d0))
end function
public static double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
def code(x1, x2): return x1 + (x2 * -6.0)
function code(x1, x2) return Float64(x1 + Float64(x2 * -6.0)) end
function tmp = code(x1, x2) tmp = x1 + (x2 * -6.0); end
code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + x2 \cdot -6
\end{array}
Initial program 71.8%
Simplified72.0%
Taylor expanded in x1 around 0 52.0%
associate-*r*57.8%
fmm-def57.8%
metadata-eval57.8%
Simplified57.8%
Taylor expanded in x1 around 0 30.5%
*-commutative30.5%
Simplified30.5%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 71.8%
Simplified72.0%
Taylor expanded in x1 around 0 30.4%
Final simplification30.4%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 71.8%
Simplified72.0%
Taylor expanded in x1 around 0 52.0%
associate-*r*57.8%
fmm-def57.8%
metadata-eval57.8%
Simplified57.8%
Taylor expanded in x1 around 0 30.5%
*-commutative30.5%
Simplified30.5%
Taylor expanded in x1 around inf 3.4%
herbie shell --seed 2024170
(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))))))