
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 29 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma x1 (* x1 3.0) (* 2.0 x2)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- x1 t_0) (fma x1 x1 1.0)))
(t_3 (* 3.0 (* x1 x1)))
(t_4 (* x1 (* x1 3.0)))
(t_5 (/ (- (+ t_4 (* 2.0 x2)) x1) t_1))
(t_6 (/ (- t_0 x1) (fma x1 x1 1.0))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_5) (- t_5 3.0))
(* (* x1 x1) (- (* t_5 4.0) 6.0))))
(* t_4 t_5))
(* x1 (* x1 x1))))
(* 3.0 (/ (+ x1 (- (* 2.0 x2) t_4)) (- -1.0 (* x1 x1))))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_3 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_6 4.0 -6.0)) (* (* x1 (* 2.0 t_2)) (- t_2 -3.0)))
(fma t_3 t_6 (pow x1 3.0))))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = fma(x1, (x1 * 3.0), (2.0 * x2));
double t_1 = (x1 * x1) + 1.0;
double t_2 = (x1 - t_0) / fma(x1, x1, 1.0);
double t_3 = 3.0 * (x1 * x1);
double t_4 = x1 * (x1 * 3.0);
double t_5 = ((t_4 + (2.0 * x2)) - x1) / t_1;
double t_6 = (t_0 - x1) / fma(x1, x1, 1.0);
double tmp;
if ((x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))) + (t_4 * t_5)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 + ((2.0 * x2) - t_4)) / (-1.0 - (x1 * x1)))))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_3 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_6, 4.0, -6.0)), ((x1 * (2.0 * t_2)) * (t_2 - -3.0))), fma(t_3, t_6, pow(x1, 3.0)))));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
function code(x1, x2) t_0 = fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(x1 - t_0) / fma(x1, x1, 1.0)) t_3 = Float64(3.0 * Float64(x1 * x1)) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(Float64(Float64(t_4 + Float64(2.0 * x2)) - x1) / t_1) t_6 = Float64(Float64(t_0 - x1) / fma(x1, x1, 1.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)))) + Float64(t_4 * t_5)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x1 + Float64(Float64(2.0 * x2) - t_4)) / Float64(-1.0 - Float64(x1 * x1)))))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_3 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_6, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_2)) * Float64(t_2 - -3.0))), fma(t_3, t_6, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 - t$95$0), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$4 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(t$95$0 - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x1 + N[(N[(2.0 * x2), $MachinePrecision] - t$95$4), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$3 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$6 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 - -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * t$95$6 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{x1 - t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_3 := 3 \cdot \left(x1 \cdot x1\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := \frac{\left(t\_4 + 2 \cdot x2\right) - x1}{t\_1}\\
t_6 := \frac{t\_0 - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \left(t\_5 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right)\right) + t\_4 \cdot t\_5\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{x1 + \left(2 \cdot x2 - t\_4\right)}{-1 - x1 \cdot x1}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_3 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_6, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_2\right)\right) \cdot \left(t\_2 - -3\right)\right), \mathsf{fma}\left(t\_3, t\_6, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Simplified99.6%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (- -1.0 (* x1 x1)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (/ t_2 t_4))
(t_6 (* (* x1 2.0) t_5))
(t_7 (* (* x1 x1) (- (* t_5 4.0) 6.0))))
(if (<=
(+
x1
(+
(+ x1 (+ (+ (* t_4 (+ (* t_6 (- t_5 3.0)) t_7)) (* t_1 t_5)) t_0))
(* 3.0 (/ (+ x1 (- (* 2.0 x2) t_1)) t_3))))
INFINITY)
(+
x1
(+
(+
x1
(- t_0 (- (* t_4 (- (* t_6 (+ 3.0 (/ t_2 t_3))) t_7)) (* 3.0 t_1))))
(* 3.0 (- (* x2 -2.0) x1))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = -1.0 - (x1 * x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = t_2 / t_4;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = (x1 * x1) * ((t_5 * 4.0) - 6.0);
double tmp;
if ((x1 + ((x1 + (((t_4 * ((t_6 * (t_5 - 3.0)) + t_7)) + (t_1 * t_5)) + t_0)) + (3.0 * ((x1 + ((2.0 * x2) - t_1)) / t_3)))) <= ((double) INFINITY)) {
tmp = x1 + ((x1 + (t_0 - ((t_4 * ((t_6 * (3.0 + (t_2 / t_3))) - t_7)) - (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = -1.0 - (x1 * x1);
double t_4 = (x1 * x1) + 1.0;
double t_5 = t_2 / t_4;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = (x1 * x1) * ((t_5 * 4.0) - 6.0);
double tmp;
if ((x1 + ((x1 + (((t_4 * ((t_6 * (t_5 - 3.0)) + t_7)) + (t_1 * t_5)) + t_0)) + (3.0 * ((x1 + ((2.0 * x2) - t_1)) / t_3)))) <= Double.POSITIVE_INFINITY) {
tmp = x1 + ((x1 + (t_0 - ((t_4 * ((t_6 * (3.0 + (t_2 / t_3))) - t_7)) - (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + (6.0 * Math.pow(x1, 4.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (t_1 + (2.0 * x2)) - x1 t_3 = -1.0 - (x1 * x1) t_4 = (x1 * x1) + 1.0 t_5 = t_2 / t_4 t_6 = (x1 * 2.0) * t_5 t_7 = (x1 * x1) * ((t_5 * 4.0) - 6.0) tmp = 0 if (x1 + ((x1 + (((t_4 * ((t_6 * (t_5 - 3.0)) + t_7)) + (t_1 * t_5)) + t_0)) + (3.0 * ((x1 + ((2.0 * x2) - t_1)) / t_3)))) <= math.inf: tmp = x1 + ((x1 + (t_0 - ((t_4 * ((t_6 * (3.0 + (t_2 / t_3))) - t_7)) - (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1))) else: tmp = x1 + (6.0 * math.pow(x1, 4.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(-1.0 - Float64(x1 * x1)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(t_2 / t_4) t_6 = Float64(Float64(x1 * 2.0) * t_5) t_7 = Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_4 * Float64(Float64(t_6 * Float64(t_5 - 3.0)) + t_7)) + Float64(t_1 * t_5)) + t_0)) + Float64(3.0 * Float64(Float64(x1 + Float64(Float64(2.0 * x2) - t_1)) / t_3)))) <= Inf) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_0 - Float64(Float64(t_4 * Float64(Float64(t_6 * Float64(3.0 + Float64(t_2 / t_3))) - t_7)) - Float64(3.0 * t_1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (t_1 + (2.0 * x2)) - x1; t_3 = -1.0 - (x1 * x1); t_4 = (x1 * x1) + 1.0; t_5 = t_2 / t_4; t_6 = (x1 * 2.0) * t_5; t_7 = (x1 * x1) * ((t_5 * 4.0) - 6.0); tmp = 0.0; if ((x1 + ((x1 + (((t_4 * ((t_6 * (t_5 - 3.0)) + t_7)) + (t_1 * t_5)) + t_0)) + (3.0 * ((x1 + ((2.0 * x2) - t_1)) / t_3)))) <= Inf) tmp = x1 + ((x1 + (t_0 - ((t_4 * ((t_6 * (3.0 + (t_2 / t_3))) - t_7)) - (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1))); else tmp = x1 + (6.0 * (x1 ^ 4.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$4 * N[(N[(t$95$6 * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$7), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$5), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x1 + N[(N[(2.0 * x2), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(x1 + N[(t$95$0 - N[(N[(t$95$4 * N[(N[(t$95$6 * N[(3.0 + N[(t$95$2 / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$7), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := -1 - x1 \cdot x1\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \frac{t\_2}{t\_4}\\
t_6 := \left(x1 \cdot 2\right) \cdot t\_5\\
t_7 := \left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_4 \cdot \left(t\_6 \cdot \left(t\_5 - 3\right) + t\_7\right) + t\_1 \cdot t\_5\right) + t\_0\right)\right) + 3 \cdot \frac{x1 + \left(2 \cdot x2 - t\_1\right)}{t\_3}\right) \leq \infty:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_0 - \left(t\_4 \cdot \left(t\_6 \cdot \left(3 + \frac{t\_2}{t\_3}\right) - t\_7\right) - 3 \cdot t\_1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around 0 99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (* 2.0 x2) 3.0))
(t_2 (- (+ t_0 (* 2.0 x2)) x1))
(t_3 (* x2 (- 3.0 (* 2.0 x2))))
(t_4 (* 3.0 (- (* x2 -2.0) x1)))
(t_5 (+ (* x1 x1) 1.0))
(t_6 (* 4.0 t_3))
(t_7 (/ t_2 t_5)))
(if (<= x1 -5.5e+102)
(+
x1
(+
t_4
(-
x1
(*
x1
(+
(*
x1
(-
(+
(* 2.0 (- t_1 (* x2 -2.0)))
(-
(*
x1
(+
3.0
(-
t_6
(*
2.0
(+
(+ 1.0 (+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_1)))
(* 2.0 t_3))))))
(* x2 8.0)))
3.0))
t_6)))))
(if (<= x1 2.5e+152)
(+
x1
(+
(+
x1
(-
(* x1 (* x1 x1))
(-
(*
t_5
(-
(* (* (* x1 2.0) t_7) (+ 3.0 (/ t_2 (- -1.0 (* x1 x1)))))
(* (* x1 x1) (- (* t_7 4.0) 6.0))))
(* 3.0 t_0))))
t_4))
(-
x1
(+ (* 3.0 (- x1 (* x2 -2.0))) (- (* x1 (- t_6 (* x1 9.0))) x1)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = (t_0 + (2.0 * x2)) - x1;
double t_3 = x2 * (3.0 - (2.0 * x2));
double t_4 = 3.0 * ((x2 * -2.0) - x1);
double t_5 = (x1 * x1) + 1.0;
double t_6 = 4.0 * t_3;
double t_7 = t_2 / t_5;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + (t_4 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) + ((x1 * (3.0 + (t_6 - (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1))) + (2.0 * t_3)))))) - (x2 * 8.0))) - 3.0)) + t_6))));
} else if (x1 <= 2.5e+152) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_5 * ((((x1 * 2.0) * t_7) * (3.0 + (t_2 / (-1.0 - (x1 * x1))))) - ((x1 * x1) * ((t_7 * 4.0) - 6.0)))) - (3.0 * t_0)))) + t_4);
} else {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * (t_6 - (x1 * 9.0))) - x1));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: 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)
t_1 = (2.0d0 * x2) - 3.0d0
t_2 = (t_0 + (2.0d0 * x2)) - x1
t_3 = x2 * (3.0d0 - (2.0d0 * x2))
t_4 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_5 = (x1 * x1) + 1.0d0
t_6 = 4.0d0 * t_3
t_7 = t_2 / t_5
if (x1 <= (-5.5d+102)) then
tmp = x1 + (t_4 + (x1 - (x1 * ((x1 * (((2.0d0 * (t_1 - (x2 * (-2.0d0)))) + ((x1 * (3.0d0 + (t_6 - (2.0d0 * ((1.0d0 + ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_1))) + (2.0d0 * t_3)))))) - (x2 * 8.0d0))) - 3.0d0)) + t_6))))
else if (x1 <= 2.5d+152) then
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_5 * ((((x1 * 2.0d0) * t_7) * (3.0d0 + (t_2 / ((-1.0d0) - (x1 * x1))))) - ((x1 * x1) * ((t_7 * 4.0d0) - 6.0d0)))) - (3.0d0 * t_0)))) + t_4)
else
tmp = x1 - ((3.0d0 * (x1 - (x2 * (-2.0d0)))) + ((x1 * (t_6 - (x1 * 9.0d0))) - x1))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = (t_0 + (2.0 * x2)) - x1;
double t_3 = x2 * (3.0 - (2.0 * x2));
double t_4 = 3.0 * ((x2 * -2.0) - x1);
double t_5 = (x1 * x1) + 1.0;
double t_6 = 4.0 * t_3;
double t_7 = t_2 / t_5;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + (t_4 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) + ((x1 * (3.0 + (t_6 - (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1))) + (2.0 * t_3)))))) - (x2 * 8.0))) - 3.0)) + t_6))));
} else if (x1 <= 2.5e+152) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_5 * ((((x1 * 2.0) * t_7) * (3.0 + (t_2 / (-1.0 - (x1 * x1))))) - ((x1 * x1) * ((t_7 * 4.0) - 6.0)))) - (3.0 * t_0)))) + t_4);
} else {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * (t_6 - (x1 * 9.0))) - x1));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (2.0 * x2) - 3.0 t_2 = (t_0 + (2.0 * x2)) - x1 t_3 = x2 * (3.0 - (2.0 * x2)) t_4 = 3.0 * ((x2 * -2.0) - x1) t_5 = (x1 * x1) + 1.0 t_6 = 4.0 * t_3 t_7 = t_2 / t_5 tmp = 0 if x1 <= -5.5e+102: tmp = x1 + (t_4 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) + ((x1 * (3.0 + (t_6 - (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1))) + (2.0 * t_3)))))) - (x2 * 8.0))) - 3.0)) + t_6)))) elif x1 <= 2.5e+152: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_5 * ((((x1 * 2.0) * t_7) * (3.0 + (t_2 / (-1.0 - (x1 * x1))))) - ((x1 * x1) * ((t_7 * 4.0) - 6.0)))) - (3.0 * t_0)))) + t_4) else: tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * (t_6 - (x1 * 9.0))) - x1)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(2.0 * x2) - 3.0) t_2 = Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) t_3 = Float64(x2 * Float64(3.0 - Float64(2.0 * x2))) t_4 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_5 = Float64(Float64(x1 * x1) + 1.0) t_6 = Float64(4.0 * t_3) t_7 = Float64(t_2 / t_5) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(t_4 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(t_1 - Float64(x2 * -2.0))) + Float64(Float64(x1 * Float64(3.0 + Float64(t_6 - Float64(2.0 * Float64(Float64(1.0 + Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_1))) + Float64(2.0 * t_3)))))) - Float64(x2 * 8.0))) - 3.0)) + t_6))))); elseif (x1 <= 2.5e+152) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_5 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_7) * Float64(3.0 + Float64(t_2 / Float64(-1.0 - Float64(x1 * x1))))) - Float64(Float64(x1 * x1) * Float64(Float64(t_7 * 4.0) - 6.0)))) - Float64(3.0 * t_0)))) + t_4)); else tmp = Float64(x1 - Float64(Float64(3.0 * Float64(x1 - Float64(x2 * -2.0))) + Float64(Float64(x1 * Float64(t_6 - Float64(x1 * 9.0))) - x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (2.0 * x2) - 3.0; t_2 = (t_0 + (2.0 * x2)) - x1; t_3 = x2 * (3.0 - (2.0 * x2)); t_4 = 3.0 * ((x2 * -2.0) - x1); t_5 = (x1 * x1) + 1.0; t_6 = 4.0 * t_3; t_7 = t_2 / t_5; tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 + (t_4 + (x1 - (x1 * ((x1 * (((2.0 * (t_1 - (x2 * -2.0))) + ((x1 * (3.0 + (t_6 - (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_1))) + (2.0 * t_3)))))) - (x2 * 8.0))) - 3.0)) + t_6)))); elseif (x1 <= 2.5e+152) tmp = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_5 * ((((x1 * 2.0) * t_7) * (3.0 + (t_2 / (-1.0 - (x1 * x1))))) - ((x1 * x1) * ((t_7 * 4.0) - 6.0)))) - (3.0 * t_0)))) + t_4); else tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * (t_6 - (x1 * 9.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[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$6 = N[(4.0 * t$95$3), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$2 / t$95$5), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(t$95$4 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(t$95$1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(3.0 + N[(t$95$6 - N[(2.0 * N[(N[(1.0 + N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.5e+152], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$5 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$7), $MachinePrecision] * N[(3.0 + N[(t$95$2 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$7 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(3.0 * N[(x1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(t$95$6 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 2 \cdot x2 - 3\\
t_2 := \left(t\_0 + 2 \cdot x2\right) - x1\\
t_3 := x2 \cdot \left(3 - 2 \cdot x2\right)\\
t_4 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_5 := x1 \cdot x1 + 1\\
t_6 := 4 \cdot t\_3\\
t_7 := \frac{t\_2}{t\_5}\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(t\_1 - x2 \cdot -2\right) + \left(x1 \cdot \left(3 + \left(t\_6 - 2 \cdot \left(\left(1 + \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_1\right)\right) + 2 \cdot t\_3\right)\right)\right) - x2 \cdot 8\right)\right) - 3\right) + t\_6\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.5 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_5 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_7\right) \cdot \left(3 + \frac{t\_2}{-1 - x1 \cdot x1}\right) - \left(x1 \cdot x1\right) \cdot \left(t\_7 \cdot 4 - 6\right)\right) - 3 \cdot t\_0\right)\right)\right) + t\_4\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(3 \cdot \left(x1 - x2 \cdot -2\right) + \left(x1 \cdot \left(t\_6 - x1 \cdot 9\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
if -5.49999999999999981e102 < x1 < 2.5e152Initial program 99.4%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around 0 99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
if 2.5e152 < x1 Initial program 5.6%
Taylor expanded in x1 around inf 5.6%
Taylor expanded in x1 around 0 5.6%
neg-mul-15.6%
unsub-neg5.6%
*-commutative5.6%
Simplified5.6%
Taylor expanded in x1 around 0 97.7%
Taylor expanded in x2 around 0 100.0%
Final simplification96.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* 4.0 (* x2 t_0)))
(t_2 (* 3.0 (- (* x2 -2.0) x1)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (- 3.0 (* 2.0 x2)))
(t_5 (* x1 (* x1 3.0)))
(t_6 (/ (- (+ t_5 (* 2.0 x2)) x1) t_3)))
(if (<= x1 -5.5e+102)
(+
x1
(+
t_2
(+
x1
(*
x1
(+
t_1
(*
x1
(+
3.0
(+
(* 2.0 (+ (* x2 -2.0) t_4))
(+
(* x2 8.0)
(*
x1
(-
(+
t_1
(*
2.0
(+
(+ 1.0 (+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_0)))
(* 2.0 (* x2 t_4)))))
3.0)))))))))))
(if (<= x1 2.5e+152)
(+
x1
(+
(* 3.0 (/ (- (- t_5 (* 2.0 x2)) x1) t_3))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_5)
(*
t_3
(- (* (* x1 x1) 6.0) (* (* (* x1 2.0) t_6) (- 3.0 t_6)))))))))
(+ x1 (+ t_2 (+ x1 (* x1 (+ t_1 (* x1 9.0))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (x2 * t_0);
double t_2 = 3.0 * ((x2 * -2.0) - x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 - (2.0 * x2);
double t_5 = x1 * (x1 * 3.0);
double t_6 = ((t_5 + (2.0 * x2)) - x1) / t_3;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * (3.0 + ((2.0 * ((x2 * -2.0) + t_4)) + ((x2 * 8.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_4))))) - 3.0))))))))));
} else if (x1 <= 2.5e+152) {
tmp = x1 + ((3.0 * (((t_5 - (2.0 * x2)) - x1) / t_3)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_5) + (t_3 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_6) * (3.0 - t_6))))))));
} else {
tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * 9.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = 4.0d0 * (x2 * t_0)
t_2 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_3 = (x1 * x1) + 1.0d0
t_4 = 3.0d0 - (2.0d0 * x2)
t_5 = x1 * (x1 * 3.0d0)
t_6 = ((t_5 + (2.0d0 * x2)) - x1) / t_3
if (x1 <= (-5.5d+102)) then
tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * (3.0d0 + ((2.0d0 * ((x2 * (-2.0d0)) + t_4)) + ((x2 * 8.0d0) + (x1 * ((t_1 + (2.0d0 * ((1.0d0 + ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_0))) + (2.0d0 * (x2 * t_4))))) - 3.0d0))))))))))
else if (x1 <= 2.5d+152) then
tmp = x1 + ((3.0d0 * (((t_5 - (2.0d0 * x2)) - x1) / t_3)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_5) + (t_3 * (((x1 * x1) * 6.0d0) - (((x1 * 2.0d0) * t_6) * (3.0d0 - t_6))))))))
else
tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * 9.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (x2 * t_0);
double t_2 = 3.0 * ((x2 * -2.0) - x1);
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 - (2.0 * x2);
double t_5 = x1 * (x1 * 3.0);
double t_6 = ((t_5 + (2.0 * x2)) - x1) / t_3;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * (3.0 + ((2.0 * ((x2 * -2.0) + t_4)) + ((x2 * 8.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_4))))) - 3.0))))))))));
} else if (x1 <= 2.5e+152) {
tmp = x1 + ((3.0 * (((t_5 - (2.0 * x2)) - x1) / t_3)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_5) + (t_3 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_6) * (3.0 - t_6))))))));
} else {
tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * 9.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = 4.0 * (x2 * t_0) t_2 = 3.0 * ((x2 * -2.0) - x1) t_3 = (x1 * x1) + 1.0 t_4 = 3.0 - (2.0 * x2) t_5 = x1 * (x1 * 3.0) t_6 = ((t_5 + (2.0 * x2)) - x1) / t_3 tmp = 0 if x1 <= -5.5e+102: tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * (3.0 + ((2.0 * ((x2 * -2.0) + t_4)) + ((x2 * 8.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_4))))) - 3.0)))))))))) elif x1 <= 2.5e+152: tmp = x1 + ((3.0 * (((t_5 - (2.0 * x2)) - x1) / t_3)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_5) + (t_3 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_6) * (3.0 - t_6)))))))) else: tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * 9.0))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(4.0 * Float64(x2 * t_0)) t_2 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(3.0 - Float64(2.0 * x2)) t_5 = Float64(x1 * Float64(x1 * 3.0)) t_6 = Float64(Float64(Float64(t_5 + Float64(2.0 * x2)) - x1) / t_3) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(3.0 + Float64(Float64(2.0 * Float64(Float64(x2 * -2.0) + t_4)) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(2.0 * Float64(Float64(1.0 + Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_0))) + Float64(2.0 * Float64(x2 * t_4))))) - 3.0))))))))))); elseif (x1 <= 2.5e+152) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_5 - Float64(2.0 * x2)) - x1) / t_3)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_5) + Float64(t_3 * Float64(Float64(Float64(x1 * x1) * 6.0) - Float64(Float64(Float64(x1 * 2.0) * t_6) * Float64(3.0 - t_6))))))))); else tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * 9.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = 4.0 * (x2 * t_0); t_2 = 3.0 * ((x2 * -2.0) - x1); t_3 = (x1 * x1) + 1.0; t_4 = 3.0 - (2.0 * x2); t_5 = x1 * (x1 * 3.0); t_6 = ((t_5 + (2.0 * x2)) - x1) / t_3; tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * (3.0 + ((2.0 * ((x2 * -2.0) + t_4)) + ((x2 * 8.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_4))))) - 3.0)))))))))); elseif (x1 <= 2.5e+152) tmp = x1 + ((3.0 * (((t_5 - (2.0 * x2)) - x1) / t_3)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_5) + (t_3 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_6) * (3.0 - t_6)))))))); else tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * 9.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$5 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(t$95$2 + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(3.0 + N[(N[(2.0 * N[(N[(x2 * -2.0), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(2.0 * N[(N[(1.0 + N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(x2 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.5e+152], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$5 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$5), $MachinePrecision] + N[(t$95$3 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] - N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * N[(3.0 - t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$2 + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := 4 \cdot \left(x2 \cdot t\_0\right)\\
t_2 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_3 := x1 \cdot x1 + 1\\
t_4 := 3 - 2 \cdot x2\\
t_5 := x1 \cdot \left(x1 \cdot 3\right)\\
t_6 := \frac{\left(t\_5 + 2 \cdot x2\right) - x1}{t\_3}\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(3 + \left(2 \cdot \left(x2 \cdot -2 + t\_4\right) + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + 2 \cdot \left(\left(1 + \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_0\right)\right) + 2 \cdot \left(x2 \cdot t\_4\right)\right)\right) - 3\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.5 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_5 - 2 \cdot x2\right) - x1}{t\_3} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_5 + t\_3 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 - \left(\left(x1 \cdot 2\right) \cdot t\_6\right) \cdot \left(3 - t\_6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot 9\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
if -5.49999999999999981e102 < x1 < 2.5e152Initial program 99.4%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around inf 97.7%
if 2.5e152 < x1 Initial program 5.6%
Taylor expanded in x1 around inf 5.6%
Taylor expanded in x1 around 0 5.6%
neg-mul-15.6%
unsub-neg5.6%
*-commutative5.6%
Simplified5.6%
Taylor expanded in x1 around 0 97.7%
Taylor expanded in x2 around 0 100.0%
Final simplification94.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* 3.0 (- (* x2 -2.0) x1)))
(t_3 (* x1 (* x1 x1)))
(t_4 (* x1 (* x1 3.0)))
(t_5 (/ (- (+ t_4 (* 2.0 x2)) x1) t_1))
(t_6 (* (* x1 2.0) t_5))
(t_7 (* 3.0 t_4)))
(if (<= x1 -5.5e+102)
(-
x1
(+
(* x2 (- 6.0 (* -3.0 (/ x1 x2))))
(-
(*
x1
(-
(* 4.0 (* x2 (- 3.0 (* 2.0 x2))))
(* x1 (+ 3.0 (- (* x2 8.0) (* 2.0 (- t_0 (* x2 -2.0))))))))
x1)))
(if (<= x1 -0.106)
(+
x1
(+
(+
x1
(+ t_3 (+ t_7 (* t_1 (- (* (* x1 x1) 6.0) (* t_6 (- 3.0 t_5)))))))
(* 3.0 (* x2 -2.0))))
(if (<= x1 7.5e+138)
(+
x1
(+
t_2
(+
x1
(+
t_3
(+
t_7
(* t_1 (+ (* (* x1 x1) (- (* t_5 4.0) 6.0)) (* t_6 t_0))))))))
(+ x1 (+ t_2 (+ x1 (* x1 (+ (* 4.0 (* x2 t_0)) (* x1 9.0)))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * ((x2 * -2.0) - x1);
double t_3 = x1 * (x1 * x1);
double t_4 = x1 * (x1 * 3.0);
double t_5 = ((t_4 + (2.0 * x2)) - x1) / t_1;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = 3.0 * t_4;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1));
} else if (x1 <= -0.106) {
tmp = x1 + ((x1 + (t_3 + (t_7 + (t_1 * (((x1 * x1) * 6.0) - (t_6 * (3.0 - t_5))))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 7.5e+138) {
tmp = x1 + (t_2 + (x1 + (t_3 + (t_7 + (t_1 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * t_0)))))));
} else {
tmp = x1 + (t_2 + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.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 = (2.0d0 * x2) - 3.0d0
t_1 = (x1 * x1) + 1.0d0
t_2 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_3 = x1 * (x1 * x1)
t_4 = x1 * (x1 * 3.0d0)
t_5 = ((t_4 + (2.0d0 * x2)) - x1) / t_1
t_6 = (x1 * 2.0d0) * t_5
t_7 = 3.0d0 * t_4
if (x1 <= (-5.5d+102)) then
tmp = x1 - ((x2 * (6.0d0 - ((-3.0d0) * (x1 / x2)))) + ((x1 * ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - (x1 * (3.0d0 + ((x2 * 8.0d0) - (2.0d0 * (t_0 - (x2 * (-2.0d0))))))))) - x1))
else if (x1 <= (-0.106d0)) then
tmp = x1 + ((x1 + (t_3 + (t_7 + (t_1 * (((x1 * x1) * 6.0d0) - (t_6 * (3.0d0 - t_5))))))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 7.5d+138) then
tmp = x1 + (t_2 + (x1 + (t_3 + (t_7 + (t_1 * (((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)) + (t_6 * t_0)))))))
else
tmp = x1 + (t_2 + (x1 + (x1 * ((4.0d0 * (x2 * t_0)) + (x1 * 9.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * ((x2 * -2.0) - x1);
double t_3 = x1 * (x1 * x1);
double t_4 = x1 * (x1 * 3.0);
double t_5 = ((t_4 + (2.0 * x2)) - x1) / t_1;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = 3.0 * t_4;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1));
} else if (x1 <= -0.106) {
tmp = x1 + ((x1 + (t_3 + (t_7 + (t_1 * (((x1 * x1) * 6.0) - (t_6 * (3.0 - t_5))))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 7.5e+138) {
tmp = x1 + (t_2 + (x1 + (t_3 + (t_7 + (t_1 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * t_0)))))));
} else {
tmp = x1 + (t_2 + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = (x1 * x1) + 1.0 t_2 = 3.0 * ((x2 * -2.0) - x1) t_3 = x1 * (x1 * x1) t_4 = x1 * (x1 * 3.0) t_5 = ((t_4 + (2.0 * x2)) - x1) / t_1 t_6 = (x1 * 2.0) * t_5 t_7 = 3.0 * t_4 tmp = 0 if x1 <= -5.5e+102: tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1)) elif x1 <= -0.106: tmp = x1 + ((x1 + (t_3 + (t_7 + (t_1 * (((x1 * x1) * 6.0) - (t_6 * (3.0 - t_5))))))) + (3.0 * (x2 * -2.0))) elif x1 <= 7.5e+138: tmp = x1 + (t_2 + (x1 + (t_3 + (t_7 + (t_1 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * t_0))))))) else: tmp = x1 + (t_2 + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_3 = Float64(x1 * Float64(x1 * x1)) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(Float64(Float64(t_4 + Float64(2.0 * x2)) - x1) / t_1) t_6 = Float64(Float64(x1 * 2.0) * t_5) t_7 = Float64(3.0 * t_4) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 - Float64(Float64(x2 * Float64(6.0 - Float64(-3.0 * Float64(x1 / x2)))) + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - Float64(2.0 * Float64(t_0 - Float64(x2 * -2.0)))))))) - x1))); elseif (x1 <= -0.106) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_3 + Float64(t_7 + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * 6.0) - Float64(t_6 * Float64(3.0 - t_5))))))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 7.5e+138) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(t_3 + Float64(t_7 + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) + Float64(t_6 * t_0)))))))); else tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * t_0)) + Float64(x1 * 9.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = (x1 * x1) + 1.0; t_2 = 3.0 * ((x2 * -2.0) - x1); t_3 = x1 * (x1 * x1); t_4 = x1 * (x1 * 3.0); t_5 = ((t_4 + (2.0 * x2)) - x1) / t_1; t_6 = (x1 * 2.0) * t_5; t_7 = 3.0 * t_4; tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1)); elseif (x1 <= -0.106) tmp = x1 + ((x1 + (t_3 + (t_7 + (t_1 * (((x1 * x1) * 6.0) - (t_6 * (3.0 - t_5))))))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 7.5e+138) tmp = x1 + (t_2 + (x1 + (t_3 + (t_7 + (t_1 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (t_6 * t_0))))))); else tmp = x1 + (t_2 + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$4 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(3.0 * t$95$4), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 - N[(N[(x2 * N[(6.0 - N[(-3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - N[(2.0 * N[(t$95$0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.106], N[(x1 + N[(N[(x1 + N[(t$95$3 + N[(t$95$7 + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] - N[(t$95$6 * N[(3.0 - t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.5e+138], N[(x1 + N[(t$95$2 + N[(x1 + N[(t$95$3 + N[(t$95$7 + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$6 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$2 + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := x1 \cdot x1 + 1\\
t_2 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot x1\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := \frac{\left(t\_4 + 2 \cdot x2\right) - x1}{t\_1}\\
t_6 := \left(x1 \cdot 2\right) \cdot t\_5\\
t_7 := 3 \cdot t\_4\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 - \left(x2 \cdot \left(6 - -3 \cdot \frac{x1}{x2}\right) + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - x1 \cdot \left(3 + \left(x2 \cdot 8 - 2 \cdot \left(t\_0 - x2 \cdot -2\right)\right)\right)\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq -0.106:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_3 + \left(t\_7 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 - t\_6 \cdot \left(3 - t\_5\right)\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{+138}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + \left(t\_3 + \left(t\_7 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right) + t\_6 \cdot t\_0\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot t\_0\right) + x1 \cdot 9\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 48.8%
Taylor expanded in x2 around inf 59.1%
if -5.49999999999999981e102 < x1 < -0.105999999999999997Initial program 99.5%
Taylor expanded in x1 around inf 99.5%
Taylor expanded in x1 around inf 96.1%
Taylor expanded in x1 around 0 96.1%
*-commutative96.1%
Simplified96.1%
if -0.105999999999999997 < x1 < 7.4999999999999999e138Initial program 99.4%
Taylor expanded in x1 around inf 98.2%
Taylor expanded in x1 around 0 99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around 0 97.2%
if 7.4999999999999999e138 < x1 Initial program 12.8%
Taylor expanded in x1 around inf 12.8%
Taylor expanded in x1 around 0 12.8%
neg-mul-112.8%
unsub-neg12.8%
*-commutative12.8%
Simplified12.8%
Taylor expanded in x1 around 0 95.6%
Taylor expanded in x2 around 0 97.7%
Final simplification90.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* 4.0 (* x2 t_0)))
(t_2 (* 3.0 (- (* x2 -2.0) x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (- 3.0 (* 2.0 x2)))
(t_5 (+ (* x1 x1) 1.0))
(t_6 (/ (- (+ t_3 (* 2.0 x2)) x1) t_5)))
(if (<= x1 -5e+102)
(+
x1
(+
t_2
(+
x1
(*
x1
(+
t_1
(*
x1
(+
3.0
(+
(* 2.0 (+ (* x2 -2.0) t_4))
(+
(* x2 8.0)
(*
x1
(-
(+
t_1
(*
2.0
(+
(+ 1.0 (+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_0)))
(* 2.0 (* x2 t_4)))))
3.0)))))))))))
(if (<= x1 7.5e+138)
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_3)
(* t_5 (- (* (* x1 x1) 6.0) (* (* (* x1 2.0) t_6) (- 3.0 t_6)))))))
(* 3.0 (+ (* x2 -2.0) (* x1 (+ -1.0 (* x1 (- 3.0 (* x2 -2.0)))))))))
(+ x1 (+ t_2 (+ x1 (* x1 (+ t_1 (* x1 9.0))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (x2 * t_0);
double t_2 = 3.0 * ((x2 * -2.0) - x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 - (2.0 * x2);
double t_5 = (x1 * x1) + 1.0;
double t_6 = ((t_3 + (2.0 * x2)) - x1) / t_5;
double tmp;
if (x1 <= -5e+102) {
tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * (3.0 + ((2.0 * ((x2 * -2.0) + t_4)) + ((x2 * 8.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_4))))) - 3.0))))))))));
} else if (x1 <= 7.5e+138) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_5 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_6) * (3.0 - t_6))))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))));
} else {
tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * 9.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = 4.0d0 * (x2 * t_0)
t_2 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = 3.0d0 - (2.0d0 * x2)
t_5 = (x1 * x1) + 1.0d0
t_6 = ((t_3 + (2.0d0 * x2)) - x1) / t_5
if (x1 <= (-5d+102)) then
tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * (3.0d0 + ((2.0d0 * ((x2 * (-2.0d0)) + t_4)) + ((x2 * 8.0d0) + (x1 * ((t_1 + (2.0d0 * ((1.0d0 + ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_0))) + (2.0d0 * (x2 * t_4))))) - 3.0d0))))))))))
else if (x1 <= 7.5d+138) then
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_3) + (t_5 * (((x1 * x1) * 6.0d0) - (((x1 * 2.0d0) * t_6) * (3.0d0 - t_6))))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x1 * (3.0d0 - (x2 * (-2.0d0)))))))))
else
tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * 9.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (x2 * t_0);
double t_2 = 3.0 * ((x2 * -2.0) - x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 - (2.0 * x2);
double t_5 = (x1 * x1) + 1.0;
double t_6 = ((t_3 + (2.0 * x2)) - x1) / t_5;
double tmp;
if (x1 <= -5e+102) {
tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * (3.0 + ((2.0 * ((x2 * -2.0) + t_4)) + ((x2 * 8.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_4))))) - 3.0))))))))));
} else if (x1 <= 7.5e+138) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_5 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_6) * (3.0 - t_6))))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))));
} else {
tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * 9.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = 4.0 * (x2 * t_0) t_2 = 3.0 * ((x2 * -2.0) - x1) t_3 = x1 * (x1 * 3.0) t_4 = 3.0 - (2.0 * x2) t_5 = (x1 * x1) + 1.0 t_6 = ((t_3 + (2.0 * x2)) - x1) / t_5 tmp = 0 if x1 <= -5e+102: tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * (3.0 + ((2.0 * ((x2 * -2.0) + t_4)) + ((x2 * 8.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_4))))) - 3.0)))))))))) elif x1 <= 7.5e+138: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_5 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_6) * (3.0 - t_6))))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0)))))))) else: tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * 9.0))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(4.0 * Float64(x2 * t_0)) t_2 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(3.0 - Float64(2.0 * x2)) t_5 = Float64(Float64(x1 * x1) + 1.0) t_6 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_5) tmp = 0.0 if (x1 <= -5e+102) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(3.0 + Float64(Float64(2.0 * Float64(Float64(x2 * -2.0) + t_4)) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(2.0 * Float64(Float64(1.0 + Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_0))) + Float64(2.0 * Float64(x2 * t_4))))) - 3.0))))))))))); elseif (x1 <= 7.5e+138) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_3) + Float64(t_5 * Float64(Float64(Float64(x1 * x1) * 6.0) - Float64(Float64(Float64(x1 * 2.0) * t_6) * Float64(3.0 - t_6))))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(3.0 - Float64(x2 * -2.0))))))))); else tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * 9.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = 4.0 * (x2 * t_0); t_2 = 3.0 * ((x2 * -2.0) - x1); t_3 = x1 * (x1 * 3.0); t_4 = 3.0 - (2.0 * x2); t_5 = (x1 * x1) + 1.0; t_6 = ((t_3 + (2.0 * x2)) - x1) / t_5; tmp = 0.0; if (x1 <= -5e+102) tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * (3.0 + ((2.0 * ((x2 * -2.0) + t_4)) + ((x2 * 8.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_4))))) - 3.0)))))))))); elseif (x1 <= 7.5e+138) tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_5 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_6) * (3.0 - t_6))))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0)))))))); else tmp = x1 + (t_2 + (x1 + (x1 * (t_1 + (x1 * 9.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$5), $MachinePrecision]}, If[LessEqual[x1, -5e+102], N[(x1 + N[(t$95$2 + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(3.0 + N[(N[(2.0 * N[(N[(x2 * -2.0), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(2.0 * N[(N[(1.0 + N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(x2 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.5e+138], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$3), $MachinePrecision] + N[(t$95$5 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] - N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * N[(3.0 - t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$2 + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := 4 \cdot \left(x2 \cdot t\_0\right)\\
t_2 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := 3 - 2 \cdot x2\\
t_5 := x1 \cdot x1 + 1\\
t_6 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_5}\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(3 + \left(2 \cdot \left(x2 \cdot -2 + t\_4\right) + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + 2 \cdot \left(\left(1 + \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_0\right)\right) + 2 \cdot \left(x2 \cdot t\_4\right)\right)\right) - 3\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{+138}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_3 + t\_5 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 - \left(\left(x1 \cdot 2\right) \cdot t\_6\right) \cdot \left(3 - t\_6\right)\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 + x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot 9\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
if -5e102 < x1 < 7.4999999999999999e138Initial program 99.4%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around inf 97.7%
Taylor expanded in x1 around 0 96.0%
if 7.4999999999999999e138 < x1 Initial program 12.8%
Taylor expanded in x1 around inf 12.8%
Taylor expanded in x1 around 0 12.8%
neg-mul-112.8%
unsub-neg12.8%
*-commutative12.8%
Simplified12.8%
Taylor expanded in x1 around 0 95.6%
Taylor expanded in x2 around 0 97.7%
Final simplification93.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_1))
(t_4
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_2)
(*
t_1
(- (* (* x1 x1) 6.0) (* (* (* x1 2.0) t_3) (- 3.0 t_3)))))))
(* 3.0 (* x2 -2.0))))))
(if (<= x1 -5.5e+102)
(-
x1
(+
(* x2 (- 6.0 (* -3.0 (/ x1 x2))))
(-
(*
x1
(-
(* 4.0 (* x2 (- 3.0 (* 2.0 x2))))
(* x1 (+ 3.0 (- (* x2 8.0) (* 2.0 (- t_0 (* x2 -2.0))))))))
x1)))
(if (<= x1 -0.085)
t_4
(if (<= x1 3.1e-32)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_1))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2.5e+152)
t_4
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+ x1 (* x1 (+ (* 4.0 (* x2 t_0)) (* x1 9.0))))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1;
double t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) + (t_1 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_3) * (3.0 - t_3))))))) + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1));
} else if (x1 <= -0.085) {
tmp = t_4;
} else if (x1 <= 3.1e-32) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2.5e+152) {
tmp = t_4;
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = (x1 * x1) + 1.0d0
t_2 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / t_1
t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_2) + (t_1 * (((x1 * x1) * 6.0d0) - (((x1 * 2.0d0) * t_3) * (3.0d0 - t_3))))))) + (3.0d0 * (x2 * (-2.0d0))))
if (x1 <= (-5.5d+102)) then
tmp = x1 - ((x2 * (6.0d0 - ((-3.0d0) * (x1 / x2)))) + ((x1 * ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - (x1 * (3.0d0 + ((x2 * 8.0d0) - (2.0d0 * (t_0 - (x2 * (-2.0d0))))))))) - x1))
else if (x1 <= (-0.085d0)) then
tmp = t_4
else if (x1 <= 3.1d-32) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2.5d+152) then
tmp = t_4
else
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (x1 * ((4.0d0 * (x2 * t_0)) + (x1 * 9.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1;
double t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) + (t_1 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_3) * (3.0 - t_3))))))) + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1));
} else if (x1 <= -0.085) {
tmp = t_4;
} else if (x1 <= 3.1e-32) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2.5e+152) {
tmp = t_4;
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = (x1 * x1) + 1.0 t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1 t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) + (t_1 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_3) * (3.0 - t_3))))))) + (3.0 * (x2 * -2.0))) tmp = 0 if x1 <= -5.5e+102: tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1)) elif x1 <= -0.085: tmp = t_4 elif x1 <= 3.1e-32: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2.5e+152: tmp = t_4 else: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_1) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_2) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * 6.0) - Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 - t_3))))))) + Float64(3.0 * Float64(x2 * -2.0)))) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 - Float64(Float64(x2 * Float64(6.0 - Float64(-3.0 * Float64(x1 / x2)))) + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - Float64(2.0 * Float64(t_0 - Float64(x2 * -2.0)))))))) - x1))); elseif (x1 <= -0.085) tmp = t_4; elseif (x1 <= 3.1e-32) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - 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 <= 2.5e+152) tmp = t_4; else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * t_0)) + Float64(x1 * 9.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = (x1 * x1) + 1.0; t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1; t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) + (t_1 * (((x1 * x1) * 6.0) - (((x1 * 2.0) * t_3) * (3.0 - t_3))))))) + (3.0 * (x2 * -2.0))); tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1)); elseif (x1 <= -0.085) tmp = t_4; elseif (x1 <= 3.1e-32) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2.5e+152) tmp = t_4; else tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(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[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] - N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 - t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 - N[(N[(x2 * N[(6.0 - N[(-3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - N[(2.0 * N[(t$95$0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.085], t$95$4, If[LessEqual[x1, 3.1e-32], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - 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, 2.5e+152], t$95$4, N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_1}\\
t_4 := x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_2 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 - \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 - t\_3\right)\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 - \left(x2 \cdot \left(6 - -3 \cdot \frac{x1}{x2}\right) + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - x1 \cdot \left(3 + \left(x2 \cdot 8 - 2 \cdot \left(t\_0 - x2 \cdot -2\right)\right)\right)\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq -0.085:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq 3.1 \cdot 10^{-32}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 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.5 \cdot 10^{+152}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot t\_0\right) + x1 \cdot 9\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 48.8%
Taylor expanded in x2 around inf 59.1%
if -5.49999999999999981e102 < x1 < -0.0850000000000000061 or 3.10000000000000011e-32 < x1 < 2.5e152Initial program 99.6%
Taylor expanded in x1 around inf 99.6%
Taylor expanded in x1 around inf 97.5%
Taylor expanded in x1 around 0 97.5%
*-commutative97.5%
Simplified97.5%
if -0.0850000000000000061 < x1 < 3.10000000000000011e-32Initial program 99.3%
Taylor expanded in x1 around 0 88.4%
Taylor expanded in x2 around 0 98.6%
if 2.5e152 < x1 Initial program 5.6%
Taylor expanded in x1 around inf 5.6%
Taylor expanded in x1 around 0 5.6%
neg-mul-15.6%
unsub-neg5.6%
*-commutative5.6%
Simplified5.6%
Taylor expanded in x1 around 0 97.7%
Taylor expanded in x2 around 0 100.0%
Final simplification91.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (- (* x2 -2.0) x1)))
(t_2 (- (* 2.0 x2) 3.0))
(t_3 (* x1 (* x1 3.0)))
(t_4 (/ (- (+ t_3 (* 2.0 x2)) x1) t_0)))
(if (<= x1 -5.5e+102)
(-
x1
(+
(* x2 (- 6.0 (* -3.0 (/ x1 x2))))
(-
(*
x1
(-
(* 4.0 (* x2 (- 3.0 (* 2.0 x2))))
(* x1 (+ 3.0 (- (* x2 8.0) (* 2.0 (- t_2 (* x2 -2.0))))))))
x1)))
(if (<= x1 7.5e+138)
(+
x1
(+
t_1
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_3)
(*
t_0
(+
(* (* x1 x1) (- (* t_4 4.0) 6.0))
(* (- t_4 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1))))))))))
(+ x1 (+ t_1 (+ x1 (* x1 (+ (* 4.0 (* x2 t_2)) (* x1 9.0))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * ((x2 * -2.0) - x1);
double t_2 = (2.0 * x2) - 3.0;
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_2 - (x2 * -2.0)))))))) - x1));
} else if (x1 <= 7.5e+138) {
tmp = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + ((t_4 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * t_2)) + (x1 * 9.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_2 = (2.0d0 * x2) - 3.0d0
t_3 = x1 * (x1 * 3.0d0)
t_4 = ((t_3 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-5.5d+102)) then
tmp = x1 - ((x2 * (6.0d0 - ((-3.0d0) * (x1 / x2)))) + ((x1 * ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - (x1 * (3.0d0 + ((x2 * 8.0d0) - (2.0d0 * (t_2 - (x2 * (-2.0d0))))))))) - x1))
else if (x1 <= 7.5d+138) then
tmp = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_3) + (t_0 * (((x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)) + ((t_4 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1)))))))))
else
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0d0 * (x2 * t_2)) + (x1 * 9.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * ((x2 * -2.0) - x1);
double t_2 = (2.0 * x2) - 3.0;
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_2 - (x2 * -2.0)))))))) - x1));
} else if (x1 <= 7.5e+138) {
tmp = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + ((t_4 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else {
tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * t_2)) + (x1 * 9.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 3.0 * ((x2 * -2.0) - x1) t_2 = (2.0 * x2) - 3.0 t_3 = x1 * (x1 * 3.0) t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= -5.5e+102: tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_2 - (x2 * -2.0)))))))) - x1)) elif x1 <= 7.5e+138: tmp = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + ((t_4 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))) else: tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * t_2)) + (x1 * 9.0))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_2 = Float64(Float64(2.0 * x2) - 3.0) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 - Float64(Float64(x2 * Float64(6.0 - Float64(-3.0 * Float64(x1 / x2)))) + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - Float64(2.0 * Float64(t_2 - Float64(x2 * -2.0)))))))) - x1))); elseif (x1 <= 7.5e+138) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_3) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)) + Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)))))))))); else tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * t_2)) + Float64(x1 * 9.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = 3.0 * ((x2 * -2.0) - x1); t_2 = (2.0 * x2) - 3.0; t_3 = x1 * (x1 * 3.0); t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_2 - (x2 * -2.0)))))))) - x1)); elseif (x1 <= 7.5e+138) tmp = x1 + (t_1 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + ((t_4 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))); else tmp = x1 + (t_1 + (x1 + (x1 * ((4.0 * (x2 * t_2)) + (x1 * 9.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 - N[(N[(x2 * N[(6.0 - N[(-3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - N[(2.0 * N[(t$95$2 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.5e+138], N[(x1 + N[(t$95$1 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$1 + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_2 := 2 \cdot x2 - 3\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 - \left(x2 \cdot \left(6 - -3 \cdot \frac{x1}{x2}\right) + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - x1 \cdot \left(3 + \left(x2 \cdot 8 - 2 \cdot \left(t\_2 - x2 \cdot -2\right)\right)\right)\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{+138}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_3 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_4 \cdot 4 - 6\right) + \left(t\_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot t\_2\right) + x1 \cdot 9\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 48.8%
Taylor expanded in x2 around inf 59.1%
if -5.49999999999999981e102 < x1 < 7.4999999999999999e138Initial program 99.4%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around 0 99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around 0 95.5%
neg-mul-195.5%
+-commutative95.5%
unsub-neg95.5%
Simplified95.5%
if 7.4999999999999999e138 < x1 Initial program 12.8%
Taylor expanded in x1 around inf 12.8%
Taylor expanded in x1 around 0 12.8%
neg-mul-112.8%
unsub-neg12.8%
*-commutative12.8%
Simplified12.8%
Taylor expanded in x1 around 0 95.6%
Taylor expanded in x2 around 0 97.7%
Final simplification89.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* 3.0 (- (* x2 -2.0) x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (* x2 (- 3.0 (* 2.0 x2))))
(t_5 (* 4.0 t_4))
(t_6 (/ (- (+ t_3 (* 2.0 x2)) x1) t_1)))
(if (<= x1 -5.5e+102)
(+
x1
(+
t_2
(-
x1
(*
x1
(+
(*
x1
(-
(+
(* 2.0 (- t_0 (* x2 -2.0)))
(-
(*
x1
(+
3.0
(-
t_5
(*
2.0
(+
(+ 1.0 (+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_0)))
(* 2.0 t_4))))))
(* x2 8.0)))
3.0))
t_5)))))
(if (<= x1 7.5e+138)
(+
x1
(+
t_2
(+
x1
(+
(* x1 (* x1 x1))
(-
(* 3.0 t_3)
(*
t_1
(-
(* (- t_6 3.0) (* (* x1 2.0) (- x1 (* 2.0 x2))))
(* (* x1 x1) (- (* t_6 4.0) 6.0)))))))))
(-
x1
(+ (* 3.0 (- x1 (* x2 -2.0))) (- (* x1 (- t_5 (* x1 9.0))) x1)))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * ((x2 * -2.0) - x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = x2 * (3.0 - (2.0 * x2));
double t_5 = 4.0 * t_4;
double t_6 = ((t_3 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + (t_2 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) + ((x1 * (3.0 + (t_5 - (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * t_4)))))) - (x2 * 8.0))) - 3.0)) + t_5))));
} else if (x1 <= 7.5e+138) {
tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) - (t_1 * (((t_6 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - ((x1 * x1) * ((t_6 * 4.0) - 6.0))))))));
} else {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * (t_5 - (x1 * 9.0))) - x1));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = (x1 * x1) + 1.0d0
t_2 = 3.0d0 * ((x2 * (-2.0d0)) - x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = x2 * (3.0d0 - (2.0d0 * x2))
t_5 = 4.0d0 * t_4
t_6 = ((t_3 + (2.0d0 * x2)) - x1) / t_1
if (x1 <= (-5.5d+102)) then
tmp = x1 + (t_2 + (x1 - (x1 * ((x1 * (((2.0d0 * (t_0 - (x2 * (-2.0d0)))) + ((x1 * (3.0d0 + (t_5 - (2.0d0 * ((1.0d0 + ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_0))) + (2.0d0 * t_4)))))) - (x2 * 8.0d0))) - 3.0d0)) + t_5))))
else if (x1 <= 7.5d+138) then
tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_3) - (t_1 * (((t_6 - 3.0d0) * ((x1 * 2.0d0) * (x1 - (2.0d0 * x2)))) - ((x1 * x1) * ((t_6 * 4.0d0) - 6.0d0))))))))
else
tmp = x1 - ((3.0d0 * (x1 - (x2 * (-2.0d0)))) + ((x1 * (t_5 - (x1 * 9.0d0))) - x1))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * ((x2 * -2.0) - x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = x2 * (3.0 - (2.0 * x2));
double t_5 = 4.0 * t_4;
double t_6 = ((t_3 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + (t_2 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) + ((x1 * (3.0 + (t_5 - (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * t_4)))))) - (x2 * 8.0))) - 3.0)) + t_5))));
} else if (x1 <= 7.5e+138) {
tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) - (t_1 * (((t_6 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - ((x1 * x1) * ((t_6 * 4.0) - 6.0))))))));
} else {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * (t_5 - (x1 * 9.0))) - x1));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = (x1 * x1) + 1.0 t_2 = 3.0 * ((x2 * -2.0) - x1) t_3 = x1 * (x1 * 3.0) t_4 = x2 * (3.0 - (2.0 * x2)) t_5 = 4.0 * t_4 t_6 = ((t_3 + (2.0 * x2)) - x1) / t_1 tmp = 0 if x1 <= -5.5e+102: tmp = x1 + (t_2 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) + ((x1 * (3.0 + (t_5 - (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * t_4)))))) - (x2 * 8.0))) - 3.0)) + t_5)))) elif x1 <= 7.5e+138: tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) - (t_1 * (((t_6 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - ((x1 * x1) * ((t_6 * 4.0) - 6.0)))))))) else: tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * (t_5 - (x1 * 9.0))) - x1)) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(x2 * Float64(3.0 - Float64(2.0 * x2))) t_5 = Float64(4.0 * t_4) t_6 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(t_2 + Float64(x1 - Float64(x1 * Float64(Float64(x1 * Float64(Float64(Float64(2.0 * Float64(t_0 - Float64(x2 * -2.0))) + Float64(Float64(x1 * Float64(3.0 + Float64(t_5 - Float64(2.0 * Float64(Float64(1.0 + Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_0))) + Float64(2.0 * t_4)))))) - Float64(x2 * 8.0))) - 3.0)) + t_5))))); elseif (x1 <= 7.5e+138) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_3) - Float64(t_1 * Float64(Float64(Float64(t_6 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x1 - Float64(2.0 * x2)))) - Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0))))))))); else tmp = Float64(x1 - Float64(Float64(3.0 * Float64(x1 - Float64(x2 * -2.0))) + Float64(Float64(x1 * Float64(t_5 - Float64(x1 * 9.0))) - x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = (x1 * x1) + 1.0; t_2 = 3.0 * ((x2 * -2.0) - x1); t_3 = x1 * (x1 * 3.0); t_4 = x2 * (3.0 - (2.0 * x2)); t_5 = 4.0 * t_4; t_6 = ((t_3 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 + (t_2 + (x1 - (x1 * ((x1 * (((2.0 * (t_0 - (x2 * -2.0))) + ((x1 * (3.0 + (t_5 - (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * t_4)))))) - (x2 * 8.0))) - 3.0)) + t_5)))); elseif (x1 <= 7.5e+138) tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) - (t_1 * (((t_6 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2)))) - ((x1 * x1) * ((t_6 * 4.0) - 6.0)))))))); else tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * (t_5 - (x1 * 9.0))) - x1)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(4.0 * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(t$95$2 + N[(x1 - N[(x1 * N[(N[(x1 * N[(N[(N[(2.0 * N[(t$95$0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(3.0 + N[(t$95$5 - N[(2.0 * N[(N[(1.0 + N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.5e+138], N[(x1 + N[(t$95$2 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$3), $MachinePrecision] - N[(t$95$1 * N[(N[(N[(t$95$6 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(3.0 * N[(x1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(t$95$5 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := x1 \cdot x1 + 1\\
t_2 := 3 \cdot \left(x2 \cdot -2 - x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := x2 \cdot \left(3 - 2 \cdot x2\right)\\
t_5 := 4 \cdot t\_4\\
t_6 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 - x1 \cdot \left(x1 \cdot \left(\left(2 \cdot \left(t\_0 - x2 \cdot -2\right) + \left(x1 \cdot \left(3 + \left(t\_5 - 2 \cdot \left(\left(1 + \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_0\right)\right) + 2 \cdot t\_4\right)\right)\right) - x2 \cdot 8\right)\right) - 3\right) + t\_5\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{+138}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_3 - t\_1 \cdot \left(\left(t\_6 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x1 - 2 \cdot x2\right)\right) - \left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(3 \cdot \left(x1 - x2 \cdot -2\right) + \left(x1 \cdot \left(t\_5 - x1 \cdot 9\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
if -5.49999999999999981e102 < x1 < 7.4999999999999999e138Initial program 99.4%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around 0 99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around 0 95.5%
neg-mul-195.5%
+-commutative95.5%
unsub-neg95.5%
Simplified95.5%
if 7.4999999999999999e138 < x1 Initial program 12.8%
Taylor expanded in x1 around inf 12.8%
Taylor expanded in x1 around 0 12.8%
neg-mul-112.8%
unsub-neg12.8%
*-commutative12.8%
Simplified12.8%
Taylor expanded in x1 around 0 95.6%
Taylor expanded in x2 around 0 97.7%
Final simplification93.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_1)
(*
t_2
(+
(* (* x1 x1) 6.0)
(* (* (* x1 2.0) (/ (- (+ t_1 (* 2.0 x2)) x1) t_2)) 0.0)))))))
(t_4 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
(if (<= x1 -5.5e+102)
(-
x1
(+
(* x2 (- 6.0 (* -3.0 (/ x1 x2))))
(-
(*
x1
(-
(* 4.0 (* x2 (- 3.0 (* 2.0 x2))))
(* x1 (+ 3.0 (- (* x2 8.0) (* 2.0 (- t_0 (* x2 -2.0))))))))
x1)))
(if (<= x1 -2.4e+18)
(+
x1
(+
(* 3.0 (+ (* x2 -2.0) (* x1 (+ -1.0 (* x1 (- 3.0 (* x2 -2.0)))))))
t_3))
(if (<= x1 40000000.0)
(+ x1 (+ t_4 (+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2.5e+152)
(+ x1 (+ t_4 t_3))
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+ x1 (* x1 (+ (* 4.0 (* x2 t_0)) (* x1 9.0))))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * (((t_1 + (2.0 * x2)) - x1) / t_2)) * 0.0)))));
double t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1));
} else if (x1 <= -2.4e+18) {
tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))) + t_3);
} else if (x1 <= 40000000.0) {
tmp = x1 + (t_4 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2.5e+152) {
tmp = x1 + (t_4 + t_3);
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (t_2 * (((x1 * x1) * 6.0d0) + (((x1 * 2.0d0) * (((t_1 + (2.0d0 * x2)) - x1) / t_2)) * 0.0d0)))))
t_4 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)
if (x1 <= (-5.5d+102)) then
tmp = x1 - ((x2 * (6.0d0 - ((-3.0d0) * (x1 / x2)))) + ((x1 * ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - (x1 * (3.0d0 + ((x2 * 8.0d0) - (2.0d0 * (t_0 - (x2 * (-2.0d0))))))))) - x1))
else if (x1 <= (-2.4d+18)) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x1 * (3.0d0 - (x2 * (-2.0d0)))))))) + t_3)
else if (x1 <= 40000000.0d0) then
tmp = x1 + (t_4 + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2.5d+152) then
tmp = x1 + (t_4 + t_3)
else
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (x1 * ((4.0d0 * (x2 * t_0)) + (x1 * 9.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * (((t_1 + (2.0 * x2)) - x1) / t_2)) * 0.0)))));
double t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1));
} else if (x1 <= -2.4e+18) {
tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))) + t_3);
} else if (x1 <= 40000000.0) {
tmp = x1 + (t_4 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2.5e+152) {
tmp = x1 + (t_4 + t_3);
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * (((t_1 + (2.0 * x2)) - x1) / t_2)) * 0.0))))) t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2) tmp = 0 if x1 <= -5.5e+102: tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1)) elif x1 <= -2.4e+18: tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))) + t_3) elif x1 <= 40000000.0: tmp = x1 + (t_4 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2.5e+152: tmp = x1 + (t_4 + t_3) else: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2)) * 0.0)))))) t_4 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 - Float64(Float64(x2 * Float64(6.0 - Float64(-3.0 * Float64(x1 / x2)))) + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - Float64(2.0 * Float64(t_0 - Float64(x2 * -2.0)))))))) - x1))); elseif (x1 <= -2.4e+18) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(3.0 - Float64(x2 * -2.0))))))) + t_3)); elseif (x1 <= 40000000.0) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2.5e+152) tmp = Float64(x1 + Float64(t_4 + t_3)); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * t_0)) + Float64(x1 * 9.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * (((t_1 + (2.0 * x2)) - x1) / t_2)) * 0.0))))); t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2); tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1)); elseif (x1 <= -2.4e+18) tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))) + t_3); elseif (x1 <= 40000000.0) tmp = x1 + (t_4 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2.5e+152) tmp = x1 + (t_4 + t_3); else tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(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[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] * 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 - N[(N[(x2 * N[(6.0 - N[(-3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - N[(2.0 * N[(t$95$0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.4e+18], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 40000000.0], N[(x1 + N[(t$95$4 + 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.5e+152], N[(x1 + N[(t$95$4 + t$95$3), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_1 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(\left(x1 \cdot 2\right) \cdot \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\right) \cdot 0\right)\right)\right)\\
t_4 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 - \left(x2 \cdot \left(6 - -3 \cdot \frac{x1}{x2}\right) + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - x1 \cdot \left(3 + \left(x2 \cdot 8 - 2 \cdot \left(t\_0 - x2 \cdot -2\right)\right)\right)\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq -2.4 \cdot 10^{+18}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 + x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right) + t\_3\right)\\
\mathbf{elif}\;x1 \leq 40000000:\\
\;\;\;\;x1 + \left(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.5 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(t\_4 + t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot t\_0\right) + x1 \cdot 9\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 48.8%
Taylor expanded in x2 around inf 59.1%
if -5.49999999999999981e102 < x1 < -2.4e18Initial program 99.5%
Taylor expanded in x1 around inf 99.5%
Taylor expanded in x1 around inf 97.7%
Taylor expanded in x1 around 0 98.0%
Taylor expanded in x1 around inf 85.9%
if -2.4e18 < x1 < 4e7Initial program 99.3%
Taylor expanded in x1 around 0 88.4%
Taylor expanded in x2 around 0 97.9%
if 4e7 < x1 < 2.5e152Initial program 99.7%
Taylor expanded in x1 around inf 99.7%
Taylor expanded in x1 around inf 98.4%
Taylor expanded in x1 around inf 94.0%
if 2.5e152 < x1 Initial program 5.6%
Taylor expanded in x1 around inf 5.6%
Taylor expanded in x1 around 0 5.6%
neg-mul-15.6%
unsub-neg5.6%
*-commutative5.6%
Simplified5.6%
Taylor expanded in x1 around 0 97.7%
Taylor expanded in x2 around 0 100.0%
Final simplification89.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3
(+
x1
(+
(* 3.0 (+ (* x2 -2.0) (* x1 (+ -1.0 (* x1 (- 3.0 (* x2 -2.0)))))))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_1)
(*
t_2
(+
(* (* x1 x1) 6.0)
(*
(* (* x1 2.0) (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
0.0))))))))))
(if (<= x1 -5.5e+102)
(-
x1
(+
(* x2 (- 6.0 (* -3.0 (/ x1 x2))))
(-
(*
x1
(-
(* 4.0 (* x2 (- 3.0 (* 2.0 x2))))
(* x1 (+ 3.0 (- (* x2 8.0) (* 2.0 (- t_0 (* x2 -2.0))))))))
x1)))
(if (<= x1 -2.4e+18)
t_3
(if (<= x1 36000000.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 7.5e+138)
t_3
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+ x1 (* x1 (+ (* 4.0 (* x2 t_0)) (* x1 9.0))))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.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 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * (((t_1 + (2.0 * x2)) - x1) / t_2)) * 0.0)))))));
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1));
} else if (x1 <= -2.4e+18) {
tmp = t_3;
} else if (x1 <= 36000000.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 <= 7.5e+138) {
tmp = t_3;
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = x1 + ((3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x1 * (3.0d0 - (x2 * (-2.0d0)))))))) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (t_2 * (((x1 * x1) * 6.0d0) + (((x1 * 2.0d0) * (((t_1 + (2.0d0 * x2)) - x1) / t_2)) * 0.0d0)))))))
if (x1 <= (-5.5d+102)) then
tmp = x1 - ((x2 * (6.0d0 - ((-3.0d0) * (x1 / x2)))) + ((x1 * ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - (x1 * (3.0d0 + ((x2 * 8.0d0) - (2.0d0 * (t_0 - (x2 * (-2.0d0))))))))) - x1))
else if (x1 <= (-2.4d+18)) then
tmp = t_3
else if (x1 <= 36000000.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 <= 7.5d+138) then
tmp = t_3
else
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + (x1 * ((4.0d0 * (x2 * t_0)) + (x1 * 9.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = x1 + ((3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * (((t_1 + (2.0 * x2)) - x1) / t_2)) * 0.0)))))));
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1));
} else if (x1 <= -2.4e+18) {
tmp = t_3;
} else if (x1 <= 36000000.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 <= 7.5e+138) {
tmp = t_3;
} else {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = x1 + ((3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * (((t_1 + (2.0 * x2)) - x1) / t_2)) * 0.0))))))) tmp = 0 if x1 <= -5.5e+102: tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1)) elif x1 <= -2.4e+18: tmp = t_3 elif x1 <= 36000000.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 <= 7.5e+138: tmp = t_3 else: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(3.0 - Float64(x2 * -2.0))))))) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2)) * 0.0)))))))) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 - Float64(Float64(x2 * Float64(6.0 - Float64(-3.0 * Float64(x1 / x2)))) + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - Float64(2.0 * Float64(t_0 - Float64(x2 * -2.0)))))))) - x1))); elseif (x1 <= -2.4e+18) tmp = t_3; elseif (x1 <= 36000000.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 <= 7.5e+138) tmp = t_3; else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * t_0)) + Float64(x1 * 9.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = x1 + ((3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * (3.0 - (x2 * -2.0))))))) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * (((t_1 + (2.0 * x2)) - x1) / t_2)) * 0.0))))))); tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (t_0 - (x2 * -2.0)))))))) - x1)); elseif (x1 <= -2.4e+18) tmp = t_3; elseif (x1 <= 36000000.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 <= 7.5e+138) tmp = t_3; else tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + (x1 * ((4.0 * (x2 * t_0)) + (x1 * 9.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(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[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] * 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 - N[(N[(x2 * N[(6.0 - N[(-3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - N[(2.0 * N[(t$95$0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.4e+18], t$95$3, If[LessEqual[x1, 36000000.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, 7.5e+138], t$95$3, N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
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 + x1 \cdot \left(-1 + x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_1 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(\left(x1 \cdot 2\right) \cdot \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\right) \cdot 0\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 - \left(x2 \cdot \left(6 - -3 \cdot \frac{x1}{x2}\right) + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - x1 \cdot \left(3 + \left(x2 \cdot 8 - 2 \cdot \left(t\_0 - x2 \cdot -2\right)\right)\right)\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq -2.4 \cdot 10^{+18}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 36000000:\\
\;\;\;\;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 7.5 \cdot 10^{+138}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot t\_0\right) + x1 \cdot 9\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 48.8%
Taylor expanded in x2 around inf 59.1%
if -5.49999999999999981e102 < x1 < -2.4e18 or 3.6e7 < x1 < 7.4999999999999999e138Initial program 99.5%
Taylor expanded in x1 around inf 99.5%
Taylor expanded in x1 around inf 97.9%
Taylor expanded in x1 around 0 93.4%
Taylor expanded in x1 around inf 86.5%
if -2.4e18 < x1 < 3.6e7Initial program 99.3%
Taylor expanded in x1 around 0 88.4%
Taylor expanded in x2 around 0 97.9%
if 7.4999999999999999e138 < x1 Initial program 12.8%
Taylor expanded in x1 around inf 12.8%
Taylor expanded in x1 around 0 12.8%
neg-mul-112.8%
unsub-neg12.8%
*-commutative12.8%
Simplified12.8%
Taylor expanded in x1 around 0 95.6%
Taylor expanded in x2 around 0 97.7%
Final simplification89.2%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -2.7e+161)
(-
x1
(+
(* 3.0 (- x1 (* x2 -2.0)))
(- (* x1 (- (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))) (* x1 9.0))) x1)))
(if (<= x1 -8.8e+29)
(+ x1 (* x2 (- (- (/ (+ x1 (* x1 -3.0)) x2) (* x1 12.0)) 6.0)))
(if (<= x1 6.5e+108)
(+
x1
(+
(* 3.0 (/ (+ x1 (- (* 2.0 x2) (* x1 (* x1 3.0)))) (- -1.0 (* x1 x1))))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(-
x1
(-
(*
x1
(-
2.0
(+ (* x2 -12.0) (* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))))))
(* x2 -6.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -2.7e+161) {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * 9.0))) - x1));
} else if (x1 <= -8.8e+29) {
tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0));
} else if (x1 <= 6.5e+108) {
tmp = x1 + ((3.0 * ((x1 + ((2.0 * x2) - (x1 * (x1 * 3.0)))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 - ((x1 * (2.0 - ((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))))) - (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 <= (-2.7d+161)) then
tmp = x1 - ((3.0d0 * (x1 - (x2 * (-2.0d0)))) + ((x1 * ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - (x1 * 9.0d0))) - x1))
else if (x1 <= (-8.8d+29)) then
tmp = x1 + (x2 * ((((x1 + (x1 * (-3.0d0))) / x2) - (x1 * 12.0d0)) - 6.0d0))
else if (x1 <= 6.5d+108) then
tmp = x1 + ((3.0d0 * ((x1 + ((2.0d0 * x2) - (x1 * (x1 * 3.0d0)))) / ((-1.0d0) - (x1 * x1)))) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else
tmp = x1 - ((x1 * (2.0d0 - ((x2 * (-12.0d0)) + (x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0))))))))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -2.7e+161) {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * 9.0))) - x1));
} else if (x1 <= -8.8e+29) {
tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0));
} else if (x1 <= 6.5e+108) {
tmp = x1 + ((3.0 * ((x1 + ((2.0 * x2) - (x1 * (x1 * 3.0)))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 - ((x1 * (2.0 - ((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -2.7e+161: tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * 9.0))) - x1)) elif x1 <= -8.8e+29: tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0)) elif x1 <= 6.5e+108: tmp = x1 + ((3.0 * ((x1 + ((2.0 * x2) - (x1 * (x1 * 3.0)))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) else: tmp = x1 - ((x1 * (2.0 - ((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))))) - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -2.7e+161) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(x1 - Float64(x2 * -2.0))) + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - Float64(x1 * 9.0))) - x1))); elseif (x1 <= -8.8e+29) tmp = Float64(x1 + Float64(x2 * Float64(Float64(Float64(Float64(x1 + Float64(x1 * -3.0)) / x2) - Float64(x1 * 12.0)) - 6.0))); elseif (x1 <= 6.5e+108) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 + Float64(Float64(2.0 * x2) - Float64(x1 * Float64(x1 * 3.0)))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0)))))))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -2.7e+161) tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * 9.0))) - x1)); elseif (x1 <= -8.8e+29) tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0)); elseif (x1 <= 6.5e+108) tmp = x1 + ((3.0 * ((x1 + ((2.0 * x2) - (x1 * (x1 * 3.0)))) / (-1.0 - (x1 * x1)))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); else tmp = x1 - ((x1 * (2.0 - ((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -2.7e+161], N[(x1 - N[(N[(3.0 * N[(x1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -8.8e+29], N[(x1 + N[(x2 * N[(N[(N[(N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - N[(x1 * 12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.5e+108], N[(x1 + N[(N[(3.0 * N[(N[(x1 + N[(N[(2.0 * x2), $MachinePrecision] - N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x1 * N[(2.0 - N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.7 \cdot 10^{+161}:\\
\;\;\;\;x1 - \left(3 \cdot \left(x1 - x2 \cdot -2\right) + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - x1 \cdot 9\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq -8.8 \cdot 10^{+29}:\\
\;\;\;\;x1 + x2 \cdot \left(\left(\frac{x1 + x1 \cdot -3}{x2} - x1 \cdot 12\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{+108}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 + \left(2 \cdot x2 - x1 \cdot \left(x1 \cdot 3\right)\right)}{-1 - x1 \cdot x1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - \left(x2 \cdot -12 + x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -2.6999999999999998e161Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 70.4%
Taylor expanded in x2 around 0 70.4%
if -2.6999999999999998e161 < x1 < -8.8000000000000005e29Initial program 54.7%
Taylor expanded in x1 around 0 5.6%
Taylor expanded in x2 around 0 8.9%
*-commutative8.9%
associate-*l*8.9%
Simplified8.9%
Taylor expanded in x1 around 0 11.5%
neg-mul-154.7%
unsub-neg54.7%
*-commutative54.7%
Simplified11.5%
Taylor expanded in x2 around -inf 33.0%
if -8.8000000000000005e29 < x1 < 6.4999999999999996e108Initial program 99.3%
Taylor expanded in x1 around 0 81.1%
Taylor expanded in x2 around 0 89.6%
if 6.4999999999999996e108 < x1 Initial program 22.7%
Taylor expanded in x1 around 0 9.8%
Taylor expanded in x2 around 0 2.8%
*-commutative2.8%
associate-*l*2.8%
Simplified2.8%
Taylor expanded in x1 around 0 95.5%
Final simplification79.8%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -3e-25)
(-
x1
(+
(* x2 (- 6.0 (* -3.0 (/ x1 x2))))
(-
(*
x1
(-
(* 4.0 (* x2 (- 3.0 (* 2.0 x2))))
(*
x1
(+ 3.0 (- (* x2 8.0) (* 2.0 (- (- (* 2.0 x2) 3.0) (* x2 -2.0))))))))
x1)))
(if (<= x1 6.5e+108)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+ (* x2 -12.0) (* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))))
2.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -3e-25) {
tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (((2.0 * x2) - 3.0) - (x2 * -2.0)))))))) - x1));
} else if (x1 <= 6.5e+108) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-3d-25)) then
tmp = x1 - ((x2 * (6.0d0 - ((-3.0d0) * (x1 / x2)))) + ((x1 * ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - (x1 * (3.0d0 + ((x2 * 8.0d0) - (2.0d0 * (((2.0d0 * x2) - 3.0d0) - (x2 * (-2.0d0))))))))) - x1))
else if (x1 <= 6.5d+108) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0))))))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -3e-25) {
tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (((2.0 * x2) - 3.0) - (x2 * -2.0)))))))) - x1));
} else if (x1 <= 6.5e+108) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -3e-25: tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (((2.0 * x2) - 3.0) - (x2 * -2.0)))))))) - x1)) elif x1 <= 6.5e+108: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -3e-25) tmp = Float64(x1 - Float64(Float64(x2 * Float64(6.0 - Float64(-3.0 * Float64(x1 / x2)))) + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - Float64(x1 * Float64(3.0 + Float64(Float64(x2 * 8.0) - Float64(2.0 * Float64(Float64(Float64(2.0 * x2) - 3.0) - Float64(x2 * -2.0)))))))) - x1))); elseif (x1 <= 6.5e+108) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0)))))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -3e-25) tmp = x1 - ((x2 * (6.0 - (-3.0 * (x1 / x2)))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * (3.0 + ((x2 * 8.0) - (2.0 * (((2.0 * x2) - 3.0) - (x2 * -2.0)))))))) - x1)); elseif (x1 <= 6.5e+108) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -3e-25], N[(x1 - N[(N[(x2 * N[(6.0 - N[(-3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(3.0 + N[(N[(x2 * 8.0), $MachinePrecision] - N[(2.0 * N[(N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.5e+108], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3 \cdot 10^{-25}:\\
\;\;\;\;x1 - \left(x2 \cdot \left(6 - -3 \cdot \frac{x1}{x2}\right) + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - x1 \cdot \left(3 + \left(x2 \cdot 8 - 2 \cdot \left(\left(2 \cdot x2 - 3\right) - x2 \cdot -2\right)\right)\right)\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{+108}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -2.9999999999999998e-25Initial program 41.3%
Taylor expanded in x1 around inf 39.1%
Taylor expanded in x1 around 0 41.3%
neg-mul-141.3%
unsub-neg41.3%
*-commutative41.3%
Simplified41.3%
Taylor expanded in x1 around 0 40.4%
Taylor expanded in x2 around inf 48.9%
if -2.9999999999999998e-25 < x1 < 6.4999999999999996e108Initial program 99.4%
Taylor expanded in x1 around 0 82.6%
Taylor expanded in x2 around 0 91.8%
if 6.4999999999999996e108 < x1 Initial program 22.7%
Taylor expanded in x1 around 0 9.8%
Taylor expanded in x2 around 0 2.8%
*-commutative2.8%
associate-*l*2.8%
Simplified2.8%
Taylor expanded in x1 around 0 95.5%
Final simplification79.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(- (* x2 -6.0) (* x1 (- 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))))))
(if (<= x1 -3e+30)
(+ x1 (* x2 (- (- (/ (+ x1 (* x1 -3.0)) x2) (* x1 12.0)) 6.0)))
(if (<= x1 -3e-163)
t_0
(if (<= x1 6.4e-259)
(-
x1
(-
(* x1 (+ 2.0 (- (* 3.0 (* x1 (- (* x2 -2.0) 3.0))) (* x2 -12.0))))
(* x2 -6.0)))
(if (<= x1 6.5e+108)
t_0
(-
x1
(-
(*
x1
(-
2.0
(+
(* x2 -12.0)
(* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))))))
(* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) - (x1 * (2.0 - (4.0 * (x2 * ((2.0 * x2) - 3.0))))));
double tmp;
if (x1 <= -3e+30) {
tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0));
} else if (x1 <= -3e-163) {
tmp = t_0;
} else if (x1 <= 6.4e-259) {
tmp = x1 - ((x1 * (2.0 + ((3.0 * (x1 * ((x2 * -2.0) - 3.0))) - (x2 * -12.0)))) - (x2 * -6.0));
} else if (x1 <= 6.5e+108) {
tmp = t_0;
} else {
tmp = x1 - ((x1 * (2.0 - ((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))))) - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))))
if (x1 <= (-3d+30)) then
tmp = x1 + (x2 * ((((x1 + (x1 * (-3.0d0))) / x2) - (x1 * 12.0d0)) - 6.0d0))
else if (x1 <= (-3d-163)) then
tmp = t_0
else if (x1 <= 6.4d-259) then
tmp = x1 - ((x1 * (2.0d0 + ((3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))) - (x2 * (-12.0d0))))) - (x2 * (-6.0d0)))
else if (x1 <= 6.5d+108) then
tmp = t_0
else
tmp = x1 - ((x1 * (2.0d0 - ((x2 * (-12.0d0)) + (x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0))))))))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) - (x1 * (2.0 - (4.0 * (x2 * ((2.0 * x2) - 3.0))))));
double tmp;
if (x1 <= -3e+30) {
tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0));
} else if (x1 <= -3e-163) {
tmp = t_0;
} else if (x1 <= 6.4e-259) {
tmp = x1 - ((x1 * (2.0 + ((3.0 * (x1 * ((x2 * -2.0) - 3.0))) - (x2 * -12.0)))) - (x2 * -6.0));
} else if (x1 <= 6.5e+108) {
tmp = t_0;
} else {
tmp = x1 - ((x1 * (2.0 - ((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) - (x1 * (2.0 - (4.0 * (x2 * ((2.0 * x2) - 3.0)))))) tmp = 0 if x1 <= -3e+30: tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0)) elif x1 <= -3e-163: tmp = t_0 elif x1 <= 6.4e-259: tmp = x1 - ((x1 * (2.0 + ((3.0 * (x1 * ((x2 * -2.0) - 3.0))) - (x2 * -12.0)))) - (x2 * -6.0)) elif x1 <= 6.5e+108: tmp = t_0 else: tmp = x1 - ((x1 * (2.0 - ((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))))) - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))))) tmp = 0.0 if (x1 <= -3e+30) tmp = Float64(x1 + Float64(x2 * Float64(Float64(Float64(Float64(x1 + Float64(x1 * -3.0)) / x2) - Float64(x1 * 12.0)) - 6.0))); elseif (x1 <= -3e-163) tmp = t_0; elseif (x1 <= 6.4e-259) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + Float64(Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))) - Float64(x2 * -12.0)))) - Float64(x2 * -6.0))); elseif (x1 <= 6.5e+108) tmp = t_0; else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0)))))))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) - (x1 * (2.0 - (4.0 * (x2 * ((2.0 * x2) - 3.0)))))); tmp = 0.0; if (x1 <= -3e+30) tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0)); elseif (x1 <= -3e-163) tmp = t_0; elseif (x1 <= 6.4e-259) tmp = x1 - ((x1 * (2.0 + ((3.0 * (x1 * ((x2 * -2.0) - 3.0))) - (x2 * -12.0)))) - (x2 * -6.0)); elseif (x1 <= 6.5e+108) tmp = t_0; else tmp = x1 - ((x1 * (2.0 - ((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3e+30], N[(x1 + N[(x2 * N[(N[(N[(N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - N[(x1 * 12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3e-163], t$95$0, If[LessEqual[x1, 6.4e-259], N[(x1 - N[(N[(x1 * N[(2.0 + N[(N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.5e+108], t$95$0, N[(x1 - N[(N[(x1 * N[(2.0 - N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -3 \cdot 10^{+30}:\\
\;\;\;\;x1 + x2 \cdot \left(\left(\frac{x1 + x1 \cdot -3}{x2} - x1 \cdot 12\right) - 6\right)\\
\mathbf{elif}\;x1 \leq -3 \cdot 10^{-163}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 6.4 \cdot 10^{-259}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + \left(3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right) - x2 \cdot -12\right)\right) - x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{+108}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - \left(x2 \cdot -12 + x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -2.99999999999999978e30Initial program 31.7%
Taylor expanded in x1 around 0 3.4%
Taylor expanded in x2 around 0 5.4%
*-commutative5.4%
associate-*l*5.4%
Simplified5.4%
Taylor expanded in x1 around 0 13.0%
neg-mul-131.7%
unsub-neg31.7%
*-commutative31.7%
Simplified13.0%
Taylor expanded in x2 around -inf 41.5%
if -2.99999999999999978e30 < x1 < -3.0000000000000002e-163 or 6.39999999999999975e-259 < x1 < 6.4999999999999996e108Initial program 99.3%
Taylor expanded in x1 around 0 81.0%
Taylor expanded in x1 around 0 80.4%
if -3.0000000000000002e-163 < x1 < 6.39999999999999975e-259Initial program 99.5%
Taylor expanded in x1 around 0 79.5%
Taylor expanded in x2 around 0 98.0%
*-commutative98.0%
associate-*l*98.0%
Simplified98.0%
Taylor expanded in x1 around 0 98.2%
if 6.4999999999999996e108 < x1 Initial program 22.7%
Taylor expanded in x1 around 0 9.8%
Taylor expanded in x2 around 0 2.8%
*-commutative2.8%
associate-*l*2.8%
Simplified2.8%
Taylor expanded in x1 around 0 95.5%
Final simplification75.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (* x1 (- (* x2 -2.0) 3.0)))))
(if (<= x1 -3e+30)
(+ x1 (* x2 (- (- (/ (+ x1 (* x1 -3.0)) x2) (* x1 12.0)) 6.0)))
(if (<= x1 -3e-163)
(+
x1
(-
(* x2 -6.0)
(* x1 (+ 2.0 (+ (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))) t_0)))))
(if (<= x1 3.1e-259)
(- x1 (- (* x1 (+ 2.0 (- t_0 (* x2 -12.0)))) (* x2 -6.0)))
(if (<= x1 6.5e+108)
(+
x1
(- (* x2 -6.0) (* x1 (- 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))))
(-
x1
(-
(*
x1
(-
2.0
(+
(* x2 -12.0)
(* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))))))
(* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = 3.0 * (x1 * ((x2 * -2.0) - 3.0));
double tmp;
if (x1 <= -3e+30) {
tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0));
} else if (x1 <= -3e-163) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) + t_0))));
} else if (x1 <= 3.1e-259) {
tmp = x1 - ((x1 * (2.0 + (t_0 - (x2 * -12.0)))) - (x2 * -6.0));
} else if (x1 <= 6.5e+108) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (4.0 * (x2 * ((2.0 * x2) - 3.0))))));
} else {
tmp = x1 - ((x1 * (2.0 - ((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))))) - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))
if (x1 <= (-3d+30)) then
tmp = x1 + (x2 * ((((x1 + (x1 * (-3.0d0))) / x2) - (x1 * 12.0d0)) - 6.0d0))
else if (x1 <= (-3d-163)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) + t_0))))
else if (x1 <= 3.1d-259) then
tmp = x1 - ((x1 * (2.0d0 + (t_0 - (x2 * (-12.0d0))))) - (x2 * (-6.0d0)))
else if (x1 <= 6.5d+108) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))))
else
tmp = x1 - ((x1 * (2.0d0 - ((x2 * (-12.0d0)) + (x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0))))))))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * (x1 * ((x2 * -2.0) - 3.0));
double tmp;
if (x1 <= -3e+30) {
tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0));
} else if (x1 <= -3e-163) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) + t_0))));
} else if (x1 <= 3.1e-259) {
tmp = x1 - ((x1 * (2.0 + (t_0 - (x2 * -12.0)))) - (x2 * -6.0));
} else if (x1 <= 6.5e+108) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (4.0 * (x2 * ((2.0 * x2) - 3.0))))));
} else {
tmp = x1 - ((x1 * (2.0 - ((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * (x1 * ((x2 * -2.0) - 3.0)) tmp = 0 if x1 <= -3e+30: tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0)) elif x1 <= -3e-163: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) + t_0)))) elif x1 <= 3.1e-259: tmp = x1 - ((x1 * (2.0 + (t_0 - (x2 * -12.0)))) - (x2 * -6.0)) elif x1 <= 6.5e+108: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (4.0 * (x2 * ((2.0 * x2) - 3.0)))))) else: tmp = x1 - ((x1 * (2.0 - ((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))))) - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))) tmp = 0.0 if (x1 <= -3e+30) tmp = Float64(x1 + Float64(x2 * Float64(Float64(Float64(Float64(x1 + Float64(x1 * -3.0)) / x2) - Float64(x1 * 12.0)) - 6.0))); elseif (x1 <= -3e-163) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) + t_0))))); elseif (x1 <= 3.1e-259) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + Float64(t_0 - Float64(x2 * -12.0)))) - Float64(x2 * -6.0))); elseif (x1 <= 6.5e+108) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))))); else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 - Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0)))))))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * (x1 * ((x2 * -2.0) - 3.0)); tmp = 0.0; if (x1 <= -3e+30) tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0)); elseif (x1 <= -3e-163) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) + t_0)))); elseif (x1 <= 3.1e-259) tmp = x1 - ((x1 * (2.0 + (t_0 - (x2 * -12.0)))) - (x2 * -6.0)); elseif (x1 <= 6.5e+108) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (4.0 * (x2 * ((2.0 * x2) - 3.0)))))); else tmp = x1 - ((x1 * (2.0 - ((x2 * -12.0) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3e+30], N[(x1 + N[(x2 * N[(N[(N[(N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - N[(x1 * 12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3e-163], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.1e-259], N[(x1 - N[(N[(x1 * N[(2.0 + N[(t$95$0 - N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.5e+108], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x1 * N[(2.0 - N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right)\\
\mathbf{if}\;x1 \leq -3 \cdot 10^{+30}:\\
\;\;\;\;x1 + x2 \cdot \left(\left(\frac{x1 + x1 \cdot -3}{x2} - x1 \cdot 12\right) - 6\right)\\
\mathbf{elif}\;x1 \leq -3 \cdot 10^{-163}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) + t\_0\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.1 \cdot 10^{-259}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + \left(t\_0 - x2 \cdot -12\right)\right) - x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{+108}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 - \left(x2 \cdot -12 + x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -2.99999999999999978e30Initial program 31.7%
Taylor expanded in x1 around 0 3.4%
Taylor expanded in x2 around 0 5.4%
*-commutative5.4%
associate-*l*5.4%
Simplified5.4%
Taylor expanded in x1 around 0 13.0%
neg-mul-131.7%
unsub-neg31.7%
*-commutative31.7%
Simplified13.0%
Taylor expanded in x2 around -inf 41.5%
if -2.99999999999999978e30 < x1 < -3.0000000000000002e-163Initial program 99.1%
Taylor expanded in x1 around 0 77.1%
Taylor expanded in x1 around 0 77.8%
if -3.0000000000000002e-163 < x1 < 3.0999999999999998e-259Initial program 99.5%
Taylor expanded in x1 around 0 79.5%
Taylor expanded in x2 around 0 98.0%
*-commutative98.0%
associate-*l*98.0%
Simplified98.0%
Taylor expanded in x1 around 0 98.2%
if 3.0999999999999998e-259 < x1 < 6.4999999999999996e108Initial program 99.4%
Taylor expanded in x1 around 0 82.8%
Taylor expanded in x1 around 0 82.6%
if 6.4999999999999996e108 < x1 Initial program 22.7%
Taylor expanded in x1 around 0 9.8%
Taylor expanded in x2 around 0 2.8%
*-commutative2.8%
associate-*l*2.8%
Simplified2.8%
Taylor expanded in x1 around 0 95.5%
Final simplification76.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))
(if (<= x1 -2.7e+161)
(- x1 (+ (* 3.0 (- x1 (* x2 -2.0))) (- (* x1 (- t_0 (* x1 9.0))) x1)))
(if (<= x1 -8.8e+29)
(+ x1 (* x2 (- (- (/ (+ x1 (* x1 -3.0)) x2) (* x1 12.0)) 6.0)))
(-
x1
(-
(*
x1
(+ 2.0 (+ (* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0))) t_0)))
(* x2 -6.0)))))))
double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -2.7e+161) {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * (t_0 - (x1 * 9.0))) - x1));
} else if (x1 <= -8.8e+29) {
tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0));
} else {
tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_0))) - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
if (x1 <= (-2.7d+161)) then
tmp = x1 - ((3.0d0 * (x1 - (x2 * (-2.0d0)))) + ((x1 * (t_0 - (x1 * 9.0d0))) - x1))
else if (x1 <= (-8.8d+29)) then
tmp = x1 + (x2 * ((((x1 + (x1 * (-3.0d0))) / x2) - (x1 * 12.0d0)) - 6.0d0))
else
tmp = x1 - ((x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_0))) - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -2.7e+161) {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * (t_0 - (x1 * 9.0))) - x1));
} else if (x1 <= -8.8e+29) {
tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0));
} else {
tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_0))) - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2))) tmp = 0 if x1 <= -2.7e+161: tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * (t_0 - (x1 * 9.0))) - x1)) elif x1 <= -8.8e+29: tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0)) else: tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_0))) - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) tmp = 0.0 if (x1 <= -2.7e+161) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(x1 - Float64(x2 * -2.0))) + Float64(Float64(x1 * Float64(t_0 - Float64(x1 * 9.0))) - x1))); elseif (x1 <= -8.8e+29) tmp = Float64(x1 + Float64(x2 * Float64(Float64(Float64(Float64(x1 + Float64(x1 * -3.0)) / x2) - Float64(x1 * 12.0)) - 6.0))); else tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - 3.0)) - Float64(x1 * 3.0))) + t_0))) - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2))); tmp = 0.0; if (x1 <= -2.7e+161) tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * (t_0 - (x1 * 9.0))) - x1)); elseif (x1 <= -8.8e+29) tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0)); else tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_0))) - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.7e+161], N[(x1 - N[(N[(3.0 * N[(x1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(t$95$0 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -8.8e+29], N[(x1 + N[(x2 * N[(N[(N[(N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - N[(x1 * 12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x1 * N[(2.0 + N[(N[(x1 * N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -2.7 \cdot 10^{+161}:\\
\;\;\;\;x1 - \left(3 \cdot \left(x1 - x2 \cdot -2\right) + \left(x1 \cdot \left(t\_0 - x1 \cdot 9\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq -8.8 \cdot 10^{+29}:\\
\;\;\;\;x1 + x2 \cdot \left(\left(\frac{x1 + x1 \cdot -3}{x2} - x1 \cdot 12\right) - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + \left(x1 \cdot \left(3 \cdot \left(x2 \cdot -2 - 3\right) - x1 \cdot 3\right) + t\_0\right)\right) - x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -2.6999999999999998e161Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
neg-mul-10.0%
unsub-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 70.4%
Taylor expanded in x2 around 0 70.4%
if -2.6999999999999998e161 < x1 < -8.8000000000000005e29Initial program 54.7%
Taylor expanded in x1 around 0 5.6%
Taylor expanded in x2 around 0 8.9%
*-commutative8.9%
associate-*l*8.9%
Simplified8.9%
Taylor expanded in x1 around 0 11.5%
neg-mul-154.7%
unsub-neg54.7%
*-commutative54.7%
Simplified11.5%
Taylor expanded in x2 around -inf 33.0%
if -8.8000000000000005e29 < x1 Initial program 81.5%
Taylor expanded in x1 around 0 64.5%
Taylor expanded in x1 around 0 83.8%
Final simplification74.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))
(t_1 (+ x1 (- (* x2 -6.0) (* x1 (- 2.0 t_0))))))
(if (<= x1 -3e+30)
(* x1 (+ -1.0 (* x2 -12.0)))
(if (<= x1 -1.36e-161)
t_1
(if (<= x1 3.8e-260)
(- (* x2 -6.0) x1)
(if (<= x1 9e+154)
t_1
(if (<= x1 3.7e+257)
(* x2 (- (/ x1 x2) 6.0))
(+ x1 (* x1 (+ 1.0 t_0))))))))))
double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0)));
double tmp;
if (x1 <= -3e+30) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else if (x1 <= -1.36e-161) {
tmp = t_1;
} else if (x1 <= 3.8e-260) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 9e+154) {
tmp = t_1;
} else if (x1 <= 3.7e+257) {
tmp = x2 * ((x1 / x2) - 6.0);
} else {
tmp = x1 + (x1 * (1.0 + t_0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))
t_1 = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - t_0)))
if (x1 <= (-3d+30)) then
tmp = x1 * ((-1.0d0) + (x2 * (-12.0d0)))
else if (x1 <= (-1.36d-161)) then
tmp = t_1
else if (x1 <= 3.8d-260) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 9d+154) then
tmp = t_1
else if (x1 <= 3.7d+257) then
tmp = x2 * ((x1 / x2) - 6.0d0)
else
tmp = x1 + (x1 * (1.0d0 + t_0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0)));
double tmp;
if (x1 <= -3e+30) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else if (x1 <= -1.36e-161) {
tmp = t_1;
} else if (x1 <= 3.8e-260) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 9e+154) {
tmp = t_1;
} else if (x1 <= 3.7e+257) {
tmp = x2 * ((x1 / x2) - 6.0);
} else {
tmp = x1 + (x1 * (1.0 + t_0));
}
return tmp;
}
def code(x1, x2): t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0)) t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0))) tmp = 0 if x1 <= -3e+30: tmp = x1 * (-1.0 + (x2 * -12.0)) elif x1 <= -1.36e-161: tmp = t_1 elif x1 <= 3.8e-260: tmp = (x2 * -6.0) - x1 elif x1 <= 9e+154: tmp = t_1 elif x1 <= 3.7e+257: tmp = x2 * ((x1 / x2) - 6.0) else: tmp = x1 + (x1 * (1.0 + t_0)) return tmp
function code(x1, x2) t_0 = Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) t_1 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - t_0)))) tmp = 0.0 if (x1 <= -3e+30) tmp = Float64(x1 * Float64(-1.0 + Float64(x2 * -12.0))); elseif (x1 <= -1.36e-161) tmp = t_1; elseif (x1 <= 3.8e-260) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 9e+154) tmp = t_1; elseif (x1 <= 3.7e+257) tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + t_0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0)); t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0))); tmp = 0.0; if (x1 <= -3e+30) tmp = x1 * (-1.0 + (x2 * -12.0)); elseif (x1 <= -1.36e-161) tmp = t_1; elseif (x1 <= 3.8e-260) tmp = (x2 * -6.0) - x1; elseif (x1 <= 9e+154) tmp = t_1; elseif (x1 <= 3.7e+257) tmp = x2 * ((x1 / x2) - 6.0); else tmp = x1 + (x1 * (1.0 + t_0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3e+30], N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.36e-161], t$95$1, If[LessEqual[x1, 3.8e-260], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 9e+154], t$95$1, If[LessEqual[x1, 3.7e+257], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\\
t_1 := x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - t\_0\right)\right)\\
\mathbf{if}\;x1 \leq -3 \cdot 10^{+30}:\\
\;\;\;\;x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq -1.36 \cdot 10^{-161}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 3.8 \cdot 10^{-260}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 9 \cdot 10^{+154}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 3.7 \cdot 10^{+257}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + t\_0\right)\\
\end{array}
\end{array}
if x1 < -2.99999999999999978e30Initial program 31.7%
Taylor expanded in x1 around 0 3.4%
Taylor expanded in x2 around 0 5.4%
*-commutative5.4%
associate-*l*5.4%
Simplified5.4%
Taylor expanded in x1 around 0 13.0%
neg-mul-131.7%
unsub-neg31.7%
*-commutative31.7%
Simplified13.0%
Taylor expanded in x1 around inf 13.0%
if -2.99999999999999978e30 < x1 < -1.36e-161 or 3.8000000000000003e-260 < x1 < 9.00000000000000018e154Initial program 99.4%
Taylor expanded in x1 around 0 77.7%
Taylor expanded in x1 around 0 77.0%
if -1.36e-161 < x1 < 3.8000000000000003e-260Initial program 99.5%
Taylor expanded in x1 around inf 99.5%
Taylor expanded in x1 around 0 99.5%
neg-mul-199.5%
unsub-neg99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x1 around inf 98.0%
Taylor expanded in x1 around 0 98.2%
if 9.00000000000000018e154 < x1 < 3.69999999999999991e257Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.7%
*-commutative5.7%
Simplified5.7%
Taylor expanded in x2 around inf 58.5%
if 3.69999999999999991e257 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around inf 100.0%
Final simplification62.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x2 (- (- (/ (+ x1 (* x1 -3.0)) x2) (* x1 12.0)) 6.0))))
(t_1 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))
(t_2 (+ x1 (- (* x2 -6.0) (* x1 (- 2.0 t_1))))))
(if (<= x1 -3e+30)
t_0
(if (<= x1 -1.5e-203)
t_2
(if (<= x1 6.4e-259)
t_0
(if (<= x1 1.32e+155)
t_2
(if (<= x1 4.4e+256)
(* x2 (- (/ x1 x2) 6.0))
(+ x1 (* x1 (+ 1.0 t_1))))))))))
double code(double x1, double x2) {
double t_0 = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0));
double t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_2 = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_1)));
double tmp;
if (x1 <= -3e+30) {
tmp = t_0;
} else if (x1 <= -1.5e-203) {
tmp = t_2;
} else if (x1 <= 6.4e-259) {
tmp = t_0;
} else if (x1 <= 1.32e+155) {
tmp = t_2;
} else if (x1 <= 4.4e+256) {
tmp = x2 * ((x1 / x2) - 6.0);
} else {
tmp = x1 + (x1 * (1.0 + t_1));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 + (x2 * ((((x1 + (x1 * (-3.0d0))) / x2) - (x1 * 12.0d0)) - 6.0d0))
t_1 = 4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))
t_2 = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - t_1)))
if (x1 <= (-3d+30)) then
tmp = t_0
else if (x1 <= (-1.5d-203)) then
tmp = t_2
else if (x1 <= 6.4d-259) then
tmp = t_0
else if (x1 <= 1.32d+155) then
tmp = t_2
else if (x1 <= 4.4d+256) then
tmp = x2 * ((x1 / x2) - 6.0d0)
else
tmp = x1 + (x1 * (1.0d0 + t_1))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0));
double t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_2 = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_1)));
double tmp;
if (x1 <= -3e+30) {
tmp = t_0;
} else if (x1 <= -1.5e-203) {
tmp = t_2;
} else if (x1 <= 6.4e-259) {
tmp = t_0;
} else if (x1 <= 1.32e+155) {
tmp = t_2;
} else if (x1 <= 4.4e+256) {
tmp = x2 * ((x1 / x2) - 6.0);
} else {
tmp = x1 + (x1 * (1.0 + t_1));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0)) t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0)) t_2 = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_1))) tmp = 0 if x1 <= -3e+30: tmp = t_0 elif x1 <= -1.5e-203: tmp = t_2 elif x1 <= 6.4e-259: tmp = t_0 elif x1 <= 1.32e+155: tmp = t_2 elif x1 <= 4.4e+256: tmp = x2 * ((x1 / x2) - 6.0) else: tmp = x1 + (x1 * (1.0 + t_1)) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x2 * Float64(Float64(Float64(Float64(x1 + Float64(x1 * -3.0)) / x2) - Float64(x1 * 12.0)) - 6.0))) t_1 = Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) t_2 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - t_1)))) tmp = 0.0 if (x1 <= -3e+30) tmp = t_0; elseif (x1 <= -1.5e-203) tmp = t_2; elseif (x1 <= 6.4e-259) tmp = t_0; elseif (x1 <= 1.32e+155) tmp = t_2; elseif (x1 <= 4.4e+256) tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + t_1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0)); t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0)); t_2 = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_1))); tmp = 0.0; if (x1 <= -3e+30) tmp = t_0; elseif (x1 <= -1.5e-203) tmp = t_2; elseif (x1 <= 6.4e-259) tmp = t_0; elseif (x1 <= 1.32e+155) tmp = t_2; elseif (x1 <= 4.4e+256) tmp = x2 * ((x1 / x2) - 6.0); else tmp = x1 + (x1 * (1.0 + t_1)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x2 * N[(N[(N[(N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - N[(x1 * 12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3e+30], t$95$0, If[LessEqual[x1, -1.5e-203], t$95$2, If[LessEqual[x1, 6.4e-259], t$95$0, If[LessEqual[x1, 1.32e+155], t$95$2, If[LessEqual[x1, 4.4e+256], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x2 \cdot \left(\left(\frac{x1 + x1 \cdot -3}{x2} - x1 \cdot 12\right) - 6\right)\\
t_1 := 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\\
t_2 := x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - t\_1\right)\right)\\
\mathbf{if}\;x1 \leq -3 \cdot 10^{+30}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.5 \cdot 10^{-203}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq 6.4 \cdot 10^{-259}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.32 \cdot 10^{+155}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq 4.4 \cdot 10^{+256}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + t\_1\right)\\
\end{array}
\end{array}
if x1 < -2.99999999999999978e30 or -1.5000000000000001e-203 < x1 < 6.39999999999999975e-259Initial program 54.3%
Taylor expanded in x1 around 0 27.5%
Taylor expanded in x2 around 0 36.2%
*-commutative36.2%
associate-*l*36.2%
Simplified36.2%
Taylor expanded in x1 around 0 41.3%
neg-mul-154.3%
unsub-neg54.3%
*-commutative54.3%
Simplified41.3%
Taylor expanded in x2 around -inf 60.3%
if -2.99999999999999978e30 < x1 < -1.5000000000000001e-203 or 6.39999999999999975e-259 < x1 < 1.32e155Initial program 99.3%
Taylor expanded in x1 around 0 78.8%
Taylor expanded in x1 around 0 78.1%
if 1.32e155 < x1 < 4.3999999999999999e256Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.7%
*-commutative5.7%
Simplified5.7%
Taylor expanded in x2 around inf 58.5%
if 4.3999999999999999e256 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around inf 100.0%
Final simplification70.1%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -2.7e+161) (not (<= x1 -3e+30)))
(-
x1
(+
(* 3.0 (- x1 (* x2 -2.0)))
(- (* x1 (- (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))) (* x1 9.0))) x1)))
(+ x1 (* x2 (- (- (/ (+ x1 (* x1 -3.0)) x2) (* x1 12.0)) 6.0)))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.7e+161) || !(x1 <= -3e+30)) {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * 9.0))) - x1));
} else {
tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-2.7d+161)) .or. (.not. (x1 <= (-3d+30)))) then
tmp = x1 - ((3.0d0 * (x1 - (x2 * (-2.0d0)))) + ((x1 * ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - (x1 * 9.0d0))) - x1))
else
tmp = x1 + (x2 * ((((x1 + (x1 * (-3.0d0))) / x2) - (x1 * 12.0d0)) - 6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.7e+161) || !(x1 <= -3e+30)) {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * 9.0))) - x1));
} else {
tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -2.7e+161) or not (x1 <= -3e+30): tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * 9.0))) - x1)) else: tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -2.7e+161) || !(x1 <= -3e+30)) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(x1 - Float64(x2 * -2.0))) + Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - Float64(x1 * 9.0))) - x1))); else tmp = Float64(x1 + Float64(x2 * Float64(Float64(Float64(Float64(x1 + Float64(x1 * -3.0)) / x2) - Float64(x1 * 12.0)) - 6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -2.7e+161) || ~((x1 <= -3e+30))) tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) + ((x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x1 * 9.0))) - x1)); else tmp = x1 + (x2 * ((((x1 + (x1 * -3.0)) / x2) - (x1 * 12.0)) - 6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -2.7e+161], N[Not[LessEqual[x1, -3e+30]], $MachinePrecision]], N[(x1 - N[(N[(3.0 * N[(x1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * N[(N[(N[(N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - N[(x1 * 12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.7 \cdot 10^{+161} \lor \neg \left(x1 \leq -3 \cdot 10^{+30}\right):\\
\;\;\;\;x1 - \left(3 \cdot \left(x1 - x2 \cdot -2\right) + \left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - x1 \cdot 9\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot \left(\left(\frac{x1 + x1 \cdot -3}{x2} - x1 \cdot 12\right) - 6\right)\\
\end{array}
\end{array}
if x1 < -2.6999999999999998e161 or -2.99999999999999978e30 < x1 Initial program 71.5%
Taylor expanded in x1 around inf 70.7%
Taylor expanded in x1 around 0 71.5%
neg-mul-171.5%
unsub-neg71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in x1 around 0 80.9%
Taylor expanded in x2 around 0 81.2%
if -2.6999999999999998e161 < x1 < -2.99999999999999978e30Initial program 53.6%
Taylor expanded in x1 around 0 5.7%
Taylor expanded in x2 around 0 9.1%
*-commutative9.1%
associate-*l*9.1%
Simplified9.1%
Taylor expanded in x1 around 0 11.6%
neg-mul-153.6%
unsub-neg53.6%
*-commutative53.6%
Simplified11.6%
Taylor expanded in x2 around -inf 33.7%
Final simplification74.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
(if (<= x2 -1.5)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 t_0))))
(if (<= x2 2.45e+218)
(-
x1
(-
(* x1 (+ 2.0 (- (* 3.0 (* x1 (- (* x2 -2.0) 3.0))) (* x2 -12.0))))
(* x2 -6.0)))
(+ x1 (* x1 (+ 1.0 t_0)))))))
double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double tmp;
if (x2 <= -1.5) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0)));
} else if (x2 <= 2.45e+218) {
tmp = x1 - ((x1 * (2.0 + ((3.0 * (x1 * ((x2 * -2.0) - 3.0))) - (x2 * -12.0)))) - (x2 * -6.0));
} else {
tmp = x1 + (x1 * (1.0 + t_0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))
if (x2 <= (-1.5d0)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - t_0)))
else if (x2 <= 2.45d+218) then
tmp = x1 - ((x1 * (2.0d0 + ((3.0d0 * (x1 * ((x2 * (-2.0d0)) - 3.0d0))) - (x2 * (-12.0d0))))) - (x2 * (-6.0d0)))
else
tmp = x1 + (x1 * (1.0d0 + t_0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double tmp;
if (x2 <= -1.5) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0)));
} else if (x2 <= 2.45e+218) {
tmp = x1 - ((x1 * (2.0 + ((3.0 * (x1 * ((x2 * -2.0) - 3.0))) - (x2 * -12.0)))) - (x2 * -6.0));
} else {
tmp = x1 + (x1 * (1.0 + t_0));
}
return tmp;
}
def code(x1, x2): t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0)) tmp = 0 if x2 <= -1.5: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0))) elif x2 <= 2.45e+218: tmp = x1 - ((x1 * (2.0 + ((3.0 * (x1 * ((x2 * -2.0) - 3.0))) - (x2 * -12.0)))) - (x2 * -6.0)) else: tmp = x1 + (x1 * (1.0 + t_0)) return tmp
function code(x1, x2) t_0 = Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) tmp = 0.0 if (x2 <= -1.5) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - t_0)))); elseif (x2 <= 2.45e+218) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + Float64(Float64(3.0 * Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0))) - Float64(x2 * -12.0)))) - Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + t_0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0)); tmp = 0.0; if (x2 <= -1.5) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0))); elseif (x2 <= 2.45e+218) tmp = x1 - ((x1 * (2.0 + ((3.0 * (x1 * ((x2 * -2.0) - 3.0))) - (x2 * -12.0)))) - (x2 * -6.0)); else tmp = x1 + (x1 * (1.0 + t_0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -1.5], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 2.45e+218], N[(x1 - N[(N[(x1 * N[(2.0 + N[(N[(3.0 * N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\\
\mathbf{if}\;x2 \leq -1.5:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - t\_0\right)\right)\\
\mathbf{elif}\;x2 \leq 2.45 \cdot 10^{+218}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + \left(3 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right)\right) - x2 \cdot -12\right)\right) - x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + t\_0\right)\\
\end{array}
\end{array}
if x2 < -1.5Initial program 64.2%
Taylor expanded in x1 around 0 42.7%
Taylor expanded in x1 around 0 57.4%
if -1.5 < x2 < 2.4499999999999999e218Initial program 67.9%
Taylor expanded in x1 around 0 47.0%
Taylor expanded in x2 around 0 44.9%
*-commutative44.9%
associate-*l*44.9%
Simplified44.9%
Taylor expanded in x1 around 0 71.7%
if 2.4499999999999999e218 < x2 Initial program 100.0%
Taylor expanded in x1 around 0 93.3%
Taylor expanded in x1 around inf 93.3%
Final simplification69.4%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 9e-33)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* x2 -12.0))))
(if (or (<= x1 1.3e+163) (not (<= x1 4.7e+254)))
(+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))
(* x2 (- (/ x1 x2) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 9e-33) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * -12.0)));
} else if ((x1 <= 1.3e+163) || !(x1 <= 4.7e+254)) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.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 <= 9d-33) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x2 * (-12.0d0))))
else if ((x1 <= 1.3d+163) .or. (.not. (x1 <= 4.7d+254))) then
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.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 <= 9e-33) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * -12.0)));
} else if ((x1 <= 1.3e+163) || !(x1 <= 4.7e+254)) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 9e-33: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * -12.0))) elif (x1 <= 1.3e+163) or not (x1 <= 4.7e+254): tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 9e-33) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x2 * -12.0)))); elseif ((x1 <= 1.3e+163) || !(x1 <= 4.7e+254)) tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.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 <= 9e-33) tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * -12.0))); elseif ((x1 <= 1.3e+163) || ~((x1 <= 4.7e+254))) tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 9e-33], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, 1.3e+163], N[Not[LessEqual[x1, 4.7e+254]], $MachinePrecision]], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 9 \cdot 10^{-33}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq 1.3 \cdot 10^{+163} \lor \neg \left(x1 \leq 4.7 \cdot 10^{+254}\right):\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 8.99999999999999982e-33Initial program 76.1%
Taylor expanded in x1 around 0 57.4%
Taylor expanded in x2 around 0 51.2%
*-commutative51.2%
associate-*l*51.2%
Simplified51.2%
Taylor expanded in x1 around 0 53.4%
neg-mul-176.1%
unsub-neg76.1%
*-commutative76.1%
Simplified53.4%
Taylor expanded in x1 around 0 53.6%
if 8.99999999999999982e-33 < x1 < 1.3000000000000001e163 or 4.7000000000000001e254 < x1 Initial program 71.2%
Taylor expanded in x1 around 0 33.2%
Taylor expanded in x1 around inf 52.9%
if 1.3000000000000001e163 < x1 < 4.7000000000000001e254Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.9%
*-commutative5.9%
Simplified5.9%
Taylor expanded in x2 around inf 65.8%
Final simplification54.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* x2 -12.0)))))
(if (<= x1 -2.8e-54)
t_0
(if (<= x1 2.35e-110)
(* x2 -6.0)
(if (<= x1 2.15e+36) t_0 (* x2 (- (/ x1 x2) 6.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x2 * -12.0));
double tmp;
if (x1 <= -2.8e-54) {
tmp = t_0;
} else if (x1 <= 2.35e-110) {
tmp = x2 * -6.0;
} else if (x1 <= 2.15e+36) {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = x1 * ((-1.0d0) + (x2 * (-12.0d0)))
if (x1 <= (-2.8d-54)) then
tmp = t_0
else if (x1 <= 2.35d-110) then
tmp = x2 * (-6.0d0)
else if (x1 <= 2.15d+36) then
tmp = t_0
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x2 * -12.0));
double tmp;
if (x1 <= -2.8e-54) {
tmp = t_0;
} else if (x1 <= 2.35e-110) {
tmp = x2 * -6.0;
} else if (x1 <= 2.15e+36) {
tmp = t_0;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (x2 * -12.0)) tmp = 0 if x1 <= -2.8e-54: tmp = t_0 elif x1 <= 2.35e-110: tmp = x2 * -6.0 elif x1 <= 2.15e+36: tmp = t_0 else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(x2 * -12.0))) tmp = 0.0 if (x1 <= -2.8e-54) tmp = t_0; elseif (x1 <= 2.35e-110) tmp = Float64(x2 * -6.0); elseif (x1 <= 2.15e+36) tmp = t_0; else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (x2 * -12.0)); tmp = 0.0; if (x1 <= -2.8e-54) tmp = t_0; elseif (x1 <= 2.35e-110) tmp = x2 * -6.0; elseif (x1 <= 2.15e+36) tmp = t_0; else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.8e-54], t$95$0, If[LessEqual[x1, 2.35e-110], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 2.15e+36], t$95$0, N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\mathbf{if}\;x1 \leq -2.8 \cdot 10^{-54}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 2.35 \cdot 10^{-110}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 2.15 \cdot 10^{+36}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -2.8000000000000002e-54 or 2.34999999999999996e-110 < x1 < 2.15000000000000002e36Initial program 58.7%
Taylor expanded in x1 around 0 33.2%
Taylor expanded in x2 around 0 19.9%
*-commutative19.9%
associate-*l*19.9%
Simplified19.9%
Taylor expanded in x1 around 0 23.7%
neg-mul-158.7%
unsub-neg58.7%
*-commutative58.7%
Simplified23.7%
Taylor expanded in x1 around inf 20.3%
if -2.8000000000000002e-54 < x1 < 2.34999999999999996e-110Initial program 99.4%
Taylor expanded in x1 around 0 87.2%
Taylor expanded in x1 around 0 65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in x1 around 0 65.9%
*-commutative65.9%
Simplified65.9%
if 2.15000000000000002e36 < x1 Initial program 34.6%
Taylor expanded in x1 around 0 10.8%
Taylor expanded in x1 around 0 5.7%
*-commutative5.7%
Simplified5.7%
Taylor expanded in x2 around inf 36.6%
Final simplification40.4%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -2.8e-54) (not (<= x1 1.5e-117))) (* x1 (+ -1.0 (* x2 -12.0))) (* x2 -6.0)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.8e-54) || !(x1 <= 1.5e-117)) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else {
tmp = 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 <= (-2.8d-54)) .or. (.not. (x1 <= 1.5d-117))) then
tmp = x1 * ((-1.0d0) + (x2 * (-12.0d0)))
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.8e-54) || !(x1 <= 1.5e-117)) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -2.8e-54) or not (x1 <= 1.5e-117): tmp = x1 * (-1.0 + (x2 * -12.0)) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -2.8e-54) || !(x1 <= 1.5e-117)) tmp = Float64(x1 * Float64(-1.0 + Float64(x2 * -12.0))); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -2.8e-54) || ~((x1 <= 1.5e-117))) tmp = x1 * (-1.0 + (x2 * -12.0)); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -2.8e-54], N[Not[LessEqual[x1, 1.5e-117]], $MachinePrecision]], N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.8 \cdot 10^{-54} \lor \neg \left(x1 \leq 1.5 \cdot 10^{-117}\right):\\
\;\;\;\;x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -2.8000000000000002e-54 or 1.49999999999999996e-117 < x1 Initial program 50.9%
Taylor expanded in x1 around 0 26.0%
Taylor expanded in x2 around 0 15.1%
*-commutative15.1%
associate-*l*15.1%
Simplified15.1%
Taylor expanded in x1 around 0 21.4%
neg-mul-151.0%
unsub-neg51.0%
*-commutative51.0%
Simplified21.4%
Taylor expanded in x1 around inf 19.2%
if -2.8000000000000002e-54 < x1 < 1.49999999999999996e-117Initial program 99.4%
Taylor expanded in x1 around 0 87.2%
Taylor expanded in x1 around 0 65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in x1 around 0 65.9%
*-commutative65.9%
Simplified65.9%
Final simplification36.3%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -1.05e+30) (* x1 (+ -1.0 (* x2 -12.0))) (if (<= x1 3.1e-32) (- (* x2 -6.0) x1) (* x2 (- (/ x1 x2) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.05e+30) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else if (x1 <= 3.1e-32) {
tmp = (x2 * -6.0) - x1;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.05d+30)) then
tmp = x1 * ((-1.0d0) + (x2 * (-12.0d0)))
else if (x1 <= 3.1d-32) then
tmp = (x2 * (-6.0d0)) - x1
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.05e+30) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else if (x1 <= 3.1e-32) {
tmp = (x2 * -6.0) - x1;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.05e+30: tmp = x1 * (-1.0 + (x2 * -12.0)) elif x1 <= 3.1e-32: tmp = (x2 * -6.0) - x1 else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.05e+30) tmp = Float64(x1 * Float64(-1.0 + Float64(x2 * -12.0))); elseif (x1 <= 3.1e-32) tmp = Float64(Float64(x2 * -6.0) - x1); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.05e+30) tmp = x1 * (-1.0 + (x2 * -12.0)); elseif (x1 <= 3.1e-32) tmp = (x2 * -6.0) - x1; else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.05e+30], N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.1e-32], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.05 \cdot 10^{+30}:\\
\;\;\;\;x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq 3.1 \cdot 10^{-32}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -1.05e30Initial program 31.7%
Taylor expanded in x1 around 0 3.4%
Taylor expanded in x2 around 0 5.4%
*-commutative5.4%
associate-*l*5.4%
Simplified5.4%
Taylor expanded in x1 around 0 13.0%
neg-mul-131.7%
unsub-neg31.7%
*-commutative31.7%
Simplified13.0%
Taylor expanded in x1 around inf 13.0%
if -1.05e30 < x1 < 3.10000000000000011e-32Initial program 99.3%
Taylor expanded in x1 around inf 98.0%
Taylor expanded in x1 around 0 99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around inf 76.5%
Taylor expanded in x1 around 0 75.1%
if 3.10000000000000011e-32 < x1 Initial program 46.7%
Taylor expanded in x1 around 0 21.8%
Taylor expanded in x1 around 0 6.2%
*-commutative6.2%
Simplified6.2%
Taylor expanded in x2 around inf 31.4%
Final simplification48.1%
(FPCore (x1 x2) :precision binary64 (if (<= x1 2.3e+36) (+ (* x2 -6.0) (* x1 (+ -1.0 (* x2 -12.0)))) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 2.3e+36) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * -12.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 <= 2.3d+36) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (x2 * (-12.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 <= 2.3e+36) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * -12.0)));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 2.3e+36: tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * -12.0))) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 2.3e+36) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(x2 * -12.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 <= 2.3e+36) tmp = (x2 * -6.0) + (x1 * (-1.0 + (x2 * -12.0))); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 2.3e+36], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 2.3 \cdot 10^{+36}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 2.29999999999999996e36Initial program 77.4%
Taylor expanded in x1 around 0 58.1%
Taylor expanded in x2 around 0 49.1%
*-commutative49.1%
associate-*l*49.1%
Simplified49.1%
Taylor expanded in x1 around 0 51.1%
neg-mul-177.5%
unsub-neg77.5%
*-commutative77.5%
Simplified51.1%
Taylor expanded in x1 around 0 51.3%
if 2.29999999999999996e36 < x1 Initial program 34.6%
Taylor expanded in x1 around 0 10.8%
Taylor expanded in x1 around 0 5.7%
*-commutative5.7%
Simplified5.7%
Taylor expanded in x2 around inf 36.6%
Final simplification48.4%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -4.8e-230) (* x2 -6.0) (if (<= x2 9.6e-170) (- x1) (+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -4.8e-230) {
tmp = x2 * -6.0;
} else if (x2 <= 9.6e-170) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-4.8d-230)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 9.6d-170) then
tmp = -x1
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -4.8e-230) {
tmp = x2 * -6.0;
} else if (x2 <= 9.6e-170) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -4.8e-230: tmp = x2 * -6.0 elif x2 <= 9.6e-170: tmp = -x1 else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -4.8e-230) tmp = Float64(x2 * -6.0); elseif (x2 <= 9.6e-170) tmp = Float64(-x1); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -4.8e-230) tmp = x2 * -6.0; elseif (x2 <= 9.6e-170) tmp = -x1; else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -4.8e-230], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 9.6e-170], (-x1), N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -4.8 \cdot 10^{-230}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 9.6 \cdot 10^{-170}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -4.8000000000000004e-230Initial program 66.6%
Taylor expanded in x1 around 0 45.6%
Taylor expanded in x1 around 0 31.4%
*-commutative31.4%
Simplified31.4%
Taylor expanded in x1 around 0 31.7%
*-commutative31.7%
Simplified31.7%
if -4.8000000000000004e-230 < x2 < 9.5999999999999998e-170Initial program 65.5%
Taylor expanded in x1 around 0 45.3%
Taylor expanded in x2 around 0 45.3%
*-commutative45.3%
associate-*l*45.3%
Simplified45.3%
Taylor expanded in x1 around 0 46.4%
neg-mul-165.5%
unsub-neg65.5%
*-commutative65.5%
Simplified46.4%
Taylor expanded in x2 around 0 38.2%
distribute-rgt-out38.6%
metadata-eval38.6%
*-commutative38.6%
mul-1-neg38.6%
Simplified38.6%
if 9.5999999999999998e-170 < x2 Initial program 73.7%
Taylor expanded in x1 around 0 54.5%
Taylor expanded in x1 around 0 30.7%
*-commutative30.7%
Simplified30.7%
Final simplification32.9%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.55e-229) (not (<= x2 2.5e-164))) (* x2 -6.0) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.55e-229) || !(x2 <= 2.5e-164)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-1.55d-229)) .or. (.not. (x2 <= 2.5d-164))) then
tmp = x2 * (-6.0d0)
else
tmp = -x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.55e-229) || !(x2 <= 2.5e-164)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.55e-229) or not (x2 <= 2.5e-164): tmp = x2 * -6.0 else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.55e-229) || !(x2 <= 2.5e-164)) tmp = Float64(x2 * -6.0); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.55e-229) || ~((x2 <= 2.5e-164))) tmp = x2 * -6.0; else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.55e-229], N[Not[LessEqual[x2, 2.5e-164]], $MachinePrecision]], N[(x2 * -6.0), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.55 \cdot 10^{-229} \lor \neg \left(x2 \leq 2.5 \cdot 10^{-164}\right):\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -1.55e-229 or 2.49999999999999981e-164 < x2 Initial program 70.3%
Taylor expanded in x1 around 0 49.9%
Taylor expanded in x1 around 0 31.4%
*-commutative31.4%
Simplified31.4%
Taylor expanded in x1 around 0 31.3%
*-commutative31.3%
Simplified31.3%
if -1.55e-229 < x2 < 2.49999999999999981e-164Initial program 63.2%
Taylor expanded in x1 around 0 43.7%
Taylor expanded in x2 around 0 43.7%
*-commutative43.7%
associate-*l*43.7%
Simplified43.7%
Taylor expanded in x1 around 0 44.9%
neg-mul-163.2%
unsub-neg63.2%
*-commutative63.2%
Simplified44.9%
Taylor expanded in x2 around 0 37.0%
distribute-rgt-out37.3%
metadata-eval37.3%
*-commutative37.3%
mul-1-neg37.3%
Simplified37.3%
Final simplification32.6%
(FPCore (x1 x2) :precision binary64 (- x1))
double code(double x1, double x2) {
return -x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = -x1
end function
public static double code(double x1, double x2) {
return -x1;
}
def code(x1, x2): return -x1
function code(x1, x2) return Float64(-x1) end
function tmp = code(x1, x2) tmp = -x1; end
code[x1_, x2_] := (-x1)
\begin{array}{l}
\\
-x1
\end{array}
Initial program 68.7%
Taylor expanded in x1 around 0 48.5%
Taylor expanded in x2 around 0 40.1%
*-commutative40.1%
associate-*l*40.1%
Simplified40.1%
Taylor expanded in x1 around 0 44.1%
neg-mul-168.7%
unsub-neg68.7%
*-commutative68.7%
Simplified44.1%
Taylor expanded in x2 around 0 13.2%
distribute-rgt-out13.3%
metadata-eval13.3%
*-commutative13.3%
mul-1-neg13.3%
Simplified13.3%
Final simplification13.3%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 68.7%
Taylor expanded in x1 around 0 48.5%
Taylor expanded in x1 around 0 26.7%
*-commutative26.7%
Simplified26.7%
Taylor expanded in x1 around inf 3.2%
Final simplification3.2%
herbie shell --seed 2024066
(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))))))