
(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 28 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 (* 3.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (fma x1 (* x1 3.0) (* 2.0 x2)))
(t_3 (/ (- t_2 x1) (fma x1 x1 1.0)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (/ (- (+ t_1 (* 2.0 x2)) x1) t_4))
(t_6 (/ (- x1 t_2) (fma x1 x1 1.0))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_4
(+
(* (* (* x1 2.0) t_5) (- t_5 3.0))
(* (* x1 x1) (- (* t_5 4.0) 6.0))))
(* t_1 t_5))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_4))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_0 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_3 4.0 -6.0)) (* (* x1 (* 2.0 t_6)) (- t_6 -3.0)))
(fma t_0 t_3 (pow x1 3.0))))))
(+
x1
(+
9.0
(+
x1
(*
(pow x1 4.0)
(+
6.0
(/ (- (/ (+ 9.0 (* 4.0 (- (* 2.0 x2) 3.0))) x1) 3.0) x1)))))))))
double code(double x1, double x2) {
double t_0 = 3.0 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = fma(x1, (x1 * 3.0), (2.0 * x2));
double t_3 = (t_2 - x1) / fma(x1, x1, 1.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = ((t_1 + (2.0 * x2)) - x1) / t_4;
double t_6 = (x1 - t_2) / fma(x1, x1, 1.0);
double tmp;
if ((x1 + ((x1 + (((t_4 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))) + (t_1 * t_5)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_4)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_0 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_3, 4.0, -6.0)), ((x1 * (2.0 * t_6)) * (t_6 - -3.0))), fma(t_0, t_3, pow(x1, 3.0)))));
} else {
tmp = x1 + (9.0 + (x1 + (pow(x1, 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1)))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(3.0 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) t_3 = Float64(Float64(t_2 - x1) / fma(x1, x1, 1.0)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_4) t_6 = Float64(Float64(x1 - t_2) / fma(x1, x1, 1.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_4 * 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_1 * t_5)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_4)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_0 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_3, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_6)) * Float64(t_6 - -3.0))), fma(t_0, t_3, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(Float64(9.0 + Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0))) / x1) - 3.0) / x1)))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 - t$95$2), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$4 * 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$1 * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$0 - 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$3 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$6), $MachinePrecision]), $MachinePrecision] * N[(t$95$6 - -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(9.0 + N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(9.0 + N[(4.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right)\\
t_3 := \frac{t\_2 - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_4}\\
t_6 := \frac{x1 - t\_2}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_4 \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\_1 \cdot t\_5\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_4}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_0 - \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\_3, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_6\right)\right) \cdot \left(t\_6 - -3\right)\right), \mathsf{fma}\left(t\_0, t\_3, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + {x1}^{4} \cdot \left(6 + \frac{\frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1} - 3}{x1}\right)\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Simplified99.7%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around -inf 12.5%
Taylor expanded in x1 around inf 100.0%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
(if (<= t_3 INFINITY)
t_3
(+
x1
(+
9.0
(+
x1
(*
(pow x1 4.0)
(+
6.0
(/ (- (/ (+ 9.0 (* 4.0 (- (* 2.0 x2) 3.0))) x1) 3.0) x1)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 + (9.0 + (x1 + (pow(x1, 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1)))));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = x1 + (9.0 + (x1 + (Math.pow(x1, 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = x1 + (9.0 + (x1 + (math.pow(x1, 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(Float64(9.0 + Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0))) / x1) - 3.0) / x1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = x1 + (9.0 + (x1 + ((x1 ^ 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 + N[(9.0 + N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(9.0 + N[(4.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + {x1}^{4} \cdot \left(6 + \frac{\frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1} - 3}{x1}\right)\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around -inf 12.5%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
(if (<= t_3 INFINITY)
t_3
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 97.5%
Final simplification98.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* x1 (* x1 x1)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (- (* 2.0 x2) 3.0))
(t_5 (* x2 t_4))
(t_6 (- 3.0 (* 2.0 x2)))
(t_7 (- (- t_1 (* 2.0 x2)) x1))
(t_8 (* 3.0 (* x2 -2.0)))
(t_9 (- -1.0 (* x1 x1)))
(t_10 (- (+ t_1 (* 2.0 x2)) x1))
(t_11 (/ t_10 t_9))
(t_12 (/ t_10 t_3))
(t_13 (- t_12 3.0)))
(if (<= x1 -1e+144)
t_0
(if (<= x1 -3.4e+106)
(-
x1
(-
(* 3.0 (/ t_7 t_9))
(+
x1
(*
x1
(-
(* 4.0 t_5)
(*
x1
(+
6.0
(+
(* 2.0 (- t_4 (* x2 -2.0)))
(-
(-
(*
x1
(+
6.0
(+
(* 4.0 (* x2 t_6))
(*
2.0
(+
(* 2.0 t_5)
(+
-1.0
(- (* 3.0 t_6) (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))))))))))
(* x2 8.0))
(* x2 6.0))))))))))
(if (<= x1 -2.5e-14)
(+
x1
(+
t_8
(-
x1
(-
(+
(* t_1 t_11)
(*
t_3
(-
(* t_13 (* (* x1 2.0) t_11))
(*
(* x1 x1)
(- (* 4.0 (- 3.0 (/ (- 1.0 (/ t_4 x1)) x1))) 6.0)))))
t_2))))
(if (<= x1 0.058)
(+
x1
(+
(* 3.0 (/ t_7 t_3))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153)
(+
x1
(+
(+
x1
(+
(+
(*
t_3
(+
(* (* (* x1 2.0) t_12) t_13)
(* (* x1 x1) (- (* t_12 4.0) 6.0))))
(* t_1 t_12))
t_2))
t_8))
t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 * (x1 * x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = (2.0 * x2) - 3.0;
double t_5 = x2 * t_4;
double t_6 = 3.0 - (2.0 * x2);
double t_7 = (t_1 - (2.0 * x2)) - x1;
double t_8 = 3.0 * (x2 * -2.0);
double t_9 = -1.0 - (x1 * x1);
double t_10 = (t_1 + (2.0 * x2)) - x1;
double t_11 = t_10 / t_9;
double t_12 = t_10 / t_3;
double t_13 = t_12 - 3.0;
double tmp;
if (x1 <= -1e+144) {
tmp = t_0;
} else if (x1 <= -3.4e+106) {
tmp = x1 - ((3.0 * (t_7 / t_9)) - (x1 + (x1 * ((4.0 * t_5) - (x1 * (6.0 + ((2.0 * (t_4 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_6)) + (2.0 * ((2.0 * t_5) + (-1.0 + ((3.0 * t_6) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -2.5e-14) {
tmp = x1 + (t_8 + (x1 - (((t_1 * t_11) + (t_3 * ((t_13 * ((x1 * 2.0) * t_11)) - ((x1 * x1) * ((4.0 * (3.0 - ((1.0 - (t_4 / x1)) / x1))) - 6.0))))) - t_2)));
} else if (x1 <= 0.058) {
tmp = x1 + ((3.0 * (t_7 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_12) * t_13) + ((x1 * x1) * ((t_12 * 4.0) - 6.0)))) + (t_1 * t_12)) + t_2)) + t_8);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_10
real(8) :: t_11
real(8) :: t_12
real(8) :: t_13
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 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = x1 * (x1 * 3.0d0)
t_2 = x1 * (x1 * x1)
t_3 = (x1 * x1) + 1.0d0
t_4 = (2.0d0 * x2) - 3.0d0
t_5 = x2 * t_4
t_6 = 3.0d0 - (2.0d0 * x2)
t_7 = (t_1 - (2.0d0 * x2)) - x1
t_8 = 3.0d0 * (x2 * (-2.0d0))
t_9 = (-1.0d0) - (x1 * x1)
t_10 = (t_1 + (2.0d0 * x2)) - x1
t_11 = t_10 / t_9
t_12 = t_10 / t_3
t_13 = t_12 - 3.0d0
if (x1 <= (-1d+144)) then
tmp = t_0
else if (x1 <= (-3.4d+106)) then
tmp = x1 - ((3.0d0 * (t_7 / t_9)) - (x1 + (x1 * ((4.0d0 * t_5) - (x1 * (6.0d0 + ((2.0d0 * (t_4 - (x2 * (-2.0d0)))) + (((x1 * (6.0d0 + ((4.0d0 * (x2 * t_6)) + (2.0d0 * ((2.0d0 * t_5) + ((-1.0d0) + ((3.0d0 * t_6) - (2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))))))))) - (x2 * 8.0d0)) - (x2 * 6.0d0)))))))))
else if (x1 <= (-2.5d-14)) then
tmp = x1 + (t_8 + (x1 - (((t_1 * t_11) + (t_3 * ((t_13 * ((x1 * 2.0d0) * t_11)) - ((x1 * x1) * ((4.0d0 * (3.0d0 - ((1.0d0 - (t_4 / x1)) / x1))) - 6.0d0))))) - t_2)))
else if (x1 <= 0.058d0) then
tmp = x1 + ((3.0d0 * (t_7 / t_3)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0d0) * t_12) * t_13) + ((x1 * x1) * ((t_12 * 4.0d0) - 6.0d0)))) + (t_1 * t_12)) + t_2)) + t_8)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 * (x1 * x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = (2.0 * x2) - 3.0;
double t_5 = x2 * t_4;
double t_6 = 3.0 - (2.0 * x2);
double t_7 = (t_1 - (2.0 * x2)) - x1;
double t_8 = 3.0 * (x2 * -2.0);
double t_9 = -1.0 - (x1 * x1);
double t_10 = (t_1 + (2.0 * x2)) - x1;
double t_11 = t_10 / t_9;
double t_12 = t_10 / t_3;
double t_13 = t_12 - 3.0;
double tmp;
if (x1 <= -1e+144) {
tmp = t_0;
} else if (x1 <= -3.4e+106) {
tmp = x1 - ((3.0 * (t_7 / t_9)) - (x1 + (x1 * ((4.0 * t_5) - (x1 * (6.0 + ((2.0 * (t_4 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_6)) + (2.0 * ((2.0 * t_5) + (-1.0 + ((3.0 * t_6) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -2.5e-14) {
tmp = x1 + (t_8 + (x1 - (((t_1 * t_11) + (t_3 * ((t_13 * ((x1 * 2.0) * t_11)) - ((x1 * x1) * ((4.0 * (3.0 - ((1.0 - (t_4 / x1)) / x1))) - 6.0))))) - t_2)));
} else if (x1 <= 0.058) {
tmp = x1 + ((3.0 * (t_7 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_12) * t_13) + ((x1 * x1) * ((t_12 * 4.0) - 6.0)))) + (t_1 * t_12)) + t_2)) + t_8);
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = x1 * (x1 * 3.0) t_2 = x1 * (x1 * x1) t_3 = (x1 * x1) + 1.0 t_4 = (2.0 * x2) - 3.0 t_5 = x2 * t_4 t_6 = 3.0 - (2.0 * x2) t_7 = (t_1 - (2.0 * x2)) - x1 t_8 = 3.0 * (x2 * -2.0) t_9 = -1.0 - (x1 * x1) t_10 = (t_1 + (2.0 * x2)) - x1 t_11 = t_10 / t_9 t_12 = t_10 / t_3 t_13 = t_12 - 3.0 tmp = 0 if x1 <= -1e+144: tmp = t_0 elif x1 <= -3.4e+106: tmp = x1 - ((3.0 * (t_7 / t_9)) - (x1 + (x1 * ((4.0 * t_5) - (x1 * (6.0 + ((2.0 * (t_4 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_6)) + (2.0 * ((2.0 * t_5) + (-1.0 + ((3.0 * t_6) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))) elif x1 <= -2.5e-14: tmp = x1 + (t_8 + (x1 - (((t_1 * t_11) + (t_3 * ((t_13 * ((x1 * 2.0) * t_11)) - ((x1 * x1) * ((4.0 * (3.0 - ((1.0 - (t_4 / x1)) / x1))) - 6.0))))) - t_2))) elif x1 <= 0.058: tmp = x1 + ((3.0 * (t_7 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_12) * t_13) + ((x1 * x1) * ((t_12 * 4.0) - 6.0)))) + (t_1 * t_12)) + t_2)) + t_8) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(Float64(2.0 * x2) - 3.0) t_5 = Float64(x2 * t_4) t_6 = Float64(3.0 - Float64(2.0 * x2)) t_7 = Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) t_8 = Float64(3.0 * Float64(x2 * -2.0)) t_9 = Float64(-1.0 - Float64(x1 * x1)) t_10 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_11 = Float64(t_10 / t_9) t_12 = Float64(t_10 / t_3) t_13 = Float64(t_12 - 3.0) tmp = 0.0 if (x1 <= -1e+144) tmp = t_0; elseif (x1 <= -3.4e+106) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_7 / t_9)) - Float64(x1 + Float64(x1 * Float64(Float64(4.0 * t_5) - Float64(x1 * Float64(6.0 + Float64(Float64(2.0 * Float64(t_4 - Float64(x2 * -2.0))) + Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(4.0 * Float64(x2 * t_6)) + Float64(2.0 * Float64(Float64(2.0 * t_5) + Float64(-1.0 + Float64(Float64(3.0 * t_6) - Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))))))))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0)))))))))); elseif (x1 <= -2.5e-14) tmp = Float64(x1 + Float64(t_8 + Float64(x1 - Float64(Float64(Float64(t_1 * t_11) + Float64(t_3 * Float64(Float64(t_13 * Float64(Float64(x1 * 2.0) * t_11)) - Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(3.0 - Float64(Float64(1.0 - Float64(t_4 / x1)) / x1))) - 6.0))))) - t_2)))); elseif (x1 <= 0.058) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_7 / t_3)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_12) * t_13) + Float64(Float64(x1 * x1) * Float64(Float64(t_12 * 4.0) - 6.0)))) + Float64(t_1 * t_12)) + t_2)) + t_8)); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = x1 * (x1 * 3.0); t_2 = x1 * (x1 * x1); t_3 = (x1 * x1) + 1.0; t_4 = (2.0 * x2) - 3.0; t_5 = x2 * t_4; t_6 = 3.0 - (2.0 * x2); t_7 = (t_1 - (2.0 * x2)) - x1; t_8 = 3.0 * (x2 * -2.0); t_9 = -1.0 - (x1 * x1); t_10 = (t_1 + (2.0 * x2)) - x1; t_11 = t_10 / t_9; t_12 = t_10 / t_3; t_13 = t_12 - 3.0; tmp = 0.0; if (x1 <= -1e+144) tmp = t_0; elseif (x1 <= -3.4e+106) tmp = x1 - ((3.0 * (t_7 / t_9)) - (x1 + (x1 * ((4.0 * t_5) - (x1 * (6.0 + ((2.0 * (t_4 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_6)) + (2.0 * ((2.0 * t_5) + (-1.0 + ((3.0 * t_6) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))); elseif (x1 <= -2.5e-14) tmp = x1 + (t_8 + (x1 - (((t_1 * t_11) + (t_3 * ((t_13 * ((x1 * 2.0) * t_11)) - ((x1 * x1) * ((4.0 * (3.0 - ((1.0 - (t_4 / x1)) / x1))) - 6.0))))) - t_2))); elseif (x1 <= 0.058) tmp = x1 + ((3.0 * (t_7 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_12) * t_13) + ((x1 * x1) * ((t_12 * 4.0) - 6.0)))) + (t_1 * t_12)) + t_2)) + t_8); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$5 = N[(x2 * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$8 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$10 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$11 = N[(t$95$10 / t$95$9), $MachinePrecision]}, Block[{t$95$12 = N[(t$95$10 / t$95$3), $MachinePrecision]}, Block[{t$95$13 = N[(t$95$12 - 3.0), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$0, If[LessEqual[x1, -3.4e+106], N[(x1 - N[(N[(3.0 * N[(t$95$7 / t$95$9), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(x1 * N[(N[(4.0 * t$95$5), $MachinePrecision] - N[(x1 * N[(6.0 + N[(N[(2.0 * N[(t$95$4 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * N[(6.0 + N[(N[(4.0 * N[(x2 * t$95$6), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(2.0 * t$95$5), $MachinePrecision] + N[(-1.0 + N[(N[(3.0 * t$95$6), $MachinePrecision] - N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.5e-14], N[(x1 + N[(t$95$8 + N[(x1 - N[(N[(N[(t$95$1 * t$95$11), $MachinePrecision] + N[(t$95$3 * N[(N[(t$95$13 * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$11), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(3.0 - N[(N[(1.0 - N[(t$95$4 / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.058], N[(x1 + N[(N[(3.0 * N[(t$95$7 / 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, 2e+153], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$12), $MachinePrecision] * t$95$13), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$12 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$12), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + t$95$8), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot x1 + 1\\
t_4 := 2 \cdot x2 - 3\\
t_5 := x2 \cdot t\_4\\
t_6 := 3 - 2 \cdot x2\\
t_7 := \left(t\_1 - 2 \cdot x2\right) - x1\\
t_8 := 3 \cdot \left(x2 \cdot -2\right)\\
t_9 := -1 - x1 \cdot x1\\
t_10 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_11 := \frac{t\_10}{t\_9}\\
t_12 := \frac{t\_10}{t\_3}\\
t_13 := t\_12 - 3\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_7}{t\_9} - \left(x1 + x1 \cdot \left(4 \cdot t\_5 - x1 \cdot \left(6 + \left(2 \cdot \left(t\_4 - x2 \cdot -2\right) + \left(\left(x1 \cdot \left(6 + \left(4 \cdot \left(x2 \cdot t\_6\right) + 2 \cdot \left(2 \cdot t\_5 + \left(-1 + \left(3 \cdot t\_6 - 2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right)\right)\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-14}:\\
\;\;\;\;x1 + \left(t\_8 + \left(x1 - \left(\left(t\_1 \cdot t\_11 + t\_3 \cdot \left(t\_13 \cdot \left(\left(x1 \cdot 2\right) \cdot t\_11\right) - \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 - \frac{1 - \frac{t\_4}{x1}}{x1}\right) - 6\right)\right)\right) - t\_2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.058:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_7}{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 2 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_12\right) \cdot t\_13 + \left(x1 \cdot x1\right) \cdot \left(t\_12 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_12\right) + t\_2\right)\right) + t\_8\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 75.0%
if -3.39999999999999994e106 < x1 < -2.5000000000000001e-14Initial program 99.4%
Taylor expanded in x1 around 0 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around -inf 99.5%
if -2.5000000000000001e-14 < x1 < 0.0580000000000000029Initial program 99.4%
Taylor expanded in x1 around 0 89.0%
Taylor expanded in x2 around 0 99.4%
if 0.0580000000000000029 < x1 < 2e153Initial program 96.1%
Taylor expanded in x1 around 0 96.1%
*-commutative96.1%
Simplified96.1%
Final simplification98.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (- t_1 (* 2.0 x2)) x1))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (- (* 2.0 x2) 3.0))
(t_5 (* x2 t_4))
(t_6 (- 3.0 (* 2.0 x2)))
(t_7 (- -1.0 (* x1 x1)))
(t_8 (- (+ t_1 (* 2.0 x2)) x1))
(t_9 (/ t_8 t_7))
(t_10
(+
x1
(+
(* 3.0 (* x2 -2.0))
(-
x1
(-
(+
(* t_1 t_9)
(*
t_3
(-
(* (- (/ t_8 t_3) 3.0) (* (* x1 2.0) t_9))
(*
(* x1 x1)
(- (* 4.0 (- 3.0 (/ (- 1.0 (/ t_4 x1)) x1))) 6.0)))))
(* x1 (* x1 x1))))))))
(if (<= x1 -1e+144)
t_0
(if (<= x1 -3.4e+106)
(-
x1
(-
(* 3.0 (/ t_2 t_7))
(+
x1
(*
x1
(-
(* 4.0 t_5)
(*
x1
(+
6.0
(+
(* 2.0 (- t_4 (* x2 -2.0)))
(-
(-
(*
x1
(+
6.0
(+
(* 4.0 (* x2 t_6))
(*
2.0
(+
(* 2.0 t_5)
(+
-1.0
(- (* 3.0 t_6) (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))))))))))
(* x2 8.0))
(* x2 6.0))))))))))
(if (<= x1 -2.5e-14)
t_10
(if (<= x1 0.044)
(+
x1
(+
(* 3.0 (/ t_2 t_3))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153) t_10 t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 - (2.0 * x2)) - x1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = (2.0 * x2) - 3.0;
double t_5 = x2 * t_4;
double t_6 = 3.0 - (2.0 * x2);
double t_7 = -1.0 - (x1 * x1);
double t_8 = (t_1 + (2.0 * x2)) - x1;
double t_9 = t_8 / t_7;
double t_10 = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (((t_1 * t_9) + (t_3 * ((((t_8 / t_3) - 3.0) * ((x1 * 2.0) * t_9)) - ((x1 * x1) * ((4.0 * (3.0 - ((1.0 - (t_4 / x1)) / x1))) - 6.0))))) - (x1 * (x1 * x1)))));
double tmp;
if (x1 <= -1e+144) {
tmp = t_0;
} else if (x1 <= -3.4e+106) {
tmp = x1 - ((3.0 * (t_2 / t_7)) - (x1 + (x1 * ((4.0 * t_5) - (x1 * (6.0 + ((2.0 * (t_4 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_6)) + (2.0 * ((2.0 * t_5) + (-1.0 + ((3.0 * t_6) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -2.5e-14) {
tmp = t_10;
} else if (x1 <= 0.044) {
tmp = x1 + ((3.0 * (t_2 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_10;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_10
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = x1 * (x1 * 3.0d0)
t_2 = (t_1 - (2.0d0 * x2)) - x1
t_3 = (x1 * x1) + 1.0d0
t_4 = (2.0d0 * x2) - 3.0d0
t_5 = x2 * t_4
t_6 = 3.0d0 - (2.0d0 * x2)
t_7 = (-1.0d0) - (x1 * x1)
t_8 = (t_1 + (2.0d0 * x2)) - x1
t_9 = t_8 / t_7
t_10 = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 - (((t_1 * t_9) + (t_3 * ((((t_8 / t_3) - 3.0d0) * ((x1 * 2.0d0) * t_9)) - ((x1 * x1) * ((4.0d0 * (3.0d0 - ((1.0d0 - (t_4 / x1)) / x1))) - 6.0d0))))) - (x1 * (x1 * x1)))))
if (x1 <= (-1d+144)) then
tmp = t_0
else if (x1 <= (-3.4d+106)) then
tmp = x1 - ((3.0d0 * (t_2 / t_7)) - (x1 + (x1 * ((4.0d0 * t_5) - (x1 * (6.0d0 + ((2.0d0 * (t_4 - (x2 * (-2.0d0)))) + (((x1 * (6.0d0 + ((4.0d0 * (x2 * t_6)) + (2.0d0 * ((2.0d0 * t_5) + ((-1.0d0) + ((3.0d0 * t_6) - (2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))))))))) - (x2 * 8.0d0)) - (x2 * 6.0d0)))))))))
else if (x1 <= (-2.5d-14)) then
tmp = t_10
else if (x1 <= 0.044d0) then
tmp = x1 + ((3.0d0 * (t_2 / t_3)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = t_10
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 - (2.0 * x2)) - x1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = (2.0 * x2) - 3.0;
double t_5 = x2 * t_4;
double t_6 = 3.0 - (2.0 * x2);
double t_7 = -1.0 - (x1 * x1);
double t_8 = (t_1 + (2.0 * x2)) - x1;
double t_9 = t_8 / t_7;
double t_10 = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (((t_1 * t_9) + (t_3 * ((((t_8 / t_3) - 3.0) * ((x1 * 2.0) * t_9)) - ((x1 * x1) * ((4.0 * (3.0 - ((1.0 - (t_4 / x1)) / x1))) - 6.0))))) - (x1 * (x1 * x1)))));
double tmp;
if (x1 <= -1e+144) {
tmp = t_0;
} else if (x1 <= -3.4e+106) {
tmp = x1 - ((3.0 * (t_2 / t_7)) - (x1 + (x1 * ((4.0 * t_5) - (x1 * (6.0 + ((2.0 * (t_4 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_6)) + (2.0 * ((2.0 * t_5) + (-1.0 + ((3.0 * t_6) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -2.5e-14) {
tmp = t_10;
} else if (x1 <= 0.044) {
tmp = x1 + ((3.0 * (t_2 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_10;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = x1 * (x1 * 3.0) t_2 = (t_1 - (2.0 * x2)) - x1 t_3 = (x1 * x1) + 1.0 t_4 = (2.0 * x2) - 3.0 t_5 = x2 * t_4 t_6 = 3.0 - (2.0 * x2) t_7 = -1.0 - (x1 * x1) t_8 = (t_1 + (2.0 * x2)) - x1 t_9 = t_8 / t_7 t_10 = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (((t_1 * t_9) + (t_3 * ((((t_8 / t_3) - 3.0) * ((x1 * 2.0) * t_9)) - ((x1 * x1) * ((4.0 * (3.0 - ((1.0 - (t_4 / x1)) / x1))) - 6.0))))) - (x1 * (x1 * x1))))) tmp = 0 if x1 <= -1e+144: tmp = t_0 elif x1 <= -3.4e+106: tmp = x1 - ((3.0 * (t_2 / t_7)) - (x1 + (x1 * ((4.0 * t_5) - (x1 * (6.0 + ((2.0 * (t_4 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_6)) + (2.0 * ((2.0 * t_5) + (-1.0 + ((3.0 * t_6) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))) elif x1 <= -2.5e-14: tmp = t_10 elif x1 <= 0.044: tmp = x1 + ((3.0 * (t_2 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = t_10 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(Float64(2.0 * x2) - 3.0) t_5 = Float64(x2 * t_4) t_6 = Float64(3.0 - Float64(2.0 * x2)) t_7 = Float64(-1.0 - Float64(x1 * x1)) t_8 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_9 = Float64(t_8 / t_7) t_10 = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 - Float64(Float64(Float64(t_1 * t_9) + Float64(t_3 * Float64(Float64(Float64(Float64(t_8 / t_3) - 3.0) * Float64(Float64(x1 * 2.0) * t_9)) - Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(3.0 - Float64(Float64(1.0 - Float64(t_4 / x1)) / x1))) - 6.0))))) - Float64(x1 * Float64(x1 * x1)))))) tmp = 0.0 if (x1 <= -1e+144) tmp = t_0; elseif (x1 <= -3.4e+106) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_2 / t_7)) - Float64(x1 + Float64(x1 * Float64(Float64(4.0 * t_5) - Float64(x1 * Float64(6.0 + Float64(Float64(2.0 * Float64(t_4 - Float64(x2 * -2.0))) + Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(4.0 * Float64(x2 * t_6)) + Float64(2.0 * Float64(Float64(2.0 * t_5) + Float64(-1.0 + Float64(Float64(3.0 * t_6) - Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))))))))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0)))))))))); elseif (x1 <= -2.5e-14) tmp = t_10; elseif (x1 <= 0.044) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_2 / t_3)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = t_10; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = x1 * (x1 * 3.0); t_2 = (t_1 - (2.0 * x2)) - x1; t_3 = (x1 * x1) + 1.0; t_4 = (2.0 * x2) - 3.0; t_5 = x2 * t_4; t_6 = 3.0 - (2.0 * x2); t_7 = -1.0 - (x1 * x1); t_8 = (t_1 + (2.0 * x2)) - x1; t_9 = t_8 / t_7; t_10 = x1 + ((3.0 * (x2 * -2.0)) + (x1 - (((t_1 * t_9) + (t_3 * ((((t_8 / t_3) - 3.0) * ((x1 * 2.0) * t_9)) - ((x1 * x1) * ((4.0 * (3.0 - ((1.0 - (t_4 / x1)) / x1))) - 6.0))))) - (x1 * (x1 * x1))))); tmp = 0.0; if (x1 <= -1e+144) tmp = t_0; elseif (x1 <= -3.4e+106) tmp = x1 - ((3.0 * (t_2 / t_7)) - (x1 + (x1 * ((4.0 * t_5) - (x1 * (6.0 + ((2.0 * (t_4 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_6)) + (2.0 * ((2.0 * t_5) + (-1.0 + ((3.0 * t_6) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))); elseif (x1 <= -2.5e-14) tmp = t_10; elseif (x1 <= 0.044) tmp = x1 + ((3.0 * (t_2 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = t_10; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$5 = N[(x2 * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$8 / t$95$7), $MachinePrecision]}, Block[{t$95$10 = N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 - N[(N[(N[(t$95$1 * t$95$9), $MachinePrecision] + N[(t$95$3 * N[(N[(N[(N[(t$95$8 / t$95$3), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$9), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(3.0 - N[(N[(1.0 - N[(t$95$4 / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$0, If[LessEqual[x1, -3.4e+106], N[(x1 - N[(N[(3.0 * N[(t$95$2 / t$95$7), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(x1 * N[(N[(4.0 * t$95$5), $MachinePrecision] - N[(x1 * N[(6.0 + N[(N[(2.0 * N[(t$95$4 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * N[(6.0 + N[(N[(4.0 * N[(x2 * t$95$6), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(2.0 * t$95$5), $MachinePrecision] + N[(-1.0 + N[(N[(3.0 * t$95$6), $MachinePrecision] - N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.5e-14], t$95$10, If[LessEqual[x1, 0.044], N[(x1 + N[(N[(3.0 * N[(t$95$2 / 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, 2e+153], t$95$10, t$95$0]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 - 2 \cdot x2\right) - x1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := 2 \cdot x2 - 3\\
t_5 := x2 \cdot t\_4\\
t_6 := 3 - 2 \cdot x2\\
t_7 := -1 - x1 \cdot x1\\
t_8 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_9 := \frac{t\_8}{t\_7}\\
t_10 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 - \left(\left(t\_1 \cdot t\_9 + t\_3 \cdot \left(\left(\frac{t\_8}{t\_3} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_9\right) - \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 - \frac{1 - \frac{t\_4}{x1}}{x1}\right) - 6\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_2}{t\_7} - \left(x1 + x1 \cdot \left(4 \cdot t\_5 - x1 \cdot \left(6 + \left(2 \cdot \left(t\_4 - x2 \cdot -2\right) + \left(\left(x1 \cdot \left(6 + \left(4 \cdot \left(x2 \cdot t\_6\right) + 2 \cdot \left(2 \cdot t\_5 + \left(-1 + \left(3 \cdot t\_6 - 2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right)\right)\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-14}:\\
\;\;\;\;t\_10\\
\mathbf{elif}\;x1 \leq 0.044:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_2}{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 2 \cdot 10^{+153}:\\
\;\;\;\;t\_10\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 75.0%
if -3.39999999999999994e106 < x1 < -2.5000000000000001e-14 or 0.043999999999999997 < x1 < 2e153Initial program 97.4%
Taylor expanded in x1 around 0 97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in x1 around -inf 97.4%
if -2.5000000000000001e-14 < x1 < 0.043999999999999997Initial program 99.4%
Taylor expanded in x1 around 0 89.0%
Taylor expanded in x2 around 0 99.4%
Final simplification98.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (- t_1 (* 2.0 x2)) x1))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_3))
(t_5 (- (* 2.0 x2) 3.0))
(t_6 (* x2 t_5))
(t_7 (- 3.0 (* 2.0 x2)))
(t_8
(+
x1
(+
(+
x1
(+
(+
(*
t_3
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(* (* x1 x1) (- (* t_4 4.0) 6.0))))
(* t_1 t_4))
(* x1 (* x1 x1))))
9.0))))
(if (<= x1 -1e+144)
t_0
(if (<= x1 -3.4e+106)
(-
x1
(-
(* 3.0 (/ t_2 (- -1.0 (* x1 x1))))
(+
x1
(*
x1
(-
(* 4.0 t_6)
(*
x1
(+
6.0
(+
(* 2.0 (- t_5 (* x2 -2.0)))
(-
(-
(*
x1
(+
6.0
(+
(* 4.0 (* x2 t_7))
(*
2.0
(+
(* 2.0 t_6)
(+
-1.0
(- (* 3.0 t_7) (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))))))))))
(* x2 8.0))
(* x2 6.0))))))))))
(if (<= x1 -2.5e-14)
t_8
(if (<= x1 0.058)
(+
x1
(+
(* 3.0 (/ t_2 t_3))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153) t_8 t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 - (2.0 * x2)) - x1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = (2.0 * x2) - 3.0;
double t_6 = x2 * t_5;
double t_7 = 3.0 - (2.0 * x2);
double t_8 = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + (t_1 * t_4)) + (x1 * (x1 * x1)))) + 9.0);
double tmp;
if (x1 <= -1e+144) {
tmp = t_0;
} else if (x1 <= -3.4e+106) {
tmp = x1 - ((3.0 * (t_2 / (-1.0 - (x1 * x1)))) - (x1 + (x1 * ((4.0 * t_6) - (x1 * (6.0 + ((2.0 * (t_5 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_7)) + (2.0 * ((2.0 * t_6) + (-1.0 + ((3.0 * t_7) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -2.5e-14) {
tmp = t_8;
} else if (x1 <= 0.058) {
tmp = x1 + ((3.0 * (t_2 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_8;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = x1 * (x1 * 3.0d0)
t_2 = (t_1 - (2.0d0 * x2)) - x1
t_3 = (x1 * x1) + 1.0d0
t_4 = ((t_1 + (2.0d0 * x2)) - x1) / t_3
t_5 = (2.0d0 * x2) - 3.0d0
t_6 = x2 * t_5
t_7 = 3.0d0 - (2.0d0 * x2)
t_8 = x1 + ((x1 + (((t_3 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + ((x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)))) + (t_1 * t_4)) + (x1 * (x1 * x1)))) + 9.0d0)
if (x1 <= (-1d+144)) then
tmp = t_0
else if (x1 <= (-3.4d+106)) then
tmp = x1 - ((3.0d0 * (t_2 / ((-1.0d0) - (x1 * x1)))) - (x1 + (x1 * ((4.0d0 * t_6) - (x1 * (6.0d0 + ((2.0d0 * (t_5 - (x2 * (-2.0d0)))) + (((x1 * (6.0d0 + ((4.0d0 * (x2 * t_7)) + (2.0d0 * ((2.0d0 * t_6) + ((-1.0d0) + ((3.0d0 * t_7) - (2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))))))))) - (x2 * 8.0d0)) - (x2 * 6.0d0)))))))))
else if (x1 <= (-2.5d-14)) then
tmp = t_8
else if (x1 <= 0.058d0) then
tmp = x1 + ((3.0d0 * (t_2 / t_3)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = t_8
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 - (2.0 * x2)) - x1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = (2.0 * x2) - 3.0;
double t_6 = x2 * t_5;
double t_7 = 3.0 - (2.0 * x2);
double t_8 = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + (t_1 * t_4)) + (x1 * (x1 * x1)))) + 9.0);
double tmp;
if (x1 <= -1e+144) {
tmp = t_0;
} else if (x1 <= -3.4e+106) {
tmp = x1 - ((3.0 * (t_2 / (-1.0 - (x1 * x1)))) - (x1 + (x1 * ((4.0 * t_6) - (x1 * (6.0 + ((2.0 * (t_5 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_7)) + (2.0 * ((2.0 * t_6) + (-1.0 + ((3.0 * t_7) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -2.5e-14) {
tmp = t_8;
} else if (x1 <= 0.058) {
tmp = x1 + ((3.0 * (t_2 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_8;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = x1 * (x1 * 3.0) t_2 = (t_1 - (2.0 * x2)) - x1 t_3 = (x1 * x1) + 1.0 t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3 t_5 = (2.0 * x2) - 3.0 t_6 = x2 * t_5 t_7 = 3.0 - (2.0 * x2) t_8 = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + (t_1 * t_4)) + (x1 * (x1 * x1)))) + 9.0) tmp = 0 if x1 <= -1e+144: tmp = t_0 elif x1 <= -3.4e+106: tmp = x1 - ((3.0 * (t_2 / (-1.0 - (x1 * x1)))) - (x1 + (x1 * ((4.0 * t_6) - (x1 * (6.0 + ((2.0 * (t_5 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_7)) + (2.0 * ((2.0 * t_6) + (-1.0 + ((3.0 * t_7) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))) elif x1 <= -2.5e-14: tmp = t_8 elif x1 <= 0.058: tmp = x1 + ((3.0 * (t_2 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = t_8 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 - Float64(2.0 * x2)) - 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(2.0 * x2) - 3.0) t_6 = Float64(x2 * t_5) t_7 = Float64(3.0 - Float64(2.0 * x2)) t_8 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * 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)))) + Float64(t_1 * t_4)) + Float64(x1 * Float64(x1 * x1)))) + 9.0)) tmp = 0.0 if (x1 <= -1e+144) tmp = t_0; elseif (x1 <= -3.4e+106) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_2 / Float64(-1.0 - Float64(x1 * x1)))) - Float64(x1 + Float64(x1 * Float64(Float64(4.0 * t_6) - Float64(x1 * Float64(6.0 + Float64(Float64(2.0 * Float64(t_5 - Float64(x2 * -2.0))) + Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(4.0 * Float64(x2 * t_7)) + Float64(2.0 * Float64(Float64(2.0 * t_6) + Float64(-1.0 + Float64(Float64(3.0 * t_7) - Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))))))))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0)))))))))); elseif (x1 <= -2.5e-14) tmp = t_8; elseif (x1 <= 0.058) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_2 / t_3)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = t_8; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = x1 * (x1 * 3.0); t_2 = (t_1 - (2.0 * x2)) - x1; t_3 = (x1 * x1) + 1.0; t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3; t_5 = (2.0 * x2) - 3.0; t_6 = x2 * t_5; t_7 = 3.0 - (2.0 * x2); t_8 = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + (t_1 * t_4)) + (x1 * (x1 * x1)))) + 9.0); tmp = 0.0; if (x1 <= -1e+144) tmp = t_0; elseif (x1 <= -3.4e+106) tmp = x1 - ((3.0 * (t_2 / (-1.0 - (x1 * x1)))) - (x1 + (x1 * ((4.0 * t_6) - (x1 * (6.0 + ((2.0 * (t_5 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_7)) + (2.0 * ((2.0 * t_6) + (-1.0 + ((3.0 * t_7) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))); elseif (x1 <= -2.5e-14) tmp = t_8; elseif (x1 <= 0.058) tmp = x1 + ((3.0 * (t_2 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = t_8; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(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[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$6 = N[(x2 * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * 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]), $MachinePrecision] + N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$0, If[LessEqual[x1, -3.4e+106], N[(x1 - N[(N[(3.0 * N[(t$95$2 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(x1 * N[(N[(4.0 * t$95$6), $MachinePrecision] - N[(x1 * N[(6.0 + N[(N[(2.0 * N[(t$95$5 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * N[(6.0 + N[(N[(4.0 * N[(x2 * t$95$7), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(2.0 * t$95$6), $MachinePrecision] + N[(-1.0 + N[(N[(3.0 * t$95$7), $MachinePrecision] - N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.5e-14], t$95$8, If[LessEqual[x1, 0.058], N[(x1 + N[(N[(3.0 * N[(t$95$2 / 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, 2e+153], t$95$8, t$95$0]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 - 2 \cdot x2\right) - x1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_3}\\
t_5 := 2 \cdot x2 - 3\\
t_6 := x2 \cdot t\_5\\
t_7 := 3 - 2 \cdot x2\\
t_8 := x1 + \left(\left(x1 + \left(\left(t\_3 \cdot \left(\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)\right) + t\_1 \cdot t\_4\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 9\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_2}{-1 - x1 \cdot x1} - \left(x1 + x1 \cdot \left(4 \cdot t\_6 - x1 \cdot \left(6 + \left(2 \cdot \left(t\_5 - x2 \cdot -2\right) + \left(\left(x1 \cdot \left(6 + \left(4 \cdot \left(x2 \cdot t\_7\right) + 2 \cdot \left(2 \cdot t\_6 + \left(-1 + \left(3 \cdot t\_7 - 2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right)\right)\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-14}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x1 \leq 0.058:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_2}{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 2 \cdot 10^{+153}:\\
\;\;\;\;t\_8\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 75.0%
if -3.39999999999999994e106 < x1 < -2.5000000000000001e-14 or 0.0580000000000000029 < x1 < 2e153Initial program 97.4%
Taylor expanded in x1 around inf 97.4%
if -2.5000000000000001e-14 < x1 < 0.0580000000000000029Initial program 99.4%
Taylor expanded in x1 around 0 89.0%
Taylor expanded in x2 around 0 99.4%
Final simplification98.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (- t_1 (* 2.0 x2)) x1))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_3))
(t_5 (- (* 2.0 x2) 3.0))
(t_6 (* x2 t_5))
(t_7 (- 3.0 (* 2.0 x2)))
(t_8
(+
x1
(+
(* 3.0 (* x2 -2.0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_4)
(*
t_3
(+
(* (* x1 x1) (- (* t_4 4.0) 6.0))
(*
(* (* x1 2.0) t_4)
(/ (+ (* 2.0 (/ x2 x1)) (- -1.0 (/ 3.0 x1))) x1)))))))))))
(if (<= x1 -1e+144)
t_0
(if (<= x1 -3.4e+106)
(-
x1
(-
(* 3.0 (/ t_2 (- -1.0 (* x1 x1))))
(+
x1
(*
x1
(-
(* 4.0 t_6)
(*
x1
(+
6.0
(+
(* 2.0 (- t_5 (* x2 -2.0)))
(-
(-
(*
x1
(+
6.0
(+
(* 4.0 (* x2 t_7))
(*
2.0
(+
(* 2.0 t_6)
(+
-1.0
(- (* 3.0 t_7) (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))))))))))
(* x2 8.0))
(* x2 6.0))))))))))
(if (<= x1 -1.02e-11)
t_8
(if (<= x1 0.33)
(+
x1
(+
(* 3.0 (/ t_2 t_3))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153) t_8 t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 - (2.0 * x2)) - x1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = (2.0 * x2) - 3.0;
double t_6 = x2 * t_5;
double t_7 = 3.0 - (2.0 * x2);
double t_8 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_4) + (t_3 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + (((x1 * 2.0) * t_4) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1))))))));
double tmp;
if (x1 <= -1e+144) {
tmp = t_0;
} else if (x1 <= -3.4e+106) {
tmp = x1 - ((3.0 * (t_2 / (-1.0 - (x1 * x1)))) - (x1 + (x1 * ((4.0 * t_6) - (x1 * (6.0 + ((2.0 * (t_5 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_7)) + (2.0 * ((2.0 * t_6) + (-1.0 + ((3.0 * t_7) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -1.02e-11) {
tmp = t_8;
} else if (x1 <= 0.33) {
tmp = x1 + ((3.0 * (t_2 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_8;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = x1 * (x1 * 3.0d0)
t_2 = (t_1 - (2.0d0 * x2)) - x1
t_3 = (x1 * x1) + 1.0d0
t_4 = ((t_1 + (2.0d0 * x2)) - x1) / t_3
t_5 = (2.0d0 * x2) - 3.0d0
t_6 = x2 * t_5
t_7 = 3.0d0 - (2.0d0 * x2)
t_8 = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_4) + (t_3 * (((x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * t_4) * (((2.0d0 * (x2 / x1)) + ((-1.0d0) - (3.0d0 / x1))) / x1))))))))
if (x1 <= (-1d+144)) then
tmp = t_0
else if (x1 <= (-3.4d+106)) then
tmp = x1 - ((3.0d0 * (t_2 / ((-1.0d0) - (x1 * x1)))) - (x1 + (x1 * ((4.0d0 * t_6) - (x1 * (6.0d0 + ((2.0d0 * (t_5 - (x2 * (-2.0d0)))) + (((x1 * (6.0d0 + ((4.0d0 * (x2 * t_7)) + (2.0d0 * ((2.0d0 * t_6) + ((-1.0d0) + ((3.0d0 * t_7) - (2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))))))))) - (x2 * 8.0d0)) - (x2 * 6.0d0)))))))))
else if (x1 <= (-1.02d-11)) then
tmp = t_8
else if (x1 <= 0.33d0) then
tmp = x1 + ((3.0d0 * (t_2 / t_3)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = t_8
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 - (2.0 * x2)) - x1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = (2.0 * x2) - 3.0;
double t_6 = x2 * t_5;
double t_7 = 3.0 - (2.0 * x2);
double t_8 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_4) + (t_3 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + (((x1 * 2.0) * t_4) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1))))))));
double tmp;
if (x1 <= -1e+144) {
tmp = t_0;
} else if (x1 <= -3.4e+106) {
tmp = x1 - ((3.0 * (t_2 / (-1.0 - (x1 * x1)))) - (x1 + (x1 * ((4.0 * t_6) - (x1 * (6.0 + ((2.0 * (t_5 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_7)) + (2.0 * ((2.0 * t_6) + (-1.0 + ((3.0 * t_7) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -1.02e-11) {
tmp = t_8;
} else if (x1 <= 0.33) {
tmp = x1 + ((3.0 * (t_2 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_8;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = x1 * (x1 * 3.0) t_2 = (t_1 - (2.0 * x2)) - x1 t_3 = (x1 * x1) + 1.0 t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3 t_5 = (2.0 * x2) - 3.0 t_6 = x2 * t_5 t_7 = 3.0 - (2.0 * x2) t_8 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_4) + (t_3 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + (((x1 * 2.0) * t_4) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))))))) tmp = 0 if x1 <= -1e+144: tmp = t_0 elif x1 <= -3.4e+106: tmp = x1 - ((3.0 * (t_2 / (-1.0 - (x1 * x1)))) - (x1 + (x1 * ((4.0 * t_6) - (x1 * (6.0 + ((2.0 * (t_5 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_7)) + (2.0 * ((2.0 * t_6) + (-1.0 + ((3.0 * t_7) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))) elif x1 <= -1.02e-11: tmp = t_8 elif x1 <= 0.33: tmp = x1 + ((3.0 * (t_2 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = t_8 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 - Float64(2.0 * x2)) - 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(2.0 * x2) - 3.0) t_6 = Float64(x2 * t_5) t_7 = Float64(3.0 - Float64(2.0 * x2)) t_8 = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * t_4) + Float64(t_3 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(Float64(Float64(2.0 * Float64(x2 / x1)) + Float64(-1.0 - Float64(3.0 / x1))) / x1))))))))) tmp = 0.0 if (x1 <= -1e+144) tmp = t_0; elseif (x1 <= -3.4e+106) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_2 / Float64(-1.0 - Float64(x1 * x1)))) - Float64(x1 + Float64(x1 * Float64(Float64(4.0 * t_6) - Float64(x1 * Float64(6.0 + Float64(Float64(2.0 * Float64(t_5 - Float64(x2 * -2.0))) + Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(4.0 * Float64(x2 * t_7)) + Float64(2.0 * Float64(Float64(2.0 * t_6) + Float64(-1.0 + Float64(Float64(3.0 * t_7) - Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))))))))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0)))))))))); elseif (x1 <= -1.02e-11) tmp = t_8; elseif (x1 <= 0.33) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_2 / t_3)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = t_8; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = x1 * (x1 * 3.0); t_2 = (t_1 - (2.0 * x2)) - x1; t_3 = (x1 * x1) + 1.0; t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3; t_5 = (2.0 * x2) - 3.0; t_6 = x2 * t_5; t_7 = 3.0 - (2.0 * x2); t_8 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_4) + (t_3 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + (((x1 * 2.0) * t_4) * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))))))); tmp = 0.0; if (x1 <= -1e+144) tmp = t_0; elseif (x1 <= -3.4e+106) tmp = x1 - ((3.0 * (t_2 / (-1.0 - (x1 * x1)))) - (x1 + (x1 * ((4.0 * t_6) - (x1 * (6.0 + ((2.0 * (t_5 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_7)) + (2.0 * ((2.0 * t_6) + (-1.0 + ((3.0 * t_7) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))); elseif (x1 <= -1.02e-11) tmp = t_8; elseif (x1 <= 0.33) tmp = x1 + ((3.0 * (t_2 / t_3)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = t_8; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(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[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$6 = N[(x2 * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * t$95$4), $MachinePrecision] + N[(t$95$3 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(N[(N[(2.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$0, If[LessEqual[x1, -3.4e+106], N[(x1 - N[(N[(3.0 * N[(t$95$2 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(x1 * N[(N[(4.0 * t$95$6), $MachinePrecision] - N[(x1 * N[(6.0 + N[(N[(2.0 * N[(t$95$5 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * N[(6.0 + N[(N[(4.0 * N[(x2 * t$95$7), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(2.0 * t$95$6), $MachinePrecision] + N[(-1.0 + N[(N[(3.0 * t$95$7), $MachinePrecision] - N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.02e-11], t$95$8, If[LessEqual[x1, 0.33], N[(x1 + N[(N[(3.0 * N[(t$95$2 / 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, 2e+153], t$95$8, t$95$0]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 - 2 \cdot x2\right) - x1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_3}\\
t_5 := 2 \cdot x2 - 3\\
t_6 := x2 \cdot t\_5\\
t_7 := 3 - 2 \cdot x2\\
t_8 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_1 \cdot t\_4 + t\_3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_4 \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \frac{2 \cdot \frac{x2}{x1} + \left(-1 - \frac{3}{x1}\right)}{x1}\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_2}{-1 - x1 \cdot x1} - \left(x1 + x1 \cdot \left(4 \cdot t\_6 - x1 \cdot \left(6 + \left(2 \cdot \left(t\_5 - x2 \cdot -2\right) + \left(\left(x1 \cdot \left(6 + \left(4 \cdot \left(x2 \cdot t\_7\right) + 2 \cdot \left(2 \cdot t\_6 + \left(-1 + \left(3 \cdot t\_7 - 2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right)\right)\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.02 \cdot 10^{-11}:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x1 \leq 0.33:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_2}{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 2 \cdot 10^{+153}:\\
\;\;\;\;t\_8\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 75.0%
if -3.39999999999999994e106 < x1 < -1.01999999999999994e-11 or 0.330000000000000016 < x1 < 2e153Initial program 97.3%
Taylor expanded in x1 around 0 97.3%
*-commutative97.3%
Simplified97.3%
Taylor expanded in x1 around inf 97.2%
associate-*r/97.2%
metadata-eval97.2%
Simplified97.2%
if -1.01999999999999994e-11 < x1 < 0.330000000000000016Initial program 99.4%
Taylor expanded in x1 around 0 89.1%
Taylor expanded in x2 around 0 99.4%
Final simplification98.0%
(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 (* 3.0 (* x2 -2.0)))
(t_4 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) t_3)))
(t_5 (/ t_1 (- -1.0 (* x1 x1)))))
(if (<= x1 -3.4e+106)
t_4
(if (<= x1 -2.5e-14)
(+
x1
(+
t_3
(-
x1
(-
(+
(* t_0 t_5)
(*
t_2
(-
(* (- (/ t_1 t_2) 3.0) (* (* x1 2.0) t_5))
(*
(* x1 x1)
(-
(* 4.0 (- 3.0 (/ (- 1.0 (/ (- (* 2.0 x2) 3.0) x1)) x1)))
6.0)))))
(* x1 (* x1 x1))))))
(if (<= x1 135000000000.0)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
t_4)))))
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 = 3.0 * (x2 * -2.0);
double t_4 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + t_3);
double t_5 = t_1 / (-1.0 - (x1 * x1));
double tmp;
if (x1 <= -3.4e+106) {
tmp = t_4;
} else if (x1 <= -2.5e-14) {
tmp = x1 + (t_3 + (x1 - (((t_0 * t_5) + (t_2 * ((((t_1 / t_2) - 3.0) * ((x1 * 2.0) * t_5)) - ((x1 * x1) * ((4.0 * (3.0 - ((1.0 - (((2.0 * x2) - 3.0) / x1)) / x1))) - 6.0))))) - (x1 * (x1 * x1)))));
} else if (x1 <= 135000000000.0) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (t_0 + (2.0d0 * x2)) - x1
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * (x2 * (-2.0d0))
t_4 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + t_3)
t_5 = t_1 / ((-1.0d0) - (x1 * x1))
if (x1 <= (-3.4d+106)) then
tmp = t_4
else if (x1 <= (-2.5d-14)) then
tmp = x1 + (t_3 + (x1 - (((t_0 * t_5) + (t_2 * ((((t_1 / t_2) - 3.0d0) * ((x1 * 2.0d0) * t_5)) - ((x1 * x1) * ((4.0d0 * (3.0d0 - ((1.0d0 - (((2.0d0 * x2) - 3.0d0) / x1)) / x1))) - 6.0d0))))) - (x1 * (x1 * x1)))))
else if (x1 <= 135000000000.0d0) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (x2 * -2.0);
double t_4 = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + t_3);
double t_5 = t_1 / (-1.0 - (x1 * x1));
double tmp;
if (x1 <= -3.4e+106) {
tmp = t_4;
} else if (x1 <= -2.5e-14) {
tmp = x1 + (t_3 + (x1 - (((t_0 * t_5) + (t_2 * ((((t_1 / t_2) - 3.0) * ((x1 * 2.0) * t_5)) - ((x1 * x1) * ((4.0 * (3.0 - ((1.0 - (((2.0 * x2) - 3.0) / x1)) / x1))) - 6.0))))) - (x1 * (x1 * x1)))));
} else if (x1 <= 135000000000.0) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = t_4;
}
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 = 3.0 * (x2 * -2.0) t_4 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + t_3) t_5 = t_1 / (-1.0 - (x1 * x1)) tmp = 0 if x1 <= -3.4e+106: tmp = t_4 elif x1 <= -2.5e-14: tmp = x1 + (t_3 + (x1 - (((t_0 * t_5) + (t_2 * ((((t_1 / t_2) - 3.0) * ((x1 * 2.0) * t_5)) - ((x1 * x1) * ((4.0 * (3.0 - ((1.0 - (((2.0 * x2) - 3.0) / x1)) / x1))) - 6.0))))) - (x1 * (x1 * x1))))) elif x1 <= 135000000000.0: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) else: tmp = t_4 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(3.0 * Float64(x2 * -2.0)) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + t_3)) t_5 = Float64(t_1 / Float64(-1.0 - Float64(x1 * x1))) tmp = 0.0 if (x1 <= -3.4e+106) tmp = t_4; elseif (x1 <= -2.5e-14) tmp = Float64(x1 + Float64(t_3 + Float64(x1 - Float64(Float64(Float64(t_0 * t_5) + Float64(t_2 * Float64(Float64(Float64(Float64(t_1 / t_2) - 3.0) * Float64(Float64(x1 * 2.0) * t_5)) - Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(3.0 - Float64(Float64(1.0 - Float64(Float64(Float64(2.0 * x2) - 3.0) / x1)) / x1))) - 6.0))))) - Float64(x1 * Float64(x1 * x1)))))); elseif (x1 <= 135000000000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); else tmp = t_4; 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 = 3.0 * (x2 * -2.0); t_4 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + t_3); t_5 = t_1 / (-1.0 - (x1 * x1)); tmp = 0.0; if (x1 <= -3.4e+106) tmp = t_4; elseif (x1 <= -2.5e-14) tmp = x1 + (t_3 + (x1 - (((t_0 * t_5) + (t_2 * ((((t_1 / t_2) - 3.0) * ((x1 * 2.0) * t_5)) - ((x1 * x1) * ((4.0 * (3.0 - ((1.0 - (((2.0 * x2) - 3.0) / x1)) / x1))) - 6.0))))) - (x1 * (x1 * x1))))); elseif (x1 <= 135000000000.0) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); else tmp = t_4; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(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[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$1 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.4e+106], t$95$4, If[LessEqual[x1, -2.5e-14], N[(x1 + N[(t$95$3 + N[(x1 - N[(N[(N[(t$95$0 * t$95$5), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(N[(t$95$1 / t$95$2), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(3.0 - N[(N[(1.0 - N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 135000000000.0], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $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], t$95$4]]]]]]]]]
\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 := 3 \cdot \left(x2 \cdot -2\right)\\
t_4 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + t\_3\right)\\
t_5 := \frac{t\_1}{-1 - x1 \cdot x1}\\
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-14}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 - \left(\left(t\_0 \cdot t\_5 + t\_2 \cdot \left(\left(\frac{t\_1}{t\_2} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_5\right) - \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 - \frac{1 - \frac{2 \cdot x2 - 3}{x1}}{x1}\right) - 6\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 135000000000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{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{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if x1 < -3.39999999999999994e106 or 1.35e11 < x1 Initial program 25.1%
Taylor expanded in x1 around 0 25.1%
*-commutative25.1%
Simplified25.1%
Taylor expanded in x1 around inf 95.4%
if -3.39999999999999994e106 < x1 < -2.5000000000000001e-14Initial program 99.4%
Taylor expanded in x1 around 0 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around -inf 99.5%
if -2.5000000000000001e-14 < x1 < 1.35e11Initial program 99.4%
Taylor expanded in x1 around 0 88.5%
Taylor expanded in x2 around 0 98.7%
Final simplification97.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (/ t_3 t_1)))
(if (or (<= x1 -3.4e+106) (not (<= x1 1.3e+58)))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) (* 3.0 (* x2 -2.0))))
(-
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(-
(-
(+
(* t_2 (/ t_3 t_0))
(*
t_1
(+
(* (* x1 x1) (- 6.0 (* t_4 4.0)))
(* (- t_4 3.0) (* (* x1 2.0) (- x1 (* 2.0 x2)))))))
(* x1 (* x1 x1)))
x1))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_1;
double tmp;
if ((x1 <= -3.4e+106) || !(x1 <= 1.3e+58)) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 - ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + ((((t_2 * (t_3 / t_0)) + (t_1 * (((x1 * x1) * (6.0 - (t_4 * 4.0))) + ((t_4 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))) - (x1 * (x1 * x1))) - x1));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (-1.0d0) - (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
t_2 = x1 * (x1 * 3.0d0)
t_3 = (t_2 + (2.0d0 * x2)) - x1
t_4 = t_3 / t_1
if ((x1 <= (-3.4d+106)) .or. (.not. (x1 <= 1.3d+58))) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + (3.0d0 * (x2 * (-2.0d0))))
else
tmp = x1 - ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + ((((t_2 * (t_3 / t_0)) + (t_1 * (((x1 * x1) * (6.0d0 - (t_4 * 4.0d0))) + ((t_4 - 3.0d0) * ((x1 * 2.0d0) * (x1 - (2.0d0 * x2))))))) - (x1 * (x1 * x1))) - x1))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / t_1;
double tmp;
if ((x1 <= -3.4e+106) || !(x1 <= 1.3e+58)) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0)));
} else {
tmp = x1 - ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + ((((t_2 * (t_3 / t_0)) + (t_1 * (((x1 * x1) * (6.0 - (t_4 * 4.0))) + ((t_4 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))) - (x1 * (x1 * x1))) - x1));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = x1 * (x1 * 3.0) t_3 = (t_2 + (2.0 * x2)) - x1 t_4 = t_3 / t_1 tmp = 0 if (x1 <= -3.4e+106) or not (x1 <= 1.3e+58): tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + (3.0 * (x2 * -2.0))) else: tmp = x1 - ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + ((((t_2 * (t_3 / t_0)) + (t_1 * (((x1 * x1) * (6.0 - (t_4 * 4.0))) + ((t_4 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))) - (x1 * (x1 * x1))) - x1)) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / t_1) tmp = 0.0 if ((x1 <= -3.4e+106) || !(x1 <= 1.3e+58)) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + Float64(3.0 * Float64(x2 * -2.0)))); else tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(Float64(Float64(Float64(t_2 * Float64(t_3 / t_0)) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_4 * 4.0))) + Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x1 - Float64(2.0 * x2))))))) - Float64(x1 * Float64(x1 * x1))) - x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 - (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = x1 * (x1 * 3.0); t_3 = (t_2 + (2.0 * x2)) - x1; t_4 = t_3 / t_1; tmp = 0.0; if ((x1 <= -3.4e+106) || ~((x1 <= 1.3e+58))) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + (3.0 * (x2 * -2.0))); else tmp = x1 - ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + ((((t_2 * (t_3 / t_0)) + (t_1 * (((x1 * x1) * (6.0 - (t_4 * 4.0))) + ((t_4 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))) - (x1 * (x1 * x1))) - x1)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -3.4e+106], N[Not[LessEqual[x1, 1.3e+58]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$2 * N[(t$95$3 / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$4 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{t\_1}\\
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+106} \lor \neg \left(x1 \leq 1.3 \cdot 10^{+58}\right):\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0} + \left(\left(\left(t\_2 \cdot \frac{t\_3}{t\_0} + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_4 \cdot 4\right) + \left(t\_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x1 - 2 \cdot x2\right)\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -3.39999999999999994e106 or 1.29999999999999994e58 < x1 Initial program 19.1%
Taylor expanded in x1 around 0 19.1%
*-commutative19.1%
Simplified19.1%
Taylor expanded in x1 around inf 98.0%
if -3.39999999999999994e106 < x1 < 1.29999999999999994e58Initial program 99.3%
Taylor expanded in x1 around 0 95.3%
+-commutative95.3%
mul-1-neg95.3%
sub-neg95.3%
Simplified95.3%
Final simplification96.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* x1 (* x1 x1)))
(t_3 (- -1.0 (* x1 x1)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (- (* 2.0 x2) 3.0))
(t_6 (* x2 t_5))
(t_7 (- 3.0 (* 2.0 x2)))
(t_8 (- (+ t_1 (* 2.0 x2)) x1))
(t_9 (/ t_8 t_4))
(t_10 (- (- t_1 (* 2.0 x2)) x1))
(t_11 (* 3.0 (* x2 -2.0)))
(t_12 (* (- t_9 3.0) (* (* x1 2.0) (/ t_8 t_3)))))
(if (<= x1 -1e+144)
t_0
(if (<= x1 -3.4e+106)
(-
x1
(-
(* 3.0 (/ t_10 t_3))
(+
x1
(*
x1
(-
(* 4.0 t_6)
(*
x1
(+
6.0
(+
(* 2.0 (- t_5 (* x2 -2.0)))
(-
(-
(*
x1
(+
6.0
(+
(* 4.0 (* x2 t_7))
(*
2.0
(+
(* 2.0 t_6)
(+
-1.0
(- (* 3.0 t_7) (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))))))))))
(* x2 8.0))
(* x2 6.0))))))))))
(if (<= x1 -2.5e-14)
(+
x1
(+
t_11
(+
x1
(+
t_2
(-
(* t_1 (* 2.0 x2))
(* t_4 (+ (* (* x1 x1) (- 6.0 (* t_9 4.0))) t_12)))))))
(if (<= x1 0.044)
(+
x1
(+
(* 3.0 (/ t_10 t_4))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153)
(+
x1
(+
t_11
(+
x1
(+ t_2 (+ (* t_1 t_9) (* t_4 (- (* (* x1 x1) 6.0) t_12)))))))
t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 * (x1 * x1);
double t_3 = -1.0 - (x1 * x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = (2.0 * x2) - 3.0;
double t_6 = x2 * t_5;
double t_7 = 3.0 - (2.0 * x2);
double t_8 = (t_1 + (2.0 * x2)) - x1;
double t_9 = t_8 / t_4;
double t_10 = (t_1 - (2.0 * x2)) - x1;
double t_11 = 3.0 * (x2 * -2.0);
double t_12 = (t_9 - 3.0) * ((x1 * 2.0) * (t_8 / t_3));
double tmp;
if (x1 <= -1e+144) {
tmp = t_0;
} else if (x1 <= -3.4e+106) {
tmp = x1 - ((3.0 * (t_10 / t_3)) - (x1 + (x1 * ((4.0 * t_6) - (x1 * (6.0 + ((2.0 * (t_5 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_7)) + (2.0 * ((2.0 * t_6) + (-1.0 + ((3.0 * t_7) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -2.5e-14) {
tmp = x1 + (t_11 + (x1 + (t_2 + ((t_1 * (2.0 * x2)) - (t_4 * (((x1 * x1) * (6.0 - (t_9 * 4.0))) + t_12))))));
} else if (x1 <= 0.044) {
tmp = x1 + ((3.0 * (t_10 / t_4)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + (t_11 + (x1 + (t_2 + ((t_1 * t_9) + (t_4 * (((x1 * x1) * 6.0) - t_12))))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_10
real(8) :: t_11
real(8) :: t_12
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = x1 * (x1 * 3.0d0)
t_2 = x1 * (x1 * x1)
t_3 = (-1.0d0) - (x1 * x1)
t_4 = (x1 * x1) + 1.0d0
t_5 = (2.0d0 * x2) - 3.0d0
t_6 = x2 * t_5
t_7 = 3.0d0 - (2.0d0 * x2)
t_8 = (t_1 + (2.0d0 * x2)) - x1
t_9 = t_8 / t_4
t_10 = (t_1 - (2.0d0 * x2)) - x1
t_11 = 3.0d0 * (x2 * (-2.0d0))
t_12 = (t_9 - 3.0d0) * ((x1 * 2.0d0) * (t_8 / t_3))
if (x1 <= (-1d+144)) then
tmp = t_0
else if (x1 <= (-3.4d+106)) then
tmp = x1 - ((3.0d0 * (t_10 / t_3)) - (x1 + (x1 * ((4.0d0 * t_6) - (x1 * (6.0d0 + ((2.0d0 * (t_5 - (x2 * (-2.0d0)))) + (((x1 * (6.0d0 + ((4.0d0 * (x2 * t_7)) + (2.0d0 * ((2.0d0 * t_6) + ((-1.0d0) + ((3.0d0 * t_7) - (2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))))))))) - (x2 * 8.0d0)) - (x2 * 6.0d0)))))))))
else if (x1 <= (-2.5d-14)) then
tmp = x1 + (t_11 + (x1 + (t_2 + ((t_1 * (2.0d0 * x2)) - (t_4 * (((x1 * x1) * (6.0d0 - (t_9 * 4.0d0))) + t_12))))))
else if (x1 <= 0.044d0) then
tmp = x1 + ((3.0d0 * (t_10 / t_4)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = x1 + (t_11 + (x1 + (t_2 + ((t_1 * t_9) + (t_4 * (((x1 * x1) * 6.0d0) - t_12))))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = x1 * (x1 * x1);
double t_3 = -1.0 - (x1 * x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = (2.0 * x2) - 3.0;
double t_6 = x2 * t_5;
double t_7 = 3.0 - (2.0 * x2);
double t_8 = (t_1 + (2.0 * x2)) - x1;
double t_9 = t_8 / t_4;
double t_10 = (t_1 - (2.0 * x2)) - x1;
double t_11 = 3.0 * (x2 * -2.0);
double t_12 = (t_9 - 3.0) * ((x1 * 2.0) * (t_8 / t_3));
double tmp;
if (x1 <= -1e+144) {
tmp = t_0;
} else if (x1 <= -3.4e+106) {
tmp = x1 - ((3.0 * (t_10 / t_3)) - (x1 + (x1 * ((4.0 * t_6) - (x1 * (6.0 + ((2.0 * (t_5 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_7)) + (2.0 * ((2.0 * t_6) + (-1.0 + ((3.0 * t_7) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -2.5e-14) {
tmp = x1 + (t_11 + (x1 + (t_2 + ((t_1 * (2.0 * x2)) - (t_4 * (((x1 * x1) * (6.0 - (t_9 * 4.0))) + t_12))))));
} else if (x1 <= 0.044) {
tmp = x1 + ((3.0 * (t_10 / t_4)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + (t_11 + (x1 + (t_2 + ((t_1 * t_9) + (t_4 * (((x1 * x1) * 6.0) - t_12))))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = x1 * (x1 * 3.0) t_2 = x1 * (x1 * x1) t_3 = -1.0 - (x1 * x1) t_4 = (x1 * x1) + 1.0 t_5 = (2.0 * x2) - 3.0 t_6 = x2 * t_5 t_7 = 3.0 - (2.0 * x2) t_8 = (t_1 + (2.0 * x2)) - x1 t_9 = t_8 / t_4 t_10 = (t_1 - (2.0 * x2)) - x1 t_11 = 3.0 * (x2 * -2.0) t_12 = (t_9 - 3.0) * ((x1 * 2.0) * (t_8 / t_3)) tmp = 0 if x1 <= -1e+144: tmp = t_0 elif x1 <= -3.4e+106: tmp = x1 - ((3.0 * (t_10 / t_3)) - (x1 + (x1 * ((4.0 * t_6) - (x1 * (6.0 + ((2.0 * (t_5 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_7)) + (2.0 * ((2.0 * t_6) + (-1.0 + ((3.0 * t_7) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))) elif x1 <= -2.5e-14: tmp = x1 + (t_11 + (x1 + (t_2 + ((t_1 * (2.0 * x2)) - (t_4 * (((x1 * x1) * (6.0 - (t_9 * 4.0))) + t_12)))))) elif x1 <= 0.044: tmp = x1 + ((3.0 * (t_10 / t_4)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = x1 + (t_11 + (x1 + (t_2 + ((t_1 * t_9) + (t_4 * (((x1 * x1) * 6.0) - t_12)))))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(-1.0 - Float64(x1 * x1)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(Float64(2.0 * x2) - 3.0) t_6 = Float64(x2 * t_5) t_7 = Float64(3.0 - Float64(2.0 * x2)) t_8 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_9 = Float64(t_8 / t_4) t_10 = Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) t_11 = Float64(3.0 * Float64(x2 * -2.0)) t_12 = Float64(Float64(t_9 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(t_8 / t_3))) tmp = 0.0 if (x1 <= -1e+144) tmp = t_0; elseif (x1 <= -3.4e+106) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_10 / t_3)) - Float64(x1 + Float64(x1 * Float64(Float64(4.0 * t_6) - Float64(x1 * Float64(6.0 + Float64(Float64(2.0 * Float64(t_5 - Float64(x2 * -2.0))) + Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(4.0 * Float64(x2 * t_7)) + Float64(2.0 * Float64(Float64(2.0 * t_6) + Float64(-1.0 + Float64(Float64(3.0 * t_7) - Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))))))))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0)))))))))); elseif (x1 <= -2.5e-14) tmp = Float64(x1 + Float64(t_11 + Float64(x1 + Float64(t_2 + Float64(Float64(t_1 * Float64(2.0 * x2)) - Float64(t_4 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_9 * 4.0))) + t_12))))))); elseif (x1 <= 0.044) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_10 / t_4)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = Float64(x1 + Float64(t_11 + Float64(x1 + Float64(t_2 + Float64(Float64(t_1 * t_9) + Float64(t_4 * Float64(Float64(Float64(x1 * x1) * 6.0) - t_12))))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = x1 * (x1 * 3.0); t_2 = x1 * (x1 * x1); t_3 = -1.0 - (x1 * x1); t_4 = (x1 * x1) + 1.0; t_5 = (2.0 * x2) - 3.0; t_6 = x2 * t_5; t_7 = 3.0 - (2.0 * x2); t_8 = (t_1 + (2.0 * x2)) - x1; t_9 = t_8 / t_4; t_10 = (t_1 - (2.0 * x2)) - x1; t_11 = 3.0 * (x2 * -2.0); t_12 = (t_9 - 3.0) * ((x1 * 2.0) * (t_8 / t_3)); tmp = 0.0; if (x1 <= -1e+144) tmp = t_0; elseif (x1 <= -3.4e+106) tmp = x1 - ((3.0 * (t_10 / t_3)) - (x1 + (x1 * ((4.0 * t_6) - (x1 * (6.0 + ((2.0 * (t_5 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_7)) + (2.0 * ((2.0 * t_6) + (-1.0 + ((3.0 * t_7) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))); elseif (x1 <= -2.5e-14) tmp = x1 + (t_11 + (x1 + (t_2 + ((t_1 * (2.0 * x2)) - (t_4 * (((x1 * x1) * (6.0 - (t_9 * 4.0))) + t_12)))))); elseif (x1 <= 0.044) tmp = x1 + ((3.0 * (t_10 / t_4)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = x1 + (t_11 + (x1 + (t_2 + ((t_1 * t_9) + (t_4 * (((x1 * x1) * 6.0) - t_12)))))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $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[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$6 = N[(x2 * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$8 / t$95$4), $MachinePrecision]}, Block[{t$95$10 = N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$11 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$12 = N[(N[(t$95$9 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$8 / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$0, If[LessEqual[x1, -3.4e+106], N[(x1 - N[(N[(3.0 * N[(t$95$10 / t$95$3), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(x1 * N[(N[(4.0 * t$95$6), $MachinePrecision] - N[(x1 * N[(6.0 + N[(N[(2.0 * N[(t$95$5 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * N[(6.0 + N[(N[(4.0 * N[(x2 * t$95$7), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(2.0 * t$95$6), $MachinePrecision] + N[(-1.0 + N[(N[(3.0 * t$95$7), $MachinePrecision] - N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.5e-14], N[(x1 + N[(t$95$11 + N[(x1 + N[(t$95$2 + N[(N[(t$95$1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$9 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$12), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.044], N[(x1 + N[(N[(3.0 * N[(t$95$10 / t$95$4), $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, 2e+153], N[(x1 + N[(t$95$11 + N[(x1 + N[(t$95$2 + N[(N[(t$95$1 * t$95$9), $MachinePrecision] + N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] - t$95$12), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := -1 - x1 \cdot x1\\
t_4 := x1 \cdot x1 + 1\\
t_5 := 2 \cdot x2 - 3\\
t_6 := x2 \cdot t\_5\\
t_7 := 3 - 2 \cdot x2\\
t_8 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_9 := \frac{t\_8}{t\_4}\\
t_10 := \left(t\_1 - 2 \cdot x2\right) - x1\\
t_11 := 3 \cdot \left(x2 \cdot -2\right)\\
t_12 := \left(t\_9 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \frac{t\_8}{t\_3}\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_10}{t\_3} - \left(x1 + x1 \cdot \left(4 \cdot t\_6 - x1 \cdot \left(6 + \left(2 \cdot \left(t\_5 - x2 \cdot -2\right) + \left(\left(x1 \cdot \left(6 + \left(4 \cdot \left(x2 \cdot t\_7\right) + 2 \cdot \left(2 \cdot t\_6 + \left(-1 + \left(3 \cdot t\_7 - 2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right)\right)\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-14}:\\
\;\;\;\;x1 + \left(t\_11 + \left(x1 + \left(t\_2 + \left(t\_1 \cdot \left(2 \cdot x2\right) - t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_9 \cdot 4\right) + t\_12\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.044:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_10}{t\_4} + \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 2 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(t\_11 + \left(x1 + \left(t\_2 + \left(t\_1 \cdot t\_9 + t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 - t\_12\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 75.0%
if -3.39999999999999994e106 < x1 < -2.5000000000000001e-14Initial program 99.4%
Taylor expanded in x1 around 0 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around 0 87.7%
if -2.5000000000000001e-14 < x1 < 0.043999999999999997Initial program 99.4%
Taylor expanded in x1 around 0 89.0%
Taylor expanded in x2 around 0 99.4%
if 0.043999999999999997 < x1 < 2e153Initial program 96.1%
Taylor expanded in x1 around 0 96.1%
*-commutative96.1%
Simplified96.1%
associate-*r*96.1%
add-cbrt-cube74.9%
pow1/373.3%
pow373.3%
*-commutative73.3%
unpow-prod-down73.3%
pow273.3%
pow-pow73.3%
metadata-eval73.3%
metadata-eval73.3%
Applied egg-rr73.3%
unpow1/374.9%
Simplified74.9%
Taylor expanded in x1 around inf 92.4%
Final simplification96.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (- (+ t_2 (* 2.0 x2)) x1))
(t_6 (- (* 2.0 x2) 3.0))
(t_7 (* x2 t_6))
(t_8 (- 3.0 (* 2.0 x2)))
(t_9 (/ t_5 t_4))
(t_10 (* (- t_9 3.0) (* (* x1 2.0) (/ t_5 (- -1.0 (* x1 x1)))))))
(if (<= x1 -1e+144)
t_3
(if (<= x1 -3.4e+106)
(+
x1
(+
t_1
(+
x1
(*
x1
(-
(* 4.0 t_7)
(*
x1
(+
6.0
(+
(* 2.0 (- t_6 (* x2 -2.0)))
(-
(-
(*
x1
(+
6.0
(+
(* 4.0 (* x2 t_8))
(*
2.0
(+
(* 2.0 t_7)
(+
-1.0
(- (* 3.0 t_8) (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))))))))))
(* x2 8.0))
(* x2 6.0))))))))))
(if (<= x1 -2.5e-14)
(+
x1
(+
t_1
(+
x1
(+
t_0
(-
(* t_2 (* 2.0 x2))
(* t_4 (+ (* (* x1 x1) (- 6.0 (* t_9 4.0))) t_10)))))))
(if (<= x1 0.044)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_4))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153)
(+
x1
(+
t_1
(+
x1
(+ t_0 (+ (* t_2 t_9) (* t_4 (- (* (* x1 x1) 6.0) t_10)))))))
t_3)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = (x1 * x1) + 1.0;
double t_5 = (t_2 + (2.0 * x2)) - x1;
double t_6 = (2.0 * x2) - 3.0;
double t_7 = x2 * t_6;
double t_8 = 3.0 - (2.0 * x2);
double t_9 = t_5 / t_4;
double t_10 = (t_9 - 3.0) * ((x1 * 2.0) * (t_5 / (-1.0 - (x1 * x1))));
double tmp;
if (x1 <= -1e+144) {
tmp = t_3;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * t_7) - (x1 * (6.0 + ((2.0 * (t_6 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_8)) + (2.0 * ((2.0 * t_7) + (-1.0 + ((3.0 * t_8) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -2.5e-14) {
tmp = x1 + (t_1 + (x1 + (t_0 + ((t_2 * (2.0 * x2)) - (t_4 * (((x1 * x1) * (6.0 - (t_9 * 4.0))) + t_10))))));
} else if (x1 <= 0.044) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + (t_1 + (x1 + (t_0 + ((t_2 * t_9) + (t_4 * (((x1 * x1) * 6.0) - t_10))))));
} else {
tmp = 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_10
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = 3.0d0 * (x2 * (-2.0d0))
t_2 = x1 * (x1 * 3.0d0)
t_3 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_4 = (x1 * x1) + 1.0d0
t_5 = (t_2 + (2.0d0 * x2)) - x1
t_6 = (2.0d0 * x2) - 3.0d0
t_7 = x2 * t_6
t_8 = 3.0d0 - (2.0d0 * x2)
t_9 = t_5 / t_4
t_10 = (t_9 - 3.0d0) * ((x1 * 2.0d0) * (t_5 / ((-1.0d0) - (x1 * x1))))
if (x1 <= (-1d+144)) then
tmp = t_3
else if (x1 <= (-3.4d+106)) then
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0d0 * t_7) - (x1 * (6.0d0 + ((2.0d0 * (t_6 - (x2 * (-2.0d0)))) + (((x1 * (6.0d0 + ((4.0d0 * (x2 * t_8)) + (2.0d0 * ((2.0d0 * t_7) + ((-1.0d0) + ((3.0d0 * t_8) - (2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))))))))) - (x2 * 8.0d0)) - (x2 * 6.0d0)))))))))
else if (x1 <= (-2.5d-14)) then
tmp = x1 + (t_1 + (x1 + (t_0 + ((t_2 * (2.0d0 * x2)) - (t_4 * (((x1 * x1) * (6.0d0 - (t_9 * 4.0d0))) + t_10))))))
else if (x1 <= 0.044d0) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_4)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = x1 + (t_1 + (x1 + (t_0 + ((t_2 * t_9) + (t_4 * (((x1 * x1) * 6.0d0) - t_10))))))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = (x1 * x1) + 1.0;
double t_5 = (t_2 + (2.0 * x2)) - x1;
double t_6 = (2.0 * x2) - 3.0;
double t_7 = x2 * t_6;
double t_8 = 3.0 - (2.0 * x2);
double t_9 = t_5 / t_4;
double t_10 = (t_9 - 3.0) * ((x1 * 2.0) * (t_5 / (-1.0 - (x1 * x1))));
double tmp;
if (x1 <= -1e+144) {
tmp = t_3;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * t_7) - (x1 * (6.0 + ((2.0 * (t_6 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_8)) + (2.0 * ((2.0 * t_7) + (-1.0 + ((3.0 * t_8) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -2.5e-14) {
tmp = x1 + (t_1 + (x1 + (t_0 + ((t_2 * (2.0 * x2)) - (t_4 * (((x1 * x1) * (6.0 - (t_9 * 4.0))) + t_10))))));
} else if (x1 <= 0.044) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + (t_1 + (x1 + (t_0 + ((t_2 * t_9) + (t_4 * (((x1 * x1) * 6.0) - t_10))))));
} else {
tmp = t_3;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = 3.0 * (x2 * -2.0) t_2 = x1 * (x1 * 3.0) t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_4 = (x1 * x1) + 1.0 t_5 = (t_2 + (2.0 * x2)) - x1 t_6 = (2.0 * x2) - 3.0 t_7 = x2 * t_6 t_8 = 3.0 - (2.0 * x2) t_9 = t_5 / t_4 t_10 = (t_9 - 3.0) * ((x1 * 2.0) * (t_5 / (-1.0 - (x1 * x1)))) tmp = 0 if x1 <= -1e+144: tmp = t_3 elif x1 <= -3.4e+106: tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * t_7) - (x1 * (6.0 + ((2.0 * (t_6 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_8)) + (2.0 * ((2.0 * t_7) + (-1.0 + ((3.0 * t_8) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))) elif x1 <= -2.5e-14: tmp = x1 + (t_1 + (x1 + (t_0 + ((t_2 * (2.0 * x2)) - (t_4 * (((x1 * x1) * (6.0 - (t_9 * 4.0))) + t_10)))))) elif x1 <= 0.044: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = x1 + (t_1 + (x1 + (t_0 + ((t_2 * t_9) + (t_4 * (((x1 * x1) * 6.0) - t_10)))))) else: tmp = t_3 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(3.0 * Float64(x2 * -2.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_6 = Float64(Float64(2.0 * x2) - 3.0) t_7 = Float64(x2 * t_6) t_8 = Float64(3.0 - Float64(2.0 * x2)) t_9 = Float64(t_5 / t_4) t_10 = Float64(Float64(t_9 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(t_5 / Float64(-1.0 - Float64(x1 * x1))))) tmp = 0.0 if (x1 <= -1e+144) tmp = t_3; elseif (x1 <= -3.4e+106) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * t_7) - Float64(x1 * Float64(6.0 + Float64(Float64(2.0 * Float64(t_6 - Float64(x2 * -2.0))) + Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(4.0 * Float64(x2 * t_8)) + Float64(2.0 * Float64(Float64(2.0 * t_7) + Float64(-1.0 + Float64(Float64(3.0 * t_8) - Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))))))))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0)))))))))); elseif (x1 <= -2.5e-14) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_0 + Float64(Float64(t_2 * Float64(2.0 * x2)) - Float64(t_4 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_9 * 4.0))) + t_10))))))); elseif (x1 <= 0.044) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_4)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_0 + Float64(Float64(t_2 * t_9) + Float64(t_4 * Float64(Float64(Float64(x1 * x1) * 6.0) - t_10))))))); else tmp = t_3; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = 3.0 * (x2 * -2.0); t_2 = x1 * (x1 * 3.0); t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_4 = (x1 * x1) + 1.0; t_5 = (t_2 + (2.0 * x2)) - x1; t_6 = (2.0 * x2) - 3.0; t_7 = x2 * t_6; t_8 = 3.0 - (2.0 * x2); t_9 = t_5 / t_4; t_10 = (t_9 - 3.0) * ((x1 * 2.0) * (t_5 / (-1.0 - (x1 * x1)))); tmp = 0.0; if (x1 <= -1e+144) tmp = t_3; elseif (x1 <= -3.4e+106) tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * t_7) - (x1 * (6.0 + ((2.0 * (t_6 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_8)) + (2.0 * ((2.0 * t_7) + (-1.0 + ((3.0 * t_8) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))); elseif (x1 <= -2.5e-14) tmp = x1 + (t_1 + (x1 + (t_0 + ((t_2 * (2.0 * x2)) - (t_4 * (((x1 * x1) * (6.0 - (t_9 * 4.0))) + t_10)))))); elseif (x1 <= 0.044) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = x1 + (t_1 + (x1 + (t_0 + ((t_2 * t_9) + (t_4 * (((x1 * x1) * 6.0) - t_10)))))); else tmp = t_3; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$7 = N[(x2 * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$5 / t$95$4), $MachinePrecision]}, Block[{t$95$10 = N[(N[(t$95$9 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$5 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$3, If[LessEqual[x1, -3.4e+106], N[(x1 + N[(t$95$1 + N[(x1 + N[(x1 * N[(N[(4.0 * t$95$7), $MachinePrecision] - N[(x1 * N[(6.0 + N[(N[(2.0 * N[(t$95$6 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * N[(6.0 + N[(N[(4.0 * N[(x2 * t$95$8), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(2.0 * t$95$7), $MachinePrecision] + N[(-1.0 + N[(N[(3.0 * t$95$8), $MachinePrecision] - N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.5e-14], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$0 + N[(N[(t$95$2 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$9 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$10), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.044], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $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, 2e+153], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$0 + N[(N[(t$95$2 * t$95$9), $MachinePrecision] + N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] - t$95$10), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := 3 \cdot \left(x2 \cdot -2\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_6 := 2 \cdot x2 - 3\\
t_7 := x2 \cdot t\_6\\
t_8 := 3 - 2 \cdot x2\\
t_9 := \frac{t\_5}{t\_4}\\
t_10 := \left(t\_9 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \frac{t\_5}{-1 - x1 \cdot x1}\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + x1 \cdot \left(4 \cdot t\_7 - x1 \cdot \left(6 + \left(2 \cdot \left(t\_6 - x2 \cdot -2\right) + \left(\left(x1 \cdot \left(6 + \left(4 \cdot \left(x2 \cdot t\_8\right) + 2 \cdot \left(2 \cdot t\_7 + \left(-1 + \left(3 \cdot t\_8 - 2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right)\right)\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-14}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_0 + \left(t\_2 \cdot \left(2 \cdot x2\right) - t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_9 \cdot 4\right) + t\_10\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.044:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_4} + \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 2 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_0 + \left(t\_2 \cdot t\_9 + t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 - t\_10\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 75.0%
if -3.39999999999999994e106 < x1 < -2.5000000000000001e-14Initial program 99.4%
Taylor expanded in x1 around 0 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around 0 87.7%
if -2.5000000000000001e-14 < x1 < 0.043999999999999997Initial program 99.4%
Taylor expanded in x1 around 0 89.0%
Taylor expanded in x2 around 0 99.4%
if 0.043999999999999997 < x1 < 2e153Initial program 96.1%
Taylor expanded in x1 around 0 96.1%
*-commutative96.1%
Simplified96.1%
associate-*r*96.1%
add-cbrt-cube74.9%
pow1/373.3%
pow373.3%
*-commutative73.3%
unpow-prod-down73.3%
pow273.3%
pow-pow73.3%
metadata-eval73.3%
metadata-eval73.3%
Applied egg-rr73.3%
unpow1/374.9%
Simplified74.9%
Taylor expanded in x1 around inf 92.4%
Final simplification96.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_4 (* x1 (* x1 3.0)))
(t_5 (- (+ t_4 (* 2.0 x2)) x1))
(t_6 (/ t_5 t_2))
(t_7 (- (* 2.0 x2) 3.0))
(t_8 (* x2 t_7))
(t_9 (- 3.0 (* 2.0 x2))))
(if (<= x1 -1e+144)
t_3
(if (<= x1 -3.4e+106)
(+
x1
(+
t_1
(+
x1
(*
x1
(-
(* 4.0 t_8)
(*
x1
(+
6.0
(+
(* 2.0 (- t_7 (* x2 -2.0)))
(-
(-
(*
x1
(+
6.0
(+
(* 4.0 (* x2 t_9))
(*
2.0
(+
(* 2.0 t_8)
(+
-1.0
(- (* 3.0 t_9) (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))))))))))
(* x2 8.0))
(* x2 6.0))))))))))
(if (<= x1 -1.02e-11)
(+
x1
(+
t_1
(+
x1
(-
t_0
(-
(*
t_2
(+
(* (* x1 x1) (- 6.0 (* t_6 4.0)))
(*
(* (* x1 2.0) t_6)
(/ (- (+ 1.0 (/ 3.0 x1)) (* 2.0 (/ x2 x1))) x1))))
(* t_4 (* 2.0 x2)))))))
(if (<= x1 0.044)
(+
x1
(+
(* 3.0 (/ (- (- t_4 (* 2.0 x2)) x1) t_2))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153)
(+
x1
(+
t_1
(+
x1
(+
t_0
(+
(* t_4 t_6)
(*
t_2
(-
(* (* x1 x1) 6.0)
(*
(- t_6 3.0)
(* (* x1 2.0) (/ t_5 (- -1.0 (* x1 x1))))))))))))
t_3)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = x1 * (x1 * 3.0);
double t_5 = (t_4 + (2.0 * x2)) - x1;
double t_6 = t_5 / t_2;
double t_7 = (2.0 * x2) - 3.0;
double t_8 = x2 * t_7;
double t_9 = 3.0 - (2.0 * x2);
double tmp;
if (x1 <= -1e+144) {
tmp = t_3;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * t_8) - (x1 * (6.0 + ((2.0 * (t_7 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_9)) + (2.0 * ((2.0 * t_8) + (-1.0 + ((3.0 * t_9) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -1.02e-11) {
tmp = x1 + (t_1 + (x1 + (t_0 - ((t_2 * (((x1 * x1) * (6.0 - (t_6 * 4.0))) + (((x1 * 2.0) * t_6) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)))) - (t_4 * (2.0 * x2))))));
} else if (x1 <= 0.044) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + (t_1 + (x1 + (t_0 + ((t_4 * t_6) + (t_2 * (((x1 * x1) * 6.0) - ((t_6 - 3.0) * ((x1 * 2.0) * (t_5 / (-1.0 - (x1 * x1)))))))))));
} else {
tmp = 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) :: t_9
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = 3.0d0 * (x2 * (-2.0d0))
t_2 = (x1 * x1) + 1.0d0
t_3 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_4 = x1 * (x1 * 3.0d0)
t_5 = (t_4 + (2.0d0 * x2)) - x1
t_6 = t_5 / t_2
t_7 = (2.0d0 * x2) - 3.0d0
t_8 = x2 * t_7
t_9 = 3.0d0 - (2.0d0 * x2)
if (x1 <= (-1d+144)) then
tmp = t_3
else if (x1 <= (-3.4d+106)) then
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0d0 * t_8) - (x1 * (6.0d0 + ((2.0d0 * (t_7 - (x2 * (-2.0d0)))) + (((x1 * (6.0d0 + ((4.0d0 * (x2 * t_9)) + (2.0d0 * ((2.0d0 * t_8) + ((-1.0d0) + ((3.0d0 * t_9) - (2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))))))))) - (x2 * 8.0d0)) - (x2 * 6.0d0)))))))))
else if (x1 <= (-1.02d-11)) then
tmp = x1 + (t_1 + (x1 + (t_0 - ((t_2 * (((x1 * x1) * (6.0d0 - (t_6 * 4.0d0))) + (((x1 * 2.0d0) * t_6) * (((1.0d0 + (3.0d0 / x1)) - (2.0d0 * (x2 / x1))) / x1)))) - (t_4 * (2.0d0 * x2))))))
else if (x1 <= 0.044d0) then
tmp = x1 + ((3.0d0 * (((t_4 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = x1 + (t_1 + (x1 + (t_0 + ((t_4 * t_6) + (t_2 * (((x1 * x1) * 6.0d0) - ((t_6 - 3.0d0) * ((x1 * 2.0d0) * (t_5 / ((-1.0d0) - (x1 * x1)))))))))))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = x1 * (x1 * 3.0);
double t_5 = (t_4 + (2.0 * x2)) - x1;
double t_6 = t_5 / t_2;
double t_7 = (2.0 * x2) - 3.0;
double t_8 = x2 * t_7;
double t_9 = 3.0 - (2.0 * x2);
double tmp;
if (x1 <= -1e+144) {
tmp = t_3;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * t_8) - (x1 * (6.0 + ((2.0 * (t_7 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_9)) + (2.0 * ((2.0 * t_8) + (-1.0 + ((3.0 * t_9) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -1.02e-11) {
tmp = x1 + (t_1 + (x1 + (t_0 - ((t_2 * (((x1 * x1) * (6.0 - (t_6 * 4.0))) + (((x1 * 2.0) * t_6) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)))) - (t_4 * (2.0 * x2))))));
} else if (x1 <= 0.044) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 + (t_1 + (x1 + (t_0 + ((t_4 * t_6) + (t_2 * (((x1 * x1) * 6.0) - ((t_6 - 3.0) * ((x1 * 2.0) * (t_5 / (-1.0 - (x1 * x1)))))))))));
} else {
tmp = t_3;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = 3.0 * (x2 * -2.0) t_2 = (x1 * x1) + 1.0 t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_4 = x1 * (x1 * 3.0) t_5 = (t_4 + (2.0 * x2)) - x1 t_6 = t_5 / t_2 t_7 = (2.0 * x2) - 3.0 t_8 = x2 * t_7 t_9 = 3.0 - (2.0 * x2) tmp = 0 if x1 <= -1e+144: tmp = t_3 elif x1 <= -3.4e+106: tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * t_8) - (x1 * (6.0 + ((2.0 * (t_7 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_9)) + (2.0 * ((2.0 * t_8) + (-1.0 + ((3.0 * t_9) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))) elif x1 <= -1.02e-11: tmp = x1 + (t_1 + (x1 + (t_0 - ((t_2 * (((x1 * x1) * (6.0 - (t_6 * 4.0))) + (((x1 * 2.0) * t_6) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)))) - (t_4 * (2.0 * x2)))))) elif x1 <= 0.044: tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = x1 + (t_1 + (x1 + (t_0 + ((t_4 * t_6) + (t_2 * (((x1 * x1) * 6.0) - ((t_6 - 3.0) * ((x1 * 2.0) * (t_5 / (-1.0 - (x1 * x1))))))))))) else: tmp = t_3 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(3.0 * Float64(x2 * -2.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(Float64(t_4 + Float64(2.0 * x2)) - x1) t_6 = Float64(t_5 / t_2) t_7 = Float64(Float64(2.0 * x2) - 3.0) t_8 = Float64(x2 * t_7) t_9 = Float64(3.0 - Float64(2.0 * x2)) tmp = 0.0 if (x1 <= -1e+144) tmp = t_3; elseif (x1 <= -3.4e+106) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * t_8) - Float64(x1 * Float64(6.0 + Float64(Float64(2.0 * Float64(t_7 - Float64(x2 * -2.0))) + Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(4.0 * Float64(x2 * t_9)) + Float64(2.0 * Float64(Float64(2.0 * t_8) + Float64(-1.0 + Float64(Float64(3.0 * t_9) - Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))))))))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0)))))))))); elseif (x1 <= -1.02e-11) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_0 - Float64(Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_6 * 4.0))) + Float64(Float64(Float64(x1 * 2.0) * t_6) * Float64(Float64(Float64(1.0 + Float64(3.0 / x1)) - Float64(2.0 * Float64(x2 / x1))) / x1)))) - Float64(t_4 * Float64(2.0 * x2))))))); elseif (x1 <= 0.044) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_4 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_0 + Float64(Float64(t_4 * t_6) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * 6.0) - Float64(Float64(t_6 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(t_5 / Float64(-1.0 - Float64(x1 * x1)))))))))))); else tmp = t_3; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = 3.0 * (x2 * -2.0); t_2 = (x1 * x1) + 1.0; t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_4 = x1 * (x1 * 3.0); t_5 = (t_4 + (2.0 * x2)) - x1; t_6 = t_5 / t_2; t_7 = (2.0 * x2) - 3.0; t_8 = x2 * t_7; t_9 = 3.0 - (2.0 * x2); tmp = 0.0; if (x1 <= -1e+144) tmp = t_3; elseif (x1 <= -3.4e+106) tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * t_8) - (x1 * (6.0 + ((2.0 * (t_7 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_9)) + (2.0 * ((2.0 * t_8) + (-1.0 + ((3.0 * t_9) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))); elseif (x1 <= -1.02e-11) tmp = x1 + (t_1 + (x1 + (t_0 - ((t_2 * (((x1 * x1) * (6.0 - (t_6 * 4.0))) + (((x1 * 2.0) * t_6) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)))) - (t_4 * (2.0 * x2)))))); elseif (x1 <= 0.044) tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = x1 + (t_1 + (x1 + (t_0 + ((t_4 * t_6) + (t_2 * (((x1 * x1) * 6.0) - ((t_6 - 3.0) * ((x1 * 2.0) * (t_5 / (-1.0 - (x1 * x1))))))))))); else tmp = t_3; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 / t$95$2), $MachinePrecision]}, Block[{t$95$7 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$8 = N[(x2 * t$95$7), $MachinePrecision]}, Block[{t$95$9 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$3, If[LessEqual[x1, -3.4e+106], N[(x1 + N[(t$95$1 + N[(x1 + N[(x1 * N[(N[(4.0 * t$95$8), $MachinePrecision] - N[(x1 * N[(6.0 + N[(N[(2.0 * N[(t$95$7 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * N[(6.0 + N[(N[(4.0 * N[(x2 * t$95$9), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(2.0 * t$95$8), $MachinePrecision] + N[(-1.0 + N[(N[(3.0 * t$95$9), $MachinePrecision] - N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.02e-11], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$0 - N[(N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$6 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * N[(N[(N[(1.0 + N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$4 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.044], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$4 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $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, 2e+153], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$0 + N[(N[(t$95$4 * t$95$6), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] - N[(N[(t$95$6 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$5 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := 3 \cdot \left(x2 \cdot -2\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := \left(t\_4 + 2 \cdot x2\right) - x1\\
t_6 := \frac{t\_5}{t\_2}\\
t_7 := 2 \cdot x2 - 3\\
t_8 := x2 \cdot t\_7\\
t_9 := 3 - 2 \cdot x2\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + x1 \cdot \left(4 \cdot t\_8 - x1 \cdot \left(6 + \left(2 \cdot \left(t\_7 - x2 \cdot -2\right) + \left(\left(x1 \cdot \left(6 + \left(4 \cdot \left(x2 \cdot t\_9\right) + 2 \cdot \left(2 \cdot t\_8 + \left(-1 + \left(3 \cdot t\_9 - 2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right)\right)\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.02 \cdot 10^{-11}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_0 - \left(t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_6 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot t\_6\right) \cdot \frac{\left(1 + \frac{3}{x1}\right) - 2 \cdot \frac{x2}{x1}}{x1}\right) - t\_4 \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.044:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_4 - 2 \cdot x2\right) - x1}{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 2 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_0 + \left(t\_4 \cdot t\_6 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 - \left(t\_6 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \frac{t\_5}{-1 - x1 \cdot x1}\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 75.0%
if -3.39999999999999994e106 < x1 < -1.01999999999999994e-11Initial program 99.4%
Taylor expanded in x1 around 0 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around inf 99.4%
associate-*r/99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x1 around 0 86.3%
if -1.01999999999999994e-11 < x1 < 0.043999999999999997Initial program 99.4%
Taylor expanded in x1 around 0 89.1%
Taylor expanded in x2 around 0 99.4%
if 0.043999999999999997 < x1 < 2e153Initial program 96.1%
Taylor expanded in x1 around 0 96.1%
*-commutative96.1%
Simplified96.1%
associate-*r*96.1%
add-cbrt-cube74.9%
pow1/373.3%
pow373.3%
*-commutative73.3%
unpow-prod-down73.3%
pow273.3%
pow-pow73.3%
metadata-eval73.3%
metadata-eval73.3%
Applied egg-rr73.3%
unpow1/374.9%
Simplified74.9%
Taylor expanded in x1 around inf 92.4%
Final simplification96.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_4 (* x1 (* x1 3.0)))
(t_5 (- (+ t_4 (* 2.0 x2)) x1))
(t_6 (/ t_5 t_2))
(t_7 (- (* 2.0 x2) 3.0))
(t_8 (* x2 t_7))
(t_9 (- 3.0 (* 2.0 x2))))
(if (<= x1 -1e+144)
t_3
(if (<= x1 -3.4e+106)
(+
x1
(+
t_1
(+
x1
(*
x1
(-
(* 4.0 t_8)
(*
x1
(+
6.0
(+
(* 2.0 (- t_7 (* x2 -2.0)))
(-
(-
(*
x1
(+
6.0
(+
(* 4.0 (* x2 t_9))
(*
2.0
(+
(* 2.0 t_8)
(+
-1.0
(- (* 3.0 t_9) (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))))))))))
(* x2 8.0))
(* x2 6.0))))))))))
(if (<= x1 -1.02e-11)
(+
x1
(+
t_1
(+
x1
(-
t_0
(-
(*
t_2
(+
(* (* x1 x1) (- 6.0 (* t_6 4.0)))
(*
(* (* x1 2.0) t_6)
(/ (- (+ 1.0 (/ 3.0 x1)) (* 2.0 (/ x2 x1))) x1))))
(* t_4 (* 2.0 x2)))))))
(if (<= x1 520000000.0)
(+
x1
(+
(* 3.0 (/ (- (- t_4 (* 2.0 x2)) x1) t_2))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153)
(-
x1
(-
(-
(-
(+
(* t_4 (/ t_5 (- -1.0 (* x1 x1))))
(*
t_2
(-
(*
(* x1 x1)
(+ 6.0 (* 4.0 (- (/ (- 1.0 (/ t_7 x1)) x1) 3.0))))
-6.0)))
t_0)
x1)
t_1))
t_3)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = x1 * (x1 * 3.0);
double t_5 = (t_4 + (2.0 * x2)) - x1;
double t_6 = t_5 / t_2;
double t_7 = (2.0 * x2) - 3.0;
double t_8 = x2 * t_7;
double t_9 = 3.0 - (2.0 * x2);
double tmp;
if (x1 <= -1e+144) {
tmp = t_3;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * t_8) - (x1 * (6.0 + ((2.0 * (t_7 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_9)) + (2.0 * ((2.0 * t_8) + (-1.0 + ((3.0 * t_9) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -1.02e-11) {
tmp = x1 + (t_1 + (x1 + (t_0 - ((t_2 * (((x1 * x1) * (6.0 - (t_6 * 4.0))) + (((x1 * 2.0) * t_6) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)))) - (t_4 * (2.0 * x2))))));
} else if (x1 <= 520000000.0) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 - (((((t_4 * (t_5 / (-1.0 - (x1 * x1)))) + (t_2 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 - (t_7 / x1)) / x1) - 3.0)))) - -6.0))) - t_0) - x1) - t_1);
} else {
tmp = 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) :: t_9
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = 3.0d0 * (x2 * (-2.0d0))
t_2 = (x1 * x1) + 1.0d0
t_3 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_4 = x1 * (x1 * 3.0d0)
t_5 = (t_4 + (2.0d0 * x2)) - x1
t_6 = t_5 / t_2
t_7 = (2.0d0 * x2) - 3.0d0
t_8 = x2 * t_7
t_9 = 3.0d0 - (2.0d0 * x2)
if (x1 <= (-1d+144)) then
tmp = t_3
else if (x1 <= (-3.4d+106)) then
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0d0 * t_8) - (x1 * (6.0d0 + ((2.0d0 * (t_7 - (x2 * (-2.0d0)))) + (((x1 * (6.0d0 + ((4.0d0 * (x2 * t_9)) + (2.0d0 * ((2.0d0 * t_8) + ((-1.0d0) + ((3.0d0 * t_9) - (2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))))))))) - (x2 * 8.0d0)) - (x2 * 6.0d0)))))))))
else if (x1 <= (-1.02d-11)) then
tmp = x1 + (t_1 + (x1 + (t_0 - ((t_2 * (((x1 * x1) * (6.0d0 - (t_6 * 4.0d0))) + (((x1 * 2.0d0) * t_6) * (((1.0d0 + (3.0d0 / x1)) - (2.0d0 * (x2 / x1))) / x1)))) - (t_4 * (2.0d0 * x2))))))
else if (x1 <= 520000000.0d0) then
tmp = x1 + ((3.0d0 * (((t_4 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = x1 - (((((t_4 * (t_5 / ((-1.0d0) - (x1 * x1)))) + (t_2 * (((x1 * x1) * (6.0d0 + (4.0d0 * (((1.0d0 - (t_7 / x1)) / x1) - 3.0d0)))) - (-6.0d0)))) - t_0) - x1) - t_1)
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_4 = x1 * (x1 * 3.0);
double t_5 = (t_4 + (2.0 * x2)) - x1;
double t_6 = t_5 / t_2;
double t_7 = (2.0 * x2) - 3.0;
double t_8 = x2 * t_7;
double t_9 = 3.0 - (2.0 * x2);
double tmp;
if (x1 <= -1e+144) {
tmp = t_3;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * t_8) - (x1 * (6.0 + ((2.0 * (t_7 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_9)) + (2.0 * ((2.0 * t_8) + (-1.0 + ((3.0 * t_9) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -1.02e-11) {
tmp = x1 + (t_1 + (x1 + (t_0 - ((t_2 * (((x1 * x1) * (6.0 - (t_6 * 4.0))) + (((x1 * 2.0) * t_6) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)))) - (t_4 * (2.0 * x2))))));
} else if (x1 <= 520000000.0) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = x1 - (((((t_4 * (t_5 / (-1.0 - (x1 * x1)))) + (t_2 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 - (t_7 / x1)) / x1) - 3.0)))) - -6.0))) - t_0) - x1) - t_1);
} else {
tmp = t_3;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = 3.0 * (x2 * -2.0) t_2 = (x1 * x1) + 1.0 t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_4 = x1 * (x1 * 3.0) t_5 = (t_4 + (2.0 * x2)) - x1 t_6 = t_5 / t_2 t_7 = (2.0 * x2) - 3.0 t_8 = x2 * t_7 t_9 = 3.0 - (2.0 * x2) tmp = 0 if x1 <= -1e+144: tmp = t_3 elif x1 <= -3.4e+106: tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * t_8) - (x1 * (6.0 + ((2.0 * (t_7 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_9)) + (2.0 * ((2.0 * t_8) + (-1.0 + ((3.0 * t_9) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))) elif x1 <= -1.02e-11: tmp = x1 + (t_1 + (x1 + (t_0 - ((t_2 * (((x1 * x1) * (6.0 - (t_6 * 4.0))) + (((x1 * 2.0) * t_6) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)))) - (t_4 * (2.0 * x2)))))) elif x1 <= 520000000.0: tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = x1 - (((((t_4 * (t_5 / (-1.0 - (x1 * x1)))) + (t_2 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 - (t_7 / x1)) / x1) - 3.0)))) - -6.0))) - t_0) - x1) - t_1) else: tmp = t_3 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(3.0 * Float64(x2 * -2.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(Float64(t_4 + Float64(2.0 * x2)) - x1) t_6 = Float64(t_5 / t_2) t_7 = Float64(Float64(2.0 * x2) - 3.0) t_8 = Float64(x2 * t_7) t_9 = Float64(3.0 - Float64(2.0 * x2)) tmp = 0.0 if (x1 <= -1e+144) tmp = t_3; elseif (x1 <= -3.4e+106) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * t_8) - Float64(x1 * Float64(6.0 + Float64(Float64(2.0 * Float64(t_7 - Float64(x2 * -2.0))) + Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(4.0 * Float64(x2 * t_9)) + Float64(2.0 * Float64(Float64(2.0 * t_8) + Float64(-1.0 + Float64(Float64(3.0 * t_9) - Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))))))))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0)))))))))); elseif (x1 <= -1.02e-11) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_0 - Float64(Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_6 * 4.0))) + Float64(Float64(Float64(x1 * 2.0) * t_6) * Float64(Float64(Float64(1.0 + Float64(3.0 / x1)) - Float64(2.0 * Float64(x2 / x1))) / x1)))) - Float64(t_4 * Float64(2.0 * x2))))))); elseif (x1 <= 520000000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_4 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = Float64(x1 - Float64(Float64(Float64(Float64(Float64(t_4 * Float64(t_5 / Float64(-1.0 - Float64(x1 * x1)))) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(Float64(1.0 - Float64(t_7 / x1)) / x1) - 3.0)))) - -6.0))) - t_0) - x1) - t_1)); else tmp = t_3; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = 3.0 * (x2 * -2.0); t_2 = (x1 * x1) + 1.0; t_3 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_4 = x1 * (x1 * 3.0); t_5 = (t_4 + (2.0 * x2)) - x1; t_6 = t_5 / t_2; t_7 = (2.0 * x2) - 3.0; t_8 = x2 * t_7; t_9 = 3.0 - (2.0 * x2); tmp = 0.0; if (x1 <= -1e+144) tmp = t_3; elseif (x1 <= -3.4e+106) tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * t_8) - (x1 * (6.0 + ((2.0 * (t_7 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_9)) + (2.0 * ((2.0 * t_8) + (-1.0 + ((3.0 * t_9) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))); elseif (x1 <= -1.02e-11) tmp = x1 + (t_1 + (x1 + (t_0 - ((t_2 * (((x1 * x1) * (6.0 - (t_6 * 4.0))) + (((x1 * 2.0) * t_6) * (((1.0 + (3.0 / x1)) - (2.0 * (x2 / x1))) / x1)))) - (t_4 * (2.0 * x2)))))); elseif (x1 <= 520000000.0) tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = x1 - (((((t_4 * (t_5 / (-1.0 - (x1 * x1)))) + (t_2 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 - (t_7 / x1)) / x1) - 3.0)))) - -6.0))) - t_0) - x1) - t_1); else tmp = t_3; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$4 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 / t$95$2), $MachinePrecision]}, Block[{t$95$7 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$8 = N[(x2 * t$95$7), $MachinePrecision]}, Block[{t$95$9 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$3, If[LessEqual[x1, -3.4e+106], N[(x1 + N[(t$95$1 + N[(x1 + N[(x1 * N[(N[(4.0 * t$95$8), $MachinePrecision] - N[(x1 * N[(6.0 + N[(N[(2.0 * N[(t$95$7 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * N[(6.0 + N[(N[(4.0 * N[(x2 * t$95$9), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(2.0 * t$95$8), $MachinePrecision] + N[(-1.0 + N[(N[(3.0 * t$95$9), $MachinePrecision] - N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.02e-11], N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$0 - N[(N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$6 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * N[(N[(N[(1.0 + N[(3.0 / x1), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$4 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 520000000.0], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$4 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $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, 2e+153], N[(x1 - N[(N[(N[(N[(N[(t$95$4 * N[(t$95$5 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(N[(1.0 - N[(t$95$7 / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] - x1), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := 3 \cdot \left(x2 \cdot -2\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := \left(t\_4 + 2 \cdot x2\right) - x1\\
t_6 := \frac{t\_5}{t\_2}\\
t_7 := 2 \cdot x2 - 3\\
t_8 := x2 \cdot t\_7\\
t_9 := 3 - 2 \cdot x2\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + x1 \cdot \left(4 \cdot t\_8 - x1 \cdot \left(6 + \left(2 \cdot \left(t\_7 - x2 \cdot -2\right) + \left(\left(x1 \cdot \left(6 + \left(4 \cdot \left(x2 \cdot t\_9\right) + 2 \cdot \left(2 \cdot t\_8 + \left(-1 + \left(3 \cdot t\_9 - 2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right)\right)\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.02 \cdot 10^{-11}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_0 - \left(t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_6 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot t\_6\right) \cdot \frac{\left(1 + \frac{3}{x1}\right) - 2 \cdot \frac{x2}{x1}}{x1}\right) - t\_4 \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 520000000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_4 - 2 \cdot x2\right) - x1}{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 2 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(\left(\left(\left(t\_4 \cdot \frac{t\_5}{-1 - x1 \cdot x1} + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 - \frac{t\_7}{x1}}{x1} - 3\right)\right) - -6\right)\right) - t\_0\right) - x1\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 75.0%
if -3.39999999999999994e106 < x1 < -1.01999999999999994e-11Initial program 99.4%
Taylor expanded in x1 around 0 99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around inf 99.4%
associate-*r/99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x1 around 0 86.3%
if -1.01999999999999994e-11 < x1 < 5.2e8Initial program 99.4%
Taylor expanded in x1 around 0 88.6%
Taylor expanded in x2 around 0 98.7%
if 5.2e8 < x1 < 2e153Initial program 95.9%
Taylor expanded in x1 around 0 95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in x1 around inf 95.9%
associate-*r/95.9%
metadata-eval95.9%
Simplified95.9%
Taylor expanded in x1 around inf 90.1%
Taylor expanded in x1 around -inf 90.1%
Final simplification96.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* 3.0 (* x2 -2.0)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (- (* 2.0 x2) 3.0))
(t_5 (* x2 t_4))
(t_6 (- 3.0 (* 2.0 x2)))
(t_7
(-
x1
(-
(-
(-
(+
(* t_3 (/ (- (+ t_3 (* 2.0 x2)) x1) (- -1.0 (* x1 x1))))
(*
t_1
(-
(* (* x1 x1) (+ 6.0 (* 4.0 (- (/ (- 1.0 (/ t_4 x1)) x1) 3.0))))
-6.0)))
(* x1 (* x1 x1)))
x1)
t_2))))
(if (<= x1 -1e+144)
t_0
(if (<= x1 -3.4e+106)
(+
x1
(+
t_2
(+
x1
(*
x1
(-
(* 4.0 t_5)
(*
x1
(+
6.0
(+
(* 2.0 (- t_4 (* x2 -2.0)))
(-
(-
(*
x1
(+
6.0
(+
(* 4.0 (* x2 t_6))
(*
2.0
(+
(* 2.0 t_5)
(+
-1.0
(- (* 3.0 t_6) (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))))))))))
(* x2 8.0))
(* x2 6.0))))))))))
(if (<= x1 -5.1e+14)
t_7
(if (<= x1 700000000000.0)
(+
x1
(+
(* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_1))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153) t_7 t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * (x2 * -2.0);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (2.0 * x2) - 3.0;
double t_5 = x2 * t_4;
double t_6 = 3.0 - (2.0 * x2);
double t_7 = x1 - (((((t_3 * (((t_3 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) + (t_1 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 - (t_4 / x1)) / x1) - 3.0)))) - -6.0))) - (x1 * (x1 * x1))) - x1) - t_2);
double tmp;
if (x1 <= -1e+144) {
tmp = t_0;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_2 + (x1 + (x1 * ((4.0 * t_5) - (x1 * (6.0 + ((2.0 * (t_4 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_6)) + (2.0 * ((2.0 * t_5) + (-1.0 + ((3.0 * t_6) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -5.1e+14) {
tmp = t_7;
} else if (x1 <= 700000000000.0) {
tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_7;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = (x1 * x1) + 1.0d0
t_2 = 3.0d0 * (x2 * (-2.0d0))
t_3 = x1 * (x1 * 3.0d0)
t_4 = (2.0d0 * x2) - 3.0d0
t_5 = x2 * t_4
t_6 = 3.0d0 - (2.0d0 * x2)
t_7 = x1 - (((((t_3 * (((t_3 + (2.0d0 * x2)) - x1) / ((-1.0d0) - (x1 * x1)))) + (t_1 * (((x1 * x1) * (6.0d0 + (4.0d0 * (((1.0d0 - (t_4 / x1)) / x1) - 3.0d0)))) - (-6.0d0)))) - (x1 * (x1 * x1))) - x1) - t_2)
if (x1 <= (-1d+144)) then
tmp = t_0
else if (x1 <= (-3.4d+106)) then
tmp = x1 + (t_2 + (x1 + (x1 * ((4.0d0 * t_5) - (x1 * (6.0d0 + ((2.0d0 * (t_4 - (x2 * (-2.0d0)))) + (((x1 * (6.0d0 + ((4.0d0 * (x2 * t_6)) + (2.0d0 * ((2.0d0 * t_5) + ((-1.0d0) + ((3.0d0 * t_6) - (2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))))))))) - (x2 * 8.0d0)) - (x2 * 6.0d0)))))))))
else if (x1 <= (-5.1d+14)) then
tmp = t_7
else if (x1 <= 700000000000.0d0) then
tmp = x1 + ((3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = t_7
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * (x2 * -2.0);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (2.0 * x2) - 3.0;
double t_5 = x2 * t_4;
double t_6 = 3.0 - (2.0 * x2);
double t_7 = x1 - (((((t_3 * (((t_3 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) + (t_1 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 - (t_4 / x1)) / x1) - 3.0)))) - -6.0))) - (x1 * (x1 * x1))) - x1) - t_2);
double tmp;
if (x1 <= -1e+144) {
tmp = t_0;
} else if (x1 <= -3.4e+106) {
tmp = x1 + (t_2 + (x1 + (x1 * ((4.0 * t_5) - (x1 * (6.0 + ((2.0 * (t_4 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_6)) + (2.0 * ((2.0 * t_5) + (-1.0 + ((3.0 * t_6) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0)))))))));
} else if (x1 <= -5.1e+14) {
tmp = t_7;
} else if (x1 <= 700000000000.0) {
tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_7;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = (x1 * x1) + 1.0 t_2 = 3.0 * (x2 * -2.0) t_3 = x1 * (x1 * 3.0) t_4 = (2.0 * x2) - 3.0 t_5 = x2 * t_4 t_6 = 3.0 - (2.0 * x2) t_7 = x1 - (((((t_3 * (((t_3 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) + (t_1 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 - (t_4 / x1)) / x1) - 3.0)))) - -6.0))) - (x1 * (x1 * x1))) - x1) - t_2) tmp = 0 if x1 <= -1e+144: tmp = t_0 elif x1 <= -3.4e+106: tmp = x1 + (t_2 + (x1 + (x1 * ((4.0 * t_5) - (x1 * (6.0 + ((2.0 * (t_4 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_6)) + (2.0 * ((2.0 * t_5) + (-1.0 + ((3.0 * t_6) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))) elif x1 <= -5.1e+14: tmp = t_7 elif x1 <= 700000000000.0: tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = t_7 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(3.0 * Float64(x2 * -2.0)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(2.0 * x2) - 3.0) t_5 = Float64(x2 * t_4) t_6 = Float64(3.0 - Float64(2.0 * x2)) t_7 = Float64(x1 - Float64(Float64(Float64(Float64(Float64(t_3 * Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(Float64(1.0 - Float64(t_4 / x1)) / x1) - 3.0)))) - -6.0))) - Float64(x1 * Float64(x1 * x1))) - x1) - t_2)) tmp = 0.0 if (x1 <= -1e+144) tmp = t_0; elseif (x1 <= -3.4e+106) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * t_5) - Float64(x1 * Float64(6.0 + Float64(Float64(2.0 * Float64(t_4 - Float64(x2 * -2.0))) + Float64(Float64(Float64(x1 * Float64(6.0 + Float64(Float64(4.0 * Float64(x2 * t_6)) + Float64(2.0 * Float64(Float64(2.0 * t_5) + Float64(-1.0 + Float64(Float64(3.0 * t_6) - Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))))))))) - Float64(x2 * 8.0)) - Float64(x2 * 6.0)))))))))); elseif (x1 <= -5.1e+14) tmp = t_7; elseif (x1 <= 700000000000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = t_7; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = (x1 * x1) + 1.0; t_2 = 3.0 * (x2 * -2.0); t_3 = x1 * (x1 * 3.0); t_4 = (2.0 * x2) - 3.0; t_5 = x2 * t_4; t_6 = 3.0 - (2.0 * x2); t_7 = x1 - (((((t_3 * (((t_3 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) + (t_1 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 - (t_4 / x1)) / x1) - 3.0)))) - -6.0))) - (x1 * (x1 * x1))) - x1) - t_2); tmp = 0.0; if (x1 <= -1e+144) tmp = t_0; elseif (x1 <= -3.4e+106) tmp = x1 + (t_2 + (x1 + (x1 * ((4.0 * t_5) - (x1 * (6.0 + ((2.0 * (t_4 - (x2 * -2.0))) + (((x1 * (6.0 + ((4.0 * (x2 * t_6)) + (2.0 * ((2.0 * t_5) + (-1.0 + ((3.0 * t_6) - (2.0 * (x2 * (3.0 + (x2 * -2.0))))))))))) - (x2 * 8.0)) - (x2 * 6.0))))))))); elseif (x1 <= -5.1e+14) tmp = t_7; elseif (x1 <= 700000000000.0) tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = t_7; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$5 = N[(x2 * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(x1 - N[(N[(N[(N[(N[(t$95$3 * N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(N[(1.0 - N[(t$95$4 / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+144], t$95$0, If[LessEqual[x1, -3.4e+106], N[(x1 + N[(t$95$2 + N[(x1 + N[(x1 * N[(N[(4.0 * t$95$5), $MachinePrecision] - N[(x1 * N[(6.0 + N[(N[(2.0 * N[(t$95$4 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * N[(6.0 + N[(N[(4.0 * N[(x2 * t$95$6), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(2.0 * t$95$5), $MachinePrecision] + N[(-1.0 + N[(N[(3.0 * t$95$6), $MachinePrecision] - N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.1e+14], t$95$7, If[LessEqual[x1, 700000000000.0], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $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, 2e+153], t$95$7, t$95$0]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := 3 \cdot \left(x2 \cdot -2\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := 2 \cdot x2 - 3\\
t_5 := x2 \cdot t\_4\\
t_6 := 3 - 2 \cdot x2\\
t_7 := x1 - \left(\left(\left(\left(t\_3 \cdot \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{-1 - x1 \cdot x1} + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 - \frac{t\_4}{x1}}{x1} - 3\right)\right) - -6\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right) - t\_2\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + x1 \cdot \left(4 \cdot t\_5 - x1 \cdot \left(6 + \left(2 \cdot \left(t\_4 - x2 \cdot -2\right) + \left(\left(x1 \cdot \left(6 + \left(4 \cdot \left(x2 \cdot t\_6\right) + 2 \cdot \left(2 \cdot t\_5 + \left(-1 + \left(3 \cdot t\_6 - 2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right)\right)\right)\right)\right) - x2 \cdot 8\right) - x2 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.1 \cdot 10^{+14}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x1 \leq 700000000000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_1} + \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 2 \cdot 10^{+153}:\\
\;\;\;\;t\_7\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.00000000000000002e144 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -1.00000000000000002e144 < x1 < -3.39999999999999994e106Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 75.0%
if -3.39999999999999994e106 < x1 < -5.1e14 or 7e11 < x1 < 2e153Initial program 96.9%
Taylor expanded in x1 around 0 96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in x1 around inf 97.0%
associate-*r/97.0%
metadata-eval97.0%
Simplified97.0%
Taylor expanded in x1 around inf 85.6%
Taylor expanded in x1 around -inf 85.7%
if -5.1e14 < x1 < 7e11Initial program 99.4%
Taylor expanded in x1 around 0 88.3%
Taylor expanded in x2 around 0 98.1%
Final simplification95.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_2 (+ (* x1 x1) 1.0))
(t_3
(-
x1
(-
(-
(-
(+
(* t_0 (/ (- (+ t_0 (* 2.0 x2)) x1) (- -1.0 (* x1 x1))))
(*
t_2
(-
(*
(* x1 x1)
(+
6.0
(* 4.0 (- (/ (- 1.0 (/ (- (* 2.0 x2) 3.0) x1)) x1) 3.0))))
-6.0)))
(* x1 (* x1 x1)))
x1)
(* 3.0 (* x2 -2.0))))))
(if (<= x1 -4.4e+153)
t_1
(if (<= x1 -5.6e+102)
(+
x1
(-
x1
(* 3.0 (- (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0)) (* x2 -2.0)))))
(if (<= x1 -5.1e+14)
t_3
(if (<= x1 520000000.0)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+153) t_3 t_1)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 - (((((t_0 * (((t_0 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) + (t_2 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 - (((2.0 * x2) - 3.0) / x1)) / x1) - 3.0)))) - -6.0))) - (x1 * (x1 * x1))) - x1) - (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_1;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= -5.1e+14) {
tmp = t_3;
} else if (x1 <= 520000000.0) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_2 = (x1 * x1) + 1.0d0
t_3 = x1 - (((((t_0 * (((t_0 + (2.0d0 * x2)) - x1) / ((-1.0d0) - (x1 * x1)))) + (t_2 * (((x1 * x1) * (6.0d0 + (4.0d0 * (((1.0d0 - (((2.0d0 * x2) - 3.0d0) / x1)) / x1) - 3.0d0)))) - (-6.0d0)))) - (x1 * (x1 * x1))) - x1) - (3.0d0 * (x2 * (-2.0d0))))
if (x1 <= (-4.4d+153)) then
tmp = t_1
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (x1 - (3.0d0 * ((x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))) - (x2 * (-2.0d0)))))
else if (x1 <= (-5.1d+14)) then
tmp = t_3
else if (x1 <= 520000000.0d0) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+153) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 - (((((t_0 * (((t_0 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) + (t_2 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 - (((2.0 * x2) - 3.0) / x1)) / x1) - 3.0)))) - -6.0))) - (x1 * (x1 * x1))) - x1) - (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_1;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= -5.1e+14) {
tmp = t_3;
} else if (x1 <= 520000000.0) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+153) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_2 = (x1 * x1) + 1.0 t_3 = x1 - (((((t_0 * (((t_0 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) + (t_2 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 - (((2.0 * x2) - 3.0) / x1)) / x1) - 3.0)))) - -6.0))) - (x1 * (x1 * x1))) - x1) - (3.0 * (x2 * -2.0))) tmp = 0 if x1 <= -4.4e+153: tmp = t_1 elif x1 <= -5.6e+102: tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))) elif x1 <= -5.1e+14: tmp = t_3 elif x1 <= 520000000.0: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+153: tmp = t_3 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(x1 - Float64(Float64(Float64(Float64(Float64(t_0 * Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(Float64(1.0 - Float64(Float64(Float64(2.0 * x2) - 3.0) / x1)) / x1) - 3.0)))) - -6.0))) - Float64(x1 * Float64(x1 * x1))) - x1) - Float64(3.0 * Float64(x2 * -2.0)))) tmp = 0.0 if (x1 <= -4.4e+153) tmp = t_1; elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(x1 - Float64(3.0 * Float64(Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)) - Float64(x2 * -2.0))))); elseif (x1 <= -5.1e+14) tmp = t_3; elseif (x1 <= 520000000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+153) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_2 = (x1 * x1) + 1.0; t_3 = x1 - (((((t_0 * (((t_0 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)))) + (t_2 * (((x1 * x1) * (6.0 + (4.0 * (((1.0 - (((2.0 * x2) - 3.0) / x1)) / x1) - 3.0)))) - -6.0))) - (x1 * (x1 * x1))) - x1) - (3.0 * (x2 * -2.0))); tmp = 0.0; if (x1 <= -4.4e+153) tmp = t_1; elseif (x1 <= -5.6e+102) tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))); elseif (x1 <= -5.1e+14) tmp = t_3; elseif (x1 <= 520000000.0) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+153) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 - N[(N[(N[(N[(N[(t$95$0 * N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(N[(1.0 - N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] - N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], t$95$1, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(x1 - N[(3.0 * N[(N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.1e+14], t$95$3, If[LessEqual[x1, 520000000.0], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $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, 2e+153], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := x1 - \left(\left(\left(\left(t\_0 \cdot \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{-1 - x1 \cdot x1} + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \left(\frac{1 - \frac{2 \cdot x2 - 3}{x1}}{x1} - 3\right)\right) - -6\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right) - 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 - 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right) - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq -5.1 \cdot 10^{+14}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 520000000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{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 2 \cdot 10^{+153}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 61.4%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -5.60000000000000037e102Initial program 10.0%
Taylor expanded in x1 around 0 10.1%
Taylor expanded in x1 around 0 22.3%
Taylor expanded in x2 around 0 62.3%
if -5.60000000000000037e102 < x1 < -5.1e14 or 5.2e8 < x1 < 2e153Initial program 96.9%
Taylor expanded in x1 around 0 96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in x1 around inf 96.9%
associate-*r/96.9%
metadata-eval96.9%
Simplified96.9%
Taylor expanded in x1 around inf 85.3%
Taylor expanded in x1 around -inf 85.3%
if -5.1e14 < x1 < 5.2e8Initial program 99.4%
Taylor expanded in x1 around 0 88.3%
Taylor expanded in x2 around 0 98.1%
Final simplification95.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3
(+
x1
(+
(* 3.0 (* x2 -2.0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 (* 2.0 x2))
(*
t_2
(+
(* (* x1 x1) (- (* (/ (- (+ t_1 (* 2.0 x2)) x1) t_2) 4.0) 6.0))
-6.0)))))))))
(if (<= x1 -4.4e+153)
t_0
(if (<= x1 -5.6e+102)
(+
x1
(-
x1
(* 3.0 (- (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0)) (* x2 -2.0)))))
(if (<= x1 -4.5e+16)
t_3
(if (<= x1 520000000.0)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2.45e+144) t_3 t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (2.0 * x2)) + (t_2 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + -6.0))))));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_0;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= -4.5e+16) {
tmp = t_3;
} else if (x1 <= 520000000.0) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2.45e+144) {
tmp = t_3;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (2.0d0 * x2)) + (t_2 * (((x1 * x1) * (((((t_1 + (2.0d0 * x2)) - x1) / t_2) * 4.0d0) - 6.0d0)) + (-6.0d0)))))))
if (x1 <= (-4.4d+153)) then
tmp = t_0
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (x1 - (3.0d0 * ((x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))) - (x2 * (-2.0d0)))))
else if (x1 <= (-4.5d+16)) then
tmp = t_3
else if (x1 <= 520000000.0d0) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2.45d+144) then
tmp = t_3
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (2.0 * x2)) + (t_2 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + -6.0))))));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_0;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= -4.5e+16) {
tmp = t_3;
} else if (x1 <= 520000000.0) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2.45e+144) {
tmp = t_3;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (2.0 * x2)) + (t_2 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + -6.0)))))) tmp = 0 if x1 <= -4.4e+153: tmp = t_0 elif x1 <= -5.6e+102: tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))) elif x1 <= -4.5e+16: tmp = t_3 elif x1 <= 520000000.0: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2.45e+144: tmp = t_3 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(2.0 * x2)) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + -6.0))))))) tmp = 0.0 if (x1 <= -4.4e+153) tmp = t_0; elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(x1 - Float64(3.0 * Float64(Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)) - Float64(x2 * -2.0))))); elseif (x1 <= -4.5e+16) tmp = t_3; elseif (x1 <= 520000000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2.45e+144) tmp = t_3; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (2.0 * x2)) + (t_2 * (((x1 * x1) * (((((t_1 + (2.0 * x2)) - x1) / t_2) * 4.0) - 6.0)) + -6.0)))))); tmp = 0.0; if (x1 <= -4.4e+153) tmp = t_0; elseif (x1 <= -5.6e+102) tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))); elseif (x1 <= -4.5e+16) tmp = t_3; elseif (x1 <= 520000000.0) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2.45e+144) tmp = t_3; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], t$95$0, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(x1 - N[(3.0 * N[(N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.5e+16], t$95$3, If[LessEqual[x1, 520000000.0], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(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, 2.45e+144], t$95$3, t$95$0]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_1 \cdot \left(2 \cdot x2\right) + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2} \cdot 4 - 6\right) + -6\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 - 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right) - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq -4.5 \cdot 10^{+16}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 520000000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{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 2.45 \cdot 10^{+144}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153 or 2.45e144 < x1 Initial program 1.4%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -4.3999999999999999e153 < x1 < -5.60000000000000037e102Initial program 10.0%
Taylor expanded in x1 around 0 10.1%
Taylor expanded in x1 around 0 22.3%
Taylor expanded in x2 around 0 62.3%
if -5.60000000000000037e102 < x1 < -4.5e16 or 5.2e8 < x1 < 2.45e144Initial program 96.8%
Taylor expanded in x1 around 0 96.8%
*-commutative96.8%
Simplified96.8%
Taylor expanded in x1 around inf 96.8%
associate-*r/96.8%
metadata-eval96.8%
Simplified96.8%
Taylor expanded in x1 around inf 84.9%
Taylor expanded in x1 around 0 80.5%
if -4.5e16 < x1 < 5.2e8Initial program 99.4%
Taylor expanded in x1 around 0 88.3%
Taylor expanded in x2 around 0 98.1%
Final simplification94.2%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -4.4e+153)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -4.1e+64)
(+
x1
(-
x1
(* 3.0 (- (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0)) (* x2 -2.0)))))
(if (<= x1 2e-98)
(+
x1
(+
x1
(+ (* x1 -3.0) (* x2 (- (+ (* x1 -12.0) (* (* x1 x2) 8.0)) 6.0)))))
(-
x1
(+
(- (* 4.0 (* x1 (* x2 (- 3.0 (* 2.0 x2))))) x1)
(*
3.0
(-
(* x1 (- (* x1 (- (* x2 -2.0) (+ x1 3.0))) -1.0))
(* x2 -2.0)))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -4.1e+64) {
tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= 2e-98) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0))));
} else {
tmp = x1 - (((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1) + (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - (x1 + 3.0))) - -1.0)) - (x2 * -2.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-4.4d+153)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-4.1d+64)) then
tmp = x1 + (x1 - (3.0d0 * ((x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))) - (x2 * (-2.0d0)))))
else if (x1 <= 2d-98) then
tmp = x1 + (x1 + ((x1 * (-3.0d0)) + (x2 * (((x1 * (-12.0d0)) + ((x1 * x2) * 8.0d0)) - 6.0d0))))
else
tmp = x1 - (((4.0d0 * (x1 * (x2 * (3.0d0 - (2.0d0 * x2))))) - x1) + (3.0d0 * ((x1 * ((x1 * ((x2 * (-2.0d0)) - (x1 + 3.0d0))) - (-1.0d0))) - (x2 * (-2.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -4.1e+64) {
tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= 2e-98) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0))));
} else {
tmp = x1 - (((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1) + (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - (x1 + 3.0))) - -1.0)) - (x2 * -2.0))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -4.4e+153: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -4.1e+64: tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))) elif x1 <= 2e-98: tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0)))) else: tmp = x1 - (((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1) + (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - (x1 + 3.0))) - -1.0)) - (x2 * -2.0)))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -4.4e+153) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -4.1e+64) tmp = Float64(x1 + Float64(x1 - Float64(3.0 * Float64(Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)) - Float64(x2 * -2.0))))); elseif (x1 <= 2e-98) tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) + Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(Float64(x1 * x2) * 8.0)) - 6.0))))); else tmp = Float64(x1 - Float64(Float64(Float64(4.0 * Float64(x1 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))) - x1) + Float64(3.0 * Float64(Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - Float64(x1 + 3.0))) - -1.0)) - Float64(x2 * -2.0))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -4.4e+153) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -4.1e+64) tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))); elseif (x1 <= 2e-98) tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0)))); else tmp = x1 - (((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1) + (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - (x1 + 3.0))) - -1.0)) - (x2 * -2.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -4.4e+153], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.1e+64], N[(x1 + N[(x1 - N[(3.0 * N[(N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e-98], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(N[(x1 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(N[(4.0 * N[(x1 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] + N[(3.0 * N[(N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - N[(x1 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -4.1 \cdot 10^{+64}:\\
\;\;\;\;x1 + \left(x1 - 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right) - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{-98}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(\left(x1 \cdot -12 + \left(x1 \cdot x2\right) \cdot 8\right) - 6\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1\right) + 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - \left(x1 + 3\right)\right) - -1\right) - x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 45.0%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -4.09999999999999978e64Initial program 30.6%
Taylor expanded in x1 around 0 15.6%
Taylor expanded in x1 around 0 25.7%
Taylor expanded in x2 around 0 56.5%
if -4.09999999999999978e64 < x1 < 1.99999999999999988e-98Initial program 99.4%
Taylor expanded in x1 around 0 82.0%
Taylor expanded in x1 around 0 81.3%
Taylor expanded in x1 around 0 82.1%
fma-define82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in x2 around 0 93.2%
if 1.99999999999999988e-98 < x1 Initial program 62.2%
Taylor expanded in x1 around 0 36.3%
Taylor expanded in x1 around 0 76.1%
Final simplification86.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1
(+
x1
(- (* x2 -6.0) (* x1 (+ 2.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))))))
(if (<= x1 -4.4e+153)
t_0
(if (<= x1 -2.45e+63)
(+
x1
(-
x1
(* 3.0 (- (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0)) (* x2 -2.0)))))
(if (<= x1 -2.6e-225)
t_1
(if (<= x1 3.65e-243)
(+
x1
(- (* x2 -6.0) (* x1 (- 2.0 (* 3.0 (* x1 (- 3.0 (* x2 -2.0))))))))
(if (<= x1 2.45e+144) t_1 t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_0;
} else if (x1 <= -2.45e+63) {
tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= -2.6e-225) {
tmp = t_1;
} else if (x1 <= 3.65e-243) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (3.0 * (x1 * (3.0 - (x2 * -2.0)))))));
} else if (x1 <= 2.45e+144) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))))))
if (x1 <= (-4.4d+153)) then
tmp = t_0
else if (x1 <= (-2.45d+63)) then
tmp = x1 + (x1 - (3.0d0 * ((x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))) - (x2 * (-2.0d0)))))
else if (x1 <= (-2.6d-225)) then
tmp = t_1
else if (x1 <= 3.65d-243) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))))))
else if (x1 <= 2.45d+144) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_0;
} else if (x1 <= -2.45e+63) {
tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= -2.6e-225) {
tmp = t_1;
} else if (x1 <= 3.65e-243) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (3.0 * (x1 * (3.0 - (x2 * -2.0)))))));
} else if (x1 <= 2.45e+144) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) tmp = 0 if x1 <= -4.4e+153: tmp = t_0 elif x1 <= -2.45e+63: tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))) elif x1 <= -2.6e-225: tmp = t_1 elif x1 <= 3.65e-243: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (3.0 * (x1 * (3.0 - (x2 * -2.0))))))) elif x1 <= 2.45e+144: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))))) tmp = 0.0 if (x1 <= -4.4e+153) tmp = t_0; elseif (x1 <= -2.45e+63) tmp = Float64(x1 + Float64(x1 - Float64(3.0 * Float64(Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)) - Float64(x2 * -2.0))))); elseif (x1 <= -2.6e-225) tmp = t_1; elseif (x1 <= 3.65e-243) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))))))); elseif (x1 <= 2.45e+144) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))))); tmp = 0.0; if (x1 <= -4.4e+153) tmp = t_0; elseif (x1 <= -2.45e+63) tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))); elseif (x1 <= -2.6e-225) tmp = t_1; elseif (x1 <= 3.65e-243) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (3.0 * (x1 * (3.0 - (x2 * -2.0))))))); elseif (x1 <= 2.45e+144) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], t$95$0, If[LessEqual[x1, -2.45e+63], N[(x1 + N[(x1 - N[(3.0 * N[(N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.6e-225], t$95$1, If[LessEqual[x1, 3.65e-243], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.45e+144], t$95$1, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -2.45 \cdot 10^{+63}:\\
\;\;\;\;x1 + \left(x1 - 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right) - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq -2.6 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 3.65 \cdot 10^{-243}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.45 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153 or 2.45e144 < x1 Initial program 1.4%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -4.3999999999999999e153 < x1 < -2.4499999999999998e63Initial program 30.6%
Taylor expanded in x1 around 0 15.6%
Taylor expanded in x1 around 0 25.7%
Taylor expanded in x2 around 0 56.5%
if -2.4499999999999998e63 < x1 < -2.60000000000000013e-225 or 3.6500000000000001e-243 < x1 < 2.45e144Initial program 98.6%
Taylor expanded in x1 around 0 75.6%
Taylor expanded in x1 around 0 75.1%
Taylor expanded in x1 around 0 74.6%
if -2.60000000000000013e-225 < x1 < 3.6500000000000001e-243Initial program 99.8%
Taylor expanded in x1 around 0 69.7%
Taylor expanded in x1 around 0 69.7%
Taylor expanded in x2 around 0 96.4%
Taylor expanded in x1 around 0 96.4%
Final simplification82.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1
(+
x1
(- (* x2 -6.0) (* x1 (- 2.0 (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))))))))
(t_2
(+
x1
(- (* x2 -6.0) (* x1 (+ 2.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))))))
(if (<= x1 -4.4e+153)
t_0
(if (<= x1 -5.2e+64)
t_1
(if (<= x1 -2.2e-225)
t_2
(if (<= x1 1.9e-242) t_1 (if (<= x1 2.45e+144) t_2 t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 - (3.0 * (x1 * (3.0 - (x2 * -2.0)))))));
double t_2 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_0;
} else if (x1 <= -5.2e+64) {
tmp = t_1;
} else if (x1 <= -2.2e-225) {
tmp = t_2;
} else if (x1 <= 1.9e-242) {
tmp = t_1;
} else if (x1 <= 2.45e+144) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))))))
t_2 = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))))))
if (x1 <= (-4.4d+153)) then
tmp = t_0
else if (x1 <= (-5.2d+64)) then
tmp = t_1
else if (x1 <= (-2.2d-225)) then
tmp = t_2
else if (x1 <= 1.9d-242) then
tmp = t_1
else if (x1 <= 2.45d+144) then
tmp = t_2
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 - (3.0 * (x1 * (3.0 - (x2 * -2.0)))))));
double t_2 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_0;
} else if (x1 <= -5.2e+64) {
tmp = t_1;
} else if (x1 <= -2.2e-225) {
tmp = t_2;
} else if (x1 <= 1.9e-242) {
tmp = t_1;
} else if (x1 <= 2.45e+144) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 - (3.0 * (x1 * (3.0 - (x2 * -2.0))))))) t_2 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) tmp = 0 if x1 <= -4.4e+153: tmp = t_0 elif x1 <= -5.2e+64: tmp = t_1 elif x1 <= -2.2e-225: tmp = t_2 elif x1 <= 1.9e-242: tmp = t_1 elif x1 <= 2.45e+144: tmp = t_2 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))))))) t_2 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))))) tmp = 0.0 if (x1 <= -4.4e+153) tmp = t_0; elseif (x1 <= -5.2e+64) tmp = t_1; elseif (x1 <= -2.2e-225) tmp = t_2; elseif (x1 <= 1.9e-242) tmp = t_1; elseif (x1 <= 2.45e+144) tmp = t_2; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 - (3.0 * (x1 * (3.0 - (x2 * -2.0))))))); t_2 = x1 + ((x2 * -6.0) - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))))); tmp = 0.0; if (x1 <= -4.4e+153) tmp = t_0; elseif (x1 <= -5.2e+64) tmp = t_1; elseif (x1 <= -2.2e-225) tmp = t_2; elseif (x1 <= 1.9e-242) tmp = t_1; elseif (x1 <= 2.45e+144) tmp = t_2; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], t$95$0, If[LessEqual[x1, -5.2e+64], t$95$1, If[LessEqual[x1, -2.2e-225], t$95$2, If[LessEqual[x1, 1.9e-242], t$95$1, If[LessEqual[x1, 2.45e+144], t$95$2, t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\\
t_2 := x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -5.2 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -2.2 \cdot 10^{-225}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq 1.9 \cdot 10^{-242}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 2.45 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153 or 2.45e144 < x1 Initial program 1.4%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -4.3999999999999999e153 < x1 < -5.19999999999999994e64 or -2.2e-225 < x1 < 1.9000000000000001e-242Initial program 76.7%
Taylor expanded in x1 around 0 51.7%
Taylor expanded in x1 around 0 55.1%
Taylor expanded in x2 around 0 83.1%
Taylor expanded in x1 around 0 83.1%
if -5.19999999999999994e64 < x1 < -2.2e-225 or 1.9000000000000001e-242 < x1 < 2.45e144Initial program 98.6%
Taylor expanded in x1 around 0 75.6%
Taylor expanded in x1 around 0 75.1%
Taylor expanded in x1 around 0 74.6%
Final simplification82.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -4.4e+153)
t_0
(if (<= x1 -9.8e+63)
(+
x1
(-
x1
(* 3.0 (- (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0)) (* x2 -2.0)))))
(if (<= x1 2.45e+144)
(+
x1
(+
x1
(+ (* x1 -3.0) (* x2 (- (+ (* x1 -12.0) (* (* x1 x2) 8.0)) 6.0)))))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_0;
} else if (x1 <= -9.8e+63) {
tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= 2.45e+144) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-4.4d+153)) then
tmp = t_0
else if (x1 <= (-9.8d+63)) then
tmp = x1 + (x1 - (3.0d0 * ((x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))) - (x2 * (-2.0d0)))))
else if (x1 <= 2.45d+144) then
tmp = x1 + (x1 + ((x1 * (-3.0d0)) + (x2 * (((x1 * (-12.0d0)) + ((x1 * x2) * 8.0d0)) - 6.0d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_0;
} else if (x1 <= -9.8e+63) {
tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= 2.45e+144) {
tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -4.4e+153: tmp = t_0 elif x1 <= -9.8e+63: tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))) elif x1 <= 2.45e+144: tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0)))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -4.4e+153) tmp = t_0; elseif (x1 <= -9.8e+63) tmp = Float64(x1 + Float64(x1 - Float64(3.0 * Float64(Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)) - Float64(x2 * -2.0))))); elseif (x1 <= 2.45e+144) tmp = Float64(x1 + Float64(x1 + Float64(Float64(x1 * -3.0) + Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(Float64(x1 * x2) * 8.0)) - 6.0))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -4.4e+153) tmp = t_0; elseif (x1 <= -9.8e+63) tmp = x1 + (x1 - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))); elseif (x1 <= 2.45e+144) tmp = x1 + (x1 + ((x1 * -3.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0)))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], t$95$0, If[LessEqual[x1, -9.8e+63], N[(x1 + N[(x1 - N[(3.0 * N[(N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.45e+144], N[(x1 + N[(x1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(N[(x1 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -9.8 \cdot 10^{+63}:\\
\;\;\;\;x1 + \left(x1 - 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right) - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 2.45 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(x1 + \left(x1 \cdot -3 + x2 \cdot \left(\left(x1 \cdot -12 + \left(x1 \cdot x2\right) \cdot 8\right) - 6\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153 or 2.45e144 < x1 Initial program 1.4%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 98.7%
if -4.3999999999999999e153 < x1 < -9.7999999999999994e63Initial program 30.6%
Taylor expanded in x1 around 0 15.6%
Taylor expanded in x1 around 0 25.7%
Taylor expanded in x2 around 0 56.5%
if -9.7999999999999994e63 < x1 < 2.45e144Initial program 98.8%
Taylor expanded in x1 around 0 74.7%
Taylor expanded in x1 around 0 74.2%
Taylor expanded in x1 around 0 74.1%
fma-define74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in x2 around 0 81.9%
Final simplification85.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- x1 (* x1 (+ 2.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -1.36e+107)
t_1
(if (<= x1 -3.3e-119)
t_0
(if (<= x1 2.75e-70)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 2.45e+144) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -1.36e+107) {
tmp = t_1;
} else if (x1 <= -3.3e-119) {
tmp = t_0;
} else if (x1 <= 2.75e-70) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 2.45e+144) {
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 = x1 - (x1 * (2.0d0 + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-1.36d+107)) then
tmp = t_1
else if (x1 <= (-3.3d-119)) then
tmp = t_0
else if (x1 <= 2.75d-70) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 2.45d+144) 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 = x1 - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -1.36e+107) {
tmp = t_1;
} else if (x1 <= -3.3e-119) {
tmp = t_0;
} else if (x1 <= 2.75e-70) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 2.45e+144) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -1.36e+107: tmp = t_1 elif x1 <= -3.3e-119: tmp = t_0 elif x1 <= 2.75e-70: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 2.45e+144: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 - Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -1.36e+107) tmp = t_1; elseif (x1 <= -3.3e-119) tmp = t_0; elseif (x1 <= 2.75e-70) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 2.45e+144) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -1.36e+107) tmp = t_1; elseif (x1 <= -3.3e-119) tmp = t_0; elseif (x1 <= 2.75e-70) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 2.45e+144) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 - N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.36e+107], t$95$1, If[LessEqual[x1, -3.3e-119], t$95$0, If[LessEqual[x1, 2.75e-70], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.45e+144], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 - x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.36 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -3.3 \cdot 10^{-119}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 2.75 \cdot 10^{-70}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 2.45 \cdot 10^{+144}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -1.35999999999999998e107 or 2.45e144 < x1 Initial program 1.3%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 55.3%
Taylor expanded in x2 around 0 88.5%
if -1.35999999999999998e107 < x1 < -3.30000000000000008e-119 or 2.75e-70 < x1 < 2.45e144Initial program 98.1%
Taylor expanded in x1 around 0 63.2%
Taylor expanded in x1 around 0 62.4%
Taylor expanded in x1 around 0 62.1%
fma-define62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in x1 around inf 52.9%
if -3.30000000000000008e-119 < x1 < 2.75e-70Initial program 99.5%
Taylor expanded in x1 around 0 84.6%
Taylor expanded in x1 around 0 84.6%
Taylor expanded in x2 around 0 83.3%
Taylor expanded in x1 around 0 83.7%
Final simplification74.9%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -2.8e+48) (- x1 (* x1 (+ 2.0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))) (+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* 3.0 (* x1 (- 3.0 (* x2 -2.0))))))))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -2.8e+48) {
tmp = x1 - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (3.0 * (x1 * (3.0 - (x2 * -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 <= (-2.8d+48)) then
tmp = x1 - (x1 * (2.0d0 + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -2.8e+48) {
tmp = x1 - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2))))));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (3.0 * (x1 * (3.0 - (x2 * -2.0)))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -2.8e+48: tmp = x1 - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (3.0 * (x1 * (3.0 - (x2 * -2.0))))))) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -2.8e+48) tmp = Float64(x1 - Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -2.8e+48) tmp = x1 - (x1 * (2.0 + (4.0 * (x2 * (3.0 - (2.0 * x2)))))); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (3.0 * (x1 * (3.0 - (x2 * -2.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -2.8e+48], N[(x1 - N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -2.8 \cdot 10^{+48}:\\
\;\;\;\;x1 - x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x2 < -2.80000000000000012e48Initial program 68.9%
Taylor expanded in x1 around 0 48.6%
Taylor expanded in x1 around 0 46.3%
Taylor expanded in x1 around 0 60.5%
fma-define60.5%
*-commutative60.5%
Simplified60.5%
Taylor expanded in x1 around inf 55.8%
if -2.80000000000000012e48 < x2 Initial program 68.2%
Taylor expanded in x1 around 0 51.5%
Taylor expanded in x1 around 0 72.3%
Taylor expanded in x2 around 0 74.1%
Taylor expanded in x1 around 0 74.4%
Final simplification71.4%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -9.2e+60) (not (<= x1 1.25e-23))) (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))) (+ x1 (+ (* x2 -6.0) (* x1 -2.0)))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -9.2e+60) || !(x1 <= 1.25e-23)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-9.2d+60)) .or. (.not. (x1 <= 1.25d-23))) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -9.2e+60) || !(x1 <= 1.25e-23)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -9.2e+60) or not (x1 <= 1.25e-23): tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) else: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -9.2e+60) || !(x1 <= 1.25e-23)) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -9.2e+60) || ~((x1 <= 1.25e-23))) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); else tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -9.2e+60], N[Not[LessEqual[x1, 1.25e-23]], $MachinePrecision]], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -9.2 \cdot 10^{+60} \lor \neg \left(x1 \leq 1.25 \cdot 10^{-23}\right):\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\end{array}
\end{array}
if x1 < -9.20000000000000068e60 or 1.2500000000000001e-23 < x1 Initial program 31.4%
Taylor expanded in x1 around 0 11.4%
Taylor expanded in x1 around 0 49.2%
Taylor expanded in x2 around 0 63.6%
if -9.20000000000000068e60 < x1 < 1.2500000000000001e-23Initial program 99.4%
Taylor expanded in x1 around 0 84.3%
Taylor expanded in x1 around 0 83.8%
Taylor expanded in x2 around 0 70.3%
Taylor expanded in x1 around 0 69.8%
Final simplification67.0%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -2.1e-164) (not (<= x2 9.5e-218))) (* x2 (- (/ x1 x2) 6.0)) (+ x1 (* x1 -2.0))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -2.1e-164) || !(x2 <= 9.5e-218)) {
tmp = x2 * ((x1 / 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 <= (-2.1d-164)) .or. (.not. (x2 <= 9.5d-218))) then
tmp = x2 * ((x1 / 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 <= -2.1e-164) || !(x2 <= 9.5e-218)) {
tmp = x2 * ((x1 / x2) - 6.0);
} else {
tmp = x1 + (x1 * -2.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -2.1e-164) or not (x2 <= 9.5e-218): tmp = x2 * ((x1 / x2) - 6.0) else: tmp = x1 + (x1 * -2.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -2.1e-164) || !(x2 <= 9.5e-218)) tmp = Float64(x2 * Float64(Float64(x1 / 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 <= -2.1e-164) || ~((x2 <= 9.5e-218))) tmp = x2 * ((x1 / x2) - 6.0); else tmp = x1 + (x1 * -2.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -2.1e-164], N[Not[LessEqual[x2, 9.5e-218]], $MachinePrecision]], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -2.1 \cdot 10^{-164} \lor \neg \left(x2 \leq 9.5 \cdot 10^{-218}\right):\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\end{array}
\end{array}
if x2 < -2.0999999999999999e-164 or 9.49999999999999967e-218 < x2 Initial program 65.6%
Taylor expanded in x1 around 0 49.2%
Taylor expanded in x1 around 0 65.8%
Taylor expanded in x1 around 0 31.4%
Taylor expanded in x2 around inf 34.5%
if -2.0999999999999999e-164 < x2 < 9.49999999999999967e-218Initial program 81.1%
Taylor expanded in x1 around 0 59.7%
Taylor expanded in x1 around 0 78.1%
Taylor expanded in x1 around 0 59.7%
fma-define59.7%
*-commutative59.7%
Simplified59.7%
Taylor expanded in x2 around 0 53.7%
distribute-rgt1-in54.6%
metadata-eval54.6%
*-commutative54.6%
Simplified54.6%
Final simplification38.0%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -8.8e-103) (not (<= x2 3.15e-152))) (+ x1 (* x2 -6.0)) (+ x1 (* x1 -2.0))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -8.8e-103) || !(x2 <= 3.15e-152)) {
tmp = x1 + (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 <= (-8.8d-103)) .or. (.not. (x2 <= 3.15d-152))) then
tmp = x1 + (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 <= -8.8e-103) || !(x2 <= 3.15e-152)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = x1 + (x1 * -2.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -8.8e-103) or not (x2 <= 3.15e-152): tmp = x1 + (x2 * -6.0) else: tmp = x1 + (x1 * -2.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -8.8e-103) || !(x2 <= 3.15e-152)) tmp = Float64(x1 + 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 <= -8.8e-103) || ~((x2 <= 3.15e-152))) tmp = x1 + (x2 * -6.0); else tmp = x1 + (x1 * -2.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -8.8e-103], N[Not[LessEqual[x2, 3.15e-152]], $MachinePrecision]], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -8.8 \cdot 10^{-103} \lor \neg \left(x2 \leq 3.15 \cdot 10^{-152}\right):\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\end{array}
\end{array}
if x2 < -8.7999999999999997e-103 or 3.1500000000000002e-152 < x2 Initial program 65.9%
Taylor expanded in x1 around 0 49.6%
Taylor expanded in x1 around 0 63.9%
Taylor expanded in x1 around 0 32.6%
if -8.7999999999999997e-103 < x2 < 3.1500000000000002e-152Initial program 75.1%
Taylor expanded in x1 around 0 55.0%
Taylor expanded in x1 around 0 79.4%
Taylor expanded in x1 around 0 55.2%
fma-define55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in x2 around 0 45.4%
distribute-rgt1-in46.3%
metadata-eval46.3%
*-commutative46.3%
Simplified46.3%
Final simplification36.2%
(FPCore (x1 x2) :precision binary64 (if (<= x1 520000000.0) (+ x1 (+ (* x2 -6.0) (* x1 -2.0))) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 520000000.0) {
tmp = x1 + ((x2 * -6.0) + (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 <= 520000000.0d0) then
tmp = x1 + ((x2 * (-6.0d0)) + (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 <= 520000000.0) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 520000000.0: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 520000000.0) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + 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 <= 520000000.0) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 520000000.0], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 520000000:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 5.2e8Initial program 74.8%
Taylor expanded in x1 around 0 62.8%
Taylor expanded in x1 around 0 72.2%
Taylor expanded in x2 around 0 69.3%
Taylor expanded in x1 around 0 51.2%
if 5.2e8 < x1 Initial program 46.3%
Taylor expanded in x1 around 0 10.8%
Taylor expanded in x1 around 0 53.8%
Taylor expanded in x1 around 0 5.2%
Taylor expanded in x2 around inf 21.3%
Final simplification44.5%
(FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x2 * (-6.0d0))
end function
public static double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
def code(x1, x2): return x1 + (x2 * -6.0)
function code(x1, x2) return Float64(x1 + Float64(x2 * -6.0)) end
function tmp = code(x1, x2) tmp = x1 + (x2 * -6.0); end
code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + x2 \cdot -6
\end{array}
Initial program 68.3%
Taylor expanded in x1 around 0 51.0%
Taylor expanded in x1 around 0 68.0%
Taylor expanded in x1 around 0 27.1%
Final simplification27.1%
(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 68.3%
Taylor expanded in x1 around 0 51.0%
Taylor expanded in x1 around 0 68.0%
Taylor expanded in x1 around 0 27.1%
Taylor expanded in x1 around inf 3.1%
herbie shell --seed 2024103
(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))))))