
(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 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* 3.0 (* x1 x1))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_4 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_0 4.0 -6.0)) (* (* x1 (* 2.0 t_0)) (+ t_0 -3.0)))
(fma t_4 t_0 (pow x1 3.0))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (x1 * x1);
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_0, 4.0, -6.0)), ((x1 * (2.0 * t_0)) * (t_0 + -3.0))), fma(t_4, t_0, pow(x1, 3.0)))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(3.0 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_0, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_0)) * Float64(t_0 + -3.0))), fma(t_4, t_0, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$4 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * t$95$0 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 3 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_4 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_0, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_0\right)\right) \cdot \left(t\_0 + -3\right)\right), \mathsf{fma}\left(t\_4, t\_0, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.3%
Simplified99.7%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 14.3%
Taylor expanded in x1 around inf 97.1%
Final simplification99.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2)))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(fma
3.0
(/ (- (* 3.0 (* x1 x1)) (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_0 4.0 -6.0)) (* (* x1 (* 2.0 t_0)) (+ t_0 -3.0)))
(pow x1 3.0)))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, (((3.0 * (x1 * x1)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_0, 4.0, -6.0)), ((x1 * (2.0 * t_0)) * (t_0 + -3.0))), pow(x1, 3.0))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(Float64(3.0 * Float64(x1 * x1)) - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_0, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_0)) * Float64(t_0 + -3.0))), (x1 ^ 3.0))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_0, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_0\right)\right) \cdot \left(t\_0 + -3\right)\right), {x1}^{3}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.3%
Simplified99.7%
Taylor expanded in x1 around inf 99.5%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 14.3%
Taylor expanded in x1 around inf 97.1%
Final simplification98.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
(*
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 (/ (- (- t_0 (* 2.0 x2)) x1) t_1)))) INFINITY)
(+
x1
(+
t_3
(*
3.0
(*
x2
(-
(/ (fma 3.0 (pow x1 2.0) (- x1)) (* x2 (fma x1 x1 1.0)))
(/ 2.0 (fma x1 x1 1.0)))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + (((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 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= ((double) INFINITY)) {
tmp = x1 + (t_3 + (3.0 * (x2 * ((fma(3.0, pow(x1, 2.0), -x1) / (x2 * fma(x1, x1, 1.0))) - (2.0 / fma(x1, x1, 1.0))))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(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(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) <= Inf) tmp = Float64(x1 + Float64(t_3 + Float64(3.0 * Float64(x2 * Float64(Float64(fma(3.0, (x1 ^ 2.0), Float64(-x1)) / Float64(x2 * fma(x1, x1, 1.0))) - Float64(2.0 / fma(x1, x1, 1.0))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(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[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$3 + N[(3.0 * N[(x2 * N[(N[(N[(3.0 * N[Power[x1, 2.0], $MachinePrecision] + (-x1)), $MachinePrecision] / N[(x2 * N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 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{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_3 + 3 \cdot \left(x2 \cdot \left(\frac{\mathsf{fma}\left(3, {x1}^{2}, -x1\right)}{x2 \cdot \mathsf{fma}\left(x1, x1, 1\right)} - \frac{2}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.3%
Taylor expanded in x2 around inf 99.4%
+-commutative99.4%
associate--r+99.4%
associate-*r/99.4%
div-sub99.4%
fmm-def99.4%
+-commutative99.4%
unpow299.4%
fma-undefine99.4%
associate-*r/99.4%
metadata-eval99.4%
+-commutative99.4%
unpow299.4%
fma-undefine99.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 14.3%
Taylor expanded in x1 around inf 97.1%
Final simplification98.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
(if (<= t_3 INFINITY) t_3 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.3%
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 14.3%
Taylor expanded in x1 around inf 97.1%
Final simplification98.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -3.6e+102) (not (<= x1 2e+91)))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0))
(+
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 (+ (* x2 -2.0) (* x1 (+ (* x1 (- 3.0 (* x2 -2.0))) -1.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -3.6e+102) || !(x1 <= 2e+91)) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
} else {
tmp = 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 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-3.6d+102)) .or. (.not. (x1 <= 2d+91))) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
else
tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((x1 * (3.0d0 - (x2 * (-2.0d0)))) + (-1.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -3.6e+102) || !(x1 <= 2e+91)) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
} else {
tmp = 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 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -3.6e+102) or not (x1 <= 2e+91): tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) else: tmp = 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 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -3.6e+102) || !(x1 <= 2e+91)) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); else tmp = 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(x2 * -2.0) + Float64(x1 * Float64(Float64(x1 * Float64(3.0 - Float64(x2 * -2.0))) + -1.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -3.6e+102) || ~((x1 <= 2e+91))) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); else tmp = 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 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -3.6e+102], N[Not[LessEqual[x1, 2e+91]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(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[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $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 -3.6 \cdot 10^{+102} \lor \neg \left(x1 \leq 2 \cdot 10^{+91}\right):\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;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 \left(x2 \cdot -2 + x1 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right) + -1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -3.6000000000000002e102 or 2.00000000000000016e91 < x1 Initial program 20.5%
Taylor expanded in x1 around inf 31.8%
Taylor expanded in x1 around inf 97.7%
if -3.6000000000000002e102 < x1 < 2.00000000000000016e91Initial program 99.3%
Taylor expanded in x1 around 0 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 -8.5e+94) (not (<= x1 1.85e+73)))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 (+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0)))
(* t_0 (- (* 2.0 x2) 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 <= -8.5e+94) || !(x1 <= 1.85e+73)) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_0 * ((2.0 * x2) - 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 <= (-8.5d+94)) .or. (.not. (x1 <= 1.85d+73))) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0))) + (t_0 * ((2.0d0 * x2) - 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 <= -8.5e+94) || !(x1 <= 1.85e+73)) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_0 * ((2.0 * x2) - 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 <= -8.5e+94) or not (x1 <= 1.85e+73): tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_0 * ((2.0 * x2) - 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 <= -8.5e+94) || !(x1 <= 1.85e+73)) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0))) + Float64(t_0 * Float64(Float64(2.0 * x2) - 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 <= -8.5e+94) || ~((x1 <= 1.85e+73))) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_0 * ((2.0 * x2) - 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, -8.5e+94], N[Not[LessEqual[x1, 1.85e+73]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$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] + N[(t$95$0 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $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 -8.5 \cdot 10^{+94} \lor \neg \left(x1 \leq 1.85 \cdot 10^{+73}\right):\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_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) + t\_0 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -8.50000000000000054e94 or 1.84999999999999987e73 < x1 Initial program 25.5%
Taylor expanded in x1 around inf 34.0%
Taylor expanded in x1 around inf 95.7%
if -8.50000000000000054e94 < x1 < 1.84999999999999987e73Initial program 99.2%
Taylor expanded in x1 around inf 97.5%
Taylor expanded in x1 around 0 96.4%
+-commutative96.4%
mul-1-neg96.4%
unsub-neg96.4%
Simplified96.4%
Final simplification96.1%
(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 -4e+108) (not (<= x1 2e+73)))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -4e+108) || !(x1 <= 2e+73)) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-4d+108)) .or. (.not. (x1 <= 2d+73))) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -4e+108) || !(x1 <= 2e+73)) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -4e+108) or not (x1 <= 2e+73): tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -4e+108) || !(x1 <= 2e+73)) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -4e+108) || ~((x1 <= 2e+73))) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -4e+108], N[Not[LessEqual[x1, 2e+73]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -4 \cdot 10^{+108} \lor \neg \left(x1 \leq 2 \cdot 10^{+73}\right):\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_2 + t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.0000000000000001e108 or 1.99999999999999997e73 < x1 Initial program 24.7%
Taylor expanded in x1 around inf 34.4%
Taylor expanded in x1 around inf 96.8%
if -4.0000000000000001e108 < x1 < 1.99999999999999997e73Initial program 99.3%
Taylor expanded in x1 around inf 96.9%
Final simplification96.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* 4.0 (* x2 t_0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (- 3.0 (* 2.0 x2)))
(t_5 (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_3)))
(t_6 (/ (- (+ t_2 (* 2.0 x2)) x1) t_3)))
(if (<= x1 -5.7e+151)
(+ x1 (* x1 (- (* x1 9.0) 2.0)))
(if (<= x1 -3e+95)
(+
x1
(+
t_5
(+
x1
(*
x1
(+
t_1
(*
x1
(+
6.0
(+
(* 2.0 (+ (* x2 -2.0) t_4))
(+
(* x2 6.0)
(*
x1
(-
(+
t_1
(*
2.0
(+
(+ 1.0 (+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_0)))
(* 2.0 (* x2 t_4)))))
2.0)))))))))))
(if (<= x1 -2.5e+95)
(* x1 (+ 2.0 (* x2 -12.0)))
(if (<= x1 1.75e+102)
(+
x1
(+
t_5
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_3
(+ (* (* (* x1 2.0) t_6) (- t_6 3.0)) (* (* x1 x1) 6.0)))
(* t_2 (- (* 2.0 x2) x1)))))))
(+ x1 (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0)))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (x2 * t_0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 - (2.0 * x2);
double t_5 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3);
double t_6 = ((t_2 + (2.0 * x2)) - x1) / t_3;
double tmp;
if (x1 <= -5.7e+151) {
tmp = x1 + (x1 * ((x1 * 9.0) - 2.0));
} else if (x1 <= -3e+95) {
tmp = x1 + (t_5 + (x1 + (x1 * (t_1 + (x1 * (6.0 + ((2.0 * ((x2 * -2.0) + t_4)) + ((x2 * 6.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_4))))) - 2.0))))))))));
} else if (x1 <= -2.5e+95) {
tmp = x1 * (2.0 + (x2 * -12.0));
} else if (x1 <= 1.75e+102) {
tmp = x1 + (t_5 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + ((x1 * x1) * 6.0))) + (t_2 * ((2.0 * x2) - x1))))));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 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) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = 4.0d0 * (x2 * t_0)
t_2 = x1 * (x1 * 3.0d0)
t_3 = (x1 * x1) + 1.0d0
t_4 = 3.0d0 - (2.0d0 * x2)
t_5 = 3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_3)
t_6 = ((t_2 + (2.0d0 * x2)) - x1) / t_3
if (x1 <= (-5.7d+151)) then
tmp = x1 + (x1 * ((x1 * 9.0d0) - 2.0d0))
else if (x1 <= (-3d+95)) then
tmp = x1 + (t_5 + (x1 + (x1 * (t_1 + (x1 * (6.0d0 + ((2.0d0 * ((x2 * (-2.0d0)) + t_4)) + ((x2 * 6.0d0) + (x1 * ((t_1 + (2.0d0 * ((1.0d0 + ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_0))) + (2.0d0 * (x2 * t_4))))) - 2.0d0))))))))))
else if (x1 <= (-2.5d+95)) then
tmp = x1 * (2.0d0 + (x2 * (-12.0d0)))
else if (x1 <= 1.75d+102) then
tmp = x1 + (t_5 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * ((((x1 * 2.0d0) * t_6) * (t_6 - 3.0d0)) + ((x1 * x1) * 6.0d0))) + (t_2 * ((2.0d0 * x2) - x1))))))
else
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 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 = 4.0 * (x2 * t_0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (x1 * x1) + 1.0;
double t_4 = 3.0 - (2.0 * x2);
double t_5 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3);
double t_6 = ((t_2 + (2.0 * x2)) - x1) / t_3;
double tmp;
if (x1 <= -5.7e+151) {
tmp = x1 + (x1 * ((x1 * 9.0) - 2.0));
} else if (x1 <= -3e+95) {
tmp = x1 + (t_5 + (x1 + (x1 * (t_1 + (x1 * (6.0 + ((2.0 * ((x2 * -2.0) + t_4)) + ((x2 * 6.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_4))))) - 2.0))))))))));
} else if (x1 <= -2.5e+95) {
tmp = x1 * (2.0 + (x2 * -12.0));
} else if (x1 <= 1.75e+102) {
tmp = x1 + (t_5 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + ((x1 * x1) * 6.0))) + (t_2 * ((2.0 * x2) - x1))))));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = 4.0 * (x2 * t_0) t_2 = x1 * (x1 * 3.0) t_3 = (x1 * x1) + 1.0 t_4 = 3.0 - (2.0 * x2) t_5 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3) t_6 = ((t_2 + (2.0 * x2)) - x1) / t_3 tmp = 0 if x1 <= -5.7e+151: tmp = x1 + (x1 * ((x1 * 9.0) - 2.0)) elif x1 <= -3e+95: tmp = x1 + (t_5 + (x1 + (x1 * (t_1 + (x1 * (6.0 + ((2.0 * ((x2 * -2.0) + t_4)) + ((x2 * 6.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_4))))) - 2.0)))))))))) elif x1 <= -2.5e+95: tmp = x1 * (2.0 + (x2 * -12.0)) elif x1 <= 1.75e+102: tmp = x1 + (t_5 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + ((x1 * x1) * 6.0))) + (t_2 * ((2.0 * x2) - x1)))))) else: tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(4.0 * Float64(x2 * t_0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(3.0 - Float64(2.0 * x2)) t_5 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_3)) t_6 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_3) tmp = 0.0 if (x1 <= -5.7e+151) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0))); elseif (x1 <= -3e+95) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(6.0 + Float64(Float64(2.0 * Float64(Float64(x2 * -2.0) + t_4)) + Float64(Float64(x2 * 6.0) + Float64(x1 * Float64(Float64(t_1 + Float64(2.0 * Float64(Float64(1.0 + Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_0))) + Float64(2.0 * Float64(x2 * t_4))))) - 2.0))))))))))); elseif (x1 <= -2.5e+95) tmp = Float64(x1 * Float64(2.0 + Float64(x2 * -12.0))); elseif (x1 <= 1.75e+102) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_6) * Float64(t_6 - 3.0)) + Float64(Float64(x1 * x1) * 6.0))) + Float64(t_2 * Float64(Float64(2.0 * x2) - x1))))))); else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = 4.0 * (x2 * t_0); t_2 = x1 * (x1 * 3.0); t_3 = (x1 * x1) + 1.0; t_4 = 3.0 - (2.0 * x2); t_5 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3); t_6 = ((t_2 + (2.0 * x2)) - x1) / t_3; tmp = 0.0; if (x1 <= -5.7e+151) tmp = x1 + (x1 * ((x1 * 9.0) - 2.0)); elseif (x1 <= -3e+95) tmp = x1 + (t_5 + (x1 + (x1 * (t_1 + (x1 * (6.0 + ((2.0 * ((x2 * -2.0) + t_4)) + ((x2 * 6.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_4))))) - 2.0)))))))))); elseif (x1 <= -2.5e+95) tmp = x1 * (2.0 + (x2 * -12.0)); elseif (x1 <= 1.75e+102) tmp = x1 + (t_5 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + ((x1 * x1) * 6.0))) + (t_2 * ((2.0 * x2) - x1)))))); else tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 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[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, If[LessEqual[x1, -5.7e+151], N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3e+95], N[(x1 + N[(t$95$5 + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(6.0 + N[(N[(2.0 * N[(N[(x2 * -2.0), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(2.0 * N[(N[(1.0 + N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(x2 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.5e+95], N[(x1 * N[(2.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.75e+102], N[(x1 + N[(t$95$5 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * N[(t$95$6 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := 4 \cdot \left(x2 \cdot t\_0\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := x1 \cdot x1 + 1\\
t_4 := 3 - 2 \cdot x2\\
t_5 := 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_3}\\
t_6 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_3}\\
\mathbf{if}\;x1 \leq -5.7 \cdot 10^{+151}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{elif}\;x1 \leq -3 \cdot 10^{+95}:\\
\;\;\;\;x1 + \left(t\_5 + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(6 + \left(2 \cdot \left(x2 \cdot -2 + t\_4\right) + \left(x2 \cdot 6 + x1 \cdot \left(\left(t\_1 + 2 \cdot \left(\left(1 + \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_0\right)\right) + 2 \cdot \left(x2 \cdot t\_4\right)\right)\right) - 2\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.5 \cdot 10^{+95}:\\
\;\;\;\;x1 \cdot \left(2 + x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq 1.75 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_5 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_6\right) \cdot \left(t\_6 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right) + t\_2 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -5.7000000000000001e151Initial program 0.0%
Taylor expanded in x1 around inf 3.4%
Taylor expanded in x1 around 0 89.7%
Taylor expanded in x2 around 0 97.0%
if -5.7000000000000001e151 < x1 < -2.99999999999999991e95Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 66.7%
if -2.99999999999999991e95 < x1 < -2.50000000000000012e95Initial program 100.0%
Taylor expanded in x1 around 0 100.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -2.50000000000000012e95 < x1 < 1.75000000000000005e102Initial program 99.3%
Taylor expanded in x1 around inf 97.0%
Taylor expanded in x1 around 0 95.9%
+-commutative95.9%
mul-1-neg95.9%
unsub-neg95.9%
Simplified95.9%
if 1.75000000000000005e102 < x1 Initial program 31.9%
Taylor expanded in x1 around inf 31.9%
Taylor expanded in x1 around 0 87.2%
Taylor expanded in x2 around 0 94.0%
Final simplification94.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* (* x1 x1) 6.0))
(t_3 (* x1 (* x1 3.0)))
(t_4 (/ (- (+ t_3 (* 2.0 x2)) x1) t_0))
(t_5 (* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_0)))
(t_6 (* (* x1 2.0) t_4)))
(if (<= x1 -2.5e+95)
(+
x1
(+ (* x2 -6.0) (* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 2.0))))
(if (<= x1 -0.78)
(+
x1
(+
t_5
(+
x1
(+
t_1
(+
(* t_3 (* 2.0 x2))
(*
t_0
(+
t_2
(* t_6 (/ (+ (* 2.0 (/ x2 x1)) (- -1.0 (/ 3.0 x1))) x1)))))))))
(if (<= x1 0.016)
(+ x1 (+ t_5 (+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 2e+102)
(+
x1
(+
9.0
(+
x1
(+ t_1 (+ (* t_3 t_4) (* t_0 (+ (* t_6 (- t_4 3.0)) t_2)))))))
(+ x1 (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0)))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = (x1 * x1) * 6.0;
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0);
double t_6 = (x1 * 2.0) * t_4;
double tmp;
if (x1 <= -2.5e+95) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -0.78) {
tmp = x1 + (t_5 + (x1 + (t_1 + ((t_3 * (2.0 * x2)) + (t_0 * (t_2 + (t_6 * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1))))))));
} else if (x1 <= 0.016) {
tmp = x1 + (t_5 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+102) {
tmp = x1 + (9.0 + (x1 + (t_1 + ((t_3 * t_4) + (t_0 * ((t_6 * (t_4 - 3.0)) + t_2))))));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = (x1 * x1) * 6.0d0
t_3 = x1 * (x1 * 3.0d0)
t_4 = ((t_3 + (2.0d0 * x2)) - x1) / t_0
t_5 = 3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_0)
t_6 = (x1 * 2.0d0) * t_4
if (x1 <= (-2.5d+95)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 2.0d0)))
else if (x1 <= (-0.78d0)) then
tmp = x1 + (t_5 + (x1 + (t_1 + ((t_3 * (2.0d0 * x2)) + (t_0 * (t_2 + (t_6 * (((2.0d0 * (x2 / x1)) + ((-1.0d0) - (3.0d0 / x1))) / x1))))))))
else if (x1 <= 0.016d0) then
tmp = x1 + (t_5 + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 2d+102) then
tmp = x1 + (9.0d0 + (x1 + (t_1 + ((t_3 * t_4) + (t_0 * ((t_6 * (t_4 - 3.0d0)) + t_2))))))
else
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = (x1 * x1) * 6.0;
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0);
double t_6 = (x1 * 2.0) * t_4;
double tmp;
if (x1 <= -2.5e+95) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -0.78) {
tmp = x1 + (t_5 + (x1 + (t_1 + ((t_3 * (2.0 * x2)) + (t_0 * (t_2 + (t_6 * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1))))))));
} else if (x1 <= 0.016) {
tmp = x1 + (t_5 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 2e+102) {
tmp = x1 + (9.0 + (x1 + (t_1 + ((t_3 * t_4) + (t_0 * ((t_6 * (t_4 - 3.0)) + t_2))))));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = (x1 * x1) * 6.0 t_3 = x1 * (x1 * 3.0) t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0 t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0) t_6 = (x1 * 2.0) * t_4 tmp = 0 if x1 <= -2.5e+95: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))) elif x1 <= -0.78: tmp = x1 + (t_5 + (x1 + (t_1 + ((t_3 * (2.0 * x2)) + (t_0 * (t_2 + (t_6 * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))))))) elif x1 <= 0.016: tmp = x1 + (t_5 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 2e+102: tmp = x1 + (9.0 + (x1 + (t_1 + ((t_3 * t_4) + (t_0 * ((t_6 * (t_4 - 3.0)) + t_2)))))) else: tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(Float64(x1 * x1) * 6.0) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_0) t_5 = Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_0)) t_6 = Float64(Float64(x1 * 2.0) * t_4) tmp = 0.0 if (x1 <= -2.5e+95) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 2.0)))); elseif (x1 <= -0.78) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_1 + Float64(Float64(t_3 * Float64(2.0 * x2)) + Float64(t_0 * Float64(t_2 + Float64(t_6 * Float64(Float64(Float64(2.0 * Float64(x2 / x1)) + Float64(-1.0 - Float64(3.0 / x1))) / x1))))))))); elseif (x1 <= 0.016) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 2e+102) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_1 + Float64(Float64(t_3 * t_4) + Float64(t_0 * Float64(Float64(t_6 * Float64(t_4 - 3.0)) + t_2))))))); else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = (x1 * x1) * 6.0; t_3 = x1 * (x1 * 3.0); t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0; t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0); t_6 = (x1 * 2.0) * t_4; tmp = 0.0; if (x1 <= -2.5e+95) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))); elseif (x1 <= -0.78) tmp = x1 + (t_5 + (x1 + (t_1 + ((t_3 * (2.0 * x2)) + (t_0 * (t_2 + (t_6 * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))))))); elseif (x1 <= 0.016) tmp = x1 + (t_5 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 2e+102) tmp = x1 + (9.0 + (x1 + (t_1 + ((t_3 * t_4) + (t_0 * ((t_6 * (t_4 - 3.0)) + t_2)))))); else tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision]}, If[LessEqual[x1, -2.5e+95], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.78], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$1 + N[(N[(t$95$3 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(t$95$2 + N[(t$95$6 * N[(N[(N[(2.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.016], N[(x1 + N[(t$95$5 + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+102], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$1 + N[(N[(t$95$3 * t$95$4), $MachinePrecision] + N[(t$95$0 * N[(N[(t$95$6 * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := \left(x1 \cdot x1\right) \cdot 6\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_0}\\
t_5 := 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_0}\\
t_6 := \left(x1 \cdot 2\right) \cdot t\_4\\
\mathbf{if}\;x1 \leq -2.5 \cdot 10^{+95}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -0.78:\\
\;\;\;\;x1 + \left(t\_5 + \left(x1 + \left(t\_1 + \left(t\_3 \cdot \left(2 \cdot x2\right) + t\_0 \cdot \left(t\_2 + t\_6 \cdot \frac{2 \cdot \frac{x2}{x1} + \left(-1 - \frac{3}{x1}\right)}{x1}\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.016:\\
\;\;\;\;x1 + \left(t\_5 + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_1 + \left(t\_3 \cdot t\_4 + t\_0 \cdot \left(t\_6 \cdot \left(t\_4 - 3\right) + t\_2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -2.50000000000000012e95Initial program 2.6%
Taylor expanded in x1 around inf 25.6%
Taylor expanded in x1 around 0 75.2%
Taylor expanded in x2 around inf 77.6%
if -2.50000000000000012e95 < x1 < -0.78000000000000003Initial program 99.2%
Taylor expanded in x1 around inf 98.8%
Taylor expanded in x1 around 0 98.8%
Taylor expanded in x1 around inf 98.9%
associate-*r/98.9%
metadata-eval98.9%
Simplified98.9%
if -0.78000000000000003 < x1 < 0.016Initial program 99.2%
Taylor expanded in x1 around 0 86.4%
Taylor expanded in x2 around 0 99.1%
if 0.016 < x1 < 1.99999999999999995e102Initial program 99.5%
Taylor expanded in x1 around inf 90.6%
Taylor expanded in x1 around inf 90.6%
if 1.99999999999999995e102 < x1 Initial program 30.4%
Taylor expanded in x1 around inf 30.4%
Taylor expanded in x1 around 0 89.1%
Taylor expanded in x2 around 0 95.7%
Final simplification94.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0)))
(if (<= x1 -2.5e+95)
(+
x1
(+ (* x2 -6.0) (* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 2.0))))
(if (<= x1 1.75e+102)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0)))
(* t_1 (- (* 2.0 x2) x1)))))))
(+ x1 (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -2.5e+95) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= 1.75e+102) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * ((2.0 * x2) - x1))))));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-2.5d+95)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 2.0d0)))
else if (x1 <= 1.75d+102) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0))) + (t_1 * ((2.0d0 * x2) - x1))))))
else
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -2.5e+95) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= 1.75e+102) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * ((2.0 * x2) - x1))))));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= -2.5e+95: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))) elif x1 <= 1.75e+102: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * ((2.0 * x2) - x1)))))) else: tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= -2.5e+95) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 2.0)))); elseif (x1 <= 1.75e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0))) + Float64(t_1 * Float64(Float64(2.0 * x2) - x1))))))); else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= -2.5e+95) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))); elseif (x1 <= 1.75e+102) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * ((2.0 * x2) - x1)))))); else tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -2.5e+95], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.75e+102], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * 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] + N[(t$95$1 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -2.5 \cdot 10^{+95}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 1.75 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \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) + t\_1 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -2.50000000000000012e95Initial program 2.6%
Taylor expanded in x1 around inf 25.6%
Taylor expanded in x1 around 0 75.2%
Taylor expanded in x2 around inf 77.6%
if -2.50000000000000012e95 < x1 < 1.75000000000000005e102Initial program 99.3%
Taylor expanded in x1 around inf 97.0%
Taylor expanded in x1 around 0 95.9%
+-commutative95.9%
mul-1-neg95.9%
unsub-neg95.9%
Simplified95.9%
if 1.75000000000000005e102 < x1 Initial program 31.9%
Taylor expanded in x1 around inf 31.9%
Taylor expanded in x1 around 0 87.2%
Taylor expanded in x2 around 0 94.0%
Final simplification92.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0)))
(if (<= x1 -2.5e+95)
(+
x1
(+ (* x2 -6.0) (* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 2.0))))
(if (<= x1 1.75e+102)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0)))
(* t_1 (* 2.0 x2)))))))
(+ x1 (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -2.5e+95) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= 1.75e+102) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (2.0 * x2))))));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-2.5d+95)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 2.0d0)))
else if (x1 <= 1.75d+102) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0))) + (t_1 * (2.0d0 * x2))))))
else
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -2.5e+95) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= 1.75e+102) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (2.0 * x2))))));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= -2.5e+95: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))) elif x1 <= 1.75e+102: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (2.0 * x2)))))) else: tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= -2.5e+95) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 2.0)))); elseif (x1 <= 1.75e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0))) + Float64(t_1 * Float64(2.0 * x2))))))); else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= -2.5e+95) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))); elseif (x1 <= 1.75e+102) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (2.0 * x2)))))); else tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -2.5e+95], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.75e+102], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * 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] + N[(t$95$1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -2.5 \cdot 10^{+95}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 1.75 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \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) + t\_1 \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -2.50000000000000012e95Initial program 2.6%
Taylor expanded in x1 around inf 25.6%
Taylor expanded in x1 around 0 75.2%
Taylor expanded in x2 around inf 77.6%
if -2.50000000000000012e95 < x1 < 1.75000000000000005e102Initial program 99.3%
Taylor expanded in x1 around inf 97.0%
Taylor expanded in x1 around 0 95.9%
if 1.75000000000000005e102 < x1 Initial program 31.9%
Taylor expanded in x1 around inf 31.9%
Taylor expanded in x1 around 0 87.2%
Taylor expanded in x2 around 0 94.0%
Final simplification92.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* (* x1 x1) 6.0))
(t_3 (* x1 (* x1 3.0)))
(t_4 (/ (- (+ t_3 (* 2.0 x2)) x1) t_0))
(t_5 (* t_3 (* 2.0 x2)))
(t_6 (* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_0)))
(t_7 (* (* x1 2.0) t_4)))
(if (<= x1 -2.5e+95)
(+
x1
(+ (* x2 -6.0) (* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 2.0))))
(if (<= x1 -0.66)
(+
x1
(+
t_6
(+
x1
(+
t_1
(+
t_5
(*
t_0
(+
t_2
(* t_7 (/ (+ (* 2.0 (/ x2 x1)) (- -1.0 (/ 3.0 x1))) x1)))))))))
(if (<= x1 0.0085)
(+ x1 (+ t_6 (+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 1.75e+102)
(+
x1
(+ 9.0 (+ x1 (+ t_1 (+ (* t_0 (+ (* t_7 (- t_4 3.0)) t_2)) t_5)))))
(+ x1 (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0)))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = (x1 * x1) * 6.0;
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double t_5 = t_3 * (2.0 * x2);
double t_6 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0);
double t_7 = (x1 * 2.0) * t_4;
double tmp;
if (x1 <= -2.5e+95) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -0.66) {
tmp = x1 + (t_6 + (x1 + (t_1 + (t_5 + (t_0 * (t_2 + (t_7 * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1))))))));
} else if (x1 <= 0.0085) {
tmp = x1 + (t_6 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 1.75e+102) {
tmp = x1 + (9.0 + (x1 + (t_1 + ((t_0 * ((t_7 * (t_4 - 3.0)) + t_2)) + t_5))));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = (x1 * x1) * 6.0d0
t_3 = x1 * (x1 * 3.0d0)
t_4 = ((t_3 + (2.0d0 * x2)) - x1) / t_0
t_5 = t_3 * (2.0d0 * x2)
t_6 = 3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_0)
t_7 = (x1 * 2.0d0) * t_4
if (x1 <= (-2.5d+95)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 2.0d0)))
else if (x1 <= (-0.66d0)) then
tmp = x1 + (t_6 + (x1 + (t_1 + (t_5 + (t_0 * (t_2 + (t_7 * (((2.0d0 * (x2 / x1)) + ((-1.0d0) - (3.0d0 / x1))) / x1))))))))
else if (x1 <= 0.0085d0) then
tmp = x1 + (t_6 + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 1.75d+102) then
tmp = x1 + (9.0d0 + (x1 + (t_1 + ((t_0 * ((t_7 * (t_4 - 3.0d0)) + t_2)) + t_5))))
else
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = (x1 * x1) * 6.0;
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double t_5 = t_3 * (2.0 * x2);
double t_6 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0);
double t_7 = (x1 * 2.0) * t_4;
double tmp;
if (x1 <= -2.5e+95) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -0.66) {
tmp = x1 + (t_6 + (x1 + (t_1 + (t_5 + (t_0 * (t_2 + (t_7 * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1))))))));
} else if (x1 <= 0.0085) {
tmp = x1 + (t_6 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 1.75e+102) {
tmp = x1 + (9.0 + (x1 + (t_1 + ((t_0 * ((t_7 * (t_4 - 3.0)) + t_2)) + t_5))));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = (x1 * x1) * 6.0 t_3 = x1 * (x1 * 3.0) t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0 t_5 = t_3 * (2.0 * x2) t_6 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0) t_7 = (x1 * 2.0) * t_4 tmp = 0 if x1 <= -2.5e+95: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))) elif x1 <= -0.66: tmp = x1 + (t_6 + (x1 + (t_1 + (t_5 + (t_0 * (t_2 + (t_7 * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))))))) elif x1 <= 0.0085: tmp = x1 + (t_6 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 1.75e+102: tmp = x1 + (9.0 + (x1 + (t_1 + ((t_0 * ((t_7 * (t_4 - 3.0)) + t_2)) + t_5)))) else: tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(Float64(x1 * x1) * 6.0) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_0) t_5 = Float64(t_3 * Float64(2.0 * x2)) t_6 = Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_0)) t_7 = Float64(Float64(x1 * 2.0) * t_4) tmp = 0.0 if (x1 <= -2.5e+95) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 2.0)))); elseif (x1 <= -0.66) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_1 + Float64(t_5 + Float64(t_0 * Float64(t_2 + Float64(t_7 * Float64(Float64(Float64(2.0 * Float64(x2 / x1)) + Float64(-1.0 - Float64(3.0 / x1))) / x1))))))))); elseif (x1 <= 0.0085) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 1.75e+102) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_1 + Float64(Float64(t_0 * Float64(Float64(t_7 * Float64(t_4 - 3.0)) + t_2)) + t_5))))); else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = (x1 * x1) * 6.0; t_3 = x1 * (x1 * 3.0); t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0; t_5 = t_3 * (2.0 * x2); t_6 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0); t_7 = (x1 * 2.0) * t_4; tmp = 0.0; if (x1 <= -2.5e+95) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))); elseif (x1 <= -0.66) tmp = x1 + (t_6 + (x1 + (t_1 + (t_5 + (t_0 * (t_2 + (t_7 * (((2.0 * (x2 / x1)) + (-1.0 - (3.0 / x1))) / x1)))))))); elseif (x1 <= 0.0085) tmp = x1 + (t_6 + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 1.75e+102) tmp = x1 + (9.0 + (x1 + (t_1 + ((t_0 * ((t_7 * (t_4 - 3.0)) + t_2)) + t_5)))); else tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision]}, If[LessEqual[x1, -2.5e+95], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.66], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$1 + N[(t$95$5 + N[(t$95$0 * N[(t$95$2 + N[(t$95$7 * N[(N[(N[(2.0 * N[(x2 / x1), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - N[(3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.0085], N[(x1 + N[(t$95$6 + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.75e+102], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$1 + N[(N[(t$95$0 * N[(N[(t$95$7 * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := \left(x1 \cdot x1\right) \cdot 6\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_0}\\
t_5 := t\_3 \cdot \left(2 \cdot x2\right)\\
t_6 := 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_0}\\
t_7 := \left(x1 \cdot 2\right) \cdot t\_4\\
\mathbf{if}\;x1 \leq -2.5 \cdot 10^{+95}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -0.66:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + \left(t\_1 + \left(t\_5 + t\_0 \cdot \left(t\_2 + t\_7 \cdot \frac{2 \cdot \frac{x2}{x1} + \left(-1 - \frac{3}{x1}\right)}{x1}\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 0.0085:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.75 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_1 + \left(t\_0 \cdot \left(t\_7 \cdot \left(t\_4 - 3\right) + t\_2\right) + t\_5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -2.50000000000000012e95Initial program 2.6%
Taylor expanded in x1 around inf 25.6%
Taylor expanded in x1 around 0 75.2%
Taylor expanded in x2 around inf 77.6%
if -2.50000000000000012e95 < x1 < -0.660000000000000031Initial program 99.2%
Taylor expanded in x1 around inf 98.8%
Taylor expanded in x1 around 0 98.8%
Taylor expanded in x1 around inf 98.9%
associate-*r/98.9%
metadata-eval98.9%
Simplified98.9%
if -0.660000000000000031 < x1 < 0.0085000000000000006Initial program 99.2%
Taylor expanded in x1 around 0 86.4%
Taylor expanded in x2 around 0 99.1%
if 0.0085000000000000006 < x1 < 1.75000000000000005e102Initial program 99.5%
Taylor expanded in x1 around inf 90.3%
Taylor expanded in x1 around 0 83.0%
Taylor expanded in x1 around inf 83.0%
if 1.75000000000000005e102 < x1 Initial program 31.9%
Taylor expanded in x1 around inf 31.9%
Taylor expanded in x1 around 0 87.2%
Taylor expanded in x2 around 0 94.0%
Final simplification93.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0))
(t_3
(+
x1
(+
9.0
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0)))
(* t_1 (* 2.0 x2)))))))))
(if (<= x1 -2.5e+95)
(+
x1
(+ (* x2 -6.0) (* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 2.0))))
(if (<= x1 -0.012)
t_3
(if (<= x1 0.075)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 1.75e+102)
t_3
(+ x1 (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0)))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (2.0 * x2))))));
double tmp;
if (x1 <= -2.5e+95) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -0.012) {
tmp = t_3;
} else if (x1 <= 0.075) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 1.75e+102) {
tmp = t_3;
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 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) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
t_3 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0))) + (t_1 * (2.0d0 * x2))))))
if (x1 <= (-2.5d+95)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 2.0d0)))
else if (x1 <= (-0.012d0)) then
tmp = t_3
else if (x1 <= 0.075d0) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 1.75d+102) then
tmp = t_3
else
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (2.0 * x2))))));
double tmp;
if (x1 <= -2.5e+95) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -0.012) {
tmp = t_3;
} else if (x1 <= 0.075) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 1.75e+102) {
tmp = t_3;
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (2.0 * x2)))))) tmp = 0 if x1 <= -2.5e+95: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))) elif x1 <= -0.012: tmp = t_3 elif x1 <= 0.075: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 1.75e+102: tmp = t_3 else: tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) t_3 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0))) + Float64(t_1 * Float64(2.0 * x2))))))) tmp = 0.0 if (x1 <= -2.5e+95) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 2.0)))); elseif (x1 <= -0.012) tmp = t_3; elseif (x1 <= 0.075) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 1.75e+102) tmp = t_3; else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; t_3 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * (2.0 * x2)))))); tmp = 0.0; if (x1 <= -2.5e+95) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))); elseif (x1 <= -0.012) tmp = t_3; elseif (x1 <= 0.075) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 1.75e+102) tmp = t_3; else tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * 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] + N[(t$95$1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.5e+95], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.012], t$95$3, If[LessEqual[x1, 0.075], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.75e+102], t$95$3, N[(x1 + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
t_3 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \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) + t\_1 \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.5 \cdot 10^{+95}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -0.012:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 0.075:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.75 \cdot 10^{+102}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -2.50000000000000012e95Initial program 2.6%
Taylor expanded in x1 around inf 25.6%
Taylor expanded in x1 around 0 75.2%
Taylor expanded in x2 around inf 77.6%
if -2.50000000000000012e95 < x1 < -0.012 or 0.0749999999999999972 < x1 < 1.75000000000000005e102Initial program 99.4%
Taylor expanded in x1 around inf 93.6%
Taylor expanded in x1 around 0 89.2%
Taylor expanded in x1 around inf 89.2%
if -0.012 < x1 < 0.0749999999999999972Initial program 99.2%
Taylor expanded in x1 around 0 86.4%
Taylor expanded in x2 around 0 99.1%
if 1.75000000000000005e102 < x1 Initial program 31.9%
Taylor expanded in x1 around inf 31.9%
Taylor expanded in x1 around 0 87.2%
Taylor expanded in x2 around 0 94.0%
Final simplification93.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))
(if (<= x1 -5.6e+51)
(+
x1
(+ (* x2 -6.0) (* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 2.0))))
(if (<= x1 -1.25e-136)
(+
x1
(+
(* 3.0 (+ (* x2 -2.0) (* x1 (+ (* x1 (- 3.0 (* x2 -2.0))) -1.0))))
t_0))
(if (<= x1 7.2e-48)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 5.8e+62)
(+
x1
(+
(*
3.0
(/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
t_0))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2)))
2.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))));
double tmp;
if (x1 <= -5.6e+51) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -1.25e-136) {
tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0)))) + t_0);
} else if (x1 <= 7.2e-48) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 5.8e+62) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + t_0);
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((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) :: tmp
t_0 = x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))
if (x1 <= (-5.6d+51)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 2.0d0)))
else if (x1 <= (-1.25d-136)) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((x1 * (3.0d0 - (x2 * (-2.0d0)))) + (-1.0d0))))) + t_0)
else if (x1 <= 7.2d-48) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 5.8d+62) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + t_0)
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((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 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))));
double tmp;
if (x1 <= -5.6e+51) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -1.25e-136) {
tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0)))) + t_0);
} else if (x1 <= 7.2e-48) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 5.8e+62) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + t_0);
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))) tmp = 0 if x1 <= -5.6e+51: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))) elif x1 <= -1.25e-136: tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0)))) + t_0) elif x1 <= 7.2e-48: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 5.8e+62: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + t_0) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) tmp = 0.0 if (x1 <= -5.6e+51) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 2.0)))); elseif (x1 <= -1.25e-136) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(Float64(x1 * Float64(3.0 - Float64(x2 * -2.0))) + -1.0)))) + t_0)); elseif (x1 <= 7.2e-48) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 5.8e+62) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + t_0)); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(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 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))); tmp = 0.0; if (x1 <= -5.6e+51) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))); elseif (x1 <= -1.25e-136) tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0)))) + t_0); elseif (x1 <= 7.2e-48) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 5.8e+62) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + t_0); else tmp = x1 + ((x2 * -6.0) + (x1 * ((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[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+51], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.25e-136], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.2e-48], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.8e+62], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(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] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+51}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -1.25 \cdot 10^{-136}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right) + -1\right)\right) + t\_0\right)\\
\mathbf{elif}\;x1 \leq 7.2 \cdot 10^{-48}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 5.8 \cdot 10^{+62}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000009e51Initial program 20.7%
Taylor expanded in x1 around inf 37.5%
Taylor expanded in x1 around 0 63.9%
Taylor expanded in x2 around inf 67.8%
if -5.60000000000000009e51 < x1 < -1.25e-136Initial program 99.0%
Taylor expanded in x1 around 0 74.5%
Taylor expanded in x1 around 0 75.4%
if -1.25e-136 < x1 < 7.2000000000000003e-48Initial program 99.3%
Taylor expanded in x1 around inf 92.6%
Taylor expanded in x1 around 0 93.1%
if 7.2000000000000003e-48 < x1 < 5.79999999999999968e62Initial program 99.2%
Taylor expanded in x1 around 0 57.3%
if 5.79999999999999968e62 < x1 Initial program 44.8%
Taylor expanded in x1 around inf 38.3%
Taylor expanded in x1 around 0 78.6%
Taylor expanded in x2 around inf 86.9%
Final simplification81.7%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -5.5e+54)
(+
x1
(+ (* x2 -6.0) (* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 2.0))))
(if (<= x1 2e+60)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(- (* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2))) 2.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -5.5e+54) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= 2e+60) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((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) :: tmp
if (x1 <= (-5.5d+54)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 2.0d0)))
else if (x1 <= 2d+60) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((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 tmp;
if (x1 <= -5.5e+54) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= 2e+60) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -5.5e+54: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))) elif x1 <= 2e+60: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -5.5e+54) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 2.0)))); elseif (x1 <= 2e+60) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(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) tmp = 0.0; if (x1 <= -5.5e+54) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))); elseif (x1 <= 2e+60) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -5.5e+54], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+60], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+54}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+60}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.50000000000000026e54Initial program 20.7%
Taylor expanded in x1 around inf 37.5%
Taylor expanded in x1 around 0 63.9%
Taylor expanded in x2 around inf 67.8%
if -5.50000000000000026e54 < x1 < 1.9999999999999999e60Initial program 99.2%
Taylor expanded in x1 around 0 77.8%
Taylor expanded in x2 around 0 88.6%
if 1.9999999999999999e60 < x1 Initial program 44.8%
Taylor expanded in x1 around inf 38.3%
Taylor expanded in x1 around 0 78.6%
Taylor expanded in x2 around inf 86.9%
Final simplification84.3%
(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 -5.5e+54)
(+
x1
(+ (* x2 -6.0) (* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 2.0))))
(if (<= x1 -1.25e-136)
t_0
(if (<= x1 9.5e-209)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 3.6e+52)
t_0
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2)))
2.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 <= -5.5e+54) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -1.25e-136) {
tmp = t_0;
} else if (x1 <= 9.5e-209) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.6e+52) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((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) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
if (x1 <= (-5.5d+54)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 2.0d0)))
else if (x1 <= (-1.25d-136)) then
tmp = t_0
else if (x1 <= 9.5d-209) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 3.6d+52) then
tmp = t_0
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((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 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -5.5e+54) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -1.25e-136) {
tmp = t_0;
} else if (x1 <= 9.5e-209) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.6e+52) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) - 2.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 <= -5.5e+54: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))) elif x1 <= -1.25e-136: tmp = t_0 elif x1 <= 9.5e-209: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 3.6e+52: tmp = t_0 else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) - 2.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 <= -5.5e+54) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 2.0)))); elseif (x1 <= -1.25e-136) tmp = t_0; elseif (x1 <= 9.5e-209) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 3.6e+52) tmp = t_0; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(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 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); tmp = 0.0; if (x1 <= -5.5e+54) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))); elseif (x1 <= -1.25e-136) tmp = t_0; elseif (x1 <= 9.5e-209) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 3.6e+52) tmp = t_0; else tmp = x1 + ((x2 * -6.0) + (x1 * ((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[(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, -5.5e+54], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.25e-136], t$95$0, If[LessEqual[x1, 9.5e-209], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.6e+52], t$95$0, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(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] - 2.0), $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 -5.5 \cdot 10^{+54}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -1.25 \cdot 10^{-136}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 9.5 \cdot 10^{-209}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 3.6 \cdot 10^{+52}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.50000000000000026e54Initial program 20.7%
Taylor expanded in x1 around inf 37.5%
Taylor expanded in x1 around 0 63.9%
Taylor expanded in x2 around inf 67.8%
if -5.50000000000000026e54 < x1 < -1.25e-136 or 9.50000000000000028e-209 < x1 < 3.6e52Initial program 99.1%
Taylor expanded in x1 around 0 77.3%
Taylor expanded in x1 around 0 76.5%
if -1.25e-136 < x1 < 9.50000000000000028e-209Initial program 99.4%
Taylor expanded in x1 around inf 93.6%
Taylor expanded in x1 around 0 93.9%
if 3.6e52 < x1 Initial program 44.8%
Taylor expanded in x1 around inf 38.3%
Taylor expanded in x1 around 0 78.6%
Taylor expanded in x2 around inf 86.9%
Final simplification81.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x2 (- (* 2.0 x2) 3.0))))
(if (<= x1 -4.4e+53)
(+
x1
(+ (* x2 -6.0) (* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 2.0))))
(if (<= x1 -1.25e-136)
(+
x1
(+
(* 3.0 (+ (* x2 -2.0) (* x1 (+ (* x1 (- 3.0 (* x2 -2.0))) -1.0))))
(+ x1 (* 4.0 (* x1 t_0)))))
(if (<= x1 3.05e-208)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 2.8e+55)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 t_0) 2.0))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(* x2 (+ (* x1 6.0) (/ (* x1 (+ (* x1 3.0) 9.0)) x2)))
2.0))))))))))
double code(double x1, double x2) {
double t_0 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -4.4e+53) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -1.25e-136) {
tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0)))) + (x1 + (4.0 * (x1 * t_0))));
} else if (x1 <= 3.05e-208) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 2.8e+55) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_0) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((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) :: tmp
t_0 = x2 * ((2.0d0 * x2) - 3.0d0)
if (x1 <= (-4.4d+53)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 2.0d0)))
else if (x1 <= (-1.25d-136)) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((x1 * (3.0d0 - (x2 * (-2.0d0)))) + (-1.0d0))))) + (x1 + (4.0d0 * (x1 * t_0))))
else if (x1 <= 3.05d-208) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 2.8d+55) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * t_0) - 2.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((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 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -4.4e+53) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -1.25e-136) {
tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0)))) + (x1 + (4.0 * (x1 * t_0))));
} else if (x1 <= 3.05e-208) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 2.8e+55) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_0) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x2 * ((2.0 * x2) - 3.0) tmp = 0 if x1 <= -4.4e+53: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))) elif x1 <= -1.25e-136: tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0)))) + (x1 + (4.0 * (x1 * t_0)))) elif x1 <= 3.05e-208: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 2.8e+55: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_0) - 2.0))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + ((x1 * ((x1 * 3.0) + 9.0)) / x2))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) tmp = 0.0 if (x1 <= -4.4e+53) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 2.0)))); elseif (x1 <= -1.25e-136) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(Float64(x1 * Float64(3.0 - Float64(x2 * -2.0))) + -1.0)))) + Float64(x1 + Float64(4.0 * Float64(x1 * t_0))))); elseif (x1 <= 3.05e-208) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 2.8e+55) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * t_0) - 2.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(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 = x2 * ((2.0 * x2) - 3.0); tmp = 0.0; if (x1 <= -4.4e+53) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))); elseif (x1 <= -1.25e-136) tmp = x1 + ((3.0 * ((x2 * -2.0) + (x1 * ((x1 * (3.0 - (x2 * -2.0))) + -1.0)))) + (x1 + (4.0 * (x1 * t_0)))); elseif (x1 <= 3.05e-208) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 2.8e+55) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_0) - 2.0))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((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[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+53], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.25e-136], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.05e-208], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.8e+55], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * t$95$0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(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] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+53}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -1.25 \cdot 10^{-136}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right) + -1\right)\right) + \left(x1 + 4 \cdot \left(x1 \cdot t\_0\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.05 \cdot 10^{-208}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 2.8 \cdot 10^{+55}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t\_0 - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + \frac{x1 \cdot \left(x1 \cdot 3 + 9\right)}{x2}\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.39999999999999997e53Initial program 20.7%
Taylor expanded in x1 around inf 37.5%
Taylor expanded in x1 around 0 63.9%
Taylor expanded in x2 around inf 67.8%
if -4.39999999999999997e53 < x1 < -1.25e-136Initial program 99.0%
Taylor expanded in x1 around 0 74.5%
Taylor expanded in x1 around 0 75.4%
if -1.25e-136 < x1 < 3.05e-208Initial program 99.4%
Taylor expanded in x1 around inf 93.6%
Taylor expanded in x1 around 0 93.9%
if 3.05e-208 < x1 < 2.8000000000000001e55Initial program 99.1%
Taylor expanded in x1 around 0 78.8%
Taylor expanded in x1 around 0 78.3%
if 2.8000000000000001e55 < x1 Initial program 44.8%
Taylor expanded in x1 around inf 38.3%
Taylor expanded in x1 around 0 78.6%
Taylor expanded in x2 around inf 86.9%
Final simplification81.6%
(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 -1.5e+121)
(+ x1 (* x1 (- (* x1 9.0) 2.0)))
(if (<= x1 -1.25e-136)
t_0
(if (<= x1 1e-209)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 3.6e+102)
t_0
(+ x1 (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.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 <= -1.5e+121) {
tmp = x1 + (x1 * ((x1 * 9.0) - 2.0));
} else if (x1 <= -1.25e-136) {
tmp = t_0;
} else if (x1 <= 1e-209) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.6e+102) {
tmp = t_0;
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 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 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
if (x1 <= (-1.5d+121)) then
tmp = x1 + (x1 * ((x1 * 9.0d0) - 2.0d0))
else if (x1 <= (-1.25d-136)) then
tmp = t_0
else if (x1 <= 1d-209) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 3.6d+102) then
tmp = t_0
else
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.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 <= -1.5e+121) {
tmp = x1 + (x1 * ((x1 * 9.0) - 2.0));
} else if (x1 <= -1.25e-136) {
tmp = t_0;
} else if (x1 <= 1e-209) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.6e+102) {
tmp = t_0;
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.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 <= -1.5e+121: tmp = x1 + (x1 * ((x1 * 9.0) - 2.0)) elif x1 <= -1.25e-136: tmp = t_0 elif x1 <= 1e-209: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 3.6e+102: tmp = t_0 else: tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.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 <= -1.5e+121) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0))); elseif (x1 <= -1.25e-136) tmp = t_0; elseif (x1 <= 1e-209) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 3.6e+102) tmp = t_0; else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.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 <= -1.5e+121) tmp = x1 + (x1 * ((x1 * 9.0) - 2.0)); elseif (x1 <= -1.25e-136) tmp = t_0; elseif (x1 <= 1e-209) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 3.6e+102) tmp = t_0; else tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.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, -1.5e+121], N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.25e-136], t$95$0, If[LessEqual[x1, 1e-209], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.6e+102], t$95$0, N[(x1 + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $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 -1.5 \cdot 10^{+121}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{elif}\;x1 \leq -1.25 \cdot 10^{-136}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 10^{-209}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 3.6 \cdot 10^{+102}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -1.5000000000000001e121Initial program 0.0%
Taylor expanded in x1 around inf 26.3%
Taylor expanded in x1 around 0 74.6%
Taylor expanded in x2 around 0 75.9%
if -1.5000000000000001e121 < x1 < -1.25e-136 or 1e-209 < x1 < 3.6000000000000002e102Initial program 99.2%
Taylor expanded in x1 around 0 67.9%
Taylor expanded in x1 around 0 67.3%
if -1.25e-136 < x1 < 1e-209Initial program 99.4%
Taylor expanded in x1 around inf 93.6%
Taylor expanded in x1 around 0 93.9%
if 3.6000000000000002e102 < x1 Initial program 30.4%
Taylor expanded in x1 around inf 30.4%
Taylor expanded in x1 around 0 89.1%
Taylor expanded in x2 around 0 95.7%
Final simplification79.9%
(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 -1.75e+54)
(+
x1
(+ (* x2 -6.0) (* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 2.0))))
(if (<= x1 -1.25e-136)
t_0
(if (<= x1 7e-210)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 3.9e+102)
t_0
(+ x1 (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.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 <= -1.75e+54) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -1.25e-136) {
tmp = t_0;
} else if (x1 <= 7e-210) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.9e+102) {
tmp = t_0;
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 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 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
if (x1 <= (-1.75d+54)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 2.0d0)))
else if (x1 <= (-1.25d-136)) then
tmp = t_0
else if (x1 <= 7d-210) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 3.9d+102) then
tmp = t_0
else
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.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 <= -1.75e+54) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0)));
} else if (x1 <= -1.25e-136) {
tmp = t_0;
} else if (x1 <= 7e-210) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 3.9e+102) {
tmp = t_0;
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.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 <= -1.75e+54: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))) elif x1 <= -1.25e-136: tmp = t_0 elif x1 <= 7e-210: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 3.9e+102: tmp = t_0 else: tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.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 <= -1.75e+54) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 2.0)))); elseif (x1 <= -1.25e-136) tmp = t_0; elseif (x1 <= 7e-210) 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(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.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 <= -1.75e+54) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 2.0))); elseif (x1 <= -1.25e-136) tmp = t_0; elseif (x1 <= 7e-210) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 3.9e+102) tmp = t_0; else tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.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, -1.75e+54], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.25e-136], t$95$0, If[LessEqual[x1, 7e-210], 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[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $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 -1.75 \cdot 10^{+54}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -1.25 \cdot 10^{-136}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{-210}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{+102}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -1.7500000000000001e54Initial program 20.7%
Taylor expanded in x1 around inf 37.5%
Taylor expanded in x1 around 0 63.9%
Taylor expanded in x2 around inf 67.8%
if -1.7500000000000001e54 < x1 < -1.25e-136 or 7.00000000000000031e-210 < x1 < 3.8999999999999998e102Initial program 99.2%
Taylor expanded in x1 around 0 72.6%
Taylor expanded in x1 around 0 71.7%
if -1.25e-136 < x1 < 7.00000000000000031e-210Initial program 99.4%
Taylor expanded in x1 around inf 93.6%
Taylor expanded in x1 around 0 93.9%
if 3.8999999999999998e102 < x1 Initial program 30.4%
Taylor expanded in x1 around inf 30.4%
Taylor expanded in x1 around 0 89.1%
Taylor expanded in x2 around 0 95.7%
Final simplification80.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- (* x1 9.0) 2.0)))
(t_1 (+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))))
(if (<= x1 -2.95e+116)
(+ x1 t_0)
(if (<= x1 -2.55e-26)
t_1
(if (<= x1 4.5e-6)
(+ x1 (+ t_0 (* x2 -6.0)))
(if (<= x1 3.9e+102)
t_1
(+ x1 (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double t_1 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
double tmp;
if (x1 <= -2.95e+116) {
tmp = x1 + t_0;
} else if (x1 <= -2.55e-26) {
tmp = t_1;
} else if (x1 <= 4.5e-6) {
tmp = x1 + (t_0 + (x2 * -6.0));
} else if (x1 <= 3.9e+102) {
tmp = t_1;
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 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 * 9.0d0) - 2.0d0)
t_1 = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
if (x1 <= (-2.95d+116)) then
tmp = x1 + t_0
else if (x1 <= (-2.55d-26)) then
tmp = t_1
else if (x1 <= 4.5d-6) then
tmp = x1 + (t_0 + (x2 * (-6.0d0)))
else if (x1 <= 3.9d+102) then
tmp = t_1
else
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double t_1 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
double tmp;
if (x1 <= -2.95e+116) {
tmp = x1 + t_0;
} else if (x1 <= -2.55e-26) {
tmp = t_1;
} else if (x1 <= 4.5e-6) {
tmp = x1 + (t_0 + (x2 * -6.0));
} else if (x1 <= 3.9e+102) {
tmp = t_1;
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) - 2.0) t_1 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) tmp = 0 if x1 <= -2.95e+116: tmp = x1 + t_0 elif x1 <= -2.55e-26: tmp = t_1 elif x1 <= 4.5e-6: tmp = x1 + (t_0 + (x2 * -6.0)) elif x1 <= 3.9e+102: tmp = t_1 else: tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) t_1 = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))) tmp = 0.0 if (x1 <= -2.95e+116) tmp = Float64(x1 + t_0); elseif (x1 <= -2.55e-26) tmp = t_1; elseif (x1 <= 4.5e-6) tmp = Float64(x1 + Float64(t_0 + Float64(x2 * -6.0))); elseif (x1 <= 3.9e+102) tmp = t_1; else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) - 2.0); t_1 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); tmp = 0.0; if (x1 <= -2.95e+116) tmp = x1 + t_0; elseif (x1 <= -2.55e-26) tmp = t_1; elseif (x1 <= 4.5e-6) tmp = x1 + (t_0 + (x2 * -6.0)); elseif (x1 <= 3.9e+102) tmp = t_1; else tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.95e+116], N[(x1 + t$95$0), $MachinePrecision], If[LessEqual[x1, -2.55e-26], t$95$1, If[LessEqual[x1, 4.5e-6], N[(x1 + N[(t$95$0 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.9e+102], t$95$1, N[(x1 + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
t_1 := x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.95 \cdot 10^{+116}:\\
\;\;\;\;x1 + t\_0\\
\mathbf{elif}\;x1 \leq -2.55 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{-6}:\\
\;\;\;\;x1 + \left(t\_0 + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -2.95e116Initial program 0.0%
Taylor expanded in x1 around inf 26.3%
Taylor expanded in x1 around 0 74.6%
Taylor expanded in x2 around 0 75.9%
if -2.95e116 < x1 < -2.54999999999999995e-26 or 4.50000000000000011e-6 < x1 < 3.8999999999999998e102Initial program 99.4%
Taylor expanded in x1 around 0 41.6%
Taylor expanded in x1 around inf 34.6%
if -2.54999999999999995e-26 < x1 < 4.50000000000000011e-6Initial program 99.2%
Taylor expanded in x1 around inf 87.3%
Taylor expanded in x1 around 0 87.9%
Taylor expanded in x2 around 0 87.9%
if 3.8999999999999998e102 < x1 Initial program 30.4%
Taylor expanded in x1 around inf 30.4%
Taylor expanded in x1 around 0 89.1%
Taylor expanded in x2 around 0 95.7%
Final simplification76.3%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 4.8e-7)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0))))
(if (<= x1 3.9e+102)
(+ x1 (+ 9.0 (+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))
(+ x1 (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 4.8e-7) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)));
} else if (x1 <= 3.9e+102) {
tmp = x1 + (9.0 + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 4.8d-7) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)))
else if (x1 <= 3.9d+102) then
tmp = x1 + (9.0d0 + (x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))))
else
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 4.8e-7) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)));
} else if (x1 <= 3.9e+102) {
tmp = x1 + (9.0 + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 4.8e-7: tmp = x1 + ((x2 * -6.0) + (x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0))) elif x1 <= 3.9e+102: tmp = x1 + (9.0 + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) else: tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 4.8e-7) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)))); elseif (x1 <= 3.9e+102) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))))); else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 4.8e-7) tmp = x1 + ((x2 * -6.0) + (x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0))); elseif (x1 <= 3.9e+102) tmp = x1 + (9.0 + (x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))); else tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 4.8e-7], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.9e+102], N[(x1 + N[(9.0 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 4.8 \cdot 10^{-7}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < 4.79999999999999957e-7Initial program 78.6%
Taylor expanded in x1 around inf 70.7%
Taylor expanded in x1 around 0 75.5%
if 4.79999999999999957e-7 < x1 < 3.8999999999999998e102Initial program 99.5%
Taylor expanded in x1 around 0 38.0%
Taylor expanded in x1 around inf 38.0%
if 3.8999999999999998e102 < x1 Initial program 30.4%
Taylor expanded in x1 around inf 30.4%
Taylor expanded in x1 around 0 89.1%
Taylor expanded in x2 around 0 95.7%
Final simplification75.2%
(FPCore (x1 x2)
:precision binary64
(if (<= x2 -4.5e+212)
(+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))
(if (<= x2 2.8e-7)
(+ x1 (+ (* x1 (- (* x1 9.0) 2.0)) (* x2 -6.0)))
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 6.0 (* x1 x2)) 2.0)))))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -4.5e+212) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else if (x2 <= 2.8e-7) {
tmp = x1 + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * -6.0));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((6.0 * (x1 * x2)) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-4.5d+212)) then
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
else if (x2 <= 2.8d-7) then
tmp = x1 + ((x1 * ((x1 * 9.0d0) - 2.0d0)) + (x2 * (-6.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((6.0d0 * (x1 * x2)) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -4.5e+212) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else if (x2 <= 2.8e-7) {
tmp = x1 + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * -6.0));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((6.0 * (x1 * x2)) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -4.5e+212: tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) elif x2 <= 2.8e-7: tmp = x1 + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * -6.0)) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((6.0 * (x1 * x2)) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -4.5e+212) tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))); elseif (x2 <= 2.8e-7) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) + Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(6.0 * Float64(x1 * x2)) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -4.5e+212) tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); elseif (x2 <= 2.8e-7) tmp = x1 + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * -6.0)); else tmp = x1 + ((x2 * -6.0) + (x1 * ((6.0 * (x1 * x2)) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -4.5e+212], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 2.8e-7], N[(x1 + N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(6.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -4.5 \cdot 10^{+212}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{elif}\;x2 \leq 2.8 \cdot 10^{-7}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x1 \cdot 9 - 2\right) + x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(6 \cdot \left(x1 \cdot x2\right) - 2\right)\right)\\
\end{array}
\end{array}
if x2 < -4.5000000000000002e212Initial program 72.1%
Taylor expanded in x1 around 0 61.1%
Taylor expanded in x1 around inf 72.2%
if -4.5000000000000002e212 < x2 < 2.80000000000000019e-7Initial program 73.6%
Taylor expanded in x1 around inf 71.1%
Taylor expanded in x1 around 0 71.2%
Taylor expanded in x2 around 0 75.6%
if 2.80000000000000019e-7 < x2 Initial program 68.5%
Taylor expanded in x1 around inf 42.2%
Taylor expanded in x1 around 0 70.8%
Taylor expanded in x2 around inf 70.8%
Final simplification74.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.7e-15)
(+ x1 (* x1 (- (* x1 9.0) 2.0)))
(if (<= x1 1.15e-15)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(+ x1 (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.7e-15) {
tmp = x1 + (x1 * ((x1 * 9.0) - 2.0));
} else if (x1 <= 1.15e-15) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.7d-15)) then
tmp = x1 + (x1 * ((x1 * 9.0d0) - 2.0d0))
else if (x1 <= 1.15d-15) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.7e-15) {
tmp = x1 + (x1 * ((x1 * 9.0) - 2.0));
} else if (x1 <= 1.15e-15) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.7e-15: tmp = x1 + (x1 * ((x1 * 9.0) - 2.0)) elif x1 <= 1.15e-15: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) else: tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.7e-15) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0))); elseif (x1 <= 1.15e-15) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.7e-15) tmp = x1 + (x1 * ((x1 * 9.0) - 2.0)); elseif (x1 <= 1.15e-15) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); else tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.7e-15], N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.15e-15], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.7 \cdot 10^{-15}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{elif}\;x1 \leq 1.15 \cdot 10^{-15}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < -1.7e-15Initial program 37.4%
Taylor expanded in x1 around inf 41.4%
Taylor expanded in x1 around 0 54.8%
Taylor expanded in x2 around 0 51.9%
if -1.7e-15 < x1 < 1.14999999999999995e-15Initial program 99.2%
Taylor expanded in x1 around inf 85.3%
Taylor expanded in x1 around 0 85.7%
if 1.14999999999999995e-15 < x1 Initial program 57.1%
Taylor expanded in x1 around inf 37.3%
Taylor expanded in x1 around 0 65.3%
Taylor expanded in x2 around 0 63.3%
Final simplification71.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -1.9e-126) (not (<= x1 1.65e-109))) (+ x1 (* x1 (- (* x1 9.0) 2.0))) (+ x1 (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.9e-126) || !(x1 <= 1.65e-109)) {
tmp = x1 + (x1 * ((x1 * 9.0) - 2.0));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-1.9d-126)) .or. (.not. (x1 <= 1.65d-109))) then
tmp = x1 + (x1 * ((x1 * 9.0d0) - 2.0d0))
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.9e-126) || !(x1 <= 1.65e-109)) {
tmp = x1 + (x1 * ((x1 * 9.0) - 2.0));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -1.9e-126) or not (x1 <= 1.65e-109): tmp = x1 + (x1 * ((x1 * 9.0) - 2.0)) else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -1.9e-126) || !(x1 <= 1.65e-109)) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0))); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -1.9e-126) || ~((x1 <= 1.65e-109))) tmp = x1 + (x1 * ((x1 * 9.0) - 2.0)); else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -1.9e-126], N[Not[LessEqual[x1, 1.65e-109]], $MachinePrecision]], N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.9 \cdot 10^{-126} \lor \neg \left(x1 \leq 1.65 \cdot 10^{-109}\right):\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -1.8999999999999999e-126 or 1.64999999999999995e-109 < x1 Initial program 58.6%
Taylor expanded in x1 around inf 45.9%
Taylor expanded in x1 around 0 56.9%
Taylor expanded in x2 around 0 51.0%
if -1.8999999999999999e-126 < x1 < 1.64999999999999995e-109Initial program 99.4%
Taylor expanded in x1 around 0 81.5%
Taylor expanded in x1 around 0 74.9%
*-commutative74.9%
Simplified74.9%
Final simplification59.0%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -8.5e-15) (not (<= x1 4.1e-16))) (+ x1 (* x1 (- (* x1 9.0) 2.0))) (+ x1 (+ (* x2 -6.0) (* x1 -2.0)))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -8.5e-15) || !(x1 <= 4.1e-16)) {
tmp = x1 + (x1 * ((x1 * 9.0) - 2.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 <= (-8.5d-15)) .or. (.not. (x1 <= 4.1d-16))) then
tmp = x1 + (x1 * ((x1 * 9.0d0) - 2.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 <= -8.5e-15) || !(x1 <= 4.1e-16)) {
tmp = x1 + (x1 * ((x1 * 9.0) - 2.0));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -8.5e-15) or not (x1 <= 4.1e-16): tmp = x1 + (x1 * ((x1 * 9.0) - 2.0)) else: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -8.5e-15) || !(x1 <= 4.1e-16)) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.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 <= -8.5e-15) || ~((x1 <= 4.1e-16))) tmp = x1 + (x1 * ((x1 * 9.0) - 2.0)); else tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -8.5e-15], N[Not[LessEqual[x1, 4.1e-16]], $MachinePrecision]], N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.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 -8.5 \cdot 10^{-15} \lor \neg \left(x1 \leq 4.1 \cdot 10^{-16}\right):\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\end{array}
\end{array}
if x1 < -8.50000000000000007e-15 or 4.10000000000000006e-16 < x1 Initial program 48.3%
Taylor expanded in x1 around inf 39.1%
Taylor expanded in x1 around 0 52.7%
Taylor expanded in x2 around 0 48.5%
if -8.50000000000000007e-15 < x1 < 4.10000000000000006e-16Initial program 99.2%
Taylor expanded in x1 around inf 85.3%
Taylor expanded in x1 around 0 85.7%
Final simplification65.9%
(FPCore (x1 x2) :precision binary64 (if (<= x1 12.0) (+ x1 (+ (* x1 (- (* x1 9.0) 2.0)) (* x2 -6.0))) (+ x1 (* x1 (- (* x1 (+ (* x1 3.0) 9.0)) 2.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 12.0) {
tmp = x1 + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * -6.0));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 12.0d0) then
tmp = x1 + ((x1 * ((x1 * 9.0d0) - 2.0d0)) + (x2 * (-6.0d0)))
else
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0d0) + 9.0d0)) - 2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 12.0) {
tmp = x1 + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * -6.0));
} else {
tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 12.0: tmp = x1 + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * -6.0)) else: tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 12.0) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) + Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + 9.0)) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 12.0) tmp = x1 + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * -6.0)); else tmp = x1 + (x1 * ((x1 * ((x1 * 3.0) + 9.0)) - 2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 12.0], N[(x1 + N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 12:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x1 \cdot 9 - 2\right) + x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 9\right) - 2\right)\\
\end{array}
\end{array}
if x1 < 12Initial program 78.8%
Taylor expanded in x1 around inf 70.3%
Taylor expanded in x1 around 0 75.1%
Taylor expanded in x2 around 0 74.4%
if 12 < x1 Initial program 55.4%
Taylor expanded in x1 around inf 36.3%
Taylor expanded in x1 around 0 65.5%
Taylor expanded in x2 around 0 63.4%
Final simplification71.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -8.2e+50) (not (<= x1 0.55))) (* x1 (+ 2.0 (* x2 -12.0))) (+ x1 (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -8.2e+50) || !(x1 <= 0.55)) {
tmp = x1 * (2.0 + (x2 * -12.0));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-8.2d+50)) .or. (.not. (x1 <= 0.55d0))) then
tmp = x1 * (2.0d0 + (x2 * (-12.0d0)))
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -8.2e+50) || !(x1 <= 0.55)) {
tmp = x1 * (2.0 + (x2 * -12.0));
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -8.2e+50) or not (x1 <= 0.55): tmp = x1 * (2.0 + (x2 * -12.0)) else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -8.2e+50) || !(x1 <= 0.55)) tmp = Float64(x1 * Float64(2.0 + Float64(x2 * -12.0))); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -8.2e+50) || ~((x1 <= 0.55))) tmp = x1 * (2.0 + (x2 * -12.0)); else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -8.2e+50], N[Not[LessEqual[x1, 0.55]], $MachinePrecision]], N[(x1 * N[(2.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -8.2 \cdot 10^{+50} \lor \neg \left(x1 \leq 0.55\right):\\
\;\;\;\;x1 \cdot \left(2 + x2 \cdot -12\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -8.2000000000000002e50 or 0.55000000000000004 < x1 Initial program 42.0%
Taylor expanded in x1 around 0 17.8%
Taylor expanded in x2 around 0 7.1%
*-commutative7.1%
associate-*l*7.1%
Simplified7.1%
Taylor expanded in x1 around inf 17.3%
Taylor expanded in x1 around inf 17.3%
*-commutative17.3%
Simplified17.3%
if -8.2000000000000002e50 < x1 < 0.55000000000000004Initial program 99.2%
Taylor expanded in x1 around 0 82.2%
Taylor expanded in x1 around 0 51.4%
*-commutative51.4%
Simplified51.4%
Final simplification35.2%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -3e+52) (* x1 (+ 2.0 (* x2 -12.0))) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -3e+52) {
tmp = x1 * (2.0 + (x2 * -12.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-3d+52)) then
tmp = x1 * (2.0d0 + (x2 * (-12.0d0)))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -3e+52) {
tmp = x1 * (2.0 + (x2 * -12.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -3e+52: tmp = x1 * (2.0 + (x2 * -12.0)) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -3e+52) tmp = Float64(x1 * Float64(2.0 + Float64(x2 * -12.0))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -3e+52) tmp = x1 * (2.0 + (x2 * -12.0)); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -3e+52], N[(x1 * N[(2.0 + N[(x2 * -12.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 -3 \cdot 10^{+52}:\\
\;\;\;\;x1 \cdot \left(2 + x2 \cdot -12\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -3e52Initial program 20.7%
Taylor expanded in x1 around 0 4.3%
Taylor expanded in x2 around 0 6.9%
*-commutative6.9%
associate-*l*6.9%
Simplified6.9%
Taylor expanded in x1 around inf 21.7%
Taylor expanded in x1 around inf 21.7%
*-commutative21.7%
Simplified21.7%
if -3e52 < x1 Initial program 84.1%
Taylor expanded in x1 around 0 62.7%
Taylor expanded in x1 around 0 35.0%
*-commutative35.0%
Simplified35.0%
Taylor expanded in x2 around inf 40.3%
Final simplification36.9%
(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 72.2%
Taylor expanded in x1 around 0 51.7%
Taylor expanded in x1 around 0 28.5%
*-commutative28.5%
Simplified28.5%
Final simplification28.5%
(FPCore (x1 x2) :precision binary64 9.0)
double code(double x1, double x2) {
return 9.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = 9.0d0
end function
public static double code(double x1, double x2) {
return 9.0;
}
def code(x1, x2): return 9.0
function code(x1, x2) return 9.0 end
function tmp = code(x1, x2) tmp = 9.0; end
code[x1_, x2_] := 9.0
\begin{array}{l}
\\
9
\end{array}
Initial program 72.2%
Taylor expanded in x1 around inf 60.8%
Taylor expanded in x1 around inf 43.7%
Taylor expanded in x1 around 0 3.5%
Final simplification3.5%
herbie shell --seed 2024130
(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))))))