
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 28 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (* x1 x1)))
(t_1 (/ (- t_0 (fma 2.0 x2 x1)) (fma x1 x1 1.0)))
(t_2 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_3 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_4 (/ (- t_0 (fma x2 -2.0 x1)) (fma x1 x1 1.0))))
(if (<= x1 -4e+154)
t_2
(if (<= x1 -1.7e-80)
(+
x1
(fma
3.0
t_1
(+
(* t_0 t_4)
(*
(fma x1 x1 1.0)
(+
x1
(*
x1
(+ (* 2.0 (* t_4 (+ t_4 -3.0))) (* x1 (fma t_4 4.0 -6.0)))))))))
(if (<= x1 2e+152)
(+
x1
(fma
3.0
t_1
(+
x1
(fma
(fma x1 x1 1.0)
(fma
x1
(* x1 (fma t_3 4.0 -6.0))
(* (* x1 (* 2.0 t_3)) (+ -3.0 t_3)))
(fma t_0 t_3 (pow x1 3.0))))))
t_2)))))
double code(double x1, double x2) {
double t_0 = 3.0 * (x1 * x1);
double t_1 = (t_0 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_4 = (t_0 - fma(x2, -2.0, x1)) / fma(x1, x1, 1.0);
double tmp;
if (x1 <= -4e+154) {
tmp = t_2;
} else if (x1 <= -1.7e-80) {
tmp = x1 + fma(3.0, t_1, ((t_0 * t_4) + (fma(x1, x1, 1.0) * (x1 + (x1 * ((2.0 * (t_4 * (t_4 + -3.0))) + (x1 * fma(t_4, 4.0, -6.0))))))));
} else if (x1 <= 2e+152) {
tmp = x1 + fma(3.0, t_1, (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_3, 4.0, -6.0)), ((x1 * (2.0 * t_3)) * (-3.0 + t_3))), fma(t_0, t_3, pow(x1, 3.0)))));
} else {
tmp = t_2;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(3.0 * Float64(x1 * x1)) t_1 = Float64(Float64(t_0 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)) t_2 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_3 = Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_4 = Float64(Float64(t_0 - fma(x2, -2.0, x1)) / fma(x1, x1, 1.0)) tmp = 0.0 if (x1 <= -4e+154) tmp = t_2; elseif (x1 <= -1.7e-80) tmp = Float64(x1 + fma(3.0, t_1, Float64(Float64(t_0 * t_4) + Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(x1 * Float64(Float64(2.0 * Float64(t_4 * Float64(t_4 + -3.0))) + Float64(x1 * fma(t_4, 4.0, -6.0))))))))); elseif (x1 <= 2e+152) tmp = Float64(x1 + fma(3.0, t_1, Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_3, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_3)) * Float64(-3.0 + t_3))), fma(t_0, t_3, (x1 ^ 3.0)))))); else tmp = t_2; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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$4 = N[(N[(t$95$0 - N[(x2 * -2.0 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4e+154], t$95$2, If[LessEqual[x1, -1.7e-80], N[(x1 + N[(3.0 * t$95$1 + N[(N[(t$95$0 * t$95$4), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(x1 * N[(N[(2.0 * N[(t$95$4 * N[(t$95$4 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(t$95$4 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], N[(x1 + N[(3.0 * t$95$1 + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$3 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$3), $MachinePrecision]), $MachinePrecision] * N[(-3.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x1 \cdot x1\right)\\
t_1 := \frac{t\_0 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_2 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_3 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_4 := \frac{t\_0 - \mathsf{fma}\left(x2, -2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 \leq -4 \cdot 10^{+154}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -1.7 \cdot 10^{-80}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, t\_1, t\_0 \cdot t\_4 + \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + x1 \cdot \left(2 \cdot \left(t\_4 \cdot \left(t\_4 + -3\right)\right) + x1 \cdot \mathsf{fma}\left(t\_4, 4, -6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, t\_1, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_3, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_3\right)\right) \cdot \left(-3 + t\_3\right)\right), \mathsf{fma}\left(t\_0, t\_3, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -4.00000000000000015e154 or 2.0000000000000001e152 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 73.1%
Taylor expanded in x2 around 0 100.0%
if -4.00000000000000015e154 < x1 < -1.7e-80Initial program 76.3%
Simplified99.7%
if -1.7e-80 < x1 < 2.0000000000000001e152Initial program 99.5%
Simplified99.7%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* 3.0 (* x1 x1)))
(t_2 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_3 (/ (- (fma (* x1 3.0) x1 (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_4 (/ (- t_1 (fma x2 -2.0 x1)) (fma x1 x1 1.0))))
(if (<= x1 -4e+154)
t_2
(if (<= x1 -1.05e-99)
(+
x1
(fma
3.0
(/ (- t_1 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
(* t_1 t_4)
(*
(fma x1 x1 1.0)
(+
x1
(*
x1
(+ (* 2.0 (* t_4 (+ t_4 -3.0))) (* x1 (fma t_4 4.0 -6.0)))))))))
(if (<= x1 2e+152)
(+
x1
(+
(+
(fma
(fma
(* t_3 (* x1 2.0))
(+ -3.0 t_3)
(* (* x1 x1) (fma 4.0 t_3 -6.0)))
(fma x1 x1 1.0)
(* t_3 t_0))
(* x1 (* x1 x1)))
(+ x1 (* 3.0 (/ (- t_0 (+ x1 (* 2.0 x2))) (fma x1 x1 1.0))))))
t_2)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 3.0 * (x1 * x1);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = (fma((x1 * 3.0), x1, (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_4 = (t_1 - fma(x2, -2.0, x1)) / fma(x1, x1, 1.0);
double tmp;
if (x1 <= -4e+154) {
tmp = t_2;
} else if (x1 <= -1.05e-99) {
tmp = x1 + fma(3.0, ((t_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), ((t_1 * t_4) + (fma(x1, x1, 1.0) * (x1 + (x1 * ((2.0 * (t_4 * (t_4 + -3.0))) + (x1 * fma(t_4, 4.0, -6.0))))))));
} else if (x1 <= 2e+152) {
tmp = x1 + ((fma(fma((t_3 * (x1 * 2.0)), (-3.0 + t_3), ((x1 * x1) * fma(4.0, t_3, -6.0))), fma(x1, x1, 1.0), (t_3 * t_0)) + (x1 * (x1 * x1))) + (x1 + (3.0 * ((t_0 - (x1 + (2.0 * x2))) / fma(x1, x1, 1.0)))));
} else {
tmp = t_2;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(3.0 * Float64(x1 * x1)) t_2 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_3 = Float64(Float64(fma(Float64(x1 * 3.0), x1, Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_4 = Float64(Float64(t_1 - fma(x2, -2.0, x1)) / fma(x1, x1, 1.0)) tmp = 0.0 if (x1 <= -4e+154) tmp = t_2; elseif (x1 <= -1.05e-99) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(Float64(t_1 * t_4) + Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(x1 * Float64(Float64(2.0 * Float64(t_4 * Float64(t_4 + -3.0))) + Float64(x1 * fma(t_4, 4.0, -6.0))))))))); elseif (x1 <= 2e+152) tmp = Float64(x1 + Float64(Float64(fma(fma(Float64(t_3 * Float64(x1 * 2.0)), Float64(-3.0 + t_3), Float64(Float64(x1 * x1) * fma(4.0, t_3, -6.0))), fma(x1, x1, 1.0), Float64(t_3 * t_0)) + Float64(x1 * Float64(x1 * x1))) + Float64(x1 + Float64(3.0 * Float64(Float64(t_0 - Float64(x1 + Float64(2.0 * x2))) / fma(x1, x1, 1.0)))))); else tmp = t_2; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$1 - N[(x2 * -2.0 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4e+154], t$95$2, If[LessEqual[x1, -1.05e-99], N[(x1 + N[(3.0 * N[(N[(t$95$1 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * t$95$4), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(x1 * N[(N[(2.0 * N[(t$95$4 * N[(t$95$4 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(t$95$4 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], N[(x1 + N[(N[(N[(N[(N[(t$95$3 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(-3.0 + t$95$3), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(4.0 * t$95$3 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1 + 1.0), $MachinePrecision] + N[(t$95$3 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(3.0 * N[(N[(t$95$0 - N[(x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 3 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_3 := \frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_4 := \frac{t\_1 - \mathsf{fma}\left(x2, -2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 \leq -4 \cdot 10^{+154}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -1.05 \cdot 10^{-99}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_1 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, t\_1 \cdot t\_4 + \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + x1 \cdot \left(2 \cdot \left(t\_4 \cdot \left(t\_4 + -3\right)\right) + x1 \cdot \mathsf{fma}\left(t\_4, 4, -6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_3 \cdot \left(x1 \cdot 2\right), -3 + t\_3, \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(4, t\_3, -6\right)\right), \mathsf{fma}\left(x1, x1, 1\right), t\_3 \cdot t\_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right) + \left(x1 + 3 \cdot \frac{t\_0 - \left(x1 + 2 \cdot x2\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -4.00000000000000015e154 or 2.0000000000000001e152 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 73.1%
Taylor expanded in x2 around 0 100.0%
if -4.00000000000000015e154 < x1 < -1.04999999999999992e-99Initial program 78.3%
Simplified99.7%
if -1.04999999999999992e-99 < x1 < 2.0000000000000001e152Initial program 99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* 3.0 (* x1 x1)))
(t_2 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_3 (+ 1.0 (* x1 x1)))
(t_4 (/ (- (+ (* 2.0 x2) t_0) x1) t_3))
(t_5 (/ (- t_1 (fma x2 -2.0 x1)) (fma x1 x1 1.0))))
(if (<= x1 -4e+154)
t_2
(if (<= x1 -4.9e-100)
(+
x1
(fma
3.0
(/ (- t_1 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
(* t_1 t_5)
(*
(fma x1 x1 1.0)
(+
x1
(*
x1
(+ (* 2.0 (* t_5 (+ t_5 -3.0))) (* x1 (fma t_5 4.0 -6.0)))))))))
(if (<= x1 2e+152)
(+
x1
(+
(+
x1
(+
(+
(*
t_3
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(* (* x1 x1) (- (* 4.0 t_4) 6.0))))
(* t_0 t_4))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_3))))
t_2)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 3.0 * (x1 * x1);
double t_2 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_3 = 1.0 + (x1 * x1);
double t_4 = (((2.0 * x2) + t_0) - x1) / t_3;
double t_5 = (t_1 - fma(x2, -2.0, x1)) / fma(x1, x1, 1.0);
double tmp;
if (x1 <= -4e+154) {
tmp = t_2;
} else if (x1 <= -4.9e-100) {
tmp = x1 + fma(3.0, ((t_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), ((t_1 * t_5) + (fma(x1, x1, 1.0) * (x1 + (x1 * ((2.0 * (t_5 * (t_5 + -3.0))) + (x1 * fma(t_5, 4.0, -6.0))))))));
} else if (x1 <= 2e+152) {
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0)))) + (t_0 * t_4)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)));
} else {
tmp = t_2;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(3.0 * Float64(x1 * x1)) t_2 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_3 = Float64(1.0 + Float64(x1 * x1)) t_4 = Float64(Float64(Float64(Float64(2.0 * x2) + t_0) - x1) / t_3) t_5 = Float64(Float64(t_1 - fma(x2, -2.0, x1)) / fma(x1, x1, 1.0)) tmp = 0.0 if (x1 <= -4e+154) tmp = t_2; elseif (x1 <= -4.9e-100) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(Float64(t_1 * t_5) + Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(x1 * Float64(Float64(2.0 * Float64(t_5 * Float64(t_5 + -3.0))) + Float64(x1 * fma(t_5, 4.0, -6.0))))))))); elseif (x1 <= 2e+152) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0)))) + Float64(t_0 * t_4)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_3)))); else tmp = t_2; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$1 - N[(x2 * -2.0 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4e+154], t$95$2, If[LessEqual[x1, -4.9e-100], N[(x1 + N[(3.0 * N[(N[(t$95$1 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * t$95$5), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(x1 * N[(N[(2.0 * N[(t$95$5 * N[(t$95$5 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(t$95$5 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$4), $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$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 3 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_3 := 1 + x1 \cdot x1\\
t_4 := \frac{\left(2 \cdot x2 + t\_0\right) - x1}{t\_3}\\
t_5 := \frac{t\_1 - \mathsf{fma}\left(x2, -2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 \leq -4 \cdot 10^{+154}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -4.9 \cdot 10^{-100}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_1 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, t\_1 \cdot t\_5 + \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + x1 \cdot \left(2 \cdot \left(t\_5 \cdot \left(t\_5 + -3\right)\right) + x1 \cdot \mathsf{fma}\left(t\_5, 4, -6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_4 - 6\right)\right) + t\_0 \cdot t\_4\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_3}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -4.00000000000000015e154 or 2.0000000000000001e152 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 73.1%
Taylor expanded in x2 around 0 100.0%
if -4.00000000000000015e154 < x1 < -4.9000000000000003e-100Initial program 78.3%
Simplified99.7%
if -4.9000000000000003e-100 < x1 < 2.0000000000000001e152Initial program 99.6%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 6.0 (- (* 2.0 x2) 3.0)))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ 1.0 (* x1 x1)))
(t_4 (/ (- (+ (* 2.0 x2) t_2) x1) t_3))
(t_5 (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_3))))
(if (<= x1 -4.5e+153)
t_1
(if (<= x1 -5e+102)
(+
x1
(+
t_5
(+
x1
(*
x1
(+
t_0
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_0 (* 6.0 (+ 3.0 (* x2 -2.0)))) 6.0))))
12.0)))))))
(if (<= x1 2e+152)
(+
x1
(+
(+
x1
(+
(+
(*
t_3
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(* (* x1 x1) (- (* 4.0 t_4) 6.0))))
(* t_2 t_4))
(* x1 (* x1 x1))))
t_5))
t_1)))))
double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.0);
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_2 = x1 * (x1 * 3.0);
double t_3 = 1.0 + (x1 * x1);
double t_4 = (((2.0 * x2) + t_2) - x1) / t_3;
double t_5 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3);
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -5e+102) {
tmp = x1 + (t_5 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 2e+152) {
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0)))) + (t_2 * t_4)) + (x1 * (x1 * x1)))) + t_5);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = 6.0d0 * ((2.0d0 * x2) - 3.0d0)
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_2 = x1 * (x1 * 3.0d0)
t_3 = 1.0d0 + (x1 * x1)
t_4 = (((2.0d0 * x2) + t_2) - x1) / t_3
t_5 = 3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_3)
if (x1 <= (-4.5d+153)) then
tmp = t_1
else if (x1 <= (-5d+102)) then
tmp = x1 + (t_5 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_0 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 6.0d0)))) - 12.0d0))))))
else if (x1 <= 2d+152) then
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_4) - 6.0d0)))) + (t_2 * t_4)) + (x1 * (x1 * x1)))) + t_5)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.0);
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_2 = x1 * (x1 * 3.0);
double t_3 = 1.0 + (x1 * x1);
double t_4 = (((2.0 * x2) + t_2) - x1) / t_3;
double t_5 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3);
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -5e+102) {
tmp = x1 + (t_5 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 2e+152) {
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0)))) + (t_2 * t_4)) + (x1 * (x1 * x1)))) + t_5);
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = 6.0 * ((2.0 * x2) - 3.0) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_2 = x1 * (x1 * 3.0) t_3 = 1.0 + (x1 * x1) t_4 = (((2.0 * x2) + t_2) - x1) / t_3 t_5 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3) tmp = 0 if x1 <= -4.5e+153: tmp = t_1 elif x1 <= -5e+102: tmp = x1 + (t_5 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))) elif x1 <= 2e+152: tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0)))) + (t_2 * t_4)) + (x1 * (x1 * x1)))) + t_5) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(6.0 * Float64(Float64(2.0 * x2) - 3.0)) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(1.0 + Float64(x1 * x1)) t_4 = Float64(Float64(Float64(Float64(2.0 * x2) + t_2) - x1) / t_3) t_5 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_3)) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -5e+102) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(x1 * Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_0 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 6.0)))) - 12.0))))))); elseif (x1 <= 2e+152) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0)))) + Float64(t_2 * t_4)) + Float64(x1 * Float64(x1 * x1)))) + t_5)); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = 6.0 * ((2.0 * x2) - 3.0); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_2 = x1 * (x1 * 3.0); t_3 = 1.0 + (x1 * x1); t_4 = (((2.0 * x2) + t_2) - x1) / t_3; t_5 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -5e+102) tmp = x1 + (t_5 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))); elseif (x1 <= 2e+152) tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0)))) + (t_2 * t_4)) + (x1 * (x1 * x1)))) + t_5); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$2), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $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]}, If[LessEqual[x1, -4.5e+153], t$95$1, If[LessEqual[x1, -5e+102], N[(x1 + N[(t$95$5 + N[(x1 + N[(x1 * N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$0 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(2 \cdot x2 - 3\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 1 + x1 \cdot x1\\
t_4 := \frac{\left(2 \cdot x2 + t\_2\right) - x1}{t\_3}\\
t_5 := 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_3}\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_5 + \left(x1 + x1 \cdot \left(t\_0 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_0 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 6\right)\right)\right) - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t\_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_4 - 6\right)\right) + t\_2 \cdot t\_4\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + t\_5\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 2.0000000000000001e152 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 73.1%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -5e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 91.7%
if -5e102 < x1 < 2.0000000000000001e152Initial program 99.5%
Final simplification99.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ 1.0 (* x1 x1)))
(t_3 (/ (- (+ (* 2.0 x2) t_1) x1) t_2))
(t_4 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
(if (<= x1 -4e+154)
t_0
(if (<= x1 -5e+102)
(+ x1 (+ t_4 (+ x1 (* 6.0 (pow x1 4.0)))))
(if (<= x1 2e+152)
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* 4.0 t_3) 6.0))))
(* t_1 t_3))
(* x1 (* x1 x1))))
t_4))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = 1.0 + (x1 * x1);
double t_3 = (((2.0 * x2) + t_1) - x1) / t_2;
double t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if (x1 <= -4e+154) {
tmp = t_0;
} else if (x1 <= -5e+102) {
tmp = x1 + (t_4 + (x1 + (6.0 * pow(x1, 4.0))));
} else if (x1 <= 2e+152) {
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + t_4);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = x1 * (x1 * 3.0d0)
t_2 = 1.0d0 + (x1 * x1)
t_3 = (((2.0d0 * x2) + t_1) - x1) / t_2
t_4 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)
if (x1 <= (-4d+154)) then
tmp = t_0
else if (x1 <= (-5d+102)) then
tmp = x1 + (t_4 + (x1 + (6.0d0 * (x1 ** 4.0d0))))
else if (x1 <= 2d+152) then
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_3) - 6.0d0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + t_4)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = 1.0 + (x1 * x1);
double t_3 = (((2.0 * x2) + t_1) - x1) / t_2;
double t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if (x1 <= -4e+154) {
tmp = t_0;
} else if (x1 <= -5e+102) {
tmp = x1 + (t_4 + (x1 + (6.0 * Math.pow(x1, 4.0))));
} else if (x1 <= 2e+152) {
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + t_4);
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = x1 * (x1 * 3.0) t_2 = 1.0 + (x1 * x1) t_3 = (((2.0 * x2) + t_1) - x1) / t_2 t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2) tmp = 0 if x1 <= -4e+154: tmp = t_0 elif x1 <= -5e+102: tmp = x1 + (t_4 + (x1 + (6.0 * math.pow(x1, 4.0)))) elif x1 <= 2e+152: tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + t_4) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(1.0 + Float64(x1 * x1)) t_3 = Float64(Float64(Float64(Float64(2.0 * x2) + t_1) - x1) / t_2) t_4 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) tmp = 0.0 if (x1 <= -4e+154) tmp = t_0; elseif (x1 <= -5e+102) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))); elseif (x1 <= 2e+152) tmp = 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(4.0 * t_3) - 6.0)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + t_4)); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = x1 * (x1 * 3.0); t_2 = 1.0 + (x1 * x1); t_3 = (((2.0 * x2) + t_1) - x1) / t_2; t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2); tmp = 0.0; if (x1 <= -4e+154) tmp = t_0; elseif (x1 <= -5e+102) tmp = x1 + (t_4 + (x1 + (6.0 * (x1 ^ 4.0)))); elseif (x1 <= 2e+152) tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + t_4); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4e+154], t$95$0, If[LessEqual[x1, -5e+102], N[(x1 + N[(t$95$4 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], 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[(4.0 * t$95$3), $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] + t$95$4), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 1 + x1 \cdot x1\\
t_3 := \frac{\left(2 \cdot x2 + t\_1\right) - x1}{t\_2}\\
t_4 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 \leq -4 \cdot 10^{+154}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + 6 \cdot {x1}^{4}\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;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(4 \cdot t\_3 - 6\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + t\_4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.00000000000000015e154 or 2.0000000000000001e152 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 73.1%
Taylor expanded in x2 around 0 100.0%
if -4.00000000000000015e154 < x1 < -5e102Initial program 0.0%
Taylor expanded in x1 around inf 100.0%
if -5e102 < x1 < 2.0000000000000001e152Initial program 99.5%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 6.0 (- (* 2.0 x2) 3.0)))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ 1.0 (* x1 x1)))
(t_4 (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_3)))
(t_5 (/ (- (+ (* 2.0 x2) t_2) x1) t_3)))
(if (<= x1 -5e+153)
t_1
(if (<= x1 -1.02e+98)
(+
x1
(+
t_4
(+
x1
(*
x1
(+
t_0
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_0 (* 6.0 (+ 3.0 (* x2 -2.0)))) 6.0))))
12.0)))))))
(if (<= x1 2e+152)
(+
x1
(+
t_4
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 t_5)
(*
t_3
(+ (* (* (* x1 2.0) t_5) (- t_5 3.0)) (* (* x1 x1) 6.0))))))))
t_1)))))
double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.0);
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_2 = x1 * (x1 * 3.0);
double t_3 = 1.0 + (x1 * x1);
double t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3);
double t_5 = (((2.0 * x2) + t_2) - x1) / t_3;
double tmp;
if (x1 <= -5e+153) {
tmp = t_1;
} else if (x1 <= -1.02e+98) {
tmp = x1 + (t_4 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 2e+152) {
tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_5) + (t_3 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = 6.0d0 * ((2.0d0 * x2) - 3.0d0)
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_2 = x1 * (x1 * 3.0d0)
t_3 = 1.0d0 + (x1 * x1)
t_4 = 3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_3)
t_5 = (((2.0d0 * x2) + t_2) - x1) / t_3
if (x1 <= (-5d+153)) then
tmp = t_1
else if (x1 <= (-1.02d+98)) then
tmp = x1 + (t_4 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_0 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 6.0d0)))) - 12.0d0))))))
else if (x1 <= 2d+152) then
tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_5) + (t_3 * ((((x1 * 2.0d0) * t_5) * (t_5 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 6.0 * ((2.0 * x2) - 3.0);
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_2 = x1 * (x1 * 3.0);
double t_3 = 1.0 + (x1 * x1);
double t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3);
double t_5 = (((2.0 * x2) + t_2) - x1) / t_3;
double tmp;
if (x1 <= -5e+153) {
tmp = t_1;
} else if (x1 <= -1.02e+98) {
tmp = x1 + (t_4 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 2e+152) {
tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_5) + (t_3 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = 6.0 * ((2.0 * x2) - 3.0) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_2 = x1 * (x1 * 3.0) t_3 = 1.0 + (x1 * x1) t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3) t_5 = (((2.0 * x2) + t_2) - x1) / t_3 tmp = 0 if x1 <= -5e+153: tmp = t_1 elif x1 <= -1.02e+98: tmp = x1 + (t_4 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))) elif x1 <= 2e+152: tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_5) + (t_3 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * 6.0))))))) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(6.0 * Float64(Float64(2.0 * x2) - 3.0)) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(1.0 + Float64(x1 * x1)) t_4 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_3)) t_5 = Float64(Float64(Float64(Float64(2.0 * x2) + t_2) - x1) / t_3) tmp = 0.0 if (x1 <= -5e+153) tmp = t_1; elseif (x1 <= -1.02e+98) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(x1 * Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_0 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 6.0)))) - 12.0))))))); elseif (x1 <= 2e+152) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * t_5) + Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = 6.0 * ((2.0 * x2) - 3.0); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_2 = x1 * (x1 * 3.0); t_3 = 1.0 + (x1 * x1); t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3); t_5 = (((2.0 * x2) + t_2) - x1) / t_3; tmp = 0.0; if (x1 <= -5e+153) tmp = t_1; elseif (x1 <= -1.02e+98) tmp = x1 + (t_4 + (x1 + (x1 * (t_0 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))); elseif (x1 <= 2e+152) tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_5) + (t_3 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * 6.0))))))); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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$5 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$2), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, If[LessEqual[x1, -5e+153], t$95$1, If[LessEqual[x1, -1.02e+98], N[(x1 + N[(t$95$4 + N[(x1 + N[(x1 * N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$0 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], N[(x1 + N[(t$95$4 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * t$95$5), $MachinePrecision] + N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(2 \cdot x2 - 3\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 1 + x1 \cdot x1\\
t_4 := 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_3}\\
t_5 := \frac{\left(2 \cdot x2 + t\_2\right) - x1}{t\_3}\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -1.02 \cdot 10^{+98}:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + x1 \cdot \left(t\_0 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_0 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 6\right)\right)\right) - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(t\_4 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_2 \cdot t\_5 + t\_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \left(t\_5 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -5.00000000000000018e153 or 2.0000000000000001e152 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 73.1%
Taylor expanded in x2 around 0 100.0%
if -5.00000000000000018e153 < x1 < -1.02000000000000007e98Initial program 7.7%
Taylor expanded in x1 around inf 7.7%
Taylor expanded in x1 around 0 92.3%
if -1.02000000000000007e98 < x1 < 2.0000000000000001e152Initial program 99.5%
Taylor expanded in x1 around inf 97.1%
Final simplification97.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ 1.0 (* x1 x1)))
(t_3 (* 6.0 t_0))
(t_4 (/ (- (+ (* 2.0 x2) t_1) x1) t_2))
(t_5
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 (+ (* (* (* x1 2.0) t_4) (- t_4 3.0)) (* (* x1 x1) 6.0)))
(* t_1 (- (* 2.0 x2) x1)))))
(* 3.0 (* x2 -2.0))))))
(if (<= x1 -4e+154)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -9.2e+97)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(*
x1
(+
t_3
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_3 (* 6.0 (+ 3.0 (* x2 -2.0)))) 6.0))))
12.0)))))))
(if (<= x1 -1.12e+19)
t_5
(if (<= x1 2.8e-7)
(+
x1
(+
(* x2 -6.0)
(+
(* x1 (- (* x1 9.0) 2.0))
(* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(if (<= x1 4e+102)
t_5
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 t_0))
(* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))))
2.0)))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = 1.0 + (x1 * x1);
double t_3 = 6.0 * t_0;
double t_4 = (((2.0 * x2) + t_1) - x1) / t_2;
double t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * ((2.0 * x2) - x1))))) + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -4e+154) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -9.2e+97) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_3 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= -1.12e+19) {
tmp = t_5;
} else if (x1 <= 2.8e-7) {
tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else if (x1 <= 4e+102) {
tmp = t_5;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_0)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = 1.0d0 + (x1 * x1)
t_3 = 6.0d0 * t_0
t_4 = (((2.0d0 * x2) + t_1) - x1) / t_2
t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + ((x1 * x1) * 6.0d0))) + (t_1 * ((2.0d0 * x2) - x1))))) + (3.0d0 * (x2 * (-2.0d0))))
if (x1 <= (-4d+154)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-9.2d+97)) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_3 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 6.0d0)))) - 12.0d0))))))
else if (x1 <= (-1.12d+19)) then
tmp = t_5
else if (x1 <= 2.8d-7) then
tmp = x1 + ((x2 * (-6.0d0)) + ((x1 * ((x1 * 9.0d0) - 2.0d0)) + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else if (x1 <= 4d+102) then
tmp = t_5
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * t_0)) + (x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0))))))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = 1.0 + (x1 * x1);
double t_3 = 6.0 * t_0;
double t_4 = (((2.0 * x2) + t_1) - x1) / t_2;
double t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * ((2.0 * x2) - x1))))) + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -4e+154) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -9.2e+97) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_3 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= -1.12e+19) {
tmp = t_5;
} else if (x1 <= 2.8e-7) {
tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else if (x1 <= 4e+102) {
tmp = t_5;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_0)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = x1 * (x1 * 3.0) t_2 = 1.0 + (x1 * x1) t_3 = 6.0 * t_0 t_4 = (((2.0 * x2) + t_1) - x1) / t_2 t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * ((2.0 * x2) - x1))))) + (3.0 * (x2 * -2.0))) tmp = 0 if x1 <= -4e+154: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -9.2e+97: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_3 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))) elif x1 <= -1.12e+19: tmp = t_5 elif x1 <= 2.8e-7: tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) elif x1 <= 4e+102: tmp = t_5 else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_0)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(1.0 + Float64(x1 * x1)) t_3 = Float64(6.0 * t_0) t_4 = Float64(Float64(Float64(Float64(2.0 * x2) + t_1) - x1) / t_2) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * 6.0))) + Float64(t_1 * Float64(Float64(2.0 * x2) - x1))))) + Float64(3.0 * Float64(x2 * -2.0)))) tmp = 0.0 if (x1 <= -4e+154) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -9.2e+97) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(x1 * Float64(t_3 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_3 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 6.0)))) - 12.0))))))); elseif (x1 <= -1.12e+19) tmp = t_5; elseif (x1 <= 2.8e-7) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); elseif (x1 <= 4e+102) tmp = t_5; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * t_0)) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0)))))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = x1 * (x1 * 3.0); t_2 = 1.0 + (x1 * x1); t_3 = 6.0 * t_0; t_4 = (((2.0 * x2) + t_1) - x1) / t_2; t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * ((2.0 * x2) - x1))))) + (3.0 * (x2 * -2.0))); tmp = 0.0; if (x1 <= -4e+154) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -9.2e+97) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_3 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))); elseif (x1 <= -1.12e+19) tmp = t_5; elseif (x1 <= 2.8e-7) tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); elseif (x1 <= 4e+102) tmp = t_5; else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_0)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.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[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(6.0 * t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4e+154], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -9.2e+97], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(t$95$3 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$3 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.12e+19], t$95$5, If[LessEqual[x1, 2.8e-7], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e+102], t$95$5, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 1 + x1 \cdot x1\\
t_3 := 6 \cdot t\_0\\
t_4 := \frac{\left(2 \cdot x2 + t\_1\right) - x1}{t\_2}\\
t_5 := x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right) + t\_1 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{if}\;x1 \leq -4 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -9.2 \cdot 10^{+97}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2} + \left(x1 + x1 \cdot \left(t\_3 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_3 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 6\right)\right)\right) - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.12 \cdot 10^{+19}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 2.8 \cdot 10^{-7}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 \cdot \left(x1 \cdot 9 - 2\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+102}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot t\_0\right) + x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.00000000000000015e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.0%
Taylor expanded in x2 around 0 100.0%
if -4.00000000000000015e154 < x1 < -9.20000000000000022e97Initial program 7.7%
Taylor expanded in x1 around inf 7.7%
Taylor expanded in x1 around 0 92.3%
if -9.20000000000000022e97 < x1 < -1.12e19 or 2.80000000000000019e-7 < x1 < 3.99999999999999991e102Initial program 99.3%
Taylor expanded in x1 around inf 91.2%
Taylor expanded in x1 around 0 86.0%
+-commutative86.0%
mul-1-neg86.0%
sub-neg86.0%
Simplified86.0%
Taylor expanded in x1 around 0 86.0%
*-commutative86.0%
Simplified86.0%
if -1.12e19 < x1 < 2.80000000000000019e-7Initial program 99.5%
Taylor expanded in x1 around 0 87.3%
Taylor expanded in x1 around 0 87.6%
Taylor expanded in x2 around 0 99.7%
if 3.99999999999999991e102 < x1 Initial program 26.0%
Taylor expanded in x1 around 0 12.7%
Taylor expanded in x1 around 0 96.0%
Final simplification96.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ 1.0 (* x1 x1)))
(t_3 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2)))
(t_4 (* 6.0 (- (* 2.0 x2) 3.0)))
(t_5 (/ (- (+ (* 2.0 x2) t_1) x1) t_2)))
(if (<= x1 -5e+153)
t_0
(if (<= x1 -1.02e+98)
(+
x1
(+
t_3
(+
x1
(*
x1
(+
t_4
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_4 (* 6.0 (+ 3.0 (* x2 -2.0)))) 6.0))))
12.0)))))))
(if (<= x1 2e+152)
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 (+ (* (* (* x1 2.0) t_5) (- t_5 3.0)) (* (* x1 x1) 6.0)))
(* 3.0 t_1))))))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = 1.0 + (x1 * x1);
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double t_4 = 6.0 * ((2.0 * x2) - 3.0);
double t_5 = (((2.0 * x2) + t_1) - x1) / t_2;
double tmp;
if (x1 <= -5e+153) {
tmp = t_0;
} else if (x1 <= -1.02e+98) {
tmp = x1 + (t_3 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 2e+152) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * 6.0))) + (3.0 * t_1)))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = x1 * (x1 * 3.0d0)
t_2 = 1.0d0 + (x1 * x1)
t_3 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)
t_4 = 6.0d0 * ((2.0d0 * x2) - 3.0d0)
t_5 = (((2.0d0 * x2) + t_1) - x1) / t_2
if (x1 <= (-5d+153)) then
tmp = t_0
else if (x1 <= (-1.02d+98)) then
tmp = x1 + (t_3 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_4 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 6.0d0)))) - 12.0d0))))))
else if (x1 <= 2d+152) then
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0d0) * t_5) * (t_5 - 3.0d0)) + ((x1 * x1) * 6.0d0))) + (3.0d0 * t_1)))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = x1 * (x1 * 3.0);
double t_2 = 1.0 + (x1 * x1);
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double t_4 = 6.0 * ((2.0 * x2) - 3.0);
double t_5 = (((2.0 * x2) + t_1) - x1) / t_2;
double tmp;
if (x1 <= -5e+153) {
tmp = t_0;
} else if (x1 <= -1.02e+98) {
tmp = x1 + (t_3 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 2e+152) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * 6.0))) + (3.0 * t_1)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = x1 * (x1 * 3.0) t_2 = 1.0 + (x1 * x1) t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2) t_4 = 6.0 * ((2.0 * x2) - 3.0) t_5 = (((2.0 * x2) + t_1) - x1) / t_2 tmp = 0 if x1 <= -5e+153: tmp = t_0 elif x1 <= -1.02e+98: tmp = x1 + (t_3 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))) elif x1 <= 2e+152: tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * 6.0))) + (3.0 * t_1))))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(1.0 + Float64(x1 * x1)) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(6.0 * Float64(Float64(2.0 * x2) - 3.0)) t_5 = Float64(Float64(Float64(Float64(2.0 * x2) + t_1) - x1) / t_2) tmp = 0.0 if (x1 <= -5e+153) tmp = t_0; elseif (x1 <= -1.02e+98) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(x1 * Float64(t_4 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_4 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 6.0)))) - 12.0))))))); elseif (x1 <= 2e+152) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * 6.0))) + Float64(3.0 * t_1)))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_1 = x1 * (x1 * 3.0); t_2 = 1.0 + (x1 * x1); t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2); t_4 = 6.0 * ((2.0 * x2) - 3.0); t_5 = (((2.0 * x2) + t_1) - x1) / t_2; tmp = 0.0; if (x1 <= -5e+153) tmp = t_0; elseif (x1 <= -1.02e+98) tmp = x1 + (t_3 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))); elseif (x1 <= 2e+152) tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * 6.0))) + (3.0 * t_1))))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(6.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -5e+153], t$95$0, If[LessEqual[x1, -1.02e+98], N[(x1 + N[(t$95$3 + N[(x1 + N[(x1 * N[(t$95$4 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$4 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+152], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 1 + x1 \cdot x1\\
t_3 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 6 \cdot \left(2 \cdot x2 - 3\right)\\
t_5 := \frac{\left(2 \cdot x2 + t\_1\right) - x1}{t\_2}\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.02 \cdot 10^{+98}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + x1 \cdot \left(t\_4 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_4 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 6\right)\right)\right) - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \left(t\_5 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right) + 3 \cdot t\_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -5.00000000000000018e153 or 2.0000000000000001e152 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 73.1%
Taylor expanded in x2 around 0 100.0%
if -5.00000000000000018e153 < x1 < -1.02000000000000007e98Initial program 7.7%
Taylor expanded in x1 around inf 7.7%
Taylor expanded in x1 around 0 92.3%
if -1.02000000000000007e98 < x1 < 2.0000000000000001e152Initial program 99.5%
Taylor expanded in x1 around inf 97.1%
Taylor expanded in x1 around inf 97.0%
Final simplification97.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1)))
(t_3 (- (* 2.0 x2) 3.0))
(t_4 (* 6.0 t_3)))
(if (<= x1 -4.5e+153)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -4.5e+77)
(+
x1
(+
t_2
(+
x1
(*
x1
(+
t_4
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_4 (* 6.0 (+ 3.0 (* x2 -2.0)))) 6.0))))
12.0)))))))
(if (<= x1 210000000.0)
(+
x1
(+
(* x2 -6.0)
(+
(* x1 (- (* x1 9.0) 2.0))
(* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(if (<= x1 4e+102)
(+
x1
(+
t_2
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (- (* 2.0 x2) x1))
(*
t_1
(+
(*
(* x1 x1)
(- (* 4.0 (/ (- (+ (* 2.0 x2) t_0) x1) t_1)) 6.0))
(* (* 3.0 (* x1 2.0)) (/ -1.0 x1)))))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 t_3))
(* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))))
2.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1);
double t_3 = (2.0 * x2) - 3.0;
double t_4 = 6.0 * t_3;
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -4.5e+77) {
tmp = x1 + (t_2 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 210000000.0) {
tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else if (x1 <= 4e+102) {
tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * ((4.0 * ((((2.0 * x2) + t_0) - x1) / t_1)) - 6.0)) + ((3.0 * (x1 * 2.0)) * (-1.0 / x1))))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_3)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 1.0d0 + (x1 * x1)
t_2 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)
t_3 = (2.0d0 * x2) - 3.0d0
t_4 = 6.0d0 * t_3
if (x1 <= (-4.5d+153)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-4.5d+77)) then
tmp = x1 + (t_2 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_4 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 6.0d0)))) - 12.0d0))))))
else if (x1 <= 210000000.0d0) then
tmp = x1 + ((x2 * (-6.0d0)) + ((x1 * ((x1 * 9.0d0) - 2.0d0)) + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else if (x1 <= 4d+102) then
tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0d0 * x2) - x1)) + (t_1 * (((x1 * x1) * ((4.0d0 * ((((2.0d0 * x2) + t_0) - x1) / t_1)) - 6.0d0)) + ((3.0d0 * (x1 * 2.0d0)) * ((-1.0d0) / x1))))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * t_3)) + (x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0))))))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1);
double t_3 = (2.0 * x2) - 3.0;
double t_4 = 6.0 * t_3;
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -4.5e+77) {
tmp = x1 + (t_2 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 210000000.0) {
tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else if (x1 <= 4e+102) {
tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * ((4.0 * ((((2.0 * x2) + t_0) - x1) / t_1)) - 6.0)) + ((3.0 * (x1 * 2.0)) * (-1.0 / x1))))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_3)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 1.0 + (x1 * x1) t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1) t_3 = (2.0 * x2) - 3.0 t_4 = 6.0 * t_3 tmp = 0 if x1 <= -4.5e+153: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -4.5e+77: tmp = x1 + (t_2 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))) elif x1 <= 210000000.0: tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) elif x1 <= 4e+102: tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * ((4.0 * ((((2.0 * x2) + t_0) - x1) / t_1)) - 6.0)) + ((3.0 * (x1 * 2.0)) * (-1.0 / x1)))))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_3)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(1.0 + Float64(x1 * x1)) t_2 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) t_3 = Float64(Float64(2.0 * x2) - 3.0) t_4 = Float64(6.0 * t_3) tmp = 0.0 if (x1 <= -4.5e+153) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -4.5e+77) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(x1 * Float64(t_4 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_4 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 6.0)))) - 12.0))))))); elseif (x1 <= 210000000.0) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); elseif (x1 <= 4e+102) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(2.0 * x2) - x1)) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(Float64(Float64(2.0 * x2) + t_0) - x1) / t_1)) - 6.0)) + Float64(Float64(3.0 * Float64(x1 * 2.0)) * Float64(-1.0 / x1))))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * t_3)) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0)))))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = 1.0 + (x1 * x1); t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1); t_3 = (2.0 * x2) - 3.0; t_4 = 6.0 * t_3; tmp = 0.0; if (x1 <= -4.5e+153) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -4.5e+77) tmp = x1 + (t_2 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))); elseif (x1 <= 210000000.0) tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); elseif (x1 <= 4e+102) tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * ((4.0 * ((((2.0 * x2) + t_0) - x1) / t_1)) - 6.0)) + ((3.0 * (x1 * 2.0)) * (-1.0 / x1)))))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_3)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$4 = N[(6.0 * t$95$3), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.5e+77], N[(x1 + N[(t$95$2 + N[(x1 + N[(x1 * N[(t$95$4 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$4 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 210000000.0], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e+102], N[(x1 + N[(t$95$2 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 1 + x1 \cdot x1\\
t_2 := 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := 2 \cdot x2 - 3\\
t_4 := 6 \cdot t\_3\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -4.5 \cdot 10^{+77}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + x1 \cdot \left(t\_4 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_4 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 6\right)\right)\right) - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 210000000:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 \cdot \left(x1 \cdot 9 - 2\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot \left(2 \cdot x2 - x1\right) + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(2 \cdot x2 + t\_0\right) - x1}{t\_1} - 6\right) + \left(3 \cdot \left(x1 \cdot 2\right)\right) \cdot \frac{-1}{x1}\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.0%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -4.50000000000000024e77Initial program 25.0%
Taylor expanded in x1 around inf 25.0%
Taylor expanded in x1 around 0 82.4%
if -4.50000000000000024e77 < x1 < 2.1e8Initial program 99.4%
Taylor expanded in x1 around 0 82.4%
Taylor expanded in x1 around 0 81.5%
Taylor expanded in x2 around 0 93.7%
if 2.1e8 < x1 < 3.99999999999999991e102Initial program 99.3%
Taylor expanded in x1 around inf 99.3%
Taylor expanded in x1 around 0 97.1%
+-commutative92.5%
mul-1-neg92.5%
sub-neg92.5%
Simplified97.1%
Taylor expanded in x1 around inf 97.1%
if 3.99999999999999991e102 < x1 Initial program 26.0%
Taylor expanded in x1 around 0 12.7%
Taylor expanded in x1 around 0 96.0%
Final simplification94.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1)))
(t_3 (- (* 2.0 x2) 3.0))
(t_4 (* 6.0 t_3)))
(if (<= x1 -4.5e+153)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -6.6e+77)
(+
x1
(+
t_2
(+
x1
(*
x1
(+
t_4
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_4 (* 6.0 (+ 3.0 (* x2 -2.0)))) 6.0))))
12.0)))))))
(if (<= x1 170000.0)
(+
x1
(+
(* x2 -6.0)
(+
(* x1 (- (* x1 9.0) 2.0))
(* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(if (<= x1 4e+102)
(+
x1
(+
t_2
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (- (* 2.0 x2) x1))
(*
t_1
(+
(* (* x1 x1) 6.0)
(*
(- (/ (- (+ (* 2.0 x2) t_0) x1) t_1) 3.0)
(* 3.0 (* x1 2.0))))))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 t_3))
(* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))))
2.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1);
double t_3 = (2.0 * x2) - 3.0;
double t_4 = 6.0 * t_3;
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -6.6e+77) {
tmp = x1 + (t_2 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 170000.0) {
tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else if (x1 <= 4e+102) {
tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * 6.0) + ((((((2.0 * x2) + t_0) - x1) / t_1) - 3.0) * (3.0 * (x1 * 2.0)))))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_3)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 1.0d0 + (x1 * x1)
t_2 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)
t_3 = (2.0d0 * x2) - 3.0d0
t_4 = 6.0d0 * t_3
if (x1 <= (-4.5d+153)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-6.6d+77)) then
tmp = x1 + (t_2 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_4 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 6.0d0)))) - 12.0d0))))))
else if (x1 <= 170000.0d0) then
tmp = x1 + ((x2 * (-6.0d0)) + ((x1 * ((x1 * 9.0d0) - 2.0d0)) + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else if (x1 <= 4d+102) then
tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0d0 * x2) - x1)) + (t_1 * (((x1 * x1) * 6.0d0) + ((((((2.0d0 * x2) + t_0) - x1) / t_1) - 3.0d0) * (3.0d0 * (x1 * 2.0d0)))))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * t_3)) + (x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0))))))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1);
double t_3 = (2.0 * x2) - 3.0;
double t_4 = 6.0 * t_3;
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -6.6e+77) {
tmp = x1 + (t_2 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 170000.0) {
tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else if (x1 <= 4e+102) {
tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * 6.0) + ((((((2.0 * x2) + t_0) - x1) / t_1) - 3.0) * (3.0 * (x1 * 2.0)))))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_3)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 1.0 + (x1 * x1) t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1) t_3 = (2.0 * x2) - 3.0 t_4 = 6.0 * t_3 tmp = 0 if x1 <= -4.5e+153: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -6.6e+77: tmp = x1 + (t_2 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))) elif x1 <= 170000.0: tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) elif x1 <= 4e+102: tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * 6.0) + ((((((2.0 * x2) + t_0) - x1) / t_1) - 3.0) * (3.0 * (x1 * 2.0))))))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_3)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(1.0 + Float64(x1 * x1)) t_2 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) t_3 = Float64(Float64(2.0 * x2) - 3.0) t_4 = Float64(6.0 * t_3) tmp = 0.0 if (x1 <= -4.5e+153) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -6.6e+77) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(x1 * Float64(t_4 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_4 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 6.0)))) - 12.0))))))); elseif (x1 <= 170000.0) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); elseif (x1 <= 4e+102) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(2.0 * x2) - x1)) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x2) + t_0) - x1) / t_1) - 3.0) * Float64(3.0 * Float64(x1 * 2.0)))))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * t_3)) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0)))))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = 1.0 + (x1 * x1); t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1); t_3 = (2.0 * x2) - 3.0; t_4 = 6.0 * t_3; tmp = 0.0; if (x1 <= -4.5e+153) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -6.6e+77) tmp = x1 + (t_2 + (x1 + (x1 * (t_4 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_4 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))); elseif (x1 <= 170000.0) tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); elseif (x1 <= 4e+102) tmp = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * 6.0) + ((((((2.0 * x2) + t_0) - x1) / t_1) - 3.0) * (3.0 * (x1 * 2.0))))))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_3)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$4 = N[(6.0 * t$95$3), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -6.6e+77], N[(x1 + N[(t$95$2 + N[(x1 + N[(x1 * N[(t$95$4 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$4 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 170000.0], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e+102], N[(x1 + N[(t$95$2 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(N[(N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision] - 3.0), $MachinePrecision] * N[(3.0 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 1 + x1 \cdot x1\\
t_2 := 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := 2 \cdot x2 - 3\\
t_4 := 6 \cdot t\_3\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -6.6 \cdot 10^{+77}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + x1 \cdot \left(t\_4 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_4 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 6\right)\right)\right) - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 170000:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 \cdot \left(x1 \cdot 9 - 2\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot \left(2 \cdot x2 - x1\right) + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(\frac{\left(2 \cdot x2 + t\_0\right) - x1}{t\_1} - 3\right) \cdot \left(3 \cdot \left(x1 \cdot 2\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.0%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -6.5999999999999996e77Initial program 25.0%
Taylor expanded in x1 around inf 25.0%
Taylor expanded in x1 around 0 82.4%
if -6.5999999999999996e77 < x1 < 1.7e5Initial program 99.4%
Taylor expanded in x1 around 0 82.4%
Taylor expanded in x1 around 0 81.5%
Taylor expanded in x2 around 0 93.7%
if 1.7e5 < x1 < 3.99999999999999991e102Initial program 99.3%
Taylor expanded in x1 around inf 87.6%
Taylor expanded in x1 around 0 92.5%
+-commutative92.5%
mul-1-neg92.5%
sub-neg92.5%
Simplified92.5%
Taylor expanded in x1 around inf 92.5%
if 3.99999999999999991e102 < x1 Initial program 26.0%
Taylor expanded in x1 around 0 12.7%
Taylor expanded in x1 around 0 96.0%
Final simplification94.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ 1.0 (* x1 x1)))
(t_3 (* 6.0 t_0))
(t_4 (/ (- (+ (* 2.0 x2) t_1) x1) t_2)))
(if (<= x1 -4.5e+153)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -1.02e+98)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(*
x1
(+
t_3
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_3 (* 6.0 (+ 3.0 (* x2 -2.0)))) 6.0))))
12.0)))))))
(if (<= x1 4e+102)
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 (+ (* (* (* x1 2.0) t_4) (- t_4 3.0)) (* (* x1 x1) 6.0)))
(* t_1 (- (* 2.0 x2) x1)))))
(* 3.0 (- (* x2 -2.0) x1))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 t_0))
(* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))))
2.0)))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = 1.0 + (x1 * x1);
double t_3 = 6.0 * t_0;
double t_4 = (((2.0 * x2) + t_1) - x1) / t_2;
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -1.02e+98) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_3 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 4e+102) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * ((2.0 * x2) - x1))))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_0)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = 1.0d0 + (x1 * x1)
t_3 = 6.0d0 * t_0
t_4 = (((2.0d0 * x2) + t_1) - x1) / t_2
if (x1 <= (-4.5d+153)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-1.02d+98)) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_3 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 6.0d0)))) - 12.0d0))))))
else if (x1 <= 4d+102) then
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + ((x1 * x1) * 6.0d0))) + (t_1 * ((2.0d0 * x2) - x1))))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * t_0)) + (x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0))))))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = 1.0 + (x1 * x1);
double t_3 = 6.0 * t_0;
double t_4 = (((2.0 * x2) + t_1) - x1) / t_2;
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -1.02e+98) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_3 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 4e+102) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * ((2.0 * x2) - x1))))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_0)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = x1 * (x1 * 3.0) t_2 = 1.0 + (x1 * x1) t_3 = 6.0 * t_0 t_4 = (((2.0 * x2) + t_1) - x1) / t_2 tmp = 0 if x1 <= -4.5e+153: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -1.02e+98: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_3 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))) elif x1 <= 4e+102: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * ((2.0 * x2) - x1))))) + (3.0 * ((x2 * -2.0) - x1))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_0)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(1.0 + Float64(x1 * x1)) t_3 = Float64(6.0 * t_0) t_4 = Float64(Float64(Float64(Float64(2.0 * x2) + t_1) - x1) / t_2) tmp = 0.0 if (x1 <= -4.5e+153) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -1.02e+98) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(x1 * Float64(t_3 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_3 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 6.0)))) - 12.0))))))); elseif (x1 <= 4e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * 6.0))) + Float64(t_1 * Float64(Float64(2.0 * x2) - x1))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * t_0)) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0)))))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = x1 * (x1 * 3.0); t_2 = 1.0 + (x1 * x1); t_3 = 6.0 * t_0; t_4 = (((2.0 * x2) + t_1) - x1) / t_2; tmp = 0.0; if (x1 <= -4.5e+153) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -1.02e+98) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (x1 * (t_3 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_3 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))); elseif (x1 <= 4e+102) tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0))) + (t_1 * ((2.0 * x2) - x1))))) + (3.0 * ((x2 * -2.0) - x1))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * t_0)) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.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[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(6.0 * t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.02e+98], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(t$95$3 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$3 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e+102], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 1 + x1 \cdot x1\\
t_3 := 6 \cdot t\_0\\
t_4 := \frac{\left(2 \cdot x2 + t\_1\right) - x1}{t\_2}\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.02 \cdot 10^{+98}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2} + \left(x1 + x1 \cdot \left(t\_3 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_3 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 6\right)\right)\right) - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right) + t\_1 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot t\_0\right) + x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.0%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -1.02000000000000007e98Initial program 7.7%
Taylor expanded in x1 around inf 7.7%
Taylor expanded in x1 around 0 92.3%
if -1.02000000000000007e98 < x1 < 3.99999999999999991e102Initial program 99.4%
Taylor expanded in x1 around inf 96.8%
Taylor expanded in x1 around 0 95.0%
+-commutative95.0%
mul-1-neg95.0%
sub-neg95.0%
Simplified95.0%
Taylor expanded in x1 around 0 95.0%
mul-1-neg95.0%
unsub-neg95.0%
*-commutative95.0%
Simplified95.0%
if 3.99999999999999991e102 < x1 Initial program 26.0%
Taylor expanded in x1 around 0 12.7%
Taylor expanded in x1 around 0 96.0%
Final simplification95.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0)) (t_1 (* 6.0 t_0)))
(if (<= x1 -4.5e+153)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -9.5e+77)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ 1.0 (* x1 x1))))
(+
x1
(*
x1
(+
t_1
(*
x1
(-
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_1 (* 6.0 (+ 3.0 (* x2 -2.0)))) 6.0))))
12.0)))))))
(if (<= x1 1e-16)
(+
x1
(+
(* x2 -6.0)
(+
(* x1 (- (* x1 9.0) 2.0))
(* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(+
x1
(+
(+ x1 (* 4.0 (* x1 (* x2 t_0))))
(*
3.0
(+
(* x2 -2.0)
(* x1 (+ -1.0 (* x1 (- (+ x1 3.0) (* x2 -2.0))))))))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 6.0 * t_0;
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -9.5e+77) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 1e-16) {
tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * t_0)))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = 6.0d0 * t_0
if (x1 <= (-4.5d+153)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-9.5d+77)) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / (1.0d0 + (x1 * x1)))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_1 + (6.0d0 * (3.0d0 + (x2 * (-2.0d0))))) - 6.0d0)))) - 12.0d0))))))
else if (x1 <= 1d-16) then
tmp = x1 + ((x2 * (-6.0d0)) + ((x1 * ((x1 * 9.0d0) - 2.0d0)) + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else
tmp = x1 + ((x1 + (4.0d0 * (x1 * (x2 * t_0)))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x1 * ((x1 + 3.0d0) - (x2 * (-2.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 6.0 * t_0;
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -9.5e+77) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0))))));
} else if (x1 <= 1e-16) {
tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * t_0)))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = 6.0 * t_0 tmp = 0 if x1 <= -4.5e+153: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -9.5e+77: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))) elif x1 <= 1e-16: tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) else: tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * t_0)))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0)))))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(6.0 * t_0) tmp = 0.0 if (x1 <= -4.5e+153) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -9.5e+77) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(1.0 + Float64(x1 * x1)))) + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(6.0 * Float64(3.0 + Float64(x2 * -2.0)))) - 6.0)))) - 12.0))))))); elseif (x1 <= 1e-16) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * t_0)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(Float64(x1 + 3.0) - Float64(x2 * -2.0))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = 6.0 * t_0; tmp = 0.0; if (x1 <= -4.5e+153) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -9.5e+77) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (x1 * (t_1 + (x1 * (((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (6.0 * (3.0 + (x2 * -2.0)))) - 6.0)))) - 12.0)))))); elseif (x1 <= 1e-16) tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); else tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * t_0)))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * t$95$0), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -9.5e+77], 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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(6.0 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e-16], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(N[(x1 + 3.0), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := 6 \cdot t\_0\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -9.5 \cdot 10^{+77}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(\left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + 6 \cdot \left(3 + x2 \cdot -2\right)\right) - 6\right)\right)\right) - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{-16}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 \cdot \left(x1 \cdot 9 - 2\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot t\_0\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 + x1 \cdot \left(\left(x1 + 3\right) - x2 \cdot -2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.0%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -9.4999999999999998e77Initial program 25.0%
Taylor expanded in x1 around inf 25.0%
Taylor expanded in x1 around 0 82.4%
if -9.4999999999999998e77 < x1 < 9.9999999999999998e-17Initial program 99.5%
Taylor expanded in x1 around 0 82.9%
Taylor expanded in x1 around 0 82.0%
Taylor expanded in x2 around 0 94.9%
if 9.9999999999999998e-17 < x1 Initial program 52.3%
Taylor expanded in x1 around 0 20.7%
Taylor expanded in x1 around 0 74.7%
Final simplification88.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 3.0 (* x2 (+ (* x1 2.0) (* 3.0 (/ x1 x2)))))
(* 4.0 (* x2 -3.0)))
2.0))))))
(if (<= x1 -5.5e+157)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -8.5e+76)
t_0
(if (<= x1 850000000.0)
(+
x1
(+ (* x2 (- (+ (* 8.0 (* x1 x2)) (* x1 -12.0)) 6.0)) (* x1 -2.0)))
(if (<= x1 1.85e+152)
t_0
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * (((3.0 * (x2 * ((x1 * 2.0) + (3.0 * (x1 / x2))))) + (4.0 * (x2 * -3.0))) - 2.0)));
double tmp;
if (x1 <= -5.5e+157) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -8.5e+76) {
tmp = t_0;
} else if (x1 <= 850000000.0) {
tmp = x1 + ((x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0)) + (x1 * -2.0));
} else if (x1 <= 1.85e+152) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 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 * (((3.0d0 * (x2 * ((x1 * 2.0d0) + (3.0d0 * (x1 / x2))))) + (4.0d0 * (x2 * (-3.0d0)))) - 2.0d0)))
if (x1 <= (-5.5d+157)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= (-8.5d+76)) then
tmp = t_0
else if (x1 <= 850000000.0d0) then
tmp = x1 + ((x2 * (((8.0d0 * (x1 * x2)) + (x1 * (-12.0d0))) - 6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 1.85d+152) then
tmp = t_0
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 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 * (((3.0 * (x2 * ((x1 * 2.0) + (3.0 * (x1 / x2))))) + (4.0 * (x2 * -3.0))) - 2.0)));
double tmp;
if (x1 <= -5.5e+157) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= -8.5e+76) {
tmp = t_0;
} else if (x1 <= 850000000.0) {
tmp = x1 + ((x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0)) + (x1 * -2.0));
} else if (x1 <= 1.85e+152) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * (((3.0 * (x2 * ((x1 * 2.0) + (3.0 * (x1 / x2))))) + (4.0 * (x2 * -3.0))) - 2.0))) tmp = 0 if x1 <= -5.5e+157: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= -8.5e+76: tmp = t_0 elif x1 <= 850000000.0: tmp = x1 + ((x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0)) + (x1 * -2.0)) elif x1 <= 1.85e+152: tmp = t_0 else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(3.0 * Float64(x2 * Float64(Float64(x1 * 2.0) + Float64(3.0 * Float64(x1 / x2))))) + Float64(4.0 * Float64(x2 * -3.0))) - 2.0)))) tmp = 0.0 if (x1 <= -5.5e+157) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= -8.5e+76) tmp = t_0; elseif (x1 <= 850000000.0) tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * -12.0)) - 6.0)) + Float64(x1 * -2.0))); elseif (x1 <= 1.85e+152) tmp = t_0; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * (((3.0 * (x2 * ((x1 * 2.0) + (3.0 * (x1 / x2))))) + (4.0 * (x2 * -3.0))) - 2.0))); tmp = 0.0; if (x1 <= -5.5e+157) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= -8.5e+76) tmp = t_0; elseif (x1 <= 850000000.0) tmp = x1 + ((x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0)) + (x1 * -2.0)); elseif (x1 <= 1.85e+152) tmp = t_0; else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 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[(N[(3.0 * N[(x2 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+157], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -8.5e+76], t$95$0, If[LessEqual[x1, 850000000.0], N[(x1 + N[(N[(x2 * N[(N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * -12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.85e+152], t$95$0, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(3 \cdot \left(x2 \cdot \left(x1 \cdot 2 + 3 \cdot \frac{x1}{x2}\right)\right) + 4 \cdot \left(x2 \cdot -3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+157}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -8.5 \cdot 10^{+76}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 850000000:\\
\;\;\;\;x1 + \left(x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot -12\right) - 6\right) + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 1.85 \cdot 10^{+152}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.5000000000000003e157Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.7%
Taylor expanded in x2 around 0 100.0%
if -5.5000000000000003e157 < x1 < -8.49999999999999992e76 or 8.5e8 < x1 < 1.84999999999999998e152Initial program 71.7%
Taylor expanded in x1 around 0 20.5%
Taylor expanded in x1 around 0 27.6%
Taylor expanded in x2 around inf 40.6%
Taylor expanded in x2 around 0 46.6%
*-commutative46.6%
Simplified46.6%
if -8.49999999999999992e76 < x1 < 8.5e8Initial program 99.4%
Taylor expanded in x1 around 0 82.4%
Taylor expanded in x1 around 0 82.1%
Taylor expanded in x2 around 0 92.9%
if 1.84999999999999998e152 < x1 Initial program 2.6%
Taylor expanded in x1 around 0 2.6%
Taylor expanded in x1 around 0 81.6%
Taylor expanded in x2 around 0 97.7%
*-commutative97.7%
Simplified97.7%
Final simplification85.3%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -5.5e+157)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 1e-16)
(+
x1
(+
(* x2 -6.0)
(+
(* x1 (- (* x1 9.0) 2.0))
(* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(+
x1
(+
(+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
(*
3.0
(+ (* x2 -2.0) (* x1 (+ -1.0 (* x1 (- (+ x1 3.0) (* x2 -2.0))))))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -5.5e+157) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 1e-16) {
tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-5.5d+157)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= 1d-16) then
tmp = x1 + ((x2 * (-6.0d0)) + ((x1 * ((x1 * 9.0d0) - 2.0d0)) + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else
tmp = x1 + ((x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x1 * ((x1 + 3.0d0) - (x2 * (-2.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -5.5e+157) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 1e-16) {
tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -5.5e+157: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= 1e-16: tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) else: tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0)))))))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -5.5e+157) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= 1e-16) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(Float64(x1 + 3.0) - Float64(x2 * -2.0))))))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -5.5e+157) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= 1e-16) tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); else tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -5.5e+157], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e-16], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(N[(x1 + 3.0), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+157}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{-16}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 \cdot \left(x1 \cdot 9 - 2\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 + x1 \cdot \left(\left(x1 + 3\right) - x2 \cdot -2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.5000000000000003e157Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.7%
Taylor expanded in x2 around 0 100.0%
if -5.5000000000000003e157 < x1 < 9.9999999999999998e-17Initial program 90.2%
Taylor expanded in x1 around 0 73.7%
Taylor expanded in x1 around 0 76.4%
Taylor expanded in x2 around 0 87.8%
if 9.9999999999999998e-17 < x1 Initial program 52.3%
Taylor expanded in x1 around 0 20.7%
Taylor expanded in x1 around 0 74.7%
Final simplification85.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (- (* x1 9.0) 2.0))))
(if (<= x1 -5.5e+157)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 1.35e+70)
(+
x1
(+
(* x2 -6.0)
(+ t_0 (* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(if (<= x1 1.85e+152)
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 3.0 (* x2 (+ (* x1 2.0) (* 3.0 (/ x1 x2)))))
(* 4.0 (* x2 -3.0)))
2.0))))
(+ x1 (+ (* x2 -6.0) t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -5.5e+157) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 1.35e+70) {
tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else if (x1 <= 1.85e+152) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((3.0 * (x2 * ((x1 * 2.0) + (3.0 * (x1 / x2))))) + (4.0 * (x2 * -3.0))) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + t_0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 * ((x1 * 9.0d0) - 2.0d0)
if (x1 <= (-5.5d+157)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= 1.35d+70) then
tmp = x1 + ((x2 * (-6.0d0)) + (t_0 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else if (x1 <= 1.85d+152) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((3.0d0 * (x2 * ((x1 * 2.0d0) + (3.0d0 * (x1 / x2))))) + (4.0d0 * (x2 * (-3.0d0)))) - 2.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + t_0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * 9.0) - 2.0);
double tmp;
if (x1 <= -5.5e+157) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 1.35e+70) {
tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else if (x1 <= 1.85e+152) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((3.0 * (x2 * ((x1 * 2.0) + (3.0 * (x1 / x2))))) + (4.0 * (x2 * -3.0))) - 2.0)));
} else {
tmp = x1 + ((x2 * -6.0) + t_0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * 9.0) - 2.0) tmp = 0 if x1 <= -5.5e+157: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= 1.35e+70: tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) elif x1 <= 1.85e+152: tmp = x1 + ((x2 * -6.0) + (x1 * (((3.0 * (x2 * ((x1 * 2.0) + (3.0 * (x1 / x2))))) + (4.0 * (x2 * -3.0))) - 2.0))) else: tmp = x1 + ((x2 * -6.0) + t_0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) tmp = 0.0 if (x1 <= -5.5e+157) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= 1.35e+70) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); elseif (x1 <= 1.85e+152) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(3.0 * Float64(x2 * Float64(Float64(x1 * 2.0) + Float64(3.0 * Float64(x1 / x2))))) + Float64(4.0 * Float64(x2 * -3.0))) - 2.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + t_0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * 9.0) - 2.0); tmp = 0.0; if (x1 <= -5.5e+157) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= 1.35e+70) tmp = x1 + ((x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); elseif (x1 <= 1.85e+152) tmp = x1 + ((x2 * -6.0) + (x1 * (((3.0 * (x2 * ((x1 * 2.0) + (3.0 * (x1 / x2))))) + (4.0 * (x2 * -3.0))) - 2.0))); else tmp = x1 + ((x2 * -6.0) + t_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]}, If[LessEqual[x1, -5.5e+157], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+70], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.85e+152], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(3.0 * N[(x2 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9 - 2\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+157}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+70}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.85 \cdot 10^{+152}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(3 \cdot \left(x2 \cdot \left(x1 \cdot 2 + 3 \cdot \frac{x1}{x2}\right)\right) + 4 \cdot \left(x2 \cdot -3\right)\right) - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_0\right)\\
\end{array}
\end{array}
if x1 < -5.5000000000000003e157Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.7%
Taylor expanded in x2 around 0 100.0%
if -5.5000000000000003e157 < x1 < 1.35e70Initial program 91.2%
Taylor expanded in x1 around 0 70.0%
Taylor expanded in x1 around 0 72.5%
Taylor expanded in x2 around 0 82.5%
if 1.35e70 < x1 < 1.84999999999999998e152Initial program 99.9%
Taylor expanded in x1 around 0 32.8%
Taylor expanded in x1 around 0 23.3%
Taylor expanded in x2 around inf 51.4%
Taylor expanded in x2 around 0 56.4%
*-commutative56.4%
Simplified56.4%
if 1.84999999999999998e152 < x1 Initial program 2.6%
Taylor expanded in x1 around 0 2.6%
Taylor expanded in x1 around 0 81.6%
Taylor expanded in x2 around 0 97.7%
*-commutative97.7%
Simplified97.7%
Final simplification84.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0)))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -3e+95)
t_1
(if (<= x1 -1.1e-131)
t_0
(if (<= x1 1.02e-175)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 6.8e+72)
t_0
(if (<= x1 1.4e+112)
(* x2 (- (/ x1 x2) 6.0))
(if (<= x1 4.5e+153) t_0 t_1))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -3e+95) {
tmp = t_1;
} else if (x1 <= -1.1e-131) {
tmp = t_0;
} else if (x1 <= 1.02e-175) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 6.8e+72) {
tmp = t_0;
} else if (x1 <= 1.4e+112) {
tmp = x2 * ((x1 / x2) - 6.0);
} else if (x1 <= 4.5e+153) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-3d+95)) then
tmp = t_1
else if (x1 <= (-1.1d-131)) then
tmp = t_0
else if (x1 <= 1.02d-175) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 6.8d+72) then
tmp = t_0
else if (x1 <= 1.4d+112) then
tmp = x2 * ((x1 / x2) - 6.0d0)
else if (x1 <= 4.5d+153) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -3e+95) {
tmp = t_1;
} else if (x1 <= -1.1e-131) {
tmp = t_0;
} else if (x1 <= 1.02e-175) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 6.8e+72) {
tmp = t_0;
} else if (x1 <= 1.4e+112) {
tmp = x2 * ((x1 / x2) - 6.0);
} else if (x1 <= 4.5e+153) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -3e+95: tmp = t_1 elif x1 <= -1.1e-131: tmp = t_0 elif x1 <= 1.02e-175: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 6.8e+72: tmp = t_0 elif x1 <= 1.4e+112: tmp = x2 * ((x1 / x2) - 6.0) elif x1 <= 4.5e+153: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -3e+95) tmp = t_1; elseif (x1 <= -1.1e-131) tmp = t_0; elseif (x1 <= 1.02e-175) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 6.8e+72) tmp = t_0; elseif (x1 <= 1.4e+112) tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); elseif (x1 <= 4.5e+153) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -3e+95) tmp = t_1; elseif (x1 <= -1.1e-131) tmp = t_0; elseif (x1 <= 1.02e-175) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 6.8e+72) tmp = t_0; elseif (x1 <= 1.4e+112) tmp = x2 * ((x1 / x2) - 6.0); elseif (x1 <= 4.5e+153) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3e+95], t$95$1, If[LessEqual[x1, -1.1e-131], t$95$0, If[LessEqual[x1, 1.02e-175], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.8e+72], t$95$0, If[LessEqual[x1, 1.4e+112], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -3 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -1.1 \cdot 10^{-131}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.02 \cdot 10^{-175}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 6.8 \cdot 10^{+72}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+112}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -2.99999999999999991e95 or 4.5000000000000001e153 < x1 Initial program 2.5%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 64.7%
Taylor expanded in x2 around 0 84.1%
if -2.99999999999999991e95 < x1 < -1.1e-131 or 1.0200000000000001e-175 < x1 < 6.7999999999999997e72 or 1.4000000000000001e112 < x1 < 4.5000000000000001e153Initial program 99.2%
Taylor expanded in x1 around 0 74.6%
Taylor expanded in x1 around 0 73.6%
Taylor expanded in x1 around inf 65.6%
if -1.1e-131 < x1 < 1.0200000000000001e-175Initial program 99.8%
Taylor expanded in x1 around 0 77.7%
Taylor expanded in x1 around 0 77.8%
Taylor expanded in x2 around 0 77.4%
*-commutative77.4%
Simplified77.4%
if 6.7999999999999997e72 < x1 < 1.4000000000000001e112Initial program 100.0%
Taylor expanded in x1 around 0 3.5%
Taylor expanded in x1 around 0 3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x2 around inf 52.3%
Final simplification73.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -5.5e+157)
(+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 1e-16)
(+
x1
(+
(* x2 -6.0)
(+
(* x1 (- (* x1 9.0) 2.0))
(* x2 (+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 6.0) 12.0)))))))
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+
(* 4.0 (* x2 (- (* 2.0 x2) 3.0)))
(* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))))
2.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -5.5e+157) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 1e-16) {
tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-5.5d+157)) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
else if (x1 <= 1d-16) then
tmp = x1 + ((x2 * (-6.0d0)) + ((x1 * ((x1 * 9.0d0) - 2.0d0)) + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * 6.0d0) - 12.0d0))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0))))))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -5.5e+157) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else if (x1 <= 1e-16) {
tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -5.5e+157: tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) elif x1 <= 1e-16: tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -5.5e+157) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))); elseif (x1 <= 1e-16) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)) + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 12.0))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0)))))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -5.5e+157) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); elseif (x1 <= 1e-16) tmp = x1 + ((x2 * -6.0) + ((x1 * ((x1 * 9.0) - 2.0)) + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * 6.0) - 12.0)))))); else tmp = x1 + ((x2 * -6.0) + (x1 * (((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0)))))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -5.5e+157], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e-16], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+157}:\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{-16}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 \cdot \left(x1 \cdot 9 - 2\right) + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot 6 - 12\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -5.5000000000000003e157Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.7%
Taylor expanded in x2 around 0 100.0%
if -5.5000000000000003e157 < x1 < 9.9999999999999998e-17Initial program 90.2%
Taylor expanded in x1 around 0 73.7%
Taylor expanded in x1 around 0 76.4%
Taylor expanded in x2 around 0 87.8%
if 9.9999999999999998e-17 < x1 Initial program 52.3%
Taylor expanded in x1 around 0 20.7%
Taylor expanded in x1 around 0 74.7%
Final simplification85.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x2 -6.0) (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0))))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -5.5e+157)
t_1
(if (<= x1 -1.15e+78)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 (+ (* x2 6.0) 9.0)) 2.0))))
(if (<= x1 -1.2e-256)
t_0
(if (<= x1 2.5e-265)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 4.5e+153) t_0 t_1)))))))
double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -5.5e+157) {
tmp = t_1;
} else if (x1 <= -1.15e+78) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x2 * 6.0) + 9.0)) - 2.0)));
} else if (x1 <= -1.2e-256) {
tmp = t_0;
} else if (x1 <= 2.5e-265) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 4.5e+153) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0)))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-5.5d+157)) then
tmp = t_1
else if (x1 <= (-1.15d+78)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * ((x2 * 6.0d0) + 9.0d0)) - 2.0d0)))
else if (x1 <= (-1.2d-256)) then
tmp = t_0
else if (x1 <= 2.5d-265) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 4.5d+153) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -5.5e+157) {
tmp = t_1;
} else if (x1 <= -1.15e+78) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x2 * 6.0) + 9.0)) - 2.0)));
} else if (x1 <= -1.2e-256) {
tmp = t_0;
} else if (x1 <= 2.5e-265) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 4.5e+153) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -5.5e+157: tmp = t_1 elif x1 <= -1.15e+78: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x2 * 6.0) + 9.0)) - 2.0))) elif x1 <= -1.2e-256: tmp = t_0 elif x1 <= 2.5e-265: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 4.5e+153: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0))) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -5.5e+157) tmp = t_1; elseif (x1 <= -1.15e+78) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * 6.0) + 9.0)) - 2.0)))); elseif (x1 <= -1.2e-256) tmp = t_0; elseif (x1 <= 2.5e-265) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 4.5e+153) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -5.5e+157) tmp = t_1; elseif (x1 <= -1.15e+78) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x2 * 6.0) + 9.0)) - 2.0))); elseif (x1 <= -1.2e-256) tmp = t_0; elseif (x1 <= 2.5e-265) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 4.5e+153) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = 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] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+157], t$95$1, If[LessEqual[x1, -1.15e+78], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x2 * 6.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.2e-256], t$95$0, If[LessEqual[x1, 2.5e-265], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], t$95$0, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -1.15 \cdot 10^{+78}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(x2 \cdot 6 + 9\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq -1.2 \cdot 10^{-256}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 2.5 \cdot 10^{-265}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -5.5000000000000003e157 or 4.5000000000000001e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 73.8%
Taylor expanded in x2 around 0 100.0%
if -5.5000000000000003e157 < x1 < -1.1500000000000001e78Initial program 22.2%
Taylor expanded in x1 around 0 5.7%
Taylor expanded in x1 around 0 35.5%
Taylor expanded in x1 around inf 47.1%
associate-*r*47.1%
*-commutative47.1%
associate-*r*47.1%
cancel-sign-sub-inv47.1%
metadata-eval47.1%
distribute-lft-in47.1%
metadata-eval47.1%
metadata-eval47.1%
distribute-lft-neg-in47.1%
distribute-rgt-neg-in47.1%
associate-*r*47.1%
metadata-eval47.1%
*-commutative47.1%
distribute-rgt-neg-in47.1%
metadata-eval47.1%
Simplified47.1%
if -1.1500000000000001e78 < x1 < -1.2e-256 or 2.5e-265 < x1 < 4.5000000000000001e153Initial program 99.4%
Taylor expanded in x1 around 0 72.8%
Taylor expanded in x1 around 0 72.0%
Taylor expanded in x1 around 0 72.0%
if -1.2e-256 < x1 < 2.5e-265Initial program 99.9%
Taylor expanded in x1 around 0 70.9%
Taylor expanded in x1 around 0 71.1%
Taylor expanded in x2 around 0 98.8%
*-commutative98.8%
Simplified98.8%
Final simplification79.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -5.5e+157)
t_0
(if (<= x1 -1e+78)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 (+ (* x2 6.0) 9.0)) 2.0))))
(if (<= x1 1.8e+73)
(+
x1
(+ (* x2 (- (+ (* 8.0 (* x1 x2)) (* x1 -12.0)) 6.0)) (* x1 -2.0)))
(if (<= x1 6e+111)
(* x2 (- (/ x1 x2) 6.0))
(if (<= x1 4.5e+153)
(+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))
t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -5.5e+157) {
tmp = t_0;
} else if (x1 <= -1e+78) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x2 * 6.0) + 9.0)) - 2.0)));
} else if (x1 <= 1.8e+73) {
tmp = x1 + ((x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0)) + (x1 * -2.0));
} else if (x1 <= 6e+111) {
tmp = x2 * ((x1 / x2) - 6.0);
} else if (x1 <= 4.5e+153) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-5.5d+157)) then
tmp = t_0
else if (x1 <= (-1d+78)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * ((x2 * 6.0d0) + 9.0d0)) - 2.0d0)))
else if (x1 <= 1.8d+73) then
tmp = x1 + ((x2 * (((8.0d0 * (x1 * x2)) + (x1 * (-12.0d0))) - 6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 6d+111) then
tmp = x2 * ((x1 / x2) - 6.0d0)
else if (x1 <= 4.5d+153) then
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -5.5e+157) {
tmp = t_0;
} else if (x1 <= -1e+78) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x2 * 6.0) + 9.0)) - 2.0)));
} else if (x1 <= 1.8e+73) {
tmp = x1 + ((x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0)) + (x1 * -2.0));
} else if (x1 <= 6e+111) {
tmp = x2 * ((x1 / x2) - 6.0);
} else if (x1 <= 4.5e+153) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -5.5e+157: tmp = t_0 elif x1 <= -1e+78: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x2 * 6.0) + 9.0)) - 2.0))) elif x1 <= 1.8e+73: tmp = x1 + ((x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0)) + (x1 * -2.0)) elif x1 <= 6e+111: tmp = x2 * ((x1 / x2) - 6.0) elif x1 <= 4.5e+153: tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -5.5e+157) tmp = t_0; elseif (x1 <= -1e+78) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * 6.0) + 9.0)) - 2.0)))); elseif (x1 <= 1.8e+73) tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * -12.0)) - 6.0)) + Float64(x1 * -2.0))); elseif (x1 <= 6e+111) tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); elseif (x1 <= 4.5e+153) tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -5.5e+157) tmp = t_0; elseif (x1 <= -1e+78) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x2 * 6.0) + 9.0)) - 2.0))); elseif (x1 <= 1.8e+73) tmp = x1 + ((x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0)) + (x1 * -2.0)); elseif (x1 <= 6e+111) tmp = x2 * ((x1 / x2) - 6.0); elseif (x1 <= 4.5e+153) tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+157], t$95$0, If[LessEqual[x1, -1e+78], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x2 * 6.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e+73], N[(x1 + N[(N[(x2 * N[(N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * -12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6e+111], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], 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], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+157}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1 \cdot 10^{+78}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(x2 \cdot 6 + 9\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{+73}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot -12\right) - 6\right) + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 6 \cdot 10^{+111}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -5.5000000000000003e157 or 4.5000000000000001e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 73.8%
Taylor expanded in x2 around 0 100.0%
if -5.5000000000000003e157 < x1 < -1.00000000000000001e78Initial program 22.2%
Taylor expanded in x1 around 0 5.7%
Taylor expanded in x1 around 0 35.5%
Taylor expanded in x1 around inf 47.1%
associate-*r*47.1%
*-commutative47.1%
associate-*r*47.1%
cancel-sign-sub-inv47.1%
metadata-eval47.1%
distribute-lft-in47.1%
metadata-eval47.1%
metadata-eval47.1%
distribute-lft-neg-in47.1%
distribute-rgt-neg-in47.1%
associate-*r*47.1%
metadata-eval47.1%
*-commutative47.1%
distribute-rgt-neg-in47.1%
metadata-eval47.1%
Simplified47.1%
if -1.00000000000000001e78 < x1 < 1.7999999999999999e73Initial program 99.4%
Taylor expanded in x1 around 0 77.3%
Taylor expanded in x1 around 0 76.8%
Taylor expanded in x2 around 0 86.6%
if 1.7999999999999999e73 < x1 < 6e111Initial program 100.0%
Taylor expanded in x1 around 0 3.5%
Taylor expanded in x1 around 0 3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x2 around inf 52.3%
if 6e111 < x1 < 4.5000000000000001e153Initial program 100.0%
Taylor expanded in x1 around 0 56.8%
Taylor expanded in x1 around inf 56.8%
Final simplification84.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0))))
(if (<= x2 -2e+65)
t_0
(if (<= x2 4e-147)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))
(if (<= x2 2.35e+188)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 (+ (* x2 6.0) 9.0)) 2.0))))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
double tmp;
if (x2 <= -2e+65) {
tmp = t_0;
} else if (x2 <= 4e-147) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x2 <= 2.35e+188) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x2 * 6.0) + 9.0)) - 2.0)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))
if (x2 <= (-2d+65)) then
tmp = t_0
else if (x2 <= 4d-147) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
else if (x2 <= 2.35d+188) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * ((x2 * 6.0d0) + 9.0d0)) - 2.0d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
double tmp;
if (x2 <= -2e+65) {
tmp = t_0;
} else if (x2 <= 4e-147) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
} else if (x2 <= 2.35e+188) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x2 * 6.0) + 9.0)) - 2.0)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0) tmp = 0 if x2 <= -2e+65: tmp = t_0 elif x2 <= 4e-147: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) elif x2 <= 2.35e+188: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x2 * 6.0) + 9.0)) - 2.0))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)) tmp = 0.0 if (x2 <= -2e+65) tmp = t_0; elseif (x2 <= 4e-147) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); elseif (x2 <= 2.35e+188) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * 6.0) + 9.0)) - 2.0)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0); tmp = 0.0; if (x2 <= -2e+65) tmp = t_0; elseif (x2 <= 4e-147) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); elseif (x2 <= 2.35e+188) tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x2 * 6.0) + 9.0)) - 2.0))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -2e+65], t$95$0, If[LessEqual[x2, 4e-147], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 2.35e+188], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x2 * 6.0), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
\mathbf{if}\;x2 \leq -2 \cdot 10^{+65}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x2 \leq 4 \cdot 10^{-147}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\mathbf{elif}\;x2 \leq 2.35 \cdot 10^{+188}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(x2 \cdot 6 + 9\right) - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x2 < -2e65 or 2.3499999999999999e188 < x2 Initial program 78.1%
Taylor expanded in x1 around 0 56.3%
Taylor expanded in x1 around 0 67.9%
Taylor expanded in x1 around inf 65.9%
if -2e65 < x2 < 3.9999999999999999e-147Initial program 66.4%
Taylor expanded in x1 around 0 45.4%
Taylor expanded in x1 around 0 69.3%
Taylor expanded in x2 around 0 72.9%
*-commutative72.9%
Simplified72.9%
if 3.9999999999999999e-147 < x2 < 2.3499999999999999e188Initial program 62.5%
Taylor expanded in x1 around 0 47.8%
Taylor expanded in x1 around 0 81.6%
Taylor expanded in x1 around inf 78.6%
associate-*r*78.6%
*-commutative78.6%
associate-*r*78.6%
cancel-sign-sub-inv78.6%
metadata-eval78.6%
distribute-lft-in78.6%
metadata-eval78.6%
metadata-eval78.6%
distribute-lft-neg-in78.6%
distribute-rgt-neg-in78.6%
associate-*r*78.6%
metadata-eval78.6%
*-commutative78.6%
distribute-rgt-neg-in78.6%
metadata-eval78.6%
Simplified78.6%
Final simplification72.5%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -4e+56) (not (<= x2 5.4e+41))) (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0)) (+ x1 (+ (* x2 -6.0) (* x1 -2.0)))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -4e+56) || !(x2 <= 5.4e+41)) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-4d+56)) .or. (.not. (x2 <= 5.4d+41))) then
tmp = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -4e+56) || !(x2 <= 5.4e+41)) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -4e+56) or not (x2 <= 5.4e+41): tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0) else: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -4e+56) || !(x2 <= 5.4e+41)) tmp = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -4e+56) || ~((x2 <= 5.4e+41))) tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0); else tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -4e+56], N[Not[LessEqual[x2, 5.4e+41]], $MachinePrecision]], N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $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}\;x2 \leq -4 \cdot 10^{+56} \lor \neg \left(x2 \leq 5.4 \cdot 10^{+41}\right):\\
\;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\end{array}
\end{array}
if x2 < -4.00000000000000037e56 or 5.39999999999999999e41 < x2 Initial program 73.1%
Taylor expanded in x1 around 0 53.7%
Taylor expanded in x1 around 0 67.1%
Taylor expanded in x1 around inf 60.4%
if -4.00000000000000037e56 < x2 < 5.39999999999999999e41Initial program 65.4%
Taylor expanded in x1 around 0 46.2%
Taylor expanded in x1 around 0 47.1%
Taylor expanded in x2 around 0 46.0%
*-commutative46.0%
Simplified46.0%
Final simplification52.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -3.1e+65) (not (<= x2 1e+121))) (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0)) (+ x1 (+ (* x2 -6.0) (* x1 (- (* x1 9.0) 2.0))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -3.1e+65) || !(x2 <= 1e+121)) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 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 ((x2 <= (-3.1d+65)) .or. (.not. (x2 <= 1d+121))) then
tmp = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * 9.0d0) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -3.1e+65) || !(x2 <= 1e+121)) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -3.1e+65) or not (x2 <= 1e+121): tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -3.1e+65) || !(x2 <= 1e+121)) tmp = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * 9.0) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -3.1e+65) || ~((x2 <= 1e+121))) tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * 9.0) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -3.1e+65], N[Not[LessEqual[x2, 1e+121]], $MachinePrecision]], N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -3.1 \cdot 10^{+65} \lor \neg \left(x2 \leq 10^{+121}\right):\\
\;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot 9 - 2\right)\right)\\
\end{array}
\end{array}
if x2 < -3.09999999999999991e65 or 1.00000000000000004e121 < x2 Initial program 77.3%
Taylor expanded in x1 around 0 54.9%
Taylor expanded in x1 around 0 66.7%
Taylor expanded in x1 around inf 64.1%
if -3.09999999999999991e65 < x2 < 1.00000000000000004e121Initial program 63.9%
Taylor expanded in x1 around 0 46.4%
Taylor expanded in x1 around 0 76.0%
Taylor expanded in x2 around 0 73.8%
*-commutative73.8%
Simplified73.8%
Final simplification70.3%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -3.15e-133)
(- x1)
(if (<= x1 1.4e-152)
(* x2 -6.0)
(if (<= x1 4.5e-46) (- x1) (* x2 (- (/ x1 x2) 6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -3.15e-133) {
tmp = -x1;
} else if (x1 <= 1.4e-152) {
tmp = x2 * -6.0;
} else if (x1 <= 4.5e-46) {
tmp = -x1;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-3.15d-133)) then
tmp = -x1
else if (x1 <= 1.4d-152) then
tmp = x2 * (-6.0d0)
else if (x1 <= 4.5d-46) then
tmp = -x1
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -3.15e-133) {
tmp = -x1;
} else if (x1 <= 1.4e-152) {
tmp = x2 * -6.0;
} else if (x1 <= 4.5e-46) {
tmp = -x1;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -3.15e-133: tmp = -x1 elif x1 <= 1.4e-152: tmp = x2 * -6.0 elif x1 <= 4.5e-46: tmp = -x1 else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -3.15e-133) tmp = Float64(-x1); elseif (x1 <= 1.4e-152) tmp = Float64(x2 * -6.0); elseif (x1 <= 4.5e-46) tmp = Float64(-x1); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -3.15e-133) tmp = -x1; elseif (x1 <= 1.4e-152) tmp = x2 * -6.0; elseif (x1 <= 4.5e-46) tmp = -x1; else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -3.15e-133], (-x1), If[LessEqual[x1, 1.4e-152], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 4.5e-46], (-x1), N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.15 \cdot 10^{-133}:\\
\;\;\;\;-x1\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{-152}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{-46}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -3.1500000000000001e-133 or 1.39999999999999992e-152 < x1 < 4.50000000000000001e-46Initial program 62.3%
Taylor expanded in x1 around 0 52.9%
Taylor expanded in x1 around 0 54.2%
Taylor expanded in x2 around 0 26.1%
distribute-rgt1-in26.1%
metadata-eval26.1%
neg-mul-126.1%
Simplified26.1%
if -3.1500000000000001e-133 < x1 < 1.39999999999999992e-152Initial program 99.8%
Taylor expanded in x1 around 0 77.2%
Taylor expanded in x1 around 0 63.1%
*-commutative63.1%
Simplified63.1%
Taylor expanded in x1 around 0 63.5%
*-commutative63.5%
Simplified63.5%
if 4.50000000000000001e-46 < x1 Initial program 55.7%
Taylor expanded in x1 around 0 25.3%
Taylor expanded in x1 around 0 5.9%
*-commutative5.9%
Simplified5.9%
Taylor expanded in x2 around inf 29.3%
Final simplification35.8%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -2.35e-129) (not (<= x2 4.7e-142))) (+ x1 (* x2 -6.0)) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -2.35e-129) || !(x2 <= 4.7e-142)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = -x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-2.35d-129)) .or. (.not. (x2 <= 4.7d-142))) then
tmp = x1 + (x2 * (-6.0d0))
else
tmp = -x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -2.35e-129) || !(x2 <= 4.7e-142)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -2.35e-129) or not (x2 <= 4.7e-142): tmp = x1 + (x2 * -6.0) else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -2.35e-129) || !(x2 <= 4.7e-142)) tmp = Float64(x1 + Float64(x2 * -6.0)); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -2.35e-129) || ~((x2 <= 4.7e-142))) tmp = x1 + (x2 * -6.0); else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -2.35e-129], N[Not[LessEqual[x2, 4.7e-142]], $MachinePrecision]], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -2.35 \cdot 10^{-129} \lor \neg \left(x2 \leq 4.7 \cdot 10^{-142}\right):\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -2.3500000000000001e-129 or 4.6999999999999999e-142 < x2 Initial program 69.5%
Taylor expanded in x1 around 0 50.7%
Taylor expanded in x1 around 0 24.0%
*-commutative24.0%
Simplified24.0%
if -2.3500000000000001e-129 < x2 < 4.6999999999999999e-142Initial program 66.8%
Taylor expanded in x1 around 0 46.1%
Taylor expanded in x1 around 0 46.5%
Taylor expanded in x2 around 0 40.2%
distribute-rgt1-in40.2%
metadata-eval40.2%
neg-mul-140.2%
Simplified40.2%
Final simplification28.3%
(FPCore (x1 x2) :precision binary64 (if (<= x1 1.35) (+ x1 (+ (* x2 -6.0) (* x1 -2.0))) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 1.35) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 1.35d0) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 1.35) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 1.35: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 1.35) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 1.35) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 1.35], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 1.35:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 1.3500000000000001Initial program 76.6%
Taylor expanded in x1 around 0 62.9%
Taylor expanded in x1 around 0 63.5%
Taylor expanded in x2 around 0 44.7%
*-commutative44.7%
Simplified44.7%
if 1.3500000000000001 < x1 Initial program 49.1%
Taylor expanded in x1 around 0 15.7%
Taylor expanded in x1 around 0 5.5%
*-commutative5.5%
Simplified5.5%
Taylor expanded in x2 around inf 32.4%
Final simplification41.2%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -5.2e-128) (not (<= x2 5e-142))) (* x2 -6.0) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -5.2e-128) || !(x2 <= 5e-142)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-5.2d-128)) .or. (.not. (x2 <= 5d-142))) then
tmp = x2 * (-6.0d0)
else
tmp = -x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -5.2e-128) || !(x2 <= 5e-142)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -5.2e-128) or not (x2 <= 5e-142): tmp = x2 * -6.0 else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -5.2e-128) || !(x2 <= 5e-142)) tmp = Float64(x2 * -6.0); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -5.2e-128) || ~((x2 <= 5e-142))) tmp = x2 * -6.0; else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -5.2e-128], N[Not[LessEqual[x2, 5e-142]], $MachinePrecision]], N[(x2 * -6.0), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -5.2 \cdot 10^{-128} \lor \neg \left(x2 \leq 5 \cdot 10^{-142}\right):\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -5.19999999999999961e-128 or 5.0000000000000002e-142 < x2 Initial program 69.5%
Taylor expanded in x1 around 0 50.7%
Taylor expanded in x1 around 0 24.0%
*-commutative24.0%
Simplified24.0%
Taylor expanded in x1 around 0 23.5%
*-commutative23.5%
Simplified23.5%
if -5.19999999999999961e-128 < x2 < 5.0000000000000002e-142Initial program 66.8%
Taylor expanded in x1 around 0 46.1%
Taylor expanded in x1 around 0 46.5%
Taylor expanded in x2 around 0 40.2%
distribute-rgt1-in40.2%
metadata-eval40.2%
neg-mul-140.2%
Simplified40.2%
Final simplification27.9%
(FPCore (x1 x2) :precision binary64 (if (<= x1 2.8e-7) (- x1) x1))
double code(double x1, double x2) {
double tmp;
if (x1 <= 2.8e-7) {
tmp = -x1;
} else {
tmp = x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 2.8d-7) then
tmp = -x1
else
tmp = x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 2.8e-7) {
tmp = -x1;
} else {
tmp = x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 2.8e-7: tmp = -x1 else: tmp = x1 return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 2.8e-7) tmp = Float64(-x1); else tmp = x1; end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 2.8e-7) tmp = -x1; else tmp = x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 2.8e-7], (-x1), x1]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 2.8 \cdot 10^{-7}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x1\\
\end{array}
\end{array}
if x1 < 2.80000000000000019e-7Initial program 76.5%
Taylor expanded in x1 around 0 62.8%
Taylor expanded in x1 around 0 63.4%
Taylor expanded in x2 around 0 20.1%
distribute-rgt1-in20.1%
metadata-eval20.1%
neg-mul-120.1%
Simplified20.1%
if 2.80000000000000019e-7 < x1 Initial program 49.8%
Taylor expanded in x1 around 0 16.6%
Taylor expanded in x1 around 0 5.6%
*-commutative5.6%
Simplified5.6%
Taylor expanded in x1 around inf 6.1%
Final simplification16.0%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 68.8%
Taylor expanded in x1 around 0 49.5%
Taylor expanded in x1 around 0 19.7%
*-commutative19.7%
Simplified19.7%
Taylor expanded in x1 around inf 3.5%
Final simplification3.5%
herbie shell --seed 2024075
(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))))))