
(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 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0)))
(t_3 (- (+ t_1 (* 2.0 x2)) x1))
(t_4 (* (* x1 2.0) (/ t_3 t_0)))
(t_5 (/ t_3 (- -1.0 (* x1 x1))))
(t_6 (* (* x1 x1) (+ 6.0 (* 4.0 t_5))))
(t_7 (* t_1 t_5))
(t_8 (* x1 (* x1 x1))))
(if (<=
(+
x1
(- t_2 (- (- (+ t_7 (* t_0 (+ t_6 (* t_4 (+ 3.0 t_5))))) t_8) x1)))
INFINITY)
(+
x1
(-
t_2
(-
(-
(+
t_7
(*
t_0
(+
t_6
(*
t_4
(*
x2
(-
(/ 3.0 x2)
(+
(/ 2.0 (fma x1 x1 1.0))
(/ (- (* 3.0 (pow x1 2.0)) x1) (* x2 (fma x1 x1 1.0))))))))))
t_8)
x1)))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double t_3 = (t_1 + (2.0 * x2)) - x1;
double t_4 = (x1 * 2.0) * (t_3 / t_0);
double t_5 = t_3 / (-1.0 - (x1 * x1));
double t_6 = (x1 * x1) * (6.0 + (4.0 * t_5));
double t_7 = t_1 * t_5;
double t_8 = x1 * (x1 * x1);
double tmp;
if ((x1 + (t_2 - (((t_7 + (t_0 * (t_6 + (t_4 * (3.0 + t_5))))) - t_8) - x1))) <= ((double) INFINITY)) {
tmp = x1 + (t_2 - (((t_7 + (t_0 * (t_6 + (t_4 * (x2 * ((3.0 / x2) - ((2.0 / fma(x1, x1, 1.0)) + (((3.0 * pow(x1, 2.0)) - x1) / (x2 * fma(x1, x1, 1.0)))))))))) - t_8) - x1));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) t_3 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_4 = Float64(Float64(x1 * 2.0) * Float64(t_3 / t_0)) t_5 = Float64(t_3 / Float64(-1.0 - Float64(x1 * x1))) t_6 = Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))) t_7 = Float64(t_1 * t_5) t_8 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 + Float64(t_2 - Float64(Float64(Float64(t_7 + Float64(t_0 * Float64(t_6 + Float64(t_4 * Float64(3.0 + t_5))))) - t_8) - x1))) <= Inf) tmp = Float64(x1 + Float64(t_2 - Float64(Float64(Float64(t_7 + Float64(t_0 * Float64(t_6 + Float64(t_4 * Float64(x2 * Float64(Float64(3.0 / x2) - Float64(Float64(2.0 / fma(x1, x1, 1.0)) + Float64(Float64(Float64(3.0 * (x1 ^ 2.0)) - x1) / Float64(x2 * fma(x1, x1, 1.0)))))))))) - t_8) - x1))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$3 / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$3 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$1 * t$95$5), $MachinePrecision]}, Block[{t$95$8 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(t$95$2 - N[(N[(N[(t$95$7 + N[(t$95$0 * N[(t$95$6 + N[(t$95$4 * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$8), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$2 - N[(N[(N[(t$95$7 + N[(t$95$0 * N[(t$95$6 + N[(t$95$4 * N[(x2 * N[(N[(3.0 / x2), $MachinePrecision] - N[(N[(2.0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(3.0 * N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x2 * N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$8), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\\
t_3 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_4 := \left(x1 \cdot 2\right) \cdot \frac{t\_3}{t\_0}\\
t_5 := \frac{t\_3}{-1 - x1 \cdot x1}\\
t_6 := \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right)\\
t_7 := t\_1 \cdot t\_5\\
t_8 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 + \left(t\_2 - \left(\left(\left(t\_7 + t\_0 \cdot \left(t\_6 + t\_4 \cdot \left(3 + t\_5\right)\right)\right) - t\_8\right) - x1\right)\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_2 - \left(\left(\left(t\_7 + t\_0 \cdot \left(t\_6 + t\_4 \cdot \left(x2 \cdot \left(\frac{3}{x2} - \left(\frac{2}{\mathsf{fma}\left(x1, x1, 1\right)} + \frac{3 \cdot {x1}^{2} - x1}{x2 \cdot \mathsf{fma}\left(x1, x1, 1\right)}\right)\right)\right)\right)\right) - t\_8\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Taylor expanded in x2 around inf 99.4%
+-commutative99.4%
associate--r+99.4%
Simplified99.5%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 10.7%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 (- -1.0 (* x1 x1))))
(t_4
(+
x1
(-
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(-
(-
(+
(* t_1 t_3)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_3)))
(* (* (* x1 2.0) (/ t_2 t_0)) (+ 3.0 t_3)))))
(* x1 (* x1 x1)))
x1)))))
(if (<= t_4 INFINITY) t_4 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / (-1.0 - (x1 * x1));
double t_4 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) - ((((t_1 * t_3) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_3))))) - (x1 * (x1 * x1))) - x1));
double tmp;
if (t_4 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / (-1.0 - (x1 * x1));
double t_4 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) - ((((t_1 * t_3) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_3))))) - (x1 * (x1 * x1))) - x1));
double tmp;
if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = (t_1 + (2.0 * x2)) - x1 t_3 = t_2 / (-1.0 - (x1 * x1)) t_4 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) - ((((t_1 * t_3) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_3))))) - (x1 * (x1 * x1))) - x1)) tmp = 0 if t_4 <= math.inf: tmp = t_4 else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / Float64(-1.0 - Float64(x1 * x1))) t_4 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) - Float64(Float64(Float64(Float64(t_1 * t_3) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_3))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_2 / t_0)) * Float64(3.0 + t_3))))) - Float64(x1 * Float64(x1 * x1))) - x1))) tmp = 0.0 if (t_4 <= Inf) tmp = t_4; else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = (t_1 + (2.0 * x2)) - x1; t_3 = t_2 / (-1.0 - (x1 * x1)); t_4 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) - ((((t_1 * t_3) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_3))))) - (x1 * (x1 * x1))) - x1)); tmp = 0.0; if (t_4 <= Inf) tmp = t_4; else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(t$95$1 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, Infinity], t$95$4, N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{-1 - x1 \cdot x1}\\
t_4 := x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} - \left(\left(\left(t\_1 \cdot t\_3 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_3\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_2}{t\_0}\right) \cdot \left(3 + t\_3\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{if}\;t\_4 \leq \infty:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 10.7%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (- (+ t_3 (* 2.0 x2)) x1))
(t_5 (/ t_4 t_0))
(t_6 (* t_3 t_5))
(t_7 (/ t_4 t_1))
(t_8 (* (* x1 x1) (+ 6.0 (* 4.0 t_5)))))
(if (<= x1 -5e+103)
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0))
(if (<= x1 -1.7)
(+
x1
(-
9.0
(-
(- (+ t_6 (* t_1 (+ t_8 (* (* (* x1 2.0) t_7) (+ 3.0 t_5))))) t_2)
x1)))
(if (<= x1 1.8e+41)
(-
x1
(+
(* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_0))
(-
(-
(+
t_6
(* t_1 (+ t_8 (* (- t_7 3.0) (* (* x1 2.0) (- x1 (* 2.0 x2)))))))
t_2)
x1)))
(+
x1
(+
9.0
(+
x1
(*
(pow x1 2.0)
(+
9.0
(+
(* 4.0 (- (* 2.0 x2) 3.0))
(* x1 (- (* x1 6.0) 3.0)))))))))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = t_4 / t_0;
double t_6 = t_3 * t_5;
double t_7 = t_4 / t_1;
double t_8 = (x1 * x1) * (6.0 + (4.0 * t_5));
double tmp;
if (x1 <= -5e+103) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
} else if (x1 <= -1.7) {
tmp = x1 + (9.0 - (((t_6 + (t_1 * (t_8 + (((x1 * 2.0) * t_7) * (3.0 + t_5))))) - t_2) - x1));
} else if (x1 <= 1.8e+41) {
tmp = x1 - ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (((t_6 + (t_1 * (t_8 + ((t_7 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))) - t_2) - x1));
} else {
tmp = x1 + (9.0 + (x1 + (pow(x1, 2.0) * (9.0 + ((4.0 * ((2.0 * x2) - 3.0)) + (x1 * ((x1 * 6.0) - 3.0)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = (-1.0d0) - (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
t_2 = x1 * (x1 * x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = (t_3 + (2.0d0 * x2)) - x1
t_5 = t_4 / t_0
t_6 = t_3 * t_5
t_7 = t_4 / t_1
t_8 = (x1 * x1) * (6.0d0 + (4.0d0 * t_5))
if (x1 <= (-5d+103)) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
else if (x1 <= (-1.7d0)) then
tmp = x1 + (9.0d0 - (((t_6 + (t_1 * (t_8 + (((x1 * 2.0d0) * t_7) * (3.0d0 + t_5))))) - t_2) - x1))
else if (x1 <= 1.8d+41) then
tmp = x1 - ((3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_0)) + (((t_6 + (t_1 * (t_8 + ((t_7 - 3.0d0) * ((x1 * 2.0d0) * (x1 - (2.0d0 * x2))))))) - t_2) - x1))
else
tmp = x1 + (9.0d0 + (x1 + ((x1 ** 2.0d0) * (9.0d0 + ((4.0d0 * ((2.0d0 * x2) - 3.0d0)) + (x1 * ((x1 * 6.0d0) - 3.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = t_4 / t_0;
double t_6 = t_3 * t_5;
double t_7 = t_4 / t_1;
double t_8 = (x1 * x1) * (6.0 + (4.0 * t_5));
double tmp;
if (x1 <= -5e+103) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
} else if (x1 <= -1.7) {
tmp = x1 + (9.0 - (((t_6 + (t_1 * (t_8 + (((x1 * 2.0) * t_7) * (3.0 + t_5))))) - t_2) - x1));
} else if (x1 <= 1.8e+41) {
tmp = x1 - ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (((t_6 + (t_1 * (t_8 + ((t_7 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))) - t_2) - x1));
} else {
tmp = x1 + (9.0 + (x1 + (Math.pow(x1, 2.0) * (9.0 + ((4.0 * ((2.0 * x2) - 3.0)) + (x1 * ((x1 * 6.0) - 3.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = x1 * (x1 * x1) t_3 = x1 * (x1 * 3.0) t_4 = (t_3 + (2.0 * x2)) - x1 t_5 = t_4 / t_0 t_6 = t_3 * t_5 t_7 = t_4 / t_1 t_8 = (x1 * x1) * (6.0 + (4.0 * t_5)) tmp = 0 if x1 <= -5e+103: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) elif x1 <= -1.7: tmp = x1 + (9.0 - (((t_6 + (t_1 * (t_8 + (((x1 * 2.0) * t_7) * (3.0 + t_5))))) - t_2) - x1)) elif x1 <= 1.8e+41: tmp = x1 - ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (((t_6 + (t_1 * (t_8 + ((t_7 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))) - t_2) - x1)) else: tmp = x1 + (9.0 + (x1 + (math.pow(x1, 2.0) * (9.0 + ((4.0 * ((2.0 * x2) - 3.0)) + (x1 * ((x1 * 6.0) - 3.0))))))) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) t_5 = Float64(t_4 / t_0) t_6 = Float64(t_3 * t_5) t_7 = Float64(t_4 / t_1) t_8 = Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))) tmp = 0.0 if (x1 <= -5e+103) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); elseif (x1 <= -1.7) tmp = Float64(x1 + Float64(9.0 - Float64(Float64(Float64(t_6 + Float64(t_1 * Float64(t_8 + Float64(Float64(Float64(x1 * 2.0) * t_7) * Float64(3.0 + t_5))))) - t_2) - x1))); elseif (x1 <= 1.8e+41) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(Float64(Float64(t_6 + Float64(t_1 * Float64(t_8 + Float64(Float64(t_7 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x1 - Float64(2.0 * x2))))))) - t_2) - x1))); else tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64((x1 ^ 2.0) * Float64(9.0 + Float64(Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0)) + Float64(x1 * Float64(Float64(x1 * 6.0) - 3.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 - (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = x1 * (x1 * x1); t_3 = x1 * (x1 * 3.0); t_4 = (t_3 + (2.0 * x2)) - x1; t_5 = t_4 / t_0; t_6 = t_3 * t_5; t_7 = t_4 / t_1; t_8 = (x1 * x1) * (6.0 + (4.0 * t_5)); tmp = 0.0; if (x1 <= -5e+103) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); elseif (x1 <= -1.7) tmp = x1 + (9.0 - (((t_6 + (t_1 * (t_8 + (((x1 * 2.0) * t_7) * (3.0 + t_5))))) - t_2) - x1)); elseif (x1 <= 1.8e+41) tmp = x1 - ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (((t_6 + (t_1 * (t_8 + ((t_7 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))) - t_2) - x1)); else tmp = x1 + (9.0 + (x1 + ((x1 ^ 2.0) * (9.0 + ((4.0 * ((2.0 * x2) - 3.0)) + (x1 * ((x1 * 6.0) - 3.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$3 * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$4 / t$95$1), $MachinePrecision]}, Block[{t$95$8 = N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5e+103], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.7], N[(x1 + N[(9.0 - N[(N[(N[(t$95$6 + N[(t$95$1 * N[(t$95$8 + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$7), $MachinePrecision] * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e+41], N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$6 + N[(t$95$1 * N[(t$95$8 + N[(N[(t$95$7 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(9.0 + N[(x1 + N[(N[Power[x1, 2.0], $MachinePrecision] * N[(9.0 + N[(N[(4.0 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \left(t\_3 + 2 \cdot x2\right) - x1\\
t_5 := \frac{t\_4}{t\_0}\\
t_6 := t\_3 \cdot t\_5\\
t_7 := \frac{t\_4}{t\_1}\\
t_8 := \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right)\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+103}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\mathbf{elif}\;x1 \leq -1.7:\\
\;\;\;\;x1 + \left(9 - \left(\left(\left(t\_6 + t\_1 \cdot \left(t\_8 + \left(\left(x1 \cdot 2\right) \cdot t\_7\right) \cdot \left(3 + t\_5\right)\right)\right) - t\_2\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{+41}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_0} + \left(\left(\left(t\_6 + t\_1 \cdot \left(t\_8 + \left(t\_7 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x1 - 2 \cdot x2\right)\right)\right)\right) - t\_2\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + {x1}^{2} \cdot \left(9 + \left(4 \cdot \left(2 \cdot x2 - 3\right) + x1 \cdot \left(x1 \cdot 6 - 3\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5e103Initial program 0.0%
Taylor expanded in x1 around inf 21.1%
Taylor expanded in x1 around inf 100.0%
if -5e103 < x1 < -1.69999999999999996Initial program 99.5%
Taylor expanded in x1 around inf 99.5%
if -1.69999999999999996 < x1 < 1.80000000000000013e41Initial program 99.4%
Taylor expanded in x1 around 0 96.7%
+-commutative96.7%
mul-1-neg96.7%
unsub-neg96.7%
Simplified96.7%
if 1.80000000000000013e41 < x1 Initial program 32.6%
Taylor expanded in x1 around -inf 32.7%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around 0 100.0%
Final simplification98.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- -1.0 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (- (+ t_3 (* 2.0 x2)) x1))
(t_5 (/ t_4 t_0))
(t_6 (* t_3 t_5))
(t_7 (/ t_4 t_1))
(t_8 (* (* x1 x1) (+ 6.0 (* 4.0 t_5)))))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0))
(if (<= x1 -1.7)
(+
x1
(-
9.0
(-
(- (+ t_6 (* t_1 (+ t_8 (* (* (* x1 2.0) t_7) (+ 3.0 t_5))))) t_2)
x1)))
(if (<= x1 4.5e+40)
(-
x1
(+
(* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_0))
(-
(-
(+
t_6
(* t_1 (+ t_8 (* (- t_7 3.0) (* (* x1 2.0) (- x1 (* 2.0 x2)))))))
t_2)
x1)))
(+
x1
(+
9.0
(+
x1
(* (pow x1 4.0) (+ 6.0 (/ (- (/ (* x2 8.0) x1) 3.0) x1)))))))))))
double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = t_4 / t_0;
double t_6 = t_3 * t_5;
double t_7 = t_4 / t_1;
double t_8 = (x1 * x1) * (6.0 + (4.0 * t_5));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
} else if (x1 <= -1.7) {
tmp = x1 + (9.0 - (((t_6 + (t_1 * (t_8 + (((x1 * 2.0) * t_7) * (3.0 + t_5))))) - t_2) - x1));
} else if (x1 <= 4.5e+40) {
tmp = x1 - ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (((t_6 + (t_1 * (t_8 + ((t_7 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))) - t_2) - x1));
} else {
tmp = x1 + (9.0 + (x1 + (pow(x1, 4.0) * (6.0 + ((((x2 * 8.0) / x1) - 3.0) / x1)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = (-1.0d0) - (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
t_2 = x1 * (x1 * x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = (t_3 + (2.0d0 * x2)) - x1
t_5 = t_4 / t_0
t_6 = t_3 * t_5
t_7 = t_4 / t_1
t_8 = (x1 * x1) * (6.0d0 + (4.0d0 * t_5))
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
else if (x1 <= (-1.7d0)) then
tmp = x1 + (9.0d0 - (((t_6 + (t_1 * (t_8 + (((x1 * 2.0d0) * t_7) * (3.0d0 + t_5))))) - t_2) - x1))
else if (x1 <= 4.5d+40) then
tmp = x1 - ((3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_0)) + (((t_6 + (t_1 * (t_8 + ((t_7 - 3.0d0) * ((x1 * 2.0d0) * (x1 - (2.0d0 * x2))))))) - t_2) - x1))
else
tmp = x1 + (9.0d0 + (x1 + ((x1 ** 4.0d0) * (6.0d0 + ((((x2 * 8.0d0) / x1) - 3.0d0) / x1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = -1.0 - (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = t_4 / t_0;
double t_6 = t_3 * t_5;
double t_7 = t_4 / t_1;
double t_8 = (x1 * x1) * (6.0 + (4.0 * t_5));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
} else if (x1 <= -1.7) {
tmp = x1 + (9.0 - (((t_6 + (t_1 * (t_8 + (((x1 * 2.0) * t_7) * (3.0 + t_5))))) - t_2) - x1));
} else if (x1 <= 4.5e+40) {
tmp = x1 - ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (((t_6 + (t_1 * (t_8 + ((t_7 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))) - t_2) - x1));
} else {
tmp = x1 + (9.0 + (x1 + (Math.pow(x1, 4.0) * (6.0 + ((((x2 * 8.0) / x1) - 3.0) / x1)))));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 - (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = x1 * (x1 * x1) t_3 = x1 * (x1 * 3.0) t_4 = (t_3 + (2.0 * x2)) - x1 t_5 = t_4 / t_0 t_6 = t_3 * t_5 t_7 = t_4 / t_1 t_8 = (x1 * x1) * (6.0 + (4.0 * t_5)) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) elif x1 <= -1.7: tmp = x1 + (9.0 - (((t_6 + (t_1 * (t_8 + (((x1 * 2.0) * t_7) * (3.0 + t_5))))) - t_2) - x1)) elif x1 <= 4.5e+40: tmp = x1 - ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (((t_6 + (t_1 * (t_8 + ((t_7 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))) - t_2) - x1)) else: tmp = x1 + (9.0 + (x1 + (math.pow(x1, 4.0) * (6.0 + ((((x2 * 8.0) / x1) - 3.0) / x1))))) return tmp
function code(x1, x2) t_0 = Float64(-1.0 - Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) t_5 = Float64(t_4 / t_0) t_6 = Float64(t_3 * t_5) t_7 = Float64(t_4 / t_1) t_8 = Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); elseif (x1 <= -1.7) tmp = Float64(x1 + Float64(9.0 - Float64(Float64(Float64(t_6 + Float64(t_1 * Float64(t_8 + Float64(Float64(Float64(x1 * 2.0) * t_7) * Float64(3.0 + t_5))))) - t_2) - x1))); elseif (x1 <= 4.5e+40) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(Float64(Float64(t_6 + Float64(t_1 * Float64(t_8 + Float64(Float64(t_7 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x1 - Float64(2.0 * x2))))))) - t_2) - x1))); else tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(Float64(x2 * 8.0) / x1) - 3.0) / x1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 - (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = x1 * (x1 * x1); t_3 = x1 * (x1 * 3.0); t_4 = (t_3 + (2.0 * x2)) - x1; t_5 = t_4 / t_0; t_6 = t_3 * t_5; t_7 = t_4 / t_1; t_8 = (x1 * x1) * (6.0 + (4.0 * t_5)); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); elseif (x1 <= -1.7) tmp = x1 + (9.0 - (((t_6 + (t_1 * (t_8 + (((x1 * 2.0) * t_7) * (3.0 + t_5))))) - t_2) - x1)); elseif (x1 <= 4.5e+40) tmp = x1 - ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (((t_6 + (t_1 * (t_8 + ((t_7 - 3.0) * ((x1 * 2.0) * (x1 - (2.0 * x2))))))) - t_2) - x1)); else tmp = x1 + (9.0 + (x1 + ((x1 ^ 4.0) * (6.0 + ((((x2 * 8.0) / x1) - 3.0) / x1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$3 * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$4 / t$95$1), $MachinePrecision]}, Block[{t$95$8 = N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.7], N[(x1 + N[(9.0 - N[(N[(N[(t$95$6 + N[(t$95$1 * N[(t$95$8 + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$7), $MachinePrecision] * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+40], N[(x1 - N[(N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$6 + N[(t$95$1 * N[(t$95$8 + N[(N[(t$95$7 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(9.0 + N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 - x1 \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \left(t\_3 + 2 \cdot x2\right) - x1\\
t_5 := \frac{t\_4}{t\_0}\\
t_6 := t\_3 \cdot t\_5\\
t_7 := \frac{t\_4}{t\_1}\\
t_8 := \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\mathbf{elif}\;x1 \leq -1.7:\\
\;\;\;\;x1 + \left(9 - \left(\left(\left(t\_6 + t\_1 \cdot \left(t\_8 + \left(\left(x1 \cdot 2\right) \cdot t\_7\right) \cdot \left(3 + t\_5\right)\right)\right) - t\_2\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+40}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_0} + \left(\left(\left(t\_6 + t\_1 \cdot \left(t\_8 + \left(t\_7 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x1 - 2 \cdot x2\right)\right)\right)\right) - t\_2\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + {x1}^{4} \cdot \left(6 + \frac{\frac{x2 \cdot 8}{x1} - 3}{x1}\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around inf 21.1%
Taylor expanded in x1 around inf 100.0%
if -5.60000000000000037e102 < x1 < -1.69999999999999996Initial program 99.5%
Taylor expanded in x1 around inf 99.5%
if -1.69999999999999996 < x1 < 4.50000000000000032e40Initial program 99.4%
Taylor expanded in x1 around 0 96.7%
+-commutative96.7%
mul-1-neg96.7%
unsub-neg96.7%
Simplified96.7%
if 4.50000000000000032e40 < x1 Initial program 32.6%
Taylor expanded in x1 around -inf 32.7%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x2 around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification98.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (- (+ t_3 (* 2.0 x2)) x1))
(t_5 (/ t_4 (- -1.0 (* x1 x1))))
(t_6 (* t_3 t_5))
(t_7 (* (* x1 x1) (+ 6.0 (* 4.0 t_5))))
(t_8
(+
x1
(-
9.0
(-
(-
(+ t_6 (* t_0 (+ t_7 (* (* (* x1 2.0) (/ t_4 t_0)) (+ 3.0 t_5)))))
t_1)
x1)))))
(if (<= x1 -1e+103)
t_2
(if (<= x1 -1.7)
t_8
(if (<= x1 1.8e-12)
(+
x1
(-
(* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_0))
(-
(-
(+
t_6
(*
t_0
(+
t_7
(* (* (* x1 2.0) (- (* 2.0 x2) x1)) (- 3.0 (* 2.0 x2))))))
t_1)
x1)))
(if (<= x1 6e+82) t_8 t_2))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = t_4 / (-1.0 - (x1 * x1));
double t_6 = t_3 * t_5;
double t_7 = (x1 * x1) * (6.0 + (4.0 * t_5));
double t_8 = x1 + (9.0 - (((t_6 + (t_0 * (t_7 + (((x1 * 2.0) * (t_4 / t_0)) * (3.0 + t_5))))) - t_1) - x1));
double tmp;
if (x1 <= -1e+103) {
tmp = t_2;
} else if (x1 <= -1.7) {
tmp = t_8;
} else if (x1 <= 1.8e-12) {
tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) - (((t_6 + (t_0 * (t_7 + (((x1 * 2.0) * ((2.0 * x2) - x1)) * (3.0 - (2.0 * x2)))))) - t_1) - x1));
} else if (x1 <= 6e+82) {
tmp = t_8;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
t_3 = x1 * (x1 * 3.0d0)
t_4 = (t_3 + (2.0d0 * x2)) - x1
t_5 = t_4 / ((-1.0d0) - (x1 * x1))
t_6 = t_3 * t_5
t_7 = (x1 * x1) * (6.0d0 + (4.0d0 * t_5))
t_8 = x1 + (9.0d0 - (((t_6 + (t_0 * (t_7 + (((x1 * 2.0d0) * (t_4 / t_0)) * (3.0d0 + t_5))))) - t_1) - x1))
if (x1 <= (-1d+103)) then
tmp = t_2
else if (x1 <= (-1.7d0)) then
tmp = t_8
else if (x1 <= 1.8d-12) then
tmp = x1 + ((3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_0)) - (((t_6 + (t_0 * (t_7 + (((x1 * 2.0d0) * ((2.0d0 * x2) - x1)) * (3.0d0 - (2.0d0 * x2)))))) - t_1) - x1))
else if (x1 <= 6d+82) then
tmp = t_8
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (t_3 + (2.0 * x2)) - x1;
double t_5 = t_4 / (-1.0 - (x1 * x1));
double t_6 = t_3 * t_5;
double t_7 = (x1 * x1) * (6.0 + (4.0 * t_5));
double t_8 = x1 + (9.0 - (((t_6 + (t_0 * (t_7 + (((x1 * 2.0) * (t_4 / t_0)) * (3.0 + t_5))))) - t_1) - x1));
double tmp;
if (x1 <= -1e+103) {
tmp = t_2;
} else if (x1 <= -1.7) {
tmp = t_8;
} else if (x1 <= 1.8e-12) {
tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) - (((t_6 + (t_0 * (t_7 + (((x1 * 2.0) * ((2.0 * x2) - x1)) * (3.0 - (2.0 * x2)))))) - t_1) - x1));
} else if (x1 <= 6e+82) {
tmp = t_8;
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) t_3 = x1 * (x1 * 3.0) t_4 = (t_3 + (2.0 * x2)) - x1 t_5 = t_4 / (-1.0 - (x1 * x1)) t_6 = t_3 * t_5 t_7 = (x1 * x1) * (6.0 + (4.0 * t_5)) t_8 = x1 + (9.0 - (((t_6 + (t_0 * (t_7 + (((x1 * 2.0) * (t_4 / t_0)) * (3.0 + t_5))))) - t_1) - x1)) tmp = 0 if x1 <= -1e+103: tmp = t_2 elif x1 <= -1.7: tmp = t_8 elif x1 <= 1.8e-12: tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) - (((t_6 + (t_0 * (t_7 + (((x1 * 2.0) * ((2.0 * x2) - x1)) * (3.0 - (2.0 * x2)))))) - t_1) - x1)) elif x1 <= 6e+82: tmp = t_8 else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) t_5 = Float64(t_4 / Float64(-1.0 - Float64(x1 * x1))) t_6 = Float64(t_3 * t_5) t_7 = Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))) t_8 = Float64(x1 + Float64(9.0 - Float64(Float64(Float64(t_6 + Float64(t_0 * Float64(t_7 + Float64(Float64(Float64(x1 * 2.0) * Float64(t_4 / t_0)) * Float64(3.0 + t_5))))) - t_1) - x1))) tmp = 0.0 if (x1 <= -1e+103) tmp = t_2; elseif (x1 <= -1.7) tmp = t_8; elseif (x1 <= 1.8e-12) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_0)) - Float64(Float64(Float64(t_6 + Float64(t_0 * Float64(t_7 + Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)) * Float64(3.0 - Float64(2.0 * x2)))))) - t_1) - x1))); elseif (x1 <= 6e+82) tmp = t_8; else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); t_3 = x1 * (x1 * 3.0); t_4 = (t_3 + (2.0 * x2)) - x1; t_5 = t_4 / (-1.0 - (x1 * x1)); t_6 = t_3 * t_5; t_7 = (x1 * x1) * (6.0 + (4.0 * t_5)); t_8 = x1 + (9.0 - (((t_6 + (t_0 * (t_7 + (((x1 * 2.0) * (t_4 / t_0)) * (3.0 + t_5))))) - t_1) - x1)); tmp = 0.0; if (x1 <= -1e+103) tmp = t_2; elseif (x1 <= -1.7) tmp = t_8; elseif (x1 <= 1.8e-12) tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) - (((t_6 + (t_0 * (t_7 + (((x1 * 2.0) * ((2.0 * x2) - x1)) * (3.0 - (2.0 * x2)))))) - t_1) - x1)); elseif (x1 <= 6e+82) tmp = t_8; else tmp = t_2; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$3 * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(x1 + N[(9.0 - N[(N[(N[(t$95$6 + N[(t$95$0 * N[(t$95$7 + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$4 / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+103], t$95$2, If[LessEqual[x1, -1.7], t$95$8, If[LessEqual[x1, 1.8e-12], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t$95$6 + N[(t$95$0 * N[(t$95$7 + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6e+82], t$95$8, t$95$2]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \left(t\_3 + 2 \cdot x2\right) - x1\\
t_5 := \frac{t\_4}{-1 - x1 \cdot x1}\\
t_6 := t\_3 \cdot t\_5\\
t_7 := \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right)\\
t_8 := x1 + \left(9 - \left(\left(\left(t\_6 + t\_0 \cdot \left(t\_7 + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_4}{t\_0}\right) \cdot \left(3 + t\_5\right)\right)\right) - t\_1\right) - x1\right)\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+103}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -1.7:\\
\;\;\;\;t\_8\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{-12}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_0} - \left(\left(\left(t\_6 + t\_0 \cdot \left(t\_7 + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) \cdot \left(3 - 2 \cdot x2\right)\right)\right) - t\_1\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 6 \cdot 10^{+82}:\\
\;\;\;\;t\_8\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -1e103 or 5.99999999999999978e82 < x1 Initial program 13.8%
Taylor expanded in x1 around inf 23.0%
Taylor expanded in x1 around inf 100.0%
if -1e103 < x1 < -1.69999999999999996 or 1.8e-12 < x1 < 5.99999999999999978e82Initial program 99.2%
Taylor expanded in x1 around inf 99.2%
if -1.69999999999999996 < x1 < 1.8e-12Initial program 99.4%
Taylor expanded in x1 around 0 98.9%
+-commutative98.9%
mul-1-neg98.9%
unsub-neg98.9%
Simplified98.9%
Taylor expanded in x1 around 0 98.9%
Final simplification99.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (- (- t_2 (* 2.0 x2)) x1))
(t_5 (+ (* x1 x1) 1.0))
(t_6 (* 3.0 (/ t_4 t_5)))
(t_7 (/ t_3 t_5))
(t_8 (- -1.0 (* x1 x1)))
(t_9 (/ t_3 t_8))
(t_10 (* t_2 t_9))
(t_11 (* (* x1 2.0) (- (* 2.0 x2) x1)))
(t_12 (* (* x1 x1) (+ 6.0 (* 4.0 t_9)))))
(if (<= x1 -4.5e+153)
t_1
(if (<= x1 -5.6e+102)
(+
x1
(+
t_6
(+
x1
(* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* x1 (* x1 -22.0)))))))
(if (<= x1 -1.7)
(+
x1
(+
9.0
(+
x1
(+
t_0
(+
(* t_2 t_7)
(*
t_5
(+ (* (* x1 x1) (- (* t_7 4.0) 6.0)) (* (- t_7 3.0) t_11))))))))
(if (<= x1 8.5e+34)
(+
x1
(-
t_6
(-
(- (+ t_10 (* t_5 (+ t_12 (* t_11 (- 3.0 (* 2.0 x2)))))) t_0)
x1)))
(if (<= x1 2e+153)
(-
x1
(+
(* 3.0 (/ t_4 t_8))
(- (- (+ t_10 (* t_5 (- t_12 (* x1 2.0)))) t_0) x1)))
t_1)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = (t_2 - (2.0 * x2)) - x1;
double t_5 = (x1 * x1) + 1.0;
double t_6 = 3.0 * (t_4 / t_5);
double t_7 = t_3 / t_5;
double t_8 = -1.0 - (x1 * x1);
double t_9 = t_3 / t_8;
double t_10 = t_2 * t_9;
double t_11 = (x1 * 2.0) * ((2.0 * x2) - x1);
double t_12 = (x1 * x1) * (6.0 + (4.0 * t_9));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_6 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -1.7) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_2 * t_7) + (t_5 * (((x1 * x1) * ((t_7 * 4.0) - 6.0)) + ((t_7 - 3.0) * t_11)))))));
} else if (x1 <= 8.5e+34) {
tmp = x1 + (t_6 - (((t_10 + (t_5 * (t_12 + (t_11 * (3.0 - (2.0 * x2)))))) - t_0) - x1));
} else if (x1 <= 2e+153) {
tmp = x1 - ((3.0 * (t_4 / t_8)) + (((t_10 + (t_5 * (t_12 - (x1 * 2.0)))) - t_0) - x1));
} 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_10
real(8) :: t_11
real(8) :: t_12
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_2 = x1 * (x1 * 3.0d0)
t_3 = (t_2 + (2.0d0 * x2)) - x1
t_4 = (t_2 - (2.0d0 * x2)) - x1
t_5 = (x1 * x1) + 1.0d0
t_6 = 3.0d0 * (t_4 / t_5)
t_7 = t_3 / t_5
t_8 = (-1.0d0) - (x1 * x1)
t_9 = t_3 / t_8
t_10 = t_2 * t_9
t_11 = (x1 * 2.0d0) * ((2.0d0 * x2) - x1)
t_12 = (x1 * x1) * (6.0d0 + (4.0d0 * t_9))
if (x1 <= (-4.5d+153)) then
tmp = t_1
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (t_6 + (x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * (x1 * (-22.0d0)))))))
else if (x1 <= (-1.7d0)) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + ((t_2 * t_7) + (t_5 * (((x1 * x1) * ((t_7 * 4.0d0) - 6.0d0)) + ((t_7 - 3.0d0) * t_11)))))))
else if (x1 <= 8.5d+34) then
tmp = x1 + (t_6 - (((t_10 + (t_5 * (t_12 + (t_11 * (3.0d0 - (2.0d0 * x2)))))) - t_0) - x1))
else if (x1 <= 2d+153) then
tmp = x1 - ((3.0d0 * (t_4 / t_8)) + (((t_10 + (t_5 * (t_12 - (x1 * 2.0d0)))) - t_0) - x1))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = (t_2 - (2.0 * x2)) - x1;
double t_5 = (x1 * x1) + 1.0;
double t_6 = 3.0 * (t_4 / t_5);
double t_7 = t_3 / t_5;
double t_8 = -1.0 - (x1 * x1);
double t_9 = t_3 / t_8;
double t_10 = t_2 * t_9;
double t_11 = (x1 * 2.0) * ((2.0 * x2) - x1);
double t_12 = (x1 * x1) * (6.0 + (4.0 * t_9));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (t_6 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -1.7) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_2 * t_7) + (t_5 * (((x1 * x1) * ((t_7 * 4.0) - 6.0)) + ((t_7 - 3.0) * t_11)))))));
} else if (x1 <= 8.5e+34) {
tmp = x1 + (t_6 - (((t_10 + (t_5 * (t_12 + (t_11 * (3.0 - (2.0 * x2)))))) - t_0) - x1));
} else if (x1 <= 2e+153) {
tmp = x1 - ((3.0 * (t_4 / t_8)) + (((t_10 + (t_5 * (t_12 - (x1 * 2.0)))) - t_0) - x1));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_2 = x1 * (x1 * 3.0) t_3 = (t_2 + (2.0 * x2)) - x1 t_4 = (t_2 - (2.0 * x2)) - x1 t_5 = (x1 * x1) + 1.0 t_6 = 3.0 * (t_4 / t_5) t_7 = t_3 / t_5 t_8 = -1.0 - (x1 * x1) t_9 = t_3 / t_8 t_10 = t_2 * t_9 t_11 = (x1 * 2.0) * ((2.0 * x2) - x1) t_12 = (x1 * x1) * (6.0 + (4.0 * t_9)) tmp = 0 if x1 <= -4.5e+153: tmp = t_1 elif x1 <= -5.6e+102: tmp = x1 + (t_6 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))) elif x1 <= -1.7: tmp = x1 + (9.0 + (x1 + (t_0 + ((t_2 * t_7) + (t_5 * (((x1 * x1) * ((t_7 * 4.0) - 6.0)) + ((t_7 - 3.0) * t_11))))))) elif x1 <= 8.5e+34: tmp = x1 + (t_6 - (((t_10 + (t_5 * (t_12 + (t_11 * (3.0 - (2.0 * x2)))))) - t_0) - x1)) elif x1 <= 2e+153: tmp = x1 - ((3.0 * (t_4 / t_8)) + (((t_10 + (t_5 * (t_12 - (x1 * 2.0)))) - t_0) - x1)) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) 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(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) t_5 = Float64(Float64(x1 * x1) + 1.0) t_6 = Float64(3.0 * Float64(t_4 / t_5)) t_7 = Float64(t_3 / t_5) t_8 = Float64(-1.0 - Float64(x1 * x1)) t_9 = Float64(t_3 / t_8) t_10 = Float64(t_2 * t_9) t_11 = Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)) t_12 = Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_9))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(x1 * -22.0))))))); elseif (x1 <= -1.7) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(Float64(t_2 * t_7) + Float64(t_5 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_7 * 4.0) - 6.0)) + Float64(Float64(t_7 - 3.0) * t_11)))))))); elseif (x1 <= 8.5e+34) tmp = Float64(x1 + Float64(t_6 - Float64(Float64(Float64(t_10 + Float64(t_5 * Float64(t_12 + Float64(t_11 * Float64(3.0 - Float64(2.0 * x2)))))) - t_0) - x1))); elseif (x1 <= 2e+153) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_4 / t_8)) + Float64(Float64(Float64(t_10 + Float64(t_5 * Float64(t_12 - Float64(x1 * 2.0)))) - t_0) - x1))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_2 = x1 * (x1 * 3.0); t_3 = (t_2 + (2.0 * x2)) - x1; t_4 = (t_2 - (2.0 * x2)) - x1; t_5 = (x1 * x1) + 1.0; t_6 = 3.0 * (t_4 / t_5); t_7 = t_3 / t_5; t_8 = -1.0 - (x1 * x1); t_9 = t_3 / t_8; t_10 = t_2 * t_9; t_11 = (x1 * 2.0) * ((2.0 * x2) - x1); t_12 = (x1 * x1) * (6.0 + (4.0 * t_9)); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -5.6e+102) tmp = x1 + (t_6 + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))); elseif (x1 <= -1.7) tmp = x1 + (9.0 + (x1 + (t_0 + ((t_2 * t_7) + (t_5 * (((x1 * x1) * ((t_7 * 4.0) - 6.0)) + ((t_7 - 3.0) * t_11))))))); elseif (x1 <= 8.5e+34) tmp = x1 + (t_6 - (((t_10 + (t_5 * (t_12 + (t_11 * (3.0 - (2.0 * x2)))))) - t_0) - x1)); elseif (x1 <= 2e+153) tmp = x1 - ((3.0 * (t_4 / t_8)) + (((t_10 + (t_5 * (t_12 - (x1 * 2.0)))) - t_0) - x1)); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + 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[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(t$95$4 / t$95$5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$3 / t$95$5), $MachinePrecision]}, Block[{t$95$8 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$3 / t$95$8), $MachinePrecision]}, Block[{t$95$10 = N[(t$95$2 * t$95$9), $MachinePrecision]}, Block[{t$95$11 = N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$12 = N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$9), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$1, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(t$95$6 + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.7], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(N[(t$95$2 * t$95$7), $MachinePrecision] + N[(t$95$5 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$7 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$7 - 3.0), $MachinePrecision] * t$95$11), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.5e+34], N[(x1 + N[(t$95$6 - N[(N[(N[(t$95$10 + N[(t$95$5 * N[(t$95$12 + N[(t$95$11 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+153], N[(x1 - N[(N[(3.0 * N[(t$95$4 / t$95$8), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t$95$10 + N[(t$95$5 * N[(t$95$12 - N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\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 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \left(t\_2 - 2 \cdot x2\right) - x1\\
t_5 := x1 \cdot x1 + 1\\
t_6 := 3 \cdot \frac{t\_4}{t\_5}\\
t_7 := \frac{t\_3}{t\_5}\\
t_8 := -1 - x1 \cdot x1\\
t_9 := \frac{t\_3}{t\_8}\\
t_10 := t\_2 \cdot t\_9\\
t_11 := \left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\\
t_12 := \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_9\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot -22\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.7:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_0 + \left(t\_2 \cdot t\_7 + t\_5 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_7 \cdot 4 - 6\right) + \left(t\_7 - 3\right) \cdot t\_11\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8.5 \cdot 10^{+34}:\\
\;\;\;\;x1 + \left(t\_6 - \left(\left(\left(t\_10 + t\_5 \cdot \left(t\_12 + t\_11 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - t\_0\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_4}{t\_8} + \left(\left(\left(t\_10 + t\_5 \cdot \left(t\_12 - x1 \cdot 2\right)\right) - t\_0\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 71.6%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 100.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -5.60000000000000037e102 < x1 < -1.69999999999999996Initial program 99.5%
Taylor expanded in x1 around 0 66.0%
+-commutative66.0%
mul-1-neg66.0%
unsub-neg66.0%
Simplified66.0%
Taylor expanded in x1 around inf 66.0%
if -1.69999999999999996 < x1 < 8.5000000000000003e34Initial program 99.4%
Taylor expanded in x1 around 0 96.7%
+-commutative96.7%
mul-1-neg96.7%
unsub-neg96.7%
Simplified96.7%
Taylor expanded in x1 around 0 96.3%
if 8.5000000000000003e34 < x1 < 2e153Initial program 99.6%
Taylor expanded in x1 around 0 83.7%
+-commutative83.7%
mul-1-neg83.7%
unsub-neg83.7%
Simplified83.7%
Taylor expanded in x1 around inf 99.6%
Final simplification95.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (/ (- (+ t_0 (* 2.0 x2)) x1) (- -1.0 (* x1 x1))))
(t_2 (+ (* x1 x1) 1.0)))
(if (or (<= x1 -1.32e+31) (not (<= x1 1.5e+38)))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0))
(+
x1
(-
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(-
(-
(+
(* t_0 t_1)
(*
t_2
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_1)))
(* (* (* x1 2.0) (- (* 2.0 x2) x1)) (- 3.0 (* 2.0 x2))))))
(* x1 (* x1 x1)))
x1))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = ((t_0 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1));
double t_2 = (x1 * x1) + 1.0;
double tmp;
if ((x1 <= -1.32e+31) || !(x1 <= 1.5e+38)) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) - ((((t_0 * t_1) + (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_1))) + (((x1 * 2.0) * ((2.0 * x2) - x1)) * (3.0 - (2.0 * x2)))))) - (x1 * (x1 * x1))) - x1));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = ((t_0 + (2.0d0 * x2)) - x1) / ((-1.0d0) - (x1 * x1))
t_2 = (x1 * x1) + 1.0d0
if ((x1 <= (-1.32d+31)) .or. (.not. (x1 <= 1.5d+38))) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) - ((((t_0 * t_1) + (t_2 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_1))) + (((x1 * 2.0d0) * ((2.0d0 * x2) - x1)) * (3.0d0 - (2.0d0 * x2)))))) - (x1 * (x1 * x1))) - x1))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = ((t_0 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1));
double t_2 = (x1 * x1) + 1.0;
double tmp;
if ((x1 <= -1.32e+31) || !(x1 <= 1.5e+38)) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) - ((((t_0 * t_1) + (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_1))) + (((x1 * 2.0) * ((2.0 * x2) - x1)) * (3.0 - (2.0 * x2)))))) - (x1 * (x1 * x1))) - x1));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = ((t_0 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)) t_2 = (x1 * x1) + 1.0 tmp = 0 if (x1 <= -1.32e+31) or not (x1 <= 1.5e+38): tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) - ((((t_0 * t_1) + (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_1))) + (((x1 * 2.0) * ((2.0 * x2) - x1)) * (3.0 - (2.0 * x2)))))) - (x1 * (x1 * x1))) - x1)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / Float64(-1.0 - Float64(x1 * x1))) t_2 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if ((x1 <= -1.32e+31) || !(x1 <= 1.5e+38)) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) - Float64(Float64(Float64(Float64(t_0 * t_1) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_1))) + Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)) * Float64(3.0 - Float64(2.0 * x2)))))) - Float64(x1 * Float64(x1 * x1))) - x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = ((t_0 + (2.0 * x2)) - x1) / (-1.0 - (x1 * x1)); t_2 = (x1 * x1) + 1.0; tmp = 0.0; if ((x1 <= -1.32e+31) || ~((x1 <= 1.5e+38))) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) - ((((t_0 * t_1) + (t_2 * (((x1 * x1) * (6.0 + (4.0 * t_1))) + (((x1 * 2.0) * ((2.0 * x2) - x1)) * (3.0 - (2.0 * x2)))))) - (x1 * (x1 * x1))) - x1)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[Or[LessEqual[x1, -1.32e+31], N[Not[LessEqual[x1, 1.5e+38]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(t$95$0 * t$95$1), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{-1 - x1 \cdot x1}\\
t_2 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -1.32 \cdot 10^{+31} \lor \neg \left(x1 \leq 1.5 \cdot 10^{+38}\right):\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2} - \left(\left(\left(t\_0 \cdot t\_1 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_1\right) + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -1.32000000000000011e31 or 1.5000000000000001e38 < x1 Initial program 32.3%
Taylor expanded in x1 around inf 31.7%
Taylor expanded in x1 around inf 92.1%
if -1.32000000000000011e31 < x1 < 1.5000000000000001e38Initial program 99.4%
Taylor expanded in x1 around 0 94.4%
+-commutative94.4%
mul-1-neg94.4%
unsub-neg94.4%
Simplified94.4%
Taylor expanded in x1 around 0 93.9%
Final simplification93.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (- (- t_2 (* 2.0 x2)) x1))
(t_5 (+ (* x1 x1) 1.0))
(t_6 (/ t_3 t_5))
(t_7 (- -1.0 (* x1 x1)))
(t_8 (/ t_3 t_7)))
(if (<= x1 -4.5e+153)
t_1
(if (<= x1 -5.5e+102)
(+
x1
(+
(* 3.0 (/ t_4 t_5))
(+
x1
(* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* x1 (* x1 -22.0)))))))
(if (<= x1 -1.25e+31)
(+
x1
(+
9.0
(+
x1
(+
t_0
(+
(* t_2 t_6)
(*
t_5
(+
(* (* x1 x1) (- (* t_6 4.0) 6.0))
(* (- t_6 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1))))))))))
(if (<= x1 8.5e+34)
(+
x1
(-
(+ x1 (* 4.0 (* x2 (* x2 (+ (* x1 2.0) (* -3.0 (/ x1 x2)))))))
(*
3.0
(- (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0)) (* x2 -2.0)))))
(if (<= x1 2e+153)
(-
x1
(+
(* 3.0 (/ t_4 t_7))
(-
(-
(+
(* t_2 t_8)
(* t_5 (- (* (* x1 x1) (+ 6.0 (* 4.0 t_8))) (* x1 2.0))))
t_0)
x1)))
t_1)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = (t_2 - (2.0 * x2)) - x1;
double t_5 = (x1 * x1) + 1.0;
double t_6 = t_3 / t_5;
double t_7 = -1.0 - (x1 * x1);
double t_8 = t_3 / t_7;
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -5.5e+102) {
tmp = x1 + ((3.0 * (t_4 / t_5)) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -1.25e+31) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_2 * t_6) + (t_5 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + ((t_6 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else if (x1 <= 8.5e+34) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x2 * ((x1 * 2.0) + (-3.0 * (x1 / x2))))))) - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= 2e+153) {
tmp = x1 - ((3.0 * (t_4 / t_7)) + ((((t_2 * t_8) + (t_5 * (((x1 * x1) * (6.0 + (4.0 * t_8))) - (x1 * 2.0)))) - t_0) - x1));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_2 = x1 * (x1 * 3.0d0)
t_3 = (t_2 + (2.0d0 * x2)) - x1
t_4 = (t_2 - (2.0d0 * x2)) - x1
t_5 = (x1 * x1) + 1.0d0
t_6 = t_3 / t_5
t_7 = (-1.0d0) - (x1 * x1)
t_8 = t_3 / t_7
if (x1 <= (-4.5d+153)) then
tmp = t_1
else if (x1 <= (-5.5d+102)) then
tmp = x1 + ((3.0d0 * (t_4 / t_5)) + (x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * (x1 * (-22.0d0)))))))
else if (x1 <= (-1.25d+31)) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + ((t_2 * t_6) + (t_5 * (((x1 * x1) * ((t_6 * 4.0d0) - 6.0d0)) + ((t_6 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1)))))))))
else if (x1 <= 8.5d+34) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * (x2 * ((x1 * 2.0d0) + ((-3.0d0) * (x1 / x2))))))) - (3.0d0 * ((x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))) - (x2 * (-2.0d0)))))
else if (x1 <= 2d+153) then
tmp = x1 - ((3.0d0 * (t_4 / t_7)) + ((((t_2 * t_8) + (t_5 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_8))) - (x1 * 2.0d0)))) - t_0) - x1))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = (t_2 - (2.0 * x2)) - x1;
double t_5 = (x1 * x1) + 1.0;
double t_6 = t_3 / t_5;
double t_7 = -1.0 - (x1 * x1);
double t_8 = t_3 / t_7;
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -5.5e+102) {
tmp = x1 + ((3.0 * (t_4 / t_5)) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -1.25e+31) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_2 * t_6) + (t_5 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + ((t_6 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else if (x1 <= 8.5e+34) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x2 * ((x1 * 2.0) + (-3.0 * (x1 / x2))))))) - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= 2e+153) {
tmp = x1 - ((3.0 * (t_4 / t_7)) + ((((t_2 * t_8) + (t_5 * (((x1 * x1) * (6.0 + (4.0 * t_8))) - (x1 * 2.0)))) - t_0) - x1));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_2 = x1 * (x1 * 3.0) t_3 = (t_2 + (2.0 * x2)) - x1 t_4 = (t_2 - (2.0 * x2)) - x1 t_5 = (x1 * x1) + 1.0 t_6 = t_3 / t_5 t_7 = -1.0 - (x1 * x1) t_8 = t_3 / t_7 tmp = 0 if x1 <= -4.5e+153: tmp = t_1 elif x1 <= -5.5e+102: tmp = x1 + ((3.0 * (t_4 / t_5)) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))) elif x1 <= -1.25e+31: tmp = x1 + (9.0 + (x1 + (t_0 + ((t_2 * t_6) + (t_5 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + ((t_6 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))) elif x1 <= 8.5e+34: tmp = x1 + ((x1 + (4.0 * (x2 * (x2 * ((x1 * 2.0) + (-3.0 * (x1 / x2))))))) - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))) elif x1 <= 2e+153: tmp = x1 - ((3.0 * (t_4 / t_7)) + ((((t_2 * t_8) + (t_5 * (((x1 * x1) * (6.0 + (4.0 * t_8))) - (x1 * 2.0)))) - t_0) - x1)) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) 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(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) t_5 = Float64(Float64(x1 * x1) + 1.0) t_6 = Float64(t_3 / t_5) t_7 = Float64(-1.0 - Float64(x1 * x1)) t_8 = Float64(t_3 / t_7) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_4 / t_5)) + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(x1 * -22.0))))))); elseif (x1 <= -1.25e+31) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(Float64(t_2 * t_6) + Float64(t_5 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0)) + Float64(Float64(t_6 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)))))))))); elseif (x1 <= 8.5e+34) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x2 * Float64(Float64(x1 * 2.0) + Float64(-3.0 * Float64(x1 / x2))))))) - Float64(3.0 * Float64(Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)) - Float64(x2 * -2.0))))); elseif (x1 <= 2e+153) tmp = Float64(x1 - Float64(Float64(3.0 * Float64(t_4 / t_7)) + Float64(Float64(Float64(Float64(t_2 * t_8) + Float64(t_5 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_8))) - Float64(x1 * 2.0)))) - t_0) - x1))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); t_2 = x1 * (x1 * 3.0); t_3 = (t_2 + (2.0 * x2)) - x1; t_4 = (t_2 - (2.0 * x2)) - x1; t_5 = (x1 * x1) + 1.0; t_6 = t_3 / t_5; t_7 = -1.0 - (x1 * x1); t_8 = t_3 / t_7; tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -5.5e+102) tmp = x1 + ((3.0 * (t_4 / t_5)) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))); elseif (x1 <= -1.25e+31) tmp = x1 + (9.0 + (x1 + (t_0 + ((t_2 * t_6) + (t_5 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + ((t_6 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))); elseif (x1 <= 8.5e+34) tmp = x1 + ((x1 + (4.0 * (x2 * (x2 * ((x1 * 2.0) + (-3.0 * (x1 / x2))))))) - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))); elseif (x1 <= 2e+153) tmp = x1 - ((3.0 * (t_4 / t_7)) + ((((t_2 * t_8) + (t_5 * (((x1 * x1) * (6.0 + (4.0 * t_8))) - (x1 * 2.0)))) - t_0) - x1)); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + 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[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$3 / t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$3 / t$95$7), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$1, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(N[(3.0 * N[(t$95$4 / t$95$5), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.25e+31], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(N[(t$95$2 * t$95$6), $MachinePrecision] + N[(t$95$5 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$6 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.5e+34], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x2 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(-3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * N[(N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+153], N[(x1 - N[(N[(3.0 * N[(t$95$4 / t$95$7), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$2 * t$95$8), $MachinePrecision] + N[(t$95$5 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\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 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \left(t\_2 - 2 \cdot x2\right) - x1\\
t_5 := x1 \cdot x1 + 1\\
t_6 := \frac{t\_3}{t\_5}\\
t_7 := -1 - x1 \cdot x1\\
t_8 := \frac{t\_3}{t\_7}\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_4}{t\_5} + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot -22\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.25 \cdot 10^{+31}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_0 + \left(t\_2 \cdot t\_6 + t\_5 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right) + \left(t\_6 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8.5 \cdot 10^{+34}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot \left(x1 \cdot 2 + -3 \cdot \frac{x1}{x2}\right)\right)\right)\right) - 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right) - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(3 \cdot \frac{t\_4}{t\_7} + \left(\left(\left(t\_2 \cdot t\_8 + t\_5 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_8\right) - x1 \cdot 2\right)\right) - t\_0\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 71.6%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around 0 100.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -5.49999999999999981e102 < x1 < -1.25000000000000007e31Initial program 99.6%
Taylor expanded in x1 around 0 78.5%
+-commutative78.5%
mul-1-neg78.5%
unsub-neg78.5%
Simplified78.5%
Taylor expanded in x1 around inf 78.5%
if -1.25000000000000007e31 < x1 < 8.5000000000000003e34Initial program 99.4%
Taylor expanded in x1 around 0 82.8%
Taylor expanded in x1 around 0 82.8%
Taylor expanded in x2 around 0 93.9%
Taylor expanded in x2 around inf 93.9%
if 8.5000000000000003e34 < x1 < 2e153Initial program 99.6%
Taylor expanded in x1 around 0 83.7%
+-commutative83.7%
mul-1-neg83.7%
unsub-neg83.7%
Simplified83.7%
Taylor expanded in x1 around inf 99.6%
Final simplification95.0%
(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 (- (- t_1 (* 2.0 x2)) x1))
(t_3 (- -1.0 (* x1 x1)))
(t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_3))
(t_5 (+ (* x1 x1) 1.0))
(t_6
(-
x1
(+
(* 3.0 (/ t_2 t_3))
(-
(-
(+
(* t_1 t_4)
(* t_5 (- (* (* x1 x1) (+ 6.0 (* 4.0 t_4))) (* x1 2.0))))
(* x1 (* x1 x1)))
x1)))))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -5.6e+102)
(+
x1
(+
(* 3.0 (/ t_2 t_5))
(+
x1
(* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* x1 (* x1 -22.0)))))))
(if (<= x1 -1.25e+31)
t_6
(if (<= x1 8.5e+34)
(+
x1
(-
(+ x1 (* 4.0 (* x2 (* x2 (+ (* x1 2.0) (* -3.0 (/ x1 x2)))))))
(*
3.0
(- (* x1 (- (* x1 (- (* x2 -2.0) 3.0)) -1.0)) (* x2 -2.0)))))
(if (<= x1 2e+153) t_6 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 = (t_1 - (2.0 * x2)) - x1;
double t_3 = -1.0 - (x1 * x1);
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = (x1 * x1) + 1.0;
double t_6 = x1 - ((3.0 * (t_2 / t_3)) + ((((t_1 * t_4) + (t_5 * (((x1 * x1) * (6.0 + (4.0 * t_4))) - (x1 * 2.0)))) - (x1 * (x1 * x1))) - x1));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((3.0 * (t_2 / t_5)) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -1.25e+31) {
tmp = t_6;
} else if (x1 <= 8.5e+34) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x2 * ((x1 * 2.0) + (-3.0 * (x1 / x2))))))) - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= 2e+153) {
tmp = t_6;
} 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) :: t_6
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = x1 * (x1 * 3.0d0)
t_2 = (t_1 - (2.0d0 * x2)) - x1
t_3 = (-1.0d0) - (x1 * x1)
t_4 = ((t_1 + (2.0d0 * x2)) - x1) / t_3
t_5 = (x1 * x1) + 1.0d0
t_6 = x1 - ((3.0d0 * (t_2 / t_3)) + ((((t_1 * t_4) + (t_5 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_4))) - (x1 * 2.0d0)))) - (x1 * (x1 * x1))) - x1))
if (x1 <= (-4.5d+153)) then
tmp = t_0
else if (x1 <= (-5.6d+102)) then
tmp = x1 + ((3.0d0 * (t_2 / t_5)) + (x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * (x1 * (-22.0d0)))))))
else if (x1 <= (-1.25d+31)) then
tmp = t_6
else if (x1 <= 8.5d+34) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * (x2 * ((x1 * 2.0d0) + ((-3.0d0) * (x1 / x2))))))) - (3.0d0 * ((x1 * ((x1 * ((x2 * (-2.0d0)) - 3.0d0)) - (-1.0d0))) - (x2 * (-2.0d0)))))
else if (x1 <= 2d+153) then
tmp = t_6
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 = (t_1 - (2.0 * x2)) - x1;
double t_3 = -1.0 - (x1 * x1);
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
double t_5 = (x1 * x1) + 1.0;
double t_6 = x1 - ((3.0 * (t_2 / t_3)) + ((((t_1 * t_4) + (t_5 * (((x1 * x1) * (6.0 + (4.0 * t_4))) - (x1 * 2.0)))) - (x1 * (x1 * x1))) - x1));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((3.0 * (t_2 / t_5)) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= -1.25e+31) {
tmp = t_6;
} else if (x1 <= 8.5e+34) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x2 * ((x1 * 2.0) + (-3.0 * (x1 / x2))))))) - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= 2e+153) {
tmp = t_6;
} 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 = (t_1 - (2.0 * x2)) - x1 t_3 = -1.0 - (x1 * x1) t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3 t_5 = (x1 * x1) + 1.0 t_6 = x1 - ((3.0 * (t_2 / t_3)) + ((((t_1 * t_4) + (t_5 * (((x1 * x1) * (6.0 + (4.0 * t_4))) - (x1 * 2.0)))) - (x1 * (x1 * x1))) - x1)) tmp = 0 if x1 <= -4.5e+153: tmp = t_0 elif x1 <= -5.6e+102: tmp = x1 + ((3.0 * (t_2 / t_5)) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))) elif x1 <= -1.25e+31: tmp = t_6 elif x1 <= 8.5e+34: tmp = x1 + ((x1 + (4.0 * (x2 * (x2 * ((x1 * 2.0) + (-3.0 * (x1 / x2))))))) - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))) elif x1 <= 2e+153: tmp = t_6 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(Float64(t_1 - Float64(2.0 * x2)) - x1) t_3 = Float64(-1.0 - Float64(x1 * x1)) t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_3) t_5 = Float64(Float64(x1 * x1) + 1.0) t_6 = Float64(x1 - Float64(Float64(3.0 * Float64(t_2 / t_3)) + Float64(Float64(Float64(Float64(t_1 * t_4) + Float64(t_5 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4))) - Float64(x1 * 2.0)))) - Float64(x1 * Float64(x1 * x1))) - x1))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(t_2 / t_5)) + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(x1 * -22.0))))))); elseif (x1 <= -1.25e+31) tmp = t_6; elseif (x1 <= 8.5e+34) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x2 * Float64(Float64(x1 * 2.0) + Float64(-3.0 * Float64(x1 / x2))))))) - Float64(3.0 * Float64(Float64(x1 * Float64(Float64(x1 * Float64(Float64(x2 * -2.0) - 3.0)) - -1.0)) - Float64(x2 * -2.0))))); elseif (x1 <= 2e+153) tmp = t_6; 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 = (t_1 - (2.0 * x2)) - x1; t_3 = -1.0 - (x1 * x1); t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3; t_5 = (x1 * x1) + 1.0; t_6 = x1 - ((3.0 * (t_2 / t_3)) + ((((t_1 * t_4) + (t_5 * (((x1 * x1) * (6.0 + (4.0 * t_4))) - (x1 * 2.0)))) - (x1 * (x1 * x1))) - x1)); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -5.6e+102) tmp = x1 + ((3.0 * (t_2 / t_5)) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))); elseif (x1 <= -1.25e+31) tmp = t_6; elseif (x1 <= 8.5e+34) tmp = x1 + ((x1 + (4.0 * (x2 * (x2 * ((x1 * 2.0) + (-3.0 * (x1 / x2))))))) - (3.0 * ((x1 * ((x1 * ((x2 * -2.0) - 3.0)) - -1.0)) - (x2 * -2.0)))); elseif (x1 <= 2e+153) tmp = t_6; 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[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$6 = N[(x1 - N[(N[(3.0 * N[(t$95$2 / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(t$95$1 * t$95$4), $MachinePrecision] + N[(t$95$5 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$0, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(3.0 * N[(t$95$2 / t$95$5), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.25e+31], t$95$6, If[LessEqual[x1, 8.5e+34], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x2 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(-3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * N[(N[(x1 * N[(N[(x1 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+153], t$95$6, 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 := \left(t\_1 - 2 \cdot x2\right) - x1\\
t_3 := -1 - x1 \cdot x1\\
t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_3}\\
t_5 := x1 \cdot x1 + 1\\
t_6 := x1 - \left(3 \cdot \frac{t\_2}{t\_3} + \left(\left(\left(t\_1 \cdot t\_4 + t\_5 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right) - x1 \cdot 2\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t\_2}{t\_5} + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot -22\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.25 \cdot 10^{+31}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x1 \leq 8.5 \cdot 10^{+34}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot \left(x1 \cdot 2 + -3 \cdot \frac{x1}{x2}\right)\right)\right)\right) - 3 \cdot \left(x1 \cdot \left(x1 \cdot \left(x2 \cdot -2 - 3\right) - -1\right) - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 71.6%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 100.0%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -5.60000000000000037e102 < x1 < -1.25000000000000007e31 or 8.5000000000000003e34 < x1 < 2e153Initial program 99.6%
Taylor expanded in x1 around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
Simplified81.1%
Taylor expanded in x1 around inf 85.9%
if -1.25000000000000007e31 < x1 < 8.5000000000000003e34Initial program 99.4%
Taylor expanded in x1 around 0 82.8%
Taylor expanded in x1 around 0 82.8%
Taylor expanded in x2 around 0 93.9%
Taylor expanded in x2 around inf 93.9%
Final simplification94.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -9.2e+76)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+
x1
(*
x1
(+
(* 4.0 (* x2 (- (* 2.0 x2) 3.0)))
(*
x1
(+
(* x1 -22.0)
(* x2 (+ 6.0 (+ (* -8.0 (* x1 x2)) (* x1 24.0)))))))))))
(if (<= x1 1.5542e-30)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))
(+ (* x1 -3.0) (* x2 -6.0))))
(if (<= x1 2e+153)
(-
x1
(-
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0)))
(* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))
(* x2 -6.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 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -9.2e+76) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * -22.0) + (x2 * (6.0 + ((-8.0 * (x1 * x2)) + (x1 * 24.0))))))))));
} else if (x1 <= 1.5542e-30) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0)));
} else if (x1 <= 2e+153) {
tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) - (x2 * -6.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-4.5d+153)) then
tmp = t_0
else if (x1 <= (-9.2d+76)) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * ((x1 * (-22.0d0)) + (x2 * (6.0d0 + (((-8.0d0) * (x1 * x2)) + (x1 * 24.0d0))))))))))
else if (x1 <= 1.5542d-30) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))) + ((x1 * (-3.0d0)) + (x2 * (-6.0d0))))
else if (x1 <= 2d+153) then
tmp = x1 - ((x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))) - (x2 * (-6.0d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -9.2e+76) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * -22.0) + (x2 * (6.0 + ((-8.0 * (x1 * x2)) + (x1 * 24.0))))))))));
} else if (x1 <= 1.5542e-30) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0)));
} else if (x1 <= 2e+153) {
tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) - (x2 * -6.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 <= -4.5e+153: tmp = t_0 elif x1 <= -9.2e+76: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * -22.0) + (x2 * (6.0 + ((-8.0 * (x1 * x2)) + (x1 * 24.0)))))))))) elif x1 <= 1.5542e-30: tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0))) elif x1 <= 2e+153: tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) - (x2 * -6.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 <= -4.5e+153) tmp = t_0; elseif (x1 <= -9.2e+76) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(Float64(x1 * -22.0) + Float64(x2 * Float64(6.0 + Float64(Float64(-8.0 * Float64(x1 * x2)) + Float64(x1 * 24.0))))))))))); elseif (x1 <= 1.5542e-30) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))) + Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)))); elseif (x1 <= 2e+153) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - 3.0)) - Float64(x1 * 3.0))) + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))) - Float64(x2 * -6.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 <= -4.5e+153) tmp = t_0; elseif (x1 <= -9.2e+76) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * ((x1 * -22.0) + (x2 * (6.0 + ((-8.0 * (x1 * x2)) + (x1 * 24.0)))))))))); elseif (x1 <= 1.5542e-30) tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0))); elseif (x1 <= 2e+153) tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) - (x2 * -6.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, -4.5e+153], t$95$0, If[LessEqual[x1, -9.2e+76], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * -22.0), $MachinePrecision] + N[(x2 * N[(6.0 + N[(N[(-8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * 24.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5542e-30], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+153], N[(x1 - N[(N[(x1 * N[(2.0 + N[(N[(x1 * N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $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 -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -9.2 \cdot 10^{+76}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot -22 + x2 \cdot \left(6 + \left(-8 \cdot \left(x1 \cdot x2\right) + x1 \cdot 24\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.5542 \cdot 10^{-30}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right) + \left(x1 \cdot -3 + x2 \cdot -6\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + \left(x1 \cdot \left(3 \cdot \left(x2 \cdot -2 - 3\right) - x1 \cdot 3\right) + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right) - x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 2e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 71.6%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -9.20000000000000005e76Initial program 52.9%
Taylor expanded in x1 around 0 72.7%
Taylor expanded in x2 around 0 72.7%
if -9.20000000000000005e76 < x1 < 1.55419999999999993e-30Initial program 99.4%
Taylor expanded in x1 around 0 81.2%
Taylor expanded in x1 around 0 79.9%
Taylor expanded in x2 around 0 91.1%
Taylor expanded in x1 around 0 92.4%
if 1.55419999999999993e-30 < x1 < 2e153Initial program 99.4%
Taylor expanded in x1 around 0 37.5%
Taylor expanded in x1 around 0 64.3%
Final simplification89.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -4.5e+153)
t_1
(if (<= x1 -1e+76)
(+
x1
(-
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(-
(* x1 (- t_0 (* x1 (+ (* x1 -22.0) (* x2 (+ 6.0 (* x1 24.0)))))))
x1)))
(if (<= x1 1.5542e-30)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))
(+ (* x1 -3.0) (* x2 -6.0))))
(if (<= x1 4.5e+153)
(-
x1
(-
(*
x1
(+
2.0
(+ (* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0))) t_0)))
(* x2 -6.0)))
t_1))))))
double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -1e+76) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - ((x1 * (t_0 - (x1 * ((x1 * -22.0) + (x2 * (6.0 + (x1 * 24.0))))))) - x1));
} else if (x1 <= 1.5542e-30) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0)));
} else if (x1 <= 4.5e+153) {
tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_0))) - (x2 * -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) :: tmp
t_0 = 4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-4.5d+153)) then
tmp = t_1
else if (x1 <= (-1d+76)) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) - ((x1 * (t_0 - (x1 * ((x1 * (-22.0d0)) + (x2 * (6.0d0 + (x1 * 24.0d0))))))) - x1))
else if (x1 <= 1.5542d-30) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))) + ((x1 * (-3.0d0)) + (x2 * (-6.0d0))))
else if (x1 <= 4.5d+153) then
tmp = x1 - ((x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + t_0))) - (x2 * (-6.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2)));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -1e+76) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - ((x1 * (t_0 - (x1 * ((x1 * -22.0) + (x2 * (6.0 + (x1 * 24.0))))))) - x1));
} else if (x1 <= 1.5542e-30) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0)));
} else if (x1 <= 4.5e+153) {
tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_0))) - (x2 * -6.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2))) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -4.5e+153: tmp = t_1 elif x1 <= -1e+76: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - ((x1 * (t_0 - (x1 * ((x1 * -22.0) + (x2 * (6.0 + (x1 * 24.0))))))) - x1)) elif x1 <= 1.5542e-30: tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0))) elif x1 <= 4.5e+153: tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_0))) - (x2 * -6.0)) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -1e+76) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) - Float64(Float64(x1 * Float64(t_0 - Float64(x1 * Float64(Float64(x1 * -22.0) + Float64(x2 * Float64(6.0 + Float64(x1 * 24.0))))))) - x1))); elseif (x1 <= 1.5542e-30) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))) + Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)))); elseif (x1 <= 4.5e+153) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - 3.0)) - Float64(x1 * 3.0))) + t_0))) - Float64(x2 * -6.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = 4.0 * (x2 * (3.0 - (2.0 * x2))); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -1e+76) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - ((x1 * (t_0 - (x1 * ((x1 * -22.0) + (x2 * (6.0 + (x1 * 24.0))))))) - x1)); elseif (x1 <= 1.5542e-30) tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0))); elseif (x1 <= 4.5e+153) tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + t_0))) - (x2 * -6.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, 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, -4.5e+153], t$95$1, If[LessEqual[x1, -1e+76], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x1 * N[(t$95$0 - N[(x1 * N[(N[(x1 * -22.0), $MachinePrecision] + N[(x2 * N[(6.0 + N[(x1 * 24.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5542e-30], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x1 - N[(N[(x1 * N[(2.0 + N[(N[(x1 * N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -1 \cdot 10^{+76}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - \left(x1 \cdot \left(t\_0 - x1 \cdot \left(x1 \cdot -22 + x2 \cdot \left(6 + x1 \cdot 24\right)\right)\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 1.5542 \cdot 10^{-30}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right) + \left(x1 \cdot -3 + x2 \cdot -6\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + \left(x1 \cdot \left(3 \cdot \left(x2 \cdot -2 - 3\right) - x1 \cdot 3\right) + t\_0\right)\right) - x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 4.5000000000000001e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 71.6%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -1e76Initial program 52.9%
Taylor expanded in x1 around 0 72.7%
Taylor expanded in x2 around 0 60.9%
if -1e76 < x1 < 1.55419999999999993e-30Initial program 99.4%
Taylor expanded in x1 around 0 81.2%
Taylor expanded in x1 around 0 79.9%
Taylor expanded in x2 around 0 91.1%
Taylor expanded in x1 around 0 92.4%
if 1.55419999999999993e-30 < x1 < 4.5000000000000001e153Initial program 99.4%
Taylor expanded in x1 around 0 37.5%
Taylor expanded in x1 around 0 64.3%
Final simplification89.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))))
(t_1 (- (* x2 -2.0) 3.0)))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -0.05)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+
x1
(* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) (* x1 (* x1 -22.0)))))))
(if (<= x1 1.5542e-30)
(+
x1
(-
(+ x1 (* 4.0 (* x2 (* x2 (+ (* x1 2.0) (* -3.0 (/ x1 x2)))))))
(* 3.0 (- (* x1 (- (* x1 t_1) -1.0)) (* x2 -2.0)))))
(if (<= x1 5e+153)
(-
x1
(-
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 t_1) (* x1 3.0)))
(* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))
(* x2 -6.0)))
t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = (x2 * -2.0) - 3.0;
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -0.05) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= 1.5542e-30) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x2 * ((x1 * 2.0) + (-3.0 * (x1 / x2))))))) - (3.0 * ((x1 * ((x1 * t_1) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= 5e+153) {
tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * t_1) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) - (x2 * -6.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
t_1 = (x2 * (-2.0d0)) - 3.0d0
if (x1 <= (-4.5d+153)) then
tmp = t_0
else if (x1 <= (-0.05d0)) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (x1 * (x1 * (-22.0d0)))))))
else if (x1 <= 1.5542d-30) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * (x2 * ((x1 * 2.0d0) + ((-3.0d0) * (x1 / x2))))))) - (3.0d0 * ((x1 * ((x1 * t_1) - (-1.0d0))) - (x2 * (-2.0d0)))))
else if (x1 <= 5d+153) then
tmp = x1 - ((x1 * (2.0d0 + ((x1 * ((3.0d0 * t_1) - (x1 * 3.0d0))) + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))) - (x2 * (-6.0d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double t_1 = (x2 * -2.0) - 3.0;
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -0.05) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0))))));
} else if (x1 <= 1.5542e-30) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x2 * ((x1 * 2.0) + (-3.0 * (x1 / x2))))))) - (3.0 * ((x1 * ((x1 * t_1) - -1.0)) - (x2 * -2.0))));
} else if (x1 <= 5e+153) {
tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * t_1) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) - (x2 * -6.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) t_1 = (x2 * -2.0) - 3.0 tmp = 0 if x1 <= -4.5e+153: tmp = t_0 elif x1 <= -0.05: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))) elif x1 <= 1.5542e-30: tmp = x1 + ((x1 + (4.0 * (x2 * (x2 * ((x1 * 2.0) + (-3.0 * (x1 / x2))))))) - (3.0 * ((x1 * ((x1 * t_1) - -1.0)) - (x2 * -2.0)))) elif x1 <= 5e+153: tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * t_1) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) - (x2 * -6.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))))) t_1 = Float64(Float64(x2 * -2.0) - 3.0) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -0.05) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + Float64(x1 * Float64(x1 * -22.0))))))); elseif (x1 <= 1.5542e-30) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x2 * Float64(Float64(x1 * 2.0) + Float64(-3.0 * Float64(x1 / x2))))))) - Float64(3.0 * Float64(Float64(x1 * Float64(Float64(x1 * t_1) - -1.0)) - Float64(x2 * -2.0))))); elseif (x1 <= 5e+153) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(Float64(3.0 * t_1) - Float64(x1 * 3.0))) + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))) - Float64(x2 * -6.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)))); t_1 = (x2 * -2.0) - 3.0; tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -0.05) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + (x1 * (x1 * -22.0)))))); elseif (x1 <= 1.5542e-30) tmp = x1 + ((x1 + (4.0 * (x2 * (x2 * ((x1 * 2.0) + (-3.0 * (x1 / x2))))))) - (3.0 * ((x1 * ((x1 * t_1) - -1.0)) - (x2 * -2.0)))); elseif (x1 <= 5e+153) tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * t_1) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) - (x2 * -6.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]}, Block[{t$95$1 = N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$0, If[LessEqual[x1, -0.05], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * -22.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5542e-30], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x2 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(-3.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * N[(N[(x1 * N[(N[(x1 * t$95$1), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 - N[(N[(x1 * N[(2.0 + N[(N[(x1 * N[(N[(3.0 * t$95$1), $MachinePrecision] - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $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 := x2 \cdot -2 - 3\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -0.05:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(x1 \cdot -22\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.5542 \cdot 10^{-30}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot \left(x1 \cdot 2 + -3 \cdot \frac{x1}{x2}\right)\right)\right)\right) - 3 \cdot \left(x1 \cdot \left(x1 \cdot t\_1 - -1\right) - x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + \left(x1 \cdot \left(3 \cdot t\_1 - x1 \cdot 3\right) + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right) - x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 5.00000000000000018e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 71.6%
Taylor expanded in x2 around 0 100.0%
if -4.5000000000000001e153 < x1 < -0.050000000000000003Initial program 74.6%
Taylor expanded in x1 around 0 40.7%
Taylor expanded in x2 around 0 45.7%
*-commutative45.7%
Simplified45.7%
if -0.050000000000000003 < x1 < 1.55419999999999993e-30Initial program 99.5%
Taylor expanded in x1 around 0 86.9%
Taylor expanded in x1 around 0 86.9%
Taylor expanded in x2 around 0 99.5%
Taylor expanded in x2 around inf 99.5%
if 1.55419999999999993e-30 < x1 < 5.00000000000000018e153Initial program 99.4%
Taylor expanded in x1 around 0 37.5%
Taylor expanded in x1 around 0 64.3%
Final simplification88.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -2.6e+83)
t_0
(if (<= x1 1.5542e-30)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))
(+ (* x1 -3.0) (* x2 -6.0))))
(if (<= x1 4.5e+153)
(-
x1
(-
(*
x1
(+
2.0
(+
(* x1 (- (* 3.0 (- (* x2 -2.0) 3.0)) (* x1 3.0)))
(* 4.0 (* x2 (- 3.0 (* 2.0 x2)))))))
(* x2 -6.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 <= -2.6e+83) {
tmp = t_0;
} else if (x1 <= 1.5542e-30) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0)));
} else if (x1 <= 4.5e+153) {
tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) - (x2 * -6.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-2.6d+83)) then
tmp = t_0
else if (x1 <= 1.5542d-30) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))) + ((x1 * (-3.0d0)) + (x2 * (-6.0d0))))
else if (x1 <= 4.5d+153) then
tmp = x1 - ((x1 * (2.0d0 + ((x1 * ((3.0d0 * ((x2 * (-2.0d0)) - 3.0d0)) - (x1 * 3.0d0))) + (4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2))))))) - (x2 * (-6.0d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -2.6e+83) {
tmp = t_0;
} else if (x1 <= 1.5542e-30) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0)));
} else if (x1 <= 4.5e+153) {
tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) - (x2 * -6.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 <= -2.6e+83: tmp = t_0 elif x1 <= 1.5542e-30: tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0))) elif x1 <= 4.5e+153: tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) - (x2 * -6.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 <= -2.6e+83) tmp = t_0; elseif (x1 <= 1.5542e-30) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))) + Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)))); elseif (x1 <= 4.5e+153) tmp = Float64(x1 - Float64(Float64(x1 * Float64(2.0 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - 3.0)) - Float64(x1 * 3.0))) + Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))))) - Float64(x2 * -6.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 <= -2.6e+83) tmp = t_0; elseif (x1 <= 1.5542e-30) tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0))); elseif (x1 <= 4.5e+153) tmp = x1 - ((x1 * (2.0 + ((x1 * ((3.0 * ((x2 * -2.0) - 3.0)) - (x1 * 3.0))) + (4.0 * (x2 * (3.0 - (2.0 * x2))))))) - (x2 * -6.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, -2.6e+83], t$95$0, If[LessEqual[x1, 1.5542e-30], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x1 - N[(N[(x1 * N[(2.0 + N[(N[(x1 * N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x2 * -6.0), $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 -2.6 \cdot 10^{+83}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.5542 \cdot 10^{-30}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right) + \left(x1 \cdot -3 + x2 \cdot -6\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 - \left(x1 \cdot \left(2 + \left(x1 \cdot \left(3 \cdot \left(x2 \cdot -2 - 3\right) - x1 \cdot 3\right) + 4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)\right) - x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -2.6000000000000001e83 or 4.5000000000000001e153 < x1 Initial program 6.3%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.9%
Taylor expanded in x2 around 0 85.1%
if -2.6000000000000001e83 < x1 < 1.55419999999999993e-30Initial program 99.4%
Taylor expanded in x1 around 0 79.7%
Taylor expanded in x1 around 0 77.8%
Taylor expanded in x2 around 0 88.7%
Taylor expanded in x1 around 0 90.6%
if 1.55419999999999993e-30 < x1 < 4.5000000000000001e153Initial program 99.4%
Taylor expanded in x1 around 0 37.5%
Taylor expanded in x1 around 0 64.3%
Final simplification85.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0)))))
(t_1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -2.6e+83)
(+ x1 (+ x1 t_1))
(if (<= x1 -1.55e-209)
t_0
(if (<= x1 6.5e-234)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x2 -12.0) 2.0))))
(if (<= x1 3.1e-52)
t_0
(- x1 (- (- (* 4.0 (* x1 (* x2 (- 3.0 (* 2.0 x2))))) x1) t_1))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double t_1 = 3.0 * (x1 * ((x1 * 3.0) + -1.0));
double tmp;
if (x1 <= -2.6e+83) {
tmp = x1 + (x1 + t_1);
} else if (x1 <= -1.55e-209) {
tmp = t_0;
} else if (x1 <= 6.5e-234) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else if (x1 <= 3.1e-52) {
tmp = t_0;
} else {
tmp = x1 - (((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1) - 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 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
t_1 = 3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))
if (x1 <= (-2.6d+83)) then
tmp = x1 + (x1 + t_1)
else if (x1 <= (-1.55d-209)) then
tmp = t_0
else if (x1 <= 6.5d-234) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * (-12.0d0)) - 2.0d0)))
else if (x1 <= 3.1d-52) then
tmp = t_0
else
tmp = x1 - (((4.0d0 * (x1 * (x2 * (3.0d0 - (2.0d0 * x2))))) - x1) - t_1)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double t_1 = 3.0 * (x1 * ((x1 * 3.0) + -1.0));
double tmp;
if (x1 <= -2.6e+83) {
tmp = x1 + (x1 + t_1);
} else if (x1 <= -1.55e-209) {
tmp = t_0;
} else if (x1 <= 6.5e-234) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else if (x1 <= 3.1e-52) {
tmp = t_0;
} else {
tmp = x1 - (((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1) - t_1);
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) t_1 = 3.0 * (x1 * ((x1 * 3.0) + -1.0)) tmp = 0 if x1 <= -2.6e+83: tmp = x1 + (x1 + t_1) elif x1 <= -1.55e-209: tmp = t_0 elif x1 <= 6.5e-234: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))) elif x1 <= 3.1e-52: tmp = t_0 else: tmp = x1 - (((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1) - t_1) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))) t_1 = Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))) tmp = 0.0 if (x1 <= -2.6e+83) tmp = Float64(x1 + Float64(x1 + t_1)); elseif (x1 <= -1.55e-209) tmp = t_0; elseif (x1 <= 6.5e-234) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)))); elseif (x1 <= 3.1e-52) tmp = t_0; else tmp = Float64(x1 - Float64(Float64(Float64(4.0 * Float64(x1 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))) - x1) - t_1)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); t_1 = 3.0 * (x1 * ((x1 * 3.0) + -1.0)); tmp = 0.0; if (x1 <= -2.6e+83) tmp = x1 + (x1 + t_1); elseif (x1 <= -1.55e-209) tmp = t_0; elseif (x1 <= 6.5e-234) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))); elseif (x1 <= 3.1e-52) tmp = t_0; else tmp = x1 - (((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1) - t_1); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.6e+83], N[(x1 + N[(x1 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.55e-209], t$95$0, If[LessEqual[x1, 6.5e-234], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.1e-52], t$95$0, N[(x1 - N[(N[(N[(4.0 * N[(x1 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
t_1 := 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\\
\mathbf{if}\;x1 \leq -2.6 \cdot 10^{+83}:\\
\;\;\;\;x1 + \left(x1 + t\_1\right)\\
\mathbf{elif}\;x1 \leq -1.55 \cdot 10^{-209}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{-234}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot -12 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.1 \cdot 10^{-52}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1\right) - t\_1\right)\\
\end{array}
\end{array}
if x1 < -2.6000000000000001e83Initial program 11.6%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 48.2%
Taylor expanded in x2 around 0 72.3%
if -2.6000000000000001e83 < x1 < -1.55e-209 or 6.4999999999999994e-234 < x1 < 3.0999999999999999e-52Initial program 99.3%
Taylor expanded in x1 around 0 80.4%
Taylor expanded in x1 around 0 80.9%
if -1.55e-209 < x1 < 6.4999999999999994e-234Initial program 99.9%
Taylor expanded in x1 around 0 77.7%
Taylor expanded in x2 around 0 99.9%
*-commutative99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x1 around 0 99.9%
if 3.0999999999999999e-52 < x1 Initial program 46.1%
Taylor expanded in x1 around 0 18.8%
Taylor expanded in x1 around 0 58.4%
Taylor expanded in x2 around 0 72.9%
Final simplification79.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -2.6e+83)
t_0
(if (<= x1 9.8e+40)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))
(+ (* x1 -3.0) (* x2 -6.0))))
(if (<= x1 4.5e+153)
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(+ (* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))) (* x2 -12.0))
2.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 <= -2.6e+83) {
tmp = t_0;
} else if (x1 <= 9.8e+40) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0)));
} else if (x1 <= 4.5e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) + (x2 * -12.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 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-2.6d+83)) then
tmp = t_0
else if (x1 <= 9.8d+40) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))) + ((x1 * (-3.0d0)) + (x2 * (-6.0d0))))
else if (x1 <= 4.5d+153) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (((x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0)))))) + (x2 * (-12.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 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -2.6e+83) {
tmp = t_0;
} else if (x1 <= 9.8e+40) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0)));
} else if (x1 <= 4.5e+153) {
tmp = x1 + ((x2 * -6.0) + (x1 * (((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) + (x2 * -12.0)) - 2.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 <= -2.6e+83: tmp = t_0 elif x1 <= 9.8e+40: tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0))) elif x1 <= 4.5e+153: tmp = x1 + ((x2 * -6.0) + (x1 * (((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) + (x2 * -12.0)) - 2.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 <= -2.6e+83) tmp = t_0; elseif (x1 <= 9.8e+40) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))) + Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)))); elseif (x1 <= 4.5e+153) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0))))) + Float64(x2 * -12.0)) - 2.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 <= -2.6e+83) tmp = t_0; elseif (x1 <= 9.8e+40) tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0))); elseif (x1 <= 4.5e+153) tmp = x1 + ((x2 * -6.0) + (x1 * (((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) + (x2 * -12.0)) - 2.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, -2.6e+83], t$95$0, If[LessEqual[x1, 9.8e+40], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision] - 2.0), $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 -2.6 \cdot 10^{+83}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 9.8 \cdot 10^{+40}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right) + \left(x1 \cdot -3 + x2 \cdot -6\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(\left(x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right) + x2 \cdot -12\right) - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -2.6000000000000001e83 or 4.5000000000000001e153 < x1 Initial program 6.3%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 60.9%
Taylor expanded in x2 around 0 85.1%
if -2.6000000000000001e83 < x1 < 9.80000000000000095e40Initial program 99.4%
Taylor expanded in x1 around 0 78.6%
Taylor expanded in x1 around 0 76.9%
Taylor expanded in x2 around 0 87.0%
Taylor expanded in x1 around 0 88.7%
if 9.80000000000000095e40 < x1 < 4.5000000000000001e153Initial program 99.6%
Taylor expanded in x1 around 0 20.6%
Taylor expanded in x2 around 0 3.4%
*-commutative3.4%
*-commutative3.4%
Simplified3.4%
Taylor expanded in x1 around 0 59.9%
Final simplification85.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0)))))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -2.6e+83)
t_1
(if (<= x1 -7e-210)
t_0
(if (<= x1 1.8e-229)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x2 -12.0) 2.0))))
(if (<= x1 3.6e+134) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -2.6e+83) {
tmp = t_1;
} else if (x1 <= -7e-210) {
tmp = t_0;
} else if (x1 <= 1.8e-229) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else if (x1 <= 3.6e+134) {
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 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-2.6d+83)) then
tmp = t_1
else if (x1 <= (-7d-210)) then
tmp = t_0
else if (x1 <= 1.8d-229) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * (-12.0d0)) - 2.0d0)))
else if (x1 <= 3.6d+134) 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 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -2.6e+83) {
tmp = t_1;
} else if (x1 <= -7e-210) {
tmp = t_0;
} else if (x1 <= 1.8e-229) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else if (x1 <= 3.6e+134) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -2.6e+83: tmp = t_1 elif x1 <= -7e-210: tmp = t_0 elif x1 <= 1.8e-229: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))) elif x1 <= 3.6e+134: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -2.6e+83) tmp = t_1; elseif (x1 <= -7e-210) tmp = t_0; elseif (x1 <= 1.8e-229) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)))); elseif (x1 <= 3.6e+134) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -2.6e+83) tmp = t_1; elseif (x1 <= -7e-210) tmp = t_0; elseif (x1 <= 1.8e-229) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))); elseif (x1 <= 3.6e+134) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, 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, -2.6e+83], t$95$1, If[LessEqual[x1, -7e-210], t$95$0, If[LessEqual[x1, 1.8e-229], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.6e+134], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.6 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -7 \cdot 10^{-210}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{-229}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot -12 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.6 \cdot 10^{+134}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -2.6000000000000001e83 or 3.59999999999999988e134 < x1 Initial program 9.6%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 59.1%
Taylor expanded in x2 around 0 82.4%
if -2.6000000000000001e83 < x1 < -7.00000000000000031e-210 or 1.80000000000000001e-229 < x1 < 3.59999999999999988e134Initial program 99.3%
Taylor expanded in x1 around 0 73.1%
Taylor expanded in x1 around 0 73.1%
if -7.00000000000000031e-210 < x1 < 1.80000000000000001e-229Initial program 99.9%
Taylor expanded in x1 around 0 77.7%
Taylor expanded in x2 around 0 99.9%
*-commutative99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x1 around 0 99.9%
Final simplification79.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (- 9.0 (- (* 4.0 (* x1 (* x2 (- 3.0 (* 2.0 x2))))) x1))))
(t_1 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -2.4e+83)
t_1
(if (<= x1 -2.95e-61)
t_0
(if (<= x1 2.05e-100)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x2 -12.0) 2.0))))
(if (<= x1 3.6e+134) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 + (9.0 - ((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -2.4e+83) {
tmp = t_1;
} else if (x1 <= -2.95e-61) {
tmp = t_0;
} else if (x1 <= 2.05e-100) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else if (x1 <= 3.6e+134) {
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 + (9.0d0 - ((4.0d0 * (x1 * (x2 * (3.0d0 - (2.0d0 * x2))))) - x1))
t_1 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-2.4d+83)) then
tmp = t_1
else if (x1 <= (-2.95d-61)) then
tmp = t_0
else if (x1 <= 2.05d-100) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * (-12.0d0)) - 2.0d0)))
else if (x1 <= 3.6d+134) 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 + (9.0 - ((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1));
double t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -2.4e+83) {
tmp = t_1;
} else if (x1 <= -2.95e-61) {
tmp = t_0;
} else if (x1 <= 2.05e-100) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else if (x1 <= 3.6e+134) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (9.0 - ((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1)) t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) tmp = 0 if x1 <= -2.4e+83: tmp = t_1 elif x1 <= -2.95e-61: tmp = t_0 elif x1 <= 2.05e-100: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))) elif x1 <= 3.6e+134: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(9.0 - Float64(Float64(4.0 * Float64(x1 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))) - x1))) t_1 = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))))) tmp = 0.0 if (x1 <= -2.4e+83) tmp = t_1; elseif (x1 <= -2.95e-61) tmp = t_0; elseif (x1 <= 2.05e-100) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)))); elseif (x1 <= 3.6e+134) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (9.0 - ((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1)); t_1 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); tmp = 0.0; if (x1 <= -2.4e+83) tmp = t_1; elseif (x1 <= -2.95e-61) tmp = t_0; elseif (x1 <= 2.05e-100) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))); elseif (x1 <= 3.6e+134) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(9.0 - N[(N[(4.0 * N[(x1 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $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, -2.4e+83], t$95$1, If[LessEqual[x1, -2.95e-61], t$95$0, If[LessEqual[x1, 2.05e-100], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.6e+134], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(9 - \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1\right)\right)\\
t_1 := x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.4 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -2.95 \cdot 10^{-61}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 2.05 \cdot 10^{-100}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot -12 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.6 \cdot 10^{+134}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -2.39999999999999991e83 or 3.59999999999999988e134 < x1 Initial program 9.6%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 59.1%
Taylor expanded in x2 around 0 82.4%
if -2.39999999999999991e83 < x1 < -2.94999999999999986e-61 or 2.0499999999999999e-100 < x1 < 3.59999999999999988e134Initial program 99.4%
Taylor expanded in x1 around 0 60.1%
Taylor expanded in x1 around inf 42.5%
if -2.94999999999999986e-61 < x1 < 2.0499999999999999e-100Initial program 99.4%
Taylor expanded in x1 around 0 84.2%
Taylor expanded in x2 around 0 80.8%
*-commutative80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in x1 around 0 81.1%
Final simplification70.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -2.6e+83)
(+ x1 (+ x1 t_0))
(if (<= x1 1.5542e-30)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))
(+ (* x1 -3.0) (* x2 -6.0))))
(- x1 (- (- (* 4.0 (* x1 (* x2 (- 3.0 (* 2.0 x2))))) x1) t_0))))))
double code(double x1, double x2) {
double t_0 = 3.0 * (x1 * ((x1 * 3.0) + -1.0));
double tmp;
if (x1 <= -2.6e+83) {
tmp = x1 + (x1 + t_0);
} else if (x1 <= 1.5542e-30) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0)));
} else {
tmp = x1 - (((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1) - 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 = 3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))
if (x1 <= (-2.6d+83)) then
tmp = x1 + (x1 + t_0)
else if (x1 <= 1.5542d-30) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))) + ((x1 * (-3.0d0)) + (x2 * (-6.0d0))))
else
tmp = x1 - (((4.0d0 * (x1 * (x2 * (3.0d0 - (2.0d0 * x2))))) - x1) - t_0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * (x1 * ((x1 * 3.0) + -1.0));
double tmp;
if (x1 <= -2.6e+83) {
tmp = x1 + (x1 + t_0);
} else if (x1 <= 1.5542e-30) {
tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0)));
} else {
tmp = x1 - (((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1) - t_0);
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * (x1 * ((x1 * 3.0) + -1.0)) tmp = 0 if x1 <= -2.6e+83: tmp = x1 + (x1 + t_0) elif x1 <= 1.5542e-30: tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0))) else: tmp = x1 - (((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1) - t_0) return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))) tmp = 0.0 if (x1 <= -2.6e+83) tmp = Float64(x1 + Float64(x1 + t_0)); elseif (x1 <= 1.5542e-30) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))) + Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)))); else tmp = Float64(x1 - Float64(Float64(Float64(4.0 * Float64(x1 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2))))) - x1) - t_0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * (x1 * ((x1 * 3.0) + -1.0)); tmp = 0.0; if (x1 <= -2.6e+83) tmp = x1 + (x1 + t_0); elseif (x1 <= 1.5542e-30) tmp = x1 + ((x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))) + ((x1 * -3.0) + (x2 * -6.0))); else tmp = x1 - (((4.0 * (x1 * (x2 * (3.0 - (2.0 * x2))))) - x1) - t_0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.6e+83], N[(x1 + N[(x1 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5542e-30], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(N[(4.0 * N[(x1 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] - t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\\
\mathbf{if}\;x1 \leq -2.6 \cdot 10^{+83}:\\
\;\;\;\;x1 + \left(x1 + t\_0\right)\\
\mathbf{elif}\;x1 \leq 1.5542 \cdot 10^{-30}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right) + \left(x1 \cdot -3 + x2 \cdot -6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(\left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1\right) - t\_0\right)\\
\end{array}
\end{array}
if x1 < -2.6000000000000001e83Initial program 11.6%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 48.2%
Taylor expanded in x2 around 0 72.3%
if -2.6000000000000001e83 < x1 < 1.55419999999999993e-30Initial program 99.4%
Taylor expanded in x1 around 0 79.7%
Taylor expanded in x1 around 0 77.8%
Taylor expanded in x2 around 0 88.7%
Taylor expanded in x1 around 0 90.6%
if 1.55419999999999993e-30 < x1 Initial program 43.7%
Taylor expanded in x1 around 0 16.5%
Taylor expanded in x1 around 0 57.9%
Taylor expanded in x2 around 0 73.0%
Final simplification83.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -2.55e+82)
t_0
(if (<= x1 1.28e-86)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x2 -12.0) 2.0))))
(if (<= x1 3.6e+134)
(+ 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 <= -2.55e+82) {
tmp = t_0;
} else if (x1 <= 1.28e-86) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else if (x1 <= 3.6e+134) {
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 <= (-2.55d+82)) then
tmp = t_0
else if (x1 <= 1.28d-86) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * (-12.0d0)) - 2.0d0)))
else if (x1 <= 3.6d+134) 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 <= -2.55e+82) {
tmp = t_0;
} else if (x1 <= 1.28e-86) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else if (x1 <= 3.6e+134) {
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 <= -2.55e+82: tmp = t_0 elif x1 <= 1.28e-86: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))) elif x1 <= 3.6e+134: 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 <= -2.55e+82) tmp = t_0; elseif (x1 <= 1.28e-86) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)))); elseif (x1 <= 3.6e+134) 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 <= -2.55e+82) tmp = t_0; elseif (x1 <= 1.28e-86) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))); elseif (x1 <= 3.6e+134) 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, -2.55e+82], t$95$0, If[LessEqual[x1, 1.28e-86], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.6e+134], 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 -2.55 \cdot 10^{+82}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.28 \cdot 10^{-86}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot -12 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.6 \cdot 10^{+134}:\\
\;\;\;\;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 < -2.5500000000000001e82 or 3.59999999999999988e134 < x1 Initial program 11.8%
Taylor expanded in x1 around 0 1.4%
Taylor expanded in x1 around 0 57.7%
Taylor expanded in x2 around 0 80.5%
if -2.5500000000000001e82 < x1 < 1.27999999999999992e-86Initial program 99.4%
Taylor expanded in x1 around 0 78.8%
Taylor expanded in x2 around 0 68.1%
*-commutative68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in x1 around 0 68.5%
if 1.27999999999999992e-86 < x1 < 3.59999999999999988e134Initial program 99.4%
Taylor expanded in x1 around 0 58.5%
Taylor expanded in x1 around inf 43.7%
Final simplification68.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0)))))))
(if (<= x1 -2.55e+82)
t_0
(if (<= x1 880000000.0)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x2 -12.0) 2.0))))
(if (<= x1 5.6e+150) (* x2 (- (/ x1 x2) 6.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 <= -2.55e+82) {
tmp = t_0;
} else if (x1 <= 880000000.0) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else if (x1 <= 5.6e+150) {
tmp = x2 * ((x1 / x2) - 6.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.0d0)))))
if (x1 <= (-2.55d+82)) then
tmp = t_0
else if (x1 <= 880000000.0d0) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * (-12.0d0)) - 2.0d0)))
else if (x1 <= 5.6d+150) then
tmp = x2 * ((x1 / x2) - 6.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
double tmp;
if (x1 <= -2.55e+82) {
tmp = t_0;
} else if (x1 <= 880000000.0) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else if (x1 <= 5.6e+150) {
tmp = x2 * ((x1 / x2) - 6.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 <= -2.55e+82: tmp = t_0 elif x1 <= 880000000.0: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))) elif x1 <= 5.6e+150: tmp = x2 * ((x1 / x2) - 6.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 <= -2.55e+82) tmp = t_0; elseif (x1 <= 880000000.0) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)))); elseif (x1 <= 5.6e+150) tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.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 <= -2.55e+82) tmp = t_0; elseif (x1 <= 880000000.0) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))); elseif (x1 <= 5.6e+150) tmp = x2 * ((x1 / x2) - 6.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, -2.55e+82], t$95$0, If[LessEqual[x1, 880000000.0], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.6e+150], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $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 -2.55 \cdot 10^{+82}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 880000000:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot -12 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 5.6 \cdot 10^{+150}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -2.5500000000000001e82 or 5.60000000000000018e150 < x1 Initial program 9.6%
Taylor expanded in x1 around 0 1.3%
Taylor expanded in x1 around 0 58.9%
Taylor expanded in x2 around 0 82.3%
if -2.5500000000000001e82 < x1 < 8.8e8Initial program 99.4%
Taylor expanded in x1 around 0 80.1%
Taylor expanded in x2 around 0 63.5%
*-commutative63.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in x1 around 0 63.7%
if 8.8e8 < x1 < 5.60000000000000018e150Initial program 99.4%
Taylor expanded in x1 around 0 26.9%
Taylor expanded in x1 around 0 3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x2 around inf 25.3%
Final simplification66.4%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -1.7e-178) (not (<= x1 3e+151))) (+ x1 (+ x1 (* 3.0 (* x1 (+ (* x1 3.0) -1.0))))) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.7e-178) || !(x1 <= 3e+151)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.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.7d-178)) .or. (.not. (x1 <= 3d+151))) then
tmp = x1 + (x1 + (3.0d0 * (x1 * ((x1 * 3.0d0) + (-1.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.7e-178) || !(x1 <= 3e+151)) {
tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0))));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -1.7e-178) or not (x1 <= 3e+151): tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -1.7e-178) || !(x1 <= 3e+151)) tmp = Float64(x1 + Float64(x1 + Float64(3.0 * Float64(x1 * Float64(Float64(x1 * 3.0) + -1.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.7e-178) || ~((x1 <= 3e+151))) tmp = x1 + (x1 + (3.0 * (x1 * ((x1 * 3.0) + -1.0)))); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -1.7e-178], N[Not[LessEqual[x1, 3e+151]], $MachinePrecision]], N[(x1 + N[(x1 + N[(3.0 * N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.7 \cdot 10^{-178} \lor \neg \left(x1 \leq 3 \cdot 10^{+151}\right):\\
\;\;\;\;x1 + \left(x1 + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3 + -1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -1.69999999999999986e-178 or 2.9999999999999999e151 < x1 Initial program 47.9%
Taylor expanded in x1 around 0 33.5%
Taylor expanded in x1 around 0 65.2%
Taylor expanded in x2 around 0 62.2%
if -1.69999999999999986e-178 < x1 < 2.9999999999999999e151Initial program 99.6%
Taylor expanded in x1 around 0 71.6%
Taylor expanded in x1 around 0 45.6%
*-commutative45.6%
Simplified45.6%
Taylor expanded in x2 around inf 49.9%
Final simplification56.9%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -1.05e+217) (+ x1 (* x1 (+ 1.0 (* x2 -12.0)))) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -1.05e+217) {
tmp = x1 + (x1 * (1.0 + (x2 * -12.0)));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-1.05d+217)) then
tmp = x1 + (x1 * (1.0d0 + (x2 * (-12.0d0))))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -1.05e+217) {
tmp = x1 + (x1 * (1.0 + (x2 * -12.0)));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -1.05e+217: tmp = x1 + (x1 * (1.0 + (x2 * -12.0))) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -1.05e+217) tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(x2 * -12.0)))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -1.05e+217) tmp = x1 + (x1 * (1.0 + (x2 * -12.0))); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -1.05e+217], N[(x1 + N[(x1 * N[(1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.05 \cdot 10^{+217}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + x2 \cdot -12\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x2 < -1.05e217Initial program 61.9%
Taylor expanded in x1 around 0 57.5%
Taylor expanded in x2 around 0 12.1%
*-commutative12.1%
*-commutative12.1%
Simplified12.1%
Taylor expanded in x1 around inf 41.0%
if -1.05e217 < x2 Initial program 71.1%
Taylor expanded in x1 around 0 49.3%
Taylor expanded in x1 around 0 27.4%
*-commutative27.4%
Simplified27.4%
Taylor expanded in x2 around inf 35.0%
Final simplification35.5%
(FPCore (x1 x2) :precision binary64 (* x2 (- (/ x1 x2) 6.0)))
double code(double x1, double x2) {
return x2 * ((x1 / x2) - 6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * ((x1 / x2) - 6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * ((x1 / x2) - 6.0);
}
def code(x1, x2): return x2 * ((x1 / x2) - 6.0)
function code(x1, x2) return Float64(x2 * Float64(Float64(x1 / x2) - 6.0)) end
function tmp = code(x1, x2) tmp = x2 * ((x1 / x2) - 6.0); end
code[x1_, x2_] := N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot \left(\frac{x1}{x2} - 6\right)
\end{array}
Initial program 70.3%
Taylor expanded in x1 around 0 50.0%
Taylor expanded in x1 around 0 26.0%
*-commutative26.0%
Simplified26.0%
Taylor expanded in x2 around inf 32.9%
(FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x2 * (-6.0d0))
end function
public static double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
def code(x1, x2): return x1 + (x2 * -6.0)
function code(x1, x2) return Float64(x1 + Float64(x2 * -6.0)) end
function tmp = code(x1, x2) tmp = x1 + (x2 * -6.0); end
code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + x2 \cdot -6
\end{array}
Initial program 70.3%
Taylor expanded in x1 around 0 50.0%
Taylor expanded in x1 around 0 26.0%
*-commutative26.0%
Simplified26.0%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 70.3%
Taylor expanded in x1 around 0 50.0%
Taylor expanded in x1 around 0 26.0%
*-commutative26.0%
Simplified26.0%
Taylor expanded in x1 around 0 25.7%
*-commutative25.7%
Simplified25.7%
(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 70.3%
Taylor expanded in x1 around 0 50.0%
Taylor expanded in x1 around 0 26.0%
*-commutative26.0%
Simplified26.0%
Taylor expanded in x1 around inf 3.4%
herbie shell --seed 2024096
(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))))))