
(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 30 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 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
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))))))
(if (<=
(+ x1 (+ t_3 (* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))))
INFINITY)
(+
x1
(+
t_3
(*
3.0
(-
(/ (fma 3.0 (pow x1 2.0) (* x2 -2.0)) (fma x1 x1 1.0))
(expm1 (log1p (/ x1 (fma x1 x1 1.0))))))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + (((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)));
double tmp;
if ((x1 + (t_3 + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))))) <= ((double) INFINITY)) {
tmp = x1 + (t_3 + (3.0 * ((fma(3.0, pow(x1, 2.0), (x2 * -2.0)) / fma(x1, x1, 1.0)) - expm1(log1p((x1 / fma(x1, x1, 1.0)))))));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(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)))) tmp = 0.0 if (Float64(x1 + Float64(t_3 + Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))))) <= Inf) tmp = Float64(x1 + Float64(t_3 + Float64(3.0 * Float64(Float64(fma(3.0, (x1 ^ 2.0), Float64(x2 * -2.0)) / fma(x1, x1, 1.0)) - expm1(log1p(Float64(x1 / fma(x1, x1, 1.0)))))))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $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[(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]}, If[LessEqual[N[(x1 + N[(t$95$3 + N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$3 + N[(3.0 * N[(N[(N[(3.0 * N[Power[x1, 2.0], $MachinePrecision] + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] - N[(Exp[N[Log[1 + N[(x1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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(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)\\
\mathbf{if}\;x1 + \left(t\_3 + 3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{-1 - x1 \cdot x1}\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_3 + 3 \cdot \left(\frac{\mathsf{fma}\left(3, {x1}^{2}, x2 \cdot -2\right)}{\mathsf{fma}\left(x1, x1, 1\right)} - \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
div-sub99.4%
cancel-sign-sub-inv99.4%
associate-*r*99.4%
fma-define99.4%
pow299.4%
metadata-eval99.4%
fma-define99.4%
fma-define99.4%
Applied egg-rr99.4%
*-commutative99.4%
Simplified99.4%
expm1-log1p-u99.4%
expm1-undefine77.8%
Applied egg-rr77.8%
expm1-define99.4%
Simplified99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
(*
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))))))
(if (<=
(+ x1 (+ t_3 (* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))))
INFINITY)
(+
x1
(+
t_3
(*
3.0
(-
(/ (fma 3.0 (pow x1 2.0) (* x2 -2.0)) (fma x1 x1 1.0))
(/ x1 (fma x1 x1 1.0))))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + (((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)));
double tmp;
if ((x1 + (t_3 + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))))) <= ((double) INFINITY)) {
tmp = x1 + (t_3 + (3.0 * ((fma(3.0, pow(x1, 2.0), (x2 * -2.0)) / fma(x1, x1, 1.0)) - (x1 / fma(x1, x1, 1.0)))));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(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)))) tmp = 0.0 if (Float64(x1 + Float64(t_3 + Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))))) <= Inf) tmp = Float64(x1 + Float64(t_3 + Float64(3.0 * Float64(Float64(fma(3.0, (x1 ^ 2.0), Float64(x2 * -2.0)) / fma(x1, x1, 1.0)) - Float64(x1 / fma(x1, x1, 1.0)))))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $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[(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]}, If[LessEqual[N[(x1 + N[(t$95$3 + N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$3 + N[(3.0 * N[(N[(N[(3.0 * N[Power[x1, 2.0], $MachinePrecision] + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] - N[(x1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 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(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)\\
\mathbf{if}\;x1 + \left(t\_3 + 3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{-1 - x1 \cdot x1}\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_3 + 3 \cdot \left(\frac{\mathsf{fma}\left(3, {x1}^{2}, x2 \cdot -2\right)}{\mathsf{fma}\left(x1, x1, 1\right)} - \frac{x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
div-sub99.4%
cancel-sign-sub-inv99.4%
associate-*r*99.4%
fma-define99.4%
pow299.4%
metadata-eval99.4%
fma-define99.4%
fma-define99.4%
Applied egg-rr99.4%
*-commutative99.4%
Simplified99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))))))
(if (<= t_3 INFINITY) t_3 (+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = x1 + (6.0 * Math.pow(x1, 4.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1))))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = x1 + (6.0 * math.pow(x1, 4.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1))))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = x1 + (6.0 * (x1 ^ 4.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{-1 - x1 \cdot x1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x1 around inf 100.0%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (<= x1 -9e+55)
(+
x1
(*
(pow x1 4.0)
(+ 6.0 (/ (- (/ (+ 9.0 (* 4.0 (- (* 2.0 x2) 3.0))) x1) 3.0) x1))))
(if (<= x1 3.6e+48)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0))))))))
(- x1 (* (pow x1 3.0) (- 3.0 (* x1 6.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -9e+55) {
tmp = x1 + (pow(x1, 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1)));
} else if (x1 <= 3.6e+48) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 - (pow(x1, 3.0) * (3.0 - (x1 * 6.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if (x1 <= (-9d+55)) then
tmp = x1 + ((x1 ** 4.0d0) * (6.0d0 + ((((9.0d0 + (4.0d0 * ((2.0d0 * x2) - 3.0d0))) / x1) - 3.0d0) / x1)))
else if (x1 <= 3.6d+48) then
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 - ((x1 ** 3.0d0) * (3.0d0 - (x1 * 6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if (x1 <= -9e+55) {
tmp = x1 + (Math.pow(x1, 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1)));
} else if (x1 <= 3.6e+48) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 - (Math.pow(x1, 3.0) * (3.0 - (x1 * 6.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if x1 <= -9e+55: tmp = x1 + (math.pow(x1, 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1))) elif x1 <= 3.6e+48: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) else: tmp = x1 - (math.pow(x1, 3.0) * (3.0 - (x1 * 6.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if (x1 <= -9e+55) tmp = Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(Float64(9.0 + Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0))) / x1) - 3.0) / x1)))); elseif (x1 <= 3.6e+48) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 - Float64((x1 ^ 3.0) * Float64(3.0 - Float64(x1 * 6.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if (x1 <= -9e+55) tmp = x1 + ((x1 ^ 4.0) * (6.0 + ((((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1) - 3.0) / x1))); elseif (x1 <= 3.6e+48) tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))); else tmp = x1 - ((x1 ^ 3.0) * (3.0 - (x1 * 6.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -9e+55], N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(9.0 + N[(4.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.6e+48], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(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], N[(x1 - N[(N[Power[x1, 3.0], $MachinePrecision] * N[(3.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -9 \cdot 10^{+55}:\\
\;\;\;\;x1 + {x1}^{4} \cdot \left(6 + \frac{\frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1} - 3}{x1}\right)\\
\mathbf{elif}\;x1 \leq 3.6 \cdot 10^{+48}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_2 + t\_1 \cdot \left(\left(\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)\\
\mathbf{else}:\\
\;\;\;\;x1 - {x1}^{3} \cdot \left(3 - x1 \cdot 6\right)\\
\end{array}
\end{array}
if x1 < -8.99999999999999996e55Initial program 22.4%
Taylor expanded in x1 around -inf 44.9%
Taylor expanded in x1 around -inf 99.9%
if -8.99999999999999996e55 < x1 < 3.59999999999999983e48Initial program 99.3%
Taylor expanded in x1 around inf 97.4%
if 3.59999999999999983e48 < x1 Initial program 33.3%
Taylor expanded in x1 around inf 33.3%
Taylor expanded in x1 around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x1 around 0 100.0%
Final simplification98.3%
(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 -1.2e+50) (not (<= x1 3.6e+48)))
(- x1 (* (pow x1 3.0) (- 3.0 (* x1 6.0))))
(-
x1
(-
(* 3.0 (- x1 (* x2 -2.0)))
(-
x1
(-
(-
(*
t_1
(+
(* (* x1 x1) (- 6.0 (* t_2 4.0)))
(* (* (* x1 2.0) t_2) (- 3.0 (* 2.0 x2)))))
(* 3.0 t_0))
(* x1 (* x1 x1)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -1.2e+50) || !(x1 <= 3.6e+48)) {
tmp = x1 - (pow(x1, 3.0) * (3.0 - (x1 * 6.0)));
} else {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) - (x1 - (((t_1 * (((x1 * x1) * (6.0 - (t_2 * 4.0))) + (((x1 * 2.0) * t_2) * (3.0 - (2.0 * x2))))) - (3.0 * t_0)) - (x1 * (x1 * x1)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-1.2d+50)) .or. (.not. (x1 <= 3.6d+48))) then
tmp = x1 - ((x1 ** 3.0d0) * (3.0d0 - (x1 * 6.0d0)))
else
tmp = x1 - ((3.0d0 * (x1 - (x2 * (-2.0d0)))) - (x1 - (((t_1 * (((x1 * x1) * (6.0d0 - (t_2 * 4.0d0))) + (((x1 * 2.0d0) * t_2) * (3.0d0 - (2.0d0 * x2))))) - (3.0d0 * t_0)) - (x1 * (x1 * x1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -1.2e+50) || !(x1 <= 3.6e+48)) {
tmp = x1 - (Math.pow(x1, 3.0) * (3.0 - (x1 * 6.0)));
} else {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) - (x1 - (((t_1 * (((x1 * x1) * (6.0 - (t_2 * 4.0))) + (((x1 * 2.0) * t_2) * (3.0 - (2.0 * x2))))) - (3.0 * t_0)) - (x1 * (x1 * x1)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -1.2e+50) or not (x1 <= 3.6e+48): tmp = x1 - (math.pow(x1, 3.0) * (3.0 - (x1 * 6.0))) else: tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) - (x1 - (((t_1 * (((x1 * x1) * (6.0 - (t_2 * 4.0))) + (((x1 * 2.0) * t_2) * (3.0 - (2.0 * x2))))) - (3.0 * t_0)) - (x1 * (x1 * x1))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -1.2e+50) || !(x1 <= 3.6e+48)) tmp = Float64(x1 - Float64((x1 ^ 3.0) * Float64(3.0 - Float64(x1 * 6.0)))); else tmp = Float64(x1 - Float64(Float64(3.0 * Float64(x1 - Float64(x2 * -2.0))) - Float64(x1 - Float64(Float64(Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_2 * 4.0))) + Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(3.0 - Float64(2.0 * x2))))) - Float64(3.0 * t_0)) - Float64(x1 * Float64(x1 * x1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -1.2e+50) || ~((x1 <= 3.6e+48))) tmp = x1 - ((x1 ^ 3.0) * (3.0 - (x1 * 6.0))); else tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) - (x1 - (((t_1 * (((x1 * x1) * (6.0 - (t_2 * 4.0))) + (((x1 * 2.0) * t_2) * (3.0 - (2.0 * x2))))) - (3.0 * t_0)) - (x1 * (x1 * x1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -1.2e+50], N[Not[LessEqual[x1, 3.6e+48]], $MachinePrecision]], N[(x1 - N[(N[Power[x1, 3.0], $MachinePrecision] * N[(3.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(3.0 * N[(x1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 - N[(N[(N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -1.2 \cdot 10^{+50} \lor \neg \left(x1 \leq 3.6 \cdot 10^{+48}\right):\\
\;\;\;\;x1 - {x1}^{3} \cdot \left(3 - x1 \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(3 \cdot \left(x1 - x2 \cdot -2\right) - \left(x1 - \left(\left(t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_2 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(3 - 2 \cdot x2\right)\right) - 3 \cdot t\_0\right) - x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.2000000000000001e50 or 3.59999999999999983e48 < x1 Initial program 29.3%
Taylor expanded in x1 around inf 29.3%
Taylor expanded in x1 around inf 97.8%
associate-*r/97.8%
metadata-eval97.8%
Simplified97.8%
Taylor expanded in x1 around 0 97.8%
if -1.2000000000000001e50 < x1 < 3.59999999999999983e48Initial program 99.3%
Taylor expanded in x1 around 0 96.4%
Taylor expanded in x1 around inf 96.0%
Taylor expanded in x1 around 0 96.4%
mul-1-neg96.4%
unsub-neg96.4%
*-commutative96.4%
Simplified96.4%
Final simplification96.9%
(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 -1.36e+57) (not (<= x1 3.6e+48)))
(- x1 (* (pow x1 3.0) (- 3.0 (* x1 6.0))))
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+ (* (* (* x1 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 <= -1.36e+57) || !(x1 <= 3.6e+48)) {
tmp = x1 - (pow(x1, 3.0) * (3.0 - (x1 * 6.0)));
} else {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 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 <= (-1.36d+57)) .or. (.not. (x1 <= 3.6d+48))) then
tmp = x1 - ((x1 ** 3.0d0) * (3.0d0 - (x1 * 6.0d0)))
else
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 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 <= -1.36e+57) || !(x1 <= 3.6e+48)) {
tmp = x1 - (Math.pow(x1, 3.0) * (3.0 - (x1 * 6.0)));
} else {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 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 <= -1.36e+57) or not (x1 <= 3.6e+48): tmp = x1 - (math.pow(x1, 3.0) * (3.0 - (x1 * 6.0))) else: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 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 <= -1.36e+57) || !(x1 <= 3.6e+48)) tmp = Float64(x1 - Float64((x1 ^ 3.0) * Float64(3.0 - Float64(x1 * 6.0)))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(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 <= -1.36e+57) || ~((x1 <= 3.6e+48))) tmp = x1 - ((x1 ^ 3.0) * (3.0 - (x1 * 6.0))); else tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 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, -1.36e+57], N[Not[LessEqual[x1, 3.6e+48]], $MachinePrecision]], N[(x1 - N[(N[Power[x1, 3.0], $MachinePrecision] * N[(3.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(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 -1.36 \cdot 10^{+57} \lor \neg \left(x1 \leq 3.6 \cdot 10^{+48}\right):\\
\;\;\;\;x1 - {x1}^{3} \cdot \left(3 - x1 \cdot 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_2 + t\_1 \cdot \left(\left(\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 < -1.36e57 or 3.59999999999999983e48 < x1 Initial program 28.5%
Taylor expanded in x1 around inf 28.5%
Taylor expanded in x1 around inf 97.8%
associate-*r/97.8%
metadata-eval97.8%
Simplified97.8%
Taylor expanded in x1 around 0 97.8%
if -1.36e57 < x1 < 3.59999999999999983e48Initial program 99.3%
Taylor expanded in x1 around inf 97.4%
Final simplification97.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -7.8e+49) (not (<= x1 3.3e+48)))
(+ x1 (* 6.0 (pow x1 4.0)))
(-
x1
(-
(* 3.0 (- x1 (* x2 -2.0)))
(-
x1
(-
(-
(*
t_1
(+
(* (* x1 x1) (- 6.0 (* t_2 4.0)))
(* (* (* x1 2.0) t_2) (- 3.0 (* 2.0 x2)))))
(* 3.0 t_0))
(* x1 (* x1 x1)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -7.8e+49) || !(x1 <= 3.3e+48)) {
tmp = x1 + (6.0 * pow(x1, 4.0));
} else {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) - (x1 - (((t_1 * (((x1 * x1) * (6.0 - (t_2 * 4.0))) + (((x1 * 2.0) * t_2) * (3.0 - (2.0 * x2))))) - (3.0 * t_0)) - (x1 * (x1 * x1)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: 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.8d+49)) .or. (.not. (x1 <= 3.3d+48))) then
tmp = x1 + (6.0d0 * (x1 ** 4.0d0))
else
tmp = x1 - ((3.0d0 * (x1 - (x2 * (-2.0d0)))) - (x1 - (((t_1 * (((x1 * x1) * (6.0d0 - (t_2 * 4.0d0))) + (((x1 * 2.0d0) * t_2) * (3.0d0 - (2.0d0 * x2))))) - (3.0d0 * t_0)) - (x1 * (x1 * x1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -7.8e+49) || !(x1 <= 3.3e+48)) {
tmp = x1 + (6.0 * Math.pow(x1, 4.0));
} else {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) - (x1 - (((t_1 * (((x1 * x1) * (6.0 - (t_2 * 4.0))) + (((x1 * 2.0) * t_2) * (3.0 - (2.0 * x2))))) - (3.0 * t_0)) - (x1 * (x1 * x1)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -7.8e+49) or not (x1 <= 3.3e+48): tmp = x1 + (6.0 * math.pow(x1, 4.0)) else: tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) - (x1 - (((t_1 * (((x1 * x1) * (6.0 - (t_2 * 4.0))) + (((x1 * 2.0) * t_2) * (3.0 - (2.0 * x2))))) - (3.0 * t_0)) - (x1 * (x1 * x1))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -7.8e+49) || !(x1 <= 3.3e+48)) tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); else tmp = Float64(x1 - Float64(Float64(3.0 * Float64(x1 - Float64(x2 * -2.0))) - Float64(x1 - Float64(Float64(Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_2 * 4.0))) + Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(3.0 - Float64(2.0 * x2))))) - Float64(3.0 * t_0)) - Float64(x1 * Float64(x1 * x1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -7.8e+49) || ~((x1 <= 3.3e+48))) tmp = x1 + (6.0 * (x1 ^ 4.0)); else tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) - (x1 - (((t_1 * (((x1 * x1) * (6.0 - (t_2 * 4.0))) + (((x1 * 2.0) * t_2) * (3.0 - (2.0 * x2))))) - (3.0 * t_0)) - (x1 * (x1 * x1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -7.8e+49], N[Not[LessEqual[x1, 3.3e+48]], $MachinePrecision]], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(3.0 * N[(x1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 - N[(N[(N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -7.8 \cdot 10^{+49} \lor \neg \left(x1 \leq 3.3 \cdot 10^{+48}\right):\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(3 \cdot \left(x1 - x2 \cdot -2\right) - \left(x1 - \left(\left(t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_2 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(3 - 2 \cdot x2\right)\right) - 3 \cdot t\_0\right) - x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -7.8000000000000002e49 or 3.30000000000000023e48 < x1 Initial program 29.3%
Taylor expanded in x1 around inf 29.3%
Taylor expanded in x1 around inf 97.8%
associate-*r/97.8%
metadata-eval97.8%
Simplified97.8%
Taylor expanded in x1 around inf 97.8%
if -7.8000000000000002e49 < x1 < 3.30000000000000023e48Initial program 99.3%
Taylor expanded in x1 around 0 96.4%
Taylor expanded in x1 around inf 96.0%
Taylor expanded in x1 around 0 96.4%
mul-1-neg96.4%
unsub-neg96.4%
*-commutative96.4%
Simplified96.4%
Final simplification96.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (* 2.0 x2) 3.0))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2)))
(if (<= x1 -1.35e+154)
(+
x1
(+
(* x2 -6.0)
(* x1 (- (+ (* x2 -12.0) (* x1 (+ 9.0 (* x2 6.0)))) 2.0))))
(if (<= x1 -2.8e+112)
(+
x1
(+
(* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))
(-
x1
(-
(*
x1
(-
(*
x1
(+
6.0
(-
(- (- (* -2.0 t_1) (+ (* x2 6.0) (* x2 8.0))) (* x2 -4.0))
(* x1 -6.0))))
2.0))
(* x2 -4.0)))))
(if (<= x1 3.2e+87)
(-
x1
(-
(* 3.0 (- x1 (* x2 -2.0)))
(-
x1
(-
(-
(*
t_2
(+
(* (* x1 x1) (- 6.0 (* t_3 4.0)))
(* (* (* x1 2.0) t_3) (- 3.0 (* 2.0 x2)))))
(* 3.0 t_0))
(* x1 (* x1 x1))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 t_1))
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2))))
2.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -2.8e+112) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0))));
} else if (x1 <= 3.2e+87) {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) - (x1 - (((t_2 * (((x1 * x1) * (6.0 - (t_3 * 4.0))) + (((x1 * 2.0) * t_3) * (3.0 - (2.0 * x2))))) - (3.0 * t_0)) - (x1 * (x1 * x1)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (2.0d0 * x2) - 3.0d0
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_0 + (2.0d0 * x2)) - x1) / t_2
if (x1 <= (-1.35d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * (9.0d0 + (x2 * 6.0d0)))) - 2.0d0)))
else if (x1 <= (-2.8d+112)) then
tmp = x1 + ((3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 - ((x1 * ((x1 * (6.0d0 + (((((-2.0d0) * t_1) - ((x2 * 6.0d0) + (x2 * 8.0d0))) - (x2 * (-4.0d0))) - (x1 * (-6.0d0))))) - 2.0d0)) - (x2 * (-4.0d0)))))
else if (x1 <= 3.2d+87) then
tmp = x1 - ((3.0d0 * (x1 - (x2 * (-2.0d0)))) - (x1 - (((t_2 * (((x1 * x1) * (6.0d0 - (t_3 * 4.0d0))) + (((x1 * 2.0d0) * t_3) * (3.0d0 - (2.0d0 * x2))))) - (3.0d0 * t_0)) - (x1 * (x1 * x1)))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * t_1)) + (x2 * ((x1 * 6.0d0) + ((x1 * ((x1 * 3.0d0) + 9.0d0)) / x2)))) - 2.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 = (2.0 * x2) - 3.0;
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -2.8e+112) {
tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0))));
} else if (x1 <= 3.2e+87) {
tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) - (x1 - (((t_2 * (((x1 * x1) * (6.0 - (t_3 * 4.0))) + (((x1 * 2.0) * t_3) * (3.0 - (2.0 * x2))))) - (3.0 * t_0)) - (x1 * (x1 * x1)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (2.0 * x2) - 3.0 t_2 = (x1 * x1) + 1.0 t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2 tmp = 0 if x1 <= -1.35e+154: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))) elif x1 <= -2.8e+112: tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0)))) elif x1 <= 3.2e+87: tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) - (x1 - (((t_2 * (((x1 * x1) * (6.0 - (t_3 * 4.0))) + (((x1 * 2.0) * t_3) * (3.0 - (2.0 * x2))))) - (3.0 * t_0)) - (x1 * (x1 * x1))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(2.0 * x2) - 3.0) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) tmp = 0.0 if (x1 <= -1.35e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(9.0 + Float64(x2 * 6.0)))) - 2.0)))); elseif (x1 <= -2.8e+112) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 - Float64(Float64(x1 * Float64(Float64(x1 * Float64(6.0 + Float64(Float64(Float64(Float64(-2.0 * t_1) - Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0))) - Float64(x2 * -4.0)) - Float64(x1 * -6.0)))) - 2.0)) - Float64(x2 * -4.0))))); elseif (x1 <= 3.2e+87) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(x1 - Float64(x2 * -2.0))) - Float64(x1 - Float64(Float64(Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 - Float64(t_3 * 4.0))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 - Float64(2.0 * x2))))) - Float64(3.0 * t_0)) - Float64(x1 * Float64(x1 * x1)))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * t_1)) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) / x2)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (2.0 * x2) - 3.0; t_2 = (x1 * x1) + 1.0; t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2; tmp = 0.0; if (x1 <= -1.35e+154) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))); elseif (x1 <= -2.8e+112) tmp = x1 + ((3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0)))); elseif (x1 <= 3.2e+87) tmp = x1 - ((3.0 * (x1 - (x2 * -2.0))) - (x1 - (((t_2 * (((x1 * x1) * (6.0 - (t_3 * 4.0))) + (((x1 * 2.0) * t_3) * (3.0 - (2.0 * x2))))) - (3.0 * t_0)) - (x1 * (x1 * x1))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -1.35e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.8e+112], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 - N[(N[(x1 * N[(N[(x1 * N[(6.0 + N[(N[(N[(N[(-2.0 * t$95$1), $MachinePrecision] - N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision] - N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.2e+87], N[(x1 - N[(N[(3.0 * N[(x1 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 - N[(N[(N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(t$95$3 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 2 \cdot x2 - 3\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(9 + x2 \cdot 6\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -2.8 \cdot 10^{+112}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 - \left(x1 \cdot \left(x1 \cdot \left(6 + \left(\left(\left(-2 \cdot t\_1 - \left(x2 \cdot 6 + x2 \cdot 8\right)\right) - x2 \cdot -4\right) - x1 \cdot -6\right)\right) - 2\right) - x2 \cdot -4\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.2 \cdot 10^{+87}:\\
\;\;\;\;x1 - \left(3 \cdot \left(x1 - x2 \cdot -2\right) - \left(x1 - \left(\left(t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - t\_3 \cdot 4\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 - 2 \cdot x2\right)\right) - 3 \cdot t\_0\right) - x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot t\_1\right) + x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.35000000000000003e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
Taylor expanded in x1 around 0 68.2%
if -1.35000000000000003e154 < x1 < -2.8000000000000001e112Initial program 10.0%
Taylor expanded in x1 around inf 10.0%
Taylor expanded in x1 around 0 100.0%
if -2.8000000000000001e112 < x1 < 3.2e87Initial program 99.3%
Taylor expanded in x1 around 0 95.5%
Taylor expanded in x1 around inf 95.1%
Taylor expanded in x1 around 0 95.5%
mul-1-neg95.5%
unsub-neg95.5%
*-commutative95.5%
Simplified95.5%
if 3.2e87 < x1 Initial program 27.7%
Taylor expanded in x1 around 0 11.4%
Taylor expanded in x1 around 0 89.4%
Taylor expanded in x2 around inf 100.0%
Final simplification94.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (* 2.0 x2) 3.0))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- x1 (- t_0 (* 2.0 x2))) (- -1.0 (* x1 x1))))))
(if (<= x1 -1.35e+154)
(+
x1
(+
(* x2 -6.0)
(* x1 (- (+ (* x2 -12.0) (* x1 (+ 9.0 (* x2 6.0)))) 2.0))))
(if (<= x1 -2.8e+112)
(+
x1
(+
t_3
(-
x1
(-
(*
x1
(-
(*
x1
(+
6.0
(-
(- (- (* -2.0 t_1) (+ (* x2 6.0) (* x2 8.0))) (* x2 -4.0))
(* x1 -6.0))))
2.0))
(* x2 -4.0)))))
(if (<= x1 3.2e+87)
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(-
(* 3.0 t_0)
(*
t_2
(-
(*
(* (* x1 2.0) (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(- 3.0 (* 2.0 x2)))
(* (* x1 x1) 6.0))))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 t_1))
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2))))
2.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)));
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -2.8e+112) {
tmp = x1 + (t_3 + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0))));
} else if (x1 <= 3.2e+87) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) - (t_2 * ((((x1 * 2.0) * (((t_0 + (2.0 * x2)) - x1) / t_2)) * (3.0 - (2.0 * x2))) - ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (2.0d0 * x2) - 3.0d0
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * ((x1 - (t_0 - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))
if (x1 <= (-1.35d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * (9.0d0 + (x2 * 6.0d0)))) - 2.0d0)))
else if (x1 <= (-2.8d+112)) then
tmp = x1 + (t_3 + (x1 - ((x1 * ((x1 * (6.0d0 + (((((-2.0d0) * t_1) - ((x2 * 6.0d0) + (x2 * 8.0d0))) - (x2 * (-4.0d0))) - (x1 * (-6.0d0))))) - 2.0d0)) - (x2 * (-4.0d0)))))
else if (x1 <= 3.2d+87) then
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) - (t_2 * ((((x1 * 2.0d0) * (((t_0 + (2.0d0 * x2)) - x1) / t_2)) * (3.0d0 - (2.0d0 * x2))) - ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * t_1)) + (x2 * ((x1 * 6.0d0) + ((x1 * ((x1 * 3.0d0) + 9.0d0)) / x2)))) - 2.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 = (2.0 * x2) - 3.0;
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1)));
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -2.8e+112) {
tmp = x1 + (t_3 + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0))));
} else if (x1 <= 3.2e+87) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) - (t_2 * ((((x1 * 2.0) * (((t_0 + (2.0 * x2)) - x1) / t_2)) * (3.0 - (2.0 * x2))) - ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (2.0 * x2) - 3.0 t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1))) tmp = 0 if x1 <= -1.35e+154: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))) elif x1 <= -2.8e+112: tmp = x1 + (t_3 + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0)))) elif x1 <= 3.2e+87: tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) - (t_2 * ((((x1 * 2.0) * (((t_0 + (2.0 * x2)) - x1) / t_2)) * (3.0 - (2.0 * x2))) - ((x1 * x1) * 6.0))))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(2.0 * x2) - 3.0) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) tmp = 0.0 if (x1 <= -1.35e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(9.0 + Float64(x2 * 6.0)))) - 2.0)))); elseif (x1 <= -2.8e+112) tmp = Float64(x1 + Float64(t_3 + Float64(x1 - Float64(Float64(x1 * Float64(Float64(x1 * Float64(6.0 + Float64(Float64(Float64(Float64(-2.0 * t_1) - Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0))) - Float64(x2 * -4.0)) - Float64(x1 * -6.0)))) - 2.0)) - Float64(x2 * -4.0))))); elseif (x1 <= 3.2e+87) tmp = 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) * Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2)) * Float64(3.0 - Float64(2.0 * x2))) - Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * t_1)) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) / x2)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (2.0 * x2) - 3.0; t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * ((x1 - (t_0 - (2.0 * x2))) / (-1.0 - (x1 * x1))); tmp = 0.0; if (x1 <= -1.35e+154) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))); elseif (x1 <= -2.8e+112) tmp = x1 + (t_3 + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0)))); elseif (x1 <= 3.2e+87) tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) - (t_2 * ((((x1 * 2.0) * (((t_0 + (2.0 * x2)) - x1) / t_2)) * (3.0 - (2.0 * x2))) - ((x1 * x1) * 6.0))))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.35e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.8e+112], N[(x1 + N[(t$95$3 + N[(x1 - N[(N[(x1 * N[(N[(x1 * N[(6.0 + N[(N[(N[(N[(-2.0 * t$95$1), $MachinePrecision] - N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision] - N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.2e+87], 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] * N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 2 \cdot x2 - 3\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{x1 - \left(t\_0 - 2 \cdot x2\right)}{-1 - x1 \cdot x1}\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(9 + x2 \cdot 6\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -2.8 \cdot 10^{+112}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 - \left(x1 \cdot \left(x1 \cdot \left(6 + \left(\left(\left(-2 \cdot t\_1 - \left(x2 \cdot 6 + x2 \cdot 8\right)\right) - x2 \cdot -4\right) - x1 \cdot -6\right)\right) - 2\right) - x2 \cdot -4\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.2 \cdot 10^{+87}:\\
\;\;\;\;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 \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\right) \cdot \left(3 - 2 \cdot x2\right) - \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot t\_1\right) + x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.35000000000000003e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
Taylor expanded in x1 around 0 68.2%
if -1.35000000000000003e154 < x1 < -2.8000000000000001e112Initial program 10.0%
Taylor expanded in x1 around inf 10.0%
Taylor expanded in x1 around 0 100.0%
if -2.8000000000000001e112 < x1 < 3.2e87Initial program 99.3%
Taylor expanded in x1 around 0 95.5%
Taylor expanded in x1 around inf 95.1%
Taylor expanded in x1 around inf 95.2%
if 3.2e87 < x1 Initial program 27.7%
Taylor expanded in x1 around 0 11.4%
Taylor expanded in x1 around 0 89.4%
Taylor expanded in x2 around inf 100.0%
Final simplification93.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (* 2.0 x2) 3.0))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (* x1 (+ (* x1 3.0) 9.0)))
(t_4 (- x1 (- t_0 (* 2.0 x2))))
(t_5
(-
x1
(-
(* 3.0 (/ t_4 (+ (* x1 x1) 1.0)))
(-
x1
(-
(-
(* (+ (* (* x1 x1) 6.0) (* t_1 (* (* x1 2.0) 3.0))) t_2)
(* 3.0 t_0))
(* x1 (* x1 x1))))))))
(if (<= x1 -1.35e+154)
(+
x1
(+
(* x2 -6.0)
(* x1 (- (+ (* x2 -12.0) (* x1 (+ 9.0 (* x2 6.0)))) 2.0))))
(if (<= x1 -3.1e+102)
(+
x1
(+
(* 3.0 (/ t_4 t_2))
(-
x1
(-
(*
x1
(-
(*
x1
(+
6.0
(-
(- (- (* -2.0 t_1) (+ (* x2 6.0) (* x2 8.0))) (* x2 -4.0))
(* x1 -6.0))))
2.0))
(* x2 -4.0)))))
(if (<= x1 -2.7e+28)
t_5
(if (<= x1 0.43)
(+
x1
(-
(* x2 -6.0)
(+
(* x1 (- 2.0 t_3))
(* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(if (<= x1 3.2e+87)
t_5
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+ (* 4.0 (* x2 t_1)) (* x2 (+ (* x1 6.0) (/ t_3 x2))))
2.0)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (2.0 * x2) - 3.0;
double t_2 = -1.0 - (x1 * x1);
double t_3 = x1 * ((x1 * 3.0) + 9.0);
double t_4 = x1 - (t_0 - (2.0 * x2));
double t_5 = x1 - ((3.0 * (t_4 / ((x1 * x1) + 1.0))) - (x1 - ((((((x1 * x1) * 6.0) + (t_1 * ((x1 * 2.0) * 3.0))) * t_2) - (3.0 * t_0)) - (x1 * (x1 * x1)))));
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -3.1e+102) {
tmp = x1 + ((3.0 * (t_4 / t_2)) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0))));
} else if (x1 <= -2.7e+28) {
tmp = t_5;
} else if (x1 <= 0.43) {
tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_3)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 3.2e+87) {
tmp = t_5;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + (t_3 / x2)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (2.0d0 * x2) - 3.0d0
t_2 = (-1.0d0) - (x1 * x1)
t_3 = x1 * ((x1 * 3.0d0) + 9.0d0)
t_4 = x1 - (t_0 - (2.0d0 * x2))
t_5 = x1 - ((3.0d0 * (t_4 / ((x1 * x1) + 1.0d0))) - (x1 - ((((((x1 * x1) * 6.0d0) + (t_1 * ((x1 * 2.0d0) * 3.0d0))) * t_2) - (3.0d0 * t_0)) - (x1 * (x1 * x1)))))
if (x1 <= (-1.35d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * (9.0d0 + (x2 * 6.0d0)))) - 2.0d0)))
else if (x1 <= (-3.1d+102)) then
tmp = x1 + ((3.0d0 * (t_4 / t_2)) + (x1 - ((x1 * ((x1 * (6.0d0 + (((((-2.0d0) * t_1) - ((x2 * 6.0d0) + (x2 * 8.0d0))) - (x2 * (-4.0d0))) - (x1 * (-6.0d0))))) - 2.0d0)) - (x2 * (-4.0d0)))))
else if (x1 <= (-2.7d+28)) then
tmp = t_5
else if (x1 <= 0.43d0) then
tmp = x1 + ((x2 * (-6.0d0)) - ((x1 * (2.0d0 - t_3)) + (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else if (x1 <= 3.2d+87) then
tmp = t_5
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * t_1)) + (x2 * ((x1 * 6.0d0) + (t_3 / x2)))) - 2.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 = (2.0 * x2) - 3.0;
double t_2 = -1.0 - (x1 * x1);
double t_3 = x1 * ((x1 * 3.0) + 9.0);
double t_4 = x1 - (t_0 - (2.0 * x2));
double t_5 = x1 - ((3.0 * (t_4 / ((x1 * x1) + 1.0))) - (x1 - ((((((x1 * x1) * 6.0) + (t_1 * ((x1 * 2.0) * 3.0))) * t_2) - (3.0 * t_0)) - (x1 * (x1 * x1)))));
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -3.1e+102) {
tmp = x1 + ((3.0 * (t_4 / t_2)) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0))));
} else if (x1 <= -2.7e+28) {
tmp = t_5;
} else if (x1 <= 0.43) {
tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_3)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 3.2e+87) {
tmp = t_5;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + (t_3 / x2)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (2.0 * x2) - 3.0 t_2 = -1.0 - (x1 * x1) t_3 = x1 * ((x1 * 3.0) + 9.0) t_4 = x1 - (t_0 - (2.0 * x2)) t_5 = x1 - ((3.0 * (t_4 / ((x1 * x1) + 1.0))) - (x1 - ((((((x1 * x1) * 6.0) + (t_1 * ((x1 * 2.0) * 3.0))) * t_2) - (3.0 * t_0)) - (x1 * (x1 * x1))))) tmp = 0 if x1 <= -1.35e+154: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))) elif x1 <= -3.1e+102: tmp = x1 + ((3.0 * (t_4 / t_2)) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0)))) elif x1 <= -2.7e+28: tmp = t_5 elif x1 <= 0.43: tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_3)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) elif x1 <= 3.2e+87: tmp = t_5 else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + (t_3 / x2)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(2.0 * x2) - 3.0) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) t_4 = Float64(x1 - Float64(t_0 - Float64(2.0 * x2))) t_5 = Float64(x1 - Float64(Float64(3.0 * Float64(t_4 / Float64(Float64(x1 * x1) + 1.0))) - Float64(x1 - Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(t_1 * Float64(Float64(x1 * 2.0) * 3.0))) * t_2) - Float64(3.0 * t_0)) - Float64(x1 * Float64(x1 * x1)))))) tmp = 0.0 if (x1 <= -1.35e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(9.0 + Float64(x2 * 6.0)))) - 2.0)))); elseif (x1 <= -3.1e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_4 / t_2)) + Float64(x1 - Float64(Float64(x1 * Float64(Float64(x1 * Float64(6.0 + Float64(Float64(Float64(Float64(-2.0 * t_1) - Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0))) - Float64(x2 * -4.0)) - Float64(x1 * -6.0)))) - 2.0)) - Float64(x2 * -4.0))))); elseif (x1 <= -2.7e+28) tmp = t_5; elseif (x1 <= 0.43) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * Float64(2.0 - t_3)) + Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 3.2e+87) tmp = t_5; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * t_1)) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(t_3 / x2)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (2.0 * x2) - 3.0; t_2 = -1.0 - (x1 * x1); t_3 = x1 * ((x1 * 3.0) + 9.0); t_4 = x1 - (t_0 - (2.0 * x2)); t_5 = x1 - ((3.0 * (t_4 / ((x1 * x1) + 1.0))) - (x1 - ((((((x1 * x1) * 6.0) + (t_1 * ((x1 * 2.0) * 3.0))) * t_2) - (3.0 * t_0)) - (x1 * (x1 * x1))))); tmp = 0.0; if (x1 <= -1.35e+154) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))); elseif (x1 <= -3.1e+102) tmp = x1 + ((3.0 * (t_4 / t_2)) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0)))); elseif (x1 <= -2.7e+28) tmp = t_5; elseif (x1 <= 0.43) tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_3)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); elseif (x1 <= 3.2e+87) tmp = t_5; else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + (t_3 / x2)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 - N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 - N[(N[(3.0 * N[(t$95$4 / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 - N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(t$95$1 * N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.35e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.1e+102], N[(x1 + N[(N[(3.0 * N[(t$95$4 / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 - N[(N[(x1 * N[(N[(x1 * N[(6.0 + N[(N[(N[(N[(-2.0 * t$95$1), $MachinePrecision] - N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision] - N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.7e+28], t$95$5, If[LessEqual[x1, 0.43], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * N[(2.0 - t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.2e+87], t$95$5, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(t$95$3 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 2 \cdot x2 - 3\\
t_2 := -1 - x1 \cdot x1\\
t_3 := x1 \cdot \left(x1 \cdot 3 + 9\right)\\
t_4 := x1 - \left(t\_0 - 2 \cdot x2\right)\\
t_5 := x1 - \left(3 \cdot \frac{t\_4}{x1 \cdot x1 + 1} - \left(x1 - \left(\left(\left(\left(x1 \cdot x1\right) \cdot 6 + t\_1 \cdot \left(\left(x1 \cdot 2\right) \cdot 3\right)\right) \cdot t\_2 - 3 \cdot t\_0\right) - x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(9 + x2 \cdot 6\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -3.1 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_4}{t\_2} + \left(x1 - \left(x1 \cdot \left(x1 \cdot \left(6 + \left(\left(\left(-2 \cdot t\_1 - \left(x2 \cdot 6 + x2 \cdot 8\right)\right) - x2 \cdot -4\right) - x1 \cdot -6\right)\right) - 2\right) - x2 \cdot -4\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.7 \cdot 10^{+28}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 0.43:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(x1 \cdot \left(2 - t\_3\right) + x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.2 \cdot 10^{+87}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot t\_1\right) + x2 \cdot \left(x1 \cdot 6 + \frac{t\_3}{x2}\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.35000000000000003e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
Taylor expanded in x1 around 0 68.2%
if -1.35000000000000003e154 < x1 < -3.09999999999999987e102Initial program 18.2%
Taylor expanded in x1 around inf 18.2%
Taylor expanded in x1 around 0 100.0%
if -3.09999999999999987e102 < x1 < -2.7000000000000002e28 or 0.429999999999999993 < x1 < 3.2e87Initial program 98.9%
Taylor expanded in x1 around 0 83.3%
Taylor expanded in x1 around inf 82.4%
Taylor expanded in x1 around inf 78.8%
Taylor expanded in x1 around inf 79.1%
if -2.7000000000000002e28 < x1 < 0.429999999999999993Initial program 99.4%
Taylor expanded in x1 around 0 88.8%
Taylor expanded in x1 around 0 89.2%
Taylor expanded in x2 around 0 97.4%
if 3.2e87 < x1 Initial program 27.7%
Taylor expanded in x1 around 0 11.4%
Taylor expanded in x1 around 0 89.4%
Taylor expanded in x2 around inf 100.0%
Final simplification93.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (- -1.0 (* x1 x1)))
(t_3 (* (* x1 2.0) 3.0))
(t_4 (* x1 (+ (* x1 3.0) 9.0)))
(t_5 (* x1 (* x1 x1)))
(t_6 (* x1 (* x1 3.0)))
(t_7 (- x1 (- t_6 (* 2.0 x2))))
(t_8 (* 3.0 t_6)))
(if (<= x1 -1.35e+154)
(+
x1
(+
(* x2 -6.0)
(* x1 (- (+ (* x2 -12.0) (* x1 (+ 9.0 (* x2 6.0)))) 2.0))))
(if (<= x1 -3.2e+102)
(+
x1
(+
(* 3.0 (/ t_7 t_2))
(-
x1
(-
(*
x1
(-
(*
x1
(+
6.0
(-
(- (- (* -2.0 t_0) (+ (* x2 6.0) (* x2 8.0))) (* x2 -4.0))
(* x1 -6.0))))
2.0))
(* x2 -4.0)))))
(if (<= x1 -2.7e+28)
(+
x1
(+
(+
x1
(-
t_5
(-
(*
t_1
(-
(* t_3 (- 3.0 (* 2.0 x2)))
(*
(* x1 x1)
(- (* (/ (- (+ t_6 (* 2.0 x2)) x1) t_1) 4.0) 6.0))))
t_8)))
(* 3.0 (* x2 -2.0))))
(if (<= x1 0.43)
(+
x1
(-
(* x2 -6.0)
(+
(* x1 (- 2.0 t_4))
(* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(if (<= x1 3.2e+87)
(-
x1
(-
(* 3.0 (/ t_7 t_1))
(-
x1
(- (- (* (+ (* (* x1 x1) 6.0) (* t_0 t_3)) t_2) t_8) t_5))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+ (* 4.0 (* x2 t_0)) (* x2 (+ (* x1 6.0) (/ t_4 x2))))
2.0)))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = (x1 * x1) + 1.0;
double t_2 = -1.0 - (x1 * x1);
double t_3 = (x1 * 2.0) * 3.0;
double t_4 = x1 * ((x1 * 3.0) + 9.0);
double t_5 = x1 * (x1 * x1);
double t_6 = x1 * (x1 * 3.0);
double t_7 = x1 - (t_6 - (2.0 * x2));
double t_8 = 3.0 * t_6;
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -3.2e+102) {
tmp = x1 + ((3.0 * (t_7 / t_2)) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_0) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0))));
} else if (x1 <= -2.7e+28) {
tmp = x1 + ((x1 + (t_5 - ((t_1 * ((t_3 * (3.0 - (2.0 * x2))) - ((x1 * x1) * (((((t_6 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)))) - t_8))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 0.43) {
tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_4)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 3.2e+87) {
tmp = x1 - ((3.0 * (t_7 / t_1)) - (x1 - ((((((x1 * x1) * 6.0) + (t_0 * t_3)) * t_2) - t_8) - t_5)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_0)) + (x2 * ((x1 * 6.0) + (t_4 / x2)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = (x1 * x1) + 1.0d0
t_2 = (-1.0d0) - (x1 * x1)
t_3 = (x1 * 2.0d0) * 3.0d0
t_4 = x1 * ((x1 * 3.0d0) + 9.0d0)
t_5 = x1 * (x1 * x1)
t_6 = x1 * (x1 * 3.0d0)
t_7 = x1 - (t_6 - (2.0d0 * x2))
t_8 = 3.0d0 * t_6
if (x1 <= (-1.35d+154)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * (9.0d0 + (x2 * 6.0d0)))) - 2.0d0)))
else if (x1 <= (-3.2d+102)) then
tmp = x1 + ((3.0d0 * (t_7 / t_2)) + (x1 - ((x1 * ((x1 * (6.0d0 + (((((-2.0d0) * t_0) - ((x2 * 6.0d0) + (x2 * 8.0d0))) - (x2 * (-4.0d0))) - (x1 * (-6.0d0))))) - 2.0d0)) - (x2 * (-4.0d0)))))
else if (x1 <= (-2.7d+28)) then
tmp = x1 + ((x1 + (t_5 - ((t_1 * ((t_3 * (3.0d0 - (2.0d0 * x2))) - ((x1 * x1) * (((((t_6 + (2.0d0 * x2)) - x1) / t_1) * 4.0d0) - 6.0d0)))) - t_8))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 0.43d0) then
tmp = x1 + ((x2 * (-6.0d0)) - ((x1 * (2.0d0 - t_4)) + (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else if (x1 <= 3.2d+87) then
tmp = x1 - ((3.0d0 * (t_7 / t_1)) - (x1 - ((((((x1 * x1) * 6.0d0) + (t_0 * t_3)) * t_2) - t_8) - t_5)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * t_0)) + (x2 * ((x1 * 6.0d0) + (t_4 / x2)))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = (x1 * x1) + 1.0;
double t_2 = -1.0 - (x1 * x1);
double t_3 = (x1 * 2.0) * 3.0;
double t_4 = x1 * ((x1 * 3.0) + 9.0);
double t_5 = x1 * (x1 * x1);
double t_6 = x1 * (x1 * 3.0);
double t_7 = x1 - (t_6 - (2.0 * x2));
double t_8 = 3.0 * t_6;
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -3.2e+102) {
tmp = x1 + ((3.0 * (t_7 / t_2)) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_0) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0))));
} else if (x1 <= -2.7e+28) {
tmp = x1 + ((x1 + (t_5 - ((t_1 * ((t_3 * (3.0 - (2.0 * x2))) - ((x1 * x1) * (((((t_6 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)))) - t_8))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 0.43) {
tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_4)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else if (x1 <= 3.2e+87) {
tmp = x1 - ((3.0 * (t_7 / t_1)) - (x1 - ((((((x1 * x1) * 6.0) + (t_0 * t_3)) * t_2) - t_8) - t_5)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_0)) + (x2 * ((x1 * 6.0) + (t_4 / x2)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = (x1 * x1) + 1.0 t_2 = -1.0 - (x1 * x1) t_3 = (x1 * 2.0) * 3.0 t_4 = x1 * ((x1 * 3.0) + 9.0) t_5 = x1 * (x1 * x1) t_6 = x1 * (x1 * 3.0) t_7 = x1 - (t_6 - (2.0 * x2)) t_8 = 3.0 * t_6 tmp = 0 if x1 <= -1.35e+154: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))) elif x1 <= -3.2e+102: tmp = x1 + ((3.0 * (t_7 / t_2)) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_0) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0)))) elif x1 <= -2.7e+28: tmp = x1 + ((x1 + (t_5 - ((t_1 * ((t_3 * (3.0 - (2.0 * x2))) - ((x1 * x1) * (((((t_6 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)))) - t_8))) + (3.0 * (x2 * -2.0))) elif x1 <= 0.43: tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_4)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) elif x1 <= 3.2e+87: tmp = x1 - ((3.0 * (t_7 / t_1)) - (x1 - ((((((x1 * x1) * 6.0) + (t_0 * t_3)) * t_2) - t_8) - t_5))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_0)) + (x2 * ((x1 * 6.0) + (t_4 / x2)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(-1.0 - Float64(x1 * x1)) t_3 = Float64(Float64(x1 * 2.0) * 3.0) t_4 = Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) t_5 = Float64(x1 * Float64(x1 * x1)) t_6 = Float64(x1 * Float64(x1 * 3.0)) t_7 = Float64(x1 - Float64(t_6 - Float64(2.0 * x2))) t_8 = Float64(3.0 * t_6) tmp = 0.0 if (x1 <= -1.35e+154) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(9.0 + Float64(x2 * 6.0)))) - 2.0)))); elseif (x1 <= -3.2e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_7 / t_2)) + Float64(x1 - Float64(Float64(x1 * Float64(Float64(x1 * Float64(6.0 + Float64(Float64(Float64(Float64(-2.0 * t_0) - Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0))) - Float64(x2 * -4.0)) - Float64(x1 * -6.0)))) - 2.0)) - Float64(x2 * -4.0))))); elseif (x1 <= -2.7e+28) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_5 - Float64(Float64(t_1 * Float64(Float64(t_3 * Float64(3.0 - Float64(2.0 * x2))) - Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_6 + Float64(2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)))) - t_8))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 0.43) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * Float64(2.0 - t_4)) + Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 3.2e+87) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_7 / t_1)) - Float64(x1 - Float64(Float64(Float64(Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(t_0 * t_3)) * t_2) - t_8) - t_5)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * t_0)) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(t_4 / x2)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = (x1 * x1) + 1.0; t_2 = -1.0 - (x1 * x1); t_3 = (x1 * 2.0) * 3.0; t_4 = x1 * ((x1 * 3.0) + 9.0); t_5 = x1 * (x1 * x1); t_6 = x1 * (x1 * 3.0); t_7 = x1 - (t_6 - (2.0 * x2)); t_8 = 3.0 * t_6; tmp = 0.0; if (x1 <= -1.35e+154) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))); elseif (x1 <= -3.2e+102) tmp = x1 + ((3.0 * (t_7 / t_2)) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_0) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0)))); elseif (x1 <= -2.7e+28) tmp = x1 + ((x1 + (t_5 - ((t_1 * ((t_3 * (3.0 - (2.0 * x2))) - ((x1 * x1) * (((((t_6 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)))) - t_8))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 0.43) tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_4)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); elseif (x1 <= 3.2e+87) tmp = x1 - ((3.0 * (t_7 / t_1)) - (x1 - ((((((x1 * x1) * 6.0) + (t_0 * t_3)) * t_2) - t_8) - t_5))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_0)) + (x2 * ((x1 * 6.0) + (t_4 / x2)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * 2.0), $MachinePrecision] * 3.0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(x1 - N[(t$95$6 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(3.0 * t$95$6), $MachinePrecision]}, If[LessEqual[x1, -1.35e+154], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.2e+102], N[(x1 + N[(N[(3.0 * N[(t$95$7 / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 - N[(N[(x1 * N[(N[(x1 * N[(6.0 + N[(N[(N[(N[(-2.0 * t$95$0), $MachinePrecision] - N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision] - N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.7e+28], N[(x1 + N[(N[(x1 + N[(t$95$5 - N[(N[(t$95$1 * N[(N[(t$95$3 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$6 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.43], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * N[(2.0 - t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.2e+87], N[(x1 - N[(N[(3.0 * N[(t$95$7 / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(x1 - N[(N[(N[(N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - t$95$8), $MachinePrecision] - t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(t$95$4 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := x1 \cdot x1 + 1\\
t_2 := -1 - x1 \cdot x1\\
t_3 := \left(x1 \cdot 2\right) \cdot 3\\
t_4 := x1 \cdot \left(x1 \cdot 3 + 9\right)\\
t_5 := x1 \cdot \left(x1 \cdot x1\right)\\
t_6 := x1 \cdot \left(x1 \cdot 3\right)\\
t_7 := x1 - \left(t\_6 - 2 \cdot x2\right)\\
t_8 := 3 \cdot t\_6\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(9 + x2 \cdot 6\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -3.2 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_7}{t\_2} + \left(x1 - \left(x1 \cdot \left(x1 \cdot \left(6 + \left(\left(\left(-2 \cdot t\_0 - \left(x2 \cdot 6 + x2 \cdot 8\right)\right) - x2 \cdot -4\right) - x1 \cdot -6\right)\right) - 2\right) - x2 \cdot -4\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.7 \cdot 10^{+28}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_5 - \left(t\_1 \cdot \left(t\_3 \cdot \left(3 - 2 \cdot x2\right) - \left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_6 + 2 \cdot x2\right) - x1}{t\_1} \cdot 4 - 6\right)\right) - t\_8\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 0.43:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(x1 \cdot \left(2 - t\_4\right) + x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.2 \cdot 10^{+87}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_7}{t\_1} - \left(x1 - \left(\left(\left(\left(x1 \cdot x1\right) \cdot 6 + t\_0 \cdot t\_3\right) \cdot t\_2 - t\_8\right) - t\_5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot t\_0\right) + x2 \cdot \left(x1 \cdot 6 + \frac{t\_4}{x2}\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.35000000000000003e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
Taylor expanded in x1 around 0 68.2%
if -1.35000000000000003e154 < x1 < -3.1999999999999999e102Initial program 18.2%
Taylor expanded in x1 around inf 18.2%
Taylor expanded in x1 around 0 100.0%
if -3.1999999999999999e102 < x1 < -2.7000000000000002e28Initial program 99.2%
Taylor expanded in x1 around 0 83.9%
Taylor expanded in x1 around inf 83.9%
Taylor expanded in x1 around inf 83.9%
Taylor expanded in x1 around 0 83.9%
*-commutative83.9%
Simplified83.9%
if -2.7000000000000002e28 < x1 < 0.429999999999999993Initial program 99.4%
Taylor expanded in x1 around 0 88.8%
Taylor expanded in x1 around 0 89.2%
Taylor expanded in x2 around 0 97.4%
if 0.429999999999999993 < x1 < 3.2e87Initial program 98.6%
Taylor expanded in x1 around 0 82.6%
Taylor expanded in x1 around inf 80.8%
Taylor expanded in x1 around inf 73.7%
Taylor expanded in x1 around inf 74.4%
if 3.2e87 < x1 Initial program 27.7%
Taylor expanded in x1 around 0 11.4%
Taylor expanded in x1 around 0 89.4%
Taylor expanded in x2 around inf 100.0%
Final simplification93.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* x1 3.0) 9.0))) (t_1 (- (* 2.0 x2) 3.0)))
(if (<= x1 -9.5e+153)
(+
x1
(+
(* x2 -6.0)
(* x1 (- (+ (* x2 -12.0) (* x1 (+ 9.0 (* x2 6.0)))) 2.0))))
(if (<= x1 -4.5e+45)
(+
x1
(+
(* 3.0 (/ (- x1 (- (* x1 (* x1 3.0)) (* 2.0 x2))) (- -1.0 (* x1 x1))))
(-
x1
(-
(*
x1
(-
(*
x1
(+
6.0
(-
(- (- (* -2.0 t_1) (+ (* x2 6.0) (* x2 8.0))) (* x2 -4.0))
(* x1 -6.0))))
2.0))
(* x2 -4.0)))))
(if (<= x1 7.5e+51)
(+
x1
(-
(* x2 -6.0)
(+
(* x1 (- 2.0 t_0))
(* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+ (* 4.0 (* x2 t_1)) (* x2 (+ (* x1 6.0) (/ t_0 x2))))
2.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 3.0) + 9.0);
double t_1 = (2.0 * x2) - 3.0;
double tmp;
if (x1 <= -9.5e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -4.5e+45) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0))));
} else if (x1 <= 7.5e+51) {
tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_0)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + (t_0 / x2)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 * ((x1 * 3.0d0) + 9.0d0)
t_1 = (2.0d0 * x2) - 3.0d0
if (x1 <= (-9.5d+153)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * (9.0d0 + (x2 * 6.0d0)))) - 2.0d0)))
else if (x1 <= (-4.5d+45)) then
tmp = x1 + ((3.0d0 * ((x1 - ((x1 * (x1 * 3.0d0)) - (2.0d0 * x2))) / ((-1.0d0) - (x1 * x1)))) + (x1 - ((x1 * ((x1 * (6.0d0 + (((((-2.0d0) * t_1) - ((x2 * 6.0d0) + (x2 * 8.0d0))) - (x2 * (-4.0d0))) - (x1 * (-6.0d0))))) - 2.0d0)) - (x2 * (-4.0d0)))))
else if (x1 <= 7.5d+51) then
tmp = x1 + ((x2 * (-6.0d0)) - ((x1 * (2.0d0 - t_0)) + (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * t_1)) + (x2 * ((x1 * 6.0d0) + (t_0 / x2)))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 3.0) + 9.0);
double t_1 = (2.0 * x2) - 3.0;
double tmp;
if (x1 <= -9.5e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -4.5e+45) {
tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0))));
} else if (x1 <= 7.5e+51) {
tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_0)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + (t_0 / x2)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 3.0) + 9.0) t_1 = (2.0 * x2) - 3.0 tmp = 0 if x1 <= -9.5e+153: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))) elif x1 <= -4.5e+45: tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0)))) elif x1 <= 7.5e+51: tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_0)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + (t_0 / x2)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) t_1 = Float64(Float64(2.0 * x2) - 3.0) tmp = 0.0 if (x1 <= -9.5e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(9.0 + Float64(x2 * 6.0)))) - 2.0)))); elseif (x1 <= -4.5e+45) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x1 - Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2))) / Float64(-1.0 - Float64(x1 * x1)))) + Float64(x1 - Float64(Float64(x1 * Float64(Float64(x1 * Float64(6.0 + Float64(Float64(Float64(Float64(-2.0 * t_1) - Float64(Float64(x2 * 6.0) + Float64(x2 * 8.0))) - Float64(x2 * -4.0)) - Float64(x1 * -6.0)))) - 2.0)) - Float64(x2 * -4.0))))); elseif (x1 <= 7.5e+51) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * Float64(2.0 - t_0)) + Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * t_1)) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(t_0 / x2)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 3.0) + 9.0); t_1 = (2.0 * x2) - 3.0; tmp = 0.0; if (x1 <= -9.5e+153) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))); elseif (x1 <= -4.5e+45) tmp = x1 + ((3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / (-1.0 - (x1 * x1)))) + (x1 - ((x1 * ((x1 * (6.0 + ((((-2.0 * t_1) - ((x2 * 6.0) + (x2 * 8.0))) - (x2 * -4.0)) - (x1 * -6.0)))) - 2.0)) - (x2 * -4.0)))); elseif (x1 <= 7.5e+51) tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_0)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_1)) + (x2 * ((x1 * 6.0) + (t_0 / x2)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, If[LessEqual[x1, -9.5e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.5e+45], N[(x1 + N[(N[(3.0 * N[(N[(x1 - N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 - N[(N[(x1 * N[(N[(x1 * N[(6.0 + N[(N[(N[(N[(-2.0 * t$95$1), $MachinePrecision] - N[(N[(x2 * 6.0), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision] - N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.5e+51], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * N[(2.0 - t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(t$95$0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3 + 9\right)\\
t_1 := 2 \cdot x2 - 3\\
\mathbf{if}\;x1 \leq -9.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(9 + x2 \cdot 6\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -4.5 \cdot 10^{+45}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right)}{-1 - x1 \cdot x1} + \left(x1 - \left(x1 \cdot \left(x1 \cdot \left(6 + \left(\left(\left(-2 \cdot t\_1 - \left(x2 \cdot 6 + x2 \cdot 8\right)\right) - x2 \cdot -4\right) - x1 \cdot -6\right)\right) - 2\right) - x2 \cdot -4\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{+51}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(x1 \cdot \left(2 - t\_0\right) + x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot t\_1\right) + x2 \cdot \left(x1 \cdot 6 + \frac{t\_0}{x2}\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -9.4999999999999995e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
Taylor expanded in x1 around 0 68.2%
if -9.4999999999999995e153 < x1 < -4.4999999999999998e45Initial program 52.4%
Taylor expanded in x1 around inf 52.4%
Taylor expanded in x1 around 0 61.1%
if -4.4999999999999998e45 < x1 < 7.4999999999999999e51Initial program 99.3%
Taylor expanded in x1 around 0 82.3%
Taylor expanded in x1 around 0 82.8%
Taylor expanded in x2 around 0 90.2%
if 7.4999999999999999e51 < x1 Initial program 32.0%
Taylor expanded in x1 around 0 11.0%
Taylor expanded in x1 around 0 84.4%
Taylor expanded in x2 around inf 94.4%
Final simplification87.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* x1 3.0) 9.0)))
(t_1
(+
x1
(-
(* x2 -6.0)
(*
x1
(+
2.0
(-
(* 4.0 (* x2 (- 3.0 (* 2.0 x2))))
(* 3.0 (* x1 (- 3.0 (* x2 -2.0)))))))))))
(if (<= x1 -4.3e+49)
(+
x1
(+
(* x2 -6.0)
(* x1 (- (+ (* x2 -12.0) (* x1 (+ 9.0 (* x2 6.0)))) 2.0))))
(if (<= x1 -4.8e-261)
t_1
(if (<= x1 6.5e-171)
(+
x1
(*
x2
(- (+ (* x1 (- (* x1 6.0) 12.0)) (/ (* x1 (- t_0 2.0)) x2)) 6.0)))
(if (<= x1 3.85e+102)
t_1
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 t_0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 3.0) + 9.0);
double t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (3.0 * (x1 * (3.0 - (x2 * -2.0))))))));
double tmp;
if (x1 <= -4.3e+49) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -4.8e-261) {
tmp = t_1;
} else if (x1 <= 6.5e-171) {
tmp = x1 + (x2 * (((x1 * ((x1 * 6.0) - 12.0)) + ((x1 * (t_0 - 2.0)) / x2)) - 6.0));
} else if (x1 <= 3.85e+102) {
tmp = t_1;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 * ((x1 * 3.0d0) + 9.0d0)
t_1 = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0)))))))))
if (x1 <= (-4.3d+49)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * (9.0d0 + (x2 * 6.0d0)))) - 2.0d0)))
else if (x1 <= (-4.8d-261)) then
tmp = t_1
else if (x1 <= 6.5d-171) then
tmp = x1 + (x2 * (((x1 * ((x1 * 6.0d0) - 12.0d0)) + ((x1 * (t_0 - 2.0d0)) / x2)) - 6.0d0))
else if (x1 <= 3.85d+102) then
tmp = t_1
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - t_0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 3.0) + 9.0);
double t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (3.0 * (x1 * (3.0 - (x2 * -2.0))))))));
double tmp;
if (x1 <= -4.3e+49) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -4.8e-261) {
tmp = t_1;
} else if (x1 <= 6.5e-171) {
tmp = x1 + (x2 * (((x1 * ((x1 * 6.0) - 12.0)) + ((x1 * (t_0 - 2.0)) / x2)) - 6.0));
} else if (x1 <= 3.85e+102) {
tmp = t_1;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 3.0) + 9.0) t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) tmp = 0 if x1 <= -4.3e+49: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))) elif x1 <= -4.8e-261: tmp = t_1 elif x1 <= 6.5e-171: tmp = x1 + (x2 * (((x1 * ((x1 * 6.0) - 12.0)) + ((x1 * (t_0 - 2.0)) / x2)) - 6.0)) elif x1 <= 3.85e+102: tmp = t_1 else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) t_1 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0))))))))) tmp = 0.0 if (x1 <= -4.3e+49) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(9.0 + Float64(x2 * 6.0)))) - 2.0)))); elseif (x1 <= -4.8e-261) tmp = t_1; elseif (x1 <= 6.5e-171) tmp = Float64(x1 + Float64(x2 * Float64(Float64(Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0)) + Float64(Float64(x1 * Float64(t_0 - 2.0)) / x2)) - 6.0))); elseif (x1 <= 3.85e+102) tmp = t_1; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - t_0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 3.0) + 9.0); t_1 = x1 + ((x2 * -6.0) - (x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))); tmp = 0.0; if (x1 <= -4.3e+49) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))); elseif (x1 <= -4.8e-261) tmp = t_1; elseif (x1 <= 6.5e-171) tmp = x1 + (x2 * (((x1 * ((x1 * 6.0) - 12.0)) + ((x1 * (t_0 - 2.0)) / x2)) - 6.0)); elseif (x1 <= 3.85e+102) tmp = t_1; else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.3e+49], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.8e-261], t$95$1, If[LessEqual[x1, 6.5e-171], N[(x1 + N[(x2 * N[(N[(N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(t$95$0 - 2.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.85e+102], t$95$1, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3 + 9\right)\\
t_1 := x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.3 \cdot 10^{+49}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(9 + x2 \cdot 6\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -4.8 \cdot 10^{-261}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{-171}:\\
\;\;\;\;x1 + x2 \cdot \left(\left(x1 \cdot \left(x1 \cdot 6 - 12\right) + \frac{x1 \cdot \left(t\_0 - 2\right)}{x2}\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 3.85 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - t\_0\right)\right)\\
\end{array}
\end{array}
if x1 < -4.2999999999999999e49Initial program 24.3%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 4.9%
Taylor expanded in x2 around 0 5.3%
Taylor expanded in x1 around 0 53.0%
if -4.2999999999999999e49 < x1 < -4.80000000000000028e-261 or 6.5000000000000004e-171 < x1 < 3.85000000000000007e102Initial program 99.2%
Taylor expanded in x1 around 0 81.4%
Taylor expanded in x1 around 0 82.0%
if -4.80000000000000028e-261 < x1 < 6.5000000000000004e-171Initial program 99.5%
Taylor expanded in x1 around 0 80.9%
Taylor expanded in x1 around 0 81.1%
Taylor expanded in x2 around 0 92.3%
Taylor expanded in x2 around inf 92.4%
if 3.85000000000000007e102 < x1 Initial program 22.7%
Taylor expanded in x1 around 0 5.4%
Taylor expanded in x1 around 0 88.6%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification81.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* x1 3.0) 9.0)))
(t_1 (* 4.0 (* x2 (- 3.0 (* 2.0 x2))))))
(if (<= x1 -7.5e+48)
(+
x1
(+
(* x2 -6.0)
(* x1 (- (+ (* x2 -12.0) (* x1 (+ 9.0 (* x2 6.0)))) 2.0))))
(if (<= x1 -3.1e-266)
(+
x1
(-
(* x2 -6.0)
(* x1 (+ 2.0 (- t_1 (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))))))))
(if (<= x1 6.5e-171)
(+
x1
(*
x2
(- (+ (* x1 (- (* x1 6.0) 12.0)) (/ (* x1 (- t_0 2.0)) x2)) 6.0)))
(if (<= x1 5e+102)
(-
x1
(-
(* x1 (+ 2.0 (- t_1 (* x1 (+ (* x1 3.0) (* x2 6.0))))))
(* x2 -6.0)))
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 t_0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 3.0) + 9.0);
double t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -7.5e+48) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -3.1e-266) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (t_1 - (3.0 * (x1 * (3.0 - (x2 * -2.0))))))));
} else if (x1 <= 6.5e-171) {
tmp = x1 + (x2 * (((x1 * ((x1 * 6.0) - 12.0)) + ((x1 * (t_0 - 2.0)) / x2)) - 6.0));
} else if (x1 <= 5e+102) {
tmp = x1 - ((x1 * (2.0 + (t_1 - (x1 * ((x1 * 3.0) + (x2 * 6.0)))))) - (x2 * -6.0));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 * ((x1 * 3.0d0) + 9.0d0)
t_1 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
if (x1 <= (-7.5d+48)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * (9.0d0 + (x2 * 6.0d0)))) - 2.0d0)))
else if (x1 <= (-3.1d-266)) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 + (t_1 - (3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0)))))))))
else if (x1 <= 6.5d-171) then
tmp = x1 + (x2 * (((x1 * ((x1 * 6.0d0) - 12.0d0)) + ((x1 * (t_0 - 2.0d0)) / x2)) - 6.0d0))
else if (x1 <= 5d+102) then
tmp = x1 - ((x1 * (2.0d0 + (t_1 - (x1 * ((x1 * 3.0d0) + (x2 * 6.0d0)))))) - (x2 * (-6.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - t_0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 3.0) + 9.0);
double t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double tmp;
if (x1 <= -7.5e+48) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -3.1e-266) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (t_1 - (3.0 * (x1 * (3.0 - (x2 * -2.0))))))));
} else if (x1 <= 6.5e-171) {
tmp = x1 + (x2 * (((x1 * ((x1 * 6.0) - 12.0)) + ((x1 * (t_0 - 2.0)) / x2)) - 6.0));
} else if (x1 <= 5e+102) {
tmp = x1 - ((x1 * (2.0 + (t_1 - (x1 * ((x1 * 3.0) + (x2 * 6.0)))))) - (x2 * -6.0));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 3.0) + 9.0) t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2))) tmp = 0 if x1 <= -7.5e+48: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))) elif x1 <= -3.1e-266: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (t_1 - (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))) elif x1 <= 6.5e-171: tmp = x1 + (x2 * (((x1 * ((x1 * 6.0) - 12.0)) + ((x1 * (t_0 - 2.0)) / x2)) - 6.0)) elif x1 <= 5e+102: tmp = x1 - ((x1 * (2.0 + (t_1 - (x1 * ((x1 * 3.0) + (x2 * 6.0)))))) - (x2 * -6.0)) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) t_1 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) tmp = 0.0 if (x1 <= -7.5e+48) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(9.0 + Float64(x2 * 6.0)))) - 2.0)))); elseif (x1 <= -3.1e-266) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 + Float64(t_1 - Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0))))))))); elseif (x1 <= 6.5e-171) tmp = Float64(x1 + Float64(x2 * Float64(Float64(Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0)) + Float64(Float64(x1 * Float64(t_0 - 2.0)) / x2)) - 6.0))); elseif (x1 <= 5e+102) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + Float64(t_1 - Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(x2 * 6.0)))))) - Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - t_0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 3.0) + 9.0); t_1 = 4.0 * (x2 * (3.0 - (2.0 * x2))); tmp = 0.0; if (x1 <= -7.5e+48) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))); elseif (x1 <= -3.1e-266) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 + (t_1 - (3.0 * (x1 * (3.0 - (x2 * -2.0)))))))); elseif (x1 <= 6.5e-171) tmp = x1 + (x2 * (((x1 * ((x1 * 6.0) - 12.0)) + ((x1 * (t_0 - 2.0)) / x2)) - 6.0)); elseif (x1 <= 5e+102) tmp = x1 - ((x1 * (2.0 + (t_1 - (x1 * ((x1 * 3.0) + (x2 * 6.0)))))) - (x2 * -6.0)); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e+48], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.1e-266], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 + N[(t$95$1 - N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.5e-171], N[(x1 + N[(x2 * N[(N[(N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(t$95$0 - 2.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+102], N[(x1 - N[(N[(x1 * N[(2.0 + N[(t$95$1 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3 + 9\right)\\
t_1 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+48}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(9 + x2 \cdot 6\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -3.1 \cdot 10^{-266}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 + \left(t\_1 - 3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{-171}:\\
\;\;\;\;x1 + x2 \cdot \left(\left(x1 \cdot \left(x1 \cdot 6 - 12\right) + \frac{x1 \cdot \left(t\_0 - 2\right)}{x2}\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+102}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + \left(t\_1 - x1 \cdot \left(x1 \cdot 3 + x2 \cdot 6\right)\right)\right) - x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - t\_0\right)\right)\\
\end{array}
\end{array}
if x1 < -7.5000000000000006e48Initial program 24.3%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 4.9%
Taylor expanded in x2 around 0 5.3%
Taylor expanded in x1 around 0 53.0%
if -7.5000000000000006e48 < x1 < -3.09999999999999995e-266Initial program 99.3%
Taylor expanded in x1 around 0 84.6%
Taylor expanded in x1 around 0 85.2%
if -3.09999999999999995e-266 < x1 < 6.5000000000000004e-171Initial program 99.5%
Taylor expanded in x1 around 0 80.9%
Taylor expanded in x1 around 0 81.1%
Taylor expanded in x2 around 0 92.3%
Taylor expanded in x2 around inf 92.4%
if 6.5000000000000004e-171 < x1 < 5e102Initial program 99.2%
Taylor expanded in x1 around 0 76.4%
Taylor expanded in x1 around 0 77.3%
Taylor expanded in x2 around inf 77.7%
*-commutative77.7%
Simplified77.7%
if 5e102 < x1 Initial program 22.7%
Taylor expanded in x1 around 0 5.4%
Taylor expanded in x1 around 0 88.6%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification82.0%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -3e+50)
(+
x1
(+ (* x2 -6.0) (* x1 (- (+ (* x2 -12.0) (* x1 (+ 9.0 (* x2 6.0)))) 2.0))))
(if (<= x1 -1.48e-263)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))
(if (<= x1 4.2e-170)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 3.9e+102)
(-
x1
(-
(*
x1
(+ 2.0 (- (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))) (* x2 (* x1 6.0)))))
(* x2 -6.0)))
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0)))))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -3e+50) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -1.48e-263) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else if (x1 <= 4.2e-170) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.9e+102) {
tmp = x1 - ((x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x2 * (x1 * 6.0))))) - (x2 * -6.0));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-3d+50)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * (9.0d0 + (x2 * 6.0d0)))) - 2.0d0)))
else if (x1 <= (-1.48d-263)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
else if (x1 <= 4.2d-170) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 3.9d+102) then
tmp = x1 - ((x1 * (2.0d0 + ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - (x2 * (x1 * 6.0d0))))) - (x2 * (-6.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -3e+50) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -1.48e-263) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else if (x1 <= 4.2e-170) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.9e+102) {
tmp = x1 - ((x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x2 * (x1 * 6.0))))) - (x2 * -6.0));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -3e+50: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))) elif x1 <= -1.48e-263: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) elif x1 <= 4.2e-170: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 3.9e+102: tmp = x1 - ((x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x2 * (x1 * 6.0))))) - (x2 * -6.0)) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -3e+50) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(9.0 + Float64(x2 * 6.0)))) - 2.0)))); elseif (x1 <= -1.48e-263) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))); elseif (x1 <= 4.2e-170) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 3.9e+102) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - Float64(x2 * Float64(x1 * 6.0))))) - Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -3e+50) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))); elseif (x1 <= -1.48e-263) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); elseif (x1 <= 4.2e-170) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 3.9e+102) tmp = x1 - ((x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x2 * (x1 * 6.0))))) - (x2 * -6.0)); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -3e+50], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.48e-263], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e-170], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.9e+102], N[(x1 - N[(N[(x1 * N[(2.0 + N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3 \cdot 10^{+50}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(9 + x2 \cdot 6\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -1.48 \cdot 10^{-263}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{-170}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{+102}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - x2 \cdot \left(x1 \cdot 6\right)\right)\right) - x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.9999999999999998e50Initial program 24.3%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 4.9%
Taylor expanded in x2 around 0 5.3%
Taylor expanded in x1 around 0 53.0%
if -2.9999999999999998e50 < x1 < -1.47999999999999998e-263Initial program 99.3%
Taylor expanded in x1 around 0 84.6%
Taylor expanded in x1 around 0 84.7%
if -1.47999999999999998e-263 < x1 < 4.2000000000000001e-170Initial program 99.5%
Taylor expanded in x1 around -inf 0.0%
Taylor expanded in x1 around 0 92.3%
if 4.2000000000000001e-170 < x1 < 3.8999999999999998e102Initial program 99.2%
Taylor expanded in x1 around 0 76.4%
Taylor expanded in x1 around 0 77.3%
Taylor expanded in x2 around inf 76.3%
*-commutative76.3%
*-commutative76.3%
associate-*r*76.3%
Simplified76.3%
if 3.8999999999999998e102 < x1 Initial program 22.7%
Taylor expanded in x1 around 0 5.4%
Taylor expanded in x1 around 0 88.6%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification81.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* x1 3.0) 9.0))))
(if (<= x1 -1.7e+47)
(+
x1
(+
(* x2 -6.0)
(* x1 (- (+ (* x2 -12.0) (* x1 (+ 9.0 (* x2 6.0)))) 2.0))))
(if (<= x1 -2.5e-261)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))
(if (<= x1 6.2e-171)
(+
x1
(*
x2
(- (+ (* x1 (- (* x1 6.0) 12.0)) (/ (* x1 (- t_0 2.0)) x2)) 6.0)))
(if (<= x1 4.2e+100)
(-
x1
(-
(*
x1
(+ 2.0 (- (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))) (* x2 (* x1 6.0)))))
(* x2 -6.0)))
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 t_0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 3.0) + 9.0);
double tmp;
if (x1 <= -1.7e+47) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -2.5e-261) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else if (x1 <= 6.2e-171) {
tmp = x1 + (x2 * (((x1 * ((x1 * 6.0) - 12.0)) + ((x1 * (t_0 - 2.0)) / x2)) - 6.0));
} else if (x1 <= 4.2e+100) {
tmp = x1 - ((x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x2 * (x1 * 6.0))))) - (x2 * -6.0));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 * ((x1 * 3.0d0) + 9.0d0)
if (x1 <= (-1.7d+47)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * (9.0d0 + (x2 * 6.0d0)))) - 2.0d0)))
else if (x1 <= (-2.5d-261)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
else if (x1 <= 6.2d-171) then
tmp = x1 + (x2 * (((x1 * ((x1 * 6.0d0) - 12.0d0)) + ((x1 * (t_0 - 2.0d0)) / x2)) - 6.0d0))
else if (x1 <= 4.2d+100) then
tmp = x1 - ((x1 * (2.0d0 + ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - (x2 * (x1 * 6.0d0))))) - (x2 * (-6.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - t_0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 3.0) + 9.0);
double tmp;
if (x1 <= -1.7e+47) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -2.5e-261) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else if (x1 <= 6.2e-171) {
tmp = x1 + (x2 * (((x1 * ((x1 * 6.0) - 12.0)) + ((x1 * (t_0 - 2.0)) / x2)) - 6.0));
} else if (x1 <= 4.2e+100) {
tmp = x1 - ((x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x2 * (x1 * 6.0))))) - (x2 * -6.0));
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 3.0) + 9.0) tmp = 0 if x1 <= -1.7e+47: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))) elif x1 <= -2.5e-261: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) elif x1 <= 6.2e-171: tmp = x1 + (x2 * (((x1 * ((x1 * 6.0) - 12.0)) + ((x1 * (t_0 - 2.0)) / x2)) - 6.0)) elif x1 <= 4.2e+100: tmp = x1 - ((x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x2 * (x1 * 6.0))))) - (x2 * -6.0)) else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) tmp = 0.0 if (x1 <= -1.7e+47) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(9.0 + Float64(x2 * 6.0)))) - 2.0)))); elseif (x1 <= -2.5e-261) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))); elseif (x1 <= 6.2e-171) tmp = Float64(x1 + Float64(x2 * Float64(Float64(Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0)) + Float64(Float64(x1 * Float64(t_0 - 2.0)) / x2)) - 6.0))); elseif (x1 <= 4.2e+100) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - Float64(x2 * Float64(x1 * 6.0))))) - Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - t_0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 3.0) + 9.0); tmp = 0.0; if (x1 <= -1.7e+47) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))); elseif (x1 <= -2.5e-261) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); elseif (x1 <= 6.2e-171) tmp = x1 + (x2 * (((x1 * ((x1 * 6.0) - 12.0)) + ((x1 * (t_0 - 2.0)) / x2)) - 6.0)); elseif (x1 <= 4.2e+100) tmp = x1 - ((x1 * (2.0 + ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - (x2 * (x1 * 6.0))))) - (x2 * -6.0)); else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - t_0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.7e+47], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.5e-261], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.2e-171], N[(x1 + N[(x2 * N[(N[(N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(t$95$0 - 2.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e+100], N[(x1 - N[(N[(x1 * N[(2.0 + N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3 + 9\right)\\
\mathbf{if}\;x1 \leq -1.7 \cdot 10^{+47}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(9 + x2 \cdot 6\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-261}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 6.2 \cdot 10^{-171}:\\
\;\;\;\;x1 + x2 \cdot \left(\left(x1 \cdot \left(x1 \cdot 6 - 12\right) + \frac{x1 \cdot \left(t\_0 - 2\right)}{x2}\right) - 6\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{+100}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - x2 \cdot \left(x1 \cdot 6\right)\right)\right) - x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - t\_0\right)\right)\\
\end{array}
\end{array}
if x1 < -1.6999999999999999e47Initial program 24.3%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 4.9%
Taylor expanded in x2 around 0 5.3%
Taylor expanded in x1 around 0 53.0%
if -1.6999999999999999e47 < x1 < -2.4999999999999999e-261Initial program 99.3%
Taylor expanded in x1 around 0 84.6%
Taylor expanded in x1 around 0 84.7%
if -2.4999999999999999e-261 < x1 < 6.2000000000000001e-171Initial program 99.5%
Taylor expanded in x1 around 0 80.9%
Taylor expanded in x1 around 0 81.1%
Taylor expanded in x2 around 0 92.3%
Taylor expanded in x2 around inf 92.4%
if 6.2000000000000001e-171 < x1 < 4.1999999999999997e100Initial program 99.2%
Taylor expanded in x1 around 0 76.4%
Taylor expanded in x1 around 0 77.3%
Taylor expanded in x2 around inf 76.3%
*-commutative76.3%
*-commutative76.3%
associate-*r*76.3%
Simplified76.3%
if 4.1999999999999997e100 < x1 Initial program 22.7%
Taylor expanded in x1 around 0 5.4%
Taylor expanded in x1 around 0 88.6%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification81.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* x1 3.0) 9.0))))
(if (<= x1 -4.6e+49)
(+
x1
(+
(* x2 -6.0)
(* x1 (- (+ (* x2 -12.0) (* x1 (+ 9.0 (* x2 6.0)))) 2.0))))
(if (<= x1 3.1e+62)
(+
x1
(-
(* x2 -6.0)
(+
(* x1 (- 2.0 t_0))
(* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 (- (* 2.0 x2) 3.0)))
(* x2 (+ (* x1 6.0) (/ t_0 x2))))
2.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 3.0) + 9.0);
double tmp;
if (x1 <= -4.6e+49) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= 3.1e+62) {
tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_0)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x2 * ((x1 * 6.0) + (t_0 / x2)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 * ((x1 * 3.0d0) + 9.0d0)
if (x1 <= (-4.6d+49)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * (9.0d0 + (x2 * 6.0d0)))) - 2.0d0)))
else if (x1 <= 3.1d+62) then
tmp = x1 + ((x2 * (-6.0d0)) - ((x1 * (2.0d0 - t_0)) + (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x2 * ((x1 * 6.0d0) + (t_0 / x2)))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 3.0) + 9.0);
double tmp;
if (x1 <= -4.6e+49) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= 3.1e+62) {
tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_0)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x2 * ((x1 * 6.0) + (t_0 / x2)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 3.0) + 9.0) tmp = 0 if x1 <= -4.6e+49: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))) elif x1 <= 3.1e+62: tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_0)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x2 * ((x1 * 6.0) + (t_0 / x2)))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) tmp = 0.0 if (x1 <= -4.6e+49) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(9.0 + Float64(x2 * 6.0)))) - 2.0)))); elseif (x1 <= 3.1e+62) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * Float64(2.0 - t_0)) + Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(t_0 / x2)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 3.0) + 9.0); tmp = 0.0; if (x1 <= -4.6e+49) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))); elseif (x1 <= 3.1e+62) tmp = x1 + ((x2 * -6.0) - ((x1 * (2.0 - t_0)) + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x2 * ((x1 * 6.0) + (t_0 / x2)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.6e+49], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.1e+62], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * N[(2.0 - t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(t$95$0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3 + 9\right)\\
\mathbf{if}\;x1 \leq -4.6 \cdot 10^{+49}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(9 + x2 \cdot 6\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.1 \cdot 10^{+62}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(x1 \cdot \left(2 - t\_0\right) + x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x2 \cdot \left(x1 \cdot 6 + \frac{t\_0}{x2}\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.60000000000000004e49Initial program 24.3%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 4.9%
Taylor expanded in x2 around 0 5.3%
Taylor expanded in x1 around 0 53.0%
if -4.60000000000000004e49 < x1 < 3.10000000000000014e62Initial program 99.3%
Taylor expanded in x1 around 0 81.8%
Taylor expanded in x1 around 0 82.3%
Taylor expanded in x2 around 0 89.7%
if 3.10000000000000014e62 < x1 Initial program 30.6%
Taylor expanded in x1 around 0 11.1%
Taylor expanded in x1 around 0 86.0%
Taylor expanded in x2 around inf 96.2%
Final simplification85.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0))))))
(if (<= x1 -1.7e+49)
(+
x1
(+
(* x2 -6.0)
(* x1 (- (+ (* x2 -12.0) (* x1 (+ 9.0 (* x2 6.0)))) 2.0))))
(if (<= x1 5e+100)
(+
x1
(-
(* x2 -6.0)
(+ t_0 (* x2 (- (* x1 (- 12.0 (* x1 6.0))) (* 8.0 (* x1 x2)))))))
(+ x1 (- (* x2 -6.0) t_0))))))
double code(double x1, double x2) {
double t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double tmp;
if (x1 <= -1.7e+49) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= 5e+100) {
tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((x2 * -6.0) - t_0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))
if (x1 <= (-1.7d+49)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * (9.0d0 + (x2 * 6.0d0)))) - 2.0d0)))
else if (x1 <= 5d+100) then
tmp = x1 + ((x2 * (-6.0d0)) - (t_0 + (x2 * ((x1 * (12.0d0 - (x1 * 6.0d0))) - (8.0d0 * (x1 * x2))))))
else
tmp = x1 + ((x2 * (-6.0d0)) - t_0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)));
double tmp;
if (x1 <= -1.7e+49) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= 5e+100) {
tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2))))));
} else {
tmp = x1 + ((x2 * -6.0) - t_0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))) tmp = 0 if x1 <= -1.7e+49: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))) elif x1 <= 5e+100: tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))) else: tmp = x1 + ((x2 * -6.0) - t_0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))) tmp = 0.0 if (x1 <= -1.7e+49) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(9.0 + Float64(x2 * 6.0)))) - 2.0)))); elseif (x1 <= 5e+100) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(t_0 + Float64(x2 * Float64(Float64(x1 * Float64(12.0 - Float64(x1 * 6.0))) - Float64(8.0 * Float64(x1 * x2))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - t_0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))); tmp = 0.0; if (x1 <= -1.7e+49) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))); elseif (x1 <= 5e+100) tmp = x1 + ((x2 * -6.0) - (t_0 + (x2 * ((x1 * (12.0 - (x1 * 6.0))) - (8.0 * (x1 * x2)))))); else tmp = x1 + ((x2 * -6.0) - t_0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.7e+49], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+100], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(t$95$0 + N[(x2 * N[(N[(x1 * N[(12.0 - N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right)\\
\mathbf{if}\;x1 \leq -1.7 \cdot 10^{+49}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(9 + x2 \cdot 6\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+100}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(t\_0 + x2 \cdot \left(x1 \cdot \left(12 - x1 \cdot 6\right) - 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - t\_0\right)\\
\end{array}
\end{array}
if x1 < -1.7e49Initial program 24.3%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 4.9%
Taylor expanded in x2 around 0 5.3%
Taylor expanded in x1 around 0 53.0%
if -1.7e49 < x1 < 4.9999999999999999e100Initial program 99.3%
Taylor expanded in x1 around 0 81.3%
Taylor expanded in x1 around 0 81.7%
Taylor expanded in x2 around 0 88.9%
if 4.9999999999999999e100 < x1 Initial program 22.7%
Taylor expanded in x1 around 0 5.4%
Taylor expanded in x1 around 0 88.6%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification85.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))))
(if (<= x1 -8.2e+79)
(+ x1 (* x2 (- (* x1 (- (* x1 6.0) 12.0)) 6.0)))
(if (<= x1 -7.1e-266)
t_0
(if (<= x1 6.2e-171)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 3.8e+102)
t_0
(+
x1
(- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0))))))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -8.2e+79) {
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0));
} else if (x1 <= -7.1e-266) {
tmp = t_0;
} else if (x1 <= 6.2e-171) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.8e+102) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
if (x1 <= (-8.2d+79)) then
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0d0) - 12.0d0)) - 6.0d0))
else if (x1 <= (-7.1d-266)) then
tmp = t_0
else if (x1 <= 6.2d-171) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 3.8d+102) then
tmp = t_0
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -8.2e+79) {
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0));
} else if (x1 <= -7.1e-266) {
tmp = t_0;
} else if (x1 <= 6.2e-171) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.8e+102) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) tmp = 0 if x1 <= -8.2e+79: tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0)) elif x1 <= -7.1e-266: tmp = t_0 elif x1 <= 6.2e-171: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 3.8e+102: tmp = t_0 else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))) tmp = 0.0 if (x1 <= -8.2e+79) tmp = Float64(x1 + Float64(x2 * Float64(Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0)) - 6.0))); elseif (x1 <= -7.1e-266) tmp = t_0; elseif (x1 <= 6.2e-171) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 3.8e+102) tmp = t_0; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); tmp = 0.0; if (x1 <= -8.2e+79) tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0)); elseif (x1 <= -7.1e-266) tmp = t_0; elseif (x1 <= 6.2e-171) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 3.8e+102) tmp = t_0; else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -8.2e+79], N[(x1 + N[(x2 * N[(N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -7.1e-266], t$95$0, If[LessEqual[x1, 6.2e-171], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.8e+102], t$95$0, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -8.2 \cdot 10^{+79}:\\
\;\;\;\;x1 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 6 - 12\right) - 6\right)\\
\mathbf{elif}\;x1 \leq -7.1 \cdot 10^{-266}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 6.2 \cdot 10^{-171}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 3.8 \cdot 10^{+102}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -8.2e79Initial program 13.9%
Taylor expanded in x1 around 0 5.6%
Taylor expanded in x1 around 0 5.6%
Taylor expanded in x2 around 0 5.8%
Taylor expanded in x2 around inf 39.4%
if -8.2e79 < x1 < -7.09999999999999955e-266 or 6.2000000000000001e-171 < x1 < 3.79999999999999979e102Initial program 99.2%
Taylor expanded in x1 around 0 78.5%
Taylor expanded in x1 around 0 78.6%
if -7.09999999999999955e-266 < x1 < 6.2000000000000001e-171Initial program 99.5%
Taylor expanded in x1 around -inf 0.0%
Taylor expanded in x1 around 0 92.3%
if 3.79999999999999979e102 < x1 Initial program 22.7%
Taylor expanded in x1 around 0 5.4%
Taylor expanded in x1 around 0 88.6%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification78.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))))
(if (<= x1 -3.1e+50)
(+
x1
(+
(* x2 -6.0)
(* x1 (- (+ (* x2 -12.0) (* x1 (+ 9.0 (* x2 6.0)))) 2.0))))
(if (<= x1 -5.9e-266)
t_0
(if (<= x1 9.6e-171)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 3.9e+102)
t_0
(+
x1
(- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0))))))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -3.1e+50) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -5.9e-266) {
tmp = t_0;
} else if (x1 <= 9.6e-171) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.9e+102) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
if (x1 <= (-3.1d+50)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x2 * (-12.0d0)) + (x1 * (9.0d0 + (x2 * 6.0d0)))) - 2.0d0)))
else if (x1 <= (-5.9d-266)) then
tmp = t_0
else if (x1 <= 9.6d-171) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 3.9d+102) then
tmp = t_0
else
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -3.1e+50) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0)));
} else if (x1 <= -5.9e-266) {
tmp = t_0;
} else if (x1 <= 9.6e-171) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.9e+102) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) tmp = 0 if x1 <= -3.1e+50: tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))) elif x1 <= -5.9e-266: tmp = t_0 elif x1 <= 9.6e-171: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 3.9e+102: tmp = t_0 else: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))) tmp = 0.0 if (x1 <= -3.1e+50) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x2 * -12.0) + Float64(x1 * Float64(9.0 + Float64(x2 * 6.0)))) - 2.0)))); elseif (x1 <= -5.9e-266) tmp = t_0; elseif (x1 <= 9.6e-171) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 3.9e+102) tmp = t_0; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); tmp = 0.0; if (x1 <= -3.1e+50) tmp = x1 + ((x2 * -6.0) + (x1 * (((x2 * -12.0) + (x1 * (9.0 + (x2 * 6.0)))) - 2.0))); elseif (x1 <= -5.9e-266) tmp = t_0; elseif (x1 <= 9.6e-171) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 3.9e+102) tmp = t_0; else tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.1e+50], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x2 * -12.0), $MachinePrecision] + N[(x1 * N[(9.0 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.9e-266], t$95$0, If[LessEqual[x1, 9.6e-171], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.9e+102], t$95$0, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -3.1 \cdot 10^{+50}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x2 \cdot -12 + x1 \cdot \left(9 + x2 \cdot 6\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -5.9 \cdot 10^{-266}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 9.6 \cdot 10^{-171}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{+102}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -3.10000000000000003e50Initial program 24.3%
Taylor expanded in x1 around 0 5.0%
Taylor expanded in x1 around 0 4.9%
Taylor expanded in x2 around 0 5.3%
Taylor expanded in x1 around 0 53.0%
if -3.10000000000000003e50 < x1 < -5.90000000000000025e-266 or 9.59999999999999947e-171 < x1 < 3.8999999999999998e102Initial program 99.2%
Taylor expanded in x1 around 0 81.4%
Taylor expanded in x1 around 0 81.4%
if -5.90000000000000025e-266 < x1 < 9.59999999999999947e-171Initial program 99.5%
Taylor expanded in x1 around -inf 0.0%
Taylor expanded in x1 around 0 92.3%
if 3.8999999999999998e102 < x1 Initial program 22.7%
Taylor expanded in x1 around 0 5.4%
Taylor expanded in x1 around 0 88.6%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification81.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 1.0)))))
(if (<= x2 -6.2e+121)
t_0
(if (<= x2 1.05e-41)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x2 -12.0) 2.0))))
(if (<= x2 3.3e+177)
(+ x1 (* x2 (- (* x1 (- (* x1 6.0) 12.0)) 6.0)))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + 1.0));
double tmp;
if (x2 <= -6.2e+121) {
tmp = t_0;
} else if (x2 <= 1.05e-41) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else if (x2 <= 3.3e+177) {
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + 1.0d0))
if (x2 <= (-6.2d+121)) then
tmp = t_0
else if (x2 <= 1.05d-41) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * (-12.0d0)) - 2.0d0)))
else if (x2 <= 3.3d+177) then
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0d0) - 12.0d0)) - 6.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + 1.0));
double tmp;
if (x2 <= -6.2e+121) {
tmp = t_0;
} else if (x2 <= 1.05e-41) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else if (x2 <= 3.3e+177) {
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + 1.0)) tmp = 0 if x2 <= -6.2e+121: tmp = t_0 elif x2 <= 1.05e-41: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))) elif x2 <= 3.3e+177: tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0)) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + 1.0))) tmp = 0.0 if (x2 <= -6.2e+121) tmp = t_0; elseif (x2 <= 1.05e-41) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)))); elseif (x2 <= 3.3e+177) tmp = Float64(x1 + Float64(x2 * Float64(Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0)) - 6.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + 1.0)); tmp = 0.0; if (x2 <= -6.2e+121) tmp = t_0; elseif (x2 <= 1.05e-41) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))); elseif (x2 <= 3.3e+177) tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -6.2e+121], t$95$0, If[LessEqual[x2, 1.05e-41], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 3.3e+177], N[(x1 + N[(x2 * N[(N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + 1\right)\\
\mathbf{if}\;x2 \leq -6.2 \cdot 10^{+121}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x2 \leq 1.05 \cdot 10^{-41}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot -12 - 2\right)\right)\\
\mathbf{elif}\;x2 \leq 3.3 \cdot 10^{+177}:\\
\;\;\;\;x1 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 6 - 12\right) - 6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x2 < -6.20000000000000016e121 or 3.3000000000000001e177 < x2 Initial program 72.2%
Taylor expanded in x1 around 0 56.4%
Taylor expanded in x1 around inf 71.8%
if -6.20000000000000016e121 < x2 < 1.05000000000000006e-41Initial program 77.2%
Taylor expanded in x1 around 0 57.6%
Taylor expanded in x1 around 0 74.4%
Taylor expanded in x2 around 0 67.7%
Taylor expanded in x1 around 0 57.0%
if 1.05000000000000006e-41 < x2 < 3.3000000000000001e177Initial program 67.3%
Taylor expanded in x1 around 0 50.4%
Taylor expanded in x1 around 0 65.6%
Taylor expanded in x2 around 0 56.2%
Taylor expanded in x2 around inf 71.7%
Final simplification63.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 1.0)))))
(if (<= x2 -7.5e+121)
t_0
(if (<= x2 1.55e-32)
(+ x1 (- (* x2 -6.0) (* x1 (- 2.0 (* x1 (+ (* x1 3.0) 9.0))))))
(if (<= x2 5.4e+175)
(+ x1 (* x2 (- (* x1 (- (* x1 6.0) 12.0)) 6.0)))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + 1.0));
double tmp;
if (x2 <= -7.5e+121) {
tmp = t_0;
} else if (x2 <= 1.55e-32) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))));
} else if (x2 <= 5.4e+175) {
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + 1.0d0))
if (x2 <= (-7.5d+121)) then
tmp = t_0
else if (x2 <= 1.55d-32) then
tmp = x1 + ((x2 * (-6.0d0)) - (x1 * (2.0d0 - (x1 * ((x1 * 3.0d0) + 9.0d0)))))
else if (x2 <= 5.4d+175) then
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0d0) - 12.0d0)) - 6.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + 1.0));
double tmp;
if (x2 <= -7.5e+121) {
tmp = t_0;
} else if (x2 <= 1.55e-32) {
tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0)))));
} else if (x2 <= 5.4e+175) {
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + 1.0)) tmp = 0 if x2 <= -7.5e+121: tmp = t_0 elif x2 <= 1.55e-32: tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))))) elif x2 <= 5.4e+175: tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0)) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + 1.0))) tmp = 0.0 if (x2 <= -7.5e+121) tmp = t_0; elseif (x2 <= 1.55e-32) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(2.0 - Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)))))); elseif (x2 <= 5.4e+175) tmp = Float64(x1 + Float64(x2 * Float64(Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0)) - 6.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + 1.0)); tmp = 0.0; if (x2 <= -7.5e+121) tmp = t_0; elseif (x2 <= 1.55e-32) tmp = x1 + ((x2 * -6.0) - (x1 * (2.0 - (x1 * ((x1 * 3.0) + 9.0))))); elseif (x2 <= 5.4e+175) tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -7.5e+121], t$95$0, If[LessEqual[x2, 1.55e-32], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(2.0 - N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 5.4e+175], N[(x1 + N[(x2 * N[(N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + 1\right)\\
\mathbf{if}\;x2 \leq -7.5 \cdot 10^{+121}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x2 \leq 1.55 \cdot 10^{-32}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - x1 \cdot \left(2 - x1 \cdot \left(x1 \cdot 3 + 9\right)\right)\right)\\
\mathbf{elif}\;x2 \leq 5.4 \cdot 10^{+175}:\\
\;\;\;\;x1 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 6 - 12\right) - 6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x2 < -7.49999999999999965e121 or 5.4000000000000002e175 < x2 Initial program 72.2%
Taylor expanded in x1 around 0 56.4%
Taylor expanded in x1 around inf 71.8%
if -7.49999999999999965e121 < x2 < 1.55000000000000005e-32Initial program 77.3%
Taylor expanded in x1 around 0 57.2%
Taylor expanded in x1 around 0 74.6%
Taylor expanded in x2 around 0 72.7%
*-commutative72.7%
Simplified72.7%
if 1.55000000000000005e-32 < x2 < 5.4000000000000002e175Initial program 66.6%
Taylor expanded in x1 around 0 51.4%
Taylor expanded in x1 around 0 64.8%
Taylor expanded in x2 around 0 55.2%
Taylor expanded in x2 around inf 73.2%
Final simplification72.6%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -3.7e+17) (not (<= x1 1.4))) (+ x1 (* x2 (- (* x1 (- (* x1 6.0) 12.0)) 6.0))) (+ x1 (+ (* x2 -6.0) (* x1 -2.0)))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.7e+17) || !(x1 <= 1.4)) {
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-3.7d+17)) .or. (.not. (x1 <= 1.4d0))) then
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0d0) - 12.0d0)) - 6.0d0))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.7e+17) || !(x1 <= 1.4)) {
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -3.7e+17) or not (x1 <= 1.4): tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0)) else: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -3.7e+17) || !(x1 <= 1.4)) tmp = Float64(x1 + Float64(x2 * Float64(Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0)) - 6.0))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -3.7e+17) || ~((x1 <= 1.4))) tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0)); else tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -3.7e+17], N[Not[LessEqual[x1, 1.4]], $MachinePrecision]], N[(x1 + N[(x2 * N[(N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.7 \cdot 10^{+17} \lor \neg \left(x1 \leq 1.4\right):\\
\;\;\;\;x1 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 6 - 12\right) - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\end{array}
\end{array}
if x1 < -3.7e17 or 1.3999999999999999 < x1 Initial program 39.0%
Taylor expanded in x1 around 0 10.5%
Taylor expanded in x1 around 0 44.9%
Taylor expanded in x2 around 0 33.9%
Taylor expanded in x2 around inf 33.0%
if -3.7e17 < x1 < 1.3999999999999999Initial program 99.3%
Taylor expanded in x1 around -inf 36.2%
Taylor expanded in x1 around 0 69.1%
Final simplification54.0%
(FPCore (x1 x2) :precision binary64 (if (<= x2 1e-41) (+ x1 (+ (* x2 -6.0) (* x1 (- (* x2 -12.0) 2.0)))) (+ x1 (* x2 (- (* x1 (- (* x1 6.0) 12.0)) 6.0)))))
double code(double x1, double x2) {
double tmp;
if (x2 <= 1e-41) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else {
tmp = x1 + (x2 * ((x1 * ((x1 * 6.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 (x2 <= 1d-41) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * (-12.0d0)) - 2.0d0)))
else
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0d0) - 12.0d0)) - 6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= 1e-41) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else {
tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= 1e-41: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))) else: tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= 1e-41) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)))); else tmp = Float64(x1 + Float64(x2 * Float64(Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0)) - 6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= 1e-41) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))); else tmp = x1 + (x2 * ((x1 * ((x1 * 6.0) - 12.0)) - 6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, 1e-41], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * N[(N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq 10^{-41}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot -12 - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 6 - 12\right) - 6\right)\\
\end{array}
\end{array}
if x2 < 1.00000000000000001e-41Initial program 76.1%
Taylor expanded in x1 around 0 56.8%
Taylor expanded in x1 around 0 70.9%
Taylor expanded in x2 around 0 57.8%
Taylor expanded in x1 around 0 52.6%
if 1.00000000000000001e-41 < x2 Initial program 69.3%
Taylor expanded in x1 around 0 54.0%
Taylor expanded in x1 around 0 69.9%
Taylor expanded in x2 around 0 46.3%
Taylor expanded in x2 around inf 59.8%
Final simplification54.7%
(FPCore (x1 x2) :precision binary64 (if (<= x2 4e+253) (* x2 (- (/ x1 x2) 6.0)) (* x1 (+ (/ (* x2 -6.0) x1) 1.0))))
double code(double x1, double x2) {
double tmp;
if (x2 <= 4e+253) {
tmp = x2 * ((x1 / x2) - 6.0);
} else {
tmp = x1 * (((x2 * -6.0) / x1) + 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 <= 4d+253) then
tmp = x2 * ((x1 / x2) - 6.0d0)
else
tmp = x1 * (((x2 * (-6.0d0)) / x1) + 1.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= 4e+253) {
tmp = x2 * ((x1 / x2) - 6.0);
} else {
tmp = x1 * (((x2 * -6.0) / x1) + 1.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= 4e+253: tmp = x2 * ((x1 / x2) - 6.0) else: tmp = x1 * (((x2 * -6.0) / x1) + 1.0) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= 4e+253) tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); else tmp = Float64(x1 * Float64(Float64(Float64(x2 * -6.0) / x1) + 1.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= 4e+253) tmp = x2 * ((x1 / x2) - 6.0); else tmp = x1 * (((x2 * -6.0) / x1) + 1.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, 4e+253], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(N[(x2 * -6.0), $MachinePrecision] / x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq 4 \cdot 10^{+253}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(\frac{x2 \cdot -6}{x1} + 1\right)\\
\end{array}
\end{array}
if x2 < 3.9999999999999997e253Initial program 74.3%
Taylor expanded in x1 around 0 55.8%
Taylor expanded in x1 around 0 26.4%
*-commutative26.4%
Simplified26.4%
Taylor expanded in x2 around inf 30.9%
if 3.9999999999999997e253 < x2 Initial program 70.0%
Taylor expanded in x1 around 0 61.6%
Taylor expanded in x1 around 0 6.6%
*-commutative6.6%
Simplified6.6%
Taylor expanded in x1 around inf 50.8%
associate-*r/50.8%
Simplified50.8%
Final simplification31.7%
(FPCore (x1 x2) :precision binary64 (if (<= x1 1.4) (+ x1 (+ (* x2 -6.0) (* x1 -2.0))) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 1.4) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 1.4d0) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 1.4) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 1.4: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 1.4) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 1.4) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 1.4], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 1.4:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 1.3999999999999999Initial program 83.7%
Taylor expanded in x1 around -inf 39.6%
Taylor expanded in x1 around 0 53.4%
if 1.3999999999999999 < x1 Initial program 42.1%
Taylor expanded in x1 around 0 11.9%
Taylor expanded in x1 around 0 7.2%
*-commutative7.2%
Simplified7.2%
Taylor expanded in x2 around inf 26.3%
Final simplification47.2%
(FPCore (x1 x2) :precision binary64 (* x2 (- (/ x1 x2) 6.0)))
double code(double x1, double x2) {
return x2 * ((x1 / x2) - 6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * ((x1 / x2) - 6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * ((x1 / x2) - 6.0);
}
def code(x1, x2): return x2 * ((x1 / x2) - 6.0)
function code(x1, x2) return Float64(x2 * Float64(Float64(x1 / x2) - 6.0)) end
function tmp = code(x1, x2) tmp = x2 * ((x1 / x2) - 6.0); end
code[x1_, x2_] := N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot \left(\frac{x1}{x2} - 6\right)
\end{array}
Initial program 74.1%
Taylor expanded in x1 around 0 56.0%
Taylor expanded in x1 around 0 25.6%
*-commutative25.6%
Simplified25.6%
Taylor expanded in x2 around inf 30.0%
Final simplification30.0%
(FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x2 * (-6.0d0))
end function
public static double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
def code(x1, x2): return x1 + (x2 * -6.0)
function code(x1, x2) return Float64(x1 + Float64(x2 * -6.0)) end
function tmp = code(x1, x2) tmp = x1 + (x2 * -6.0); end
code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + x2 \cdot -6
\end{array}
Initial program 74.1%
Taylor expanded in x1 around 0 56.0%
Taylor expanded in x1 around 0 25.6%
*-commutative25.6%
Simplified25.6%
Final simplification25.6%
(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 74.1%
Taylor expanded in x1 around 0 56.0%
Taylor expanded in x1 around 0 25.6%
*-commutative25.6%
Simplified25.6%
Taylor expanded in x1 around 0 25.6%
Final simplification25.6%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 74.1%
Taylor expanded in x1 around 0 56.0%
Taylor expanded in x1 around 0 25.6%
*-commutative25.6%
Simplified25.6%
Taylor expanded in x1 around inf 3.5%
Final simplification3.5%
herbie shell --seed 2024079
(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))))))