
(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 (+ x1 (* x2 -6.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (fma x1 (* x1 3.0) (- (* x2 2.0) x1)) (fma x1 x1 1.0))))
(if (<= x1 -4.2e+155)
(+
x1
(fma
x2
-6.0
(fma
x1
(fma (* x2 4.0) (fma 2.0 x2 -3.0) -2.0)
(* (* x1 x1) (* 3.0 (+ x2 (+ x2 3.0)))))))
(if (<= x1 -5.5e+102)
(+
x1
(+
(+ x1 (* (pow x1 4.0) 6.0))
(* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) (+ (* x1 x1) 1.0)))))
(if (<= x1 1.5e+133)
(+
x1
(fma
3.0
(/ (- t_1 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma
x1
(* x1 (fma t_2 4.0 -6.0))
(* t_2 (* (+ -3.0 t_2) (* x1 2.0))))
(fma t_1 t_2 (pow x1 3.0))))))
(cbrt (* t_0 (* t_0 t_0))))))))
double code(double x1, double x2) {
double t_0 = x1 + (x2 * -6.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = fma(x1, (x1 * 3.0), ((x2 * 2.0) - x1)) / fma(x1, x1, 1.0);
double tmp;
if (x1 <= -4.2e+155) {
tmp = x1 + fma(x2, -6.0, fma(x1, fma((x2 * 4.0), fma(2.0, x2, -3.0), -2.0), ((x1 * x1) * (3.0 * (x2 + (x2 + 3.0))))));
} else if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 + (pow(x1, 4.0) * 6.0)) + (3.0 * (((t_1 - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))));
} else if (x1 <= 1.5e+133) {
tmp = x1 + fma(3.0, ((t_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_2, 4.0, -6.0)), (t_2 * ((-3.0 + t_2) * (x1 * 2.0)))), fma(t_1, t_2, pow(x1, 3.0)))));
} else {
tmp = cbrt((t_0 * (t_0 * t_0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 + Float64(x2 * -6.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(fma(x1, Float64(x1 * 3.0), Float64(Float64(x2 * 2.0) - x1)) / fma(x1, x1, 1.0)) tmp = 0.0 if (x1 <= -4.2e+155) tmp = Float64(x1 + fma(x2, -6.0, fma(x1, fma(Float64(x2 * 4.0), fma(2.0, x2, -3.0), -2.0), Float64(Float64(x1 * x1) * Float64(3.0 * Float64(x2 + Float64(x2 + 3.0))))))); elseif (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * 6.0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / Float64(Float64(x1 * x1) + 1.0))))); elseif (x1 <= 1.5e+133) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_2, 4.0, -6.0)), Float64(t_2 * Float64(Float64(-3.0 + t_2) * Float64(x1 * 2.0)))), fma(t_1, t_2, (x1 ^ 3.0)))))); else tmp = cbrt(Float64(t_0 * Float64(t_0 * t_0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(N[(x2 * 2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.2e+155], N[(x1 + N[(x2 * -6.0 + N[(x1 * N[(N[(x2 * 4.0), $MachinePrecision] * N[(2.0 * x2 + -3.0), $MachinePrecision] + -2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 * N[(x2 + N[(x2 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.5e+102], N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5e+133], N[(x1 + N[(3.0 * N[(N[(t$95$1 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$2 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(N[(-3.0 + t$95$2), $MachinePrecision] * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$2 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x2 \cdot -6\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, x2 \cdot 2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 \leq -4.2 \cdot 10^{+155}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \left(x1 \cdot x1\right) \cdot \left(3 \cdot \left(x2 + \left(x2 + 3\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot 6\right) + 3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1}\right)\\
\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_1 - \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_2, 4, -6\right), t_2 \cdot \left(\left(-3 + t_2\right) \cdot \left(x1 \cdot 2\right)\right)\right), \mathsf{fma}\left(t_1, t_2, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_0 \cdot \left(t_0 \cdot t_0\right)}\\
\end{array}
\end{array}
if x1 < -4.2e155Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 54.2%
*-commutative54.2%
fma-def54.2%
+-commutative54.2%
fma-def70.8%
associate-*r*70.8%
fma-neg70.8%
metadata-eval70.8%
*-commutative70.8%
fma-neg70.8%
metadata-eval70.8%
associate-*r*70.8%
*-commutative70.8%
associate-*l*70.8%
unpow270.8%
cancel-sign-sub-inv70.8%
metadata-eval70.8%
count-270.8%
Simplified70.8%
if -4.2e155 < x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around inf 87.5%
*-commutative87.5%
Simplified87.5%
if -5.49999999999999981e102 < x1 < 1.50000000000000003e133Initial program 99.3%
Simplified99.6%
if 1.50000000000000003e133 < x1 Initial program 9.7%
Taylor expanded in x1 around 0 3.5%
Taylor expanded in x1 around 0 9.4%
*-commutative9.4%
Simplified9.4%
add-cbrt-cube96.8%
Applied egg-rr96.8%
associate-*l*96.8%
Simplified96.8%
Final simplification96.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma x1 (* x1 3.0) (- (+ x2 x2) x1)))
(t_1 (/ t_0 (fma x1 x1 1.0)))
(t_2 (+ x1 (* x2 -6.0)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (/ (- (+ t_3 (* x2 2.0)) x1) t_4)))
(if (<= x1 -4.2e+155)
(+
x1
(fma
x2
-6.0
(fma
x1
(fma (* x2 4.0) (fma 2.0 x2 -3.0) -2.0)
(* (* x1 x1) (* 3.0 (+ x2 (+ x2 3.0)))))))
(if (<= x1 -5.5e-103)
(+
x1
(fma
3.0
(/ (- t_3 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
(* x1 (/ (* 3.0 (* x1 t_0)) (fma x1 x1 1.0)))
(*
(fma x1 x1 1.0)
(+
x1
(*
x1
(+ (* 2.0 (* t_1 (+ -3.0 t_1))) (* x1 (fma t_1 4.0 -6.0)))))))))
(if (<= x1 1.5e+133)
(+
x1
(+
(+
x1
(+
(+
(*
t_4
(+
(* (* (* x1 2.0) t_5) (- t_5 3.0))
(* (* x1 x1) (- (* 4.0 t_5) 6.0))))
(* 3.0 t_3))
(* x1 (* x1 x1))))
(* 3.0 (- (* x2 -2.0) x1))))
(cbrt (* t_2 (* t_2 t_2))))))))
double code(double x1, double x2) {
double t_0 = fma(x1, (x1 * 3.0), ((x2 + x2) - x1));
double t_1 = t_0 / fma(x1, x1, 1.0);
double t_2 = x1 + (x2 * -6.0);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = ((t_3 + (x2 * 2.0)) - x1) / t_4;
double tmp;
if (x1 <= -4.2e+155) {
tmp = x1 + fma(x2, -6.0, fma(x1, fma((x2 * 4.0), fma(2.0, x2, -3.0), -2.0), ((x1 * x1) * (3.0 * (x2 + (x2 + 3.0))))));
} else if (x1 <= -5.5e-103) {
tmp = x1 + fma(3.0, ((t_3 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), ((x1 * ((3.0 * (x1 * t_0)) / fma(x1, x1, 1.0))) + (fma(x1, x1, 1.0) * (x1 + (x1 * ((2.0 * (t_1 * (-3.0 + t_1))) + (x1 * fma(t_1, 4.0, -6.0))))))));
} else if (x1 <= 1.5e+133) {
tmp = x1 + ((x1 + (((t_4 * ((((x1 * 2.0) * t_5) * (t_5 - 3.0)) + ((x1 * x1) * ((4.0 * t_5) - 6.0)))) + (3.0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = cbrt((t_2 * (t_2 * t_2)));
}
return tmp;
}
function code(x1, x2) t_0 = fma(x1, Float64(x1 * 3.0), Float64(Float64(x2 + x2) - x1)) t_1 = Float64(t_0 / fma(x1, x1, 1.0)) t_2 = Float64(x1 + Float64(x2 * -6.0)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(Float64(Float64(t_3 + Float64(x2 * 2.0)) - x1) / t_4) tmp = 0.0 if (x1 <= -4.2e+155) tmp = Float64(x1 + fma(x2, -6.0, fma(x1, fma(Float64(x2 * 4.0), fma(2.0, x2, -3.0), -2.0), Float64(Float64(x1 * x1) * Float64(3.0 * Float64(x2 + Float64(x2 + 3.0))))))); elseif (x1 <= -5.5e-103) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_3 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(Float64(x1 * Float64(Float64(3.0 * Float64(x1 * t_0)) / fma(x1, x1, 1.0))) + Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(x1 * Float64(Float64(2.0 * Float64(t_1 * Float64(-3.0 + t_1))) + Float64(x1 * fma(t_1, 4.0, -6.0))))))))); elseif (x1 <= 1.5e+133) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_4 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_5) - 6.0)))) + Float64(3.0 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = cbrt(Float64(t_2 * Float64(t_2 * t_2))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(N[(x2 + x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$3 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]}, If[LessEqual[x1, -4.2e+155], N[(x1 + N[(x2 * -6.0 + N[(x1 * N[(N[(x2 * 4.0), $MachinePrecision] * N[(2.0 * x2 + -3.0), $MachinePrecision] + -2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 * N[(x2 + N[(x2 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.5e-103], N[(x1 + N[(3.0 * N[(N[(t$95$3 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(3.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(x1 * N[(N[(2.0 * N[(t$95$1 * N[(-3.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(t$95$1 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5e+133], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$4 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$5), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$2 * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x1, x1 \cdot 3, \left(x2 + x2\right) - x1\right)\\
t_1 := \frac{t_0}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_2 := x1 + x2 \cdot -6\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \frac{\left(t_3 + x2 \cdot 2\right) - x1}{t_4}\\
\mathbf{if}\;x1 \leq -4.2 \cdot 10^{+155}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \left(x1 \cdot x1\right) \cdot \left(3 \cdot \left(x2 + \left(x2 + 3\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{-103}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_3 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 \cdot \frac{3 \cdot \left(x1 \cdot t_0\right)}{\mathsf{fma}\left(x1, x1, 1\right)} + \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + x1 \cdot \left(2 \cdot \left(t_1 \cdot \left(-3 + t_1\right)\right) + x1 \cdot \mathsf{fma}\left(t_1, 4, -6\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_4 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_5\right) \cdot \left(t_5 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_5 - 6\right)\right) + 3 \cdot t_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_2 \cdot \left(t_2 \cdot t_2\right)}\\
\end{array}
\end{array}
if x1 < -4.2e155Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 54.2%
*-commutative54.2%
fma-def54.2%
+-commutative54.2%
fma-def70.8%
associate-*r*70.8%
fma-neg70.8%
metadata-eval70.8%
*-commutative70.8%
fma-neg70.8%
metadata-eval70.8%
associate-*r*70.8%
*-commutative70.8%
associate-*l*70.8%
unpow270.8%
cancel-sign-sub-inv70.8%
metadata-eval70.8%
count-270.8%
Simplified70.8%
if -4.2e155 < x1 < -5.50000000000000032e-103Initial program 85.1%
Simplified97.7%
if -5.50000000000000032e-103 < x1 < 1.50000000000000003e133Initial program 99.4%
Taylor expanded in x1 around inf 98.0%
Taylor expanded in x1 around 0 99.4%
mul-1-neg99.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
if 1.50000000000000003e133 < x1 Initial program 9.7%
Taylor expanded in x1 around 0 3.5%
Taylor expanded in x1 around 0 9.4%
*-commutative9.4%
Simplified9.4%
add-cbrt-cube96.8%
Applied egg-rr96.8%
associate-*l*96.8%
Simplified96.8%
Final simplification96.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (fma x1 (* x1 3.0) (- (+ x2 x2) x1)) (fma x1 x1 1.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* x2 2.0)) x1) t_1))
(t_4 (+ x1 (* x2 -6.0))))
(if (<= x1 -4.2e+155)
(+
x1
(fma
x2
-6.0
(fma
x1
(fma (* x2 4.0) (fma 2.0 x2 -3.0) -2.0)
(* (* x1 x1) (* 3.0 (+ x2 (+ x2 3.0)))))))
(if (<= x1 -2200000.0)
(+
x1
(fma
3.0
(/ (- t_2 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
(*
(fma x1 x1 1.0)
(+
x1
(* x1 (+ (* 2.0 (* t_0 (+ -3.0 t_0))) (* x1 (fma t_0 4.0 -6.0))))))
(* x1 (* x1 9.0)))))
(if (<= x1 1.5e+133)
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* 4.0 t_3) 6.0))))
(* 3.0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (- (* x2 -2.0) x1))))
(cbrt (* t_4 (* t_4 t_4))))))))
double code(double x1, double x2) {
double t_0 = fma(x1, (x1 * 3.0), ((x2 + x2) - x1)) / fma(x1, x1, 1.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (x2 * 2.0)) - x1) / t_1;
double t_4 = x1 + (x2 * -6.0);
double tmp;
if (x1 <= -4.2e+155) {
tmp = x1 + fma(x2, -6.0, fma(x1, fma((x2 * 4.0), fma(2.0, x2, -3.0), -2.0), ((x1 * x1) * (3.0 * (x2 + (x2 + 3.0))))));
} else if (x1 <= -2200000.0) {
tmp = x1 + fma(3.0, ((t_2 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), ((fma(x1, x1, 1.0) * (x1 + (x1 * ((2.0 * (t_0 * (-3.0 + t_0))) + (x1 * fma(t_0, 4.0, -6.0)))))) + (x1 * (x1 * 9.0))));
} else if (x1 <= 1.5e+133) {
tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = cbrt((t_4 * (t_4 * t_4)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(fma(x1, Float64(x1 * 3.0), Float64(Float64(x2 + x2) - x1)) / fma(x1, x1, 1.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(x2 * 2.0)) - x1) / t_1) t_4 = Float64(x1 + Float64(x2 * -6.0)) tmp = 0.0 if (x1 <= -4.2e+155) tmp = Float64(x1 + fma(x2, -6.0, fma(x1, fma(Float64(x2 * 4.0), fma(2.0, x2, -3.0), -2.0), Float64(Float64(x1 * x1) * Float64(3.0 * Float64(x2 + Float64(x2 + 3.0))))))); elseif (x1 <= -2200000.0) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_2 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(x1 * Float64(Float64(2.0 * Float64(t_0 * Float64(-3.0 + t_0))) + Float64(x1 * fma(t_0, 4.0, -6.0)))))) + Float64(x1 * Float64(x1 * 9.0))))); elseif (x1 <= 1.5e+133) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(3.0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = cbrt(Float64(t_4 * Float64(t_4 * t_4))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(N[(x2 + x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.2e+155], N[(x1 + N[(x2 * -6.0 + N[(x1 * N[(N[(x2 * 4.0), $MachinePrecision] * N[(2.0 * x2 + -3.0), $MachinePrecision] + -2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 * N[(x2 + N[(x2 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2200000.0], N[(x1 + N[(3.0 * N[(N[(t$95$2 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(x1 * N[(N[(2.0 * N[(t$95$0 * N[(-3.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(t$95$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5e+133], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$4 * N[(t$95$4 * t$95$4), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \left(x2 + x2\right) - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t_2 + x2 \cdot 2\right) - x1}{t_1}\\
t_4 := x1 + x2 \cdot -6\\
\mathbf{if}\;x1 \leq -4.2 \cdot 10^{+155}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \left(x1 \cdot x1\right) \cdot \left(3 \cdot \left(x2 + \left(x2 + 3\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2200000:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_2 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + x1 \cdot \left(2 \cdot \left(t_0 \cdot \left(-3 + t_0\right)\right) + x1 \cdot \mathsf{fma}\left(t_0, 4, -6\right)\right)\right) + x1 \cdot \left(x1 \cdot 9\right)\right)\\
\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + 3 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_4 \cdot \left(t_4 \cdot t_4\right)}\\
\end{array}
\end{array}
if x1 < -4.2e155Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 54.2%
*-commutative54.2%
fma-def54.2%
+-commutative54.2%
fma-def70.8%
associate-*r*70.8%
fma-neg70.8%
metadata-eval70.8%
*-commutative70.8%
fma-neg70.8%
metadata-eval70.8%
associate-*r*70.8%
*-commutative70.8%
associate-*l*70.8%
unpow270.8%
cancel-sign-sub-inv70.8%
metadata-eval70.8%
count-270.8%
Simplified70.8%
if -4.2e155 < x1 < -2.2e6Initial program 71.7%
Simplified95.9%
Taylor expanded in x1 around inf 95.9%
*-commutative95.9%
Simplified95.9%
if -2.2e6 < x1 < 1.50000000000000003e133Initial program 99.3%
Taylor expanded in x1 around inf 97.5%
Taylor expanded in x1 around 0 99.3%
mul-1-neg99.3%
unsub-neg99.3%
*-commutative99.3%
Simplified99.3%
if 1.50000000000000003e133 < x1 Initial program 9.7%
Taylor expanded in x1 around 0 3.5%
Taylor expanded in x1 around 0 9.4%
*-commutative9.4%
Simplified9.4%
add-cbrt-cube96.8%
Applied egg-rr96.8%
associate-*l*96.8%
Simplified96.8%
Final simplification96.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* x2 2.0)) x1) t_0))
(t_3 (+ x1 (* x2 -6.0))))
(if (<= x1 -4.2e+155)
(+
x1
(fma
x2
-6.0
(fma
x1
(fma (* x2 4.0) (fma 2.0 x2 -3.0) -2.0)
(* (* x1 x1) (* 3.0 (+ x2 (+ x2 3.0)))))))
(if (<= x1 -5.6e+102)
(+
x1
(+
(+ x1 (* (pow x1 4.0) 6.0))
(* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_0))))
(if (<= x1 1.5e+133)
(+
x1
(+
(+
x1
(+
(+
(*
t_0
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* 3.0 t_1))
(* x1 (* x1 x1))))
(* 3.0 (- (* x2 -2.0) x1))))
(cbrt (* t_3 (* t_3 t_3))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0;
double t_3 = x1 + (x2 * -6.0);
double tmp;
if (x1 <= -4.2e+155) {
tmp = x1 + fma(x2, -6.0, fma(x1, fma((x2 * 4.0), fma(2.0, x2, -3.0), -2.0), ((x1 * x1) * (3.0 * (x2 + (x2 + 3.0))))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (pow(x1, 4.0) * 6.0)) + (3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)));
} else if (x1 <= 1.5e+133) {
tmp = x1 + ((x1 + (((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_1)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = cbrt((t_3 * (t_3 * t_3)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(x2 * 2.0)) - x1) / t_0) t_3 = Float64(x1 + Float64(x2 * -6.0)) tmp = 0.0 if (x1 <= -4.2e+155) tmp = Float64(x1 + fma(x2, -6.0, fma(x1, fma(Float64(x2 * 4.0), fma(2.0, x2, -3.0), -2.0), Float64(Float64(x1 * x1) * Float64(3.0 * Float64(x2 + Float64(x2 + 3.0))))))); elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * 6.0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / t_0)))); elseif (x1 <= 1.5e+133) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(3.0 * t_1)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = cbrt(Float64(t_3 * Float64(t_3 * t_3))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.2e+155], N[(x1 + N[(x2 * -6.0 + N[(x1 * N[(N[(x2 * 4.0), $MachinePrecision] * N[(2.0 * x2 + -3.0), $MachinePrecision] + -2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(3.0 * N[(x2 + N[(x2 + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5e+133], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$3 * N[(t$95$3 * t$95$3), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_0}\\
t_3 := x1 + x2 \cdot -6\\
\mathbf{if}\;x1 \leq -4.2 \cdot 10^{+155}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x2, -6, \mathsf{fma}\left(x1, \mathsf{fma}\left(x2 \cdot 4, \mathsf{fma}\left(2, x2, -3\right), -2\right), \left(x1 \cdot x1\right) \cdot \left(3 \cdot \left(x2 + \left(x2 + 3\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot 6\right) + 3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_0}\right)\\
\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_1\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_3 \cdot \left(t_3 \cdot t_3\right)}\\
\end{array}
\end{array}
if x1 < -4.2e155Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 54.2%
*-commutative54.2%
fma-def54.2%
+-commutative54.2%
fma-def70.8%
associate-*r*70.8%
fma-neg70.8%
metadata-eval70.8%
*-commutative70.8%
fma-neg70.8%
metadata-eval70.8%
associate-*r*70.8%
*-commutative70.8%
associate-*l*70.8%
unpow270.8%
cancel-sign-sub-inv70.8%
metadata-eval70.8%
count-270.8%
Simplified70.8%
if -4.2e155 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around inf 87.5%
*-commutative87.5%
Simplified87.5%
if -5.60000000000000037e102 < x1 < 1.50000000000000003e133Initial program 99.3%
Taylor expanded in x1 around inf 97.6%
Taylor expanded in x1 around 0 99.3%
mul-1-neg99.3%
unsub-neg99.3%
*-commutative99.3%
Simplified99.3%
if 1.50000000000000003e133 < x1 Initial program 9.7%
Taylor expanded in x1 around 0 3.5%
Taylor expanded in x1 around 0 9.4%
*-commutative9.4%
Simplified9.4%
add-cbrt-cube96.8%
Applied egg-rr96.8%
associate-*l*96.8%
Simplified96.8%
Final simplification96.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (+ x1 (* x2 -6.0)))
(t_2 (* x1 (* x1 x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (/ (- (+ t_3 (* x2 2.0)) x1) t_0))
(t_5
(*
t_0
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(* (* x1 x1) (- (* 4.0 t_4) 6.0))))))
(if (<=
(+
x1
(+
(* 3.0 (/ (- (- t_3 (* x2 2.0)) x1) t_0))
(+ x1 (+ t_2 (+ t_5 (* t_3 t_4))))))
INFINITY)
(+ x1 (+ (+ x1 (+ (+ t_5 (* 3.0 t_3)) t_2)) (* 3.0 (- (* x2 -2.0) x1))))
(cbrt (* t_1 (* t_1 t_1))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + (x2 * -6.0);
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (x2 * 2.0)) - x1) / t_0;
double t_5 = t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0)));
double tmp;
if ((x1 + ((3.0 * (((t_3 - (x2 * 2.0)) - x1) / t_0)) + (x1 + (t_2 + (t_5 + (t_3 * t_4)))))) <= ((double) INFINITY)) {
tmp = x1 + ((x1 + ((t_5 + (3.0 * t_3)) + t_2)) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = cbrt((t_1 * (t_1 * t_1)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + (x2 * -6.0);
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (x2 * 2.0)) - x1) / t_0;
double t_5 = t_0 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0)));
double tmp;
if ((x1 + ((3.0 * (((t_3 - (x2 * 2.0)) - x1) / t_0)) + (x1 + (t_2 + (t_5 + (t_3 * t_4)))))) <= Double.POSITIVE_INFINITY) {
tmp = x1 + ((x1 + ((t_5 + (3.0 * t_3)) + t_2)) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = Math.cbrt((t_1 * (t_1 * t_1)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 + Float64(x2 * -6.0)) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(Float64(t_3 + Float64(x2 * 2.0)) - x1) / t_0) t_5 = Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0)))) tmp = 0.0 if (Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(x2 * 2.0)) - x1) / t_0)) + Float64(x1 + Float64(t_2 + Float64(t_5 + Float64(t_3 * t_4)))))) <= Inf) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(t_5 + Float64(3.0 * t_3)) + t_2)) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = cbrt(Float64(t_1 * Float64(t_1 * t_1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = 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] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$3 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$2 + N[(t$95$5 + N[(t$95$3 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(x1 + N[(N[(t$95$5 + N[(3.0 * t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$1 * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 + x2 \cdot -6\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \frac{\left(t_3 + x2 \cdot 2\right) - x1}{t_0}\\
t_5 := 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 \left(4 \cdot t_4 - 6\right)\right)\\
\mathbf{if}\;x1 + \left(3 \cdot \frac{\left(t_3 - x2 \cdot 2\right) - x1}{t_0} + \left(x1 + \left(t_2 + \left(t_5 + t_3 \cdot t_4\right)\right)\right)\right) \leq \infty:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_5 + 3 \cdot t_3\right) + t_2\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_1 \cdot \left(t_1 \cdot t_1\right)}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.3%
Taylor expanded in x1 around inf 97.7%
Taylor expanded in x1 around 0 99.3%
mul-1-neg99.3%
unsub-neg99.3%
*-commutative99.3%
Simplified99.3%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 4.8%
*-commutative4.8%
Simplified4.8%
add-cbrt-cube48.3%
Applied egg-rr48.3%
associate-*l*48.3%
Simplified48.3%
Final simplification87.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x2 -6.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* x2 2.0)) x1) t_2)))
(if (<= x1 -4.2e+155)
(+
x1
(+
(* x2 -6.0)
(+
(* 3.0 (* (pow x1 2.0) (- 3.0 (* x2 -2.0))))
(* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0)))))
(if (<= x1 -5.6e+102)
(+
x1
(+
(+ x1 (* (pow x1 4.0) 6.0))
(* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_2))))
(if (<= x1 1.5e+133)
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* 4.0 t_3) 6.0))))
(* 3.0 t_1))
(* x1 (* x1 x1))))
(* 3.0 (- (* x2 -2.0) x1))))
(cbrt (* t_0 (* t_0 t_0))))))))
double code(double x1, double x2) {
double t_0 = x1 + (x2 * -6.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (x2 * 2.0)) - x1) / t_2;
double tmp;
if (x1 <= -4.2e+155) {
tmp = x1 + ((x2 * -6.0) + ((3.0 * (pow(x1, 2.0) * (3.0 - (x2 * -2.0)))) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (pow(x1, 4.0) * 6.0)) + (3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2)));
} else if (x1 <= 1.5e+133) {
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_1)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = cbrt((t_0 * (t_0 * t_0)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 + (x2 * -6.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (x2 * 2.0)) - x1) / t_2;
double tmp;
if (x1 <= -4.2e+155) {
tmp = x1 + ((x2 * -6.0) + ((3.0 * (Math.pow(x1, 2.0) * (3.0 - (x2 * -2.0)))) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))));
} else if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (Math.pow(x1, 4.0) * 6.0)) + (3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2)));
} else if (x1 <= 1.5e+133) {
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_1)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = Math.cbrt((t_0 * (t_0 * t_0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 + Float64(x2 * -6.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(x2 * 2.0)) - x1) / t_2) tmp = 0.0 if (x1 <= -4.2e+155) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(3.0 * Float64((x1 ^ 2.0) * Float64(3.0 - Float64(x2 * -2.0)))) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0))))); elseif (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * 6.0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / t_2)))); elseif (x1 <= 1.5e+133) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(3.0 * t_1)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = cbrt(Float64(t_0 * Float64(t_0 * t_0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x2 * -6.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[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -4.2e+155], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(3.0 * N[(N[Power[x1, 2.0], $MachinePrecision] * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.5e+133], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x2 \cdot -6\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_2}\\
\mathbf{if}\;x1 \leq -4.2 \cdot 10^{+155}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(3 \cdot \left({x1}^{2} \cdot \left(3 - x2 \cdot -2\right)\right) + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot 6\right) + 3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_2}\right)\\
\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + 3 \cdot t_1\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_0 \cdot \left(t_0 \cdot t_0\right)}\\
\end{array}
\end{array}
if x1 < -4.2e155Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 54.2%
if -4.2e155 < x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around inf 87.5%
*-commutative87.5%
Simplified87.5%
if -5.60000000000000037e102 < x1 < 1.50000000000000003e133Initial program 99.3%
Taylor expanded in x1 around inf 97.6%
Taylor expanded in x1 around 0 99.3%
mul-1-neg99.3%
unsub-neg99.3%
*-commutative99.3%
Simplified99.3%
if 1.50000000000000003e133 < x1 Initial program 9.7%
Taylor expanded in x1 around 0 3.5%
Taylor expanded in x1 around 0 9.4%
*-commutative9.4%
Simplified9.4%
add-cbrt-cube96.8%
Applied egg-rr96.8%
associate-*l*96.8%
Simplified96.8%
Final simplification94.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ x1 (* x2 -6.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_0 (* x2 2.0)) x1) t_2)))
(if (<= x1 -1e+103)
(+
x1
(+
(+ x1 (* (pow x1 4.0) 6.0))
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_2))))
(if (<= x1 5e+131)
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* 4.0 t_3) 6.0))))
(* 3.0 t_0))
(* x1 (* x1 x1))))
(* 3.0 (- (* x2 -2.0) x1))))
(cbrt (* t_1 (* t_1 t_1)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 + (x2 * -6.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (x2 * 2.0)) - x1) / t_2;
double tmp;
if (x1 <= -1e+103) {
tmp = x1 + ((x1 + (pow(x1, 4.0) * 6.0)) + (3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2)));
} else if (x1 <= 5e+131) {
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = cbrt((t_1 * (t_1 * t_1)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 + (x2 * -6.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (x2 * 2.0)) - x1) / t_2;
double tmp;
if (x1 <= -1e+103) {
tmp = x1 + ((x1 + (Math.pow(x1, 4.0) * 6.0)) + (3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2)));
} else if (x1 <= 5e+131) {
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = Math.cbrt((t_1 * (t_1 * t_1)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 + Float64(x2 * -6.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_0 + Float64(x2 * 2.0)) - x1) / t_2) tmp = 0.0 if (x1 <= -1e+103) tmp = Float64(x1 + Float64(Float64(x1 + Float64((x1 ^ 4.0) * 6.0)) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_2)))); elseif (x1 <= 5e+131) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(3.0 * t_0)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = cbrt(Float64(t_1 * Float64(t_1 * t_1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -1e+103], N[(x1 + N[(N[(x1 + N[(N[Power[x1, 4.0], $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+131], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$1 * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 + x2 \cdot -6\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_2}\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+103}:\\
\;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot 6\right) + 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_2}\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+131}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + 3 \cdot t_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_1 \cdot \left(t_1 \cdot t_1\right)}\\
\end{array}
\end{array}
if x1 < -1e103Initial program 0.0%
Taylor expanded in x1 around inf 21.9%
*-commutative21.9%
Simplified21.9%
if -1e103 < x1 < 4.99999999999999995e131Initial program 99.3%
Taylor expanded in x1 around inf 97.6%
Taylor expanded in x1 around 0 99.3%
mul-1-neg99.3%
unsub-neg99.3%
*-commutative99.3%
Simplified99.3%
if 4.99999999999999995e131 < x1 Initial program 9.7%
Taylor expanded in x1 around 0 3.5%
Taylor expanded in x1 around 0 9.4%
*-commutative9.4%
Simplified9.4%
add-cbrt-cube96.8%
Applied egg-rr96.8%
associate-*l*96.8%
Simplified96.8%
Final simplification89.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* x2 2.0)) x1) t_1)))
(if (<= x1 5.5e+144)
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* 3.0 t_0))
(* x1 (* x1 x1))))
(* 3.0 (- (* x2 -2.0) x1))))
(/ (fma x1 x1 (* (* x2 x2) -36.0)) (+ x1 (* x2 6.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
double tmp;
if (x1 <= 5.5e+144) {
tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = fma(x1, x1, ((x2 * x2) * -36.0)) / (x1 + (x2 * 6.0));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(x2 * 2.0)) - x1) / t_1) tmp = 0.0 if (x1 <= 5.5e+144) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(3.0 * t_0)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = Float64(fma(x1, x1, Float64(Float64(x2 * x2) * -36.0)) / Float64(x1 + Float64(x2 * 6.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, 5.5e+144], 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[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * x1 + N[(N[(x2 * x2), $MachinePrecision] * -36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;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(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x1, x1, \left(x2 \cdot x2\right) \cdot -36\right)}{x1 + x2 \cdot 6}\\
\end{array}
\end{array}
if x1 < 5.50000000000000022e144Initial program 85.3%
Taylor expanded in x1 around inf 83.9%
Taylor expanded in x1 around 0 85.3%
mul-1-neg85.3%
unsub-neg85.3%
*-commutative85.3%
Simplified85.3%
if 5.50000000000000022e144 < x1 Initial program 3.4%
Taylor expanded in x1 around 0 3.4%
Taylor expanded in x1 around 0 9.7%
*-commutative9.7%
Simplified9.7%
flip-+75.9%
Applied egg-rr75.9%
fma-neg79.3%
swap-sqr79.3%
unpow279.3%
distribute-rgt-neg-in79.3%
unpow279.3%
metadata-eval79.3%
metadata-eval79.3%
*-commutative79.3%
cancel-sign-sub-inv79.3%
metadata-eval79.3%
*-commutative79.3%
Simplified79.3%
Final simplification84.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* x2 2.0)) x1) t_0))
(t_4 (* 3.0 (/ (- (- t_2 (* x2 2.0)) x1) t_0)))
(t_5
(+
x1
(+
t_4
(+
x1
(+
t_1
(+
(* 3.0 t_2)
(*
t_0
(+
(* (* x1 x1) (- (* 4.0 t_3) 6.0))
(* (- t_3 3.0) (* 3.0 (* x1 2.0)))))))))))
(t_6
(+
x1
(+
t_4
(+
x1
(+
t_1
(+
(* t_2 t_3)
(* t_0 (* 4.0 (* x1 (* x2 (- (* x2 2.0) 3.0))))))))))))
(if (<= x1 -16000.0)
t_5
(if (<= x1 -1.25e-232)
t_6
(if (<= x1 6.8e-252)
(+ x1 (+ t_4 (+ x1 (* 4.0 (* x1 (* x2 -3.0))))))
(if (<= x1 195.0)
t_6
(if (<= x1 5.5e+144)
t_5
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (x2 * 2.0)) - x1) / t_0;
double t_4 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0);
double t_5 = x1 + (t_4 + (x1 + (t_1 + ((3.0 * t_2) + (t_0 * (((x1 * x1) * ((4.0 * t_3) - 6.0)) + ((t_3 - 3.0) * (3.0 * (x1 * 2.0)))))))));
double t_6 = x1 + (t_4 + (x1 + (t_1 + ((t_2 * t_3) + (t_0 * (4.0 * (x1 * (x2 * ((x2 * 2.0) - 3.0)))))))));
double tmp;
if (x1 <= -16000.0) {
tmp = t_5;
} else if (x1 <= -1.25e-232) {
tmp = t_6;
} else if (x1 <= 6.8e-252) {
tmp = x1 + (t_4 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
} else if (x1 <= 195.0) {
tmp = t_6;
} else if (x1 <= 5.5e+144) {
tmp = t_5;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (x2 * 2.0d0)) - x1) / t_0
t_4 = 3.0d0 * (((t_2 - (x2 * 2.0d0)) - x1) / t_0)
t_5 = x1 + (t_4 + (x1 + (t_1 + ((3.0d0 * t_2) + (t_0 * (((x1 * x1) * ((4.0d0 * t_3) - 6.0d0)) + ((t_3 - 3.0d0) * (3.0d0 * (x1 * 2.0d0)))))))))
t_6 = x1 + (t_4 + (x1 + (t_1 + ((t_2 * t_3) + (t_0 * (4.0d0 * (x1 * (x2 * ((x2 * 2.0d0) - 3.0d0)))))))))
if (x1 <= (-16000.0d0)) then
tmp = t_5
else if (x1 <= (-1.25d-232)) then
tmp = t_6
else if (x1 <= 6.8d-252) then
tmp = x1 + (t_4 + (x1 + (4.0d0 * (x1 * (x2 * (-3.0d0))))))
else if (x1 <= 195.0d0) then
tmp = t_6
else if (x1 <= 5.5d+144) then
tmp = t_5
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (x2 * 2.0)) - x1) / t_0;
double t_4 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0);
double t_5 = x1 + (t_4 + (x1 + (t_1 + ((3.0 * t_2) + (t_0 * (((x1 * x1) * ((4.0 * t_3) - 6.0)) + ((t_3 - 3.0) * (3.0 * (x1 * 2.0)))))))));
double t_6 = x1 + (t_4 + (x1 + (t_1 + ((t_2 * t_3) + (t_0 * (4.0 * (x1 * (x2 * ((x2 * 2.0) - 3.0)))))))));
double tmp;
if (x1 <= -16000.0) {
tmp = t_5;
} else if (x1 <= -1.25e-232) {
tmp = t_6;
} else if (x1 <= 6.8e-252) {
tmp = x1 + (t_4 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
} else if (x1 <= 195.0) {
tmp = t_6;
} else if (x1 <= 5.5e+144) {
tmp = t_5;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (x2 * 2.0)) - x1) / t_0 t_4 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0) t_5 = x1 + (t_4 + (x1 + (t_1 + ((3.0 * t_2) + (t_0 * (((x1 * x1) * ((4.0 * t_3) - 6.0)) + ((t_3 - 3.0) * (3.0 * (x1 * 2.0))))))))) t_6 = x1 + (t_4 + (x1 + (t_1 + ((t_2 * t_3) + (t_0 * (4.0 * (x1 * (x2 * ((x2 * 2.0) - 3.0))))))))) tmp = 0 if x1 <= -16000.0: tmp = t_5 elif x1 <= -1.25e-232: tmp = t_6 elif x1 <= 6.8e-252: tmp = x1 + (t_4 + (x1 + (4.0 * (x1 * (x2 * -3.0))))) elif x1 <= 195.0: tmp = t_6 elif x1 <= 5.5e+144: tmp = t_5 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(x2 * 2.0)) - x1) / t_0) t_4 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(x2 * 2.0)) - x1) / t_0)) t_5 = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_1 + Float64(Float64(3.0 * t_2) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)) + Float64(Float64(t_3 - 3.0) * Float64(3.0 * Float64(x1 * 2.0)))))))))) t_6 = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * t_3) + Float64(t_0 * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0)))))))))) tmp = 0.0 if (x1 <= -16000.0) tmp = t_5; elseif (x1 <= -1.25e-232) tmp = t_6; elseif (x1 <= 6.8e-252) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * -3.0)))))); elseif (x1 <= 195.0) tmp = t_6; elseif (x1 <= 5.5e+144) tmp = t_5; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (x2 * 2.0)) - x1) / t_0; t_4 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_0); t_5 = x1 + (t_4 + (x1 + (t_1 + ((3.0 * t_2) + (t_0 * (((x1 * x1) * ((4.0 * t_3) - 6.0)) + ((t_3 - 3.0) * (3.0 * (x1 * 2.0))))))))); t_6 = x1 + (t_4 + (x1 + (t_1 + ((t_2 * t_3) + (t_0 * (4.0 * (x1 * (x2 * ((x2 * 2.0) - 3.0))))))))); tmp = 0.0; if (x1 <= -16000.0) tmp = t_5; elseif (x1 <= -1.25e-232) tmp = t_6; elseif (x1 <= 6.8e-252) tmp = x1 + (t_4 + (x1 + (4.0 * (x1 * (x2 * -3.0))))); elseif (x1 <= 195.0) tmp = t_6; elseif (x1 <= 5.5e+144) tmp = t_5; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(N[(t$95$2 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$1 + N[(N[(3.0 * t$95$2), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 - 3.0), $MachinePrecision] * N[(3.0 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(4.0 * N[(x1 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -16000.0], t$95$5, If[LessEqual[x1, -1.25e-232], t$95$6, If[LessEqual[x1, 6.8e-252], N[(x1 + N[(t$95$4 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 195.0], t$95$6, If[LessEqual[x1, 5.5e+144], t$95$5, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t_2 + x2 \cdot 2\right) - x1}{t_0}\\
t_4 := 3 \cdot \frac{\left(t_2 - x2 \cdot 2\right) - x1}{t_0}\\
t_5 := x1 + \left(t_4 + \left(x1 + \left(t_1 + \left(3 \cdot t_2 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right) + \left(t_3 - 3\right) \cdot \left(3 \cdot \left(x1 \cdot 2\right)\right)\right)\right)\right)\right)\right)\\
t_6 := x1 + \left(t_4 + \left(x1 + \left(t_1 + \left(t_2 \cdot t_3 + t_0 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -16000:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq -1.25 \cdot 10^{-232}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-252}:\\
\;\;\;\;x1 + \left(t_4 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 195:\\
\;\;\;\;t_6\\
\mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -16000 or 195 < x1 < 5.50000000000000022e144Initial program 62.8%
Taylor expanded in x1 around inf 62.8%
Taylor expanded in x1 around inf 48.4%
if -16000 < x1 < -1.25e-232 or 6.7999999999999999e-252 < x1 < 195Initial program 99.2%
Taylor expanded in x1 around 0 98.3%
Taylor expanded in x1 around 0 86.5%
if -1.25e-232 < x1 < 6.7999999999999999e-252Initial program 99.7%
Taylor expanded in x1 around 0 75.1%
Taylor expanded in x2 around 0 94.3%
*-commutative94.3%
associate-*l*94.3%
Simplified94.3%
if 5.50000000000000022e144 < x1 Initial program 3.4%
Taylor expanded in x1 around 0 3.4%
Taylor expanded in x1 around 0 9.7%
*-commutative9.7%
Simplified9.7%
flip-+75.9%
Applied egg-rr75.9%
swap-sqr75.9%
metadata-eval75.9%
Simplified75.9%
Final simplification73.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (- (* x2 2.0) x1))
(t_2 (* x2 (- (* x2 2.0) 3.0)))
(t_3 (* x1 (* x1 x1)))
(t_4 (* x1 (* x1 3.0)))
(t_5 (* 3.0 (/ (- (- t_4 (* x2 2.0)) x1) t_0)))
(t_6 (/ (- (+ t_4 (* x2 2.0)) x1) t_0))
(t_7 (* t_4 t_6))
(t_8
(+
x1
(+
t_5
(+
x1
(+
t_3
(+
(* 3.0 t_4)
(* t_0 (+ (* (* (* x1 2.0) t_6) (- t_6 3.0)) (* x2 8.0))))))))))
(if (<= x1 -7.6e+61)
(+
x1
(+
t_5
(+
x1
(+
t_3
(+
t_7
(*
t_0
(+
(* (* 3.0 (* x1 2.0)) (- t_1 3.0))
(* (* x1 x1) (- (* 4.0 t_1) 6.0)))))))))
(if (<= x1 -210000.0)
t_8
(if (<= x1 -5.5e-236)
(+ x1 (+ t_5 (+ x1 (+ t_3 (+ t_7 (* t_0 (* 4.0 (* x1 t_2))))))))
(if (<= x1 6.8e-251)
(+ x1 (+ t_5 (+ x1 (* 4.0 (* x1 (* x2 -3.0))))))
(if (<= x1 8.4e-74)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 t_2) 2.0))))
(if (<= x1 3.5e+144)
t_8
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = (x2 * 2.0) - x1;
double t_2 = x2 * ((x2 * 2.0) - 3.0);
double t_3 = x1 * (x1 * x1);
double t_4 = x1 * (x1 * 3.0);
double t_5 = 3.0 * (((t_4 - (x2 * 2.0)) - x1) / t_0);
double t_6 = ((t_4 + (x2 * 2.0)) - x1) / t_0;
double t_7 = t_4 * t_6;
double t_8 = x1 + (t_5 + (x1 + (t_3 + ((3.0 * t_4) + (t_0 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + (x2 * 8.0)))))));
double tmp;
if (x1 <= -7.6e+61) {
tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (((3.0 * (x1 * 2.0)) * (t_1 - 3.0)) + ((x1 * x1) * ((4.0 * t_1) - 6.0))))))));
} else if (x1 <= -210000.0) {
tmp = t_8;
} else if (x1 <= -5.5e-236) {
tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (4.0 * (x1 * t_2)))))));
} else if (x1 <= 6.8e-251) {
tmp = x1 + (t_5 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
} else if (x1 <= 8.4e-74) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_2) - 2.0)));
} else if (x1 <= 3.5e+144) {
tmp = t_8;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = (x2 * 2.0d0) - x1
t_2 = x2 * ((x2 * 2.0d0) - 3.0d0)
t_3 = x1 * (x1 * x1)
t_4 = x1 * (x1 * 3.0d0)
t_5 = 3.0d0 * (((t_4 - (x2 * 2.0d0)) - x1) / t_0)
t_6 = ((t_4 + (x2 * 2.0d0)) - x1) / t_0
t_7 = t_4 * t_6
t_8 = x1 + (t_5 + (x1 + (t_3 + ((3.0d0 * t_4) + (t_0 * ((((x1 * 2.0d0) * t_6) * (t_6 - 3.0d0)) + (x2 * 8.0d0)))))))
if (x1 <= (-7.6d+61)) then
tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (((3.0d0 * (x1 * 2.0d0)) * (t_1 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_1) - 6.0d0))))))))
else if (x1 <= (-210000.0d0)) then
tmp = t_8
else if (x1 <= (-5.5d-236)) then
tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (4.0d0 * (x1 * t_2)))))))
else if (x1 <= 6.8d-251) then
tmp = x1 + (t_5 + (x1 + (4.0d0 * (x1 * (x2 * (-3.0d0))))))
else if (x1 <= 8.4d-74) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * t_2) - 2.0d0)))
else if (x1 <= 3.5d+144) then
tmp = t_8
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = (x2 * 2.0) - x1;
double t_2 = x2 * ((x2 * 2.0) - 3.0);
double t_3 = x1 * (x1 * x1);
double t_4 = x1 * (x1 * 3.0);
double t_5 = 3.0 * (((t_4 - (x2 * 2.0)) - x1) / t_0);
double t_6 = ((t_4 + (x2 * 2.0)) - x1) / t_0;
double t_7 = t_4 * t_6;
double t_8 = x1 + (t_5 + (x1 + (t_3 + ((3.0 * t_4) + (t_0 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + (x2 * 8.0)))))));
double tmp;
if (x1 <= -7.6e+61) {
tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (((3.0 * (x1 * 2.0)) * (t_1 - 3.0)) + ((x1 * x1) * ((4.0 * t_1) - 6.0))))))));
} else if (x1 <= -210000.0) {
tmp = t_8;
} else if (x1 <= -5.5e-236) {
tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (4.0 * (x1 * t_2)))))));
} else if (x1 <= 6.8e-251) {
tmp = x1 + (t_5 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
} else if (x1 <= 8.4e-74) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_2) - 2.0)));
} else if (x1 <= 3.5e+144) {
tmp = t_8;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = (x2 * 2.0) - x1 t_2 = x2 * ((x2 * 2.0) - 3.0) t_3 = x1 * (x1 * x1) t_4 = x1 * (x1 * 3.0) t_5 = 3.0 * (((t_4 - (x2 * 2.0)) - x1) / t_0) t_6 = ((t_4 + (x2 * 2.0)) - x1) / t_0 t_7 = t_4 * t_6 t_8 = x1 + (t_5 + (x1 + (t_3 + ((3.0 * t_4) + (t_0 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + (x2 * 8.0))))))) tmp = 0 if x1 <= -7.6e+61: tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (((3.0 * (x1 * 2.0)) * (t_1 - 3.0)) + ((x1 * x1) * ((4.0 * t_1) - 6.0)))))))) elif x1 <= -210000.0: tmp = t_8 elif x1 <= -5.5e-236: tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (4.0 * (x1 * t_2))))))) elif x1 <= 6.8e-251: tmp = x1 + (t_5 + (x1 + (4.0 * (x1 * (x2 * -3.0))))) elif x1 <= 8.4e-74: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_2) - 2.0))) elif x1 <= 3.5e+144: tmp = t_8 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(Float64(x2 * 2.0) - x1) t_2 = Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0)) t_3 = Float64(x1 * Float64(x1 * x1)) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(3.0 * Float64(Float64(Float64(t_4 - Float64(x2 * 2.0)) - x1) / t_0)) t_6 = Float64(Float64(Float64(t_4 + Float64(x2 * 2.0)) - x1) / t_0) t_7 = Float64(t_4 * t_6) t_8 = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_3 + Float64(Float64(3.0 * t_4) + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_6) * Float64(t_6 - 3.0)) + Float64(x2 * 8.0)))))))) tmp = 0.0 if (x1 <= -7.6e+61) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_3 + Float64(t_7 + Float64(t_0 * Float64(Float64(Float64(3.0 * Float64(x1 * 2.0)) * Float64(t_1 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_1) - 6.0))))))))); elseif (x1 <= -210000.0) tmp = t_8; elseif (x1 <= -5.5e-236) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_3 + Float64(t_7 + Float64(t_0 * Float64(4.0 * Float64(x1 * t_2)))))))); elseif (x1 <= 6.8e-251) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * -3.0)))))); elseif (x1 <= 8.4e-74) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * t_2) - 2.0)))); elseif (x1 <= 3.5e+144) tmp = t_8; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = (x2 * 2.0) - x1; t_2 = x2 * ((x2 * 2.0) - 3.0); t_3 = x1 * (x1 * x1); t_4 = x1 * (x1 * 3.0); t_5 = 3.0 * (((t_4 - (x2 * 2.0)) - x1) / t_0); t_6 = ((t_4 + (x2 * 2.0)) - x1) / t_0; t_7 = t_4 * t_6; t_8 = x1 + (t_5 + (x1 + (t_3 + ((3.0 * t_4) + (t_0 * ((((x1 * 2.0) * t_6) * (t_6 - 3.0)) + (x2 * 8.0))))))); tmp = 0.0; if (x1 <= -7.6e+61) tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (((3.0 * (x1 * 2.0)) * (t_1 - 3.0)) + ((x1 * x1) * ((4.0 * t_1) - 6.0)))))))); elseif (x1 <= -210000.0) tmp = t_8; elseif (x1 <= -5.5e-236) tmp = x1 + (t_5 + (x1 + (t_3 + (t_7 + (t_0 * (4.0 * (x1 * t_2))))))); elseif (x1 <= 6.8e-251) tmp = x1 + (t_5 + (x1 + (4.0 * (x1 * (x2 * -3.0))))); elseif (x1 <= 8.4e-74) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_2) - 2.0))); elseif (x1 <= 3.5e+144) tmp = t_8; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x2 * 2.0), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * N[(N[(N[(t$95$4 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$4 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$4 * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$3 + N[(N[(3.0 * t$95$4), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * N[(t$95$6 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.6e+61], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$3 + N[(t$95$7 + N[(t$95$0 * N[(N[(N[(3.0 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$1), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -210000.0], t$95$8, If[LessEqual[x1, -5.5e-236], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$3 + N[(t$95$7 + N[(t$95$0 * N[(4.0 * N[(x1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.8e-251], N[(x1 + N[(t$95$5 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.4e-74], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * t$95$2), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.5e+144], t$95$8, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x2 \cdot 2 - x1\\
t_2 := x2 \cdot \left(x2 \cdot 2 - 3\right)\\
t_3 := x1 \cdot \left(x1 \cdot x1\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := 3 \cdot \frac{\left(t_4 - x2 \cdot 2\right) - x1}{t_0}\\
t_6 := \frac{\left(t_4 + x2 \cdot 2\right) - x1}{t_0}\\
t_7 := t_4 \cdot t_6\\
t_8 := x1 + \left(t_5 + \left(x1 + \left(t_3 + \left(3 \cdot t_4 + t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_6\right) \cdot \left(t_6 - 3\right) + x2 \cdot 8\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -7.6 \cdot 10^{+61}:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_3 + \left(t_7 + t_0 \cdot \left(\left(3 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(t_1 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_1 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -210000:\\
\;\;\;\;t_8\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{-236}:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_3 + \left(t_7 + t_0 \cdot \left(4 \cdot \left(x1 \cdot t_2\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-251}:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 8.4 \cdot 10^{-74}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t_2 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+144}:\\
\;\;\;\;t_8\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -7.5999999999999999e61Initial program 21.8%
Taylor expanded in x1 around 0 2.5%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 12.8%
if -7.5999999999999999e61 < x1 < -2.1e5 or 8.4e-74 < x1 < 3.4999999999999998e144Initial program 99.2%
Taylor expanded in x1 around inf 91.5%
Taylor expanded in x2 around inf 61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in x1 around inf 61.7%
if -2.1e5 < x1 < -5.49999999999999959e-236Initial program 99.2%
Taylor expanded in x1 around 0 97.2%
Taylor expanded in x1 around 0 86.8%
if -5.49999999999999959e-236 < x1 < 6.80000000000000034e-251Initial program 99.7%
Taylor expanded in x1 around 0 75.1%
Taylor expanded in x2 around 0 94.3%
*-commutative94.3%
associate-*l*94.3%
Simplified94.3%
if 6.80000000000000034e-251 < x1 < 8.4e-74Initial program 99.1%
Taylor expanded in x1 around 0 88.0%
Taylor expanded in x1 around 0 88.6%
if 3.4999999999999998e144 < x1 Initial program 3.4%
Taylor expanded in x1 around 0 3.4%
Taylor expanded in x1 around 0 9.7%
*-commutative9.7%
Simplified9.7%
flip-+75.9%
Applied egg-rr75.9%
swap-sqr75.9%
metadata-eval75.9%
Simplified75.9%
Final simplification69.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* x2 2.0)) x1) t_1)))
(if (<= x1 5.5e+144)
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* 3.0 t_0))
(* x1 (* x1 x1))))
(* 3.0 (- (* x2 -2.0) x1))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
double tmp;
if (x1 <= 5.5e+144) {
tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.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) :: 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 + (x2 * 2.0d0)) - x1) / t_1
if (x1 <= 5.5d+144) then
tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0)))) + (3.0d0 * t_0)) + (x1 * (x1 * x1)))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1;
double tmp;
if (x1 <= 5.5e+144) {
tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1 tmp = 0 if x1 <= 5.5e+144: tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(x2 * 2.0)) - x1) / t_1) tmp = 0.0 if (x1 <= 5.5e+144) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(3.0 * t_0)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (x2 * 2.0)) - x1) / t_1; tmp = 0.0; if (x1 <= 5.5e+144) tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_0)) + (x1 * (x1 * x1)))) + (3.0 * ((x2 * -2.0) - x1))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, 5.5e+144], 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[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;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(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_0\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < 5.50000000000000022e144Initial program 85.3%
Taylor expanded in x1 around inf 83.9%
Taylor expanded in x1 around 0 85.3%
mul-1-neg85.3%
unsub-neg85.3%
*-commutative85.3%
Simplified85.3%
if 5.50000000000000022e144 < x1 Initial program 3.4%
Taylor expanded in x1 around 0 3.4%
Taylor expanded in x1 around 0 9.7%
*-commutative9.7%
Simplified9.7%
flip-+75.9%
Applied egg-rr75.9%
swap-sqr75.9%
metadata-eval75.9%
Simplified75.9%
Final simplification84.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0)))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_2)))
(t_4 (/ (- (+ t_1 (* x2 2.0)) x1) t_2)))
(if (<= x1 -4.2e-234)
t_0
(if (<= x1 6.8e-251)
(+ x1 (+ t_3 (+ x1 (* 4.0 (* x1 (* x2 -3.0))))))
(if (<= x1 1.36e-74)
t_0
(if (<= x1 3.5e+144)
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_1)
(* t_2 (+ (* (* (* x1 2.0) t_4) (- t_4 3.0)) (* x2 8.0))))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2);
double t_4 = ((t_1 + (x2 * 2.0)) - x1) / t_2;
double tmp;
if (x1 <= -4.2e-234) {
tmp = t_0;
} else if (x1 <= 6.8e-251) {
tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
} else if (x1 <= 1.36e-74) {
tmp = t_0;
} else if (x1 <= 3.5e+144) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + (x2 * 8.0)))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0))) - 2.0d0)))
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * (((t_1 - (x2 * 2.0d0)) - x1) / t_2)
t_4 = ((t_1 + (x2 * 2.0d0)) - x1) / t_2
if (x1 <= (-4.2d-234)) then
tmp = t_0
else if (x1 <= 6.8d-251) then
tmp = x1 + (t_3 + (x1 + (4.0d0 * (x1 * (x2 * (-3.0d0))))))
else if (x1 <= 1.36d-74) then
tmp = t_0
else if (x1 <= 3.5d+144) then
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (t_2 * ((((x1 * 2.0d0) * t_4) * (t_4 - 3.0d0)) + (x2 * 8.0d0)))))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2);
double t_4 = ((t_1 + (x2 * 2.0)) - x1) / t_2;
double tmp;
if (x1 <= -4.2e-234) {
tmp = t_0;
} else if (x1 <= 6.8e-251) {
tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
} else if (x1 <= 1.36e-74) {
tmp = t_0;
} else if (x1 <= 3.5e+144) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + (x2 * 8.0)))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2) t_4 = ((t_1 + (x2 * 2.0)) - x1) / t_2 tmp = 0 if x1 <= -4.2e-234: tmp = t_0 elif x1 <= 6.8e-251: tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0))))) elif x1 <= 1.36e-74: tmp = t_0 elif x1 <= 3.5e+144: tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + (x2 * 8.0))))))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0)))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / t_2)) t_4 = Float64(Float64(Float64(t_1 + Float64(x2 * 2.0)) - x1) / t_2) tmp = 0.0 if (x1 <= -4.2e-234) tmp = t_0; elseif (x1 <= 6.8e-251) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * -3.0)))))); elseif (x1 <= 1.36e-74) tmp = t_0; elseif (x1 <= 3.5e+144) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(x2 * 8.0)))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2); t_4 = ((t_1 + (x2 * 2.0)) - x1) / t_2; tmp = 0.0; if (x1 <= -4.2e-234) tmp = t_0; elseif (x1 <= 6.8e-251) tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0))))); elseif (x1 <= 1.36e-74) tmp = t_0; elseif (x1 <= 3.5e+144) tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + (x2 * 8.0))))))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $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[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -4.2e-234], t$95$0, If[LessEqual[x1, 6.8e-251], N[(x1 + N[(t$95$3 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.36e-74], t$95$0, If[LessEqual[x1, 3.5e+144], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_2}\\
t_4 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_2}\\
\mathbf{if}\;x1 \leq -4.2 \cdot 10^{-234}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-251}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.36 \cdot 10^{-74}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_1 + t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(t_4 - 3\right) + x2 \cdot 8\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -4.19999999999999982e-234 or 6.80000000000000034e-251 < x1 < 1.36000000000000006e-74Initial program 78.1%
Taylor expanded in x1 around 0 59.0%
Taylor expanded in x1 around 0 59.8%
if -4.19999999999999982e-234 < x1 < 6.80000000000000034e-251Initial program 99.7%
Taylor expanded in x1 around 0 75.1%
Taylor expanded in x2 around 0 94.3%
*-commutative94.3%
associate-*l*94.3%
Simplified94.3%
if 1.36000000000000006e-74 < x1 < 3.4999999999999998e144Initial program 99.4%
Taylor expanded in x1 around inf 89.5%
Taylor expanded in x2 around inf 66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in x1 around inf 66.3%
if 3.4999999999999998e144 < x1 Initial program 3.4%
Taylor expanded in x1 around 0 3.4%
Taylor expanded in x1 around 0 9.7%
*-commutative9.7%
Simplified9.7%
flip-+75.9%
Applied egg-rr75.9%
swap-sqr75.9%
metadata-eval75.9%
Simplified75.9%
Final simplification66.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* x2 2.0)) x1) t_0)))
(if (<= x1 5.5e+144)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_1)
(* t_0 (+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0))))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0;
double tmp;
if (x1 <= 5.5e+144) {
tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (x2 * 2.0d0)) - x1) / t_0
if (x1 <= 5.5d+144) then
tmp = x1 + ((3.0d0 * (((t_1 - (x2 * 2.0d0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0;
double tmp;
if (x1 <= 5.5e+144) {
tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0 tmp = 0 if x1 <= 5.5e+144: tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(x2 * 2.0)) - x1) / t_0) tmp = 0.0 if (x1 <= 5.5e+144) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (x2 * 2.0)) - x1) / t_0; tmp = 0.0; if (x1 <= 5.5e+144) tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, 5.5e+144], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_1 + t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < 5.50000000000000022e144Initial program 85.3%
Taylor expanded in x1 around inf 83.9%
Taylor expanded in x1 around inf 79.9%
if 5.50000000000000022e144 < x1 Initial program 3.4%
Taylor expanded in x1 around 0 3.4%
Taylor expanded in x1 around 0 9.7%
*-commutative9.7%
Simplified9.7%
flip-+75.9%
Applied egg-rr75.9%
swap-sqr75.9%
metadata-eval75.9%
Simplified75.9%
Final simplification79.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x2 (- (* x2 2.0) 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_2))))
(if (<= x1 -4.7e-233)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 t_1) 2.0))))
(if (<= x1 3.8e-251)
(+ x1 (+ t_3 (+ x1 (* 4.0 (* x1 (* x2 -3.0))))))
(if (<= x1 5.5e+144)
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (/ (- (+ t_0 (* x2 2.0)) x1) t_2))
(* t_2 (* 4.0 (* x1 t_1))))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x2 * ((x2 * 2.0) - 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2);
double tmp;
if (x1 <= -4.7e-233) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_1) - 2.0)));
} else if (x1 <= 3.8e-251) {
tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
} else if (x1 <= 5.5e+144) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_0 + (x2 * 2.0)) - x1) / t_2)) + (t_2 * (4.0 * (x1 * t_1)))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x2 * ((x2 * 2.0d0) - 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_2)
if (x1 <= (-4.7d-233)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * t_1) - 2.0d0)))
else if (x1 <= 3.8d-251) then
tmp = x1 + (t_3 + (x1 + (4.0d0 * (x1 * (x2 * (-3.0d0))))))
else if (x1 <= 5.5d+144) then
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_0 + (x2 * 2.0d0)) - x1) / t_2)) + (t_2 * (4.0d0 * (x1 * t_1)))))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x2 * ((x2 * 2.0) - 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2);
double tmp;
if (x1 <= -4.7e-233) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_1) - 2.0)));
} else if (x1 <= 3.8e-251) {
tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
} else if (x1 <= 5.5e+144) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_0 + (x2 * 2.0)) - x1) / t_2)) + (t_2 * (4.0 * (x1 * t_1)))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x2 * ((x2 * 2.0) - 3.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2) tmp = 0 if x1 <= -4.7e-233: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_1) - 2.0))) elif x1 <= 3.8e-251: tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0))))) elif x1 <= 5.5e+144: tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_0 + (x2 * 2.0)) - x1) / t_2)) + (t_2 * (4.0 * (x1 * t_1))))))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_2)) tmp = 0.0 if (x1 <= -4.7e-233) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * t_1) - 2.0)))); elseif (x1 <= 3.8e-251) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * -3.0)))))); elseif (x1 <= 5.5e+144) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(t_0 + Float64(x2 * 2.0)) - x1) / t_2)) + Float64(t_2 * Float64(4.0 * Float64(x1 * t_1)))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x2 * ((x2 * 2.0) - 3.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_2); tmp = 0.0; if (x1 <= -4.7e-233) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * t_1) - 2.0))); elseif (x1 <= 3.8e-251) tmp = x1 + (t_3 + (x1 + (4.0 * (x1 * (x2 * -3.0))))); elseif (x1 <= 5.5e+144) tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_0 + (x2 * 2.0)) - x1) / t_2)) + (t_2 * (4.0 * (x1 * t_1))))))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.7e-233], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * t$95$1), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.8e-251], N[(x1 + N[(t$95$3 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.5e+144], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(t$95$0 + N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(4.0 * N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x2 \cdot \left(x2 \cdot 2 - 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_2}\\
\mathbf{if}\;x1 \leq -4.7 \cdot 10^{-233}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot t_1 - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 3.8 \cdot 10^{-251}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_2} + t_2 \cdot \left(4 \cdot \left(x1 \cdot t_1\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -4.6999999999999996e-233Initial program 70.1%
Taylor expanded in x1 around 0 47.8%
Taylor expanded in x1 around 0 48.7%
if -4.6999999999999996e-233 < x1 < 3.7999999999999997e-251Initial program 99.7%
Taylor expanded in x1 around 0 75.1%
Taylor expanded in x2 around 0 94.3%
*-commutative94.3%
associate-*l*94.3%
Simplified94.3%
if 3.7999999999999997e-251 < x1 < 5.50000000000000022e144Initial program 99.2%
Taylor expanded in x1 around 0 77.9%
Taylor expanded in x1 around 0 70.2%
if 5.50000000000000022e144 < x1 Initial program 3.4%
Taylor expanded in x1 around 0 3.4%
Taylor expanded in x1 around 0 9.7%
*-commutative9.7%
Simplified9.7%
flip-+75.9%
Applied egg-rr75.9%
swap-sqr75.9%
metadata-eval75.9%
Simplified75.9%
Final simplification64.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(*
3.0
(/ (- (- (* x1 (* x1 3.0)) (* x2 2.0)) x1) (+ (* x1 x1) 1.0)))))
(if (<= x1 -1.8e-233)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0))))
(if (<= x1 6.8e-251)
(+ x1 (+ t_0 (+ x1 (* 4.0 (* x1 (* x2 -3.0))))))
(if (<= x1 1.32e+93)
(+ x1 (+ t_0 (+ x1 (* 4.0 (* (* x1 2.0) (* x2 x2))))))
(if (<= x1 5.5e+144)
(+ x1 (+ t_0 (+ x1 (+ (* x1 (* x1 x1)) (* x2 8.0)))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = 3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0));
double tmp;
if (x1 <= -1.8e-233) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
} else if (x1 <= 6.8e-251) {
tmp = x1 + (t_0 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
} else if (x1 <= 1.32e+93) {
tmp = x1 + (t_0 + (x1 + (4.0 * ((x1 * 2.0) * (x2 * x2)))));
} else if (x1 <= 5.5e+144) {
tmp = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + (x2 * 8.0))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.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) :: t_0
real(8) :: tmp
t_0 = 3.0d0 * ((((x1 * (x1 * 3.0d0)) - (x2 * 2.0d0)) - x1) / ((x1 * x1) + 1.0d0))
if (x1 <= (-1.8d-233)) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0))) - 2.0d0)))
else if (x1 <= 6.8d-251) then
tmp = x1 + (t_0 + (x1 + (4.0d0 * (x1 * (x2 * (-3.0d0))))))
else if (x1 <= 1.32d+93) then
tmp = x1 + (t_0 + (x1 + (4.0d0 * ((x1 * 2.0d0) * (x2 * x2)))))
else if (x1 <= 5.5d+144) then
tmp = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + (x2 * 8.0d0))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0));
double tmp;
if (x1 <= -1.8e-233) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
} else if (x1 <= 6.8e-251) {
tmp = x1 + (t_0 + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
} else if (x1 <= 1.32e+93) {
tmp = x1 + (t_0 + (x1 + (4.0 * ((x1 * 2.0) * (x2 * x2)))));
} else if (x1 <= 5.5e+144) {
tmp = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + (x2 * 8.0))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0)) tmp = 0 if x1 <= -1.8e-233: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))) elif x1 <= 6.8e-251: tmp = x1 + (t_0 + (x1 + (4.0 * (x1 * (x2 * -3.0))))) elif x1 <= 1.32e+93: tmp = x1 + (t_0 + (x1 + (4.0 * ((x1 * 2.0) * (x2 * x2))))) elif x1 <= 5.5e+144: tmp = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + (x2 * 8.0)))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x2 * 2.0)) - x1) / Float64(Float64(x1 * x1) + 1.0))) tmp = 0.0 if (x1 <= -1.8e-233) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0)))); elseif (x1 <= 6.8e-251) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * -3.0)))))); elseif (x1 <= 1.32e+93) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(4.0 * Float64(Float64(x1 * 2.0) * Float64(x2 * x2)))))); elseif (x1 <= 5.5e+144) tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(x2 * 8.0))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0)); tmp = 0.0; if (x1 <= -1.8e-233) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))); elseif (x1 <= 6.8e-251) tmp = x1 + (t_0 + (x1 + (4.0 * (x1 * (x2 * -3.0))))); elseif (x1 <= 1.32e+93) tmp = x1 + (t_0 + (x1 + (4.0 * ((x1 * 2.0) * (x2 * x2))))); elseif (x1 <= 5.5e+144) tmp = x1 + (t_0 + (x1 + ((x1 * (x1 * x1)) + (x2 * 8.0)))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.8e-233], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.8e-251], N[(x1 + N[(t$95$0 + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.32e+93], N[(x1 + N[(t$95$0 + N[(x1 + N[(4.0 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.5e+144], N[(x1 + N[(t$95$0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1}\\
\mathbf{if}\;x1 \leq -1.8 \cdot 10^{-233}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\
\mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-251}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.32 \cdot 10^{+93}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + 4 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+144}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + x2 \cdot 8\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.80000000000000004e-233Initial program 70.1%
Taylor expanded in x1 around 0 47.8%
Taylor expanded in x1 around 0 48.7%
if -1.80000000000000004e-233 < x1 < 6.80000000000000034e-251Initial program 99.7%
Taylor expanded in x1 around 0 75.1%
Taylor expanded in x2 around 0 94.3%
*-commutative94.3%
associate-*l*94.3%
Simplified94.3%
if 6.80000000000000034e-251 < x1 < 1.3199999999999999e93Initial program 99.1%
Taylor expanded in x1 around 0 69.1%
Taylor expanded in x2 around inf 69.1%
*-commutative69.1%
*-commutative69.1%
associate-*l*69.1%
unpow269.1%
*-commutative69.1%
Simplified69.1%
if 1.3199999999999999e93 < x1 < 5.50000000000000022e144Initial program 100.0%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x2 around inf 68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in x1 around 0 84.9%
*-commutative84.9%
Simplified84.9%
if 5.50000000000000022e144 < x1 Initial program 3.4%
Taylor expanded in x1 around 0 3.4%
Taylor expanded in x1 around 0 9.7%
*-commutative9.7%
Simplified9.7%
flip-+75.9%
Applied egg-rr75.9%
swap-sqr75.9%
metadata-eval75.9%
Simplified75.9%
Final simplification65.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0))))))
(if (<= x1 -7.5e-233)
t_0
(if (<= x1 6.8e-251)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* x2 2.0)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* x1 (* x2 -3.0))))))
(if (<= x1 3.05e+168)
t_0
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -7.5e-233) {
tmp = t_0;
} else if (x1 <= 6.8e-251) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
} else if (x1 <= 3.05e+168) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.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) :: t_0
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0))) - 2.0d0)))
if (x1 <= (-7.5d-233)) then
tmp = t_0
else if (x1 <= 6.8d-251) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (x2 * 2.0d0)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (x1 * (x2 * (-3.0d0))))))
else if (x1 <= 3.05d+168) then
tmp = t_0
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -7.5e-233) {
tmp = t_0;
} else if (x1 <= 6.8e-251) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * -3.0)))));
} else if (x1 <= 3.05e+168) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))) tmp = 0 if x1 <= -7.5e-233: tmp = t_0 elif x1 <= 6.8e-251: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * -3.0))))) elif x1 <= 3.05e+168: tmp = t_0 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0)))) tmp = 0.0 if (x1 <= -7.5e-233) tmp = t_0; elseif (x1 <= 6.8e-251) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x2 * 2.0)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * -3.0)))))); elseif (x1 <= 3.05e+168) tmp = t_0; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))); tmp = 0.0; if (x1 <= -7.5e-233) tmp = t_0; elseif (x1 <= 6.8e-251) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x1 * (x2 * -3.0))))); elseif (x1 <= 3.05e+168) tmp = t_0; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e-233], t$95$0, If[LessEqual[x1, 6.8e-251], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x1 * N[(x2 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.05e+168], t$95$0, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{-233}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-251}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -7.49999999999999974e-233 or 6.80000000000000034e-251 < x1 < 3.0500000000000001e168Initial program 81.8%
Taylor expanded in x1 around 0 53.7%
Taylor expanded in x1 around 0 54.8%
if -7.49999999999999974e-233 < x1 < 6.80000000000000034e-251Initial program 99.7%
Taylor expanded in x1 around 0 75.1%
Taylor expanded in x2 around 0 94.3%
*-commutative94.3%
associate-*l*94.3%
Simplified94.3%
if 3.0500000000000001e168 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 10.5%
*-commutative10.5%
Simplified10.5%
flip-+80.0%
Applied egg-rr80.0%
swap-sqr80.0%
metadata-eval80.0%
Simplified80.0%
Final simplification62.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0))))))
(if (<= x1 -1.3e-234)
t_0
(if (<= x1 -1.02e-286)
(* x2 -6.0)
(if (<= x1 3.05e+168)
t_0
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -1.3e-234) {
tmp = t_0;
} else if (x1 <= -1.02e-286) {
tmp = x2 * -6.0;
} else if (x1 <= 3.05e+168) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.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) :: t_0
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0))) - 2.0d0)))
if (x1 <= (-1.3d-234)) then
tmp = t_0
else if (x1 <= (-1.02d-286)) then
tmp = x2 * (-6.0d0)
else if (x1 <= 3.05d+168) then
tmp = t_0
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -1.3e-234) {
tmp = t_0;
} else if (x1 <= -1.02e-286) {
tmp = x2 * -6.0;
} else if (x1 <= 3.05e+168) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))) tmp = 0 if x1 <= -1.3e-234: tmp = t_0 elif x1 <= -1.02e-286: tmp = x2 * -6.0 elif x1 <= 3.05e+168: tmp = t_0 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0)))) tmp = 0.0 if (x1 <= -1.3e-234) tmp = t_0; elseif (x1 <= -1.02e-286) tmp = Float64(x2 * -6.0); elseif (x1 <= 3.05e+168) tmp = t_0; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))); tmp = 0.0; if (x1 <= -1.3e-234) tmp = t_0; elseif (x1 <= -1.02e-286) tmp = x2 * -6.0; elseif (x1 <= 3.05e+168) tmp = t_0; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.3e-234], t$95$0, If[LessEqual[x1, -1.02e-286], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 3.05e+168], t$95$0, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -1.3 \cdot 10^{-234}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -1.02 \cdot 10^{-286}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.29999999999999995e-234 or -1.01999999999999996e-286 < x1 < 3.0500000000000001e168Initial program 83.3%
Taylor expanded in x1 around 0 57.1%
Taylor expanded in x1 around 0 58.0%
if -1.29999999999999995e-234 < x1 < -1.01999999999999996e-286Initial program 99.8%
Taylor expanded in x1 around 0 48.3%
Taylor expanded in x1 around 0 87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in x1 around 0 87.1%
*-commutative87.1%
Simplified87.1%
if 3.0500000000000001e168 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 10.5%
*-commutative10.5%
Simplified10.5%
flip-+80.0%
Applied egg-rr80.0%
swap-sqr80.0%
metadata-eval80.0%
Simplified80.0%
Final simplification61.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* x2 2.0) 3.0))))))))
(if (<= x1 -7.5e-143)
t_0
(if (<= x1 2.45e-86)
(* x2 -6.0)
(if (<= x1 3.05e+168)
t_0
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
double tmp;
if (x1 <= -7.5e-143) {
tmp = t_0;
} else if (x1 <= 2.45e-86) {
tmp = x2 * -6.0;
} else if (x1 <= 3.05e+168) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.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) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0)))))
if (x1 <= (-7.5d-143)) then
tmp = t_0
else if (x1 <= 2.45d-86) then
tmp = x2 * (-6.0d0)
else if (x1 <= 3.05d+168) then
tmp = t_0
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
double tmp;
if (x1 <= -7.5e-143) {
tmp = t_0;
} else if (x1 <= 2.45e-86) {
tmp = x2 * -6.0;
} else if (x1 <= 3.05e+168) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))))) tmp = 0 if x1 <= -7.5e-143: tmp = t_0 elif x1 <= 2.45e-86: tmp = x2 * -6.0 elif x1 <= 3.05e+168: tmp = t_0 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0)))))) tmp = 0.0 if (x1 <= -7.5e-143) tmp = t_0; elseif (x1 <= 2.45e-86) tmp = Float64(x2 * -6.0); elseif (x1 <= 3.05e+168) tmp = t_0; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))))); tmp = 0.0; if (x1 <= -7.5e-143) tmp = t_0; elseif (x1 <= 2.45e-86) tmp = x2 * -6.0; elseif (x1 <= 3.05e+168) tmp = t_0; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e-143], t$95$0, If[LessEqual[x1, 2.45e-86], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 3.05e+168], t$95$0, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{-143}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 2.45 \cdot 10^{-86}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -7.5000000000000003e-143 or 2.44999999999999986e-86 < x1 < 3.0500000000000001e168Initial program 75.2%
Taylor expanded in x1 around 0 42.1%
Taylor expanded in x1 around inf 25.9%
if -7.5000000000000003e-143 < x1 < 2.44999999999999986e-86Initial program 99.4%
Taylor expanded in x1 around 0 80.9%
Taylor expanded in x1 around 0 66.5%
*-commutative66.5%
Simplified66.5%
Taylor expanded in x1 around 0 66.8%
*-commutative66.8%
Simplified66.8%
if 3.0500000000000001e168 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 10.5%
*-commutative10.5%
Simplified10.5%
flip-+80.0%
Applied egg-rr80.0%
swap-sqr80.0%
metadata-eval80.0%
Simplified80.0%
Final simplification45.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* x2 2.0) 3.0)))))))
(if (<= x1 -7.5e-143)
(+ x1 (+ 9.0 t_0))
(if (<= x1 3.15e-86)
(* x2 -6.0)
(if (<= x1 3.05e+168)
(+ x1 t_0)
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))));
double tmp;
if (x1 <= -7.5e-143) {
tmp = x1 + (9.0 + t_0);
} else if (x1 <= 3.15e-86) {
tmp = x2 * -6.0;
} else if (x1 <= 3.05e+168) {
tmp = x1 + t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.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) :: t_0
real(8) :: tmp
t_0 = x1 * (1.0d0 + (4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0))))
if (x1 <= (-7.5d-143)) then
tmp = x1 + (9.0d0 + t_0)
else if (x1 <= 3.15d-86) then
tmp = x2 * (-6.0d0)
else if (x1 <= 3.05d+168) then
tmp = x1 + t_0
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))));
double tmp;
if (x1 <= -7.5e-143) {
tmp = x1 + (9.0 + t_0);
} else if (x1 <= 3.15e-86) {
tmp = x2 * -6.0;
} else if (x1 <= 3.05e+168) {
tmp = x1 + t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))) tmp = 0 if x1 <= -7.5e-143: tmp = x1 + (9.0 + t_0) elif x1 <= 3.15e-86: tmp = x2 * -6.0 elif x1 <= 3.05e+168: tmp = x1 + t_0 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))))) tmp = 0.0 if (x1 <= -7.5e-143) tmp = Float64(x1 + Float64(9.0 + t_0)); elseif (x1 <= 3.15e-86) tmp = Float64(x2 * -6.0); elseif (x1 <= 3.05e+168) tmp = Float64(x1 + t_0); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))); tmp = 0.0; if (x1 <= -7.5e-143) tmp = x1 + (9.0 + t_0); elseif (x1 <= 3.15e-86) tmp = x2 * -6.0; elseif (x1 <= 3.05e+168) tmp = x1 + t_0; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e-143], N[(x1 + N[(9.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.15e-86], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 3.05e+168], N[(x1 + t$95$0), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{-143}:\\
\;\;\;\;x1 + \left(9 + t_0\right)\\
\mathbf{elif}\;x1 \leq 3.15 \cdot 10^{-86}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 3.05 \cdot 10^{+168}:\\
\;\;\;\;x1 + t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -7.5000000000000003e-143Initial program 64.9%
Taylor expanded in x1 around 0 42.8%
Taylor expanded in x1 around inf 19.9%
if -7.5000000000000003e-143 < x1 < 3.15e-86Initial program 99.4%
Taylor expanded in x1 around 0 80.9%
Taylor expanded in x1 around 0 66.5%
*-commutative66.5%
Simplified66.5%
Taylor expanded in x1 around 0 66.8%
*-commutative66.8%
Simplified66.8%
if 3.15e-86 < x1 < 3.0500000000000001e168Initial program 93.7%
Taylor expanded in x1 around 0 41.0%
Taylor expanded in x1 around inf 38.5%
if 3.0500000000000001e168 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 10.5%
*-commutative10.5%
Simplified10.5%
flip-+80.0%
Applied egg-rr80.0%
swap-sqr80.0%
metadata-eval80.0%
Simplified80.0%
Final simplification45.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -6.9e-143) (not (<= x1 2.6e-86))) (+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* x2 2.0) 3.0)))))) (* x2 -6.0)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -6.9e-143) || !(x1 <= 2.6e-86)) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
} else {
tmp = 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 <= (-6.9d-143)) .or. (.not. (x1 <= 2.6d-86))) then
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0)))))
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -6.9e-143) || !(x1 <= 2.6e-86)) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -6.9e-143) or not (x1 <= 2.6e-86): tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))))) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -6.9e-143) || !(x1 <= 2.6e-86)) tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0)))))); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -6.9e-143) || ~((x1 <= 2.6e-86))) tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))))); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -6.9e-143], N[Not[LessEqual[x1, 2.6e-86]], $MachinePrecision]], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6.9 \cdot 10^{-143} \lor \neg \left(x1 \leq 2.6 \cdot 10^{-86}\right):\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -6.89999999999999989e-143 or 2.6000000000000001e-86 < x1 Initial program 64.2%
Taylor expanded in x1 around 0 35.9%
Taylor expanded in x1 around inf 28.6%
if -6.89999999999999989e-143 < x1 < 2.6000000000000001e-86Initial program 99.4%
Taylor expanded in x1 around 0 80.9%
Taylor expanded in x1 around 0 66.5%
*-commutative66.5%
Simplified66.5%
Taylor expanded in x1 around 0 66.8%
*-commutative66.8%
Simplified66.8%
Final simplification41.5%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -6.9e-143) (not (<= x1 2.65e-86))) (+ x1 (* (* x2 x2) (* x1 8.0))) (* x2 -6.0)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -6.9e-143) || !(x1 <= 2.65e-86)) {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
} else {
tmp = 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 <= (-6.9d-143)) .or. (.not. (x1 <= 2.65d-86))) then
tmp = x1 + ((x2 * x2) * (x1 * 8.0d0))
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -6.9e-143) || !(x1 <= 2.65e-86)) {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -6.9e-143) or not (x1 <= 2.65e-86): tmp = x1 + ((x2 * x2) * (x1 * 8.0)) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -6.9e-143) || !(x1 <= 2.65e-86)) tmp = Float64(x1 + Float64(Float64(x2 * x2) * Float64(x1 * 8.0))); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -6.9e-143) || ~((x1 <= 2.65e-86))) tmp = x1 + ((x2 * x2) * (x1 * 8.0)); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -6.9e-143], N[Not[LessEqual[x1, 2.65e-86]], $MachinePrecision]], N[(x1 + N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6.9 \cdot 10^{-143} \lor \neg \left(x1 \leq 2.65 \cdot 10^{-86}\right):\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -6.89999999999999989e-143 or 2.6499999999999998e-86 < x1 Initial program 64.2%
Taylor expanded in x1 around 0 35.9%
Taylor expanded in x2 around inf 28.6%
*-commutative28.6%
*-commutative28.6%
associate-*l*28.6%
unpow228.6%
Simplified28.6%
if -6.89999999999999989e-143 < x1 < 2.6499999999999998e-86Initial program 99.4%
Taylor expanded in x1 around 0 80.9%
Taylor expanded in x1 around 0 66.5%
*-commutative66.5%
Simplified66.5%
Taylor expanded in x1 around 0 66.8%
*-commutative66.8%
Simplified66.8%
Final simplification41.4%
(FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x2 * (-6.0d0))
end function
public static double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
def code(x1, x2): return x1 + (x2 * -6.0)
function code(x1, x2) return Float64(x1 + Float64(x2 * -6.0)) end
function tmp = code(x1, x2) tmp = x1 + (x2 * -6.0); end
code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + x2 \cdot -6
\end{array}
Initial program 76.0%
Taylor expanded in x1 around 0 51.0%
Taylor expanded in x1 around 0 26.4%
*-commutative26.4%
Simplified26.4%
Final simplification26.4%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 76.0%
Taylor expanded in x1 around 0 51.0%
Taylor expanded in x1 around 0 26.4%
*-commutative26.4%
Simplified26.4%
Taylor expanded in x1 around 0 26.2%
*-commutative26.2%
Simplified26.2%
Final simplification26.2%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 76.0%
Taylor expanded in x1 around 0 51.0%
Taylor expanded in x1 around 0 26.4%
*-commutative26.4%
Simplified26.4%
Taylor expanded in x1 around inf 3.3%
Final simplification3.3%
herbie shell --seed 2023293
(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))))))