
(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 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* 3.0 (* x1 x1))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_4 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_0 4.0 -6.0)) (* (* x1 (* 2.0 t_0)) (+ t_0 -3.0)))
(fma t_4 t_0 (pow x1 3.0))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (x1 * x1);
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_0, 4.0, -6.0)), ((x1 * (2.0 * t_0)) * (t_0 + -3.0))), fma(t_4, t_0, pow(x1, 3.0)))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(3.0 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_0, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_0)) * Float64(t_0 + -3.0))), fma(t_4, t_0, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$4 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * t$95$0 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 3 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_4 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_0, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_0\right)\right) \cdot \left(t\_0 + -3\right)\right), \mathsf{fma}\left(t\_4, t\_0, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Simplified99.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 11.1%
Taylor expanded in x1 around inf 100.0%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_1))
(t_4 (* t_2 t_3))
(t_5 (* (* (* x1 2.0) t_3) (- t_3 3.0)))
(t_6 (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_1)))
(t_7 (+ 1.0 (pow x1 2.0))))
(if (<=
(+
x1
(+
(+
x1
(+ (+ (* t_1 (+ t_5 (* (* x1 x1) (- (* t_3 4.0) 6.0)))) t_4) t_0))
t_6))
INFINITY)
(+
x1
(+
t_6
(+
x1
(+
t_0
(+
t_4
(*
t_1
(+
t_5
(*
(* x1 x1)
(-
(*
4.0
(+
(+ (* 2.0 (/ x2 t_7)) (* 3.0 (/ (pow x1 2.0) t_7)))
(/ x1 (- -1.0 (pow x1 2.0)))))
6.0)))))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1;
double t_4 = t_2 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1);
double t_7 = 1.0 + pow(x1, 2.0);
double tmp;
if ((x1 + ((x1 + (((t_1 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= ((double) INFINITY)) {
tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_1 * (t_5 + ((x1 * x1) * ((4.0 * (((2.0 * (x2 / t_7)) + (3.0 * (pow(x1, 2.0) / t_7))) + (x1 / (-1.0 - pow(x1, 2.0))))) - 6.0))))))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1;
double t_4 = t_2 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1);
double t_7 = 1.0 + Math.pow(x1, 2.0);
double tmp;
if ((x1 + ((x1 + (((t_1 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Double.POSITIVE_INFINITY) {
tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_1 * (t_5 + ((x1 * x1) * ((4.0 * (((2.0 * (x2 / t_7)) + (3.0 * (Math.pow(x1, 2.0) / t_7))) + (x1 / (-1.0 - Math.pow(x1, 2.0))))) - 6.0))))))));
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1 t_4 = t_2 * t_3 t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0) t_6 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1) t_7 = 1.0 + math.pow(x1, 2.0) tmp = 0 if (x1 + ((x1 + (((t_1 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= math.inf: tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_1 * (t_5 + ((x1 * x1) * ((4.0 * (((2.0 * (x2 / t_7)) + (3.0 * (math.pow(x1, 2.0) / t_7))) + (x1 / (-1.0 - math.pow(x1, 2.0))))) - 6.0)))))))) else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) 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(t_2 * t_3) t_5 = Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) t_6 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_1)) t_7 = Float64(1.0 + (x1 ^ 2.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Inf) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_1 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(Float64(2.0 * Float64(x2 / t_7)) + Float64(3.0 * Float64((x1 ^ 2.0) / t_7))) + Float64(x1 / Float64(-1.0 - (x1 ^ 2.0))))) - 6.0))))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_1; t_4 = t_2 * t_3; t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0); t_6 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1); t_7 = 1.0 + (x1 ^ 2.0); tmp = 0.0; if ((x1 + ((x1 + (((t_1 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Inf) tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_1 * (t_5 + ((x1 * x1) * ((4.0 * (((2.0 * (x2 / t_7)) + (3.0 * ((x1 ^ 2.0) / t_7))) + (x1 / (-1.0 - (x1 ^ 2.0))))) - 6.0)))))))); else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.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[(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[(t$95$2 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(1.0 + N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$1 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(2.0 * N[(x2 / t$95$7), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[Power[x1, 2.0], $MachinePrecision] / t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 / N[(-1.0 - N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
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 := t\_2 \cdot t\_3\\
t_5 := \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right)\\
t_6 := 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_1}\\
t_7 := 1 + {x1}^{2}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(t\_5 + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_4\right) + t\_0\right)\right) + t\_6\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + \left(t\_0 + \left(t\_4 + t\_1 \cdot \left(t\_5 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(\left(2 \cdot \frac{x2}{t\_7} + 3 \cdot \frac{{x1}^{2}}{t\_7}\right) + \frac{x1}{-1 - {x1}^{2}}\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Taylor expanded in x2 around 0 99.5%
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 11.1%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
(if (<= t_3 INFINITY) t_3 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 11.1%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (+ (* x1 9.0) -1.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2)))
(t_4 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_5
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_2
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(+
(* 4.0 (- (* 2.0 x2) 3.0))
(* x1 (- (* x1 6.0) 4.0))))))))))))
(if (<= x1 -4.4e+153)
t_1
(if (<= x1 -5.6e+102)
(+
x1
(+
t_3
(+
x1
(+
(* x2 -4.0)
(+
(* x2 8.0)
(*
x1
(+
2.0
(*
x1
(+
(* x2 -4.0)
(+
(* x1 -2.0)
(+
(* -2.0 (- 3.0 (* 2.0 x2)))
(+ (* x2 8.0) (* x2 6.0)))))))))))))
(if (<= x1 -0.026)
t_5
(if (<= x1 0.038)
(+
t_1
(* x2 (- (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 12.0) 12.0))) 6.0)))
(if (<= x1 2e+152) t_5 t_1)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * ((x1 * 9.0) + -1.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((4.0 * ((2.0 * x2) - 3.0)) + (x1 * ((x1 * 6.0) - 4.0)))))))));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_1;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_3 + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0))))))))))));
} else if (x1 <= -0.026) {
tmp = t_5;
} else if (x1 <= 0.038) {
tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else if (x1 <= 2e+152) {
tmp = t_5;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * ((x1 * 9.0d0) + (-1.0d0))
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)
t_4 = ((t_0 + (2.0d0 * x2)) - x1) / t_2
t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_2 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + ((4.0d0 * ((2.0d0 * x2) - 3.0d0)) + (x1 * ((x1 * 6.0d0) - 4.0d0)))))))))
if (x1 <= (-4.4d+153)) then
tmp = t_1
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (t_3 + (x1 + ((x2 * (-4.0d0)) + ((x2 * 8.0d0) + (x1 * (2.0d0 + (x1 * ((x2 * (-4.0d0)) + ((x1 * (-2.0d0)) + (((-2.0d0) * (3.0d0 - (2.0d0 * x2))) + ((x2 * 8.0d0) + (x2 * 6.0d0))))))))))))
else if (x1 <= (-0.026d0)) then
tmp = t_5
else if (x1 <= 0.038d0) then
tmp = t_1 + (x2 * (((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 12.0d0) - 12.0d0))) - 6.0d0))
else if (x1 <= 2d+152) then
tmp = t_5
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * ((x1 * 9.0) + -1.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((4.0 * ((2.0 * x2) - 3.0)) + (x1 * ((x1 * 6.0) - 4.0)))))))));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_1;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_3 + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0))))))))))));
} else if (x1 <= -0.026) {
tmp = t_5;
} else if (x1 <= 0.038) {
tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else if (x1 <= 2e+152) {
tmp = t_5;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 * ((x1 * 9.0) + -1.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2) t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2 t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((4.0 * ((2.0 * x2) - 3.0)) + (x1 * ((x1 * 6.0) - 4.0))))))))) tmp = 0 if x1 <= -4.4e+153: tmp = t_1 elif x1 <= -5.6e+102: tmp = x1 + (t_3 + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0)))))))))))) elif x1 <= -0.026: tmp = t_5 elif x1 <= 0.038: tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)) elif x1 <= 2e+152: tmp = t_5 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) t_5 = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 4.0)))))))))) tmp = 0.0 if (x1 <= -4.4e+153) tmp = t_1; elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x2 * -4.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(Float64(x2 * -4.0) + Float64(Float64(x1 * -2.0) + Float64(Float64(-2.0 * Float64(3.0 - Float64(2.0 * x2))) + Float64(Float64(x2 * 8.0) + Float64(x2 * 6.0))))))))))))); elseif (x1 <= -0.026) tmp = t_5; elseif (x1 <= 0.038) tmp = Float64(t_1 + Float64(x2 * Float64(Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 12.0) - 12.0))) - 6.0))); elseif (x1 <= 2e+152) tmp = t_5; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 * ((x1 * 9.0) + -1.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2); t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2; t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((4.0 * ((2.0 * x2) - 3.0)) + (x1 * ((x1 * 6.0) - 4.0))))))))); tmp = 0.0; if (x1 <= -4.4e+153) tmp = t_1; elseif (x1 <= -5.6e+102) tmp = x1 + (t_3 + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0)))))))))))); elseif (x1 <= -0.026) tmp = t_5; elseif (x1 <= 0.038) tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)); elseif (x1 <= 2e+152) tmp = t_5; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(4.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], t$95$1, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(2.0 + N[(x1 * N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x1 * -2.0), $MachinePrecision] + N[(N[(-2.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.026], t$95$5, If[LessEqual[x1, 0.038], N[(t$95$1 + N[(x2 * N[(N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], t$95$5, t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 9 + -1\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
t_5 := x1 + \left(t\_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_0 + t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(4 \cdot \left(2 \cdot x2 - 3\right) + x1 \cdot \left(x1 \cdot 6 - 4\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(x2 \cdot -4 + \left(x2 \cdot 8 + x1 \cdot \left(2 + x1 \cdot \left(x2 \cdot -4 + \left(x1 \cdot -2 + \left(-2 \cdot \left(3 - 2 \cdot x2\right) + \left(x2 \cdot 8 + x2 \cdot 6\right)\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -0.026:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 0.038:\\
\;\;\;\;t\_1 + x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 12 - 12\right)\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153 or 2.0000000000000001e152 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 73.8%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around -inf 0.0%
Taylor expanded in x2 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 100.0%
if -5.60000000000000037e102 < x1 < -0.0259999999999999988 or 0.0379999999999999991 < x1 < 2.0000000000000001e152Initial program 99.3%
Taylor expanded in x1 around -inf 98.4%
Taylor expanded in x1 around 0 98.6%
Taylor expanded in x1 around inf 98.7%
if -0.0259999999999999988 < x1 < 0.0379999999999999991Initial program 99.4%
Simplified99.8%
Taylor expanded in x1 around 0 86.9%
Taylor expanded in x2 around 0 86.9%
Taylor expanded in x2 around 0 99.8%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (<= x1 -8.5e+72)
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0))
(if (<= x1 2e+152)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* 3.0 t_0))))))
(* x1 (+ (* x1 9.0) -1.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -8.5e+72) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
} else if (x1 <= 2e+152) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0)))));
} else {
tmp = x1 * ((x1 * 9.0) + -1.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if (x1 <= (-8.5d+72)) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
else if (x1 <= 2d+152) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (3.0d0 * t_0)))))
else
tmp = x1 * ((x1 * 9.0d0) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -8.5e+72) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
} else if (x1 <= 2e+152) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0)))));
} else {
tmp = x1 * ((x1 * 9.0) + -1.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if x1 <= -8.5e+72: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) elif x1 <= 2e+152: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0))))) else: tmp = x1 * ((x1 * 9.0) + -1.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if (x1 <= -8.5e+72) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); elseif (x1 <= 2e+152) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(3.0 * t_0)))))); else tmp = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if (x1 <= -8.5e+72) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); elseif (x1 <= 2e+152) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0))))); else tmp = x1 * ((x1 * 9.0) + -1.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -8.5e+72], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -8.5 \cdot 10^{+72}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + 3 \cdot t\_0\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9 + -1\right)\\
\end{array}
\end{array}
if x1 < -8.5000000000000004e72Initial program 8.3%
Taylor expanded in x1 around inf 25.0%
Taylor expanded in x1 around inf 100.0%
if -8.5000000000000004e72 < x1 < 2.0000000000000001e152Initial program 99.4%
Taylor expanded in x1 around inf 99.0%
if 2.0000000000000001e152 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
Final simplification99.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (+ (* x1 9.0) -1.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2)))
(t_4 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_5
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_2
(+
(* (* x1 x1) (- (* t_4 4.0) 6.0))
(* (- t_4 3.0) (* (* x1 2.0) 3.0)))))))))))
(if (<= x1 -2e+155)
t_1
(if (<= x1 -5e+102)
(+
x1
(+
t_3
(+
x1
(+
(* x2 -4.0)
(+
(* x2 8.0)
(*
x1
(+
2.0
(*
x1
(+
(* x2 -4.0)
(+
(* x1 -2.0)
(+
(* -2.0 (- 3.0 (* 2.0 x2)))
(+ (* x2 8.0) (* x2 6.0)))))))))))))
(if (<= x1 -62.0)
t_5
(if (<= x1 8e+24)
(+
t_1
(* x2 (- (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 12.0) 12.0))) 6.0)))
(if (<= x1 2e+152) t_5 t_1)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * ((x1 * 9.0) + -1.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + ((t_4 - 3.0) * ((x1 * 2.0) * 3.0))))))));
double tmp;
if (x1 <= -2e+155) {
tmp = t_1;
} else if (x1 <= -5e+102) {
tmp = x1 + (t_3 + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0))))))))))));
} else if (x1 <= -62.0) {
tmp = t_5;
} else if (x1 <= 8e+24) {
tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else if (x1 <= 2e+152) {
tmp = t_5;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * ((x1 * 9.0d0) + (-1.0d0))
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)
t_4 = ((t_0 + (2.0d0 * x2)) - x1) / t_2
t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_2 * (((x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)) + ((t_4 - 3.0d0) * ((x1 * 2.0d0) * 3.0d0))))))))
if (x1 <= (-2d+155)) then
tmp = t_1
else if (x1 <= (-5d+102)) then
tmp = x1 + (t_3 + (x1 + ((x2 * (-4.0d0)) + ((x2 * 8.0d0) + (x1 * (2.0d0 + (x1 * ((x2 * (-4.0d0)) + ((x1 * (-2.0d0)) + (((-2.0d0) * (3.0d0 - (2.0d0 * x2))) + ((x2 * 8.0d0) + (x2 * 6.0d0))))))))))))
else if (x1 <= (-62.0d0)) then
tmp = t_5
else if (x1 <= 8d+24) then
tmp = t_1 + (x2 * (((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 12.0d0) - 12.0d0))) - 6.0d0))
else if (x1 <= 2d+152) then
tmp = t_5
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * ((x1 * 9.0) + -1.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + ((t_4 - 3.0) * ((x1 * 2.0) * 3.0))))))));
double tmp;
if (x1 <= -2e+155) {
tmp = t_1;
} else if (x1 <= -5e+102) {
tmp = x1 + (t_3 + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0))))))))))));
} else if (x1 <= -62.0) {
tmp = t_5;
} else if (x1 <= 8e+24) {
tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else if (x1 <= 2e+152) {
tmp = t_5;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 * ((x1 * 9.0) + -1.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2) t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2 t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + ((t_4 - 3.0) * ((x1 * 2.0) * 3.0)))))))) tmp = 0 if x1 <= -2e+155: tmp = t_1 elif x1 <= -5e+102: tmp = x1 + (t_3 + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0)))))))))))) elif x1 <= -62.0: tmp = t_5 elif x1 <= 8e+24: tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)) elif x1 <= 2e+152: tmp = t_5 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) t_5 = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)) + Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * 3.0))))))))) tmp = 0.0 if (x1 <= -2e+155) tmp = t_1; elseif (x1 <= -5e+102) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x2 * -4.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(Float64(x2 * -4.0) + Float64(Float64(x1 * -2.0) + Float64(Float64(-2.0 * Float64(3.0 - Float64(2.0 * x2))) + Float64(Float64(x2 * 8.0) + Float64(x2 * 6.0))))))))))))); elseif (x1 <= -62.0) tmp = t_5; elseif (x1 <= 8e+24) tmp = Float64(t_1 + Float64(x2 * Float64(Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 12.0) - 12.0))) - 6.0))); elseif (x1 <= 2e+152) tmp = t_5; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 * ((x1 * 9.0) + -1.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2); t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2; t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_2 * (((x1 * x1) * ((t_4 * 4.0) - 6.0)) + ((t_4 - 3.0) * ((x1 * 2.0) * 3.0)))))))); tmp = 0.0; if (x1 <= -2e+155) tmp = t_1; elseif (x1 <= -5e+102) tmp = x1 + (t_3 + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0)))))))))))); elseif (x1 <= -62.0) tmp = t_5; elseif (x1 <= 8e+24) tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)); elseif (x1 <= 2e+152) tmp = t_5; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2e+155], t$95$1, If[LessEqual[x1, -5e+102], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(2.0 + N[(x1 * N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x1 * -2.0), $MachinePrecision] + N[(N[(-2.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -62.0], t$95$5, If[LessEqual[x1, 8e+24], N[(t$95$1 + N[(x2 * N[(N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], t$95$5, t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 9 + -1\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
t_5 := x1 + \left(t\_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_0 + t\_2 \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 3\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(x2 \cdot -4 + \left(x2 \cdot 8 + x1 \cdot \left(2 + x1 \cdot \left(x2 \cdot -4 + \left(x1 \cdot -2 + \left(-2 \cdot \left(3 - 2 \cdot x2\right) + \left(x2 \cdot 8 + x2 \cdot 6\right)\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -62:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 8 \cdot 10^{+24}:\\
\;\;\;\;t\_1 + x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 12 - 12\right)\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -2.00000000000000001e155 or 2.0000000000000001e152 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 73.8%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
if -2.00000000000000001e155 < x1 < -5e102Initial program 0.0%
Taylor expanded in x1 around -inf 0.0%
Taylor expanded in x2 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 100.0%
if -5e102 < x1 < -62 or 7.9999999999999999e24 < x1 < 2.0000000000000001e152Initial program 99.3%
Taylor expanded in x1 around inf 90.5%
Taylor expanded in x1 around inf 90.5%
if -62 < x1 < 7.9999999999999999e24Initial program 99.5%
Simplified99.8%
Taylor expanded in x1 around 0 85.2%
Taylor expanded in x2 around 0 85.2%
Taylor expanded in x2 around 0 97.6%
Final simplification97.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -7.3e+40) (not (<= x1 5.2e+51)))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -7.3e+40) || !(x1 <= 5.2e+51)) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-7.3d+40)) .or. (.not. (x1 <= 5.2d+51))) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -7.3e+40) || !(x1 <= 5.2e+51)) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -7.3e+40) or not (x1 <= 5.2e+51): tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -7.3e+40) || !(x1 <= 5.2e+51)) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -7.3e+40) || ~((x1 <= 5.2e+51))) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -7.3e+40], N[Not[LessEqual[x1, 5.2e+51]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -7.3 \cdot 10^{+40} \lor \neg \left(x1 \leq 5.2 \cdot 10^{+51}\right):\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_2 + t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -7.3000000000000005e40 or 5.2000000000000002e51 < x1 Initial program 26.1%
Taylor expanded in x1 around inf 32.0%
Taylor expanded in x1 around inf 97.6%
if -7.3000000000000005e40 < x1 < 5.2000000000000002e51Initial program 99.4%
Taylor expanded in x1 around inf 96.5%
Final simplification97.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (+ (* x1 9.0) -1.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2)))
(t_4 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_5
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_4)
(*
t_2
(+ (* (* x1 x1) 6.0) (* (- t_4 3.0) (* (* x1 2.0) 3.0)))))))))))
(if (<= x1 -4.4e+153)
t_1
(if (<= x1 -4.5e+102)
(+
x1
(+
t_3
(+
x1
(+
(* x2 -4.0)
(+
(* x2 8.0)
(*
x1
(+
2.0
(*
x1
(+
(* x2 -4.0)
(+
(* x1 -2.0)
(+
(* -2.0 (- 3.0 (* 2.0 x2)))
(+ (* x2 8.0) (* x2 6.0)))))))))))))
(if (<= x1 -75.0)
t_5
(if (<= x1 2.8e+24)
(+
t_1
(* x2 (- (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 12.0) 12.0))) 6.0)))
(if (<= x1 2e+152) t_5 t_1)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * ((x1 * 9.0) + -1.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * (((x1 * x1) * 6.0) + ((t_4 - 3.0) * ((x1 * 2.0) * 3.0))))))));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_1;
} else if (x1 <= -4.5e+102) {
tmp = x1 + (t_3 + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0))))))))))));
} else if (x1 <= -75.0) {
tmp = t_5;
} else if (x1 <= 2.8e+24) {
tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else if (x1 <= 2e+152) {
tmp = t_5;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * ((x1 * 9.0d0) + (-1.0d0))
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)
t_4 = ((t_0 + (2.0d0 * x2)) - x1) / t_2
t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * (((x1 * x1) * 6.0d0) + ((t_4 - 3.0d0) * ((x1 * 2.0d0) * 3.0d0))))))))
if (x1 <= (-4.4d+153)) then
tmp = t_1
else if (x1 <= (-4.5d+102)) then
tmp = x1 + (t_3 + (x1 + ((x2 * (-4.0d0)) + ((x2 * 8.0d0) + (x1 * (2.0d0 + (x1 * ((x2 * (-4.0d0)) + ((x1 * (-2.0d0)) + (((-2.0d0) * (3.0d0 - (2.0d0 * x2))) + ((x2 * 8.0d0) + (x2 * 6.0d0))))))))))))
else if (x1 <= (-75.0d0)) then
tmp = t_5
else if (x1 <= 2.8d+24) then
tmp = t_1 + (x2 * (((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 12.0d0) - 12.0d0))) - 6.0d0))
else if (x1 <= 2d+152) then
tmp = t_5
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * ((x1 * 9.0) + -1.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * (((x1 * x1) * 6.0) + ((t_4 - 3.0) * ((x1 * 2.0) * 3.0))))))));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_1;
} else if (x1 <= -4.5e+102) {
tmp = x1 + (t_3 + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0))))))))))));
} else if (x1 <= -75.0) {
tmp = t_5;
} else if (x1 <= 2.8e+24) {
tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else if (x1 <= 2e+152) {
tmp = t_5;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 * ((x1 * 9.0) + -1.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2) t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2 t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * (((x1 * x1) * 6.0) + ((t_4 - 3.0) * ((x1 * 2.0) * 3.0)))))))) tmp = 0 if x1 <= -4.4e+153: tmp = t_1 elif x1 <= -4.5e+102: tmp = x1 + (t_3 + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0)))))))))))) elif x1 <= -75.0: tmp = t_5 elif x1 <= 2.8e+24: tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)) elif x1 <= 2e+152: tmp = t_5 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) t_5 = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_4) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * 3.0))))))))) tmp = 0.0 if (x1 <= -4.4e+153) tmp = t_1; elseif (x1 <= -4.5e+102) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x2 * -4.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(Float64(x2 * -4.0) + Float64(Float64(x1 * -2.0) + Float64(Float64(-2.0 * Float64(3.0 - Float64(2.0 * x2))) + Float64(Float64(x2 * 8.0) + Float64(x2 * 6.0))))))))))))); elseif (x1 <= -75.0) tmp = t_5; elseif (x1 <= 2.8e+24) tmp = Float64(t_1 + Float64(x2 * Float64(Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 12.0) - 12.0))) - 6.0))); elseif (x1 <= 2e+152) tmp = t_5; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 * ((x1 * 9.0) + -1.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2); t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2; t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * (((x1 * x1) * 6.0) + ((t_4 - 3.0) * ((x1 * 2.0) * 3.0)))))))); tmp = 0.0; if (x1 <= -4.4e+153) tmp = t_1; elseif (x1 <= -4.5e+102) tmp = x1 + (t_3 + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0)))))))))))); elseif (x1 <= -75.0) tmp = t_5; elseif (x1 <= 2.8e+24) tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)); elseif (x1 <= 2e+152) tmp = t_5; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$4), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], t$95$1, If[LessEqual[x1, -4.5e+102], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(2.0 + N[(x1 * N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x1 * -2.0), $MachinePrecision] + N[(N[(-2.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -75.0], t$95$5, If[LessEqual[x1, 2.8e+24], N[(t$95$1 + N[(x2 * N[(N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], t$95$5, t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 9 + -1\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
t_5 := x1 + \left(t\_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_4 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(t\_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot 3\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -4.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(x2 \cdot -4 + \left(x2 \cdot 8 + x1 \cdot \left(2 + x1 \cdot \left(x2 \cdot -4 + \left(x1 \cdot -2 + \left(-2 \cdot \left(3 - 2 \cdot x2\right) + \left(x2 \cdot 8 + x2 \cdot 6\right)\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -75:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 2.8 \cdot 10^{+24}:\\
\;\;\;\;t\_1 + x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 12 - 12\right)\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153 or 2.0000000000000001e152 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 73.8%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -4.50000000000000021e102Initial program 0.0%
Taylor expanded in x1 around -inf 0.0%
Taylor expanded in x2 around inf 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 100.0%
if -4.50000000000000021e102 < x1 < -75 or 2.8000000000000002e24 < x1 < 2.0000000000000001e152Initial program 99.3%
Taylor expanded in x1 around inf 90.5%
Taylor expanded in x1 around inf 81.6%
if -75 < x1 < 2.8000000000000002e24Initial program 99.5%
Simplified99.8%
Taylor expanded in x1 around 0 85.2%
Taylor expanded in x2 around 0 85.2%
Taylor expanded in x2 around 0 97.6%
Final simplification95.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* x1 9.0) -1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2)))
(if (<= x1 -130.0)
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0))
(if (<= x1 0.014)
(+ t_0 (* x2 (- (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 12.0) 12.0))) 6.0)))
(if (<= x1 2e+152)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_1)
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(+ (* 4.0 (- (* 2.0 x2) 3.0)) (* x1 (- (* x1 6.0) 4.0))))))))))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) + -1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double tmp;
if (x1 <= -130.0) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
} else if (x1 <= 0.014) {
tmp = t_0 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else if (x1 <= 2e+152) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((4.0 * ((2.0 * x2) - 3.0)) + (x1 * ((x1 * 6.0) - 4.0)))))))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * ((x1 * 9.0d0) + (-1.0d0))
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
if (x1 <= (-130.0d0)) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
else if (x1 <= 0.014d0) then
tmp = t_0 + (x2 * (((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 12.0d0) - 12.0d0))) - 6.0d0))
else if (x1 <= 2d+152) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (t_2 * ((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((4.0d0 * ((2.0d0 * x2) - 3.0d0)) + (x1 * ((x1 * 6.0d0) - 4.0d0)))))))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) + -1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double tmp;
if (x1 <= -130.0) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
} else if (x1 <= 0.014) {
tmp = t_0 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else if (x1 <= 2e+152) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((4.0 * ((2.0 * x2) - 3.0)) + (x1 * ((x1 * 6.0) - 4.0)))))))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) + -1.0) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 tmp = 0 if x1 <= -130.0: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) elif x1 <= 0.014: tmp = t_0 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)) elif x1 <= 2e+152: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((4.0 * ((2.0 * x2) - 3.0)) + (x1 * ((x1 * 6.0) - 4.0))))))))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) tmp = 0.0 if (x1 <= -130.0) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); elseif (x1 <= 0.014) tmp = Float64(t_0 + Float64(x2 * Float64(Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 12.0) - 12.0))) - 6.0))); elseif (x1 <= 2e+152) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 4.0)))))))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) + -1.0); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; tmp = 0.0; if (x1 <= -130.0) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); elseif (x1 <= 0.014) tmp = t_0 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)); elseif (x1 <= 2e+152) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((4.0 * ((2.0 * x2) - 3.0)) + (x1 * ((x1 * 6.0) - 4.0))))))))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -130.0], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.014], N[(t$95$0 + N[(x2 * N[(N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], 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[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(4.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 + -1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 \leq -130:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\mathbf{elif}\;x1 \leq 0.014:\\
\;\;\;\;t\_0 + x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 12 - 12\right)\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_1 + t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(4 \cdot \left(2 \cdot x2 - 3\right) + x1 \cdot \left(x1 \cdot 6 - 4\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -130Initial program 24.4%
Taylor expanded in x1 around inf 32.8%
Taylor expanded in x1 around inf 94.3%
if -130 < x1 < 0.0140000000000000003Initial program 99.4%
Simplified99.8%
Taylor expanded in x1 around 0 86.9%
Taylor expanded in x2 around 0 86.9%
Taylor expanded in x2 around 0 99.8%
if 0.0140000000000000003 < x1 < 2.0000000000000001e152Initial program 99.5%
Taylor expanded in x1 around -inf 99.6%
Taylor expanded in x1 around 0 99.6%
Taylor expanded in x1 around inf 99.6%
if 2.0000000000000001e152 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 80.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
Final simplification98.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* x1 (+ (* x1 9.0) -1.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 6.0 t_0))
(t_4 (* x1 (* x1 3.0)))
(t_5 (/ (- (+ t_4 (* 2.0 x2)) x1) t_2))
(t_6 (* 3.0 (/ (- (- t_4 (* 2.0 x2)) x1) t_2)))
(t_7 (* x1 (* x1 x1))))
(if (<= x1 -4.4e+153)
t_1
(if (<= x1 -6.2e+23)
(+
x1
(+
t_6
(+
x1
(*
x1
(+
t_3
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_3 (* 6.0 (+ 3.0 (* x2 -2.0)))) 6.0))))
12.0)))))))
(if (<= x1 0.027)
(+
t_1
(* x2 (- (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 12.0) 12.0))) 6.0)))
(if (<= x1 1e+86)
(+
x1
(+
9.0
(+
x1
(+
t_7
(+
(* t_4 t_5)
(* t_2 (+ (* (* (* x1 2.0) t_5) (- t_5 3.0)) (* x2 8.0))))))))
(if (<= x1 2e+152)
(+
x1
(+ t_6 (+ x1 (+ t_7 (+ (* x2 8.0) (* 4.0 (* x1 (* x2 t_0))))))))
t_1)))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = x1 * ((x1 * 9.0) + -1.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 6.0 * t_0;
double t_4 = x1 * (x1 * 3.0);
double t_5 = ((t_4 + (2.0 * x2)) - x1) / t_2;
double t_6 = 3.0 * (((t_4 - (2.0 * x2)) - x1) / t_2);
double t_7 = x1 * (x1 * x1);
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_1;
} else if (x1 <= -6.2e+23) {
tmp = x1 + (t_6 + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_3 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 0.027) {
tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else if (x1 <= 1e+86) {
tmp = x1 + (9.0 + (x1 + (t_7 + ((t_4 * t_5) + (t_2 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + (x2 * 8.0)))))));
} else if (x1 <= 2e+152) {
tmp = x1 + (t_6 + (x1 + (t_7 + ((x2 * 8.0) + (4.0 * (x1 * (x2 * t_0)))))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: 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 * 9.0d0) + (-1.0d0))
t_2 = (x1 * x1) + 1.0d0
t_3 = 6.0d0 * t_0
t_4 = x1 * (x1 * 3.0d0)
t_5 = ((t_4 + (2.0d0 * x2)) - x1) / t_2
t_6 = 3.0d0 * (((t_4 - (2.0d0 * x2)) - x1) / t_2)
t_7 = x1 * (x1 * x1)
if (x1 <= (-4.4d+153)) then
tmp = t_1
else if (x1 <= (-6.2d+23)) then
tmp = x1 + (t_6 + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_3 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 6.0d0)))) - 12.0d0))))))
else if (x1 <= 0.027d0) then
tmp = t_1 + (x2 * (((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 12.0d0) - 12.0d0))) - 6.0d0))
else if (x1 <= 1d+86) then
tmp = x1 + (9.0d0 + (x1 + (t_7 + ((t_4 * t_5) + (t_2 * ((((x1 * 2.0d0) * t_5) * (t_5 - 3.0d0)) + (x2 * 8.0d0)))))))
else if (x1 <= 2d+152) then
tmp = x1 + (t_6 + (x1 + (t_7 + ((x2 * 8.0d0) + (4.0d0 * (x1 * (x2 * t_0)))))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = x1 * ((x1 * 9.0) + -1.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 6.0 * t_0;
double t_4 = x1 * (x1 * 3.0);
double t_5 = ((t_4 + (2.0 * x2)) - x1) / t_2;
double t_6 = 3.0 * (((t_4 - (2.0 * x2)) - x1) / t_2);
double t_7 = x1 * (x1 * x1);
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_1;
} else if (x1 <= -6.2e+23) {
tmp = x1 + (t_6 + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_3 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 0.027) {
tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else if (x1 <= 1e+86) {
tmp = x1 + (9.0 + (x1 + (t_7 + ((t_4 * t_5) + (t_2 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + (x2 * 8.0)))))));
} else if (x1 <= 2e+152) {
tmp = x1 + (t_6 + (x1 + (t_7 + ((x2 * 8.0) + (4.0 * (x1 * (x2 * t_0)))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = x1 * ((x1 * 9.0) + -1.0) t_2 = (x1 * x1) + 1.0 t_3 = 6.0 * t_0 t_4 = x1 * (x1 * 3.0) t_5 = ((t_4 + (2.0 * x2)) - x1) / t_2 t_6 = 3.0 * (((t_4 - (2.0 * x2)) - x1) / t_2) t_7 = x1 * (x1 * x1) tmp = 0 if x1 <= -4.4e+153: tmp = t_1 elif x1 <= -6.2e+23: tmp = x1 + (t_6 + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_3 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))) elif x1 <= 0.027: tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)) elif x1 <= 1e+86: tmp = x1 + (9.0 + (x1 + (t_7 + ((t_4 * t_5) + (t_2 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + (x2 * 8.0))))))) elif x1 <= 2e+152: tmp = x1 + (t_6 + (x1 + (t_7 + ((x2 * 8.0) + (4.0 * (x1 * (x2 * t_0))))))) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(6.0 * t_0) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(Float64(Float64(t_4 + Float64(2.0 * x2)) - x1) / t_2) t_6 = Float64(3.0 * Float64(Float64(Float64(t_4 - Float64(2.0 * x2)) - x1) / t_2)) t_7 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if (x1 <= -4.4e+153) tmp = t_1; elseif (x1 <= -6.2e+23) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(x1 * Float64(t_3 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_3 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 6.0)))) - 12.0))))))); elseif (x1 <= 0.027) tmp = Float64(t_1 + Float64(x2 * Float64(Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 12.0) - 12.0))) - 6.0))); elseif (x1 <= 1e+86) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_7 + Float64(Float64(t_4 * t_5) + Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(t_5 - 3.0)) + Float64(x2 * 8.0)))))))); elseif (x1 <= 2e+152) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_7 + Float64(Float64(x2 * 8.0) + Float64(4.0 * Float64(x1 * Float64(x2 * t_0)))))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = x1 * ((x1 * 9.0) + -1.0); t_2 = (x1 * x1) + 1.0; t_3 = 6.0 * t_0; t_4 = x1 * (x1 * 3.0); t_5 = ((t_4 + (2.0 * x2)) - x1) / t_2; t_6 = 3.0 * (((t_4 - (2.0 * x2)) - x1) / t_2); t_7 = x1 * (x1 * x1); tmp = 0.0; if (x1 <= -4.4e+153) tmp = t_1; elseif (x1 <= -6.2e+23) tmp = x1 + (t_6 + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_3 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))); elseif (x1 <= 0.027) tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)); elseif (x1 <= 1e+86) tmp = x1 + (9.0 + (x1 + (t_7 + ((t_4 * t_5) + (t_2 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + (x2 * 8.0))))))); elseif (x1 <= 2e+152) tmp = x1 + (t_6 + (x1 + (t_7 + ((x2 * 8.0) + (4.0 * (x1 * (x2 * t_0))))))); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(6.0 * t$95$0), $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$2), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(N[(N[(t$95$4 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], t$95$1, If[LessEqual[x1, -6.2e+23], N[(x1 + N[(t$95$6 + N[(x1 + N[(x1 * N[(t$95$3 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$3 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.027], N[(t$95$1 + N[(x2 * N[(N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+86], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$7 + N[(N[(t$95$4 * t$95$5), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$7 + N[(N[(x2 * 8.0), $MachinePrecision] + N[(4.0 * N[(x1 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := x1 \cdot \left(x1 \cdot 9 + -1\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 6 \cdot t\_0\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := \frac{\left(t\_4 + 2 \cdot x2\right) - x1}{t\_2}\\
t_6 := 3 \cdot \frac{\left(t\_4 - 2 \cdot x2\right) - x1}{t\_2}\\
t_7 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -6.2 \cdot 10^{+23}:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + x1 \cdot \left(t\_3 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_3 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 6\right)\right)\right) - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.027:\\
\;\;\;\;t\_1 + x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 12 - 12\right)\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 10^{+86}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_7 + \left(t\_4 \cdot t\_5 + t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \left(t\_5 - 3\right) + x2 \cdot 8\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + \left(t\_7 + \left(x2 \cdot 8 + 4 \cdot \left(x1 \cdot \left(x2 \cdot t\_0\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153 or 2.0000000000000001e152 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 73.8%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -6.19999999999999941e23Initial program 59.5%
Taylor expanded in x1 around inf 59.5%
Taylor expanded in x1 around 0 48.8%
if -6.19999999999999941e23 < x1 < 0.0269999999999999997Initial program 99.4%
Simplified99.7%
Taylor expanded in x1 around 0 85.0%
Taylor expanded in x2 around 0 85.0%
Taylor expanded in x2 around 0 97.6%
if 0.0269999999999999997 < x1 < 1e86Initial program 99.0%
Taylor expanded in x1 around -inf 99.1%
Taylor expanded in x2 around inf 48.2%
*-commutative48.2%
Simplified48.2%
Taylor expanded in x1 around inf 48.2%
if 1e86 < x1 < 2.0000000000000001e152Initial program 100.0%
Taylor expanded in x1 around -inf 100.0%
Taylor expanded in x2 around inf 48.5%
*-commutative48.5%
Simplified48.5%
Taylor expanded in x1 around 0 81.8%
Final simplification89.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 6.0 (- (* 2.0 x2) 3.0))) (t_1 (* x1 (+ (* x1 9.0) -1.0))))
(if (<= x1 -4.4e+153)
t_1
(if (<= x1 -6.2e+23)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+
x1
(*
x1
(+
t_0
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_0 (* 6.0 (+ 3.0 (* x2 -2.0)))) 6.0))))
12.0)))))))
(if (<= x1 3.5e+98)
(+
t_1
(* x2 (- (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 12.0) 12.0))) 6.0)))
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0)))))))
double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.0);
double t_1 = x1 * ((x1 * 9.0) + -1.0);
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_1;
} else if (x1 <= -6.2e+23) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 3.5e+98) {
tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else {
tmp = x2 * (((x1 * (x1 * 9.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) :: t_1
real(8) :: tmp
t_0 = 6.0d0 * ((2.0d0 * x2) - 3.0d0)
t_1 = x1 * ((x1 * 9.0d0) + (-1.0d0))
if (x1 <= (-4.4d+153)) then
tmp = t_1
else if (x1 <= (-6.2d+23)) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_0 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 6.0d0)))) - 12.0d0))))))
else if (x1 <= 3.5d+98) then
tmp = t_1 + (x2 * (((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 12.0d0) - 12.0d0))) - 6.0d0))
else
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.0);
double t_1 = x1 * ((x1 * 9.0) + -1.0);
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_1;
} else if (x1 <= -6.2e+23) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 3.5e+98) {
tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): t_0 = 6.0 * ((2.0 * x2) - 3.0) t_1 = x1 * ((x1 * 9.0) + -1.0) tmp = 0 if x1 <= -4.4e+153: tmp = t_1 elif x1 <= -6.2e+23: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))) elif x1 <= 3.5e+98: tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)) else: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) return tmp
function code(x1, x2) t_0 = Float64(6.0 * Float64(Float64(2.0 * x2) - 3.0)) t_1 = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) tmp = 0.0 if (x1 <= -4.4e+153) tmp = t_1; elseif (x1 <= -6.2e+23) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(x1 * Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_0 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 6.0)))) - 12.0))))))); elseif (x1 <= 3.5e+98) tmp = Float64(t_1 + Float64(x2 * Float64(Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 12.0) - 12.0))) - 6.0))); else tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 6.0 * ((2.0 * x2) - 3.0); t_1 = x1 * ((x1 * 9.0) + -1.0); tmp = 0.0; if (x1 <= -4.4e+153) tmp = t_1; elseif (x1 <= -6.2e+23) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))); elseif (x1 <= 3.5e+98) tmp = t_1 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)); else tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], t$95$1, If[LessEqual[x1, -6.2e+23], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$0 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.5e+98], N[(t$95$1 + N[(x2 * N[(N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(2 \cdot x2 - 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 9 + -1\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -6.2 \cdot 10^{+23}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + x1 \cdot \left(t\_0 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_0 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 6\right)\right)\right) - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+98}:\\
\;\;\;\;t\_1 + x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 12 - 12\right)\right) - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 68.9%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -6.19999999999999941e23Initial program 59.5%
Taylor expanded in x1 around inf 59.5%
Taylor expanded in x1 around 0 48.8%
if -6.19999999999999941e23 < x1 < 3.5e98Initial program 99.4%
Simplified99.7%
Taylor expanded in x1 around 0 75.8%
Taylor expanded in x2 around 0 76.5%
Taylor expanded in x2 around 0 87.2%
if 3.5e98 < x1 Initial program 22.2%
Simplified22.2%
Taylor expanded in x1 around 0 69.8%
Taylor expanded in x2 around 0 79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in x2 around inf 89.7%
Taylor expanded in x1 around inf 89.7%
*-commutative89.7%
Simplified89.7%
Final simplification86.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* x1 9.0) -1.0))))
(if (<= x1 -4.4e+153)
t_0
(if (<= x1 -1.15e+24)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+
x1
(+
(* x2 -4.0)
(+
(* x2 8.0)
(*
x1
(+
2.0
(*
x1
(+
(* x2 -4.0)
(+
(* x1 -2.0)
(+
(* -2.0 (- 3.0 (* 2.0 x2)))
(+ (* x2 8.0) (* x2 6.0)))))))))))))
(if (<= x1 6.2e+96)
(+
t_0
(* x2 (- (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 12.0) 12.0))) 6.0)))
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) + -1.0);
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_0;
} else if (x1 <= -1.15e+24) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0))))))))))));
} else if (x1 <= 6.2e+96) {
tmp = t_0 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else {
tmp = x2 * (((x1 * (x1 * 9.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 * ((x1 * 9.0d0) + (-1.0d0))
if (x1 <= (-4.4d+153)) then
tmp = t_0
else if (x1 <= (-1.15d+24)) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + ((x2 * (-4.0d0)) + ((x2 * 8.0d0) + (x1 * (2.0d0 + (x1 * ((x2 * (-4.0d0)) + ((x1 * (-2.0d0)) + (((-2.0d0) * (3.0d0 - (2.0d0 * x2))) + ((x2 * 8.0d0) + (x2 * 6.0d0))))))))))))
else if (x1 <= 6.2d+96) then
tmp = t_0 + (x2 * (((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 12.0d0) - 12.0d0))) - 6.0d0))
else
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) + -1.0);
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_0;
} else if (x1 <= -1.15e+24) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0))))))))))));
} else if (x1 <= 6.2e+96) {
tmp = t_0 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
} else {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) + -1.0) tmp = 0 if x1 <= -4.4e+153: tmp = t_0 elif x1 <= -1.15e+24: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0)))))))))))) elif x1 <= 6.2e+96: tmp = t_0 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)) else: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) tmp = 0.0 if (x1 <= -4.4e+153) tmp = t_0; elseif (x1 <= -1.15e+24) 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(Float64(x2 * -4.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(Float64(x2 * -4.0) + Float64(Float64(x1 * -2.0) + Float64(Float64(-2.0 * Float64(3.0 - Float64(2.0 * x2))) + Float64(Float64(x2 * 8.0) + Float64(x2 * 6.0))))))))))))); elseif (x1 <= 6.2e+96) tmp = Float64(t_0 + Float64(x2 * Float64(Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 12.0) - 12.0))) - 6.0))); else tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) + -1.0); tmp = 0.0; if (x1 <= -4.4e+153) tmp = t_0; elseif (x1 <= -1.15e+24) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + ((x2 * -4.0) + ((x2 * 8.0) + (x1 * (2.0 + (x1 * ((x2 * -4.0) + ((x1 * -2.0) + ((-2.0 * (3.0 - (2.0 * x2))) + ((x2 * 8.0) + (x2 * 6.0)))))))))))); elseif (x1 <= 6.2e+96) tmp = t_0 + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)); else tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], t$95$0, If[LessEqual[x1, -1.15e+24], 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[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(2.0 + N[(x1 * N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x1 * -2.0), $MachinePrecision] + N[(N[(-2.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.2e+96], N[(t$95$0 + N[(x2 * N[(N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 + -1\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.15 \cdot 10^{+24}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + \left(x2 \cdot -4 + \left(x2 \cdot 8 + x1 \cdot \left(2 + x1 \cdot \left(x2 \cdot -4 + \left(x1 \cdot -2 + \left(-2 \cdot \left(3 - 2 \cdot x2\right) + \left(x2 \cdot 8 + x2 \cdot 6\right)\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 6.2 \cdot 10^{+96}:\\
\;\;\;\;t\_0 + x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 12 - 12\right)\right) - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 68.9%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x2 around inf 100.0%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -1.15e24Initial program 59.5%
Taylor expanded in x1 around -inf 59.6%
Taylor expanded in x2 around inf 9.5%
*-commutative9.5%
Simplified9.5%
Taylor expanded in x1 around inf 9.5%
Taylor expanded in x1 around 0 48.8%
if -1.15e24 < x1 < 6.1999999999999996e96Initial program 99.4%
Simplified99.7%
Taylor expanded in x1 around 0 75.8%
Taylor expanded in x2 around 0 76.5%
Taylor expanded in x2 around 0 87.2%
if 6.1999999999999996e96 < x1 Initial program 22.2%
Simplified22.2%
Taylor expanded in x1 around 0 69.8%
Taylor expanded in x2 around 0 79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in x2 around inf 89.7%
Taylor expanded in x1 around inf 89.7%
*-commutative89.7%
Simplified89.7%
Final simplification86.1%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -2.3e+44) (not (<= x1 1.05e+97)))
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0))
(+
(* x1 (+ (* x1 9.0) -1.0))
(* x2 (- (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 12.0) 12.0))) 6.0)))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.3e+44) || !(x1 <= 1.05e+97)) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else {
tmp = (x1 * ((x1 * 9.0) + -1.0)) + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 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.3d+44)) .or. (.not. (x1 <= 1.05d+97))) then
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
else
tmp = (x1 * ((x1 * 9.0d0) + (-1.0d0))) + (x2 * (((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 12.0d0) - 12.0d0))) - 6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.3e+44) || !(x1 <= 1.05e+97)) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else {
tmp = (x1 * ((x1 * 9.0) + -1.0)) + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -2.3e+44) or not (x1 <= 1.05e+97): tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) else: tmp = (x1 * ((x1 * 9.0) + -1.0)) + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -2.3e+44) || !(x1 <= 1.05e+97)) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); else tmp = Float64(Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) + Float64(x2 * Float64(Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 12.0) - 12.0))) - 6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -2.3e+44) || ~((x1 <= 1.05e+97))) tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); else tmp = (x1 * ((x1 * 9.0) + -1.0)) + (x2 * (((8.0 * (x1 * x2)) + (x1 * ((x1 * 12.0) - 12.0))) - 6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -2.3e+44], N[Not[LessEqual[x1, 1.05e+97]], $MachinePrecision]], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.3 \cdot 10^{+44} \lor \neg \left(x1 \leq 1.05 \cdot 10^{+97}\right):\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9 + -1\right) + x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 12 - 12\right)\right) - 6\right)\\
\end{array}
\end{array}
if x1 < -2.30000000000000004e44 or 1.05000000000000006e97 < x1 Initial program 19.6%
Simplified19.6%
Taylor expanded in x1 around 0 57.3%
Taylor expanded in x2 around 0 73.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in x2 around inf 83.3%
Taylor expanded in x1 around inf 83.3%
*-commutative83.3%
Simplified83.3%
if -2.30000000000000004e44 < x1 < 1.05000000000000006e97Initial program 99.4%
Simplified99.6%
Taylor expanded in x1 around 0 74.4%
Taylor expanded in x2 around 0 75.1%
Taylor expanded in x2 around 0 85.5%
Final simplification84.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 6.4e-161)
(* x2 (- (* x1 (+ (* 9.0 (/ x1 x2)) (/ -1.0 x2))) 6.0))
(if (<= x1 3.9e+96)
(+
(* x2 -6.0)
(*
x1
(+ (+ (* x1 9.0) (* x2 (- (+ (* x1 12.0) (* x2 8.0)) 12.0))) -1.0)))
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 6.4e-161) {
tmp = x2 * ((x1 * ((9.0 * (x1 / x2)) + (-1.0 / x2))) - 6.0);
} else if (x1 <= 3.9e+96) {
tmp = (x2 * -6.0) + (x1 * (((x1 * 9.0) + (x2 * (((x1 * 12.0) + (x2 * 8.0)) - 12.0))) + -1.0));
} else {
tmp = x2 * (((x1 * (x1 * 9.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 <= 6.4d-161) then
tmp = x2 * ((x1 * ((9.0d0 * (x1 / x2)) + ((-1.0d0) / x2))) - 6.0d0)
else if (x1 <= 3.9d+96) then
tmp = (x2 * (-6.0d0)) + (x1 * (((x1 * 9.0d0) + (x2 * (((x1 * 12.0d0) + (x2 * 8.0d0)) - 12.0d0))) + (-1.0d0)))
else
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 6.4e-161) {
tmp = x2 * ((x1 * ((9.0 * (x1 / x2)) + (-1.0 / x2))) - 6.0);
} else if (x1 <= 3.9e+96) {
tmp = (x2 * -6.0) + (x1 * (((x1 * 9.0) + (x2 * (((x1 * 12.0) + (x2 * 8.0)) - 12.0))) + -1.0));
} else {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 6.4e-161: tmp = x2 * ((x1 * ((9.0 * (x1 / x2)) + (-1.0 / x2))) - 6.0) elif x1 <= 3.9e+96: tmp = (x2 * -6.0) + (x1 * (((x1 * 9.0) + (x2 * (((x1 * 12.0) + (x2 * 8.0)) - 12.0))) + -1.0)) else: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 6.4e-161) tmp = Float64(x2 * Float64(Float64(x1 * Float64(Float64(9.0 * Float64(x1 / x2)) + Float64(-1.0 / x2))) - 6.0)); elseif (x1 <= 3.9e+96) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x1 * 9.0) + Float64(x2 * Float64(Float64(Float64(x1 * 12.0) + Float64(x2 * 8.0)) - 12.0))) + -1.0))); else tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 6.4e-161) tmp = x2 * ((x1 * ((9.0 * (x1 / x2)) + (-1.0 / x2))) - 6.0); elseif (x1 <= 3.9e+96) tmp = (x2 * -6.0) + (x1 * (((x1 * 9.0) + (x2 * (((x1 * 12.0) + (x2 * 8.0)) - 12.0))) + -1.0)); else tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 6.4e-161], N[(x2 * N[(N[(x1 * N[(N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.9e+96], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x1 * 9.0), $MachinePrecision] + N[(x2 * N[(N[(N[(x1 * 12.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 6.4 \cdot 10^{-161}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot \left(9 \cdot \frac{x1}{x2} + \frac{-1}{x2}\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{+96}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(\left(x1 \cdot 9 + x2 \cdot \left(\left(x1 \cdot 12 + x2 \cdot 8\right) - 12\right)\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 6.39999999999999971e-161Initial program 64.5%
Simplified64.7%
Taylor expanded in x1 around 0 66.2%
Taylor expanded in x2 around 0 76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in x2 around inf 80.5%
Taylor expanded in x1 around 0 80.5%
if 6.39999999999999971e-161 < x1 < 3.9e96Initial program 99.4%
Simplified99.6%
Taylor expanded in x1 around 0 66.6%
Taylor expanded in x2 around 0 68.4%
if 3.9e96 < x1 Initial program 22.2%
Simplified22.2%
Taylor expanded in x1 around 0 69.8%
Taylor expanded in x2 around 0 79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in x2 around inf 89.7%
Taylor expanded in x1 around inf 89.7%
*-commutative89.7%
Simplified89.7%
Final simplification79.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 6.2e-161)
(* x2 (- (* x1 (+ (* 9.0 (/ x1 x2)) (/ -1.0 x2))) 6.0))
(if (<= x1 3e+97)
(+ (* x2 -6.0) (* x1 (+ (* x2 (- (* x2 8.0) 12.0)) -1.0)))
(* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 6.2e-161) {
tmp = x2 * ((x1 * ((9.0 * (x1 / x2)) + (-1.0 / x2))) - 6.0);
} else if (x1 <= 3e+97) {
tmp = (x2 * -6.0) + (x1 * ((x2 * ((x2 * 8.0) - 12.0)) + -1.0));
} else {
tmp = x2 * (((x1 * (x1 * 9.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 <= 6.2d-161) then
tmp = x2 * ((x1 * ((9.0d0 * (x1 / x2)) + ((-1.0d0) / x2))) - 6.0d0)
else if (x1 <= 3d+97) then
tmp = (x2 * (-6.0d0)) + (x1 * ((x2 * ((x2 * 8.0d0) - 12.0d0)) + (-1.0d0)))
else
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 6.2e-161) {
tmp = x2 * ((x1 * ((9.0 * (x1 / x2)) + (-1.0 / x2))) - 6.0);
} else if (x1 <= 3e+97) {
tmp = (x2 * -6.0) + (x1 * ((x2 * ((x2 * 8.0) - 12.0)) + -1.0));
} else {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 6.2e-161: tmp = x2 * ((x1 * ((9.0 * (x1 / x2)) + (-1.0 / x2))) - 6.0) elif x1 <= 3e+97: tmp = (x2 * -6.0) + (x1 * ((x2 * ((x2 * 8.0) - 12.0)) + -1.0)) else: tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 6.2e-161) tmp = Float64(x2 * Float64(Float64(x1 * Float64(Float64(9.0 * Float64(x1 / x2)) + Float64(-1.0 / x2))) - 6.0)); elseif (x1 <= 3e+97) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x2 * 8.0) - 12.0)) + -1.0))); else tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 6.2e-161) tmp = x2 * ((x1 * ((9.0 * (x1 / x2)) + (-1.0 / x2))) - 6.0); elseif (x1 <= 3e+97) tmp = (x2 * -6.0) + (x1 * ((x2 * ((x2 * 8.0) - 12.0)) + -1.0)); else tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 6.2e-161], N[(x2 * N[(N[(x1 * N[(N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3e+97], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x2 * 8.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 6.2 \cdot 10^{-161}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot \left(9 \cdot \frac{x1}{x2} + \frac{-1}{x2}\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 3 \cdot 10^{+97}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x2 \cdot 8 - 12\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 6.1999999999999997e-161Initial program 64.5%
Simplified64.7%
Taylor expanded in x1 around 0 66.2%
Taylor expanded in x2 around 0 76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in x2 around inf 80.5%
Taylor expanded in x1 around 0 80.5%
if 6.1999999999999997e-161 < x1 < 2.9999999999999998e97Initial program 99.4%
Simplified99.6%
Taylor expanded in x1 around 0 66.6%
Taylor expanded in x2 around 0 68.4%
Taylor expanded in x1 around 0 67.2%
if 2.9999999999999998e97 < x1 Initial program 22.2%
Simplified22.2%
Taylor expanded in x1 around 0 69.8%
Taylor expanded in x2 around 0 79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in x2 around inf 89.7%
Taylor expanded in x1 around inf 89.7%
*-commutative89.7%
Simplified89.7%
Final simplification79.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -3.7e+52) (not (<= x1 1.9e+51))) (* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0)) (+ (* x1 (+ (* x1 9.0) -1.0)) (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.7e+52) || !(x1 <= 1.9e+51)) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else {
tmp = (x1 * ((x1 * 9.0) + -1.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 <= (-3.7d+52)) .or. (.not. (x1 <= 1.9d+51))) then
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
else
tmp = (x1 * ((x1 * 9.0d0) + (-1.0d0))) + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.7e+52) || !(x1 <= 1.9e+51)) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else {
tmp = (x1 * ((x1 * 9.0) + -1.0)) + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -3.7e+52) or not (x1 <= 1.9e+51): tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) else: tmp = (x1 * ((x1 * 9.0) + -1.0)) + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -3.7e+52) || !(x1 <= 1.9e+51)) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); else tmp = Float64(Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -3.7e+52) || ~((x1 <= 1.9e+51))) tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); else tmp = (x1 * ((x1 * 9.0) + -1.0)) + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -3.7e+52], N[Not[LessEqual[x1, 1.9e+51]], $MachinePrecision]], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.7 \cdot 10^{+52} \lor \neg \left(x1 \leq 1.9 \cdot 10^{+51}\right):\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9 + -1\right) + x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -3.7e52 or 1.8999999999999999e51 < x1 Initial program 24.3%
Simplified24.3%
Taylor expanded in x1 around 0 55.7%
Taylor expanded in x2 around 0 69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in x2 around inf 78.6%
Taylor expanded in x1 around inf 78.6%
*-commutative78.6%
Simplified78.6%
if -3.7e52 < x1 < 1.8999999999999999e51Initial program 99.4%
Simplified99.6%
Taylor expanded in x1 around 0 76.6%
Taylor expanded in x2 around 0 68.4%
*-commutative68.4%
Simplified68.4%
Final simplification73.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -1.18e+24) (not (<= x1 1.5e-12))) (* x2 (- (/ (* x1 (* x1 9.0)) x2) 6.0)) (- (* x2 -6.0) x1)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.18e+24) || !(x1 <= 1.5e-12)) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-1.18d+24)) .or. (.not. (x1 <= 1.5d-12))) then
tmp = x2 * (((x1 * (x1 * 9.0d0)) / x2) - 6.0d0)
else
tmp = (x2 * (-6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.18e+24) || !(x1 <= 1.5e-12)) {
tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0);
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -1.18e+24) or not (x1 <= 1.5e-12): tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0) else: tmp = (x2 * -6.0) - x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -1.18e+24) || !(x1 <= 1.5e-12)) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(x1 * 9.0)) / x2) - 6.0)); else tmp = Float64(Float64(x2 * -6.0) - x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -1.18e+24) || ~((x1 <= 1.5e-12))) tmp = x2 * (((x1 * (x1 * 9.0)) / x2) - 6.0); else tmp = (x2 * -6.0) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -1.18e+24], N[Not[LessEqual[x1, 1.5e-12]], $MachinePrecision]], N[(x2 * N[(N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.18 \cdot 10^{+24} \lor \neg \left(x1 \leq 1.5 \cdot 10^{-12}\right):\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9\right)}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\end{array}
\end{array}
if x1 < -1.17999999999999997e24 or 1.5000000000000001e-12 < x1 Initial program 34.1%
Simplified34.1%
Taylor expanded in x1 around 0 51.9%
Taylor expanded in x2 around 0 60.6%
*-commutative60.6%
Simplified60.6%
Taylor expanded in x2 around inf 68.9%
Taylor expanded in x1 around inf 68.9%
*-commutative68.9%
Simplified68.9%
if -1.17999999999999997e24 < x1 < 1.5000000000000001e-12Initial program 99.4%
Simplified99.7%
Taylor expanded in x1 around 0 84.1%
Taylor expanded in x2 around 0 78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in x1 around 0 77.7%
*-commutative77.7%
mul-1-neg77.7%
unsub-neg77.7%
Simplified77.7%
Final simplification73.0%
(FPCore (x1 x2) :precision binary64 (if (<= x2 1.2e+45) (* x2 (- (/ (* x1 (+ (* x1 9.0) -1.0)) x2) 6.0)) (+ (* x2 -6.0) (* x1 (+ (* x1 (+ 9.0 (* x2 12.0))) -1.0)))))
double code(double x1, double x2) {
double tmp;
if (x2 <= 1.2e+45) {
tmp = x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0);
} else {
tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 12.0))) + -1.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= 1.2d+45) then
tmp = x2 * (((x1 * ((x1 * 9.0d0) + (-1.0d0))) / x2) - 6.0d0)
else
tmp = (x2 * (-6.0d0)) + (x1 * ((x1 * (9.0d0 + (x2 * 12.0d0))) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= 1.2e+45) {
tmp = x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0);
} else {
tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 12.0))) + -1.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= 1.2e+45: tmp = x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0) else: tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 12.0))) + -1.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= 1.2e+45) tmp = Float64(x2 * Float64(Float64(Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) / x2) - 6.0)); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(x2 * 12.0))) + -1.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= 1.2e+45) tmp = x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0); else tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x2 * 12.0))) + -1.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, 1.2e+45], N[(x2 * N[(N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9.0 + N[(x2 * 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq 1.2 \cdot 10^{+45}:\\
\;\;\;\;x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9 + -1\right)}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(9 + x2 \cdot 12\right) + -1\right)\\
\end{array}
\end{array}
if x2 < 1.19999999999999995e45Initial program 65.2%
Simplified65.4%
Taylor expanded in x1 around 0 67.5%
Taylor expanded in x2 around 0 73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in x2 around inf 79.2%
if 1.19999999999999995e45 < x2 Initial program 62.0%
Simplified62.0%
Taylor expanded in x1 around 0 64.9%
Taylor expanded in x2 around 0 70.1%
Taylor expanded in x1 around inf 66.1%
*-commutative66.1%
Simplified66.1%
Final simplification76.2%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -3.4e+132) (not (<= x1 1.15e-19))) (* x1 (+ (* x1 9.0) -1.0)) (* x2 (- (- 6.0) (/ x1 x2)))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.4e+132) || !(x1 <= 1.15e-19)) {
tmp = x1 * ((x1 * 9.0) + -1.0);
} else {
tmp = x2 * (-6.0 - (x1 / x2));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-3.4d+132)) .or. (.not. (x1 <= 1.15d-19))) then
tmp = x1 * ((x1 * 9.0d0) + (-1.0d0))
else
tmp = x2 * (-6.0d0 - (x1 / x2))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.4e+132) || !(x1 <= 1.15e-19)) {
tmp = x1 * ((x1 * 9.0) + -1.0);
} else {
tmp = x2 * (-6.0 - (x1 / x2));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -3.4e+132) or not (x1 <= 1.15e-19): tmp = x1 * ((x1 * 9.0) + -1.0) else: tmp = x2 * (-6.0 - (x1 / x2)) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -3.4e+132) || !(x1 <= 1.15e-19)) tmp = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)); else tmp = Float64(x2 * Float64(Float64(-6.0) - Float64(x1 / x2))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -3.4e+132) || ~((x1 <= 1.15e-19))) tmp = x1 * ((x1 * 9.0) + -1.0); else tmp = x2 * (-6.0 - (x1 / x2)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -3.4e+132], N[Not[LessEqual[x1, 1.15e-19]], $MachinePrecision]], N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(x2 * N[((-6.0) - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+132} \lor \neg \left(x1 \leq 1.15 \cdot 10^{-19}\right):\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\left(-6\right) - \frac{x1}{x2}\right)\\
\end{array}
\end{array}
if x1 < -3.40000000000000025e132 or 1.1499999999999999e-19 < x1 Initial program 29.5%
Simplified29.5%
Taylor expanded in x1 around 0 61.3%
Taylor expanded in x2 around 0 70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in x2 around inf 74.3%
Taylor expanded in x2 around 0 70.4%
if -3.40000000000000025e132 < x1 < 1.1499999999999999e-19Initial program 94.3%
Simplified94.6%
Taylor expanded in x1 around 0 71.7%
Taylor expanded in x2 around 0 67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in x1 around 0 67.0%
*-commutative67.0%
mul-1-neg67.0%
unsub-neg67.0%
Simplified67.0%
Taylor expanded in x2 around -inf 69.8%
mul-1-neg69.8%
*-commutative69.8%
distribute-rgt-neg-in69.8%
Simplified69.8%
Final simplification70.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -2.55e+23) (not (<= x1 1.15e-19))) (* x1 (+ (* x1 9.0) -1.0)) (- (* x2 -6.0) x1)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.55e+23) || !(x1 <= 1.15e-19)) {
tmp = x1 * ((x1 * 9.0) + -1.0);
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-2.55d+23)) .or. (.not. (x1 <= 1.15d-19))) then
tmp = x1 * ((x1 * 9.0d0) + (-1.0d0))
else
tmp = (x2 * (-6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -2.55e+23) || !(x1 <= 1.15e-19)) {
tmp = x1 * ((x1 * 9.0) + -1.0);
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -2.55e+23) or not (x1 <= 1.15e-19): tmp = x1 * ((x1 * 9.0) + -1.0) else: tmp = (x2 * -6.0) - x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -2.55e+23) || !(x1 <= 1.15e-19)) tmp = Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)); else tmp = Float64(Float64(x2 * -6.0) - x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -2.55e+23) || ~((x1 <= 1.15e-19))) tmp = x1 * ((x1 * 9.0) + -1.0); else tmp = (x2 * -6.0) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -2.55e+23], N[Not[LessEqual[x1, 1.15e-19]], $MachinePrecision]], N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.55 \cdot 10^{+23} \lor \neg \left(x1 \leq 1.15 \cdot 10^{-19}\right):\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\end{array}
\end{array}
if x1 < -2.5500000000000001e23 or 1.1499999999999999e-19 < x1 Initial program 35.5%
Simplified35.5%
Taylor expanded in x1 around 0 52.3%
Taylor expanded in x2 around 0 60.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in x2 around inf 68.2%
Taylor expanded in x2 around 0 60.2%
if -2.5500000000000001e23 < x1 < 1.1499999999999999e-19Initial program 99.4%
Simplified99.7%
Taylor expanded in x1 around 0 84.5%
Taylor expanded in x2 around 0 79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in x1 around 0 79.1%
*-commutative79.1%
mul-1-neg79.1%
unsub-neg79.1%
Simplified79.1%
Final simplification68.7%
(FPCore (x1 x2) :precision binary64 (* x2 (- (/ (* x1 (+ (* x1 9.0) -1.0)) x2) 6.0)))
double code(double x1, double x2) {
return x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (((x1 * ((x1 * 9.0d0) + (-1.0d0))) / x2) - 6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0);
}
def code(x1, x2): return x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0)
function code(x1, x2) return Float64(x2 * Float64(Float64(Float64(x1 * Float64(Float64(x1 * 9.0) + -1.0)) / x2) - 6.0)) end
function tmp = code(x1, x2) tmp = x2 * (((x1 * ((x1 * 9.0) + -1.0)) / x2) - 6.0); end
code[x1_, x2_] := N[(x2 * N[(N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot \left(\frac{x1 \cdot \left(x1 \cdot 9 + -1\right)}{x2} - 6\right)
\end{array}
Initial program 64.5%
Simplified64.6%
Taylor expanded in x1 around 0 66.9%
Taylor expanded in x2 around 0 68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in x2 around inf 73.1%
Final simplification73.1%
(FPCore (x1 x2) :precision binary64 (- (* x2 -6.0) x1))
double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = (x2 * (-6.0d0)) - x1
end function
public static double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
def code(x1, x2): return (x2 * -6.0) - x1
function code(x1, x2) return Float64(Float64(x2 * -6.0) - x1) end
function tmp = code(x1, x2) tmp = (x2 * -6.0) - x1; end
code[x1_, x2_] := N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6 - x1
\end{array}
Initial program 64.5%
Simplified64.6%
Taylor expanded in x1 around 0 66.9%
Taylor expanded in x2 around 0 68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in x1 around 0 37.9%
*-commutative37.9%
mul-1-neg37.9%
unsub-neg37.9%
Simplified37.9%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 64.5%
Simplified64.6%
Taylor expanded in x1 around 0 28.9%
*-commutative28.9%
Simplified28.9%
herbie shell --seed 2024137
(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))))))