
(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 27 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))))))
(+ 9.0 (* x1 (+ 2.0 (* 6.0 (pow x1 3.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 = 9.0 + (x1 * (2.0 + (6.0 * pow(x1, 3.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(9.0 + Float64(x1 * Float64(2.0 + Float64(6.0 * (x1 ^ 3.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[(9.0 + N[(x1 * N[(2.0 + N[(6.0 * N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}:\\
\;\;\;\;9 + x1 \cdot \left(2 + 6 \cdot {x1}^{3}\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.3%
Simplified99.6%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around inf 13.3%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around 0 100.0%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (- -1.0 (* x1 x1)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (/ t_2 t_3))
(t_6 (/ t_2 t_4))
(t_7 (* (* x1 2.0) t_6))
(t_8 (* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) t_3))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(* t_4 (+ (* t_7 (- t_6 3.0)) (* (* x1 x1) (- (* t_6 4.0) 6.0))))
(* t_1 t_6))
t_0))
t_8))
INFINITY)
(+
x1
(-
t_8
(-
(-
(-
(* t_1 t_5)
(*
(+
(*
(* x1 x1)
(-
6.0
(*
4.0
(/
1.0
(/
(fma x1 x1 1.0)
(fma 3.0 (pow x1 2.0) (- (* 2.0 x2) x1)))))))
(* t_7 (+ 3.0 t_5)))
t_3))
t_0)
x1)))
(+ 9.0 (* x1 (+ 2.0 (* 6.0 (pow x1 3.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = -1.0 - (x1 * x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = t_2 / t_3;
double t_6 = t_2 / t_4;
double t_7 = (x1 * 2.0) * t_6;
double t_8 = 3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_3);
double tmp;
if ((x1 + ((x1 + (((t_4 * ((t_7 * (t_6 - 3.0)) + ((x1 * x1) * ((t_6 * 4.0) - 6.0)))) + (t_1 * t_6)) + t_0)) + t_8)) <= ((double) INFINITY)) {
tmp = x1 + (t_8 - ((((t_1 * t_5) - ((((x1 * x1) * (6.0 - (4.0 * (1.0 / (fma(x1, x1, 1.0) / fma(3.0, pow(x1, 2.0), ((2.0 * x2) - x1))))))) + (t_7 * (3.0 + t_5))) * t_3)) - t_0) - x1));
} else {
tmp = 9.0 + (x1 * (2.0 + (6.0 * pow(x1, 3.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(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(-1.0 - Float64(x1 * x1)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(t_2 / t_3) t_6 = Float64(t_2 / t_4) t_7 = Float64(Float64(x1 * 2.0) * t_6) t_8 = Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / t_3)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_4 * Float64(Float64(t_7 * Float64(t_6 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0)))) + Float64(t_1 * t_6)) + t_0)) + t_8)) <= Inf) tmp = Float64(x1 + Float64(t_8 - Float64(Float64(Float64(Float64(t_1 * t_5) - Float64(Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(4.0 * Float64(1.0 / Float64(fma(x1, x1, 1.0) / fma(3.0, (x1 ^ 2.0), Float64(Float64(2.0 * x2) - x1))))))) + Float64(t_7 * Float64(3.0 + t_5))) * t_3)) - t_0) - x1))); else tmp = Float64(9.0 + Float64(x1 * Float64(2.0 + Float64(6.0 * (x1 ^ 3.0))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 / t$95$4), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$4 * N[(N[(t$95$7 * N[(t$95$6 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$6), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$8), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$8 - N[(N[(N[(N[(t$95$1 * t$95$5), $MachinePrecision] - N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(4.0 * N[(1.0 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / N[(3.0 * N[Power[x1, 2.0], $MachinePrecision] + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$7 * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 + N[(x1 * N[(2.0 + N[(6.0 * N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := -1 - x1 \cdot x1\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \frac{t\_2}{t\_3}\\
t_6 := \frac{t\_2}{t\_4}\\
t_7 := \left(x1 \cdot 2\right) \cdot t\_6\\
t_8 := 3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{t\_3}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_4 \cdot \left(t\_7 \cdot \left(t\_6 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_6\right) + t\_0\right)\right) + t\_8\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_8 - \left(\left(\left(t\_1 \cdot t\_5 - \left(\left(x1 \cdot x1\right) \cdot \left(6 - 4 \cdot \frac{1}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{\mathsf{fma}\left(3, {x1}^{2}, 2 \cdot x2 - x1\right)}}\right) + t\_7 \cdot \left(3 + t\_5\right)\right) \cdot t\_3\right) - t\_0\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;9 + x1 \cdot \left(2 + 6 \cdot {x1}^{3}\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.3%
fma-define99.3%
*-commutative99.3%
fma-define99.3%
clear-num99.3%
inv-pow99.3%
*-commutative99.3%
fma-define99.3%
associate--l+99.3%
associate-*r*99.3%
fma-define99.4%
pow299.4%
Applied egg-rr99.4%
unpow-199.4%
Simplified99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around inf 13.3%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around 0 100.0%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_3))
(t_5
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(* (* x1 x1) (- (* t_4 4.0) 6.0)))))
(if (<=
(+
x1
(+
(+ x1 (+ (+ (* t_3 t_5) (* t_1 t_4)) t_0))
(* 3.0 (/ (- x1 (- t_1 (* 2.0 x2))) t_2))))
INFINITY)
(+
x1
(+
(+ x1 (- t_0 (- (* t_5 t_2) (* 3.0 t_1))))
(+ (* x2 -6.0) (* x1 -3.0))))
(+ 9.0 (* x1 (+ 2.0 (* 6.0 (pow x1 3.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = -1.0 - (x1 * x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = (((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0));
double tmp;
if ((x1 + ((x1 + (((t_3 * t_5) + (t_1 * t_4)) + t_0)) + (3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + ((x1 + (t_0 - ((t_5 * t_2) - (3.0 * t_1)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = 9.0 + (x1 * (2.0 + (6.0 * pow(x1, 3.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 = -1.0 - (x1 * x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = (((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0));
double tmp;
if ((x1 + ((x1 + (((t_3 * t_5) + (t_1 * t_4)) + t_0)) + (3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_2)))) <= Double.POSITIVE_INFINITY) {
tmp = x1 + ((x1 + (t_0 - ((t_5 * t_2) - (3.0 * t_1)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = 9.0 + (x1 * (2.0 + (6.0 * Math.pow(x1, 3.0))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = -1.0 - (x1 * x1) t_3 = (x1 * x1) + 1.0 t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3 t_5 = (((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)) tmp = 0 if (x1 + ((x1 + (((t_3 * t_5) + (t_1 * t_4)) + t_0)) + (3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_2)))) <= math.inf: tmp = x1 + ((x1 + (t_0 - ((t_5 * t_2) - (3.0 * t_1)))) + ((x2 * -6.0) + (x1 * -3.0))) else: tmp = 9.0 + (x1 * (2.0 + (6.0 * math.pow(x1, 3.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(-1.0 - Float64(x1 * x1)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_3) t_5 = Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0))) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * t_5) + Float64(t_1 * t_4)) + t_0)) + Float64(3.0 * Float64(Float64(x1 - Float64(t_1 - Float64(2.0 * x2))) / t_2)))) <= Inf) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_0 - Float64(Float64(t_5 * t_2) - Float64(3.0 * t_1)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); else tmp = Float64(9.0 + Float64(x1 * Float64(2.0 + Float64(6.0 * (x1 ^ 3.0))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = -1.0 - (x1 * x1); t_3 = (x1 * x1) + 1.0; t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3; t_5 = (((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)); tmp = 0.0; if ((x1 + ((x1 + (((t_3 * t_5) + (t_1 * t_4)) + t_0)) + (3.0 * ((x1 - (t_1 - (2.0 * x2))) / t_2)))) <= Inf) tmp = x1 + ((x1 + (t_0 - ((t_5 * t_2) - (3.0 * t_1)))) + ((x2 * -6.0) + (x1 * -3.0))); else tmp = 9.0 + (x1 * (2.0 + (6.0 * (x1 ^ 3.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * t$95$5), $MachinePrecision] + N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x1 - N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(x1 + N[(t$95$0 - N[(N[(t$95$5 * t$95$2), $MachinePrecision] - N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 + N[(x1 * N[(2.0 + N[(6.0 * N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := -1 - x1 \cdot x1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_3}\\
t_5 := \left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_4 \cdot 4 - 6\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_3 \cdot t\_5 + t\_1 \cdot t\_4\right) + t\_0\right)\right) + 3 \cdot \frac{x1 - \left(t\_1 - 2 \cdot x2\right)}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_0 - \left(t\_5 \cdot t\_2 - 3 \cdot t\_1\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;9 + x1 \cdot \left(2 + 6 \cdot {x1}^{3}\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.3%
Taylor expanded in x1 around inf 98.1%
Taylor expanded in x1 around 0 99.3%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around inf 13.3%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around 0 100.0%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- 3.0 (* 2.0 x2)))
(t_1 (- (* 2.0 x2) 3.0))
(t_2 (* x1 (* x1 x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (- (+ t_3 (* 2.0 x2)) x1))
(t_5 (+ (* x1 x1) 1.0))
(t_6 (/ t_4 t_5))
(t_7 (* 3.0 t_3))
(t_8 (* (* x1 2.0) t_6))
(t_9 (* 4.0 (* x2 t_0)))
(t_10 (- -1.0 (* x1 x1)))
(t_11
(+
x1
(+
9.0
(+
x1
(+
t_2
(-
t_7
(*
t_5
(+
(* (* x1 x1) (+ 6.0 (* 4.0 (- (/ (+ 1.0 (/ t_0 x1)) x1) 3.0))))
(* t_8 (+ 3.0 (/ t_4 t_10))))))))))))
(if (<= x1 -1.15e+110)
(+
x1
(+
9.0
(-
x1
(*
x1
(+
(*
x1
(-
(-
(* 2.0 (- t_1 (* x2 -2.0)))
(-
(* x2 8.0)
(*
x1
(+
3.0
(+
t_9
(*
2.0
(+
(* 2.0 (* x2 t_1))
(-
-1.0
(+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_1))))))))))
3.0))
t_9)))))
(if (<= x1 -0.36)
t_11
(if (<= x1 0.025)
(+
x1
(+
(+ (* x2 -6.0) (* x1 -3.0))
(+
x1
(+
t_2
(+
t_7
(*
(-
(* t_8 (+ 3.0 (- x1 (* 2.0 x2))))
(* (* x1 x1) (- (* t_6 4.0) 6.0)))
t_10))))))
(if (<= x1 1.5e+97)
t_11
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0)))
t_9)))))))))))
double code(double x1, double x2) {
double t_0 = 3.0 - (2.0 * x2);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = (x1 * x1) + 1.0;
double t_6 = t_4 / t_5;
double t_7 = 3.0 * t_3;
double t_8 = (x1 * 2.0) * t_6;
double t_9 = 4.0 * (x2 * t_0);
double t_10 = -1.0 - (x1 * x1);
double t_11 = x1 + (9.0 + (x1 + (t_2 + (t_7 - (t_5 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + (t_0 / x1)) / x1) - 3.0)))) + (t_8 * (3.0 + (t_4 / t_10)))))))));
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_9 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_9))));
} else if (x1 <= -0.36) {
tmp = t_11;
} else if (x1 <= 0.025) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_2 + (t_7 + (((t_8 * (3.0 + (x1 - (2.0 * x2)))) - ((x1 * x1) * ((t_6 * 4.0) - 6.0))) * t_10)))));
} else if (x1 <= 1.5e+97) {
tmp = t_11;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_9))));
}
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_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 = 3.0d0 - (2.0d0 * x2)
t_1 = (2.0d0 * x2) - 3.0d0
t_2 = x1 * (x1 * x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = (t_3 + (2.0d0 * x2)) - x1
t_5 = (x1 * x1) + 1.0d0
t_6 = t_4 / t_5
t_7 = 3.0d0 * t_3
t_8 = (x1 * 2.0d0) * t_6
t_9 = 4.0d0 * (x2 * t_0)
t_10 = (-1.0d0) - (x1 * x1)
t_11 = x1 + (9.0d0 + (x1 + (t_2 + (t_7 - (t_5 * (((x1 * x1) * (6.0d0 + (4.0d0 * (((1.0d0 + (t_0 / x1)) / x1) - 3.0d0)))) + (t_8 * (3.0d0 + (t_4 / t_10)))))))))
if (x1 <= (-1.15d+110)) then
tmp = x1 + (9.0d0 + (x1 - (x1 * ((x1 * (((2.0d0 * (t_1 - (x2 * (-2.0d0)))) - ((x2 * 8.0d0) - (x1 * (3.0d0 + (t_9 + (2.0d0 * ((2.0d0 * (x2 * t_1)) + ((-1.0d0) - ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_1)))))))))) - 3.0d0)) + t_9))))
else if (x1 <= (-0.36d0)) then
tmp = t_11
else if (x1 <= 0.025d0) then
tmp = x1 + (((x2 * (-6.0d0)) + (x1 * (-3.0d0))) + (x1 + (t_2 + (t_7 + (((t_8 * (3.0d0 + (x1 - (2.0d0 * x2)))) - ((x1 * x1) * ((t_6 * 4.0d0) - 6.0d0))) * t_10)))))
else if (x1 <= 1.5d+97) then
tmp = t_11
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_9))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 - (2.0 * x2);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = (x1 * x1) + 1.0;
double t_6 = t_4 / t_5;
double t_7 = 3.0 * t_3;
double t_8 = (x1 * 2.0) * t_6;
double t_9 = 4.0 * (x2 * t_0);
double t_10 = -1.0 - (x1 * x1);
double t_11 = x1 + (9.0 + (x1 + (t_2 + (t_7 - (t_5 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + (t_0 / x1)) / x1) - 3.0)))) + (t_8 * (3.0 + (t_4 / t_10)))))))));
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_9 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_9))));
} else if (x1 <= -0.36) {
tmp = t_11;
} else if (x1 <= 0.025) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_2 + (t_7 + (((t_8 * (3.0 + (x1 - (2.0 * x2)))) - ((x1 * x1) * ((t_6 * 4.0) - 6.0))) * t_10)))));
} else if (x1 <= 1.5e+97) {
tmp = t_11;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_9))));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 - (2.0 * x2) t_1 = (2.0 * x2) - 3.0 t_2 = x1 * (x1 * x1) t_3 = x1 * (x1 * 3.0) t_4 = (t_3 + (2.0 * x2)) - x1 t_5 = (x1 * x1) + 1.0 t_6 = t_4 / t_5 t_7 = 3.0 * t_3 t_8 = (x1 * 2.0) * t_6 t_9 = 4.0 * (x2 * t_0) t_10 = -1.0 - (x1 * x1) t_11 = x1 + (9.0 + (x1 + (t_2 + (t_7 - (t_5 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + (t_0 / x1)) / x1) - 3.0)))) + (t_8 * (3.0 + (t_4 / t_10))))))))) tmp = 0 if x1 <= -1.15e+110: tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_9 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_9)))) elif x1 <= -0.36: tmp = t_11 elif x1 <= 0.025: tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_2 + (t_7 + (((t_8 * (3.0 + (x1 - (2.0 * x2)))) - ((x1 * x1) * ((t_6 * 4.0) - 6.0))) * t_10))))) elif x1 <= 1.5e+97: tmp = t_11 else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_9)))) return tmp
function code(x1, x2) t_0 = Float64(3.0 - Float64(2.0 * x2)) t_1 = Float64(Float64(2.0 * x2) - 3.0) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) t_5 = Float64(Float64(x1 * x1) + 1.0) t_6 = Float64(t_4 / t_5) t_7 = Float64(3.0 * t_3) t_8 = Float64(Float64(x1 * 2.0) * t_6) t_9 = Float64(4.0 * Float64(x2 * t_0)) t_10 = Float64(-1.0 - Float64(x1 * x1)) t_11 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_2 + Float64(t_7 - Float64(t_5 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(Float64(1.0 + Float64(t_0 / x1)) / x1) - 3.0)))) + Float64(t_8 * Float64(3.0 + Float64(t_4 / t_10)))))))))) tmp = 0.0 if (x1 <= -1.15e+110) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(t_1 - Float64(x2 * -2.0))) - Float64(Float64(x2 * 8.0) - Float64(x1 * Float64(3.0 + Float64(t_9 + Float64(2.0 * Float64(Float64(2.0 * Float64(x2 * t_1)) + Float64(-1.0 - Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_1)))))))))) - 3.0)) + t_9))))); elseif (x1 <= -0.36) tmp = t_11; elseif (x1 <= 0.025) tmp = Float64(x1 + Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)) + Float64(x1 + Float64(t_2 + Float64(t_7 + Float64(Float64(Float64(t_8 * Float64(3.0 + Float64(x1 - Float64(2.0 * x2)))) - Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0))) * t_10)))))); elseif (x1 <= 1.5e+97) tmp = t_11; 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))) + t_9))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 - (2.0 * x2); t_1 = (2.0 * x2) - 3.0; t_2 = x1 * (x1 * x1); t_3 = x1 * (x1 * 3.0); t_4 = (t_3 + (2.0 * x2)) - x1; t_5 = (x1 * x1) + 1.0; t_6 = t_4 / t_5; t_7 = 3.0 * t_3; t_8 = (x1 * 2.0) * t_6; t_9 = 4.0 * (x2 * t_0); t_10 = -1.0 - (x1 * x1); t_11 = x1 + (9.0 + (x1 + (t_2 + (t_7 - (t_5 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + (t_0 / x1)) / x1) - 3.0)))) + (t_8 * (3.0 + (t_4 / t_10))))))))); tmp = 0.0; if (x1 <= -1.15e+110) tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_9 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_9)))); elseif (x1 <= -0.36) tmp = t_11; elseif (x1 <= 0.025) tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_2 + (t_7 + (((t_8 * (3.0 + (x1 - (2.0 * x2)))) - ((x1 * x1) * ((t_6 * 4.0) - 6.0))) * t_10))))); elseif (x1 <= 1.5e+97) tmp = t_11; else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_9)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$4 / t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 * t$95$3), $MachinePrecision]}, Block[{t$95$8 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision]}, Block[{t$95$9 = N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$10 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$11 = N[(x1 + N[(9.0 + N[(x1 + N[(t$95$2 + N[(t$95$7 - N[(t$95$5 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(N[(1.0 + N[(t$95$0 / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$8 * N[(3.0 + N[(t$95$4 / t$95$10), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.15e+110], N[(x1 + N[(9.0 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(t$95$1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x2 * 8.0), $MachinePrecision] - N[(x1 * N[(3.0 + N[(t$95$9 + N[(2.0 * N[(N[(2.0 * N[(x2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.36], t$95$11, If[LessEqual[x1, 0.025], N[(x1 + N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$2 + N[(t$95$7 + N[(N[(N[(t$95$8 * N[(3.0 + N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$10), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5e+97], t$95$11, 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] + t$95$9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 - 2 \cdot x2\\
t_1 := 2 \cdot x2 - 3\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \left(t\_3 + 2 \cdot x2\right) - x1\\
t_5 := x1 \cdot x1 + 1\\
t_6 := \frac{t\_4}{t\_5}\\
t_7 := 3 \cdot t\_3\\
t_8 := \left(x1 \cdot 2\right) \cdot t\_6\\
t_9 := 4 \cdot \left(x2 \cdot t\_0\right)\\
t_10 := -1 - x1 \cdot x1\\
t_11 := x1 + \left(9 + \left(x1 + \left(t\_2 + \left(t\_7 - t\_5 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 + \frac{t\_0}{x1}}{x1} - 3\right)\right) + t\_8 \cdot \left(3 + \frac{t\_4}{t\_10}\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.15 \cdot 10^{+110}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(t\_1 - x2 \cdot -2\right) - \left(x2 \cdot 8 - x1 \cdot \left(3 + \left(t\_9 + 2 \cdot \left(2 \cdot \left(x2 \cdot t\_1\right) + \left(-1 - \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_1\right)\right)\right)\right)\right)\right)\right) - 3\right) + t\_9\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.36:\\
\;\;\;\;t\_11\\
\mathbf{elif}\;x1 \leq 0.025:\\
\;\;\;\;x1 + \left(\left(x2 \cdot -6 + x1 \cdot -3\right) + \left(x1 + \left(t\_2 + \left(t\_7 + \left(t\_8 \cdot \left(3 + \left(x1 - 2 \cdot x2\right)\right) - \left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right)\right) \cdot t\_10\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+97}:\\
\;\;\;\;t\_11\\
\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) + t\_9\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.15e110Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 75.0%
if -1.15e110 < x1 < -0.35999999999999999 or 0.025000000000000001 < x1 < 1.4999999999999999e97Initial program 94.7%
Taylor expanded in x1 around inf 93.1%
Taylor expanded in x1 around inf 93.1%
Taylor expanded in x1 around -inf 93.6%
if -0.35999999999999999 < x1 < 0.025000000000000001Initial program 99.3%
Taylor expanded in x1 around inf 98.2%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around 0 99.1%
+-commutative99.1%
mul-1-neg99.1%
sub-neg99.1%
Simplified99.1%
if 1.4999999999999999e97 < x1 Initial program 19.6%
Taylor expanded in x1 around 0 13.4%
Taylor expanded in x1 around 0 100.0%
Final simplification94.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))))
(if (<= x1 -1.15e+110)
(+
x1
(+
9.0
(-
x1
(*
x1
(+
(*
x1
(-
(-
(* 2.0 (- t_0 (* x2 -2.0)))
(-
(* x2 8.0)
(*
x1
(+
3.0
(+
t_1
(*
2.0
(+
(* 2.0 (* x2 t_0))
(-
-1.0
(+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_0))))))))))
3.0))
t_1)))))
(if (<= x1 1.5e+97)
(+
x1
(+
(+
x1
(-
(* x1 (* x1 x1))
(-
(*
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0)))
(- -1.0 (* x1 x1)))
(* 3.0 t_2))))
(+ (* x2 -6.0) (* x1 -3.0))))
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+ (* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0))) t_1)))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (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 tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_1 + (2.0 * ((2.0 * (x2 * t_0)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0)))))))))) - 3.0)) + t_1))));
} else if (x1 <= 1.5e+97) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) - ((((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * (-1.0 - (x1 * x1))) - (3.0 * t_2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.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) :: t_3
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
t_2 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0)
if (x1 <= (-1.15d+110)) then
tmp = x1 + (9.0d0 + (x1 - (x1 * ((x1 * (((2.0d0 * (t_0 - (x2 * (-2.0d0)))) - ((x2 * 8.0d0) - (x1 * (3.0d0 + (t_1 + (2.0d0 * ((2.0d0 * (x2 * t_0)) + ((-1.0d0) - ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_0)))))))))) - 3.0d0)) + t_1))))
else if (x1 <= 1.5d+97) then
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) - ((((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0))) * ((-1.0d0) - (x1 * x1))) - (3.0d0 * t_2)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_1))))
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 = 4.0 * (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 tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_1 + (2.0 * ((2.0 * (x2 * t_0)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0)))))))))) - 3.0)) + t_1))));
} else if (x1 <= 1.5e+97) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) - ((((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * (-1.0 - (x1 * x1))) - (3.0 * t_2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_1))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2))) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0) tmp = 0 if x1 <= -1.15e+110: tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_1 + (2.0 * ((2.0 * (x2 * t_0)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0)))))))))) - 3.0)) + t_1)))) elif x1 <= 1.5e+97: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) - ((((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * (-1.0 - (x1 * x1))) - (3.0 * t_2)))) + ((x2 * -6.0) + (x1 * -3.0))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_1)))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(4.0 * 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)) tmp = 0.0 if (x1 <= -1.15e+110) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(t_0 - Float64(x2 * -2.0))) - Float64(Float64(x2 * 8.0) - Float64(x1 * Float64(3.0 + Float64(t_1 + Float64(2.0 * Float64(Float64(2.0 * Float64(x2 * t_0)) + Float64(-1.0 - Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_0)))))))))) - 3.0)) + t_1))))); elseif (x1 <= 1.5e+97) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0))) * Float64(-1.0 - Float64(x1 * x1))) - Float64(3.0 * t_2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.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))) + t_1))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2))); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / ((x1 * x1) + 1.0); tmp = 0.0; if (x1 <= -1.15e+110) tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_1 + (2.0 * ((2.0 * (x2 * t_0)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0)))))))))) - 3.0)) + t_1)))); elseif (x1 <= 1.5e+97) tmp = x1 + ((x1 + ((x1 * (x1 * x1)) - ((((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))) * (-1.0 - (x1 * x1))) - (3.0 * t_2)))) + ((x2 * -6.0) + (x1 * -3.0))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_1)))); 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[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.15e+110], N[(x1 + N[(9.0 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(t$95$0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x2 * 8.0), $MachinePrecision] - N[(x1 * N[(3.0 + N[(t$95$1 + N[(2.0 * N[(N[(2.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5e+97], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(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] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\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}\\
\mathbf{if}\;x1 \leq -1.15 \cdot 10^{+110}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(t\_0 - x2 \cdot -2\right) - \left(x2 \cdot 8 - x1 \cdot \left(3 + \left(t\_1 + 2 \cdot \left(2 \cdot \left(x2 \cdot t\_0\right) + \left(-1 - \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_0\right)\right)\right)\right)\right)\right)\right) - 3\right) + t\_1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+97}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(\left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) \cdot \left(-1 - x1 \cdot x1\right) - 3 \cdot t\_2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\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) + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.15e110Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 75.0%
if -1.15e110 < x1 < 1.4999999999999999e97Initial program 98.1%
Taylor expanded in x1 around inf 96.8%
Taylor expanded in x1 around 0 98.1%
if 1.4999999999999999e97 < x1 Initial program 19.6%
Taylor expanded in x1 around 0 13.4%
Taylor expanded in x1 around 0 100.0%
Final simplification95.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))
(t_3 (* x1 (* x1 3.0)))
(t_4 (* 3.0 t_3))
(t_5 (/ (- (+ t_3 (* 2.0 x2)) x1) t_1))
(t_6 (* (* x1 x1) (- (* t_5 4.0) 6.0)))
(t_7 (* (* x1 2.0) t_5))
(t_8 (* x1 (* x1 x1)))
(t_9
(+
x1
(+
9.0
(-
x1
(-
(-
(*
t_1
(- (* t_7 (/ (- (+ 1.0 (/ 3.0 x1)) (* 2.0 (/ x2 x1))) x1)) t_6))
t_4)
t_8))))))
(if (<= x1 -1.15e+110)
(+
x1
(+
9.0
(-
x1
(*
x1
(+
(*
x1
(-
(-
(* 2.0 (- t_0 (* x2 -2.0)))
(-
(* x2 8.0)
(*
x1
(+
3.0
(+
t_2
(*
2.0
(+
(* 2.0 (* x2 t_0))
(-
-1.0
(+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_0))))))))))
3.0))
t_2)))))
(if (<= x1 -1.05)
t_9
(if (<= x1 1.38)
(+
x1
(+
(+ (* x2 -6.0) (* x1 -3.0))
(+
x1
(+
t_8
(+
t_4
(*
(- (* t_7 (+ 3.0 (- x1 (* 2.0 x2)))) t_6)
(- -1.0 (* x1 x1))))))))
(if (<= x1 1.5e+97)
t_9
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0)))
t_2)))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = (x1 * x1) + 1.0;
double t_2 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * t_3;
double t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1;
double t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0);
double t_7 = (x1 * 2.0) * t_5;
double t_8 = x1 * (x1 * x1);
double t_9 = x1 + (9.0 + (x1 - (((t_1 * ((t_7 * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)) - t_6)) - t_4) - t_8)));
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_2 + (2.0 * ((2.0 * (x2 * t_0)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0)))))))))) - 3.0)) + t_2))));
} else if (x1 <= -1.05) {
tmp = t_9;
} else if (x1 <= 1.38) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_8 + (t_4 + (((t_7 * (3.0 + (x1 - (2.0 * x2)))) - t_6) * (-1.0 - (x1 * x1)))))));
} else if (x1 <= 1.5e+97) {
tmp = t_9;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.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_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 * x2) - 3.0d0
t_1 = (x1 * x1) + 1.0d0
t_2 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
t_3 = x1 * (x1 * 3.0d0)
t_4 = 3.0d0 * t_3
t_5 = ((t_3 + (2.0d0 * x2)) - x1) / t_1
t_6 = (x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)
t_7 = (x1 * 2.0d0) * t_5
t_8 = x1 * (x1 * x1)
t_9 = x1 + (9.0d0 + (x1 - (((t_1 * ((t_7 * (((1.0d0 + (3.0d0 / x1)) - (2.0d0 * (x2 / x1))) / x1)) - t_6)) - t_4) - t_8)))
if (x1 <= (-1.15d+110)) then
tmp = x1 + (9.0d0 + (x1 - (x1 * ((x1 * (((2.0d0 * (t_0 - (x2 * (-2.0d0)))) - ((x2 * 8.0d0) - (x1 * (3.0d0 + (t_2 + (2.0d0 * ((2.0d0 * (x2 * t_0)) + ((-1.0d0) - ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_0)))))))))) - 3.0d0)) + t_2))))
else if (x1 <= (-1.05d0)) then
tmp = t_9
else if (x1 <= 1.38d0) then
tmp = x1 + (((x2 * (-6.0d0)) + (x1 * (-3.0d0))) + (x1 + (t_8 + (t_4 + (((t_7 * (3.0d0 + (x1 - (2.0d0 * x2)))) - t_6) * ((-1.0d0) - (x1 * x1)))))))
else if (x1 <= 1.5d+97) then
tmp = t_9
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_2))))
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 = (x1 * x1) + 1.0;
double t_2 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * t_3;
double t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1;
double t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0);
double t_7 = (x1 * 2.0) * t_5;
double t_8 = x1 * (x1 * x1);
double t_9 = x1 + (9.0 + (x1 - (((t_1 * ((t_7 * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)) - t_6)) - t_4) - t_8)));
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_2 + (2.0 * ((2.0 * (x2 * t_0)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0)))))))))) - 3.0)) + t_2))));
} else if (x1 <= -1.05) {
tmp = t_9;
} else if (x1 <= 1.38) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_8 + (t_4 + (((t_7 * (3.0 + (x1 - (2.0 * x2)))) - t_6) * (-1.0 - (x1 * x1)))))));
} else if (x1 <= 1.5e+97) {
tmp = t_9;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_2))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = (x1 * x1) + 1.0 t_2 = 4.0 * (x2 * (3.0 - (2.0 * x2))) t_3 = x1 * (x1 * 3.0) t_4 = 3.0 * t_3 t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1 t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0) t_7 = (x1 * 2.0) * t_5 t_8 = x1 * (x1 * x1) t_9 = x1 + (9.0 + (x1 - (((t_1 * ((t_7 * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)) - t_6)) - t_4) - t_8))) tmp = 0 if x1 <= -1.15e+110: tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_2 + (2.0 * ((2.0 * (x2 * t_0)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0)))))))))) - 3.0)) + t_2)))) elif x1 <= -1.05: tmp = t_9 elif x1 <= 1.38: tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_8 + (t_4 + (((t_7 * (3.0 + (x1 - (2.0 * x2)))) - t_6) * (-1.0 - (x1 * x1))))))) elif x1 <= 1.5e+97: tmp = t_9 else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_2)))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(3.0 * t_3) t_5 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_1) t_6 = Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) t_7 = Float64(Float64(x1 * 2.0) * t_5) t_8 = Float64(x1 * Float64(x1 * x1)) t_9 = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(Float64(t_1 * Float64(Float64(t_7 * Float64(Float64(Float64(1.0 + Float64(3.0 / x1)) - Float64(2.0 * Float64(x2 / x1))) / x1)) - t_6)) - t_4) - t_8)))) tmp = 0.0 if (x1 <= -1.15e+110) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(t_0 - Float64(x2 * -2.0))) - Float64(Float64(x2 * 8.0) - Float64(x1 * Float64(3.0 + Float64(t_2 + Float64(2.0 * Float64(Float64(2.0 * Float64(x2 * t_0)) + Float64(-1.0 - Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_0)))))))))) - 3.0)) + t_2))))); elseif (x1 <= -1.05) tmp = t_9; elseif (x1 <= 1.38) tmp = Float64(x1 + Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)) + Float64(x1 + Float64(t_8 + Float64(t_4 + Float64(Float64(Float64(t_7 * Float64(3.0 + Float64(x1 - Float64(2.0 * x2)))) - t_6) * Float64(-1.0 - Float64(x1 * x1)))))))); elseif (x1 <= 1.5e+97) tmp = t_9; 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))) + t_2))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = (x1 * x1) + 1.0; t_2 = 4.0 * (x2 * (3.0 - (2.0 * x2))); t_3 = x1 * (x1 * 3.0); t_4 = 3.0 * t_3; t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1; t_6 = (x1 * x1) * ((t_5 * 4.0) - 6.0); t_7 = (x1 * 2.0) * t_5; t_8 = x1 * (x1 * x1); t_9 = x1 + (9.0 + (x1 - (((t_1 * ((t_7 * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)) - t_6)) - t_4) - t_8))); tmp = 0.0; if (x1 <= -1.15e+110) tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_2 + (2.0 * ((2.0 * (x2 * t_0)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0)))))))))) - 3.0)) + t_2)))); elseif (x1 <= -1.05) tmp = t_9; elseif (x1 <= 1.38) tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_8 + (t_4 + (((t_7 * (3.0 + (x1 - (2.0 * x2)))) - t_6) * (-1.0 - (x1 * x1))))))); elseif (x1 <= 1.5e+97) tmp = t_9; else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_2)))); 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[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$8 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(x1 + N[(9.0 + N[(x1 - N[(N[(N[(t$95$1 * N[(N[(t$95$7 * N[(N[(N[(1.0 + N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] - t$95$6), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision] - t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.15e+110], N[(x1 + N[(9.0 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(t$95$0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x2 * 8.0), $MachinePrecision] - N[(x1 * N[(3.0 + N[(t$95$2 + N[(2.0 * N[(N[(2.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.05], t$95$9, If[LessEqual[x1, 1.38], N[(x1 + N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$8 + N[(t$95$4 + N[(N[(N[(t$95$7 * N[(3.0 + N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$6), $MachinePrecision] * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5e+97], t$95$9, 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] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := x1 \cdot x1 + 1\\
t_2 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := 3 \cdot t\_3\\
t_5 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_1}\\
t_6 := \left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right)\\
t_7 := \left(x1 \cdot 2\right) \cdot t\_5\\
t_8 := x1 \cdot \left(x1 \cdot x1\right)\\
t_9 := x1 + \left(9 + \left(x1 - \left(\left(t\_1 \cdot \left(t\_7 \cdot \frac{\left(1 + \frac{3}{x1}\right) - 2 \cdot \frac{x2}{x1}}{x1} - t\_6\right) - t\_4\right) - t\_8\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.15 \cdot 10^{+110}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(t\_0 - x2 \cdot -2\right) - \left(x2 \cdot 8 - x1 \cdot \left(3 + \left(t\_2 + 2 \cdot \left(2 \cdot \left(x2 \cdot t\_0\right) + \left(-1 - \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_0\right)\right)\right)\right)\right)\right)\right) - 3\right) + t\_2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.05:\\
\;\;\;\;t\_9\\
\mathbf{elif}\;x1 \leq 1.38:\\
\;\;\;\;x1 + \left(\left(x2 \cdot -6 + x1 \cdot -3\right) + \left(x1 + \left(t\_8 + \left(t\_4 + \left(t\_7 \cdot \left(3 + \left(x1 - 2 \cdot x2\right)\right) - t\_6\right) \cdot \left(-1 - x1 \cdot x1\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+97}:\\
\;\;\;\;t\_9\\
\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) + t\_2\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.15e110Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 75.0%
if -1.15e110 < x1 < -1.05000000000000004 or 1.3799999999999999 < x1 < 1.4999999999999999e97Initial program 94.7%
Taylor expanded in x1 around inf 93.1%
Taylor expanded in x1 around inf 93.1%
Taylor expanded in x1 around inf 91.7%
associate-*r/91.7%
metadata-eval91.7%
Simplified91.7%
if -1.05000000000000004 < x1 < 1.3799999999999999Initial program 99.3%
Taylor expanded in x1 around inf 98.2%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around 0 99.1%
+-commutative99.1%
mul-1-neg99.1%
sub-neg99.1%
Simplified99.1%
if 1.4999999999999999e97 < x1 Initial program 19.6%
Taylor expanded in x1 around 0 13.4%
Taylor expanded in x1 around 0 100.0%
Final simplification94.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- 3.0 (* 2.0 x2)))
(t_1 (- (* 2.0 x2) 3.0))
(t_2 (* x1 (* x1 x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (* 3.0 t_3))
(t_5 (- (+ t_3 (* 2.0 x2)) x1))
(t_6 (+ (* x1 x1) 1.0))
(t_7 (* (* (* x1 2.0) (/ t_5 t_6)) (+ 3.0 (/ t_5 (- -1.0 (* x1 x1))))))
(t_8 (* 4.0 (* x2 t_0))))
(if (<= x1 -1.15e+110)
(+
x1
(+
9.0
(-
x1
(*
x1
(+
(*
x1
(-
(-
(* 2.0 (- t_1 (* x2 -2.0)))
(-
(* x2 8.0)
(*
x1
(+
3.0
(+
t_8
(*
2.0
(+
(* 2.0 (* x2 t_1))
(-
-1.0
(+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_1))))))))))
3.0))
t_8)))))
(if (<= x1 -12.0)
(+
x1
(+
9.0
(+
x1
(+
t_2
(-
t_4
(*
t_6
(+
(* (* x1 x1) (+ 6.0 (* 4.0 (- (/ (+ 1.0 (/ t_0 x1)) x1) 3.0))))
t_7)))))))
(if (<= x1 8.6e+93)
(-
x1
(-
(* 3.0 (/ (- x1 (- t_3 (* 2.0 x2))) t_6))
(- x1 (- (- (* t_6 (- t_7 (* (* x1 x1) 6.0))) t_4) t_2))))
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+ (* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0))) t_8))))))))))
double code(double x1, double x2) {
double t_0 = 3.0 - (2.0 * x2);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * t_3;
double t_5 = (t_3 + (2.0 * x2)) - x1;
double t_6 = (x1 * x1) + 1.0;
double t_7 = ((x1 * 2.0) * (t_5 / t_6)) * (3.0 + (t_5 / (-1.0 - (x1 * x1))));
double t_8 = 4.0 * (x2 * t_0);
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8))));
} else if (x1 <= -12.0) {
tmp = x1 + (9.0 + (x1 + (t_2 + (t_4 - (t_6 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + (t_0 / x1)) / x1) - 3.0)))) + t_7))))));
} else if (x1 <= 8.6e+93) {
tmp = x1 - ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_6)) - (x1 - (((t_6 * (t_7 - ((x1 * x1) * 6.0))) - t_4) - t_2)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = 3.0d0 - (2.0d0 * x2)
t_1 = (2.0d0 * x2) - 3.0d0
t_2 = x1 * (x1 * x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = 3.0d0 * t_3
t_5 = (t_3 + (2.0d0 * x2)) - x1
t_6 = (x1 * x1) + 1.0d0
t_7 = ((x1 * 2.0d0) * (t_5 / t_6)) * (3.0d0 + (t_5 / ((-1.0d0) - (x1 * x1))))
t_8 = 4.0d0 * (x2 * t_0)
if (x1 <= (-1.15d+110)) then
tmp = x1 + (9.0d0 + (x1 - (x1 * ((x1 * (((2.0d0 * (t_1 - (x2 * (-2.0d0)))) - ((x2 * 8.0d0) - (x1 * (3.0d0 + (t_8 + (2.0d0 * ((2.0d0 * (x2 * t_1)) + ((-1.0d0) - ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_1)))))))))) - 3.0d0)) + t_8))))
else if (x1 <= (-12.0d0)) then
tmp = x1 + (9.0d0 + (x1 + (t_2 + (t_4 - (t_6 * (((x1 * x1) * (6.0d0 + (4.0d0 * (((1.0d0 + (t_0 / x1)) / x1) - 3.0d0)))) + t_7))))))
else if (x1 <= 8.6d+93) then
tmp = x1 - ((3.0d0 * ((x1 - (t_3 - (2.0d0 * x2))) / t_6)) - (x1 - (((t_6 * (t_7 - ((x1 * x1) * 6.0d0))) - t_4) - t_2)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_8))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 - (2.0 * x2);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * t_3;
double t_5 = (t_3 + (2.0 * x2)) - x1;
double t_6 = (x1 * x1) + 1.0;
double t_7 = ((x1 * 2.0) * (t_5 / t_6)) * (3.0 + (t_5 / (-1.0 - (x1 * x1))));
double t_8 = 4.0 * (x2 * t_0);
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8))));
} else if (x1 <= -12.0) {
tmp = x1 + (9.0 + (x1 + (t_2 + (t_4 - (t_6 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + (t_0 / x1)) / x1) - 3.0)))) + t_7))))));
} else if (x1 <= 8.6e+93) {
tmp = x1 - ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_6)) - (x1 - (((t_6 * (t_7 - ((x1 * x1) * 6.0))) - t_4) - t_2)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8))));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 - (2.0 * x2) t_1 = (2.0 * x2) - 3.0 t_2 = x1 * (x1 * x1) t_3 = x1 * (x1 * 3.0) t_4 = 3.0 * t_3 t_5 = (t_3 + (2.0 * x2)) - x1 t_6 = (x1 * x1) + 1.0 t_7 = ((x1 * 2.0) * (t_5 / t_6)) * (3.0 + (t_5 / (-1.0 - (x1 * x1)))) t_8 = 4.0 * (x2 * t_0) tmp = 0 if x1 <= -1.15e+110: tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8)))) elif x1 <= -12.0: tmp = x1 + (9.0 + (x1 + (t_2 + (t_4 - (t_6 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + (t_0 / x1)) / x1) - 3.0)))) + t_7)))))) elif x1 <= 8.6e+93: tmp = x1 - ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_6)) - (x1 - (((t_6 * (t_7 - ((x1 * x1) * 6.0))) - t_4) - t_2))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8)))) return tmp
function code(x1, x2) t_0 = Float64(3.0 - Float64(2.0 * x2)) t_1 = Float64(Float64(2.0 * x2) - 3.0) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(3.0 * t_3) t_5 = Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) t_6 = Float64(Float64(x1 * x1) + 1.0) t_7 = Float64(Float64(Float64(x1 * 2.0) * Float64(t_5 / t_6)) * Float64(3.0 + Float64(t_5 / Float64(-1.0 - Float64(x1 * x1))))) t_8 = Float64(4.0 * Float64(x2 * t_0)) tmp = 0.0 if (x1 <= -1.15e+110) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(t_1 - Float64(x2 * -2.0))) - Float64(Float64(x2 * 8.0) - Float64(x1 * Float64(3.0 + Float64(t_8 + Float64(2.0 * Float64(Float64(2.0 * Float64(x2 * t_1)) + Float64(-1.0 - Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_1)))))))))) - 3.0)) + t_8))))); elseif (x1 <= -12.0) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_2 + Float64(t_4 - Float64(t_6 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(Float64(1.0 + Float64(t_0 / x1)) / x1) - 3.0)))) + t_7))))))); elseif (x1 <= 8.6e+93) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_3 - Float64(2.0 * x2))) / t_6)) - Float64(x1 - Float64(Float64(Float64(t_6 * Float64(t_7 - Float64(Float64(x1 * x1) * 6.0))) - t_4) - t_2)))); 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))) + t_8))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 - (2.0 * x2); t_1 = (2.0 * x2) - 3.0; t_2 = x1 * (x1 * x1); t_3 = x1 * (x1 * 3.0); t_4 = 3.0 * t_3; t_5 = (t_3 + (2.0 * x2)) - x1; t_6 = (x1 * x1) + 1.0; t_7 = ((x1 * 2.0) * (t_5 / t_6)) * (3.0 + (t_5 / (-1.0 - (x1 * x1)))); t_8 = 4.0 * (x2 * t_0); tmp = 0.0; if (x1 <= -1.15e+110) tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8)))); elseif (x1 <= -12.0) tmp = x1 + (9.0 + (x1 + (t_2 + (t_4 - (t_6 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 + (t_0 / x1)) / x1) - 3.0)))) + t_7)))))); elseif (x1 <= 8.6e+93) tmp = x1 - ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_6)) - (x1 - (((t_6 * (t_7 - ((x1 * x1) * 6.0))) - t_4) - t_2))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$7 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$5 / t$95$6), $MachinePrecision]), $MachinePrecision] * N[(3.0 + N[(t$95$5 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.15e+110], N[(x1 + N[(9.0 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(t$95$1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x2 * 8.0), $MachinePrecision] - N[(x1 * N[(3.0 + N[(t$95$8 + N[(2.0 * N[(N[(2.0 * N[(x2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -12.0], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$2 + N[(t$95$4 - N[(t$95$6 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(N[(1.0 + N[(t$95$0 / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.6e+93], N[(x1 - N[(N[(3.0 * N[(N[(x1 - N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$6), $MachinePrecision]), $MachinePrecision] - N[(x1 - N[(N[(N[(t$95$6 * N[(t$95$7 - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision] - t$95$2), $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] + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 - 2 \cdot x2\\
t_1 := 2 \cdot x2 - 3\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := 3 \cdot t\_3\\
t_5 := \left(t\_3 + 2 \cdot x2\right) - x1\\
t_6 := x1 \cdot x1 + 1\\
t_7 := \left(\left(x1 \cdot 2\right) \cdot \frac{t\_5}{t\_6}\right) \cdot \left(3 + \frac{t\_5}{-1 - x1 \cdot x1}\right)\\
t_8 := 4 \cdot \left(x2 \cdot t\_0\right)\\
\mathbf{if}\;x1 \leq -1.15 \cdot 10^{+110}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(t\_1 - x2 \cdot -2\right) - \left(x2 \cdot 8 - x1 \cdot \left(3 + \left(t\_8 + 2 \cdot \left(2 \cdot \left(x2 \cdot t\_1\right) + \left(-1 - \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_1\right)\right)\right)\right)\right)\right)\right) - 3\right) + t\_8\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -12:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_2 + \left(t\_4 - t\_6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 + \frac{t\_0}{x1}}{x1} - 3\right)\right) + t\_7\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8.6 \cdot 10^{+93}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{x1 - \left(t\_3 - 2 \cdot x2\right)}{t\_6} - \left(x1 - \left(\left(t\_6 \cdot \left(t\_7 - \left(x1 \cdot x1\right) \cdot 6\right) - t\_4\right) - t\_2\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) + t\_8\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.15e110Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 75.0%
if -1.15e110 < x1 < -12Initial program 90.3%
Taylor expanded in x1 around inf 90.2%
Taylor expanded in x1 around inf 90.2%
Taylor expanded in x1 around -inf 90.6%
if -12 < x1 < 8.6e93Initial program 99.3%
Taylor expanded in x1 around inf 97.8%
Taylor expanded in x1 around inf 97.3%
if 8.6e93 < x1 Initial program 21.3%
Taylor expanded in x1 around 0 13.1%
Taylor expanded in x1 around 0 97.9%
Final simplification93.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (- -1.0 (* x1 x1)))
(t_2 (* x1 (* x1 x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (- (+ t_3 (* 2.0 x2)) x1))
(t_5 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))
(t_6 (+ (* x1 x1) 1.0))
(t_7 (/ t_4 t_6))
(t_8 (* (* x1 2.0) t_7))
(t_9 (* 3.0 t_3)))
(if (<= x1 -1.15e+110)
(+
x1
(+
9.0
(-
x1
(*
x1
(+
(*
x1
(-
(-
(* 2.0 (- t_0 (* x2 -2.0)))
(-
(* x2 8.0)
(*
x1
(+
3.0
(+
t_5
(*
2.0
(+
(* 2.0 (* x2 t_0))
(-
-1.0
(+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_0))))))))))
3.0))
t_5)))))
(if (<= x1 -5.6e-12)
(-
x1
(-
(-
(-
(-
(* (+ (* t_8 (- t_7 3.0)) (* (* x1 x1) (- (* t_7 4.0) 6.0))) t_1)
t_9)
t_2)
x1)
(* x1 -3.0)))
(if (<= x1 8.6e+93)
(-
x1
(-
(* 3.0 (/ (- x1 (- t_3 (* 2.0 x2))) t_6))
(-
x1
(-
(- (* t_6 (- (* t_8 (+ 3.0 (/ t_4 t_1))) (* (* x1 x1) 6.0))) t_9)
t_2))))
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+ (* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0))) t_5))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = -1.0 - (x1 * x1);
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_6 = (x1 * x1) + 1.0;
double t_7 = t_4 / t_6;
double t_8 = (x1 * 2.0) * t_7;
double t_9 = 3.0 * t_3;
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_5 + (2.0 * ((2.0 * (x2 * t_0)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0)))))))))) - 3.0)) + t_5))));
} else if (x1 <= -5.6e-12) {
tmp = x1 - (((((((t_8 * (t_7 - 3.0)) + ((x1 * x1) * ((t_7 * 4.0) - 6.0))) * t_1) - t_9) - t_2) - x1) - (x1 * -3.0));
} else if (x1 <= 8.6e+93) {
tmp = x1 - ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_6)) - (x1 - (((t_6 * ((t_8 * (3.0 + (t_4 / t_1))) - ((x1 * x1) * 6.0))) - t_9) - t_2)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_5))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = (-1.0d0) - (x1 * x1)
t_2 = x1 * (x1 * x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = (t_3 + (2.0d0 * x2)) - x1
t_5 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
t_6 = (x1 * x1) + 1.0d0
t_7 = t_4 / t_6
t_8 = (x1 * 2.0d0) * t_7
t_9 = 3.0d0 * t_3
if (x1 <= (-1.15d+110)) then
tmp = x1 + (9.0d0 + (x1 - (x1 * ((x1 * (((2.0d0 * (t_0 - (x2 * (-2.0d0)))) - ((x2 * 8.0d0) - (x1 * (3.0d0 + (t_5 + (2.0d0 * ((2.0d0 * (x2 * t_0)) + ((-1.0d0) - ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_0)))))))))) - 3.0d0)) + t_5))))
else if (x1 <= (-5.6d-12)) then
tmp = x1 - (((((((t_8 * (t_7 - 3.0d0)) + ((x1 * x1) * ((t_7 * 4.0d0) - 6.0d0))) * t_1) - t_9) - t_2) - x1) - (x1 * (-3.0d0)))
else if (x1 <= 8.6d+93) then
tmp = x1 - ((3.0d0 * ((x1 - (t_3 - (2.0d0 * x2))) / t_6)) - (x1 - (((t_6 * ((t_8 * (3.0d0 + (t_4 / t_1))) - ((x1 * x1) * 6.0d0))) - t_9) - t_2)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_5))))
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 = -1.0 - (x1 * x1);
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_6 = (x1 * x1) + 1.0;
double t_7 = t_4 / t_6;
double t_8 = (x1 * 2.0) * t_7;
double t_9 = 3.0 * t_3;
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_5 + (2.0 * ((2.0 * (x2 * t_0)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0)))))))))) - 3.0)) + t_5))));
} else if (x1 <= -5.6e-12) {
tmp = x1 - (((((((t_8 * (t_7 - 3.0)) + ((x1 * x1) * ((t_7 * 4.0) - 6.0))) * t_1) - t_9) - t_2) - x1) - (x1 * -3.0));
} else if (x1 <= 8.6e+93) {
tmp = x1 - ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_6)) - (x1 - (((t_6 * ((t_8 * (3.0 + (t_4 / t_1))) - ((x1 * x1) * 6.0))) - t_9) - t_2)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_5))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = -1.0 - (x1 * x1) t_2 = x1 * (x1 * x1) t_3 = x1 * (x1 * 3.0) t_4 = (t_3 + (2.0 * x2)) - x1 t_5 = 4.0 * (x2 * (3.0 - (2.0 * x2))) t_6 = (x1 * x1) + 1.0 t_7 = t_4 / t_6 t_8 = (x1 * 2.0) * t_7 t_9 = 3.0 * t_3 tmp = 0 if x1 <= -1.15e+110: tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_5 + (2.0 * ((2.0 * (x2 * t_0)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0)))))))))) - 3.0)) + t_5)))) elif x1 <= -5.6e-12: tmp = x1 - (((((((t_8 * (t_7 - 3.0)) + ((x1 * x1) * ((t_7 * 4.0) - 6.0))) * t_1) - t_9) - t_2) - x1) - (x1 * -3.0)) elif x1 <= 8.6e+93: tmp = x1 - ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_6)) - (x1 - (((t_6 * ((t_8 * (3.0 + (t_4 / t_1))) - ((x1 * x1) * 6.0))) - t_9) - t_2))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_5)))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(-1.0 - Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) t_5 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) t_6 = Float64(Float64(x1 * x1) + 1.0) t_7 = Float64(t_4 / t_6) t_8 = Float64(Float64(x1 * 2.0) * t_7) t_9 = Float64(3.0 * t_3) tmp = 0.0 if (x1 <= -1.15e+110) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(t_0 - Float64(x2 * -2.0))) - Float64(Float64(x2 * 8.0) - Float64(x1 * Float64(3.0 + Float64(t_5 + Float64(2.0 * Float64(Float64(2.0 * Float64(x2 * t_0)) + Float64(-1.0 - Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_0)))))))))) - 3.0)) + t_5))))); elseif (x1 <= -5.6e-12) tmp = Float64(x1 - Float64(Float64(Float64(Float64(Float64(Float64(Float64(t_8 * Float64(t_7 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_7 * 4.0) - 6.0))) * t_1) - t_9) - t_2) - x1) - Float64(x1 * -3.0))); elseif (x1 <= 8.6e+93) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_3 - Float64(2.0 * x2))) / t_6)) - Float64(x1 - Float64(Float64(Float64(t_6 * Float64(Float64(t_8 * Float64(3.0 + Float64(t_4 / t_1))) - Float64(Float64(x1 * x1) * 6.0))) - t_9) - t_2)))); 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))) + t_5))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = -1.0 - (x1 * x1); t_2 = x1 * (x1 * x1); t_3 = x1 * (x1 * 3.0); t_4 = (t_3 + (2.0 * x2)) - x1; t_5 = 4.0 * (x2 * (3.0 - (2.0 * x2))); t_6 = (x1 * x1) + 1.0; t_7 = t_4 / t_6; t_8 = (x1 * 2.0) * t_7; t_9 = 3.0 * t_3; tmp = 0.0; if (x1 <= -1.15e+110) tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_5 + (2.0 * ((2.0 * (x2 * t_0)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0)))))))))) - 3.0)) + t_5)))); elseif (x1 <= -5.6e-12) tmp = x1 - (((((((t_8 * (t_7 - 3.0)) + ((x1 * x1) * ((t_7 * 4.0) - 6.0))) * t_1) - t_9) - t_2) - x1) - (x1 * -3.0)); elseif (x1 <= 8.6e+93) tmp = x1 - ((3.0 * ((x1 - (t_3 - (2.0 * x2))) / t_6)) - (x1 - (((t_6 * ((t_8 * (3.0 + (t_4 / t_1))) - ((x1 * x1) * 6.0))) - t_9) - t_2))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_5)))); 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[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$5 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$4 / t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$7), $MachinePrecision]}, Block[{t$95$9 = N[(3.0 * t$95$3), $MachinePrecision]}, If[LessEqual[x1, -1.15e+110], N[(x1 + N[(9.0 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(t$95$0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x2 * 8.0), $MachinePrecision] - N[(x1 * N[(3.0 + N[(t$95$5 + N[(2.0 * N[(N[(2.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e-12], N[(x1 - N[(N[(N[(N[(N[(N[(N[(t$95$8 * N[(t$95$7 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$7 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - t$95$9), $MachinePrecision] - t$95$2), $MachinePrecision] - x1), $MachinePrecision] - N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.6e+93], N[(x1 - N[(N[(3.0 * N[(N[(x1 - N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$6), $MachinePrecision]), $MachinePrecision] - N[(x1 - N[(N[(N[(t$95$6 * N[(N[(t$95$8 * N[(3.0 + N[(t$95$4 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$9), $MachinePrecision] - t$95$2), $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] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := -1 - x1 \cdot x1\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \left(t\_3 + 2 \cdot x2\right) - x1\\
t_5 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
t_6 := x1 \cdot x1 + 1\\
t_7 := \frac{t\_4}{t\_6}\\
t_8 := \left(x1 \cdot 2\right) \cdot t\_7\\
t_9 := 3 \cdot t\_3\\
\mathbf{if}\;x1 \leq -1.15 \cdot 10^{+110}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(t\_0 - x2 \cdot -2\right) - \left(x2 \cdot 8 - x1 \cdot \left(3 + \left(t\_5 + 2 \cdot \left(2 \cdot \left(x2 \cdot t\_0\right) + \left(-1 - \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_0\right)\right)\right)\right)\right)\right)\right) - 3\right) + t\_5\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{-12}:\\
\;\;\;\;x1 - \left(\left(\left(\left(\left(t\_8 \cdot \left(t\_7 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_7 \cdot 4 - 6\right)\right) \cdot t\_1 - t\_9\right) - t\_2\right) - x1\right) - x1 \cdot -3\right)\\
\mathbf{elif}\;x1 \leq 8.6 \cdot 10^{+93}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{x1 - \left(t\_3 - 2 \cdot x2\right)}{t\_6} - \left(x1 - \left(\left(t\_6 \cdot \left(t\_8 \cdot \left(3 + \frac{t\_4}{t\_1}\right) - \left(x1 \cdot x1\right) \cdot 6\right) - t\_9\right) - t\_2\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) + t\_5\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.15e110Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 75.0%
if -1.15e110 < x1 < -5.6000000000000004e-12Initial program 91.0%
Taylor expanded in x1 around inf 88.1%
Taylor expanded in x1 around 0 90.9%
Taylor expanded in x2 around 0 90.9%
*-commutative90.9%
Simplified90.9%
if -5.6000000000000004e-12 < x1 < 8.6e93Initial program 99.3%
Taylor expanded in x1 around inf 98.3%
Taylor expanded in x1 around inf 97.7%
if 8.6e93 < x1 Initial program 21.3%
Taylor expanded in x1 around 0 13.1%
Taylor expanded in x1 around 0 97.9%
Final simplification93.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (* 2.0 x2) 3.0))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (* 3.0 t_0))
(t_4 (* x1 (* x1 x1)))
(t_5 (- (+ t_0 (* 2.0 x2)) x1))
(t_6 (+ (* x1 x1) 1.0))
(t_7 (+ 3.0 (/ t_5 t_2)))
(t_8 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))
(t_9 (/ t_5 t_6))
(t_10 (* (* x1 2.0) t_9))
(t_11 (* t_9 4.0)))
(if (<= x1 -1.15e+110)
(+
x1
(+
9.0
(-
x1
(*
x1
(+
(*
x1
(-
(-
(* 2.0 (- t_1 (* x2 -2.0)))
(-
(* x2 8.0)
(*
x1
(+
3.0
(+
t_8
(*
2.0
(+
(* 2.0 (* x2 t_1))
(-
-1.0
(+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_1))))))))))
3.0))
t_8)))))
(if (<= x1 -21.0)
(+
x1
(+
9.0
(-
x1
(-
(-
(* t_6 (+ (* (* x1 x1) (- 6.0 t_11)) (* (* (* x1 2.0) 3.0) t_7)))
t_3)
t_4))))
(if (<= x1 0.051)
(+
x1
(+
(+ (* x2 -6.0) (* x1 -3.0))
(+
x1
(+
t_4
(+
t_3
(*
(-
(* t_10 (+ 3.0 (- x1 (* 2.0 x2))))
(* (* x1 x1) (- t_11 6.0)))
t_2))))))
(if (<= x1 8.6e+93)
(+
x1
(+
9.0
(-
x1
(- (- (* t_6 (- (* t_10 t_7) (* (* x1 x1) 6.0))) t_3) t_4))))
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0)))
t_8)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = -1.0 - (x1 * x1);
double t_3 = 3.0 * t_0;
double t_4 = x1 * (x1 * x1);
double t_5 = (t_0 + (2.0 * x2)) - x1;
double t_6 = (x1 * x1) + 1.0;
double t_7 = 3.0 + (t_5 / t_2);
double t_8 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_9 = t_5 / t_6;
double t_10 = (x1 * 2.0) * t_9;
double t_11 = t_9 * 4.0;
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8))));
} else if (x1 <= -21.0) {
tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - t_11)) + (((x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4)));
} else if (x1 <= 0.051) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_4 + (t_3 + (((t_10 * (3.0 + (x1 - (2.0 * x2)))) - ((x1 * x1) * (t_11 - 6.0))) * t_2)))));
} else if (x1 <= 8.6e+93) {
tmp = x1 + (9.0 + (x1 - (((t_6 * ((t_10 * t_7) - ((x1 * x1) * 6.0))) - t_3) - t_4)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8))));
}
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_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 * 3.0d0)
t_1 = (2.0d0 * x2) - 3.0d0
t_2 = (-1.0d0) - (x1 * x1)
t_3 = 3.0d0 * t_0
t_4 = x1 * (x1 * x1)
t_5 = (t_0 + (2.0d0 * x2)) - x1
t_6 = (x1 * x1) + 1.0d0
t_7 = 3.0d0 + (t_5 / t_2)
t_8 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
t_9 = t_5 / t_6
t_10 = (x1 * 2.0d0) * t_9
t_11 = t_9 * 4.0d0
if (x1 <= (-1.15d+110)) then
tmp = x1 + (9.0d0 + (x1 - (x1 * ((x1 * (((2.0d0 * (t_1 - (x2 * (-2.0d0)))) - ((x2 * 8.0d0) - (x1 * (3.0d0 + (t_8 + (2.0d0 * ((2.0d0 * (x2 * t_1)) + ((-1.0d0) - ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_1)))))))))) - 3.0d0)) + t_8))))
else if (x1 <= (-21.0d0)) then
tmp = x1 + (9.0d0 + (x1 - (((t_6 * (((x1 * x1) * (6.0d0 - t_11)) + (((x1 * 2.0d0) * 3.0d0) * t_7))) - t_3) - t_4)))
else if (x1 <= 0.051d0) then
tmp = x1 + (((x2 * (-6.0d0)) + (x1 * (-3.0d0))) + (x1 + (t_4 + (t_3 + (((t_10 * (3.0d0 + (x1 - (2.0d0 * x2)))) - ((x1 * x1) * (t_11 - 6.0d0))) * t_2)))))
else if (x1 <= 8.6d+93) then
tmp = x1 + (9.0d0 + (x1 - (((t_6 * ((t_10 * t_7) - ((x1 * x1) * 6.0d0))) - t_3) - t_4)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_8))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = -1.0 - (x1 * x1);
double t_3 = 3.0 * t_0;
double t_4 = x1 * (x1 * x1);
double t_5 = (t_0 + (2.0 * x2)) - x1;
double t_6 = (x1 * x1) + 1.0;
double t_7 = 3.0 + (t_5 / t_2);
double t_8 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_9 = t_5 / t_6;
double t_10 = (x1 * 2.0) * t_9;
double t_11 = t_9 * 4.0;
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8))));
} else if (x1 <= -21.0) {
tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - t_11)) + (((x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4)));
} else if (x1 <= 0.051) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_4 + (t_3 + (((t_10 * (3.0 + (x1 - (2.0 * x2)))) - ((x1 * x1) * (t_11 - 6.0))) * t_2)))));
} else if (x1 <= 8.6e+93) {
tmp = x1 + (9.0 + (x1 - (((t_6 * ((t_10 * t_7) - ((x1 * x1) * 6.0))) - t_3) - t_4)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (2.0 * x2) - 3.0 t_2 = -1.0 - (x1 * x1) t_3 = 3.0 * t_0 t_4 = x1 * (x1 * x1) t_5 = (t_0 + (2.0 * x2)) - x1 t_6 = (x1 * x1) + 1.0 t_7 = 3.0 + (t_5 / t_2) t_8 = 4.0 * (x2 * (3.0 - (2.0 * x2))) t_9 = t_5 / t_6 t_10 = (x1 * 2.0) * t_9 t_11 = t_9 * 4.0 tmp = 0 if x1 <= -1.15e+110: tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8)))) elif x1 <= -21.0: tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - t_11)) + (((x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4))) elif x1 <= 0.051: tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_4 + (t_3 + (((t_10 * (3.0 + (x1 - (2.0 * x2)))) - ((x1 * x1) * (t_11 - 6.0))) * t_2))))) elif x1 <= 8.6e+93: tmp = x1 + (9.0 + (x1 - (((t_6 * ((t_10 * t_7) - ((x1 * x1) * 6.0))) - t_3) - t_4))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8)))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(2.0 * x2) - 3.0) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(3.0 * t_0) t_4 = Float64(x1 * Float64(x1 * x1)) t_5 = Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) t_6 = Float64(Float64(x1 * x1) + 1.0) t_7 = Float64(3.0 + Float64(t_5 / t_2)) t_8 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) t_9 = Float64(t_5 / t_6) t_10 = Float64(Float64(x1 * 2.0) * t_9) t_11 = Float64(t_9 * 4.0) tmp = 0.0 if (x1 <= -1.15e+110) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(t_1 - Float64(x2 * -2.0))) - Float64(Float64(x2 * 8.0) - Float64(x1 * Float64(3.0 + Float64(t_8 + Float64(2.0 * Float64(Float64(2.0 * Float64(x2 * t_1)) + Float64(-1.0 - Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_1)))))))))) - 3.0)) + t_8))))); elseif (x1 <= -21.0) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(Float64(t_6 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - t_11)) + Float64(Float64(Float64(x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4)))); elseif (x1 <= 0.051) tmp = Float64(x1 + Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)) + Float64(x1 + Float64(t_4 + Float64(t_3 + Float64(Float64(Float64(t_10 * Float64(3.0 + Float64(x1 - Float64(2.0 * x2)))) - Float64(Float64(x1 * x1) * Float64(t_11 - 6.0))) * t_2)))))); elseif (x1 <= 8.6e+93) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(Float64(t_6 * Float64(Float64(t_10 * t_7) - Float64(Float64(x1 * x1) * 6.0))) - t_3) - t_4)))); 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))) + t_8))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (2.0 * x2) - 3.0; t_2 = -1.0 - (x1 * x1); t_3 = 3.0 * t_0; t_4 = x1 * (x1 * x1); t_5 = (t_0 + (2.0 * x2)) - x1; t_6 = (x1 * x1) + 1.0; t_7 = 3.0 + (t_5 / t_2); t_8 = 4.0 * (x2 * (3.0 - (2.0 * x2))); t_9 = t_5 / t_6; t_10 = (x1 * 2.0) * t_9; t_11 = t_9 * 4.0; tmp = 0.0; if (x1 <= -1.15e+110) tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8)))); elseif (x1 <= -21.0) tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - t_11)) + (((x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4))); elseif (x1 <= 0.051) tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_4 + (t_3 + (((t_10 * (3.0 + (x1 - (2.0 * x2)))) - ((x1 * x1) * (t_11 - 6.0))) * t_2))))); elseif (x1 <= 8.6e+93) tmp = x1 + (9.0 + (x1 - (((t_6 * ((t_10 * t_7) - ((x1 * x1) * 6.0))) - t_3) - t_4))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8)))); 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[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 + N[(t$95$5 / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$5 / t$95$6), $MachinePrecision]}, Block[{t$95$10 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$9), $MachinePrecision]}, Block[{t$95$11 = N[(t$95$9 * 4.0), $MachinePrecision]}, If[LessEqual[x1, -1.15e+110], N[(x1 + N[(9.0 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(t$95$1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x2 * 8.0), $MachinePrecision] - N[(x1 * N[(3.0 + N[(t$95$8 + N[(2.0 * N[(N[(2.0 * N[(x2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -21.0], N[(x1 + N[(9.0 + N[(x1 - N[(N[(N[(t$95$6 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - t$95$11), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] - t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.051], N[(x1 + N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$4 + N[(t$95$3 + N[(N[(N[(t$95$10 * N[(3.0 + N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(t$95$11 - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.6e+93], N[(x1 + N[(9.0 + N[(x1 - N[(N[(N[(t$95$6 * N[(N[(t$95$10 * t$95$7), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] - t$95$4), $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] + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 2 \cdot x2 - 3\\
t_2 := -1 - x1 \cdot x1\\
t_3 := 3 \cdot t\_0\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
t_5 := \left(t\_0 + 2 \cdot x2\right) - x1\\
t_6 := x1 \cdot x1 + 1\\
t_7 := 3 + \frac{t\_5}{t\_2}\\
t_8 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
t_9 := \frac{t\_5}{t\_6}\\
t_10 := \left(x1 \cdot 2\right) \cdot t\_9\\
t_11 := t\_9 \cdot 4\\
\mathbf{if}\;x1 \leq -1.15 \cdot 10^{+110}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(t\_1 - x2 \cdot -2\right) - \left(x2 \cdot 8 - x1 \cdot \left(3 + \left(t\_8 + 2 \cdot \left(2 \cdot \left(x2 \cdot t\_1\right) + \left(-1 - \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_1\right)\right)\right)\right)\right)\right)\right) - 3\right) + t\_8\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -21:\\
\;\;\;\;x1 + \left(9 + \left(x1 - \left(\left(t\_6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_11\right) + \left(\left(x1 \cdot 2\right) \cdot 3\right) \cdot t\_7\right) - t\_3\right) - t\_4\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.051:\\
\;\;\;\;x1 + \left(\left(x2 \cdot -6 + x1 \cdot -3\right) + \left(x1 + \left(t\_4 + \left(t\_3 + \left(t\_10 \cdot \left(3 + \left(x1 - 2 \cdot x2\right)\right) - \left(x1 \cdot x1\right) \cdot \left(t\_11 - 6\right)\right) \cdot t\_2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8.6 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - \left(\left(t\_6 \cdot \left(t\_10 \cdot t\_7 - \left(x1 \cdot x1\right) \cdot 6\right) - t\_3\right) - t\_4\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) + t\_8\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.15e110Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 75.0%
if -1.15e110 < x1 < -21Initial program 90.3%
Taylor expanded in x1 around inf 90.2%
Taylor expanded in x1 around inf 90.2%
Taylor expanded in x1 around inf 79.3%
if -21 < x1 < 0.0509999999999999967Initial program 99.3%
Taylor expanded in x1 around inf 98.2%
Taylor expanded in x1 around 0 99.3%
Taylor expanded in x1 around 0 98.4%
+-commutative98.4%
mul-1-neg98.4%
sub-neg98.4%
Simplified98.4%
if 0.0509999999999999967 < x1 < 8.6e93Initial program 98.9%
Taylor expanded in x1 around inf 95.5%
Taylor expanded in x1 around inf 95.5%
Taylor expanded in x1 around inf 92.0%
if 8.6e93 < x1 Initial program 21.3%
Taylor expanded in x1 around 0 13.1%
Taylor expanded in x1 around 0 97.9%
Final simplification92.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (* 2.0 x2) 3.0))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (* 3.0 t_0))
(t_4 (* x1 (* x1 x1)))
(t_5 (- (+ t_0 (* 2.0 x2)) x1))
(t_6 (+ (* x1 x1) 1.0))
(t_7 (+ 3.0 (/ t_5 t_2)))
(t_8 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))
(t_9 (/ t_5 t_6))
(t_10 (* t_9 4.0))
(t_11 (* (* x1 2.0) t_9)))
(if (<= x1 -1.15e+110)
(+
x1
(+
9.0
(-
x1
(*
x1
(+
(*
x1
(-
(-
(* 2.0 (- t_1 (* x2 -2.0)))
(-
(* x2 8.0)
(*
x1
(+
3.0
(+
t_8
(*
2.0
(+
(* 2.0 (* x2 t_1))
(-
-1.0
(+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_1))))))))))
3.0))
t_8)))))
(if (<= x1 -9500.0)
(+
x1
(+
9.0
(-
x1
(-
(-
(* t_6 (+ (* (* x1 x1) (- 6.0 t_10)) (* (* (* x1 2.0) 3.0) t_7)))
t_3)
t_4))))
(if (<= x1 0.0068)
(+
x1
(+
(+ (* x2 -6.0) (* x1 -3.0))
(+
x1
(+
t_4
(- t_3 (* (+ (* (* x1 x1) (- t_10 6.0)) (* t_11 t_1)) t_2))))))
(if (<= x1 8.6e+93)
(+
x1
(+
9.0
(-
x1
(- (- (* t_6 (- (* t_11 t_7) (* (* x1 x1) 6.0))) t_3) t_4))))
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0)))
t_8)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = -1.0 - (x1 * x1);
double t_3 = 3.0 * t_0;
double t_4 = x1 * (x1 * x1);
double t_5 = (t_0 + (2.0 * x2)) - x1;
double t_6 = (x1 * x1) + 1.0;
double t_7 = 3.0 + (t_5 / t_2);
double t_8 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_9 = t_5 / t_6;
double t_10 = t_9 * 4.0;
double t_11 = (x1 * 2.0) * t_9;
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8))));
} else if (x1 <= -9500.0) {
tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - t_10)) + (((x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4)));
} else if (x1 <= 0.0068) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_4 + (t_3 - ((((x1 * x1) * (t_10 - 6.0)) + (t_11 * t_1)) * t_2)))));
} else if (x1 <= 8.6e+93) {
tmp = x1 + (9.0 + (x1 - (((t_6 * ((t_11 * t_7) - ((x1 * x1) * 6.0))) - t_3) - t_4)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8))));
}
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_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 * 3.0d0)
t_1 = (2.0d0 * x2) - 3.0d0
t_2 = (-1.0d0) - (x1 * x1)
t_3 = 3.0d0 * t_0
t_4 = x1 * (x1 * x1)
t_5 = (t_0 + (2.0d0 * x2)) - x1
t_6 = (x1 * x1) + 1.0d0
t_7 = 3.0d0 + (t_5 / t_2)
t_8 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
t_9 = t_5 / t_6
t_10 = t_9 * 4.0d0
t_11 = (x1 * 2.0d0) * t_9
if (x1 <= (-1.15d+110)) then
tmp = x1 + (9.0d0 + (x1 - (x1 * ((x1 * (((2.0d0 * (t_1 - (x2 * (-2.0d0)))) - ((x2 * 8.0d0) - (x1 * (3.0d0 + (t_8 + (2.0d0 * ((2.0d0 * (x2 * t_1)) + ((-1.0d0) - ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_1)))))))))) - 3.0d0)) + t_8))))
else if (x1 <= (-9500.0d0)) then
tmp = x1 + (9.0d0 + (x1 - (((t_6 * (((x1 * x1) * (6.0d0 - t_10)) + (((x1 * 2.0d0) * 3.0d0) * t_7))) - t_3) - t_4)))
else if (x1 <= 0.0068d0) then
tmp = x1 + (((x2 * (-6.0d0)) + (x1 * (-3.0d0))) + (x1 + (t_4 + (t_3 - ((((x1 * x1) * (t_10 - 6.0d0)) + (t_11 * t_1)) * t_2)))))
else if (x1 <= 8.6d+93) then
tmp = x1 + (9.0d0 + (x1 - (((t_6 * ((t_11 * t_7) - ((x1 * x1) * 6.0d0))) - t_3) - t_4)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_8))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = -1.0 - (x1 * x1);
double t_3 = 3.0 * t_0;
double t_4 = x1 * (x1 * x1);
double t_5 = (t_0 + (2.0 * x2)) - x1;
double t_6 = (x1 * x1) + 1.0;
double t_7 = 3.0 + (t_5 / t_2);
double t_8 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_9 = t_5 / t_6;
double t_10 = t_9 * 4.0;
double t_11 = (x1 * 2.0) * t_9;
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8))));
} else if (x1 <= -9500.0) {
tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - t_10)) + (((x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4)));
} else if (x1 <= 0.0068) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_4 + (t_3 - ((((x1 * x1) * (t_10 - 6.0)) + (t_11 * t_1)) * t_2)))));
} else if (x1 <= 8.6e+93) {
tmp = x1 + (9.0 + (x1 - (((t_6 * ((t_11 * t_7) - ((x1 * x1) * 6.0))) - t_3) - t_4)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (2.0 * x2) - 3.0 t_2 = -1.0 - (x1 * x1) t_3 = 3.0 * t_0 t_4 = x1 * (x1 * x1) t_5 = (t_0 + (2.0 * x2)) - x1 t_6 = (x1 * x1) + 1.0 t_7 = 3.0 + (t_5 / t_2) t_8 = 4.0 * (x2 * (3.0 - (2.0 * x2))) t_9 = t_5 / t_6 t_10 = t_9 * 4.0 t_11 = (x1 * 2.0) * t_9 tmp = 0 if x1 <= -1.15e+110: tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8)))) elif x1 <= -9500.0: tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - t_10)) + (((x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4))) elif x1 <= 0.0068: tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_4 + (t_3 - ((((x1 * x1) * (t_10 - 6.0)) + (t_11 * t_1)) * t_2))))) elif x1 <= 8.6e+93: tmp = x1 + (9.0 + (x1 - (((t_6 * ((t_11 * t_7) - ((x1 * x1) * 6.0))) - t_3) - t_4))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8)))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(2.0 * x2) - 3.0) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(3.0 * t_0) t_4 = Float64(x1 * Float64(x1 * x1)) t_5 = Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) t_6 = Float64(Float64(x1 * x1) + 1.0) t_7 = Float64(3.0 + Float64(t_5 / t_2)) t_8 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) t_9 = Float64(t_5 / t_6) t_10 = Float64(t_9 * 4.0) t_11 = Float64(Float64(x1 * 2.0) * t_9) tmp = 0.0 if (x1 <= -1.15e+110) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(t_1 - Float64(x2 * -2.0))) - Float64(Float64(x2 * 8.0) - Float64(x1 * Float64(3.0 + Float64(t_8 + Float64(2.0 * Float64(Float64(2.0 * Float64(x2 * t_1)) + Float64(-1.0 - Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_1)))))))))) - 3.0)) + t_8))))); elseif (x1 <= -9500.0) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(Float64(t_6 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - t_10)) + Float64(Float64(Float64(x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4)))); elseif (x1 <= 0.0068) tmp = Float64(x1 + Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)) + Float64(x1 + Float64(t_4 + Float64(t_3 - Float64(Float64(Float64(Float64(x1 * x1) * Float64(t_10 - 6.0)) + Float64(t_11 * t_1)) * t_2)))))); elseif (x1 <= 8.6e+93) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(Float64(t_6 * Float64(Float64(t_11 * t_7) - Float64(Float64(x1 * x1) * 6.0))) - t_3) - t_4)))); 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))) + t_8))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (2.0 * x2) - 3.0; t_2 = -1.0 - (x1 * x1); t_3 = 3.0 * t_0; t_4 = x1 * (x1 * x1); t_5 = (t_0 + (2.0 * x2)) - x1; t_6 = (x1 * x1) + 1.0; t_7 = 3.0 + (t_5 / t_2); t_8 = 4.0 * (x2 * (3.0 - (2.0 * x2))); t_9 = t_5 / t_6; t_10 = t_9 * 4.0; t_11 = (x1 * 2.0) * t_9; tmp = 0.0; if (x1 <= -1.15e+110) tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8)))); elseif (x1 <= -9500.0) tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - t_10)) + (((x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4))); elseif (x1 <= 0.0068) tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_4 + (t_3 - ((((x1 * x1) * (t_10 - 6.0)) + (t_11 * t_1)) * t_2))))); elseif (x1 <= 8.6e+93) tmp = x1 + (9.0 + (x1 - (((t_6 * ((t_11 * t_7) - ((x1 * x1) * 6.0))) - t_3) - t_4))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8)))); 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[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 + N[(t$95$5 / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$5 / t$95$6), $MachinePrecision]}, Block[{t$95$10 = N[(t$95$9 * 4.0), $MachinePrecision]}, Block[{t$95$11 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$9), $MachinePrecision]}, If[LessEqual[x1, -1.15e+110], N[(x1 + N[(9.0 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(t$95$1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x2 * 8.0), $MachinePrecision] - N[(x1 * N[(3.0 + N[(t$95$8 + N[(2.0 * N[(N[(2.0 * N[(x2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -9500.0], N[(x1 + N[(9.0 + N[(x1 - N[(N[(N[(t$95$6 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - t$95$10), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] - t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.0068], N[(x1 + N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$4 + N[(t$95$3 - N[(N[(N[(N[(x1 * x1), $MachinePrecision] * N[(t$95$10 - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$11 * t$95$1), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.6e+93], N[(x1 + N[(9.0 + N[(x1 - N[(N[(N[(t$95$6 * N[(N[(t$95$11 * t$95$7), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] - t$95$4), $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] + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 2 \cdot x2 - 3\\
t_2 := -1 - x1 \cdot x1\\
t_3 := 3 \cdot t\_0\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
t_5 := \left(t\_0 + 2 \cdot x2\right) - x1\\
t_6 := x1 \cdot x1 + 1\\
t_7 := 3 + \frac{t\_5}{t\_2}\\
t_8 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
t_9 := \frac{t\_5}{t\_6}\\
t_10 := t\_9 \cdot 4\\
t_11 := \left(x1 \cdot 2\right) \cdot t\_9\\
\mathbf{if}\;x1 \leq -1.15 \cdot 10^{+110}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(t\_1 - x2 \cdot -2\right) - \left(x2 \cdot 8 - x1 \cdot \left(3 + \left(t\_8 + 2 \cdot \left(2 \cdot \left(x2 \cdot t\_1\right) + \left(-1 - \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_1\right)\right)\right)\right)\right)\right)\right) - 3\right) + t\_8\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -9500:\\
\;\;\;\;x1 + \left(9 + \left(x1 - \left(\left(t\_6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_10\right) + \left(\left(x1 \cdot 2\right) \cdot 3\right) \cdot t\_7\right) - t\_3\right) - t\_4\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.0068:\\
\;\;\;\;x1 + \left(\left(x2 \cdot -6 + x1 \cdot -3\right) + \left(x1 + \left(t\_4 + \left(t\_3 - \left(\left(x1 \cdot x1\right) \cdot \left(t\_10 - 6\right) + t\_11 \cdot t\_1\right) \cdot t\_2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8.6 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - \left(\left(t\_6 \cdot \left(t\_11 \cdot t\_7 - \left(x1 \cdot x1\right) \cdot 6\right) - t\_3\right) - t\_4\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) + t\_8\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.15e110Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 75.0%
if -1.15e110 < x1 < -9500Initial program 90.3%
Taylor expanded in x1 around inf 90.2%
Taylor expanded in x1 around inf 90.2%
Taylor expanded in x1 around inf 79.3%
if -9500 < x1 < 0.00679999999999999962Initial program 99.3%
Taylor expanded in x1 around inf 98.2%
Taylor expanded in x1 around 0 99.3%
Taylor expanded in x1 around 0 98.3%
if 0.00679999999999999962 < x1 < 8.6e93Initial program 98.9%
Taylor expanded in x1 around inf 95.5%
Taylor expanded in x1 around inf 95.5%
Taylor expanded in x1 around inf 92.0%
if 8.6e93 < x1 Initial program 21.3%
Taylor expanded in x1 around 0 13.1%
Taylor expanded in x1 around 0 97.9%
Final simplification92.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (+ t_0 (* 2.0 x2)) x1))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (- -1.0 (* x1 x1)))
(t_4
(+
x1
(+
9.0
(-
x1
(-
(-
(*
t_2
(+
(* (* x1 x1) (- 6.0 (* (/ t_1 t_2) 4.0)))
(* (* (* x1 2.0) 3.0) (+ 3.0 (/ t_1 t_3)))))
(* 3.0 t_0))
(* x1 (* x1 x1)))))))
(t_5 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))
(if (<= x1 -5.6e+102)
(+
x1
(+
9.0
(-
x1
(*
x1
(+
(*
x1
(- (- (* 2.0 (- (- (* 2.0 x2) 3.0) (* x2 -2.0))) (* x2 8.0)) 3.0))
t_5)))))
(if (<= x1 -4800.0)
t_4
(if (<= x1 27.0)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_3))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 1.5e+97)
t_4
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0)))
t_5)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = -1.0 - (x1 * x1);
double t_4 = x1 + (9.0 + (x1 - (((t_2 * (((x1 * x1) * (6.0 - ((t_1 / t_2) * 4.0))) + (((x1 * 2.0) * 3.0) * (3.0 + (t_1 / t_3))))) - (3.0 * t_0)) - (x1 * (x1 * x1)))));
double t_5 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (((2.0 * x2) - 3.0) - (x2 * -2.0))) - (x2 * 8.0)) - 3.0)) + t_5))));
} else if (x1 <= -4800.0) {
tmp = t_4;
} else if (x1 <= 27.0) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 1.5e+97) {
tmp = t_4;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_5))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (t_0 + (2.0d0 * x2)) - x1
t_2 = (x1 * x1) + 1.0d0
t_3 = (-1.0d0) - (x1 * x1)
t_4 = x1 + (9.0d0 + (x1 - (((t_2 * (((x1 * x1) * (6.0d0 - ((t_1 / t_2) * 4.0d0))) + (((x1 * 2.0d0) * 3.0d0) * (3.0d0 + (t_1 / t_3))))) - (3.0d0 * t_0)) - (x1 * (x1 * x1)))))
t_5 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
if (x1 <= (-5.6d+102)) then
tmp = x1 + (9.0d0 + (x1 - (x1 * ((x1 * (((2.0d0 * (((2.0d0 * x2) - 3.0d0) - (x2 * (-2.0d0)))) - (x2 * 8.0d0)) - 3.0d0)) + t_5))))
else if (x1 <= (-4800.0d0)) then
tmp = t_4
else if (x1 <= 27.0d0) then
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / t_3)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 1.5d+97) then
tmp = t_4
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_5))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = -1.0 - (x1 * x1);
double t_4 = x1 + (9.0 + (x1 - (((t_2 * (((x1 * x1) * (6.0 - ((t_1 / t_2) * 4.0))) + (((x1 * 2.0) * 3.0) * (3.0 + (t_1 / t_3))))) - (3.0 * t_0)) - (x1 * (x1 * x1)))));
double t_5 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (((2.0 * x2) - 3.0) - (x2 * -2.0))) - (x2 * 8.0)) - 3.0)) + t_5))));
} else if (x1 <= -4800.0) {
tmp = t_4;
} else if (x1 <= 27.0) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 1.5e+97) {
tmp = t_4;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_5))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (t_0 + (2.0 * x2)) - x1 t_2 = (x1 * x1) + 1.0 t_3 = -1.0 - (x1 * x1) t_4 = x1 + (9.0 + (x1 - (((t_2 * (((x1 * x1) * (6.0 - ((t_1 / t_2) * 4.0))) + (((x1 * 2.0) * 3.0) * (3.0 + (t_1 / t_3))))) - (3.0 * t_0)) - (x1 * (x1 * x1))))) t_5 = 4.0 * (x2 * (3.0 - (2.0 * x2))) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (((2.0 * x2) - 3.0) - (x2 * -2.0))) - (x2 * 8.0)) - 3.0)) + t_5)))) elif x1 <= -4800.0: tmp = t_4 elif x1 <= 27.0: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 1.5e+97: tmp = t_4 else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_5)))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(-1.0 - Float64(x1 * x1)) t_4 = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(Float64(t_1 / t_2) * 4.0))) + Float64(Float64(Float64(x1 * 2.0) * 3.0) * Float64(3.0 + Float64(t_1 / t_3))))) - Float64(3.0 * t_0)) - Float64(x1 * Float64(x1 * x1)))))) t_5 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(Float64(Float64(2.0 * x2) - 3.0) - Float64(x2 * -2.0))) - Float64(x2 * 8.0)) - 3.0)) + t_5))))); elseif (x1 <= -4800.0) tmp = t_4; elseif (x1 <= 27.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_3)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 1.5e+97) tmp = t_4; 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))) + t_5))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (t_0 + (2.0 * x2)) - x1; t_2 = (x1 * x1) + 1.0; t_3 = -1.0 - (x1 * x1); t_4 = x1 + (9.0 + (x1 - (((t_2 * (((x1 * x1) * (6.0 - ((t_1 / t_2) * 4.0))) + (((x1 * 2.0) * 3.0) * (3.0 + (t_1 / t_3))))) - (3.0 * t_0)) - (x1 * (x1 * x1))))); t_5 = 4.0 * (x2 * (3.0 - (2.0 * x2))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (((2.0 * x2) - 3.0) - (x2 * -2.0))) - (x2 * 8.0)) - 3.0)) + t_5)))); elseif (x1 <= -4800.0) tmp = t_4; elseif (x1 <= 27.0) tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 1.5e+97) tmp = t_4; else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_5)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(9.0 + N[(x1 - N[(N[(N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(N[(t$95$1 / t$95$2), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision] * N[(3.0 + N[(t$95$1 / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(9.0 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4800.0], t$95$4, If[LessEqual[x1, 27.0], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5e+97], t$95$4, 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] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \left(t\_0 + 2 \cdot x2\right) - x1\\
t_2 := x1 \cdot x1 + 1\\
t_3 := -1 - x1 \cdot x1\\
t_4 := x1 + \left(9 + \left(x1 - \left(\left(t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - \frac{t\_1}{t\_2} \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot 3\right) \cdot \left(3 + \frac{t\_1}{t\_3}\right)\right) - 3 \cdot t\_0\right) - x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
t_5 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(\left(2 \cdot x2 - 3\right) - x2 \cdot -2\right) - x2 \cdot 8\right) - 3\right) + t\_5\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -4800:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq 27:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_3} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+97}:\\
\;\;\;\;t\_4\\
\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) + t\_5\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 2.6%
Taylor expanded in x1 around inf 2.6%
Taylor expanded in x1 around inf 2.6%
Taylor expanded in x1 around 0 47.9%
if -5.60000000000000037e102 < x1 < -4800 or 27 < x1 < 1.4999999999999999e97Initial program 98.9%
Taylor expanded in x1 around inf 97.1%
Taylor expanded in x1 around inf 97.1%
Taylor expanded in x1 around inf 84.6%
if -4800 < x1 < 27Initial program 99.3%
Taylor expanded in x1 around 0 87.8%
Taylor expanded in x2 around 0 98.2%
if 1.4999999999999999e97 < x1 Initial program 19.6%
Taylor expanded in x1 around 0 13.4%
Taylor expanded in x1 around 0 100.0%
Final simplification88.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (+ t_0 (* 2.0 x2)) x1))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))
(t_4 (* 3.0 t_0))
(t_5 (* x1 (* x1 x1)))
(t_6 (+ (* x1 x1) 1.0))
(t_7 (/ t_1 t_6))
(t_8 (+ 3.0 (/ t_1 t_2))))
(if (<= x1 -5.6e+102)
(+
x1
(+
9.0
(-
x1
(*
x1
(+
(*
x1
(- (- (* 2.0 (- (- (* 2.0 x2) 3.0) (* x2 -2.0))) (* x2 8.0)) 3.0))
t_3)))))
(if (<= x1 -75.0)
(+
x1
(+
9.0
(-
x1
(-
(-
(*
t_6
(+ (* (* x1 x1) (- 6.0 (* t_7 4.0))) (* (* (* x1 2.0) 3.0) t_8)))
t_4)
t_5))))
(if (<= x1 0.0185)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_2))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 8.6e+93)
(+
x1
(+
9.0
(-
x1
(-
(- (* t_6 (- (* (* (* x1 2.0) t_7) t_8) (* (* x1 x1) 6.0))) t_4)
t_5))))
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0)))
t_3)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = -1.0 - (x1 * x1);
double t_3 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_4 = 3.0 * t_0;
double t_5 = x1 * (x1 * x1);
double t_6 = (x1 * x1) + 1.0;
double t_7 = t_1 / t_6;
double t_8 = 3.0 + (t_1 / t_2);
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (((2.0 * x2) - 3.0) - (x2 * -2.0))) - (x2 * 8.0)) - 3.0)) + t_3))));
} else if (x1 <= -75.0) {
tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - (t_7 * 4.0))) + (((x1 * 2.0) * 3.0) * t_8))) - t_4) - t_5)));
} else if (x1 <= 0.0185) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 8.6e+93) {
tmp = x1 + (9.0 + (x1 - (((t_6 * ((((x1 * 2.0) * t_7) * t_8) - ((x1 * x1) * 6.0))) - t_4) - t_5)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_3))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (t_0 + (2.0d0 * x2)) - x1
t_2 = (-1.0d0) - (x1 * x1)
t_3 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
t_4 = 3.0d0 * t_0
t_5 = x1 * (x1 * x1)
t_6 = (x1 * x1) + 1.0d0
t_7 = t_1 / t_6
t_8 = 3.0d0 + (t_1 / t_2)
if (x1 <= (-5.6d+102)) then
tmp = x1 + (9.0d0 + (x1 - (x1 * ((x1 * (((2.0d0 * (((2.0d0 * x2) - 3.0d0) - (x2 * (-2.0d0)))) - (x2 * 8.0d0)) - 3.0d0)) + t_3))))
else if (x1 <= (-75.0d0)) then
tmp = x1 + (9.0d0 + (x1 - (((t_6 * (((x1 * x1) * (6.0d0 - (t_7 * 4.0d0))) + (((x1 * 2.0d0) * 3.0d0) * t_8))) - t_4) - t_5)))
else if (x1 <= 0.0185d0) then
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / t_2)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 8.6d+93) then
tmp = x1 + (9.0d0 + (x1 - (((t_6 * ((((x1 * 2.0d0) * t_7) * t_8) - ((x1 * x1) * 6.0d0))) - t_4) - t_5)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_3))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = -1.0 - (x1 * x1);
double t_3 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_4 = 3.0 * t_0;
double t_5 = x1 * (x1 * x1);
double t_6 = (x1 * x1) + 1.0;
double t_7 = t_1 / t_6;
double t_8 = 3.0 + (t_1 / t_2);
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (((2.0 * x2) - 3.0) - (x2 * -2.0))) - (x2 * 8.0)) - 3.0)) + t_3))));
} else if (x1 <= -75.0) {
tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - (t_7 * 4.0))) + (((x1 * 2.0) * 3.0) * t_8))) - t_4) - t_5)));
} else if (x1 <= 0.0185) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 8.6e+93) {
tmp = x1 + (9.0 + (x1 - (((t_6 * ((((x1 * 2.0) * t_7) * t_8) - ((x1 * x1) * 6.0))) - t_4) - t_5)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_3))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (t_0 + (2.0 * x2)) - x1 t_2 = -1.0 - (x1 * x1) t_3 = 4.0 * (x2 * (3.0 - (2.0 * x2))) t_4 = 3.0 * t_0 t_5 = x1 * (x1 * x1) t_6 = (x1 * x1) + 1.0 t_7 = t_1 / t_6 t_8 = 3.0 + (t_1 / t_2) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (((2.0 * x2) - 3.0) - (x2 * -2.0))) - (x2 * 8.0)) - 3.0)) + t_3)))) elif x1 <= -75.0: tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - (t_7 * 4.0))) + (((x1 * 2.0) * 3.0) * t_8))) - t_4) - t_5))) elif x1 <= 0.0185: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 8.6e+93: tmp = x1 + (9.0 + (x1 - (((t_6 * ((((x1 * 2.0) * t_7) * t_8) - ((x1 * x1) * 6.0))) - t_4) - t_5))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_3)))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) t_4 = Float64(3.0 * t_0) t_5 = Float64(x1 * Float64(x1 * x1)) t_6 = Float64(Float64(x1 * x1) + 1.0) t_7 = Float64(t_1 / t_6) t_8 = Float64(3.0 + Float64(t_1 / t_2)) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(Float64(Float64(2.0 * x2) - 3.0) - Float64(x2 * -2.0))) - Float64(x2 * 8.0)) - 3.0)) + t_3))))); elseif (x1 <= -75.0) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(Float64(t_6 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_7 * 4.0))) + Float64(Float64(Float64(x1 * 2.0) * 3.0) * t_8))) - t_4) - t_5)))); elseif (x1 <= 0.0185) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_2)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 8.6e+93) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(Float64(t_6 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_7) * t_8) - Float64(Float64(x1 * x1) * 6.0))) - t_4) - t_5)))); 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))) + t_3))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (t_0 + (2.0 * x2)) - x1; t_2 = -1.0 - (x1 * x1); t_3 = 4.0 * (x2 * (3.0 - (2.0 * x2))); t_4 = 3.0 * t_0; t_5 = x1 * (x1 * x1); t_6 = (x1 * x1) + 1.0; t_7 = t_1 / t_6; t_8 = 3.0 + (t_1 / t_2); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (((2.0 * x2) - 3.0) - (x2 * -2.0))) - (x2 * 8.0)) - 3.0)) + t_3)))); elseif (x1 <= -75.0) tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - (t_7 * 4.0))) + (((x1 * 2.0) * 3.0) * t_8))) - t_4) - t_5))); elseif (x1 <= 0.0185) tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 8.6e+93) tmp = x1 + (9.0 + (x1 - (((t_6 * ((((x1 * 2.0) * t_7) * t_8) - ((x1 * x1) * 6.0))) - t_4) - t_5))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_3)))); 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[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$1 / t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(3.0 + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(9.0 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -75.0], N[(x1 + N[(9.0 + N[(x1 - N[(N[(N[(t$95$6 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$7 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision] * t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision] - t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.0185], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.6e+93], N[(x1 + N[(9.0 + N[(x1 - N[(N[(N[(t$95$6 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$7), $MachinePrecision] * t$95$8), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision] - t$95$5), $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] + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \left(t\_0 + 2 \cdot x2\right) - x1\\
t_2 := -1 - x1 \cdot x1\\
t_3 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
t_4 := 3 \cdot t\_0\\
t_5 := x1 \cdot \left(x1 \cdot x1\right)\\
t_6 := x1 \cdot x1 + 1\\
t_7 := \frac{t\_1}{t\_6}\\
t_8 := 3 + \frac{t\_1}{t\_2}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(\left(2 \cdot x2 - 3\right) - x2 \cdot -2\right) - x2 \cdot 8\right) - 3\right) + t\_3\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -75:\\
\;\;\;\;x1 + \left(9 + \left(x1 - \left(\left(t\_6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_7 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot 3\right) \cdot t\_8\right) - t\_4\right) - t\_5\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.0185:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_2} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8.6 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - \left(\left(t\_6 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_7\right) \cdot t\_8 - \left(x1 \cdot x1\right) \cdot 6\right) - t\_4\right) - t\_5\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) + t\_3\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 2.6%
Taylor expanded in x1 around inf 2.6%
Taylor expanded in x1 around inf 2.6%
Taylor expanded in x1 around 0 47.9%
if -5.60000000000000037e102 < x1 < -75Initial program 98.8%
Taylor expanded in x1 around inf 98.8%
Taylor expanded in x1 around inf 98.8%
Taylor expanded in x1 around inf 86.2%
if -75 < x1 < 0.0184999999999999991Initial program 99.3%
Taylor expanded in x1 around 0 87.8%
Taylor expanded in x2 around 0 98.2%
if 0.0184999999999999991 < x1 < 8.6e93Initial program 98.9%
Taylor expanded in x1 around inf 95.5%
Taylor expanded in x1 around inf 95.5%
Taylor expanded in x1 around inf 92.0%
if 8.6e93 < x1 Initial program 21.3%
Taylor expanded in x1 around 0 13.1%
Taylor expanded in x1 around 0 97.9%
Final simplification89.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (* 2.0 x2) 3.0))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (* 3.0 t_0))
(t_4 (* x1 (* x1 x1)))
(t_5 (- (+ t_0 (* 2.0 x2)) x1))
(t_6 (+ (* x1 x1) 1.0))
(t_7 (+ 3.0 (/ t_5 t_2)))
(t_8 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))
(t_9 (/ t_5 t_6)))
(if (<= x1 -1.15e+110)
(+
x1
(+
9.0
(-
x1
(*
x1
(+
(*
x1
(-
(-
(* 2.0 (- t_1 (* x2 -2.0)))
(-
(* x2 8.0)
(*
x1
(+
3.0
(+
t_8
(*
2.0
(+
(* 2.0 (* x2 t_1))
(-
-1.0
(+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_1))))))))))
3.0))
t_8)))))
(if (<= x1 -2300.0)
(+
x1
(+
9.0
(-
x1
(-
(-
(*
t_6
(+ (* (* x1 x1) (- 6.0 (* t_9 4.0))) (* (* (* x1 2.0) 3.0) t_7)))
t_3)
t_4))))
(if (<= x1 0.006)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) t_2))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 8.6e+93)
(+
x1
(+
9.0
(-
x1
(-
(- (* t_6 (- (* (* (* x1 2.0) t_9) t_7) (* (* x1 x1) 6.0))) t_3)
t_4))))
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0)))
t_8)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = -1.0 - (x1 * x1);
double t_3 = 3.0 * t_0;
double t_4 = x1 * (x1 * x1);
double t_5 = (t_0 + (2.0 * x2)) - x1;
double t_6 = (x1 * x1) + 1.0;
double t_7 = 3.0 + (t_5 / t_2);
double t_8 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_9 = t_5 / t_6;
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8))));
} else if (x1 <= -2300.0) {
tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - (t_9 * 4.0))) + (((x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4)));
} else if (x1 <= 0.006) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 8.6e+93) {
tmp = x1 + (9.0 + (x1 - (((t_6 * ((((x1 * 2.0) * t_9) * t_7) - ((x1 * x1) * 6.0))) - t_3) - t_4)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (2.0d0 * x2) - 3.0d0
t_2 = (-1.0d0) - (x1 * x1)
t_3 = 3.0d0 * t_0
t_4 = x1 * (x1 * x1)
t_5 = (t_0 + (2.0d0 * x2)) - x1
t_6 = (x1 * x1) + 1.0d0
t_7 = 3.0d0 + (t_5 / t_2)
t_8 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
t_9 = t_5 / t_6
if (x1 <= (-1.15d+110)) then
tmp = x1 + (9.0d0 + (x1 - (x1 * ((x1 * (((2.0d0 * (t_1 - (x2 * (-2.0d0)))) - ((x2 * 8.0d0) - (x1 * (3.0d0 + (t_8 + (2.0d0 * ((2.0d0 * (x2 * t_1)) + ((-1.0d0) - ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_1)))))))))) - 3.0d0)) + t_8))))
else if (x1 <= (-2300.0d0)) then
tmp = x1 + (9.0d0 + (x1 - (((t_6 * (((x1 * x1) * (6.0d0 - (t_9 * 4.0d0))) + (((x1 * 2.0d0) * 3.0d0) * t_7))) - t_3) - t_4)))
else if (x1 <= 0.006d0) then
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / t_2)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 8.6d+93) then
tmp = x1 + (9.0d0 + (x1 - (((t_6 * ((((x1 * 2.0d0) * t_9) * t_7) - ((x1 * x1) * 6.0d0))) - t_3) - t_4)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_8))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = -1.0 - (x1 * x1);
double t_3 = 3.0 * t_0;
double t_4 = x1 * (x1 * x1);
double t_5 = (t_0 + (2.0 * x2)) - x1;
double t_6 = (x1 * x1) + 1.0;
double t_7 = 3.0 + (t_5 / t_2);
double t_8 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_9 = t_5 / t_6;
double tmp;
if (x1 <= -1.15e+110) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8))));
} else if (x1 <= -2300.0) {
tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - (t_9 * 4.0))) + (((x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4)));
} else if (x1 <= 0.006) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 8.6e+93) {
tmp = x1 + (9.0 + (x1 - (((t_6 * ((((x1 * 2.0) * t_9) * t_7) - ((x1 * x1) * 6.0))) - t_3) - t_4)));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (2.0 * x2) - 3.0 t_2 = -1.0 - (x1 * x1) t_3 = 3.0 * t_0 t_4 = x1 * (x1 * x1) t_5 = (t_0 + (2.0 * x2)) - x1 t_6 = (x1 * x1) + 1.0 t_7 = 3.0 + (t_5 / t_2) t_8 = 4.0 * (x2 * (3.0 - (2.0 * x2))) t_9 = t_5 / t_6 tmp = 0 if x1 <= -1.15e+110: tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8)))) elif x1 <= -2300.0: tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - (t_9 * 4.0))) + (((x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4))) elif x1 <= 0.006: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 8.6e+93: tmp = x1 + (9.0 + (x1 - (((t_6 * ((((x1 * 2.0) * t_9) * t_7) - ((x1 * x1) * 6.0))) - t_3) - t_4))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8)))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(2.0 * x2) - 3.0) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(3.0 * t_0) t_4 = Float64(x1 * Float64(x1 * x1)) t_5 = Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) t_6 = Float64(Float64(x1 * x1) + 1.0) t_7 = Float64(3.0 + Float64(t_5 / t_2)) t_8 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) t_9 = Float64(t_5 / t_6) tmp = 0.0 if (x1 <= -1.15e+110) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(t_1 - Float64(x2 * -2.0))) - Float64(Float64(x2 * 8.0) - Float64(x1 * Float64(3.0 + Float64(t_8 + Float64(2.0 * Float64(Float64(2.0 * Float64(x2 * t_1)) + Float64(-1.0 - Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_1)))))))))) - 3.0)) + t_8))))); elseif (x1 <= -2300.0) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(Float64(t_6 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_9 * 4.0))) + Float64(Float64(Float64(x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4)))); elseif (x1 <= 0.006) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / t_2)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 8.6e+93) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(Float64(t_6 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_9) * t_7) - Float64(Float64(x1 * x1) * 6.0))) - t_3) - t_4)))); 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))) + t_8))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (2.0 * x2) - 3.0; t_2 = -1.0 - (x1 * x1); t_3 = 3.0 * t_0; t_4 = x1 * (x1 * x1); t_5 = (t_0 + (2.0 * x2)) - x1; t_6 = (x1 * x1) + 1.0; t_7 = 3.0 + (t_5 / t_2); t_8 = 4.0 * (x2 * (3.0 - (2.0 * x2))); t_9 = t_5 / t_6; tmp = 0.0; if (x1 <= -1.15e+110) tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) - ((x2 * 8.0) - (x1 * (3.0 + (t_8 + (2.0 * ((2.0 * (x2 * t_1)) + (-1.0 - ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1)))))))))) - 3.0)) + t_8)))); elseif (x1 <= -2300.0) tmp = x1 + (9.0 + (x1 - (((t_6 * (((x1 * x1) * (6.0 - (t_9 * 4.0))) + (((x1 * 2.0) * 3.0) * t_7))) - t_3) - t_4))); elseif (x1 <= 0.006) tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 8.6e+93) tmp = x1 + (9.0 + (x1 - (((t_6 * ((((x1 * 2.0) * t_9) * t_7) - ((x1 * x1) * 6.0))) - t_3) - t_4))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_8)))); 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[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 + N[(t$95$5 / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$5 / t$95$6), $MachinePrecision]}, If[LessEqual[x1, -1.15e+110], N[(x1 + N[(9.0 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(t$95$1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x2 * 8.0), $MachinePrecision] - N[(x1 * N[(3.0 + N[(t$95$8 + N[(2.0 * N[(N[(2.0 * N[(x2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2300.0], N[(x1 + N[(9.0 + N[(x1 - N[(N[(N[(t$95$6 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$9 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] - t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.006], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.6e+93], N[(x1 + N[(9.0 + N[(x1 - N[(N[(N[(t$95$6 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$9), $MachinePrecision] * t$95$7), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] - t$95$4), $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] + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 2 \cdot x2 - 3\\
t_2 := -1 - x1 \cdot x1\\
t_3 := 3 \cdot t\_0\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
t_5 := \left(t\_0 + 2 \cdot x2\right) - x1\\
t_6 := x1 \cdot x1 + 1\\
t_7 := 3 + \frac{t\_5}{t\_2}\\
t_8 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
t_9 := \frac{t\_5}{t\_6}\\
\mathbf{if}\;x1 \leq -1.15 \cdot 10^{+110}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(t\_1 - x2 \cdot -2\right) - \left(x2 \cdot 8 - x1 \cdot \left(3 + \left(t\_8 + 2 \cdot \left(2 \cdot \left(x2 \cdot t\_1\right) + \left(-1 - \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_1\right)\right)\right)\right)\right)\right)\right) - 3\right) + t\_8\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2300:\\
\;\;\;\;x1 + \left(9 + \left(x1 - \left(\left(t\_6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_9 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot 3\right) \cdot t\_7\right) - t\_3\right) - t\_4\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.006:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{t\_2} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8.6 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - \left(\left(t\_6 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_9\right) \cdot t\_7 - \left(x1 \cdot x1\right) \cdot 6\right) - t\_3\right) - t\_4\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) + t\_8\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.15e110Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 75.0%
if -1.15e110 < x1 < -2300Initial program 90.3%
Taylor expanded in x1 around inf 90.2%
Taylor expanded in x1 around inf 90.2%
Taylor expanded in x1 around inf 79.3%
if -2300 < x1 < 0.0060000000000000001Initial program 99.3%
Taylor expanded in x1 around 0 87.8%
Taylor expanded in x2 around 0 98.2%
if 0.0060000000000000001 < x1 < 8.6e93Initial program 98.9%
Taylor expanded in x1 around inf 95.5%
Taylor expanded in x1 around inf 95.5%
Taylor expanded in x1 around inf 92.0%
if 8.6e93 < x1 Initial program 21.3%
Taylor expanded in x1 around 0 13.1%
Taylor expanded in x1 around 0 97.9%
Final simplification92.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0)) (t_1 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))
(if (<= x1 -4.6e+155)
(+
x1
(+
9.0
(-
x1
(*
x1
(+ (* x1 (- (- (* 2.0 (- t_0 (* x2 -2.0))) (* x2 8.0)) 3.0)) t_1)))))
(if (<= x1 -12.0)
(+
x1
(+ (+ x1 (* 4.0 (* x1 (* x2 t_0)))) (* x2 (- (* -3.0 (/ x1 x2)) 6.0))))
(if (<= x1 3.1e-154)
(+
x1
(+
(*
3.0
(/ (- x1 (- (* x1 (* x1 3.0)) (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+ (* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0))) t_1))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -4.6e+155) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - (x2 * 8.0)) - 3.0)) + t_1))));
} else if (x1 <= -12.0) {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * t_0)))) + (x2 * ((-3.0 * (x1 / x2)) - 6.0)));
} else if (x1 <= 3.1e-154) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.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 = (2.0d0 * x2) - 3.0d0
t_1 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
if (x1 <= (-4.6d+155)) then
tmp = x1 + (9.0d0 + (x1 - (x1 * ((x1 * (((2.0d0 * (t_0 - (x2 * (-2.0d0)))) - (x2 * 8.0d0)) - 3.0d0)) + t_1))))
else if (x1 <= (-12.0d0)) then
tmp = x1 + ((x1 + (4.0d0 * (x1 * (x2 * t_0)))) + (x2 * (((-3.0d0) * (x1 / x2)) - 6.0d0)))
else if (x1 <= 3.1d-154) then
tmp = x1 + ((3.0d0 * ((x1 - ((x1 * (x1 * 3.0d0)) - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_1))))
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 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -4.6e+155) {
tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - (x2 * 8.0)) - 3.0)) + t_1))));
} else if (x1 <= -12.0) {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * t_0)))) + (x2 * ((-3.0 * (x1 / x2)) - 6.0)));
} else if (x1 <= 3.1e-154) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_1))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2))) tmp = 0 if x1 <= -4.6e+155: tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - (x2 * 8.0)) - 3.0)) + t_1)))) elif x1 <= -12.0: tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * t_0)))) + (x2 * ((-3.0 * (x1 / x2)) - 6.0))) elif x1 <= 3.1e-154: tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_1)))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) tmp = 0.0 if (x1 <= -4.6e+155) tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(t_0 - Float64(x2 * -2.0))) - Float64(x2 * 8.0)) - 3.0)) + t_1))))); elseif (x1 <= -12.0) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * t_0)))) + Float64(x2 * Float64(Float64(-3.0 * Float64(x1 / x2)) - 6.0)))); elseif (x1 <= 3.1e-154) 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(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.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 * Float64(Float64(x2 * -2.0) - 3.0)) - Float64(x1 * 3.0))) + t_1))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2))); tmp = 0.0; if (x1 <= -4.6e+155) tmp = x1 + (9.0 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) - (x2 * 8.0)) - 3.0)) + t_1)))); elseif (x1 <= -12.0) tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * t_0)))) + (x2 * ((-3.0 * (x1 / x2)) - 6.0))); elseif (x1 <= 3.1e-154) tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_1)))); 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[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.6e+155], N[(x1 + N[(9.0 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(t$95$0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -12.0], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(-3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.1e-154], 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[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $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] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -4.6 \cdot 10^{+155}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(t\_0 - x2 \cdot -2\right) - x2 \cdot 8\right) - 3\right) + t\_1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -12:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot t\_0\right)\right)\right) + x2 \cdot \left(-3 \cdot \frac{x1}{x2} - 6\right)\right)\\
\mathbf{elif}\;x1 \leq 3.1 \cdot 10^{-154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\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) + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.59999999999999996e155Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 63.0%
if -4.59999999999999996e155 < x1 < -12Initial program 64.9%
Taylor expanded in x1 around 0 10.7%
Taylor expanded in x1 around 0 13.2%
Taylor expanded in x2 around inf 28.3%
if -12 < x1 < 3.09999999999999982e-154Initial program 99.5%
Taylor expanded in x1 around 0 85.3%
Taylor expanded in x2 around 0 98.1%
if 3.09999999999999982e-154 < x1 Initial program 59.6%
Taylor expanded in x1 around 0 35.8%
Taylor expanded in x1 around 0 79.2%
Final simplification78.8%
(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.8e-30)
(+ x1 (- (* x2 -6.0) (* x1 (+ 2.0 (+ (* 3.0 (* x1 t_0)) t_1)))))
(if (<= x1 3.1e-154)
(+
x1
(+
x1
(- (* x1 -3.0) (* x2 (- 6.0 (+ (* x1 -12.0) (* 8.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.8e-30) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1))));
} else if (x1 <= 3.1e-154) {
tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.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.8d-30)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((3.0d0 * (x1 * t_0)) + t_1))))
else if (x1 <= 3.1d-154) then
tmp = x1 + (x1 + ((x1 * (-3.0d0)) - (x2 * (6.0d0 - ((x1 * (-12.0d0)) + (8.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.8e-30) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1))));
} else if (x1 <= 3.1e-154) {
tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.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.8e-30: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1)))) elif x1 <= 3.1e-154: tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.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.8e-30) 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 <= 3.1e-154) tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) - Float64(x2 * Float64(6.0 - Float64(Float64(x1 * -12.0) + Float64(8.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.8e-30) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * t_0)) + t_1)))); elseif (x1 <= 3.1e-154) tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.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.8e-30], 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, 3.1e-154], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] - N[(x2 * N[(6.0 - N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $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 * 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.8 \cdot 10^{-30}:\\
\;\;\;\;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 3.1 \cdot 10^{-154}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 - x2 \cdot \left(6 - \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\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.7999999999999997e-30Initial program 43.6%
Taylor expanded in x1 around 0 16.1%
Taylor expanded in x1 around 0 41.5%
if -4.7999999999999997e-30 < x1 < 3.09999999999999982e-154Initial program 99.5%
Taylor expanded in x1 around 0 85.5%
Taylor expanded in x1 around 0 85.5%
Taylor expanded in x2 around 0 99.5%
if 3.09999999999999982e-154 < x1 Initial program 59.6%
Taylor expanded in x1 around 0 35.8%
Taylor expanded in x1 around 0 79.2%
Final simplification76.7%
(FPCore (x1 x2)
:precision binary64
(if (<= x2 -9e+32)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))
(* 3.0 (* x2 -2.0))))
(if (<= x2 4.7e+147)
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(+
(* 3.0 (* x1 (- (* x2 -2.0) 3.0)))
(* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))))
(+
x1
(+
x1
(- (* x1 -3.0) (* x2 (- 6.0 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -9e+32) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * (x2 * -2.0)));
} else if (x2 <= 4.7e+147) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * ((x2 * -2.0) - 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))));
} else {
tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.0 * (x1 * x2)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-9d+32)) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x2 <= 4.7d+147) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))) + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))))
else
tmp = x1 + (x1 + ((x1 * (-3.0d0)) - (x2 * (6.0d0 - ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -9e+32) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * (x2 * -2.0)));
} else if (x2 <= 4.7e+147) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * ((x2 * -2.0) - 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))));
} else {
tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.0 * (x1 * x2)))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -9e+32: tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * (x2 * -2.0))) elif x2 <= 4.7e+147: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * ((x2 * -2.0) - 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2)))))))) else: tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.0 * (x1 * x2))))))) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -9e+32) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x2 <= 4.7e+147) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))) + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))))); else tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) - Float64(x2 * Float64(6.0 - Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2)))))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -9e+32) tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + (3.0 * (x2 * -2.0))); elseif (x2 <= 4.7e+147) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((3.0 * (x1 * ((x2 * -2.0) - 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2)))))))); else tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.0 * (x1 * x2))))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -9e+32], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 4.7e+147], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] - N[(x2 * N[(6.0 - N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -9 \cdot 10^{+32}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x2 \leq 4.7 \cdot 10^{+147}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right) + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 - x2 \cdot \left(6 - \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x2 < -9.0000000000000007e32Initial program 75.1%
Taylor expanded in x1 around 0 47.4%
Taylor expanded in x2 around 0 57.3%
Taylor expanded in x1 around 0 66.3%
*-commutative66.3%
Simplified66.3%
if -9.0000000000000007e32 < x2 < 4.7000000000000003e147Initial program 69.2%
Taylor expanded in x1 around 0 51.3%
Taylor expanded in x1 around 0 77.1%
if 4.7000000000000003e147 < x2 Initial program 66.5%
Taylor expanded in x1 around 0 40.2%
Taylor expanded in x1 around 0 61.4%
Taylor expanded in x2 around 0 84.8%
Final simplification75.7%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1e+64)
(+
x1
(+
(+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
(* x2 (- (* -3.0 (/ x1 x2)) 6.0))))
(if (or (<= x1 2.05e+269) (not (<= x1 1.05e+288)))
(+
x1
(+ x1 (- (* x1 -3.0) (* x2 (- 6.0 (+ (* x1 -12.0) (* 8.0 (* x1 x2))))))))
(* x2 (- (/ x1 x2) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1e+64) {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (x2 * ((-3.0 * (x1 / x2)) - 6.0)));
} else if ((x1 <= 2.05e+269) || !(x1 <= 1.05e+288)) {
tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.0 * (x1 * 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 <= (-1d+64)) then
tmp = x1 + ((x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))) + (x2 * (((-3.0d0) * (x1 / x2)) - 6.0d0)))
else if ((x1 <= 2.05d+269) .or. (.not. (x1 <= 1.05d+288))) then
tmp = x1 + (x1 + ((x1 * (-3.0d0)) - (x2 * (6.0d0 - ((x1 * (-12.0d0)) + (8.0d0 * (x1 * 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 <= -1e+64) {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (x2 * ((-3.0 * (x1 / x2)) - 6.0)));
} else if ((x1 <= 2.05e+269) || !(x1 <= 1.05e+288)) {
tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.0 * (x1 * x2)))))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1e+64: tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (x2 * ((-3.0 * (x1 / x2)) - 6.0))) elif (x1 <= 2.05e+269) or not (x1 <= 1.05e+288): tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.0 * (x1 * x2))))))) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1e+64) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(x2 * Float64(Float64(-3.0 * Float64(x1 / x2)) - 6.0)))); elseif ((x1 <= 2.05e+269) || !(x1 <= 1.05e+288)) tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) - Float64(x2 * Float64(6.0 - Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * 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 <= -1e+64) tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (x2 * ((-3.0 * (x1 / x2)) - 6.0))); elseif ((x1 <= 2.05e+269) || ~((x1 <= 1.05e+288))) tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.0 * (x1 * x2))))))); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1e+64], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(-3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, 2.05e+269], N[Not[LessEqual[x1, 1.05e+288]], $MachinePrecision]], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] - N[(x2 * N[(6.0 - N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $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 \cdot 10^{+64}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + x2 \cdot \left(-3 \cdot \frac{x1}{x2} - 6\right)\right)\\
\mathbf{elif}\;x1 \leq 2.05 \cdot 10^{+269} \lor \neg \left(x1 \leq 1.05 \cdot 10^{+288}\right):\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 - x2 \cdot \left(6 - \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e64Initial program 11.6%
Taylor expanded in x1 around 0 4.8%
Taylor expanded in x1 around 0 7.5%
Taylor expanded in x2 around inf 35.9%
if -1.00000000000000002e64 < x1 < 2.05000000000000004e269 or 1.04999999999999999e288 < x1 Initial program 84.0%
Taylor expanded in x1 around 0 59.3%
Taylor expanded in x1 around 0 65.6%
Taylor expanded in x2 around 0 72.5%
if 2.05000000000000004e269 < x1 < 1.04999999999999999e288Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 7.9%
*-commutative7.9%
Simplified7.9%
Taylor expanded in x2 around inf 81.6%
Final simplification66.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x2 (- (/ x1 x2) 6.0)))
(t_1 (+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))))
(if (<= x2 -6.8e+154)
t_1
(if (<= x2 -1.25e-132)
t_0
(if (<= x2 9e-166) (+ x1 (* x1 -2.0)) (if (<= x2 8e+128) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = x2 * ((x1 / x2) - 6.0);
double t_1 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
double tmp;
if (x2 <= -6.8e+154) {
tmp = t_1;
} else if (x2 <= -1.25e-132) {
tmp = t_0;
} else if (x2 <= 9e-166) {
tmp = x1 + (x1 * -2.0);
} else if (x2 <= 8e+128) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x2 * ((x1 / x2) - 6.0d0)
t_1 = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
if (x2 <= (-6.8d+154)) then
tmp = t_1
else if (x2 <= (-1.25d-132)) then
tmp = t_0
else if (x2 <= 9d-166) then
tmp = x1 + (x1 * (-2.0d0))
else if (x2 <= 8d+128) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x2 * ((x1 / x2) - 6.0);
double t_1 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
double tmp;
if (x2 <= -6.8e+154) {
tmp = t_1;
} else if (x2 <= -1.25e-132) {
tmp = t_0;
} else if (x2 <= 9e-166) {
tmp = x1 + (x1 * -2.0);
} else if (x2 <= 8e+128) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x2 * ((x1 / x2) - 6.0) t_1 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) tmp = 0 if x2 <= -6.8e+154: tmp = t_1 elif x2 <= -1.25e-132: tmp = t_0 elif x2 <= 9e-166: tmp = x1 + (x1 * -2.0) elif x2 <= 8e+128: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)) t_1 = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))) tmp = 0.0 if (x2 <= -6.8e+154) tmp = t_1; elseif (x2 <= -1.25e-132) tmp = t_0; elseif (x2 <= 9e-166) tmp = Float64(x1 + Float64(x1 * -2.0)); elseif (x2 <= 8e+128) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x2 * ((x1 / x2) - 6.0); t_1 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); tmp = 0.0; if (x2 <= -6.8e+154) tmp = t_1; elseif (x2 <= -1.25e-132) tmp = t_0; elseif (x2 <= 9e-166) tmp = x1 + (x1 * -2.0); elseif (x2 <= 8e+128) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -6.8e+154], t$95$1, If[LessEqual[x2, -1.25e-132], t$95$0, If[LessEqual[x2, 9e-166], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 8e+128], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
t_1 := x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{if}\;x2 \leq -6.8 \cdot 10^{+154}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x2 \leq -1.25 \cdot 10^{-132}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x2 \leq 9 \cdot 10^{-166}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\mathbf{elif}\;x2 \leq 8 \cdot 10^{+128}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x2 < -6.79999999999999948e154 or 8.0000000000000006e128 < x2 Initial program 69.7%
Taylor expanded in x1 around 0 50.1%
Taylor expanded in x1 around inf 63.8%
if -6.79999999999999948e154 < x2 < -1.25e-132 or 8.99999999999999961e-166 < x2 < 8.0000000000000006e128Initial program 72.1%
Taylor expanded in x1 around 0 46.8%
Taylor expanded in x1 around 0 41.0%
*-commutative41.0%
Simplified41.0%
Taylor expanded in x2 around inf 44.6%
if -1.25e-132 < x2 < 8.99999999999999961e-166Initial program 66.8%
Taylor expanded in x1 around 0 52.2%
Taylor expanded in x1 around 0 52.8%
Taylor expanded in x2 around 0 47.3%
distribute-rgt1-in47.9%
metadata-eval47.9%
*-commutative47.9%
Simplified47.9%
Final simplification50.9%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -4.1e+155) (not (<= x2 7e+128))) (+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))) (+ x1 (+ x1 (+ (* x1 -3.0) (* x2 (- (* x1 -12.0) 6.0)))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -4.1e+155) || !(x2 <= 7e+128)) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-4.1d+155)) .or. (.not. (x2 <= 7d+128))) then
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
else
tmp = x1 + (x1 + ((x1 * (-3.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -4.1e+155) || !(x2 <= 7e+128)) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -4.1e+155) or not (x2 <= 7e+128): tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) else: tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0)))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -4.1e+155) || !(x2 <= 7e+128)) tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))); else tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -4.1e+155) || ~((x2 <= 7e+128))) tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); else tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * ((x1 * -12.0) - 6.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -4.1e+155], N[Not[LessEqual[x2, 7e+128]], $MachinePrecision]], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -4.1 \cdot 10^{+155} \lor \neg \left(x2 \leq 7 \cdot 10^{+128}\right):\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\right)\\
\end{array}
\end{array}
if x2 < -4.0999999999999998e155 or 6.99999999999999937e128 < x2 Initial program 69.7%
Taylor expanded in x1 around 0 50.1%
Taylor expanded in x1 around inf 63.8%
if -4.0999999999999998e155 < x2 < 6.99999999999999937e128Initial program 70.4%
Taylor expanded in x1 around 0 48.6%
Taylor expanded in x1 around 0 49.8%
Taylor expanded in x2 around 0 50.3%
Final simplification54.2%
(FPCore (x1 x2) :precision binary64 (+ x1 (+ x1 (- (* x1 -3.0) (* x2 (- 6.0 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))))
double code(double x1, double x2) {
return x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.0 * (x1 * x2)))))));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x1 + ((x1 * (-3.0d0)) - (x2 * (6.0d0 - ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2)))))))
end function
public static double code(double x1, double x2) {
return x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.0 * (x1 * x2)))))));
}
def code(x1, x2): return x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.0 * (x1 * x2)))))))
function code(x1, x2) return Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) - Float64(x2 * Float64(6.0 - Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2)))))))) end
function tmp = code(x1, x2) tmp = x1 + (x1 + ((x1 * -3.0) - (x2 * (6.0 - ((x1 * -12.0) + (8.0 * (x1 * x2))))))); end
code[x1_, x2_] := N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] - N[(x2 * N[(6.0 - N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + \left(x1 + \left(x1 \cdot -3 - x2 \cdot \left(6 - \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)
\end{array}
Initial program 70.2%
Taylor expanded in x1 around 0 49.0%
Taylor expanded in x1 around 0 54.6%
Taylor expanded in x2 around 0 60.2%
Final simplification60.2%
(FPCore (x1 x2) :precision binary64 (+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))))
double code(double x1, double x2) {
return x1 + ((x2 * -6.0) - (x1 * (2.0 - (4.0 * (x2 * ((2.0 * x2) - 3.0))))));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))))
end function
public static double code(double x1, double x2) {
return x1 + ((x2 * -6.0) - (x1 * (2.0 - (4.0 * (x2 * ((2.0 * x2) - 3.0))))));
}
def code(x1, x2): return x1 + ((x2 * -6.0) - (x1 * (2.0 - (4.0 * (x2 * ((2.0 * x2) - 3.0))))))
function code(x1, x2) return Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))))) end
function tmp = code(x1, x2) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (4.0 * (x2 * ((2.0 * x2) - 3.0)))))); end
code[x1_, x2_] := N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)
\end{array}
Initial program 70.2%
Taylor expanded in x1 around 0 49.0%
Taylor expanded in x1 around 0 54.8%
Final simplification54.8%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -2e-132) (not (<= x2 2.8e-130))) (* x2 -6.0) (+ x1 (* x1 -2.0))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -2e-132) || !(x2 <= 2.8e-130)) {
tmp = x2 * -6.0;
} else {
tmp = x1 + (x1 * -2.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-2d-132)) .or. (.not. (x2 <= 2.8d-130))) then
tmp = x2 * (-6.0d0)
else
tmp = x1 + (x1 * (-2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -2e-132) || !(x2 <= 2.8e-130)) {
tmp = x2 * -6.0;
} else {
tmp = x1 + (x1 * -2.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -2e-132) or not (x2 <= 2.8e-130): tmp = x2 * -6.0 else: tmp = x1 + (x1 * -2.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -2e-132) || !(x2 <= 2.8e-130)) tmp = Float64(x2 * -6.0); else tmp = Float64(x1 + Float64(x1 * -2.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -2e-132) || ~((x2 <= 2.8e-130))) tmp = x2 * -6.0; else tmp = x1 + (x1 * -2.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -2e-132], N[Not[LessEqual[x2, 2.8e-130]], $MachinePrecision]], N[(x2 * -6.0), $MachinePrecision], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -2 \cdot 10^{-132} \lor \neg \left(x2 \leq 2.8 \cdot 10^{-130}\right):\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\end{array}
\end{array}
if x2 < -2e-132 or 2.80000000000000016e-130 < x2 Initial program 72.1%
Taylor expanded in x1 around 0 48.9%
Taylor expanded in x1 around 0 33.1%
*-commutative33.1%
Simplified33.1%
Taylor expanded in x1 around 0 32.7%
*-commutative32.7%
Simplified32.7%
if -2e-132 < x2 < 2.80000000000000016e-130Initial program 65.3%
Taylor expanded in x1 around 0 49.3%
Taylor expanded in x1 around 0 49.7%
Taylor expanded in x2 around 0 42.4%
distribute-rgt1-in43.0%
metadata-eval43.0%
*-commutative43.0%
Simplified43.0%
Final simplification35.5%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -2.9e-133) (* x2 -6.0) (if (<= x2 2e-165) (+ x1 (* x1 -2.0)) (+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -2.9e-133) {
tmp = x2 * -6.0;
} else if (x2 <= 2e-165) {
tmp = x1 + (x1 * -2.0);
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-2.9d-133)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 2d-165) then
tmp = x1 + (x1 * (-2.0d0))
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -2.9e-133) {
tmp = x2 * -6.0;
} else if (x2 <= 2e-165) {
tmp = x1 + (x1 * -2.0);
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -2.9e-133: tmp = x2 * -6.0 elif x2 <= 2e-165: tmp = x1 + (x1 * -2.0) else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -2.9e-133) tmp = Float64(x2 * -6.0); elseif (x2 <= 2e-165) tmp = Float64(x1 + Float64(x1 * -2.0)); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -2.9e-133) tmp = x2 * -6.0; elseif (x2 <= 2e-165) tmp = x1 + (x1 * -2.0); else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -2.9e-133], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 2e-165], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -2.9 \cdot 10^{-133}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 2 \cdot 10^{-165}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -2.8999999999999998e-133Initial program 74.3%
Taylor expanded in x1 around 0 48.5%
Taylor expanded in x1 around 0 27.9%
*-commutative27.9%
Simplified27.9%
Taylor expanded in x1 around 0 28.1%
*-commutative28.1%
Simplified28.1%
if -2.8999999999999998e-133 < x2 < 2e-165Initial program 66.8%
Taylor expanded in x1 around 0 52.2%
Taylor expanded in x1 around 0 52.8%
Taylor expanded in x2 around 0 47.3%
distribute-rgt1-in47.9%
metadata-eval47.9%
*-commutative47.9%
Simplified47.9%
if 2e-165 < x2 Initial program 68.8%
Taylor expanded in x1 around 0 47.7%
Taylor expanded in x1 around 0 35.8%
*-commutative35.8%
Simplified35.8%
Final simplification36.0%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -7.5e-110) (+ x1 (* x1 -2.0)) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -7.5e-110) {
tmp = x1 + (x1 * -2.0);
} 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 <= (-7.5d-110)) then
tmp = x1 + (x1 * (-2.0d0))
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 <= -7.5e-110) {
tmp = x1 + (x1 * -2.0);
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -7.5e-110: tmp = x1 + (x1 * -2.0) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -7.5e-110) tmp = Float64(x1 + Float64(x1 * -2.0)); 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 <= -7.5e-110) tmp = x1 + (x1 * -2.0); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -7.5e-110], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{-110}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -7.50000000000000053e-110Initial program 58.6%
Taylor expanded in x1 around 0 35.6%
Taylor expanded in x1 around 0 37.2%
Taylor expanded in x2 around 0 20.0%
distribute-rgt1-in20.2%
metadata-eval20.2%
*-commutative20.2%
Simplified20.2%
if -7.50000000000000053e-110 < x1 Initial program 76.8%
Taylor expanded in x1 around 0 56.7%
Taylor expanded in x1 around 0 38.7%
*-commutative38.7%
Simplified38.7%
Taylor expanded in x2 around inf 47.3%
Final simplification37.4%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 70.2%
Taylor expanded in x1 around 0 49.0%
Taylor expanded in x1 around 0 26.3%
*-commutative26.3%
Simplified26.3%
Taylor expanded in x1 around 0 26.0%
*-commutative26.0%
Simplified26.0%
Final simplification26.0%
(FPCore (x1 x2) :precision binary64 9.0)
double code(double x1, double x2) {
return 9.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = 9.0d0
end function
public static double code(double x1, double x2) {
return 9.0;
}
def code(x1, x2): return 9.0
function code(x1, x2) return 9.0 end
function tmp = code(x1, x2) tmp = 9.0; end
code[x1_, x2_] := 9.0
\begin{array}{l}
\\
9
\end{array}
Initial program 70.2%
Taylor expanded in x1 around inf 56.6%
Taylor expanded in x1 around inf 45.9%
Taylor expanded in x1 around 0 3.3%
Final simplification3.3%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 70.2%
Taylor expanded in x1 around 0 49.0%
Taylor expanded in x1 around 0 26.3%
*-commutative26.3%
Simplified26.3%
Taylor expanded in x1 around inf 3.4%
Final simplification3.4%
herbie shell --seed 2024050
(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))))))