
(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 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* 3.0 (* x1 x1))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_4 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_0 4.0 -6.0)) (* (* x1 (* 2.0 t_0)) (+ t_0 -3.0)))
(fma t_4 t_0 (pow x1 3.0))))))
(- (* (pow x1 4.0) (+ 6.0 (/ -3.0 x1))) x1))))
double code(double x1, double x2) {
double t_0 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (x1 * x1);
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_0, 4.0, -6.0)), ((x1 * (2.0 * t_0)) * (t_0 + -3.0))), fma(t_4, t_0, pow(x1, 3.0)))));
} else {
tmp = (pow(x1, 4.0) * (6.0 + (-3.0 / x1))) - x1;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(3.0 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_0, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_0)) * Float64(t_0 + -3.0))), fma(t_4, t_0, (x1 ^ 3.0)))))); else tmp = Float64(Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-3.0 / x1))) - x1); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$4 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * t$95$0 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 3 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_4 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_0, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_0\right)\right) \cdot \left(t\_0 + -3\right)\right), \mathsf{fma}\left(t\_4, t\_0, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{-3}{x1}\right) - x1\\
\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.5%
Simplified99.6%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
associate-+r+100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
*-commutative100.0%
mul-1-neg100.0%
sub-neg100.0%
associate-*r/100.0%
metadata-eval100.0%
distribute-neg-frac100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (/ (- (fma (* x1 3.0) x1 (* 2.0 x2)) x1) (fma x1 x1 1.0))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_1 t_3))
t_0))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(+
(+
t_0
(fma
(fma (* (* x1 2.0) t_4) (+ -3.0 t_4) (* (* x1 x1) (fma 4.0 t_4 -6.0)))
(fma x1 x1 1.0)
(* t_1 t_4)))
(+ x1 (* 3.0 (/ (- t_1 (+ x1 (* 2.0 x2))) (fma x1 x1 1.0))))))
(- (* (pow x1 4.0) (+ 6.0 (/ -3.0 x1))) x1))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = (fma((x1 * 3.0), x1, (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + ((t_0 + fma(fma(((x1 * 2.0) * t_4), (-3.0 + t_4), ((x1 * x1) * fma(4.0, t_4, -6.0))), fma(x1, x1, 1.0), (t_1 * t_4))) + (x1 + (3.0 * ((t_1 - (x1 + (2.0 * x2))) / fma(x1, x1, 1.0)))));
} else {
tmp = (pow(x1, 4.0) * (6.0 + (-3.0 / x1))) - x1;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(Float64(fma(Float64(x1 * 3.0), x1, Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + t_0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + Float64(Float64(t_0 + fma(fma(Float64(Float64(x1 * 2.0) * t_4), Float64(-3.0 + t_4), Float64(Float64(x1 * x1) * fma(4.0, t_4, -6.0))), fma(x1, x1, 1.0), Float64(t_1 * t_4))) + Float64(x1 + Float64(3.0 * Float64(Float64(t_1 - Float64(x1 + Float64(2.0 * x2))) / fma(x1, x1, 1.0)))))); else tmp = Float64(Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-3.0 / x1))) - x1); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(t$95$0 + N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(-3.0 + t$95$4), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(4.0 * t$95$4 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1 + 1.0), $MachinePrecision] + N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(3.0 * N[(N[(t$95$1 - N[(x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := \frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + t\_0\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \left(\left(t\_0 + \mathsf{fma}\left(\mathsf{fma}\left(\left(x1 \cdot 2\right) \cdot t\_4, -3 + t\_4, \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(4, t\_4, -6\right)\right), \mathsf{fma}\left(x1, x1, 1\right), t\_1 \cdot t\_4\right)\right) + \left(x1 + 3 \cdot \frac{t\_1 - \left(x1 + 2 \cdot x2\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{-3}{x1}\right) - x1\\
\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.5%
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 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
associate-+r+100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
*-commutative100.0%
mul-1-neg100.0%
sub-neg100.0%
associate-*r/100.0%
metadata-eval100.0%
distribute-neg-frac100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
(if (<= t_3 INFINITY) t_3 (- (* (pow x1 4.0) (+ 6.0 (/ -3.0 x1))) x1))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = (pow(x1, 4.0) * (6.0 + (-3.0 / x1))) - x1;
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = (Math.pow(x1, 4.0) * (6.0 + (-3.0 / x1))) - x1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = (math.pow(x1, 4.0) * (6.0 + (-3.0 / x1))) - x1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-3.0 / x1))) - x1); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = ((x1 ^ 4.0) * (6.0 + (-3.0 / x1))) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{-3}{x1}\right) - x1\\
\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.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 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
associate-+r+100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
*-commutative100.0%
mul-1-neg100.0%
sub-neg100.0%
associate-*r/100.0%
metadata-eval100.0%
distribute-neg-frac100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -5.6e+102) (not (<= x1 2e+77)))
(- (* (pow x1 4.0) (+ 6.0 (/ -3.0 x1))) x1)
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* 3.0 t_0))))
(+ (* x2 -6.0) (* x1 -3.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -5.6e+102) || !(x1 <= 2e+77)) {
tmp = (pow(x1, 4.0) * (6.0 + (-3.0 / x1))) - x1;
} else {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0)))) + ((x2 * -6.0) + (x1 * -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) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-5.6d+102)) .or. (.not. (x1 <= 2d+77))) then
tmp = ((x1 ** 4.0d0) * (6.0d0 + ((-3.0d0) / x1))) - x1
else
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (3.0d0 * t_0)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -5.6e+102) || !(x1 <= 2e+77)) {
tmp = (Math.pow(x1, 4.0) * (6.0 + (-3.0 / x1))) - x1;
} else {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0)))) + ((x2 * -6.0) + (x1 * -3.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -5.6e+102) or not (x1 <= 2e+77): tmp = (math.pow(x1, 4.0) * (6.0 + (-3.0 / x1))) - x1 else: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0)))) + ((x2 * -6.0) + (x1 * -3.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -5.6e+102) || !(x1 <= 2e+77)) tmp = Float64(Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-3.0 / x1))) - x1); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(3.0 * t_0)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -5.6e+102) || ~((x1 <= 2e+77))) tmp = ((x1 ^ 4.0) * (6.0 + (-3.0 / x1))) - x1; else tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0)))) + ((x2 * -6.0) + (x1 * -3.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -5.6e+102], N[Not[LessEqual[x1, 2e+77]], $MachinePrecision]], N[(N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102} \lor \neg \left(x1 \leq 2 \cdot 10^{+77}\right):\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{-3}{x1}\right) - x1\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + 3 \cdot t\_0\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102 or 1.99999999999999997e77 < x1 Initial program 22.3%
Taylor expanded in x1 around inf 22.3%
Taylor expanded in x1 around 0 22.3%
Taylor expanded in x1 around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x2 around 0 100.0%
associate-+r+100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
*-commutative100.0%
mul-1-neg100.0%
sub-neg100.0%
associate-*r/100.0%
metadata-eval100.0%
distribute-neg-frac100.0%
metadata-eval100.0%
Simplified100.0%
if -5.60000000000000037e102 < x1 < 1.99999999999999997e77Initial program 99.4%
Taylor expanded in x1 around inf 98.6%
Taylor expanded in x1 around 0 99.4%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))
(t_2 (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0)))))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (/ (- (+ t_0 (* 2.0 x2)) x1) t_3)))
(if (<= x1 -8.5e+150)
t_2
(if (<= x1 -5.6e+102)
(+
x1
(+
9.0
(+
x1
(*
x1
(+
t_1
(*
x1
(-
(+
(* x2 -4.0)
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_1 (* 4.0 (* x2 (+ 3.0 (* x2 -2.0))))) 6.0)))))
6.0)))))))
(if (<= x1 5e+153)
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_3
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(* (* x1 x1) (- (* t_4 4.0) 6.0))))
(* 3.0 t_0))))
(+ (* x2 -6.0) (* x1 -3.0))))
t_2)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_3;
double tmp;
if (x1 <= -8.5e+150) {
tmp = t_2;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0))))));
} else if (x1 <= 5e+153) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + (3.0 * t_0)))) + ((x2 * -6.0) + (x1 * -3.0)));
} 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) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))
t_2 = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
t_3 = (x1 * x1) + 1.0d0
t_4 = ((t_0 + (2.0d0 * x2)) - x1) / t_3
if (x1 <= (-8.5d+150)) then
tmp = t_2
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (9.0d0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * (-4.0d0)) + ((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_1 + (4.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))) - 6.0d0))))) - 6.0d0))))))
else if (x1 <= 5d+153) then
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_3 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + ((x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)))) + (3.0d0 * t_0)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_3;
double tmp;
if (x1 <= -8.5e+150) {
tmp = t_2;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0))))));
} else if (x1 <= 5e+153) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + (3.0 * t_0)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0)) t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) t_3 = (x1 * x1) + 1.0 t_4 = ((t_0 + (2.0 * x2)) - x1) / t_3 tmp = 0 if x1 <= -8.5e+150: tmp = t_2 elif x1 <= -5.6e+102: tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0)))))) elif x1 <= 5e+153: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + (3.0 * t_0)))) + ((x2 * -6.0) + (x1 * -3.0))) else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) t_2 = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_3) tmp = 0.0 if (x1 <= -8.5e+150) tmp = t_2; elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * -4.0) + Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(4.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))) - 6.0))))) - 6.0))))))); elseif (x1 <= 5e+153) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)))) + Float64(3.0 * t_0)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0)); t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); t_3 = (x1 * x1) + 1.0; t_4 = ((t_0 + (2.0 * x2)) - x1) / t_3; tmp = 0.0; if (x1 <= -8.5e+150) tmp = t_2; elseif (x1 <= -5.6e+102) tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0)))))); elseif (x1 <= 5e+153) tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_3 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + (3.0 * t_0)))) + ((x2 * -6.0) + (x1 * -3.0))); else tmp = t_2; 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[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, If[LessEqual[x1, -8.5e+150], t$95$2, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(9.0 + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(4.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\\
t_2 := x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_3}\\
\mathbf{if}\;x1 \leq -8.5 \cdot 10^{+150}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(\left(x2 \cdot -4 + \left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + 4 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - 6\right)\right)\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_4 \cdot 4 - 6\right)\right) + 3 \cdot t\_0\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -8.4999999999999999e150 or 5.00000000000000018e153 < x1 Initial program 1.5%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 59.7%
Taylor expanded in x2 around 0 98.7%
if -8.4999999999999999e150 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 85.7%
if -5.60000000000000037e102 < x1 < 5.00000000000000018e153Initial program 99.5%
Taylor expanded in x1 around inf 98.8%
Taylor expanded in x1 around 0 99.5%
Final simplification98.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (* 4.0 (* x2 t_0)))
(t_2 (- 3.0 (* 2.0 x2)))
(t_3 (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0)))))
(t_4 (* x1 (* x1 3.0)))
(t_5 (+ (* x1 x1) 1.0))
(t_6 (/ (- (+ t_4 (* 2.0 x2)) x1) t_5)))
(if (<= x1 -8.5e+150)
t_3
(if (<= x1 -5.6e+102)
(+
x1
(+
(* 3.0 (/ (- (- t_4 (* 2.0 x2)) x1) t_5))
(+
x1
(*
x1
(+
t_1
(*
x1
(+
3.0
(+
(* 2.0 (+ (* x2 -2.0) t_2))
(+
(* x2 8.0)
(*
x1
(-
(+
t_1
(*
2.0
(+
(+ 1.0 (+ (* 2.0 (* x2 (+ 3.0 (* x2 -2.0)))) (* 3.0 t_0)))
(* 2.0 (* x2 t_2)))))
3.0)))))))))))
(if (<= x1 5e+153)
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_5
(+
(* (* (* x1 2.0) t_6) (- t_6 3.0))
(* (* x1 x1) (- (* t_6 4.0) 6.0))))
(* 3.0 t_4))))
(+ (* x2 -6.0) (* x1 -3.0))))
t_3)))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (x2 * t_0);
double t_2 = 3.0 - (2.0 * x2);
double t_3 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_4 = x1 * (x1 * 3.0);
double t_5 = (x1 * x1) + 1.0;
double t_6 = ((t_4 + (2.0 * x2)) - x1) / t_5;
double tmp;
if (x1 <= -8.5e+150) {
tmp = t_3;
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_5)) + (x1 + (x1 * (t_1 + (x1 * (3.0 + ((2.0 * ((x2 * -2.0) + t_2)) + ((x2 * 8.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_2))))) - 3.0))))))))));
} else if (x1 <= 5e+153) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_5 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + ((x1 * x1) * ((t_6 * 4.0) - 6.0)))) + (3.0 * t_4)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = 4.0d0 * (x2 * t_0)
t_2 = 3.0d0 - (2.0d0 * x2)
t_3 = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
t_4 = x1 * (x1 * 3.0d0)
t_5 = (x1 * x1) + 1.0d0
t_6 = ((t_4 + (2.0d0 * x2)) - x1) / t_5
if (x1 <= (-8.5d+150)) then
tmp = t_3
else if (x1 <= (-5.6d+102)) then
tmp = x1 + ((3.0d0 * (((t_4 - (2.0d0 * x2)) - x1) / t_5)) + (x1 + (x1 * (t_1 + (x1 * (3.0d0 + ((2.0d0 * ((x2 * (-2.0d0)) + t_2)) + ((x2 * 8.0d0) + (x1 * ((t_1 + (2.0d0 * ((1.0d0 + ((2.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0))))) + (3.0d0 * t_0))) + (2.0d0 * (x2 * t_2))))) - 3.0d0))))))))))
else if (x1 <= 5d+153) then
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_5 * ((((x1 * 2.0d0) * t_6) * (t_6 - 3.0d0)) + ((x1 * x1) * ((t_6 * 4.0d0) - 6.0d0)))) + (3.0d0 * t_4)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = 4.0 * (x2 * t_0);
double t_2 = 3.0 - (2.0 * x2);
double t_3 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_4 = x1 * (x1 * 3.0);
double t_5 = (x1 * x1) + 1.0;
double t_6 = ((t_4 + (2.0 * x2)) - x1) / t_5;
double tmp;
if (x1 <= -8.5e+150) {
tmp = t_3;
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_5)) + (x1 + (x1 * (t_1 + (x1 * (3.0 + ((2.0 * ((x2 * -2.0) + t_2)) + ((x2 * 8.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_2))))) - 3.0))))))))));
} else if (x1 <= 5e+153) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_5 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + ((x1 * x1) * ((t_6 * 4.0) - 6.0)))) + (3.0 * t_4)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else {
tmp = t_3;
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = 4.0 * (x2 * t_0) t_2 = 3.0 - (2.0 * x2) t_3 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) t_4 = x1 * (x1 * 3.0) t_5 = (x1 * x1) + 1.0 t_6 = ((t_4 + (2.0 * x2)) - x1) / t_5 tmp = 0 if x1 <= -8.5e+150: tmp = t_3 elif x1 <= -5.6e+102: tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_5)) + (x1 + (x1 * (t_1 + (x1 * (3.0 + ((2.0 * ((x2 * -2.0) + t_2)) + ((x2 * 8.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_2))))) - 3.0)))))))))) elif x1 <= 5e+153: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_5 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + ((x1 * x1) * ((t_6 * 4.0) - 6.0)))) + (3.0 * t_4)))) + ((x2 * -6.0) + (x1 * -3.0))) else: tmp = t_3 return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(4.0 * Float64(x2 * t_0)) t_2 = Float64(3.0 - Float64(2.0 * x2)) t_3 = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(Float64(x1 * x1) + 1.0) t_6 = Float64(Float64(Float64(t_4 + Float64(2.0 * x2)) - x1) / t_5) tmp = 0.0 if (x1 <= -8.5e+150) tmp = t_3; elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_4 - Float64(2.0 * x2)) - x1) / t_5)) + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(3.0 + Float64(Float64(2.0 * Float64(Float64(x2 * -2.0) + t_2)) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(2.0 * Float64(Float64(1.0 + Float64(Float64(2.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0)))) + Float64(3.0 * t_0))) + Float64(2.0 * Float64(x2 * t_2))))) - 3.0))))))))))); elseif (x1 <= 5e+153) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_5 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_6) * Float64(t_6 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0)))) + Float64(3.0 * t_4)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); else tmp = t_3; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = 4.0 * (x2 * t_0); t_2 = 3.0 - (2.0 * x2); t_3 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); t_4 = x1 * (x1 * 3.0); t_5 = (x1 * x1) + 1.0; t_6 = ((t_4 + (2.0 * x2)) - x1) / t_5; tmp = 0.0; if (x1 <= -8.5e+150) tmp = t_3; elseif (x1 <= -5.6e+102) tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_5)) + (x1 + (x1 * (t_1 + (x1 * (3.0 + ((2.0 * ((x2 * -2.0) + t_2)) + ((x2 * 8.0) + (x1 * ((t_1 + (2.0 * ((1.0 + ((2.0 * (x2 * (3.0 + (x2 * -2.0)))) + (3.0 * t_0))) + (2.0 * (x2 * t_2))))) - 3.0)))))))))); elseif (x1 <= 5e+153) tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_5 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + ((x1 * x1) * ((t_6 * 4.0) - 6.0)))) + (3.0 * t_4)))) + ((x2 * -6.0) + (x1 * -3.0))); else tmp = t_3; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$4 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$5), $MachinePrecision]}, If[LessEqual[x1, -8.5e+150], t$95$3, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$4 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(3.0 + N[(N[(2.0 * N[(N[(x2 * -2.0), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(2.0 * N[(N[(1.0 + N[(N[(2.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(x2 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$5 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * N[(t$95$6 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := 4 \cdot \left(x2 \cdot t\_0\right)\\
t_2 := 3 - 2 \cdot x2\\
t_3 := x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := x1 \cdot x1 + 1\\
t_6 := \frac{\left(t\_4 + 2 \cdot x2\right) - x1}{t\_5}\\
\mathbf{if}\;x1 \leq -8.5 \cdot 10^{+150}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_4 - 2 \cdot x2\right) - x1}{t\_5} + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(3 + \left(2 \cdot \left(x2 \cdot -2 + t\_2\right) + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + 2 \cdot \left(\left(1 + \left(2 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right) + 3 \cdot t\_0\right)\right) + 2 \cdot \left(x2 \cdot t\_2\right)\right)\right) - 3\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_5 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_6\right) \cdot \left(t\_6 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_6 \cdot 4 - 6\right)\right) + 3 \cdot t\_4\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x1 < -8.4999999999999999e150 or 5.00000000000000018e153 < x1 Initial program 1.5%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 59.7%
Taylor expanded in x2 around 0 98.7%
if -8.4999999999999999e150 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 100.0%
if -5.60000000000000037e102 < x1 < 5.00000000000000018e153Initial program 99.5%
Taylor expanded in x1 around inf 98.8%
Taylor expanded in x1 around 0 99.5%
Final simplification99.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))
(t_2 (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0)))))
(t_3 (* x1 (* x1 3.0)))
(t_4 (/ (- (+ t_3 (* 2.0 x2)) x1) t_0)))
(if (<= x1 -8.5e+150)
t_2
(if (<= x1 -5.6e+102)
(+
x1
(+
9.0
(+
x1
(*
x1
(+
t_1
(*
x1
(-
(+
(* x2 -4.0)
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_1 (* 4.0 (* x2 (+ 3.0 (* x2 -2.0))))) 6.0)))))
6.0)))))))
(if (<= x1 5e+153)
(+
x1
(+
(+ (* x2 -6.0) (* x1 -3.0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_3)
(*
t_0
(+ (* (* (* x1 2.0) t_4) (- t_4 3.0)) (* (* x1 x1) 6.0))))))))
t_2)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -8.5e+150) {
tmp = t_2;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0))))));
} else if (x1 <= 5e+153) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0)))))));
} 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = 4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))
t_2 = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
t_3 = x1 * (x1 * 3.0d0)
t_4 = ((t_3 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-8.5d+150)) then
tmp = t_2
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (9.0d0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * (-4.0d0)) + ((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_1 + (4.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))) - 6.0d0))))) - 6.0d0))))))
else if (x1 <= 5d+153) then
tmp = x1 + (((x2 * (-6.0d0)) + (x1 * (-3.0d0))) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_3) + (t_0 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
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 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -8.5e+150) {
tmp = t_2;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0))))));
} else if (x1 <= 5e+153) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0)) t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) t_3 = x1 * (x1 * 3.0) t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= -8.5e+150: tmp = t_2 elif x1 <= -5.6e+102: tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0)))))) elif x1 <= 5e+153: tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0))))))) else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) t_2 = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= -8.5e+150) tmp = t_2; elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * -4.0) + Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(4.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))) - 6.0))))) - 6.0))))))); elseif (x1 <= 5e+153) tmp = Float64(x1 + Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_3) + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0)); t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); t_3 = x1 * (x1 * 3.0); t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= -8.5e+150) tmp = t_2; elseif (x1 <= -5.6e+102) tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0)))))); elseif (x1 <= 5e+153) tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * 6.0))))))); 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[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -8.5e+150], t$95$2, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(9.0 + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(4.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], N[(x1 + N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\\
t_2 := x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -8.5 \cdot 10^{+150}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(\left(x2 \cdot -4 + \left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + 4 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - 6\right)\right)\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(\left(x2 \cdot -6 + x1 \cdot -3\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_3 + t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -8.4999999999999999e150 or 5.00000000000000018e153 < x1 Initial program 1.5%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 59.7%
Taylor expanded in x2 around 0 98.7%
if -8.4999999999999999e150 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 85.7%
if -5.60000000000000037e102 < x1 < 5.00000000000000018e153Initial program 99.5%
Taylor expanded in x1 around inf 98.8%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around inf 97.4%
Final simplification97.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0)))))
(t_5 (* x1 (* x1 x1)))
(t_6 (* (* x1 2.0) (* 2.0 x2))))
(if (<= x1 -8.5e+150)
t_4
(if (<= x1 -5.6e+102)
(+
x1
(+
9.0
(+
x1
(*
x1
(+
t_0
(*
x1
(-
(+
(* x2 -4.0)
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_0 (* 4.0 (* x2 (+ 3.0 (* x2 -2.0))))) 6.0)))))
6.0)))))))
(if (<= x1 -1.9e+14)
(+
x1
(+
9.0
(+
x1
(+
t_5
(+
(* t_1 t_3)
(* t_2 (+ (* (* x1 x1) 6.0) (* (- t_3 3.0) t_6))))))))
(if (<= x1 4.5e+153)
(+
x1
(+
(+ (* x2 -6.0) (* x1 -3.0))
(+
x1
(+
t_5
(+
(* 3.0 t_1)
(*
t_2
(+
(* (* x1 x1) (- (* t_3 4.0) 6.0))
(* t_6 (- (- (* 2.0 x2) x1) 3.0)))))))))
t_4))))))
double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_5 = x1 * (x1 * x1);
double t_6 = (x1 * 2.0) * (2.0 * x2);
double tmp;
if (x1 <= -8.5e+150) {
tmp = t_4;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (9.0 + (x1 + (x1 * (t_0 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0))))));
} else if (x1 <= -1.9e+14) {
tmp = x1 + (9.0 + (x1 + (t_5 + ((t_1 * t_3) + (t_2 * (((x1 * x1) * 6.0) + ((t_3 - 3.0) * t_6)))))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_5 + ((3.0 * t_1) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (t_6 * (((2.0 * x2) - x1) - 3.0))))))));
} else {
tmp = t_4;
}
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 = 4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
t_4 = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
t_5 = x1 * (x1 * x1)
t_6 = (x1 * 2.0d0) * (2.0d0 * x2)
if (x1 <= (-8.5d+150)) then
tmp = t_4
else if (x1 <= (-5.6d+102)) then
tmp = x1 + (9.0d0 + (x1 + (x1 * (t_0 + (x1 * (((x2 * (-4.0d0)) + ((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_0 + (4.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))) - 6.0d0))))) - 6.0d0))))))
else if (x1 <= (-1.9d+14)) then
tmp = x1 + (9.0d0 + (x1 + (t_5 + ((t_1 * t_3) + (t_2 * (((x1 * x1) * 6.0d0) + ((t_3 - 3.0d0) * t_6)))))))
else if (x1 <= 4.5d+153) then
tmp = x1 + (((x2 * (-6.0d0)) + (x1 * (-3.0d0))) + (x1 + (t_5 + ((3.0d0 * t_1) + (t_2 * (((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)) + (t_6 * (((2.0d0 * x2) - x1) - 3.0d0))))))))
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_5 = x1 * (x1 * x1);
double t_6 = (x1 * 2.0) * (2.0 * x2);
double tmp;
if (x1 <= -8.5e+150) {
tmp = t_4;
} else if (x1 <= -5.6e+102) {
tmp = x1 + (9.0 + (x1 + (x1 * (t_0 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0))))));
} else if (x1 <= -1.9e+14) {
tmp = x1 + (9.0 + (x1 + (t_5 + ((t_1 * t_3) + (t_2 * (((x1 * x1) * 6.0) + ((t_3 - 3.0) * t_6)))))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_5 + ((3.0 * t_1) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (t_6 * (((2.0 * x2) - x1) - 3.0))))))));
} else {
tmp = t_4;
}
return tmp;
}
def code(x1, x2): t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0)) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_4 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) t_5 = x1 * (x1 * x1) t_6 = (x1 * 2.0) * (2.0 * x2) tmp = 0 if x1 <= -8.5e+150: tmp = t_4 elif x1 <= -5.6e+102: tmp = x1 + (9.0 + (x1 + (x1 * (t_0 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0)))))) elif x1 <= -1.9e+14: tmp = x1 + (9.0 + (x1 + (t_5 + ((t_1 * t_3) + (t_2 * (((x1 * x1) * 6.0) + ((t_3 - 3.0) * t_6))))))) elif x1 <= 4.5e+153: tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_5 + ((3.0 * t_1) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (t_6 * (((2.0 * x2) - x1) - 3.0)))))))) else: tmp = t_4 return tmp
function code(x1, x2) t_0 = Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))) t_5 = Float64(x1 * Float64(x1 * x1)) t_6 = Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)) tmp = 0.0 if (x1 <= -8.5e+150) tmp = t_4; elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(x1 * Float64(t_0 + Float64(x1 * Float64(Float64(Float64(x2 * -4.0) + Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_0 + Float64(4.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))) - 6.0))))) - 6.0))))))); elseif (x1 <= -1.9e+14) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_5 + Float64(Float64(t_1 * t_3) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(Float64(t_3 - 3.0) * t_6)))))))); elseif (x1 <= 4.5e+153) tmp = Float64(x1 + Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)) + Float64(x1 + Float64(t_5 + Float64(Float64(3.0 * t_1) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) + Float64(t_6 * Float64(Float64(Float64(2.0 * x2) - x1) - 3.0))))))))); else tmp = t_4; end return tmp end
function tmp_2 = code(x1, x2) t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0)); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_4 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); t_5 = x1 * (x1 * x1); t_6 = (x1 * 2.0) * (2.0 * x2); tmp = 0.0; if (x1 <= -8.5e+150) tmp = t_4; elseif (x1 <= -5.6e+102) tmp = x1 + (9.0 + (x1 + (x1 * (t_0 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_0 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0)))))); elseif (x1 <= -1.9e+14) tmp = x1 + (9.0 + (x1 + (t_5 + ((t_1 * t_3) + (t_2 * (((x1 * x1) * 6.0) + ((t_3 - 3.0) * t_6))))))); elseif (x1 <= 4.5e+153) tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + (t_5 + ((3.0 * t_1) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (t_6 * (((2.0 * x2) - x1) - 3.0)))))))); else tmp = t_4; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -8.5e+150], t$95$4, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(9.0 + N[(x1 + N[(x1 * N[(t$95$0 + N[(x1 * N[(N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$0 + N[(4.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.9e+14], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$5 + N[(N[(t$95$1 * t$95$3), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(N[(t$95$3 - 3.0), $MachinePrecision] * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x1 + N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$5 + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$6 * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
t_5 := x1 \cdot \left(x1 \cdot x1\right)\\
t_6 := \left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\\
\mathbf{if}\;x1 \leq -8.5 \cdot 10^{+150}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + x1 \cdot \left(t\_0 + x1 \cdot \left(\left(x2 \cdot -4 + \left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_0 + 4 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - 6\right)\right)\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.9 \cdot 10^{+14}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t\_5 + \left(t\_1 \cdot t\_3 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(t\_3 - 3\right) \cdot t\_6\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(\left(x2 \cdot -6 + x1 \cdot -3\right) + \left(x1 + \left(t\_5 + \left(3 \cdot t\_1 + t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right) + t\_6 \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if x1 < -8.4999999999999999e150 or 4.5000000000000001e153 < x1 Initial program 1.5%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 59.7%
Taylor expanded in x2 around 0 98.7%
if -8.4999999999999999e150 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 85.7%
if -5.60000000000000037e102 < x1 < -1.9e14Initial program 99.3%
Taylor expanded in x1 around 0 91.3%
Taylor expanded in x1 around inf 91.3%
Taylor expanded in x1 around inf 91.4%
if -1.9e14 < x1 < 4.5000000000000001e153Initial program 99.5%
Taylor expanded in x1 around inf 98.7%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around 0 89.8%
+-commutative89.8%
mul-1-neg89.8%
sub-neg89.8%
Simplified89.8%
Taylor expanded in x1 around 0 95.4%
Final simplification95.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))
(t_2 (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0)))))
(t_3 (* x1 (* x1 3.0))))
(if (<= x1 -8.5e+150)
t_2
(if (<= x1 -4.8e+102)
(+
x1
(+
9.0
(+
x1
(*
x1
(+
t_1
(*
x1
(-
(+
(* x2 -4.0)
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_1 (* 4.0 (* x2 (+ 3.0 (* x2 -2.0))))) 6.0)))))
6.0)))))))
(if (<= x1 4.5e+153)
(+
x1
(+
(+ (* x2 -6.0) (* x1 -3.0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_3)
(*
t_0
(+
(* (* x1 x1) (- (* (/ (- (+ t_3 (* 2.0 x2)) x1) t_0) 4.0) 6.0))
(* (* (* x1 2.0) (* 2.0 x2)) (- (- (* 2.0 x2) x1) 3.0)))))))))
t_2)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_3 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= -8.5e+150) {
tmp = t_2;
} else if (x1 <= -4.8e+102) {
tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0))))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * (((x1 * x1) * (((((t_3 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0))))))));
} 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = 4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))
t_2 = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
t_3 = x1 * (x1 * 3.0d0)
if (x1 <= (-8.5d+150)) then
tmp = t_2
else if (x1 <= (-4.8d+102)) then
tmp = x1 + (9.0d0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * (-4.0d0)) + ((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_1 + (4.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))) - 6.0d0))))) - 6.0d0))))))
else if (x1 <= 4.5d+153) then
tmp = x1 + (((x2 * (-6.0d0)) + (x1 * (-3.0d0))) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_3) + (t_0 * (((x1 * x1) * (((((t_3 + (2.0d0 * x2)) - x1) / t_0) * 4.0d0) - 6.0d0)) + (((x1 * 2.0d0) * (2.0d0 * x2)) * (((2.0d0 * x2) - x1) - 3.0d0))))))))
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 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_3 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= -8.5e+150) {
tmp = t_2;
} else if (x1 <= -4.8e+102) {
tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0))))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * (((x1 * x1) * (((((t_3 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0))))))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0)) t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) t_3 = x1 * (x1 * 3.0) tmp = 0 if x1 <= -8.5e+150: tmp = t_2 elif x1 <= -4.8e+102: tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0)))))) elif x1 <= 4.5e+153: tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * (((x1 * x1) * (((((t_3 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))))))) else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) t_2 = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))) t_3 = Float64(x1 * Float64(x1 * 3.0)) tmp = 0.0 if (x1 <= -8.5e+150) tmp = t_2; elseif (x1 <= -4.8e+102) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * -4.0) + Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(4.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))) - 6.0))))) - 6.0))))))); elseif (x1 <= 4.5e+153) tmp = Float64(x1 + Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_3) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + Float64(Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)) * Float64(Float64(Float64(2.0 * x2) - x1) - 3.0))))))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0)); t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); t_3 = x1 * (x1 * 3.0); tmp = 0.0; if (x1 <= -8.5e+150) tmp = t_2; elseif (x1 <= -4.8e+102) tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0)))))); elseif (x1 <= 4.5e+153) tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * (((x1 * x1) * (((((t_3 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (((x1 * 2.0) * (2.0 * x2)) * (((2.0 * x2) - x1) - 3.0)))))))); 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[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -8.5e+150], t$95$2, If[LessEqual[x1, -4.8e+102], N[(x1 + N[(9.0 + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(4.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x1 + N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\\
t_2 := x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
\mathbf{if}\;x1 \leq -8.5 \cdot 10^{+150}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -4.8 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(\left(x2 \cdot -4 + \left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + 4 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - 6\right)\right)\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(\left(x2 \cdot -6 + x1 \cdot -3\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_3 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_0} \cdot 4 - 6\right) + \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right) \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -8.4999999999999999e150 or 4.5000000000000001e153 < x1 Initial program 1.5%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 59.7%
Taylor expanded in x2 around 0 98.7%
if -8.4999999999999999e150 < x1 < -4.79999999999999989e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 85.7%
if -4.79999999999999989e102 < x1 < 4.5000000000000001e153Initial program 99.5%
Taylor expanded in x1 around inf 98.8%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around 0 81.4%
+-commutative81.4%
mul-1-neg81.4%
sub-neg81.4%
Simplified81.4%
Taylor expanded in x1 around 0 92.2%
Final simplification93.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))
(t_2 (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0)))))
(t_3 (* x1 (* x1 3.0))))
(if (<= x1 -8.5e+150)
t_2
(if (<= x1 -2.6e+98)
(+
x1
(+
9.0
(+
x1
(*
x1
(+
t_1
(*
x1
(-
(+
(* x2 -4.0)
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_1 (* 4.0 (* x2 (+ 3.0 (* x2 -2.0))))) 6.0)))))
6.0)))))))
(if (<= x1 5.6e+151)
(+
x1
(+
(+ (* x2 -6.0) (* x1 -3.0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_3)
(*
t_0
(+
(* (* x1 x1) 6.0)
(*
(* (* x1 2.0) (/ (- (+ t_3 (* 2.0 x2)) x1) t_0))
(- (- (* 2.0 x2) x1) 3.0)))))))))
t_2)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_3 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= -8.5e+150) {
tmp = t_2;
} else if (x1 <= -2.6e+98) {
tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0))))));
} else if (x1 <= 5.6e+151) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * (((t_3 + (2.0 * x2)) - x1) / t_0)) * (((2.0 * x2) - x1) - 3.0))))))));
} 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = 4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))
t_2 = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
t_3 = x1 * (x1 * 3.0d0)
if (x1 <= (-8.5d+150)) then
tmp = t_2
else if (x1 <= (-2.6d+98)) then
tmp = x1 + (9.0d0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * (-4.0d0)) + ((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_1 + (4.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))) - 6.0d0))))) - 6.0d0))))))
else if (x1 <= 5.6d+151) then
tmp = x1 + (((x2 * (-6.0d0)) + (x1 * (-3.0d0))) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_3) + (t_0 * (((x1 * x1) * 6.0d0) + (((x1 * 2.0d0) * (((t_3 + (2.0d0 * x2)) - x1) / t_0)) * (((2.0d0 * x2) - x1) - 3.0d0))))))))
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 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_3 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= -8.5e+150) {
tmp = t_2;
} else if (x1 <= -2.6e+98) {
tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0))))));
} else if (x1 <= 5.6e+151) {
tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * (((t_3 + (2.0 * x2)) - x1) / t_0)) * (((2.0 * x2) - x1) - 3.0))))))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0)) t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) t_3 = x1 * (x1 * 3.0) tmp = 0 if x1 <= -8.5e+150: tmp = t_2 elif x1 <= -2.6e+98: tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0)))))) elif x1 <= 5.6e+151: tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * (((t_3 + (2.0 * x2)) - x1) / t_0)) * (((2.0 * x2) - x1) - 3.0)))))))) else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) t_2 = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))) t_3 = Float64(x1 * Float64(x1 * 3.0)) tmp = 0.0 if (x1 <= -8.5e+150) tmp = t_2; elseif (x1 <= -2.6e+98) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * -4.0) + Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(4.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))) - 6.0))))) - 6.0))))))); elseif (x1 <= 5.6e+151) tmp = Float64(x1 + Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_3) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_0)) * Float64(Float64(Float64(2.0 * x2) - x1) - 3.0))))))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = 4.0 * (x2 * ((2.0 * x2) - 3.0)); t_2 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); t_3 = x1 * (x1 * 3.0); tmp = 0.0; if (x1 <= -8.5e+150) tmp = t_2; elseif (x1 <= -2.6e+98) tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0)))))); elseif (x1 <= 5.6e+151) tmp = x1 + (((x2 * -6.0) + (x1 * -3.0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_3) + (t_0 * (((x1 * x1) * 6.0) + (((x1 * 2.0) * (((t_3 + (2.0 * x2)) - x1) / t_0)) * (((2.0 * x2) - x1) - 3.0)))))))); 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[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -8.5e+150], t$95$2, If[LessEqual[x1, -2.6e+98], N[(x1 + N[(9.0 + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(4.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.6e+151], N[(x1 + N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\\
t_2 := x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
\mathbf{if}\;x1 \leq -8.5 \cdot 10^{+150}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq -2.6 \cdot 10^{+98}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(\left(x2 \cdot -4 + \left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + 4 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - 6\right)\right)\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5.6 \cdot 10^{+151}:\\
\;\;\;\;x1 + \left(\left(x2 \cdot -6 + x1 \cdot -3\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_3 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(\left(x1 \cdot 2\right) \cdot \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_0}\right) \cdot \left(\left(2 \cdot x2 - x1\right) - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x1 < -8.4999999999999999e150 or 5.59999999999999975e151 < x1 Initial program 1.5%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 59.7%
Taylor expanded in x2 around 0 98.7%
if -8.4999999999999999e150 < x1 < -2.6e98Initial program 22.2%
Taylor expanded in x1 around 0 22.2%
Taylor expanded in x1 around inf 22.2%
Taylor expanded in x1 around 0 79.0%
if -2.6e98 < x1 < 5.59999999999999975e151Initial program 99.5%
Taylor expanded in x1 around inf 98.8%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around 0 82.4%
+-commutative82.4%
mul-1-neg82.4%
sub-neg82.4%
Simplified82.4%
Taylor expanded in x1 around inf 83.7%
Final simplification87.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x2 (- (* 2.0 x2) 3.0))) (t_1 (* 4.0 t_0)))
(if (<= x1 -8.5e+150)
(+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0))))
(if (<= x1 -5e+89)
(+
x1
(+
9.0
(+
x1
(*
x1
(+
t_1
(*
x1
(-
(+
(* x2 -4.0)
(+
(* x2 6.0)
(+
(* x2 8.0)
(* x1 (- (+ t_1 (* 4.0 (* x2 (+ 3.0 (* x2 -2.0))))) 6.0)))))
6.0)))))))
(if (<= x1 1.9e+73)
(+
x1
(+
(*
3.0
(/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(+
x1
(+
(+ x1 (* 4.0 (* x1 t_0)))
(*
3.0
(+
(* x2 -2.0)
(* x1 (+ -1.0 (* x1 (- (+ x1 3.0) (* x2 -2.0))))))))))))))
double code(double x1, double x2) {
double t_0 = x2 * ((2.0 * x2) - 3.0);
double t_1 = 4.0 * t_0;
double tmp;
if (x1 <= -8.5e+150) {
tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
} else if (x1 <= -5e+89) {
tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0))))));
} else if (x1 <= 1.9e+73) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x2 * ((2.0d0 * x2) - 3.0d0)
t_1 = 4.0d0 * t_0
if (x1 <= (-8.5d+150)) then
tmp = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
else if (x1 <= (-5d+89)) then
tmp = x1 + (9.0d0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * (-4.0d0)) + ((x2 * 6.0d0) + ((x2 * 8.0d0) + (x1 * ((t_1 + (4.0d0 * (x2 * (3.0d0 + (x2 * (-2.0d0)))))) - 6.0d0))))) - 6.0d0))))))
else if (x1 <= 1.9d+73) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else
tmp = x1 + ((x1 + (4.0d0 * (x1 * t_0))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x1 * ((x1 + 3.0d0) - (x2 * (-2.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x2 * ((2.0 * x2) - 3.0);
double t_1 = 4.0 * t_0;
double tmp;
if (x1 <= -8.5e+150) {
tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
} else if (x1 <= -5e+89) {
tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0))))));
} else if (x1 <= 1.9e+73) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x2 * ((2.0 * x2) - 3.0) t_1 = 4.0 * t_0 tmp = 0 if x1 <= -8.5e+150: tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) elif x1 <= -5e+89: tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0)))))) elif x1 <= 1.9e+73: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) else: tmp = x1 + ((x1 + (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0)))))))) return tmp
function code(x1, x2) t_0 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_1 = Float64(4.0 * t_0) tmp = 0.0 if (x1 <= -8.5e+150) tmp = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))); elseif (x1 <= -5e+89) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(x1 * Float64(t_1 + Float64(x1 * Float64(Float64(Float64(x2 * -4.0) + Float64(Float64(x2 * 6.0) + Float64(Float64(x2 * 8.0) + Float64(x1 * Float64(Float64(t_1 + Float64(4.0 * Float64(x2 * Float64(3.0 + Float64(x2 * -2.0))))) - 6.0))))) - 6.0))))))); elseif (x1 <= 1.9e+73) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * t_0))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(Float64(x1 + 3.0) - Float64(x2 * -2.0))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x2 * ((2.0 * x2) - 3.0); t_1 = 4.0 * t_0; tmp = 0.0; if (x1 <= -8.5e+150) tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); elseif (x1 <= -5e+89) tmp = x1 + (9.0 + (x1 + (x1 * (t_1 + (x1 * (((x2 * -4.0) + ((x2 * 6.0) + ((x2 * 8.0) + (x1 * ((t_1 + (4.0 * (x2 * (3.0 + (x2 * -2.0))))) - 6.0))))) - 6.0)))))); elseif (x1 <= 1.9e+73) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); else tmp = x1 + ((x1 + (4.0 * (x1 * t_0))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(4.0 * t$95$0), $MachinePrecision]}, If[LessEqual[x1, -8.5e+150], N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5e+89], N[(x1 + N[(9.0 + N[(x1 + N[(x1 * N[(t$95$1 + N[(x1 * N[(N[(N[(x2 * -4.0), $MachinePrecision] + N[(N[(x2 * 6.0), $MachinePrecision] + N[(N[(x2 * 8.0), $MachinePrecision] + N[(x1 * N[(N[(t$95$1 + N[(4.0 * N[(x2 * N[(3.0 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.9e+73], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(N[(x1 + 3.0), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_1 := 4 \cdot t\_0\\
\mathbf{if}\;x1 \leq -8.5 \cdot 10^{+150}:\\
\;\;\;\;x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{+89}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + x1 \cdot \left(t\_1 + x1 \cdot \left(\left(x2 \cdot -4 + \left(x2 \cdot 6 + \left(x2 \cdot 8 + x1 \cdot \left(\left(t\_1 + 4 \cdot \left(x2 \cdot \left(3 + x2 \cdot -2\right)\right)\right) - 6\right)\right)\right)\right) - 6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.9 \cdot 10^{+73}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot t\_0\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 + x1 \cdot \left(\left(x1 + 3\right) - x2 \cdot -2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -8.4999999999999999e150Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 46.2%
Taylor expanded in x2 around 0 96.6%
if -8.4999999999999999e150 < x1 < -4.99999999999999983e89Initial program 36.4%
Taylor expanded in x1 around 0 36.4%
Taylor expanded in x1 around inf 36.4%
Taylor expanded in x1 around 0 66.1%
if -4.99999999999999983e89 < x1 < 1.90000000000000011e73Initial program 99.4%
Taylor expanded in x1 around 0 72.0%
Taylor expanded in x2 around 0 82.6%
if 1.90000000000000011e73 < x1 Initial program 34.4%
Taylor expanded in x1 around 0 15.6%
Taylor expanded in x1 around 0 93.6%
Final simplification85.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -5e+153)
(+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0))))
(if (<= x1 -2.05e+68)
(+
x1
(+
(+ x1 (* 4.0 (* -3.0 (* x1 x2))))
(+ (* x2 -6.0) (* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 3.0)))))
(if (<= x1 6.5e+72)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(+
x1
(+
(+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
(*
3.0
(+
(* x2 -2.0)
(* x1 (+ -1.0 (* x1 (- (+ x1 3.0) (* x2 -2.0)))))))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -5e+153) {
tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
} else if (x1 <= -2.05e+68) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 3.0))));
} else if (x1 <= 6.5e+72) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-5d+153)) then
tmp = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
else if (x1 <= (-2.05d+68)) then
tmp = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 3.0d0))))
else if (x1 <= 6.5d+72) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else
tmp = x1 + ((x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x1 * ((x1 + 3.0d0) - (x2 * (-2.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -5e+153) {
tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
} else if (x1 <= -2.05e+68) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 3.0))));
} else if (x1 <= 6.5e+72) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -5e+153: tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) elif x1 <= -2.05e+68: tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 3.0)))) elif x1 <= 6.5e+72: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) else: tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0)))))))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -5e+153) tmp = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))); elseif (x1 <= -2.05e+68) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 3.0))))); elseif (x1 <= 6.5e+72) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(Float64(x1 + 3.0) - Float64(x2 * -2.0))))))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -5e+153) tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); elseif (x1 <= -2.05e+68) tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 3.0)))); elseif (x1 <= 6.5e+72) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); else tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -5e+153], N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.05e+68], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.5e+72], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(N[(x1 + 3.0), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
\mathbf{elif}\;x1 \leq -2.05 \cdot 10^{+68}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 3\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{+72}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 + x1 \cdot \left(\left(x1 + 3\right) - x2 \cdot -2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.00000000000000018e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 48.0%
Taylor expanded in x2 around 0 100.0%
if -5.00000000000000018e153 < x1 < -2.05e68Initial program 61.7%
Taylor expanded in x1 around 0 9.8%
Taylor expanded in x1 around 0 8.3%
Taylor expanded in x2 around inf 21.5%
Taylor expanded in x2 around 0 35.8%
*-commutative35.8%
Simplified35.8%
if -2.05e68 < x1 < 6.5000000000000001e72Initial program 99.4%
Taylor expanded in x1 around 0 74.9%
Taylor expanded in x2 around 0 86.2%
if 6.5000000000000001e72 < x1 Initial program 34.4%
Taylor expanded in x1 around 0 15.6%
Taylor expanded in x1 around 0 93.6%
Final simplification85.2%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -4.4e+153)
(+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0))))
(if (<= x1 -3.4e+68)
(+
x1
(+
(+ x1 (* 4.0 (* -3.0 (* x1 x2))))
(+ (* x2 -6.0) (* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 3.0)))))
(if (<= x1 1.7e+74)
(+ x1 (+ (* x1 -2.0) (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0))))
(+
x1
(+
(+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
(*
3.0
(+
(* x2 -2.0)
(* x1 (+ -1.0 (* x1 (- (+ x1 3.0) (* x2 -2.0)))))))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
} else if (x1 <= -3.4e+68) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 3.0))));
} else if (x1 <= 1.7e+74) {
tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-4.4d+153)) then
tmp = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
else if (x1 <= (-3.4d+68)) then
tmp = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 3.0d0))))
else if (x1 <= 1.7d+74) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)))
else
tmp = x1 + ((x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((-1.0d0) + (x1 * ((x1 + 3.0d0) - (x2 * (-2.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -4.4e+153) {
tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
} else if (x1 <= -3.4e+68) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 3.0))));
} else if (x1 <= 1.7e+74) {
tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0))))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -4.4e+153: tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) elif x1 <= -3.4e+68: tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 3.0)))) elif x1 <= 1.7e+74: tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0))) else: tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0)))))))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -4.4e+153) tmp = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))); elseif (x1 <= -3.4e+68) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 3.0))))); elseif (x1 <= 1.7e+74) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(-1.0 + Float64(x1 * Float64(Float64(x1 + 3.0) - Float64(x2 * -2.0))))))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -4.4e+153) tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); elseif (x1 <= -3.4e+68) tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 3.0)))); elseif (x1 <= 1.7e+74) tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0))); else tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) + (x1 * (-1.0 + (x1 * ((x1 + 3.0) - (x2 * -2.0)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -4.4e+153], N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.4e+68], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.7e+74], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(x1 * N[(N[(x1 + 3.0), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{+68}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 3\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.7 \cdot 10^{+74}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(-1 + x1 \cdot \left(\left(x1 + 3\right) - x2 \cdot -2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 48.0%
Taylor expanded in x2 around 0 100.0%
if -4.3999999999999999e153 < x1 < -3.40000000000000015e68Initial program 61.7%
Taylor expanded in x1 around 0 9.8%
Taylor expanded in x1 around 0 8.3%
Taylor expanded in x2 around inf 21.5%
Taylor expanded in x2 around 0 35.8%
*-commutative35.8%
Simplified35.8%
if -3.40000000000000015e68 < x1 < 1.7e74Initial program 99.4%
Taylor expanded in x1 around 0 74.9%
Taylor expanded in x1 around 0 72.5%
Taylor expanded in x1 around 0 74.7%
Taylor expanded in x2 around 0 86.0%
if 1.7e74 < x1 Initial program 34.4%
Taylor expanded in x1 around 0 15.6%
Taylor expanded in x1 around 0 93.6%
Final simplification85.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0)))
(t_1 (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0)))))
(t_2 (- (* x2 -6.0) x1)))
(if (<= x1 -3.4e+89)
t_1
(if (<= x1 -2.9e-118)
t_0
(if (<= x1 3.6e-149)
t_2
(if (<= x1 4.5e-115)
(+ x1 (+ 9.0 (+ x1 (* x2 (+ (* x1 -12.0) (* 8.0 (* x1 x2)))))))
(if (<= x1 1.4e-62) t_2 (if (<= x1 5.4e+149) t_0 t_1))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
double t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_2 = (x2 * -6.0) - x1;
double tmp;
if (x1 <= -3.4e+89) {
tmp = t_1;
} else if (x1 <= -2.9e-118) {
tmp = t_0;
} else if (x1 <= 3.6e-149) {
tmp = t_2;
} else if (x1 <= 4.5e-115) {
tmp = x1 + (9.0 + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 1.4e-62) {
tmp = t_2;
} else if (x1 <= 5.4e+149) {
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) :: t_2
real(8) :: tmp
t_0 = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))
t_1 = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
t_2 = (x2 * (-6.0d0)) - x1
if (x1 <= (-3.4d+89)) then
tmp = t_1
else if (x1 <= (-2.9d-118)) then
tmp = t_0
else if (x1 <= 3.6d-149) then
tmp = t_2
else if (x1 <= 4.5d-115) then
tmp = x1 + (9.0d0 + (x1 + (x2 * ((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))))))
else if (x1 <= 1.4d-62) then
tmp = t_2
else if (x1 <= 5.4d+149) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
double t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double t_2 = (x2 * -6.0) - x1;
double tmp;
if (x1 <= -3.4e+89) {
tmp = t_1;
} else if (x1 <= -2.9e-118) {
tmp = t_0;
} else if (x1 <= 3.6e-149) {
tmp = t_2;
} else if (x1 <= 4.5e-115) {
tmp = x1 + (9.0 + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2))))));
} else if (x1 <= 1.4e-62) {
tmp = t_2;
} else if (x1 <= 5.4e+149) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0) t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) t_2 = (x2 * -6.0) - x1 tmp = 0 if x1 <= -3.4e+89: tmp = t_1 elif x1 <= -2.9e-118: tmp = t_0 elif x1 <= 3.6e-149: tmp = t_2 elif x1 <= 4.5e-115: tmp = x1 + (9.0 + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))) elif x1 <= 1.4e-62: tmp = t_2 elif x1 <= 5.4e+149: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)) t_1 = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))) t_2 = Float64(Float64(x2 * -6.0) - x1) tmp = 0.0 if (x1 <= -3.4e+89) tmp = t_1; elseif (x1 <= -2.9e-118) tmp = t_0; elseif (x1 <= 3.6e-149) tmp = t_2; elseif (x1 <= 4.5e-115) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))))))); elseif (x1 <= 1.4e-62) tmp = t_2; elseif (x1 <= 5.4e+149) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0); t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); t_2 = (x2 * -6.0) - x1; tmp = 0.0; if (x1 <= -3.4e+89) tmp = t_1; elseif (x1 <= -2.9e-118) tmp = t_0; elseif (x1 <= 3.6e-149) tmp = t_2; elseif (x1 <= 4.5e-115) tmp = x1 + (9.0 + (x1 + (x2 * ((x1 * -12.0) + (8.0 * (x1 * x2)))))); elseif (x1 <= 1.4e-62) tmp = t_2; elseif (x1 <= 5.4e+149) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]}, If[LessEqual[x1, -3.4e+89], t$95$1, If[LessEqual[x1, -2.9e-118], t$95$0, If[LessEqual[x1, 3.6e-149], t$95$2, If[LessEqual[x1, 4.5e-115], N[(x1 + N[(9.0 + N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4e-62], t$95$2, If[LessEqual[x1, 5.4e+149], t$95$0, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
t_1 := x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
t_2 := x2 \cdot -6 - x1\\
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -2.9 \cdot 10^{-118}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 3.6 \cdot 10^{-149}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{-115}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + x2 \cdot \left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{-62}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq 5.4 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -3.4000000000000002e89 or 5.4000000000000002e149 < x1 Initial program 7.6%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 51.5%
Taylor expanded in x2 around 0 84.8%
if -3.4000000000000002e89 < x1 < -2.8999999999999998e-118 or 1.40000000000000001e-62 < x1 < 5.4000000000000002e149Initial program 99.3%
Taylor expanded in x1 around 0 56.8%
Taylor expanded in x1 around 0 51.9%
Taylor expanded in x1 around 0 56.0%
Taylor expanded in x1 around inf 52.8%
if -2.8999999999999998e-118 < x1 < 3.6000000000000002e-149 or 4.50000000000000023e-115 < x1 < 1.40000000000000001e-62Initial program 99.5%
Taylor expanded in x1 around inf 99.5%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around inf 84.9%
associate-*r/84.9%
metadata-eval84.9%
Simplified84.9%
Taylor expanded in x1 around 0 85.2%
if 3.6000000000000002e-149 < x1 < 4.50000000000000023e-115Initial program 100.0%
Taylor expanded in x1 around 0 59.8%
Taylor expanded in x1 around inf 45.8%
Taylor expanded in x2 around 0 81.9%
Final simplification73.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0))))))
(if (<= x1 -4.4e+153)
t_0
(if (<= x1 -5.6e+68)
(+
x1
(+
(+ x1 (* 4.0 (* -3.0 (* x1 x2))))
(+
(* x2 -6.0)
(* x1 (- (* x2 (+ (* x1 6.0) (* 9.0 (/ x1 x2)))) 3.0)))))
(if (<= x1 5.4e+149)
(+
x1
(+ (* x1 -2.0) (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0))))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_0;
} else if (x1 <= -5.6e+68) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 3.0))));
} else if (x1 <= 5.4e+149) {
tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + (8.0 * (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 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
if (x1 <= (-4.4d+153)) then
tmp = t_0
else if (x1 <= (-5.6d+68)) then
tmp = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * ((x2 * ((x1 * 6.0d0) + (9.0d0 * (x1 / x2)))) - 3.0d0))))
else if (x1 <= 5.4d+149) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (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 + (x1 * ((x1 * 9.0) - 3.0)));
double tmp;
if (x1 <= -4.4e+153) {
tmp = t_0;
} else if (x1 <= -5.6e+68) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 3.0))));
} else if (x1 <= 5.4e+149) {
tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) tmp = 0 if x1 <= -4.4e+153: tmp = t_0 elif x1 <= -5.6e+68: tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 3.0)))) elif x1 <= 5.4e+149: tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))) tmp = 0.0 if (x1 <= -4.4e+153) tmp = t_0; elseif (x1 <= -5.6e+68) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(x1 * 6.0) + Float64(9.0 * Float64(x1 / x2)))) - 3.0))))); elseif (x1 <= 5.4e+149) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); tmp = 0.0; if (x1 <= -4.4e+153) tmp = t_0; elseif (x1 <= -5.6e+68) tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * ((x2 * ((x1 * 6.0) + (9.0 * (x1 / x2)))) - 3.0)))); elseif (x1 <= 5.4e+149) tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + (8.0 * (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[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+153], t$95$0, If[LessEqual[x1, -5.6e+68], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(x1 * 6.0), $MachinePrecision] + N[(9.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.4e+149], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+68}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot \left(x1 \cdot 6 + 9 \cdot \frac{x1}{x2}\right) - 3\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5.4 \cdot 10^{+149}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.3999999999999999e153 or 5.4000000000000002e149 < x1 Initial program 3.0%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 59.9%
Taylor expanded in x2 around 0 98.7%
if -4.3999999999999999e153 < x1 < -5.6e68Initial program 61.7%
Taylor expanded in x1 around 0 9.8%
Taylor expanded in x1 around 0 8.3%
Taylor expanded in x2 around inf 21.5%
Taylor expanded in x2 around 0 35.8%
*-commutative35.8%
Simplified35.8%
if -5.6e68 < x1 < 5.4000000000000002e149Initial program 99.4%
Taylor expanded in x1 around 0 72.1%
Taylor expanded in x1 around 0 70.0%
Taylor expanded in x1 around 0 71.7%
Taylor expanded in x2 around 0 81.7%
Final simplification82.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x2 -6.0) (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0))))
(t_1 (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0))))))
(if (<= x1 -2.7e+89)
t_1
(if (<= x1 -5.5e-221)
t_0
(if (<= x1 1.15e-200)
(- (* x2 -6.0) x1)
(if (<= x1 5.4e+149) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0));
double t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double tmp;
if (x1 <= -2.7e+89) {
tmp = t_1;
} else if (x1 <= -5.5e-221) {
tmp = t_0;
} else if (x1 <= 1.15e-200) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 5.4e+149) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0)))
t_1 = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
if (x1 <= (-2.7d+89)) then
tmp = t_1
else if (x1 <= (-5.5d-221)) then
tmp = t_0
else if (x1 <= 1.15d-200) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 5.4d+149) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0));
double t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double tmp;
if (x1 <= -2.7e+89) {
tmp = t_1;
} else if (x1 <= -5.5e-221) {
tmp = t_0;
} else if (x1 <= 1.15e-200) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 5.4e+149) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)) t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) tmp = 0 if x1 <= -2.7e+89: tmp = t_1 elif x1 <= -5.5e-221: tmp = t_0 elif x1 <= 1.15e-200: tmp = (x2 * -6.0) - x1 elif x1 <= 5.4e+149: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0))) t_1 = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))) tmp = 0.0 if (x1 <= -2.7e+89) tmp = t_1; elseif (x1 <= -5.5e-221) tmp = t_0; elseif (x1 <= 1.15e-200) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 5.4e+149) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)); t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); tmp = 0.0; if (x1 <= -2.7e+89) tmp = t_1; elseif (x1 <= -5.5e-221) tmp = t_0; elseif (x1 <= 1.15e-200) tmp = (x2 * -6.0) - x1; elseif (x1 <= 5.4e+149) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.7e+89], t$95$1, If[LessEqual[x1, -5.5e-221], t$95$0, If[LessEqual[x1, 1.15e-200], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 5.4e+149], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
t_1 := x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
\mathbf{if}\;x1 \leq -2.7 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{-221}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.15 \cdot 10^{-200}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 5.4 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -2.7e89 or 5.4000000000000002e149 < x1 Initial program 7.6%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 51.5%
Taylor expanded in x2 around 0 84.8%
if -2.7e89 < x1 < -5.49999999999999966e-221 or 1.15000000000000004e-200 < x1 < 5.4000000000000002e149Initial program 99.4%
Taylor expanded in x1 around 0 66.1%
Taylor expanded in x1 around 0 62.9%
Taylor expanded in x1 around 0 65.6%
Taylor expanded in x1 around 0 65.6%
if -5.49999999999999966e-221 < x1 < 1.15000000000000004e-200Initial program 99.6%
Taylor expanded in x1 around inf 99.6%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around inf 93.8%
associate-*r/93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in x1 around 0 94.0%
Final simplification76.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))
(t_1 (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0))))))
(if (<= x1 -5e+89)
t_1
(if (<= x1 -7e+15)
t_0
(if (<= x1 4.8e-41)
(- (* x2 -6.0) x1)
(if (<= x1 5.4e+149) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
double t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double tmp;
if (x1 <= -5e+89) {
tmp = t_1;
} else if (x1 <= -7e+15) {
tmp = t_0;
} else if (x1 <= 4.8e-41) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 5.4e+149) {
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 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
t_1 = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
if (x1 <= (-5d+89)) then
tmp = t_1
else if (x1 <= (-7d+15)) then
tmp = t_0
else if (x1 <= 4.8d-41) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 5.4d+149) 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 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
double t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double tmp;
if (x1 <= -5e+89) {
tmp = t_1;
} else if (x1 <= -7e+15) {
tmp = t_0;
} else if (x1 <= 4.8e-41) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 5.4e+149) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) tmp = 0 if x1 <= -5e+89: tmp = t_1 elif x1 <= -7e+15: tmp = t_0 elif x1 <= 4.8e-41: tmp = (x2 * -6.0) - x1 elif x1 <= 5.4e+149: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) t_1 = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))) tmp = 0.0 if (x1 <= -5e+89) tmp = t_1; elseif (x1 <= -7e+15) tmp = t_0; elseif (x1 <= 4.8e-41) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 5.4e+149) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); tmp = 0.0; if (x1 <= -5e+89) tmp = t_1; elseif (x1 <= -7e+15) tmp = t_0; elseif (x1 <= 4.8e-41) tmp = (x2 * -6.0) - x1; elseif (x1 <= 5.4e+149) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5e+89], t$95$1, If[LessEqual[x1, -7e+15], t$95$0, If[LessEqual[x1, 4.8e-41], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 5.4e+149], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_1 := x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -7 \cdot 10^{+15}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{-41}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 5.4 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.99999999999999983e89 or 5.4000000000000002e149 < x1 Initial program 7.6%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 51.5%
Taylor expanded in x2 around 0 84.8%
if -4.99999999999999983e89 < x1 < -7e15 or 4.80000000000000044e-41 < x1 < 5.4000000000000002e149Initial program 99.5%
Taylor expanded in x1 around 0 48.4%
Taylor expanded in x1 around inf 42.3%
Taylor expanded in x1 around inf 42.3%
if -7e15 < x1 < 4.80000000000000044e-41Initial program 99.4%
Taylor expanded in x1 around inf 98.7%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around inf 74.8%
associate-*r/74.8%
metadata-eval74.8%
Simplified74.8%
Taylor expanded in x1 around 0 73.4%
Final simplification69.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0)))
(t_1 (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0))))))
(if (<= x1 -5e+89)
t_1
(if (<= x1 -1.92e-118)
t_0
(if (<= x1 1.45e-62)
(- (* x2 -6.0) x1)
(if (<= x1 5.4e+149) t_0 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
double t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double tmp;
if (x1 <= -5e+89) {
tmp = t_1;
} else if (x1 <= -1.92e-118) {
tmp = t_0;
} else if (x1 <= 1.45e-62) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 5.4e+149) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))
t_1 = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
if (x1 <= (-5d+89)) then
tmp = t_1
else if (x1 <= (-1.92d-118)) then
tmp = t_0
else if (x1 <= 1.45d-62) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 5.4d+149) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
double t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
double tmp;
if (x1 <= -5e+89) {
tmp = t_1;
} else if (x1 <= -1.92e-118) {
tmp = t_0;
} else if (x1 <= 1.45e-62) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 5.4e+149) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0) t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) tmp = 0 if x1 <= -5e+89: tmp = t_1 elif x1 <= -1.92e-118: tmp = t_0 elif x1 <= 1.45e-62: tmp = (x2 * -6.0) - x1 elif x1 <= 5.4e+149: tmp = t_0 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)) t_1 = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))) tmp = 0.0 if (x1 <= -5e+89) tmp = t_1; elseif (x1 <= -1.92e-118) tmp = t_0; elseif (x1 <= 1.45e-62) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 5.4e+149) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0); t_1 = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); tmp = 0.0; if (x1 <= -5e+89) tmp = t_1; elseif (x1 <= -1.92e-118) tmp = t_0; elseif (x1 <= 1.45e-62) tmp = (x2 * -6.0) - x1; elseif (x1 <= 5.4e+149) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5e+89], t$95$1, If[LessEqual[x1, -1.92e-118], t$95$0, If[LessEqual[x1, 1.45e-62], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 5.4e+149], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
t_1 := x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -1.92 \cdot 10^{-118}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.45 \cdot 10^{-62}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 5.4 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.99999999999999983e89 or 5.4000000000000002e149 < x1 Initial program 7.6%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 51.5%
Taylor expanded in x2 around 0 84.8%
if -4.99999999999999983e89 < x1 < -1.92000000000000007e-118 or 1.44999999999999993e-62 < x1 < 5.4000000000000002e149Initial program 99.3%
Taylor expanded in x1 around 0 56.8%
Taylor expanded in x1 around 0 51.9%
Taylor expanded in x1 around 0 56.0%
Taylor expanded in x1 around inf 52.8%
if -1.92000000000000007e-118 < x1 < 1.44999999999999993e-62Initial program 99.6%
Taylor expanded in x1 around inf 99.6%
Taylor expanded in x1 around 0 99.6%
Taylor expanded in x1 around inf 79.7%
associate-*r/79.7%
metadata-eval79.7%
Simplified79.7%
Taylor expanded in x1 around 0 79.9%
Final simplification72.0%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -3.3e+89) (not (<= x1 5.4e+149))) (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0)))) (+ x1 (+ (* x1 -2.0) (* x2 (- (+ (* x1 -12.0) (* 8.0 (* x1 x2))) 6.0))))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.3e+89) || !(x1 <= 5.4e+149)) {
tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
} else {
tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-3.3d+89)) .or. (.not. (x1 <= 5.4d+149))) then
tmp = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
else
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (((x1 * (-12.0d0)) + (8.0d0 * (x1 * x2))) - 6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.3e+89) || !(x1 <= 5.4e+149)) {
tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
} else {
tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -3.3e+89) or not (x1 <= 5.4e+149): tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) else: tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -3.3e+89) || !(x1 <= 5.4e+149)) tmp = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))); else tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(8.0 * Float64(x1 * x2))) - 6.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -3.3e+89) || ~((x1 <= 5.4e+149))) tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); else tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + (8.0 * (x1 * x2))) - 6.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -3.3e+89], N[Not[LessEqual[x1, 5.4e+149]], $MachinePrecision]], N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.3 \cdot 10^{+89} \lor \neg \left(x1 \leq 5.4 \cdot 10^{+149}\right):\\
\;\;\;\;x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(\left(x1 \cdot -12 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\right)\\
\end{array}
\end{array}
if x1 < -3.29999999999999974e89 or 5.4000000000000002e149 < x1 Initial program 7.6%
Taylor expanded in x1 around 0 0.2%
Taylor expanded in x1 around 0 51.5%
Taylor expanded in x2 around 0 84.8%
if -3.29999999999999974e89 < x1 < 5.4000000000000002e149Initial program 99.4%
Taylor expanded in x1 around 0 69.6%
Taylor expanded in x1 around 0 67.1%
Taylor expanded in x1 around 0 69.2%
Taylor expanded in x2 around 0 78.7%
Final simplification80.6%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -3.6e-15) (not (<= x1 7e-14))) (+ x1 (+ x1 (* x1 (- (* x1 9.0) 3.0)))) (- (* x2 -6.0) x1)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.6e-15) || !(x1 <= 7e-14)) {
tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-3.6d-15)) .or. (.not. (x1 <= 7d-14))) then
tmp = x1 + (x1 + (x1 * ((x1 * 9.0d0) - 3.0d0)))
else
tmp = (x2 * (-6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.6e-15) || !(x1 <= 7e-14)) {
tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0)));
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -3.6e-15) or not (x1 <= 7e-14): tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))) else: tmp = (x2 * -6.0) - x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -3.6e-15) || !(x1 <= 7e-14)) tmp = Float64(x1 + Float64(x1 + Float64(x1 * Float64(Float64(x1 * 9.0) - 3.0)))); else tmp = Float64(Float64(x2 * -6.0) - x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -3.6e-15) || ~((x1 <= 7e-14))) tmp = x1 + (x1 + (x1 * ((x1 * 9.0) - 3.0))); else tmp = (x2 * -6.0) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -3.6e-15], N[Not[LessEqual[x1, 7e-14]], $MachinePrecision]], N[(x1 + N[(x1 + N[(x1 * N[(N[(x1 * 9.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.6 \cdot 10^{-15} \lor \neg \left(x1 \leq 7 \cdot 10^{-14}\right):\\
\;\;\;\;x1 + \left(x1 + x1 \cdot \left(x1 \cdot 9 - 3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\end{array}
\end{array}
if x1 < -3.6000000000000001e-15 or 7.0000000000000005e-14 < x1 Initial program 47.9%
Taylor expanded in x1 around 0 18.2%
Taylor expanded in x1 around 0 43.9%
Taylor expanded in x2 around 0 51.3%
if -3.6000000000000001e-15 < x1 < 7.0000000000000005e-14Initial program 99.5%
Taylor expanded in x1 around inf 99.5%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around inf 72.8%
associate-*r/72.8%
metadata-eval72.8%
Simplified72.8%
Taylor expanded in x1 around 0 73.1%
Final simplification61.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.72e-109) (not (<= x2 5.6e-251))) (+ x1 (* x2 -6.0)) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.72e-109) || !(x2 <= 5.6e-251)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = -x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-1.72d-109)) .or. (.not. (x2 <= 5.6d-251))) then
tmp = x1 + (x2 * (-6.0d0))
else
tmp = -x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.72e-109) || !(x2 <= 5.6e-251)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.72e-109) or not (x2 <= 5.6e-251): tmp = x1 + (x2 * -6.0) else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.72e-109) || !(x2 <= 5.6e-251)) tmp = Float64(x1 + Float64(x2 * -6.0)); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.72e-109) || ~((x2 <= 5.6e-251))) tmp = x1 + (x2 * -6.0); else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.72e-109], N[Not[LessEqual[x2, 5.6e-251]], $MachinePrecision]], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.72 \cdot 10^{-109} \lor \neg \left(x2 \leq 5.6 \cdot 10^{-251}\right):\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -1.7200000000000001e-109 or 5.59999999999999978e-251 < x2 Initial program 71.0%
Taylor expanded in x1 around 0 47.1%
Taylor expanded in x1 around 0 58.5%
Taylor expanded in x1 around 0 28.0%
*-commutative28.0%
Simplified28.0%
if -1.7200000000000001e-109 < x2 < 5.59999999999999978e-251Initial program 71.3%
Taylor expanded in x1 around 0 52.6%
Taylor expanded in x1 around 0 77.7%
Taylor expanded in x1 around 0 52.9%
Taylor expanded in x2 around 0 39.8%
distribute-rgt1-in39.8%
metadata-eval39.8%
mul-1-neg39.8%
Simplified39.8%
Final simplification30.3%
(FPCore (x1 x2) :precision binary64 (- (* x2 -6.0) x1))
double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = (x2 * (-6.0d0)) - x1
end function
public static double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
def code(x1, x2): return (x2 * -6.0) - x1
function code(x1, x2) return Float64(Float64(x2 * -6.0) - x1) end
function tmp = code(x1, x2) tmp = (x2 * -6.0) - x1; end
code[x1_, x2_] := N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6 - x1
\end{array}
Initial program 71.1%
Taylor expanded in x1 around inf 70.6%
Taylor expanded in x1 around 0 71.1%
Taylor expanded in x1 around inf 81.6%
associate-*r/81.6%
metadata-eval81.6%
Simplified81.6%
Taylor expanded in x1 around 0 35.0%
Final simplification35.0%
(FPCore (x1 x2) :precision binary64 (- x1))
double code(double x1, double x2) {
return -x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = -x1
end function
public static double code(double x1, double x2) {
return -x1;
}
def code(x1, x2): return -x1
function code(x1, x2) return Float64(-x1) end
function tmp = code(x1, x2) tmp = -x1; end
code[x1_, x2_] := (-x1)
\begin{array}{l}
\\
-x1
\end{array}
Initial program 71.1%
Taylor expanded in x1 around 0 48.1%
Taylor expanded in x1 around 0 62.3%
Taylor expanded in x1 around 0 53.9%
Taylor expanded in x2 around 0 11.9%
distribute-rgt1-in11.9%
metadata-eval11.9%
mul-1-neg11.9%
Simplified11.9%
Final simplification11.9%
(FPCore (x1 x2) :precision binary64 9.0)
double code(double x1, double x2) {
return 9.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = 9.0d0
end function
public static double code(double x1, double x2) {
return 9.0;
}
def code(x1, x2): return 9.0
function code(x1, x2) return 9.0 end
function tmp = code(x1, x2) tmp = 9.0; end
code[x1_, x2_] := 9.0
\begin{array}{l}
\\
9
\end{array}
Initial program 71.1%
Taylor expanded in x1 around 0 48.1%
Taylor expanded in x1 around inf 24.8%
Taylor expanded in x1 around 0 3.4%
Final simplification3.4%
herbie shell --seed 2024077
(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))))))