
(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 31 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (fma x1 (* x1 3.0) (- (* 2.0 x2) x1)) (fma x1 x1 1.0)))
(t_1 (* x1 (* x1 3.0))))
(if (<= x1 -5.5e+102)
(+ x1 (+ (+ x1 (+ (* -3.0 (pow x1 3.0)) (* 6.0 (pow x1 4.0)))) 9.0))
(if (<= x1 7.8e+108)
(+
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_0 4.0 -6.0))
(* t_0 (* (+ -3.0 t_0) (* x1 2.0))))
(fma t_1 t_0 (pow x1 3.0))))))
(+
x1
(+
(+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
(*
3.0
(fma x2 -2.0 (- (* (* x1 x1) (+ x1 (- 3.0 (* x2 -2.0)))) x1)))))))))
double code(double x1, double x2) {
double t_0 = fma(x1, (x1 * 3.0), ((2.0 * x2) - x1)) / fma(x1, x1, 1.0);
double t_1 = x1 * (x1 * 3.0);
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 + ((-3.0 * pow(x1, 3.0)) + (6.0 * pow(x1, 4.0)))) + 9.0);
} else if (x1 <= 7.8e+108) {
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_0, 4.0, -6.0)), (t_0 * ((-3.0 + t_0) * (x1 * 2.0)))), fma(t_1, t_0, pow(x1, 3.0)))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * fma(x2, -2.0, (((x1 * x1) * (x1 + (3.0 - (x2 * -2.0)))) - x1))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(fma(x1, Float64(x1 * 3.0), Float64(Float64(2.0 * x2) - x1)) / fma(x1, x1, 1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(-3.0 * (x1 ^ 3.0)) + Float64(6.0 * (x1 ^ 4.0)))) + 9.0)); elseif (x1 <= 7.8e+108) 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_0, 4.0, -6.0)), Float64(t_0 * Float64(Float64(-3.0 + t_0) * Float64(x1 * 2.0)))), fma(t_1, t_0, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(3.0 * fma(x2, -2.0, Float64(Float64(Float64(x1 * x1) * Float64(x1 + Float64(3.0 - Float64(x2 * -2.0)))) - x1))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(N[(x1 + N[(N[(-3.0 * N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision] + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.8e+108], 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$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(-3.0 + t$95$0), $MachinePrecision] * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$0 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0 + N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(-3 \cdot {x1}^{3} + 6 \cdot {x1}^{4}\right)\right) + 9\right)\\
\mathbf{elif}\;x1 \leq 7.8 \cdot 10^{+108}:\\
\;\;\;\;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_0, 4, -6\right), t_0 \cdot \left(\left(-3 + t_0\right) \cdot \left(x1 \cdot 2\right)\right)\right), \mathsf{fma}\left(t_1, t_0, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + 3 \cdot \mathsf{fma}\left(x2, -2, \left(x1 \cdot x1\right) \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around inf 31.4%
Taylor expanded in x1 around inf 100.0%
if -5.49999999999999981e102 < x1 < 7.79999999999999969e108Initial program 98.8%
Simplified99.1%
if 7.79999999999999969e108 < x1 Initial program 22.2%
Taylor expanded in x1 around 0 9.5%
Taylor expanded in x1 around 0 82.2%
*-commutative82.2%
fma-def82.2%
+-commutative82.2%
mul-1-neg82.2%
unsub-neg82.2%
+-commutative82.2%
unpow382.2%
unpow282.2%
distribute-lft-out95.6%
unpow295.6%
*-commutative95.6%
Simplified95.6%
Final simplification98.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (/ (- (+ (* 2.0 x2) t_0) x1) t_1)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (+ (* -3.0 (pow x1 3.0)) (* 6.0 (pow x1 4.0)))) 9.0))
(if (<= x1 5e+107)
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(*
(* x1 x1)
(-
(*
4.0
(/ (- (fma (* x1 3.0) x1 (+ x2 x2)) x1) (fma x1 x1 1.0)))
6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
(+
x1
(+
(+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
(*
3.0
(fma x2 -2.0 (- (* (* x1 x1) (+ x1 (- 3.0 (* x2 -2.0)))) x1)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = (((2.0 * x2) + t_0) - x1) / t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + ((-3.0 * pow(x1, 3.0)) + (6.0 * pow(x1, 4.0)))) + 9.0);
} else if (x1 <= 5e+107) {
tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * ((fma((x1 * 3.0), x1, (x2 + x2)) - x1) / fma(x1, x1, 1.0))) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * fma(x2, -2.0, (((x1 * x1) * (x1 + (3.0 - (x2 * -2.0)))) - x1))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(1.0 + Float64(x1 * x1)) t_2 = Float64(Float64(Float64(Float64(2.0 * x2) + t_0) - x1) / t_1) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(-3.0 * (x1 ^ 3.0)) + Float64(6.0 * (x1 ^ 4.0)))) + 9.0)); elseif (x1 <= 5e+107) 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 * Float64(Float64(fma(Float64(x1 * 3.0), x1, Float64(x2 + x2)) - x1) / fma(x1, x1, 1.0))) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(3.0 * fma(x2, -2.0, Float64(Float64(Float64(x1 * x1) * Float64(x1 + Float64(3.0 - Float64(x2 * -2.0)))) - x1))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(N[(-3.0 * N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision] + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+107], 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 * N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * x1 + N[(x2 + x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0 + N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 1 + x1 \cdot x1\\
t_2 := \frac{\left(2 \cdot x2 + t_0\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(-3 \cdot {x1}^{3} + 6 \cdot {x1}^{4}\right)\right) + 9\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+107}:\\
\;\;\;\;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 \frac{\mathsf{fma}\left(x1 \cdot 3, x1, x2 + x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 6\right)\right) + t_0 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + 3 \cdot \mathsf{fma}\left(x2, -2, \left(x1 \cdot x1\right) \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around inf 31.4%
Taylor expanded in x1 around inf 100.0%
if -5.60000000000000037e102 < x1 < 5.0000000000000002e107Initial program 98.8%
fma-def98.8%
div-sub98.8%
fma-def98.9%
count-298.9%
Applied egg-rr98.9%
div-sub98.9%
Simplified98.9%
if 5.0000000000000002e107 < x1 Initial program 22.2%
Taylor expanded in x1 around 0 9.5%
Taylor expanded in x1 around 0 82.2%
*-commutative82.2%
fma-def82.2%
+-commutative82.2%
mul-1-neg82.2%
unsub-neg82.2%
+-commutative82.2%
unpow382.2%
unpow282.2%
distribute-lft-out95.6%
unpow295.6%
*-commutative95.6%
Simplified95.6%
Final simplification98.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ (* 2.0 x2) t_1) x1) t_0)))
(if (<= x1 -5.5e+102)
(+ x1 (+ (+ x1 (+ (* -3.0 (pow x1 3.0)) (* 6.0 (pow x1 4.0)))) 9.0))
(if (<= x1 7.8e+108)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_2)
(*
t_0
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))))))))
(+
x1
(+
(+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
(*
3.0
(fma x2 -2.0 (- (* (* x1 x1) (+ x1 (- 3.0 (* x2 -2.0)))) x1)))))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((2.0 * x2) + t_1) - x1) / t_0;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 + ((-3.0 * pow(x1, 3.0)) + (6.0 * pow(x1, 4.0)))) + 9.0);
} else if (x1 <= 7.8e+108) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * fma(x2, -2.0, (((x1 * x1) * (x1 + (3.0 - (x2 * -2.0)))) - x1))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(1.0 + Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(Float64(2.0 * x2) + t_1) - x1) / t_0) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(-3.0 * (x1 ^ 3.0)) + Float64(6.0 * (x1 ^ 4.0)))) + 9.0)); elseif (x1 <= 7.8e+108) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * t_2) + 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))))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(3.0 * fma(x2, -2.0, Float64(Float64(Float64(x1 * x1) * Float64(x1 + Float64(3.0 - Float64(x2 * -2.0)))) - x1))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(N[(x1 + N[(N[(-3.0 * N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision] + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.8e+108], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * t$95$2), $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] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0 + N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(2 \cdot x2 + t_1\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(-3 \cdot {x1}^{3} + 6 \cdot {x1}^{4}\right)\right) + 9\right)\\
\mathbf{elif}\;x1 \leq 7.8 \cdot 10^{+108}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot t_2 + 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)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + 3 \cdot \mathsf{fma}\left(x2, -2, \left(x1 \cdot x1\right) \cdot \left(x1 + \left(3 - x2 \cdot -2\right)\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around inf 31.4%
Taylor expanded in x1 around inf 100.0%
if -5.49999999999999981e102 < x1 < 7.79999999999999969e108Initial program 98.8%
if 7.79999999999999969e108 < x1 Initial program 22.2%
Taylor expanded in x1 around 0 9.5%
Taylor expanded in x1 around 0 82.2%
*-commutative82.2%
fma-def82.2%
+-commutative82.2%
mul-1-neg82.2%
unsub-neg82.2%
+-commutative82.2%
unpow382.2%
unpow282.2%
distribute-lft-out95.6%
unpow295.6%
*-commutative95.6%
Simplified95.6%
Final simplification98.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- 3.0 (* x2 -2.0)))
(t_2 (+ 1.0 (* x1 x1)))
(t_3 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2)))
(t_4 (/ (- (+ (* 2.0 x2) t_0) x1) t_2)))
(if (<= x1 -1.35e+154)
(+
x1
(+
(+ x1 (* 4.0 (* -3.0 (* x1 x2))))
(+ (* x2 -6.0) (+ (* x1 -3.0) (* 3.0 (* t_1 (pow x1 2.0)))))))
(if (<= x1 -5e+102)
(+ x1 (+ t_3 (+ x1 (* 6.0 (pow x1 4.0)))))
(if (<= x1 7.8e+108)
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_4)
(*
t_2
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(* (* x1 x1) (- (* 4.0 t_4) 6.0)))))))))
(+
x1
(+
(+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
(* 3.0 (fma x2 -2.0 (- (* (* x1 x1) (+ x1 t_1)) x1))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 3.0 - (x2 * -2.0);
double t_2 = 1.0 + (x1 * x1);
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = (((2.0 * x2) + t_0) - x1) / t_2;
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + ((x1 * -3.0) + (3.0 * (t_1 * pow(x1, 2.0))))));
} else if (x1 <= -5e+102) {
tmp = x1 + (t_3 + (x1 + (6.0 * pow(x1, 4.0))));
} else if (x1 <= 7.8e+108) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))))))));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * fma(x2, -2.0, (((x1 * x1) * (x1 + t_1)) - x1))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(3.0 - Float64(x2 * -2.0)) t_2 = Float64(1.0 + Float64(x1 * x1)) t_3 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(Float64(Float64(Float64(2.0 * x2) + t_0) - x1) / t_2) tmp = 0.0 if (x1 <= -1.35e+154) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(Float64(x1 * -3.0) + Float64(3.0 * Float64(t_1 * (x1 ^ 2.0))))))); elseif (x1 <= -5e+102) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))); elseif (x1 <= 7.8e+108) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_4) + Float64(t_2 * 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))))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(3.0 * fma(x2, -2.0, Float64(Float64(Float64(x1 * x1) * Float64(x1 + t_1)) - x1))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -1.35e+154], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(x1 * -3.0), $MachinePrecision] + N[(3.0 * N[(t$95$1 * N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5e+102], N[(x1 + N[(t$95$3 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.8e+108], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$4), $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[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0 + N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + t$95$1), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 3 - x2 \cdot -2\\
t_2 := 1 + x1 \cdot x1\\
t_3 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\
t_4 := \frac{\left(2 \cdot x2 + t_0\right) - x1}{t_2}\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + \left(x1 \cdot -3 + 3 \cdot \left(t_1 \cdot {x1}^{2}\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 6 \cdot {x1}^{4}\right)\right)\\
\mathbf{elif}\;x1 \leq 7.8 \cdot 10^{+108}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_4 + t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(t_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + 3 \cdot \mathsf{fma}\left(x2, -2, \left(x1 \cdot x1\right) \cdot \left(x1 + t_1\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -1.35000000000000003e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 75.0%
if -1.35000000000000003e154 < x1 < -5e102Initial program 0.0%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -5e102 < x1 < 7.79999999999999969e108Initial program 98.8%
if 7.79999999999999969e108 < x1 Initial program 22.2%
Taylor expanded in x1 around 0 9.5%
Taylor expanded in x1 around 0 82.2%
*-commutative82.2%
fma-def82.2%
+-commutative82.2%
mul-1-neg82.2%
unsub-neg82.2%
+-commutative82.2%
unpow382.2%
unpow282.2%
distribute-lft-out95.6%
unpow295.6%
*-commutative95.6%
Simplified95.6%
Final simplification96.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x2 -6.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ (* 2.0 x2) t_2) x1) t_1))
(t_4 (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_1))))
(if (<= x1 -1.35e+154)
(+ x1 (+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0))))
(if (<= x1 -5e+102)
(+ x1 (+ t_4 (+ x1 (* 6.0 (pow x1 4.0)))))
(if (<= x1 1.58e+140)
(+
x1
(+
t_4
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 t_3)
(*
t_1
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* 4.0 t_3) 6.0)))))))))
(cbrt (* t_0 (* t_0 t_0))))))))
double code(double x1, double x2) {
double t_0 = x1 + (x2 * -6.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (((2.0 * x2) + t_2) - x1) / t_1;
double t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1);
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= -5e+102) {
tmp = x1 + (t_4 + (x1 + (6.0 * pow(x1, 4.0))));
} else if (x1 <= 1.58e+140) {
tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_1 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0))))))));
} 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 = 1.0 + (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (((2.0 * x2) + t_2) - x1) / t_1;
double t_4 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1);
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= -5e+102) {
tmp = x1 + (t_4 + (x1 + (6.0 * Math.pow(x1, 4.0))));
} else if (x1 <= 1.58e+140) {
tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_1 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0))))))));
} 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(1.0 + Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(Float64(2.0 * x2) + t_2) - x1) / t_1) t_4 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_1)) tmp = 0.0 if (x1 <= -1.35e+154) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); elseif (x1 <= -5e+102) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))); elseif (x1 <= 1.58e+140) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * t_3) + 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))))))))); 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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$2), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.35e+154], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5e+102], N[(x1 + N[(t$95$4 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.58e+140], N[(x1 + N[(t$95$4 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * t$95$3), $MachinePrecision] + 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]), $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 := 1 + x1 \cdot x1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(2 \cdot x2 + t_2\right) - x1}{t_1}\\
t_4 := 3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t_4 + \left(x1 + 6 \cdot {x1}^{4}\right)\right)\\
\mathbf{elif}\;x1 \leq 1.58 \cdot 10^{+140}:\\
\;\;\;\;x1 + \left(t_4 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_2 \cdot t_3 + 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)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_0 \cdot \left(t_0 \cdot t_0\right)}\\
\end{array}
\end{array}
if x1 < -1.35000000000000003e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 24.7%
if -1.35000000000000003e154 < x1 < -5e102Initial program 0.0%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -5e102 < x1 < 1.58000000000000004e140Initial program 98.9%
if 1.58000000000000004e140 < x1 Initial program 2.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 6.0%
*-commutative6.0%
Simplified6.0%
add-cbrt-cube88.9%
Applied egg-rr88.9%
Final simplification90.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ x1 (* x2 -6.0)))
(t_2 (+ 1.0 (* x1 x1)))
(t_3 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2)))
(t_4 (/ (- (+ (* 2.0 x2) t_0) x1) t_2)))
(if (<= x1 -1.35e+154)
(+
(* x2 -6.0)
(+
(* 3.0 (* (- 3.0 (* x2 -2.0)) (pow x1 2.0)))
(* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 5.0))))
(if (<= x1 -5e+102)
(+ x1 (+ t_3 (+ x1 (* 6.0 (pow x1 4.0)))))
(if (<= x1 1.58e+140)
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_4)
(*
t_2
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(* (* x1 x1) (- (* 4.0 t_4) 6.0)))))))))
(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 = 1.0 + (x1 * x1);
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = (((2.0 * x2) + t_0) - x1) / t_2;
double tmp;
if (x1 <= -1.35e+154) {
tmp = (x2 * -6.0) + ((3.0 * ((3.0 - (x2 * -2.0)) * pow(x1, 2.0))) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 5.0)));
} else if (x1 <= -5e+102) {
tmp = x1 + (t_3 + (x1 + (6.0 * pow(x1, 4.0))));
} else if (x1 <= 1.58e+140) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))))))));
} 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 = 1.0 + (x1 * x1);
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = (((2.0 * x2) + t_0) - x1) / t_2;
double tmp;
if (x1 <= -1.35e+154) {
tmp = (x2 * -6.0) + ((3.0 * ((3.0 - (x2 * -2.0)) * Math.pow(x1, 2.0))) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 5.0)));
} else if (x1 <= -5e+102) {
tmp = x1 + (t_3 + (x1 + (6.0 * Math.pow(x1, 4.0))));
} else if (x1 <= 1.58e+140) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))))))));
} 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(1.0 + Float64(x1 * x1)) t_3 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(Float64(Float64(Float64(2.0 * x2) + t_0) - x1) / t_2) tmp = 0.0 if (x1 <= -1.35e+154) tmp = Float64(Float64(x2 * -6.0) + Float64(Float64(3.0 * Float64(Float64(3.0 - Float64(x2 * -2.0)) * (x1 ^ 2.0))) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 5.0)))); elseif (x1 <= -5e+102) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))); elseif (x1 <= 1.58e+140) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_4) + Float64(t_2 * 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))))))))); 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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -1.35e+154], N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(3.0 * N[(N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] * N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5e+102], N[(x1 + N[(t$95$3 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.58e+140], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$4), $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[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := 1 + x1 \cdot x1\\
t_3 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\
t_4 := \frac{\left(2 \cdot x2 + t_0\right) - x1}{t_2}\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;x2 \cdot -6 + \left(3 \cdot \left(\left(3 - x2 \cdot -2\right) \cdot {x1}^{2}\right) + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 5\right)\right)\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 6 \cdot {x1}^{4}\right)\right)\\
\mathbf{elif}\;x1 \leq 1.58 \cdot 10^{+140}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_4 + t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(t_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_1 \cdot \left(t_1 \cdot t_1\right)}\\
\end{array}
\end{array}
if x1 < -1.35000000000000003e154Initial program 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 45.8%
if -1.35000000000000003e154 < x1 < -5e102Initial program 0.0%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -5e102 < x1 < 1.58000000000000004e140Initial program 98.9%
if 1.58000000000000004e140 < x1 Initial program 2.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 6.0%
*-commutative6.0%
Simplified6.0%
add-cbrt-cube88.9%
Applied egg-rr88.9%
Final simplification92.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ x1 (* x2 -6.0)))
(t_2 (+ 1.0 (* x1 x1)))
(t_3 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2)))
(t_4 (/ (- (+ (* 2.0 x2) t_0) x1) t_2)))
(if (<= x1 -1.35e+154)
(+
x1
(+
(+ x1 (* 4.0 (* -3.0 (* x1 x2))))
(+
(* x2 -6.0)
(+ (* x1 -3.0) (* 3.0 (* (- 3.0 (* x2 -2.0)) (pow x1 2.0)))))))
(if (<= x1 -5e+102)
(+ x1 (+ t_3 (+ x1 (* 6.0 (pow x1 4.0)))))
(if (<= x1 1.58e+140)
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_4)
(*
t_2
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(* (* x1 x1) (- (* 4.0 t_4) 6.0)))))))))
(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 = 1.0 + (x1 * x1);
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = (((2.0 * x2) + t_0) - x1) / t_2;
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + ((x1 * -3.0) + (3.0 * ((3.0 - (x2 * -2.0)) * pow(x1, 2.0))))));
} else if (x1 <= -5e+102) {
tmp = x1 + (t_3 + (x1 + (6.0 * pow(x1, 4.0))));
} else if (x1 <= 1.58e+140) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))))))));
} 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 = 1.0 + (x1 * x1);
double t_3 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2);
double t_4 = (((2.0 * x2) + t_0) - x1) / t_2;
double tmp;
if (x1 <= -1.35e+154) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + ((x1 * -3.0) + (3.0 * ((3.0 - (x2 * -2.0)) * Math.pow(x1, 2.0))))));
} else if (x1 <= -5e+102) {
tmp = x1 + (t_3 + (x1 + (6.0 * Math.pow(x1, 4.0))));
} else if (x1 <= 1.58e+140) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_4) + (t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))))))));
} 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(1.0 + Float64(x1 * x1)) t_3 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(Float64(Float64(Float64(2.0 * x2) + t_0) - x1) / t_2) tmp = 0.0 if (x1 <= -1.35e+154) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(Float64(x1 * -3.0) + Float64(3.0 * Float64(Float64(3.0 - Float64(x2 * -2.0)) * (x1 ^ 2.0))))))); elseif (x1 <= -5e+102) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(6.0 * (x1 ^ 4.0))))); elseif (x1 <= 1.58e+140) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_4) + Float64(t_2 * 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))))))))); 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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -1.35e+154], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(x1 * -3.0), $MachinePrecision] + N[(3.0 * N[(N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] * N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5e+102], N[(x1 + N[(t$95$3 + N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.58e+140], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$4), $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[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := 1 + x1 \cdot x1\\
t_3 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2}\\
t_4 := \frac{\left(2 \cdot x2 + t_0\right) - x1}{t_2}\\
\mathbf{if}\;x1 \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + \left(x1 \cdot -3 + 3 \cdot \left(\left(3 - x2 \cdot -2\right) \cdot {x1}^{2}\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 6 \cdot {x1}^{4}\right)\right)\\
\mathbf{elif}\;x1 \leq 1.58 \cdot 10^{+140}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_4 + t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(t_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_1 \cdot \left(t_1 \cdot t_1\right)}\\
\end{array}
\end{array}
if x1 < -1.35000000000000003e154Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around 0 75.0%
if -1.35000000000000003e154 < x1 < -5e102Initial program 0.0%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -5e102 < x1 < 1.58000000000000004e140Initial program 98.9%
if 1.58000000000000004e140 < x1 Initial program 2.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 6.0%
*-commutative6.0%
Simplified6.0%
add-cbrt-cube88.9%
Applied egg-rr88.9%
Final simplification95.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (+ x1 (* x2 -6.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ (* 2.0 x2) t_2) x1) t_0)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0))))
(if (<= x1 5e+139)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 t_3)
(*
t_0
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* 4.0 t_3) 6.0)))))))))
(cbrt (* t_1 (* t_1 t_1)))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 + (x2 * -6.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (((2.0 * x2) + t_2) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= 5e+139) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0))))))));
} else {
tmp = cbrt((t_1 * (t_1 * t_1)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 + (x2 * -6.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (((2.0 * x2) + t_2) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= 5e+139) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0))))))));
} else {
tmp = Math.cbrt((t_1 * (t_1 * t_1)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(1.0 + Float64(x1 * x1)) t_1 = Float64(x1 + Float64(x2 * -6.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(Float64(2.0 * x2) + t_2) - x1) / t_0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); elseif (x1 <= 5e+139) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * t_3) + Float64(t_0 * 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))))))))); else tmp = cbrt(Float64(t_1 * Float64(t_1 * t_1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$2), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+139], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * t$95$3), $MachinePrecision] + N[(t$95$0 * 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]), $MachinePrecision]), $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 := 1 + x1 \cdot x1\\
t_1 := x1 + x2 \cdot -6\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(2 \cdot x2 + t_2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+139}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_2 \cdot t_3 + t_0 \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)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_1 \cdot \left(t_1 \cdot t_1\right)}\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 20.8%
if -5.60000000000000037e102 < x1 < 5.0000000000000003e139Initial program 98.9%
if 5.0000000000000003e139 < x1 Initial program 2.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 6.0%
*-commutative6.0%
Simplified6.0%
add-cbrt-cube88.9%
Applied egg-rr88.9%
Final simplification86.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (+ x1 (* x2 -6.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ (* 2.0 x2) t_2) x1) t_0)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0))))
(if (<= x1 1.58e+140)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* 4.0 t_3) 6.0))))
(* 3.0 t_2))))))
(cbrt (* t_1 (* t_1 t_1)))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 + (x2 * -6.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (((2.0 * x2) + t_2) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= 1.58e+140) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_2)))));
} else {
tmp = cbrt((t_1 * (t_1 * t_1)));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 + (x2 * -6.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (((2.0 * x2) + t_2) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= 1.58e+140) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (3.0 * t_2)))));
} else {
tmp = Math.cbrt((t_1 * (t_1 * t_1)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(1.0 + Float64(x1 * x1)) t_1 = Float64(x1 + Float64(x2 * -6.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(Float64(2.0 * x2) + t_2) - x1) / t_0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); elseif (x1 <= 1.58e+140) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(3.0 * t_2)))))); else tmp = cbrt(Float64(t_1 * Float64(t_1 * t_1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$2), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.58e+140], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$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]), $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 := 1 + x1 \cdot x1\\
t_1 := x1 + x2 \cdot -6\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(2 \cdot x2 + t_2\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{elif}\;x1 \leq 1.58 \cdot 10^{+140}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_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)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_1 \cdot \left(t_1 \cdot t_1\right)}\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 20.8%
if -5.60000000000000037e102 < x1 < 1.58000000000000004e140Initial program 98.9%
Taylor expanded in x1 around inf 96.9%
if 1.58000000000000004e140 < x1 Initial program 2.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 6.0%
*-commutative6.0%
Simplified6.0%
add-cbrt-cube88.9%
Applied egg-rr88.9%
Final simplification85.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ (* 2.0 x2) t_1) x1) t_0)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0))))
(if (<= x1 1.35e+154)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* 3.0 t_1))))))
(/ (fma x1 x1 (* (* x2 x2) -36.0)) (+ x1 (* 6.0 x2)))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((2.0 * x2) + t_1) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_1)))));
} else {
tmp = fma(x1, x1, ((x2 * x2) * -36.0)) / (x1 + (6.0 * x2));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(1.0 + Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(Float64(2.0 * x2) + t_1) - x1) / t_0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(3.0 * t_1)))))); else tmp = Float64(fma(x1, x1, Float64(Float64(x2 * x2) * -36.0)) / Float64(x1 + Float64(6.0 * x2))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * x1 + N[(N[(x2 * x2), $MachinePrecision] * -36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(6.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(2 \cdot x2 + t_1\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x1, x1, \left(x2 \cdot x2\right) \cdot -36\right)}{x1 + 6 \cdot x2}\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 20.8%
if -5.60000000000000037e102 < x1 < 1.35000000000000003e154Initial program 98.9%
Taylor expanded in x1 around inf 97.0%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.1%
*-commutative6.1%
Simplified6.1%
flip-+77.1%
Applied egg-rr77.1%
fma-neg82.9%
swap-sqr82.9%
unpow282.9%
distribute-rgt-neg-in82.9%
unpow282.9%
metadata-eval82.9%
metadata-eval82.9%
sub-neg82.9%
distribute-rgt-neg-in82.9%
metadata-eval82.9%
Simplified82.9%
Final simplification84.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ (* 2.0 x2) t_1) x1) t_0)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0))))
(if (<= x1 1.35e+154)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* 3.0 t_1))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((2.0 * x2) + t_1) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * 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) :: tmp
t_0 = 1.0d0 + (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (((2.0d0 * x2) + t_1) - x1) / t_0
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
else if (x1 <= 1.35d+154) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0)))) + (3.0d0 * 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 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((2.0 * x2) + t_1) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_1)))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = 1.0 + (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (((2.0 * x2) + t_1) - x1) / t_0 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))) elif x1 <= 1.35e+154: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * t_1))))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(1.0 + Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(Float64(2.0 * x2) + t_1) - x1) / t_0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(3.0 * 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 = 1.0 + (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (((2.0 * x2) + t_1) - x1) / t_0; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))); elseif (x1 <= 1.35e+154) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (3.0 * 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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$1), $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 := 1 + x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(2 \cdot x2 + t_1\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_1\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.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 20.8%
if -5.60000000000000037e102 < x1 < 1.35000000000000003e154Initial program 98.9%
Taylor expanded in x1 around inf 97.0%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.1%
*-commutative6.1%
Simplified6.1%
flip-+77.1%
Applied egg-rr77.1%
swap-sqr77.1%
metadata-eval77.1%
*-commutative77.1%
Simplified77.1%
Final simplification83.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (* x1 x1)))
(t_2 (+ 1.0 (* x1 x1)))
(t_3 (/ (- (+ (* 2.0 x2) t_0) x1) t_2))
(t_4 (* (* (* x1 2.0) t_3) (- t_3 3.0))))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0))))
(if (<= x1 -5e-16)
(+
x1
(+
(+
x1
(+
t_1
(+
(* t_2 (+ t_4 (* (* x1 x1) (- (* 4.0 t_3) 6.0))))
(* t_0 (+ 3.0 (/ -1.0 x1))))))
(* 3.0 (* x2 -2.0))))
(if (<= x1 1.35e+154)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(+ x1 (+ t_1 (+ (* t_0 t_3) (* t_2 (+ t_4 (* 6.0 (* x1 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 * x1);
double t_2 = 1.0 + (x1 * x1);
double t_3 = (((2.0 * x2) + t_0) - x1) / t_2;
double t_4 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= -5e-16) {
tmp = x1 + ((x1 + (t_1 + ((t_2 * (t_4 + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_0 * (3.0 + (-1.0 / x1)))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * (t_4 + (6.0 * (x1 * 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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * (x1 * x1)
t_2 = 1.0d0 + (x1 * x1)
t_3 = (((2.0d0 * x2) + t_0) - x1) / t_2
t_4 = ((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
else if (x1 <= (-5d-16)) then
tmp = x1 + ((x1 + (t_1 + ((t_2 * (t_4 + ((x1 * x1) * ((4.0d0 * t_3) - 6.0d0)))) + (t_0 * (3.0d0 + ((-1.0d0) / x1)))))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 1.35d+154) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * (t_4 + (6.0d0 * (x1 * 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 * x1);
double t_2 = 1.0 + (x1 * x1);
double t_3 = (((2.0 * x2) + t_0) - x1) / t_2;
double t_4 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= -5e-16) {
tmp = x1 + ((x1 + (t_1 + ((t_2 * (t_4 + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_0 * (3.0 + (-1.0 / x1)))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * (t_4 + (6.0 * (x1 * 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 * x1) t_2 = 1.0 + (x1 * x1) t_3 = (((2.0 * x2) + t_0) - x1) / t_2 t_4 = ((x1 * 2.0) * t_3) * (t_3 - 3.0) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))) elif x1 <= -5e-16: tmp = x1 + ((x1 + (t_1 + ((t_2 * (t_4 + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_0 * (3.0 + (-1.0 / x1)))))) + (3.0 * (x2 * -2.0))) elif x1 <= 1.35e+154: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * (t_4 + (6.0 * (x1 * 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(x1 * Float64(x1 * x1)) t_2 = Float64(1.0 + Float64(x1 * x1)) t_3 = Float64(Float64(Float64(Float64(2.0 * x2) + t_0) - x1) / t_2) t_4 = Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); elseif (x1 <= -5e-16) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * Float64(t_4 + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(t_0 * Float64(3.0 + Float64(-1.0 / x1)))))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(t_1 + Float64(Float64(t_0 * t_3) + Float64(t_2 * Float64(t_4 + Float64(6.0 * Float64(x1 * 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 * x1); t_2 = 1.0 + (x1 * x1); t_3 = (((2.0 * x2) + t_0) - x1) / t_2; t_4 = ((x1 * 2.0) * t_3) * (t_3 - 3.0); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))); elseif (x1 <= -5e-16) tmp = x1 + ((x1 + (t_1 + ((t_2 * (t_4 + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_0 * (3.0 + (-1.0 / x1)))))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 1.35e+154) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * (t_4 + (6.0 * (x1 * 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[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5e-16], N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * N[(t$95$4 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 + N[(N[(t$95$0 * t$95$3), $MachinePrecision] + N[(t$95$2 * N[(t$95$4 + N[(6.0 * N[(x1 * x1), $MachinePrecision]), $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 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := 1 + x1 \cdot x1\\
t_3 := \frac{\left(2 \cdot x2 + t_0\right) - x1}{t_2}\\
t_4 := \left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{-16}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t_1 + \left(t_2 \cdot \left(t_4 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + t_0 \cdot \left(3 + \frac{-1}{x1}\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2} + \left(x1 + \left(t_1 + \left(t_0 \cdot t_3 + t_2 \cdot \left(t_4 + 6 \cdot \left(x1 \cdot x1\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 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 20.8%
if -5.60000000000000037e102 < x1 < -5.0000000000000004e-16Initial program 99.1%
Taylor expanded in x1 around inf 84.4%
Taylor expanded in x1 around 0 98.9%
*-commutative98.9%
Simplified98.9%
if -5.0000000000000004e-16 < x1 < 1.35000000000000003e154Initial program 98.8%
Taylor expanded in x1 around inf 98.5%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.1%
*-commutative6.1%
Simplified6.1%
flip-+77.1%
Applied egg-rr77.1%
swap-sqr77.1%
metadata-eval77.1%
*-commutative77.1%
Simplified77.1%
Final simplification85.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (* x1 x1)))
(t_2 (+ 1.0 (* x1 x1)))
(t_3 (/ (- (+ (* 2.0 x2) t_0) x1) t_2))
(t_4 (- t_3 3.0))
(t_5
(+
x1
(+
(+
x1
(+
t_1
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) t_4)
(* (* x1 x1) (- (* 4.0 t_3) 6.0))))
(* t_0 (+ 3.0 (/ -1.0 x1))))))
(* 3.0 (* x2 -2.0))))))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0))))
(if (<= x1 -5e-16)
t_5
(if (<= x1 4e-27)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(+
x1
(+
t_1
(+
(* t_0 t_3)
(*
t_2
(+
(* t_4 (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* x1 (* x1 6.0)))))))))
(if (<= x1 1.35e+154)
t_5
(/ (- (* 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 * x1);
double t_2 = 1.0 + (x1 * x1);
double t_3 = (((2.0 * x2) + t_0) - x1) / t_2;
double t_4 = t_3 - 3.0;
double t_5 = x1 + ((x1 + (t_1 + ((t_2 * ((((x1 * 2.0) * t_3) * t_4) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_0 * (3.0 + (-1.0 / x1)))))) + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= -5e-16) {
tmp = t_5;
} else if (x1 <= 4e-27) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * ((t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + (x1 * (x1 * 6.0))))))));
} else if (x1 <= 1.35e+154) {
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) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * (x1 * x1)
t_2 = 1.0d0 + (x1 * x1)
t_3 = (((2.0d0 * x2) + t_0) - x1) / t_2
t_4 = t_3 - 3.0d0
t_5 = x1 + ((x1 + (t_1 + ((t_2 * ((((x1 * 2.0d0) * t_3) * t_4) + ((x1 * x1) * ((4.0d0 * t_3) - 6.0d0)))) + (t_0 * (3.0d0 + ((-1.0d0) / x1)))))) + (3.0d0 * (x2 * (-2.0d0))))
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
else if (x1 <= (-5d-16)) then
tmp = t_5
else if (x1 <= 4d-27) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * ((t_4 * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + (x1 * (x1 * 6.0d0))))))))
else if (x1 <= 1.35d+154) 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 * 3.0);
double t_1 = x1 * (x1 * x1);
double t_2 = 1.0 + (x1 * x1);
double t_3 = (((2.0 * x2) + t_0) - x1) / t_2;
double t_4 = t_3 - 3.0;
double t_5 = x1 + ((x1 + (t_1 + ((t_2 * ((((x1 * 2.0) * t_3) * t_4) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_0 * (3.0 + (-1.0 / x1)))))) + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= -5e-16) {
tmp = t_5;
} else if (x1 <= 4e-27) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * ((t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + (x1 * (x1 * 6.0))))))));
} else if (x1 <= 1.35e+154) {
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 * 3.0) t_1 = x1 * (x1 * x1) t_2 = 1.0 + (x1 * x1) t_3 = (((2.0 * x2) + t_0) - x1) / t_2 t_4 = t_3 - 3.0 t_5 = x1 + ((x1 + (t_1 + ((t_2 * ((((x1 * 2.0) * t_3) * t_4) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_0 * (3.0 + (-1.0 / x1)))))) + (3.0 * (x2 * -2.0))) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))) elif x1 <= -5e-16: tmp = t_5 elif x1 <= 4e-27: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * ((t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + (x1 * (x1 * 6.0)))))))) elif x1 <= 1.35e+154: tmp = t_5 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(x1 * Float64(x1 * x1)) t_2 = Float64(1.0 + Float64(x1 * x1)) t_3 = Float64(Float64(Float64(Float64(2.0 * x2) + t_0) - x1) / t_2) t_4 = Float64(t_3 - 3.0) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * t_4) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(t_0 * Float64(3.0 + Float64(-1.0 / x1)))))) + Float64(3.0 * Float64(x2 * -2.0)))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); elseif (x1 <= -5e-16) tmp = t_5; elseif (x1 <= 4e-27) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(t_1 + Float64(Float64(t_0 * t_3) + Float64(t_2 * Float64(Float64(t_4 * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(x1 * Float64(x1 * 6.0))))))))); elseif (x1 <= 1.35e+154) 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 * 3.0); t_1 = x1 * (x1 * x1); t_2 = 1.0 + (x1 * x1); t_3 = (((2.0 * x2) + t_0) - x1) / t_2; t_4 = t_3 - 3.0; t_5 = x1 + ((x1 + (t_1 + ((t_2 * ((((x1 * 2.0) * t_3) * t_4) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_0 * (3.0 + (-1.0 / x1)))))) + (3.0 * (x2 * -2.0))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))); elseif (x1 <= -5e-16) tmp = t_5; elseif (x1 <= 4e-27) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * ((t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + (x1 * (x1 * 6.0)))))))); elseif (x1 <= 1.35e+154) 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[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 - 3.0), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * t$95$4), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5e-16], t$95$5, If[LessEqual[x1, 4e-27], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 + N[(N[(t$95$0 * t$95$3), $MachinePrecision] + N[(t$95$2 * N[(N[(t$95$4 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], 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 \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := 1 + x1 \cdot x1\\
t_3 := \frac{\left(2 \cdot x2 + t_0\right) - x1}{t_2}\\
t_4 := t_3 - 3\\
t_5 := x1 + \left(\left(x1 + \left(t_1 + \left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot t_4 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + t_0 \cdot \left(3 + \frac{-1}{x1}\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{-16}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{-27}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2} + \left(x1 + \left(t_1 + \left(t_0 \cdot t_3 + t_2 \cdot \left(t_4 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;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 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 20.8%
if -5.60000000000000037e102 < x1 < -5.0000000000000004e-16 or 4.0000000000000002e-27 < x1 < 1.35000000000000003e154Initial program 99.3%
Taylor expanded in x1 around inf 88.7%
Taylor expanded in x1 around 0 99.1%
*-commutative99.1%
Simplified99.1%
if -5.0000000000000004e-16 < x1 < 4.0000000000000002e-27Initial program 98.7%
Taylor expanded in x1 around inf 84.1%
Taylor expanded in x1 around 0 84.1%
Taylor expanded in x1 around inf 99.5%
*-commutative99.5%
unpow299.5%
associate-*l*99.5%
Simplified99.5%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.1%
*-commutative6.1%
Simplified6.1%
flip-+77.1%
Applied egg-rr77.1%
swap-sqr77.1%
metadata-eval77.1%
*-commutative77.1%
Simplified77.1%
Final simplification85.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (* x1 x1)))
(t_2 (+ 1.0 (* x1 x1)))
(t_3 (/ (- (+ (* 2.0 x2) t_0) x1) t_2))
(t_4 (- t_3 3.0))
(t_5
(+
x1
(+
9.0
(+
x1
(+
t_1
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) t_4)
(* (* x1 x1) (- (* 4.0 t_3) 6.0))))
(* t_0 (+ 3.0 (/ -1.0 x1))))))))))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0))))
(if (<= x1 -0.72)
t_5
(if (<= x1 0.00037)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(+
x1
(+
t_1
(+
(* t_0 t_3)
(*
t_2
(+
(* t_4 (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* x1 (* x1 6.0)))))))))
(if (<= x1 1.35e+154)
t_5
(/ (- (* 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 * x1);
double t_2 = 1.0 + (x1 * x1);
double t_3 = (((2.0 * x2) + t_0) - x1) / t_2;
double t_4 = t_3 - 3.0;
double t_5 = x1 + (9.0 + (x1 + (t_1 + ((t_2 * ((((x1 * 2.0) * t_3) * t_4) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_0 * (3.0 + (-1.0 / x1)))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= -0.72) {
tmp = t_5;
} else if (x1 <= 0.00037) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * ((t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + (x1 * (x1 * 6.0))))))));
} else if (x1 <= 1.35e+154) {
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) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * (x1 * x1)
t_2 = 1.0d0 + (x1 * x1)
t_3 = (((2.0d0 * x2) + t_0) - x1) / t_2
t_4 = t_3 - 3.0d0
t_5 = x1 + (9.0d0 + (x1 + (t_1 + ((t_2 * ((((x1 * 2.0d0) * t_3) * t_4) + ((x1 * x1) * ((4.0d0 * t_3) - 6.0d0)))) + (t_0 * (3.0d0 + ((-1.0d0) / x1)))))))
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
else if (x1 <= (-0.72d0)) then
tmp = t_5
else if (x1 <= 0.00037d0) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * ((t_4 * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + (x1 * (x1 * 6.0d0))))))))
else if (x1 <= 1.35d+154) 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 * 3.0);
double t_1 = x1 * (x1 * x1);
double t_2 = 1.0 + (x1 * x1);
double t_3 = (((2.0 * x2) + t_0) - x1) / t_2;
double t_4 = t_3 - 3.0;
double t_5 = x1 + (9.0 + (x1 + (t_1 + ((t_2 * ((((x1 * 2.0) * t_3) * t_4) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_0 * (3.0 + (-1.0 / x1)))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= -0.72) {
tmp = t_5;
} else if (x1 <= 0.00037) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * ((t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + (x1 * (x1 * 6.0))))))));
} else if (x1 <= 1.35e+154) {
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 * 3.0) t_1 = x1 * (x1 * x1) t_2 = 1.0 + (x1 * x1) t_3 = (((2.0 * x2) + t_0) - x1) / t_2 t_4 = t_3 - 3.0 t_5 = x1 + (9.0 + (x1 + (t_1 + ((t_2 * ((((x1 * 2.0) * t_3) * t_4) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_0 * (3.0 + (-1.0 / x1))))))) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))) elif x1 <= -0.72: tmp = t_5 elif x1 <= 0.00037: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * ((t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + (x1 * (x1 * 6.0)))))))) elif x1 <= 1.35e+154: tmp = t_5 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(x1 * Float64(x1 * x1)) t_2 = Float64(1.0 + Float64(x1 * x1)) t_3 = Float64(Float64(Float64(Float64(2.0 * x2) + t_0) - x1) / t_2) t_4 = Float64(t_3 - 3.0) t_5 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * t_4) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0)))) + Float64(t_0 * Float64(3.0 + Float64(-1.0 / x1)))))))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); elseif (x1 <= -0.72) tmp = t_5; elseif (x1 <= 0.00037) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(t_1 + Float64(Float64(t_0 * t_3) + Float64(t_2 * Float64(Float64(t_4 * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(x1 * Float64(x1 * 6.0))))))))); elseif (x1 <= 1.35e+154) 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 * 3.0); t_1 = x1 * (x1 * x1); t_2 = 1.0 + (x1 * x1); t_3 = (((2.0 * x2) + t_0) - x1) / t_2; t_4 = t_3 - 3.0; t_5 = x1 + (9.0 + (x1 + (t_1 + ((t_2 * ((((x1 * 2.0) * t_3) * t_4) + ((x1 * x1) * ((4.0 * t_3) - 6.0)))) + (t_0 * (3.0 + (-1.0 / x1))))))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))); elseif (x1 <= -0.72) tmp = t_5; elseif (x1 <= 0.00037) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_1 + ((t_0 * t_3) + (t_2 * ((t_4 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + (x1 * (x1 * 6.0)))))))); elseif (x1 <= 1.35e+154) 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[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 - 3.0), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(9.0 + N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * t$95$4), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.72], t$95$5, If[LessEqual[x1, 0.00037], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 + N[(N[(t$95$0 * t$95$3), $MachinePrecision] + N[(t$95$2 * N[(N[(t$95$4 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], 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 \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := 1 + x1 \cdot x1\\
t_3 := \frac{\left(2 \cdot x2 + t_0\right) - x1}{t_2}\\
t_4 := t_3 - 3\\
t_5 := x1 + \left(9 + \left(x1 + \left(t_1 + \left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot t_4 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + t_0 \cdot \left(3 + \frac{-1}{x1}\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{elif}\;x1 \leq -0.72:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq 0.00037:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2} + \left(x1 + \left(t_1 + \left(t_0 \cdot t_3 + t_2 \cdot \left(t_4 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;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 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 20.8%
if -5.60000000000000037e102 < x1 < -0.71999999999999997 or 3.6999999999999999e-4 < x1 < 1.35000000000000003e154Initial program 99.3%
Taylor expanded in x1 around inf 99.3%
Taylor expanded in x1 around inf 99.3%
if -0.71999999999999997 < x1 < 3.6999999999999999e-4Initial program 98.7%
Taylor expanded in x1 around inf 79.7%
Taylor expanded in x1 around 0 79.7%
Taylor expanded in x1 around inf 96.8%
*-commutative96.8%
unpow296.8%
associate-*l*96.8%
Simplified96.8%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.1%
*-commutative6.1%
Simplified6.1%
flip-+77.1%
Applied egg-rr77.1%
swap-sqr77.1%
metadata-eval77.1%
*-commutative77.1%
Simplified77.1%
Final simplification84.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ (* 2.0 x2) t_1) x1) t_0)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0))))
(if (<= x1 1.3e+154)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_2)
(*
t_0
(+
(* (- t_2 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* x1 (* x1 6.0)))))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((2.0 * x2) + t_1) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= 1.3e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + (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 = 1.0d0 + (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (((2.0d0 * x2) + t_1) - x1) / t_0
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
else if (x1 <= 1.3d+154) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * (((t_2 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + (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 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((2.0 * x2) + t_1) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= 1.3e+154) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + (x1 * (x1 * 6.0))))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = 1.0 + (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (((2.0 * x2) + t_1) - x1) / t_0 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))) elif x1 <= 1.3e+154: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + (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(1.0 + Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(Float64(2.0 * x2) + t_1) - x1) / t_0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); elseif (x1 <= 1.3e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * t_2) + Float64(t_0 * Float64(Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(x1 * Float64(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 = 1.0 + (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (((2.0 * x2) + t_1) - x1) / t_0; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))); elseif (x1 <= 1.3e+154) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + (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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.3e+154], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * t$95$2), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $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 := 1 + x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(2 \cdot x2 + t_1\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{elif}\;x1 \leq 1.3 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot t_2 + t_0 \cdot \left(\left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + x1 \cdot \left(x1 \cdot 6\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 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 20.8%
if -5.60000000000000037e102 < x1 < 1.29999999999999994e154Initial program 98.9%
Taylor expanded in x1 around inf 83.3%
Taylor expanded in x1 around 0 78.8%
Taylor expanded in x1 around inf 90.6%
*-commutative90.6%
unpow290.6%
associate-*l*90.6%
Simplified90.6%
if 1.29999999999999994e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.1%
*-commutative6.1%
Simplified6.1%
flip-+77.1%
Applied egg-rr77.1%
swap-sqr77.1%
metadata-eval77.1%
*-commutative77.1%
Simplified77.1%
Final simplification79.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ (* 2.0 x2) t_1) x1) t_0))
(t_3
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(* 8.0 (/ x1 (+ (/ 1.0 (* x2 x2)) (* (/ x1 x2) (/ x1 x2)))))))))
(t_4
(+
x1
(+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0)))))
(t_5
(+
x1
(+
9.0
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_2)
(*
t_0
(+
(* (- t_2 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* (* x1 x1) (- (* 4.0 (+ 3.0 (/ -1.0 x1))) 6.0)))))))))))
(if (<= x1 -5.6e+102)
t_4
(if (<= x1 -5800000.0)
t_5
(if (<= x1 -1.22e-213)
t_3
(if (<= x1 2.6e-182)
t_4
(if (<= x1 7000000000.0)
t_3
(if (<= x1 1e+154)
t_5
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((2.0 * x2) + t_1) - x1) / t_0;
double t_3 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (8.0 * (x1 / ((1.0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2)))))));
double t_4 = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
double t_5 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0))))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_4;
} else if (x1 <= -5800000.0) {
tmp = t_5;
} else if (x1 <= -1.22e-213) {
tmp = t_3;
} else if (x1 <= 2.6e-182) {
tmp = t_4;
} else if (x1 <= 7000000000.0) {
tmp = t_3;
} else if (x1 <= 1e+154) {
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) :: tmp
t_0 = 1.0d0 + (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (((2.0d0 * x2) + t_1) - x1) / t_0
t_3 = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (8.0d0 * (x1 / ((1.0d0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2)))))))
t_4 = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
t_5 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * (((t_2 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + ((x1 * x1) * ((4.0d0 * (3.0d0 + ((-1.0d0) / x1))) - 6.0d0))))))))
if (x1 <= (-5.6d+102)) then
tmp = t_4
else if (x1 <= (-5800000.0d0)) then
tmp = t_5
else if (x1 <= (-1.22d-213)) then
tmp = t_3
else if (x1 <= 2.6d-182) then
tmp = t_4
else if (x1 <= 7000000000.0d0) then
tmp = t_3
else if (x1 <= 1d+154) 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 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((2.0 * x2) + t_1) - x1) / t_0;
double t_3 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (8.0 * (x1 / ((1.0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2)))))));
double t_4 = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
double t_5 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0))))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_4;
} else if (x1 <= -5800000.0) {
tmp = t_5;
} else if (x1 <= -1.22e-213) {
tmp = t_3;
} else if (x1 <= 2.6e-182) {
tmp = t_4;
} else if (x1 <= 7000000000.0) {
tmp = t_3;
} else if (x1 <= 1e+154) {
tmp = t_5;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = 1.0 + (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (((2.0 * x2) + t_1) - x1) / t_0 t_3 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (8.0 * (x1 / ((1.0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2))))))) t_4 = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))) t_5 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0)))))))) tmp = 0 if x1 <= -5.6e+102: tmp = t_4 elif x1 <= -5800000.0: tmp = t_5 elif x1 <= -1.22e-213: tmp = t_3 elif x1 <= 2.6e-182: tmp = t_4 elif x1 <= 7000000000.0: tmp = t_3 elif x1 <= 1e+154: tmp = t_5 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(1.0 + Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(Float64(2.0 * x2) + t_1) - x1) / t_0) t_3 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(8.0 * Float64(x1 / Float64(Float64(1.0 / Float64(x2 * x2)) + Float64(Float64(x1 / x2) * Float64(x1 / x2)))))))) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))) t_5 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * t_2) + Float64(t_0 * Float64(Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(3.0 + Float64(-1.0 / x1))) - 6.0))))))))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = t_4; elseif (x1 <= -5800000.0) tmp = t_5; elseif (x1 <= -1.22e-213) tmp = t_3; elseif (x1 <= 2.6e-182) tmp = t_4; elseif (x1 <= 7000000000.0) tmp = t_3; elseif (x1 <= 1e+154) 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 = 1.0 + (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (((2.0 * x2) + t_1) - x1) / t_0; t_3 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + (8.0 * (x1 / ((1.0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2))))))); t_4 = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))); t_5 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0)))))))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = t_4; elseif (x1 <= -5800000.0) tmp = t_5; elseif (x1 <= -1.22e-213) tmp = t_3; elseif (x1 <= 2.6e-182) tmp = t_4; elseif (x1 <= 7000000000.0) tmp = t_3; elseif (x1 <= 1e+154) 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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(8.0 * N[(x1 / N[(N[(1.0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 / x2), $MachinePrecision] * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * t$95$2), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], t$95$4, If[LessEqual[x1, -5800000.0], t$95$5, If[LessEqual[x1, -1.22e-213], t$95$3, If[LessEqual[x1, 2.6e-182], t$95$4, If[LessEqual[x1, 7000000000.0], t$95$3, If[LessEqual[x1, 1e+154], 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 := 1 + x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(2 \cdot x2 + t_1\right) - x1}{t_0}\\
t_3 := x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + 8 \cdot \frac{x1}{\frac{1}{x2 \cdot x2} + \frac{x1}{x2} \cdot \frac{x1}{x2}}\right)\right)\\
t_4 := x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
t_5 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot t_2 + t_0 \cdot \left(\left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 + \frac{-1}{x1}\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x1 \leq -5800000:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq -1.22 \cdot 10^{-213}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x1 \leq 2.6 \cdot 10^{-182}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x1 \leq 7000000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x1 \leq 10^{+154}:\\
\;\;\;\;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 < -5.60000000000000037e102 or -1.22e-213 < x1 < 2.60000000000000006e-182Initial program 57.5%
Taylor expanded in x1 around 0 47.1%
Taylor expanded in x2 around 0 57.4%
*-commutative57.4%
Simplified57.4%
Taylor expanded in x1 around 0 64.7%
if -5.60000000000000037e102 < x1 < -5.8e6 or 7e9 < x1 < 1.00000000000000004e154Initial program 99.4%
Taylor expanded in x1 around inf 91.8%
Taylor expanded in x1 around 0 83.5%
Taylor expanded in x1 around inf 83.5%
if -5.8e6 < x1 < -1.22e-213 or 2.60000000000000006e-182 < x1 < 7e9Initial program 99.2%
Taylor expanded in x2 around inf 86.8%
associate-/l*86.8%
+-commutative86.8%
unpow286.8%
fma-udef86.8%
unpow286.8%
Simplified86.8%
Taylor expanded in x1 around 0 85.7%
unpow285.7%
unpow285.7%
unpow285.7%
times-frac86.8%
Simplified86.8%
if 1.00000000000000004e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.1%
*-commutative6.1%
Simplified6.1%
flip-+77.1%
Applied egg-rr77.1%
swap-sqr77.1%
metadata-eval77.1%
*-commutative77.1%
Simplified77.1%
Final simplification77.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ (* 2.0 x2) t_2) x1) t_0))
(t_4
(*
t_0
(+
(* (- t_3 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* (* x1 x1) (- (* 4.0 (+ 3.0 (/ -1.0 x1))) 6.0)))))
(t_5 (+ x1 (+ 9.0 (+ x1 (+ t_1 (+ (* t_2 t_3) t_4))))))
(t_6 (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0)))
(t_7
(+
x1
(+
t_6
(+
x1
(* 8.0 (/ x1 (+ (/ 1.0 (* x2 x2)) (* (/ x1 x2) (/ x1 x2))))))))))
(if (<= x1 -5.6e+102)
(+ x1 (+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0))))
(if (<= x1 -440000.0)
t_5
(if (<= x1 -1.6e-162)
t_7
(if (<= x1 7e-176)
(+ x1 (+ t_6 (+ x1 (+ t_1 (+ (* 3.0 t_2) t_4)))))
(if (<= x1 13000000000.0)
t_7
(if (<= x1 7.5e+153)
t_5
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (((2.0 * x2) + t_2) - x1) / t_0;
double t_4 = t_0 * (((t_3 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0)));
double t_5 = x1 + (9.0 + (x1 + (t_1 + ((t_2 * t_3) + t_4))));
double t_6 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0);
double t_7 = x1 + (t_6 + (x1 + (8.0 * (x1 / ((1.0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2)))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= -440000.0) {
tmp = t_5;
} else if (x1 <= -1.6e-162) {
tmp = t_7;
} else if (x1 <= 7e-176) {
tmp = x1 + (t_6 + (x1 + (t_1 + ((3.0 * t_2) + t_4))));
} else if (x1 <= 13000000000.0) {
tmp = t_7;
} else if (x1 <= 7.5e+153) {
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) :: t_7
real(8) :: tmp
t_0 = 1.0d0 + (x1 * x1)
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = (((2.0d0 * x2) + t_2) - x1) / t_0
t_4 = t_0 * (((t_3 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + ((x1 * x1) * ((4.0d0 * (3.0d0 + ((-1.0d0) / x1))) - 6.0d0)))
t_5 = x1 + (9.0d0 + (x1 + (t_1 + ((t_2 * t_3) + t_4))))
t_6 = 3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)
t_7 = x1 + (t_6 + (x1 + (8.0d0 * (x1 / ((1.0d0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2)))))))
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
else if (x1 <= (-440000.0d0)) then
tmp = t_5
else if (x1 <= (-1.6d-162)) then
tmp = t_7
else if (x1 <= 7d-176) then
tmp = x1 + (t_6 + (x1 + (t_1 + ((3.0d0 * t_2) + t_4))))
else if (x1 <= 13000000000.0d0) then
tmp = t_7
else if (x1 <= 7.5d+153) 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 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (((2.0 * x2) + t_2) - x1) / t_0;
double t_4 = t_0 * (((t_3 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0)));
double t_5 = x1 + (9.0 + (x1 + (t_1 + ((t_2 * t_3) + t_4))));
double t_6 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0);
double t_7 = x1 + (t_6 + (x1 + (8.0 * (x1 / ((1.0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2)))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
} else if (x1 <= -440000.0) {
tmp = t_5;
} else if (x1 <= -1.6e-162) {
tmp = t_7;
} else if (x1 <= 7e-176) {
tmp = x1 + (t_6 + (x1 + (t_1 + ((3.0 * t_2) + t_4))));
} else if (x1 <= 13000000000.0) {
tmp = t_7;
} else if (x1 <= 7.5e+153) {
tmp = t_5;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = 1.0 + (x1 * x1) t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = (((2.0 * x2) + t_2) - x1) / t_0 t_4 = t_0 * (((t_3 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0))) t_5 = x1 + (9.0 + (x1 + (t_1 + ((t_2 * t_3) + t_4)))) t_6 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0) t_7 = x1 + (t_6 + (x1 + (8.0 * (x1 / ((1.0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2))))))) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))) elif x1 <= -440000.0: tmp = t_5 elif x1 <= -1.6e-162: tmp = t_7 elif x1 <= 7e-176: tmp = x1 + (t_6 + (x1 + (t_1 + ((3.0 * t_2) + t_4)))) elif x1 <= 13000000000.0: tmp = t_7 elif x1 <= 7.5e+153: tmp = t_5 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(1.0 + Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(Float64(2.0 * x2) + t_2) - x1) / t_0) t_4 = Float64(t_0 * Float64(Float64(Float64(t_3 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(3.0 + Float64(-1.0 / x1))) - 6.0)))) t_5 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * t_3) + t_4))))) t_6 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) t_7 = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(8.0 * Float64(x1 / Float64(Float64(1.0 / Float64(x2 * x2)) + Float64(Float64(x1 / x2) * Float64(x1 / x2)))))))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))); elseif (x1 <= -440000.0) tmp = t_5; elseif (x1 <= -1.6e-162) tmp = t_7; elseif (x1 <= 7e-176) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_1 + Float64(Float64(3.0 * t_2) + t_4))))); elseif (x1 <= 13000000000.0) tmp = t_7; elseif (x1 <= 7.5e+153) 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 = 1.0 + (x1 * x1); t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = (((2.0 * x2) + t_2) - x1) / t_0; t_4 = t_0 * (((t_3 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0))); t_5 = x1 + (9.0 + (x1 + (t_1 + ((t_2 * t_3) + t_4)))); t_6 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0); t_7 = x1 + (t_6 + (x1 + (8.0 * (x1 / ((1.0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2))))))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))); elseif (x1 <= -440000.0) tmp = t_5; elseif (x1 <= -1.6e-162) tmp = t_7; elseif (x1 <= 7e-176) tmp = x1 + (t_6 + (x1 + (t_1 + ((3.0 * t_2) + t_4)))); elseif (x1 <= 13000000000.0) tmp = t_7; elseif (x1 <= 7.5e+153) 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[(1.0 + N[(x1 * x1), $MachinePrecision]), $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[(N[(2.0 * x2), $MachinePrecision] + t$95$2), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$0 * N[(N[(N[(t$95$3 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(9.0 + N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * t$95$3), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(t$95$6 + N[(x1 + N[(8.0 * N[(x1 / N[(N[(1.0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 / x2), $MachinePrecision] * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -440000.0], t$95$5, If[LessEqual[x1, -1.6e-162], t$95$7, If[LessEqual[x1, 7e-176], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$1 + N[(N[(3.0 * t$95$2), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 13000000000.0], t$95$7, If[LessEqual[x1, 7.5e+153], 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 := 1 + x1 \cdot x1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(2 \cdot x2 + t_2\right) - x1}{t_0}\\
t_4 := t_0 \cdot \left(\left(t_3 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 + \frac{-1}{x1}\right) - 6\right)\right)\\
t_5 := x1 + \left(9 + \left(x1 + \left(t_1 + \left(t_2 \cdot t_3 + t_4\right)\right)\right)\right)\\
t_6 := 3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0}\\
t_7 := x1 + \left(t_6 + \left(x1 + 8 \cdot \frac{x1}{\frac{1}{x2 \cdot x2} + \frac{x1}{x2} \cdot \frac{x1}{x2}}\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
\mathbf{elif}\;x1 \leq -440000:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq -1.6 \cdot 10^{-162}:\\
\;\;\;\;t_7\\
\mathbf{elif}\;x1 \leq 7 \cdot 10^{-176}:\\
\;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_1 + \left(3 \cdot t_2 + t_4\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 13000000000:\\
\;\;\;\;t_7\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{+153}:\\
\;\;\;\;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 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 3.1%
*-commutative3.1%
Simplified3.1%
Taylor expanded in x1 around 0 20.8%
if -5.60000000000000037e102 < x1 < -4.4e5 or 1.3e10 < x1 < 7.50000000000000065e153Initial program 99.4%
Taylor expanded in x1 around inf 91.8%
Taylor expanded in x1 around 0 83.5%
Taylor expanded in x1 around inf 83.5%
if -4.4e5 < x1 < -1.59999999999999988e-162 or 7e-176 < x1 < 1.3e10Initial program 99.2%
Taylor expanded in x2 around inf 87.0%
associate-/l*87.0%
+-commutative87.0%
unpow287.0%
fma-udef87.0%
unpow287.0%
Simplified87.0%
Taylor expanded in x1 around 0 87.0%
unpow287.0%
unpow287.0%
unpow287.0%
times-frac87.1%
Simplified87.1%
if -1.59999999999999988e-162 < x1 < 7e-176Initial program 97.9%
Taylor expanded in x1 around inf 99.7%
Taylor expanded in x1 around 0 99.7%
Taylor expanded in x1 around inf 99.7%
if 7.50000000000000065e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.1%
*-commutative6.1%
Simplified6.1%
flip-+77.1%
Applied egg-rr77.1%
swap-sqr77.1%
metadata-eval77.1%
*-commutative77.1%
Simplified77.1%
Final simplification78.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0)))))
(t_1
(*
3.0
(/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ 1.0 (* x1 x1))))))
(if (<= x1 -1.9e+83)
t_0
(if (<= x1 -1.26e-213)
(+
x1
(+
t_1
(+ x1 (* 8.0 (/ x1 (+ (/ 1.0 (* x2 x2)) (* (/ x1 x2) (/ x1 x2))))))))
(if (<= x1 5e-179)
t_0
(if (<= x1 1.35e+154)
(+ x1 (+ (+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0))))) t_1))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
double t_1 = 3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (1.0 + (x1 * x1)));
double tmp;
if (x1 <= -1.9e+83) {
tmp = t_0;
} else if (x1 <= -1.26e-213) {
tmp = x1 + (t_1 + (x1 + (8.0 * (x1 / ((1.0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2)))))));
} else if (x1 <= 5e-179) {
tmp = t_0;
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + 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) :: tmp
t_0 = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
t_1 = 3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / (1.0d0 + (x1 * x1)))
if (x1 <= (-1.9d+83)) then
tmp = t_0
else if (x1 <= (-1.26d-213)) then
tmp = x1 + (t_1 + (x1 + (8.0d0 * (x1 / ((1.0d0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2)))))))
else if (x1 <= 5d-179) then
tmp = t_0
else if (x1 <= 1.35d+154) then
tmp = x1 + ((x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))) + 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 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
double t_1 = 3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (1.0 + (x1 * x1)));
double tmp;
if (x1 <= -1.9e+83) {
tmp = t_0;
} else if (x1 <= -1.26e-213) {
tmp = x1 + (t_1 + (x1 + (8.0 * (x1 / ((1.0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2)))))));
} else if (x1 <= 5e-179) {
tmp = t_0;
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + t_1);
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))) t_1 = 3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (1.0 + (x1 * x1))) tmp = 0 if x1 <= -1.9e+83: tmp = t_0 elif x1 <= -1.26e-213: tmp = x1 + (t_1 + (x1 + (8.0 * (x1 / ((1.0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2))))))) elif x1 <= 5e-179: tmp = t_0 elif x1 <= 1.35e+154: tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + 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(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))) t_1 = Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(1.0 + Float64(x1 * x1)))) tmp = 0.0 if (x1 <= -1.9e+83) tmp = t_0; elseif (x1 <= -1.26e-213) tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(8.0 * Float64(x1 / Float64(Float64(1.0 / Float64(x2 * x2)) + Float64(Float64(x1 / x2) * Float64(x1 / x2)))))))); elseif (x1 <= 5e-179) tmp = t_0; elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + 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 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))); t_1 = 3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (1.0 + (x1 * x1))); tmp = 0.0; if (x1 <= -1.9e+83) tmp = t_0; elseif (x1 <= -1.26e-213) tmp = x1 + (t_1 + (x1 + (8.0 * (x1 / ((1.0 / (x2 * x2)) + ((x1 / x2) * (x1 / x2))))))); elseif (x1 <= 5e-179) tmp = t_0; elseif (x1 <= 1.35e+154) tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + 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[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.9e+83], t$95$0, If[LessEqual[x1, -1.26e-213], N[(x1 + N[(t$95$1 + N[(x1 + N[(8.0 * N[(x1 / N[(N[(1.0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 / x2), $MachinePrecision] * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e-179], t$95$0, If[LessEqual[x1, 1.35e+154], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $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(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
t_1 := 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{1 + x1 \cdot x1}\\
\mathbf{if}\;x1 \leq -1.9 \cdot 10^{+83}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -1.26 \cdot 10^{-213}:\\
\;\;\;\;x1 + \left(t_1 + \left(x1 + 8 \cdot \frac{x1}{\frac{1}{x2 \cdot x2} + \frac{x1}{x2} \cdot \frac{x1}{x2}}\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{-179}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + t_1\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.9000000000000001e83 or -1.26e-213 < x1 < 4.9999999999999998e-179Initial program 60.7%
Taylor expanded in x1 around 0 43.6%
Taylor expanded in x2 around 0 53.2%
*-commutative53.2%
Simplified53.2%
Taylor expanded in x1 around 0 60.1%
if -1.9000000000000001e83 < x1 < -1.26e-213Initial program 99.1%
Taylor expanded in x2 around inf 66.7%
associate-/l*66.7%
+-commutative66.7%
unpow266.7%
fma-udef66.7%
unpow266.7%
Simplified66.7%
Taylor expanded in x1 around 0 65.2%
unpow265.2%
unpow265.2%
unpow265.2%
times-frac66.7%
Simplified66.7%
if 4.9999999999999998e-179 < x1 < 1.35000000000000003e154Initial program 99.4%
Taylor expanded in x1 around 0 63.9%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.1%
*-commutative6.1%
Simplified6.1%
flip-+77.1%
Applied egg-rr77.1%
swap-sqr77.1%
metadata-eval77.1%
*-commutative77.1%
Simplified77.1%
Final simplification65.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0)))))
(t_1
(+
x1
(+
(+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
(*
3.0
(/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ 1.0 (* x1 x1))))))))
(if (<= x1 -1e+85)
t_0
(if (<= x1 -3.1e-214)
t_1
(if (<= x1 1.15e-176)
t_0
(if (<= x1 1.35e+154)
t_1
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
double t_1 = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (1.0 + (x1 * x1)))));
double tmp;
if (x1 <= -1e+85) {
tmp = t_0;
} else if (x1 <= -3.1e-214) {
tmp = t_1;
} else if (x1 <= 1.15e-176) {
tmp = t_0;
} else if (x1 <= 1.35e+154) {
tmp = 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) :: tmp
t_0 = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
t_1 = x1 + ((x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))) + (3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / (1.0d0 + (x1 * x1)))))
if (x1 <= (-1d+85)) then
tmp = t_0
else if (x1 <= (-3.1d-214)) then
tmp = t_1
else if (x1 <= 1.15d-176) then
tmp = t_0
else if (x1 <= 1.35d+154) then
tmp = 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 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
double t_1 = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (1.0 + (x1 * x1)))));
double tmp;
if (x1 <= -1e+85) {
tmp = t_0;
} else if (x1 <= -3.1e-214) {
tmp = t_1;
} else if (x1 <= 1.15e-176) {
tmp = t_0;
} else if (x1 <= 1.35e+154) {
tmp = t_1;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))) t_1 = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (1.0 + (x1 * x1))))) tmp = 0 if x1 <= -1e+85: tmp = t_0 elif x1 <= -3.1e-214: tmp = t_1 elif x1 <= 1.15e-176: tmp = t_0 elif x1 <= 1.35e+154: tmp = 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(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))) t_1 = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(1.0 + Float64(x1 * x1)))))) tmp = 0.0 if (x1 <= -1e+85) tmp = t_0; elseif (x1 <= -3.1e-214) tmp = t_1; elseif (x1 <= 1.15e-176) tmp = t_0; elseif (x1 <= 1.35e+154) tmp = 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 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))); t_1 = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + (3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / (1.0 + (x1 * x1))))); tmp = 0.0; if (x1 <= -1e+85) tmp = t_0; elseif (x1 <= -3.1e-214) tmp = t_1; elseif (x1 <= 1.15e-176) tmp = t_0; elseif (x1 <= 1.35e+154) tmp = 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[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+85], t$95$0, If[LessEqual[x1, -3.1e-214], t$95$1, If[LessEqual[x1, 1.15e-176], t$95$0, If[LessEqual[x1, 1.35e+154], t$95$1, 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(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
t_1 := x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{1 + x1 \cdot x1}\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+85}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -3.1 \cdot 10^{-214}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 1.15 \cdot 10^{-176}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1e85 or -3.10000000000000004e-214 < x1 < 1.1500000000000001e-176Initial program 60.7%
Taylor expanded in x1 around 0 43.6%
Taylor expanded in x2 around 0 53.2%
*-commutative53.2%
Simplified53.2%
Taylor expanded in x1 around 0 60.1%
if -1e85 < x1 < -3.10000000000000004e-214 or 1.1500000000000001e-176 < x1 < 1.35000000000000003e154Initial program 99.3%
Taylor expanded in x1 around 0 63.3%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.1%
*-commutative6.1%
Simplified6.1%
flip-+77.1%
Applied egg-rr77.1%
swap-sqr77.1%
metadata-eval77.1%
*-commutative77.1%
Simplified77.1%
Final simplification64.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))))
(if (<= x1 -9.2e+113)
(+ x1 (+ 9.0 (+ x1 (* 4.0 (* -3.0 (* x1 x2))))))
(if (<= x1 -9.5e-218)
t_0
(if (<= x1 6.6e-248)
(* x2 -6.0)
(if (<= x1 1.58e+140)
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 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -9.2e+113) {
tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
} else if (x1 <= -9.5e-218) {
tmp = t_0;
} else if (x1 <= 6.6e-248) {
tmp = x2 * -6.0;
} else if (x1 <= 1.58e+140) {
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 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
if (x1 <= (-9.2d+113)) then
tmp = x1 + (9.0d0 + (x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))))
else if (x1 <= (-9.5d-218)) then
tmp = t_0
else if (x1 <= 6.6d-248) then
tmp = x2 * (-6.0d0)
else if (x1 <= 1.58d+140) 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 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -9.2e+113) {
tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
} else if (x1 <= -9.5e-218) {
tmp = t_0;
} else if (x1 <= 6.6e-248) {
tmp = x2 * -6.0;
} else if (x1 <= 1.58e+140) {
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 * ((2.0 * x2) - 3.0))) - 2.0))) tmp = 0 if x1 <= -9.2e+113: tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2))))) elif x1 <= -9.5e-218: tmp = t_0 elif x1 <= 6.6e-248: tmp = x2 * -6.0 elif x1 <= 1.58e+140: 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(2.0 * x2) - 3.0))) - 2.0)))) tmp = 0.0 if (x1 <= -9.2e+113) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))))); elseif (x1 <= -9.5e-218) tmp = t_0; elseif (x1 <= 6.6e-248) tmp = Float64(x2 * -6.0); elseif (x1 <= 1.58e+140) 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 * ((2.0 * x2) - 3.0))) - 2.0))); tmp = 0.0; if (x1 <= -9.2e+113) tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2))))); elseif (x1 <= -9.5e-218) tmp = t_0; elseif (x1 <= 6.6e-248) tmp = x2 * -6.0; elseif (x1 <= 1.58e+140) 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[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -9.2e+113], N[(x1 + N[(9.0 + N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -9.5e-218], t$95$0, If[LessEqual[x1, 6.6e-248], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 1.58e+140], 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(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -9.2 \cdot 10^{+113}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -9.5 \cdot 10^{-218}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 6.6 \cdot 10^{-248}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 1.58 \cdot 10^{+140}:\\
\;\;\;\;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 < -9.19999999999999987e113Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x1 around inf 20.3%
if -9.19999999999999987e113 < x1 < -9.49999999999999967e-218 or 6.6000000000000004e-248 < x1 < 1.58000000000000004e140Initial program 96.2%
Taylor expanded in x1 around 0 61.8%
Taylor expanded in x1 around 0 60.9%
if -9.49999999999999967e-218 < x1 < 6.6000000000000004e-248Initial program 99.7%
Taylor expanded in x1 around 0 77.6%
Taylor expanded in x1 around 0 90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in x1 around 0 90.7%
if 1.58000000000000004e140 < x1 Initial program 2.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 6.0%
*-commutative6.0%
Simplified6.0%
flip-+75.1%
Applied egg-rr75.1%
swap-sqr75.1%
metadata-eval75.1%
*-commutative75.1%
Simplified75.1%
Final simplification61.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (+ x1 (* 4.0 (* -3.0 (* x1 x2)))) (+ (* x2 -6.0) (* x1 -3.0)))))
(t_1
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))))
(if (<= x1 -7.8e+80)
t_0
(if (<= x1 -1.7e-213)
t_1
(if (<= x1 5e-179)
t_0
(if (<= x1 1.58e+140)
t_1
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
double t_1 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -7.8e+80) {
tmp = t_0;
} else if (x1 <= -1.7e-213) {
tmp = t_1;
} else if (x1 <= 5e-179) {
tmp = t_0;
} else if (x1 <= 1.58e+140) {
tmp = 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) :: tmp
t_0 = x1 + ((x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))) + ((x2 * (-6.0d0)) + (x1 * (-3.0d0))))
t_1 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
if (x1 <= (-7.8d+80)) then
tmp = t_0
else if (x1 <= (-1.7d-213)) then
tmp = t_1
else if (x1 <= 5d-179) then
tmp = t_0
else if (x1 <= 1.58d+140) then
tmp = 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 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0)));
double t_1 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -7.8e+80) {
tmp = t_0;
} else if (x1 <= -1.7e-213) {
tmp = t_1;
} else if (x1 <= 5e-179) {
tmp = t_0;
} else if (x1 <= 1.58e+140) {
tmp = t_1;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x1 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))) t_1 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) tmp = 0 if x1 <= -7.8e+80: tmp = t_0 elif x1 <= -1.7e-213: tmp = t_1 elif x1 <= 5e-179: tmp = t_0 elif x1 <= 1.58e+140: tmp = 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(Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))) + Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)))) t_1 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))) tmp = 0.0 if (x1 <= -7.8e+80) tmp = t_0; elseif (x1 <= -1.7e-213) tmp = t_1; elseif (x1 <= 5e-179) tmp = t_0; elseif (x1 <= 1.58e+140) tmp = 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 + (4.0 * (-3.0 * (x1 * x2)))) + ((x2 * -6.0) + (x1 * -3.0))); t_1 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); tmp = 0.0; if (x1 <= -7.8e+80) tmp = t_0; elseif (x1 <= -1.7e-213) tmp = t_1; elseif (x1 <= 5e-179) tmp = t_0; elseif (x1 <= 1.58e+140) tmp = 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[(N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.8e+80], t$95$0, If[LessEqual[x1, -1.7e-213], t$95$1, If[LessEqual[x1, 5e-179], t$95$0, If[LessEqual[x1, 1.58e+140], t$95$1, 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(\left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right) + \left(x2 \cdot -6 + x1 \cdot -3\right)\right)\\
t_1 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -7.8 \cdot 10^{+80}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -1.7 \cdot 10^{-213}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{-179}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 1.58 \cdot 10^{+140}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -7.79999999999999998e80 or -1.7000000000000001e-213 < x1 < 4.9999999999999998e-179Initial program 60.7%
Taylor expanded in x1 around 0 43.6%
Taylor expanded in x2 around 0 53.2%
*-commutative53.2%
Simplified53.2%
Taylor expanded in x1 around 0 60.1%
if -7.79999999999999998e80 < x1 < -1.7000000000000001e-213 or 4.9999999999999998e-179 < x1 < 1.58000000000000004e140Initial program 99.3%
Taylor expanded in x1 around 0 63.7%
Taylor expanded in x1 around 0 62.5%
if 1.58000000000000004e140 < x1 Initial program 2.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 6.0%
*-commutative6.0%
Simplified6.0%
flip-+75.1%
Applied egg-rr75.1%
swap-sqr75.1%
metadata-eval75.1%
*-commutative75.1%
Simplified75.1%
Final simplification63.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 5.0)))))
(if (<= x1 -4.3e+114)
(+ x1 (+ 9.0 (+ x1 (* 4.0 (* -3.0 (* x1 x2))))))
(if (<= x1 -3.7e-218)
t_0
(if (<= x1 6.5e-180)
(* x2 -6.0)
(if (<= x1 1.58e+140)
t_0
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 5.0));
double tmp;
if (x1 <= -4.3e+114) {
tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
} else if (x1 <= -3.7e-218) {
tmp = t_0;
} else if (x1 <= 6.5e-180) {
tmp = x2 * -6.0;
} else if (x1 <= 1.58e+140) {
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 = (x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 5.0d0))
if (x1 <= (-4.3d+114)) then
tmp = x1 + (9.0d0 + (x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))))
else if (x1 <= (-3.7d-218)) then
tmp = t_0
else if (x1 <= 6.5d-180) then
tmp = x2 * (-6.0d0)
else if (x1 <= 1.58d+140) 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 = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 5.0));
double tmp;
if (x1 <= -4.3e+114) {
tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
} else if (x1 <= -3.7e-218) {
tmp = t_0;
} else if (x1 <= 6.5e-180) {
tmp = x2 * -6.0;
} else if (x1 <= 1.58e+140) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 5.0)) tmp = 0 if x1 <= -4.3e+114: tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2))))) elif x1 <= -3.7e-218: tmp = t_0 elif x1 <= 6.5e-180: tmp = x2 * -6.0 elif x1 <= 1.58e+140: tmp = t_0 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 5.0))) tmp = 0.0 if (x1 <= -4.3e+114) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))))); elseif (x1 <= -3.7e-218) tmp = t_0; elseif (x1 <= 6.5e-180) tmp = Float64(x2 * -6.0); elseif (x1 <= 1.58e+140) 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 = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 5.0)); tmp = 0.0; if (x1 <= -4.3e+114) tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2))))); elseif (x1 <= -3.7e-218) tmp = t_0; elseif (x1 <= 6.5e-180) tmp = x2 * -6.0; elseif (x1 <= 1.58e+140) 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[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.3e+114], N[(x1 + N[(9.0 + N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.7e-218], t$95$0, If[LessEqual[x1, 6.5e-180], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 1.58e+140], 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 := x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 5\right)\\
\mathbf{if}\;x1 \leq -4.3 \cdot 10^{+114}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -3.7 \cdot 10^{-218}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{-180}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 1.58 \cdot 10^{+140}:\\
\;\;\;\;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 < -4.3000000000000001e114Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x1 around inf 20.3%
if -4.3000000000000001e114 < x1 < -3.7000000000000002e-218 or 6.50000000000000013e-180 < x1 < 1.58000000000000004e140Initial program 96.5%
Taylor expanded in x1 around inf 75.2%
Taylor expanded in x1 around 0 41.4%
Taylor expanded in x1 around 0 41.4%
if -3.7000000000000002e-218 < x1 < 6.50000000000000013e-180Initial program 97.6%
Taylor expanded in x1 around 0 79.3%
Taylor expanded in x1 around 0 85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in x1 around 0 85.9%
if 1.58000000000000004e140 < x1 Initial program 2.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 6.0%
*-commutative6.0%
Simplified6.0%
flip-+75.1%
Applied egg-rr75.1%
swap-sqr75.1%
metadata-eval75.1%
*-commutative75.1%
Simplified75.1%
Final simplification51.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
(if (<= x1 -9e+113)
(+ x1 (+ 9.0 (+ x1 (* 4.0 (* -3.0 (* x1 x2))))))
(if (<= x1 -9e-119)
(* x1 (- t_0 2.0))
(if (<= x1 1.9e-57) (* x2 -6.0) (+ x1 (* x1 (+ 1.0 t_0))))))))
double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double tmp;
if (x1 <= -9e+113) {
tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
} else if (x1 <= -9e-119) {
tmp = x1 * (t_0 - 2.0);
} else if (x1 <= 1.9e-57) {
tmp = x2 * -6.0;
} else {
tmp = x1 + (x1 * (1.0 + t_0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))
if (x1 <= (-9d+113)) then
tmp = x1 + (9.0d0 + (x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))))
else if (x1 <= (-9d-119)) then
tmp = x1 * (t_0 - 2.0d0)
else if (x1 <= 1.9d-57) then
tmp = x2 * (-6.0d0)
else
tmp = x1 + (x1 * (1.0d0 + t_0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0));
double tmp;
if (x1 <= -9e+113) {
tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
} else if (x1 <= -9e-119) {
tmp = x1 * (t_0 - 2.0);
} else if (x1 <= 1.9e-57) {
tmp = x2 * -6.0;
} else {
tmp = x1 + (x1 * (1.0 + t_0));
}
return tmp;
}
def code(x1, x2): t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0)) tmp = 0 if x1 <= -9e+113: tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2))))) elif x1 <= -9e-119: tmp = x1 * (t_0 - 2.0) elif x1 <= 1.9e-57: tmp = x2 * -6.0 else: tmp = x1 + (x1 * (1.0 + t_0)) return tmp
function code(x1, x2) t_0 = Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) tmp = 0.0 if (x1 <= -9e+113) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))))); elseif (x1 <= -9e-119) tmp = Float64(x1 * Float64(t_0 - 2.0)); elseif (x1 <= 1.9e-57) tmp = Float64(x2 * -6.0); else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + t_0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 4.0 * (x2 * ((2.0 * x2) - 3.0)); tmp = 0.0; if (x1 <= -9e+113) tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2))))); elseif (x1 <= -9e-119) tmp = x1 * (t_0 - 2.0); elseif (x1 <= 1.9e-57) tmp = x2 * -6.0; else tmp = x1 + (x1 * (1.0 + t_0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -9e+113], N[(x1 + N[(9.0 + N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -9e-119], N[(x1 * N[(t$95$0 - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.9e-57], N[(x2 * -6.0), $MachinePrecision], N[(x1 + N[(x1 * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\\
\mathbf{if}\;x1 \leq -9 \cdot 10^{+113}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -9 \cdot 10^{-119}:\\
\;\;\;\;x1 \cdot \left(t_0 - 2\right)\\
\mathbf{elif}\;x1 \leq 1.9 \cdot 10^{-57}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + t_0\right)\\
\end{array}
\end{array}
if x1 < -9.0000000000000001e113Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x1 around inf 20.3%
if -9.0000000000000001e113 < x1 < -9.0000000000000005e-119Initial program 92.6%
Taylor expanded in x1 around inf 67.9%
Taylor expanded in x1 around 0 31.6%
Taylor expanded in x1 around inf 27.3%
if -9.0000000000000005e-119 < x1 < 1.8999999999999999e-57Initial program 98.4%
Taylor expanded in x1 around 0 85.6%
Taylor expanded in x1 around 0 66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in x1 around 0 67.1%
if 1.8999999999999999e-57 < x1 Initial program 53.0%
Taylor expanded in x1 around 0 23.2%
Taylor expanded in x1 around inf 37.4%
Final simplification43.4%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -5.5e+158) (not (<= x2 9.8e+109))) (+ x1 (* (* x2 x2) (* x1 8.0))) (/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -5.5e+158) || !(x2 <= 9.8e+109)) {
tmp = x1 + ((x2 * x2) * (x1 * 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) :: tmp
if ((x2 <= (-5.5d+158)) .or. (.not. (x2 <= 9.8d+109))) then
tmp = x1 + ((x2 * x2) * (x1 * 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 tmp;
if ((x2 <= -5.5e+158) || !(x2 <= 9.8e+109)) {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -5.5e+158) or not (x2 <= 9.8e+109): tmp = x1 + ((x2 * x2) * (x1 * 8.0)) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -5.5e+158) || !(x2 <= 9.8e+109)) tmp = Float64(x1 + Float64(Float64(x2 * x2) * Float64(x1 * 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) tmp = 0.0; if ((x2 <= -5.5e+158) || ~((x2 <= 9.8e+109))) tmp = x1 + ((x2 * x2) * (x1 * 8.0)); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -5.5e+158], N[Not[LessEqual[x2, 9.8e+109]], $MachinePrecision]], N[(x1 + N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $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}
\mathbf{if}\;x2 \leq -5.5 \cdot 10^{+158} \lor \neg \left(x2 \leq 9.8 \cdot 10^{+109}\right):\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x2 < -5.4999999999999998e158 or 9.8000000000000007e109 < x2 Initial program 72.1%
Taylor expanded in x1 around 0 43.4%
Taylor expanded in x2 around inf 54.4%
associate-*r*54.4%
unpow254.4%
Simplified54.4%
if -5.4999999999999998e158 < x2 < 9.8000000000000007e109Initial program 71.8%
Taylor expanded in x1 around 0 49.0%
Taylor expanded in x1 around 0 29.3%
*-commutative29.3%
Simplified29.3%
flip-+43.0%
Applied egg-rr43.0%
swap-sqr42.9%
metadata-eval42.9%
*-commutative42.9%
Simplified42.9%
Final simplification45.8%
(FPCore (x1 x2)
:precision binary64
(if (<= x2 -8.2e+157)
(+ x1 (* (* x2 x2) (* x1 8.0)))
(if (<= x2 4.6e+110)
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))
(+ x1 (+ 9.0 (- x1 (/ (+ 3.0 (* (* x2 x2) -8.0)) x1)))))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -8.2e+157) {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
} else if (x2 <= 4.6e+110) {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
} else {
tmp = x1 + (9.0 + (x1 - ((3.0 + ((x2 * x2) * -8.0)) / x1)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-8.2d+157)) then
tmp = x1 + ((x2 * x2) * (x1 * 8.0d0))
else if (x2 <= 4.6d+110) then
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
else
tmp = x1 + (9.0d0 + (x1 - ((3.0d0 + ((x2 * x2) * (-8.0d0))) / x1)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -8.2e+157) {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
} else if (x2 <= 4.6e+110) {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
} else {
tmp = x1 + (9.0 + (x1 - ((3.0 + ((x2 * x2) * -8.0)) / x1)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -8.2e+157: tmp = x1 + ((x2 * x2) * (x1 * 8.0)) elif x2 <= 4.6e+110: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) else: tmp = x1 + (9.0 + (x1 - ((3.0 + ((x2 * x2) * -8.0)) / x1))) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -8.2e+157) tmp = Float64(x1 + Float64(Float64(x2 * x2) * Float64(x1 * 8.0))); elseif (x2 <= 4.6e+110) tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(9.0 + Float64(x1 - Float64(Float64(3.0 + Float64(Float64(x2 * x2) * -8.0)) / x1)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -8.2e+157) tmp = x1 + ((x2 * x2) * (x1 * 8.0)); elseif (x2 <= 4.6e+110) tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); else tmp = x1 + (9.0 + (x1 - ((3.0 + ((x2 * x2) * -8.0)) / x1))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -8.2e+157], N[(x1 + N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 4.6e+110], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(9.0 + N[(x1 - N[(N[(3.0 + N[(N[(x2 * x2), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -8.2 \cdot 10^{+157}:\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
\mathbf{elif}\;x2 \leq 4.6 \cdot 10^{+110}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(9 + \left(x1 - \frac{3 + \left(x2 \cdot x2\right) \cdot -8}{x1}\right)\right)\\
\end{array}
\end{array}
if x2 < -8.20000000000000032e157Initial program 73.7%
Taylor expanded in x1 around 0 42.0%
Taylor expanded in x2 around inf 55.0%
associate-*r*55.0%
unpow255.0%
Simplified55.0%
if -8.20000000000000032e157 < x2 < 4.6e110Initial program 71.8%
Taylor expanded in x1 around 0 49.0%
Taylor expanded in x1 around 0 29.3%
*-commutative29.3%
Simplified29.3%
flip-+43.0%
Applied egg-rr43.0%
swap-sqr42.9%
metadata-eval42.9%
*-commutative42.9%
Simplified42.9%
if 4.6e110 < x2 Initial program 71.2%
Taylor expanded in x2 around inf 48.4%
associate-/l*48.4%
+-commutative48.4%
unpow248.4%
fma-udef48.4%
unpow248.4%
Simplified48.4%
Taylor expanded in x1 around inf 4.7%
+-commutative4.7%
mul-1-neg4.7%
unsub-neg4.7%
unpow24.7%
associate-/l*4.9%
unpow24.9%
Simplified4.9%
Taylor expanded in x1 around -inf 55.9%
mul-1-neg55.9%
*-commutative55.9%
unpow255.9%
Simplified55.9%
Final simplification46.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -3.1e+119)
(+ x1 (+ 9.0 (+ x1 (* 4.0 (* -3.0 (* x1 x2))))))
(if (<= x1 -1.15e-118)
(* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))
(if (<= x1 5.5e-57) (* x2 -6.0) (+ x1 (* (* x2 x2) (* x1 8.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -3.1e+119) {
tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
} else if (x1 <= -1.15e-118) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0);
} else if (x1 <= 5.5e-57) {
tmp = x2 * -6.0;
} else {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-3.1d+119)) then
tmp = x1 + (9.0d0 + (x1 + (4.0d0 * ((-3.0d0) * (x1 * x2)))))
else if (x1 <= (-1.15d-118)) then
tmp = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)
else if (x1 <= 5.5d-57) then
tmp = x2 * (-6.0d0)
else
tmp = x1 + ((x2 * x2) * (x1 * 8.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -3.1e+119) {
tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2)))));
} else if (x1 <= -1.15e-118) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0);
} else if (x1 <= 5.5e-57) {
tmp = x2 * -6.0;
} else {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -3.1e+119: tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2))))) elif x1 <= -1.15e-118: tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0) elif x1 <= 5.5e-57: tmp = x2 * -6.0 else: tmp = x1 + ((x2 * x2) * (x1 * 8.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -3.1e+119) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(4.0 * Float64(-3.0 * Float64(x1 * x2)))))); elseif (x1 <= -1.15e-118) tmp = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)); elseif (x1 <= 5.5e-57) tmp = Float64(x2 * -6.0); else tmp = Float64(x1 + Float64(Float64(x2 * x2) * Float64(x1 * 8.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -3.1e+119) tmp = x1 + (9.0 + (x1 + (4.0 * (-3.0 * (x1 * x2))))); elseif (x1 <= -1.15e-118) tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0); elseif (x1 <= 5.5e-57) tmp = x2 * -6.0; else tmp = x1 + ((x2 * x2) * (x1 * 8.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -3.1e+119], N[(x1 + N[(9.0 + N[(x1 + N[(4.0 * N[(-3.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.15e-118], N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.5e-57], N[(x2 * -6.0), $MachinePrecision], N[(x1 + N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.1 \cdot 10^{+119}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + 4 \cdot \left(-3 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.15 \cdot 10^{-118}:\\
\;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\\
\mathbf{elif}\;x1 \leq 5.5 \cdot 10^{-57}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
\end{array}
\end{array}
if x1 < -3.09999999999999995e119Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x1 around inf 20.3%
if -3.09999999999999995e119 < x1 < -1.1500000000000001e-118Initial program 92.6%
Taylor expanded in x1 around inf 67.9%
Taylor expanded in x1 around 0 31.6%
Taylor expanded in x1 around inf 27.3%
if -1.1500000000000001e-118 < x1 < 5.50000000000000011e-57Initial program 98.4%
Taylor expanded in x1 around 0 85.6%
Taylor expanded in x1 around 0 66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in x1 around 0 67.1%
if 5.50000000000000011e-57 < x1 Initial program 53.0%
Taylor expanded in x1 around 0 23.2%
Taylor expanded in x2 around inf 37.4%
associate-*r*37.4%
unpow237.4%
Simplified37.4%
Final simplification43.4%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -1.2e-118) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0)) (if (<= x1 2e-57) (* x2 -6.0) (+ x1 (* (* x2 x2) (* x1 8.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.2e-118) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0);
} else if (x1 <= 2e-57) {
tmp = x2 * -6.0;
} else {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.2d-118)) then
tmp = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)
else if (x1 <= 2d-57) then
tmp = x2 * (-6.0d0)
else
tmp = x1 + ((x2 * x2) * (x1 * 8.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.2e-118) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0);
} else if (x1 <= 2e-57) {
tmp = x2 * -6.0;
} else {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.2e-118: tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0) elif x1 <= 2e-57: tmp = x2 * -6.0 else: tmp = x1 + ((x2 * x2) * (x1 * 8.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.2e-118) tmp = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)); elseif (x1 <= 2e-57) tmp = Float64(x2 * -6.0); else tmp = Float64(x1 + Float64(Float64(x2 * x2) * Float64(x1 * 8.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.2e-118) tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0); elseif (x1 <= 2e-57) tmp = x2 * -6.0; else tmp = x1 + ((x2 * x2) * (x1 * 8.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.2e-118], N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e-57], N[(x2 * -6.0), $MachinePrecision], N[(x1 + N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.2 \cdot 10^{-118}:\\
\;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{-57}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
\end{array}
\end{array}
if x1 < -1.2000000000000001e-118Initial program 61.1%
Taylor expanded in x1 around inf 44.7%
Taylor expanded in x1 around 0 21.1%
Taylor expanded in x1 around inf 19.0%
if -1.2000000000000001e-118 < x1 < 1.99999999999999991e-57Initial program 98.4%
Taylor expanded in x1 around 0 85.6%
Taylor expanded in x1 around 0 66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in x1 around 0 67.1%
if 1.99999999999999991e-57 < x1 Initial program 53.0%
Taylor expanded in x1 around 0 23.2%
Taylor expanded in x2 around inf 37.4%
associate-*r*37.4%
unpow237.4%
Simplified37.4%
Final simplification41.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -3.5e-114) (not (<= x1 7.8e-57))) (+ x1 (* (* x2 x2) (* x1 8.0))) (* x2 -6.0)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -3.5e-114) || !(x1 <= 7.8e-57)) {
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 <= (-3.5d-114)) .or. (.not. (x1 <= 7.8d-57))) 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 <= -3.5e-114) || !(x1 <= 7.8e-57)) {
tmp = x1 + ((x2 * x2) * (x1 * 8.0));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -3.5e-114) or not (x1 <= 7.8e-57): tmp = x1 + ((x2 * x2) * (x1 * 8.0)) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -3.5e-114) || !(x1 <= 7.8e-57)) 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 <= -3.5e-114) || ~((x1 <= 7.8e-57))) tmp = x1 + ((x2 * x2) * (x1 * 8.0)); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -3.5e-114], N[Not[LessEqual[x1, 7.8e-57]], $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 -3.5 \cdot 10^{-114} \lor \neg \left(x1 \leq 7.8 \cdot 10^{-57}\right):\\
\;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -3.5e-114 or 7.80000000000000013e-57 < x1 Initial program 56.9%
Taylor expanded in x1 around 0 26.0%
Taylor expanded in x2 around inf 25.3%
associate-*r*25.3%
unpow225.3%
Simplified25.3%
if -3.5e-114 < x1 < 7.80000000000000013e-57Initial program 98.4%
Taylor expanded in x1 around 0 85.8%
Taylor expanded in x1 around 0 65.4%
*-commutative65.4%
Simplified65.4%
Taylor expanded in x1 around 0 65.8%
Final simplification39.9%
(FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x2 * (-6.0d0))
end function
public static double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
def code(x1, x2): return x1 + (x2 * -6.0)
function code(x1, x2) return Float64(x1 + Float64(x2 * -6.0)) end
function tmp = code(x1, x2) tmp = x1 + (x2 * -6.0); end
code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + x2 \cdot -6
\end{array}
Initial program 71.8%
Taylor expanded in x1 around 0 47.5%
Taylor expanded in x1 around 0 26.6%
*-commutative26.6%
Simplified26.6%
Final simplification26.6%
(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 71.8%
Taylor expanded in x1 around 0 47.5%
Taylor expanded in x1 around 0 26.6%
*-commutative26.6%
Simplified26.6%
Taylor expanded in x1 around 0 26.5%
Final simplification26.5%
(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 71.8%
Taylor expanded in x1 around 0 47.5%
Taylor expanded in x1 around 0 26.6%
*-commutative26.6%
Simplified26.6%
Taylor expanded in x1 around inf 3.3%
Final simplification3.3%
herbie shell --seed 2023285
(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))))))