
(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 23 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) (- (* x2 2.0) x1)) (fma x1 x1 1.0))))
(if (<= x1 -3.1e+107)
(+
x1
(+
(+ x1 (+ (* 6.0 (pow x1 4.0)) (* -3.0 (pow x1 3.0))))
(* 3.0 (* x2 -2.0))))
(if (<= x1 2e+151)
(+
x1
(fma
3.0
(- (* x2 -2.0) x1)
(+
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))))
(* (* x1 x1) (+ x1 9.0))))))
(+ x1 (fma -2.0 x1 (* (* x1 x1) 9.0)))))))
double code(double x1, double x2) {
double t_0 = fma(x1, (x1 * 3.0), ((x2 * 2.0) - x1)) / fma(x1, x1, 1.0);
double tmp;
if (x1 <= -3.1e+107) {
tmp = x1 + ((x1 + ((6.0 * pow(x1, 4.0)) + (-3.0 * pow(x1, 3.0)))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 2e+151) {
tmp = x1 + fma(3.0, ((x2 * -2.0) - x1), (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)))), ((x1 * x1) * (x1 + 9.0)))));
} else {
tmp = x1 + fma(-2.0, x1, ((x1 * x1) * 9.0));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(fma(x1, Float64(x1 * 3.0), Float64(Float64(x2 * 2.0) - x1)) / fma(x1, x1, 1.0)) tmp = 0.0 if (x1 <= -3.1e+107) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(6.0 * (x1 ^ 4.0)) + Float64(-3.0 * (x1 ^ 3.0)))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 2e+151) tmp = Float64(x1 + fma(3.0, Float64(Float64(x2 * -2.0) - x1), 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)))), Float64(Float64(x1 * x1) * Float64(x1 + 9.0)))))); else tmp = Float64(x1 + fma(-2.0, x1, Float64(Float64(x1 * x1) * 9.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(N[(x2 * 2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.1e+107], N[(x1 + N[(N[(x1 + N[(N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-3.0 * N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+151], N[(x1 + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $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[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(-2.0 * x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, x2 \cdot 2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 \leq -3.1 \cdot 10^{+107}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(6 \cdot {x1}^{4} + -3 \cdot {x1}^{3}\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+151}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, x2 \cdot -2 - x1, 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), \left(x1 \cdot x1\right) \cdot \left(x1 + 9\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(-2, x1, \left(x1 \cdot x1\right) \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -3.10000000000000026e107Initial program 0.0%
Taylor expanded in x1 around inf 19.6%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -3.10000000000000026e107 < x1 < 2.00000000000000003e151Initial program 98.7%
Simplified99.1%
Taylor expanded in x1 around inf 98.7%
+-commutative98.7%
cube-mult98.7%
unpow298.7%
distribute-rgt-out98.7%
unpow298.7%
Simplified98.7%
Taylor expanded in x1 around 0 99.1%
if 2.00000000000000003e151 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
associate-*r/0.0%
*-commutative0.0%
unpow20.0%
associate-*r*0.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
fma-def100.0%
*-commutative100.0%
unpow2100.0%
Simplified100.0%
Final simplification99.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (/ (- (+ (* x2 2.0) t_0) x1) t_1)))
(if (<= x1 -3.1e+107)
(+
x1
(+
(+ x1 (+ (* 6.0 (pow x1 4.0)) (* -3.0 (pow x1 3.0))))
(* 3.0 (* x2 -2.0))))
(if (<= x1 2e+151)
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(*
(*
(* x1 2.0)
(*
(- (fma (* x1 3.0) x1 (+ x2 x2)) x1)
(/ 1.0 (fma x1 x1 1.0))))
(- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))))
(+ x1 (fma -2.0 x1 (* (* x1 x1) 9.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = (((x2 * 2.0) + t_0) - x1) / t_1;
double tmp;
if (x1 <= -3.1e+107) {
tmp = x1 + ((x1 + ((6.0 * pow(x1, 4.0)) + (-3.0 * pow(x1, 3.0)))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 2e+151) {
tmp = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * ((fma((x1 * 3.0), x1, (x2 + x2)) - x1) * (1.0 / fma(x1, x1, 1.0)))) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)));
} else {
tmp = x1 + fma(-2.0, x1, ((x1 * x1) * 9.0));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(1.0 + Float64(x1 * x1)) t_2 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_0) - x1) / t_1) tmp = 0.0 if (x1 <= -3.1e+107) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(6.0 * (x1 ^ 4.0)) + Float64(-3.0 * (x1 ^ 3.0)))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 2e+151) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(fma(Float64(x1 * 3.0), x1, Float64(x2 + x2)) - x1) * Float64(1.0 / fma(x1, x1, 1.0)))) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)))); else tmp = Float64(x1 + fma(-2.0, x1, Float64(Float64(x1 * x1) * 9.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -3.1e+107], N[(x1 + N[(N[(x1 + N[(N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-3.0 * N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+151], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * x1 + N[(x2 + x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] * N[(1.0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(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[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(-2.0 * x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $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(x2 \cdot 2 + t_0\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -3.1 \cdot 10^{+107}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(6 \cdot {x1}^{4} + -3 \cdot {x1}^{3}\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+151}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \left(\left(\mathsf{fma}\left(x1 \cdot 3, x1, x2 + x2\right) - x1\right) \cdot \frac{1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + t_0 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(-2, x1, \left(x1 \cdot x1\right) \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -3.10000000000000026e107Initial program 0.0%
Taylor expanded in x1 around inf 19.6%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -3.10000000000000026e107 < x1 < 2.00000000000000003e151Initial program 98.7%
fma-def98.7%
div-inv98.7%
fma-def98.7%
count-298.7%
Applied egg-rr98.7%
if 2.00000000000000003e151 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
associate-*r/0.0%
*-commutative0.0%
unpow20.0%
associate-*r*0.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
fma-def100.0%
*-commutative100.0%
unpow2100.0%
Simplified100.0%
Final simplification99.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ (* x2 2.0) t_1) x1) t_0))
(t_3
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_2)
(*
t_0
(+
(* (* x1 x1) (- (* 4.0 t_2) 6.0))
(* (- t_2 3.0) (* (* x1 2.0) t_2)))))))))))
(if (<= t_3 INFINITY) t_3 (+ x1 (fma -2.0 x1 (* (* x1 x1) 9.0))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((x2 * 2.0) + t_1) - x1) / t_0;
double t_3 = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * t_2))))))));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 + fma(-2.0, x1, ((x1 * x1) * 9.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(x2 * 2.0) + t_1) - x1) / t_0) t_3 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * t_2) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)) + Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * t_2))))))))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 + fma(-2.0, x1, Float64(Float64(x1 * x1) * 9.0))); 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[(x2 * 2.0), $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[(x2 * 2.0), $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[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 + N[(-2.0 * x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.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(x2 \cdot 2 + t_1\right) - x1}{t_0}\\
t_3 := x1 + \left(3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot t_2 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right) + \left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t_2\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;t_3 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(-2, x1, \left(x1 \cdot x1\right) \cdot 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.2%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
associate-*r/0.0%
*-commutative0.0%
unpow20.0%
associate-*r*0.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 87.7%
fma-def87.7%
*-commutative87.7%
unpow287.7%
Simplified87.7%
Final simplification95.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ 1.0 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ (* x2 2.0) t_1) x1) t_0)))
(if (<= x1 -3.1e+107)
(+
x1
(+
(+ x1 (+ (* 6.0 (pow x1 4.0)) (* -3.0 (pow x1 3.0))))
(* 3.0 (* x2 -2.0))))
(if (<= x1 2e+151)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_2)
(*
t_0
(+
(* (* x1 x1) (- (* 4.0 t_2) 6.0))
(* (- t_2 3.0) (* (* x1 2.0) t_2)))))))))
(+ x1 (fma -2.0 x1 (* (* x1 x1) 9.0)))))))
double code(double x1, double x2) {
double t_0 = 1.0 + (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (((x2 * 2.0) + t_1) - x1) / t_0;
double tmp;
if (x1 <= -3.1e+107) {
tmp = x1 + ((x1 + ((6.0 * pow(x1, 4.0)) + (-3.0 * pow(x1, 3.0)))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 2e+151) {
tmp = x1 + ((3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_2) + (t_0 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * t_2))))))));
} else {
tmp = x1 + fma(-2.0, x1, ((x1 * x1) * 9.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(x2 * 2.0) + t_1) - x1) / t_0) tmp = 0.0 if (x1 <= -3.1e+107) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(6.0 * (x1 ^ 4.0)) + Float64(-3.0 * (x1 ^ 3.0)))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 2e+151) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * t_2) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)) + Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * t_2))))))))); else tmp = Float64(x1 + fma(-2.0, x1, Float64(Float64(x1 * x1) * 9.0))); 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[(x2 * 2.0), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -3.1e+107], N[(x1 + N[(N[(x1 + N[(N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-3.0 * N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+151], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * t$95$2), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(-2.0 * x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.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(x2 \cdot 2 + t_1\right) - x1}{t_0}\\
\mathbf{if}\;x1 \leq -3.1 \cdot 10^{+107}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(6 \cdot {x1}^{4} + -3 \cdot {x1}^{3}\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+151}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot t_2 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right) + \left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t_2\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(-2, x1, \left(x1 \cdot x1\right) \cdot 9\right)\\
\end{array}
\end{array}
if x1 < -3.10000000000000026e107Initial program 0.0%
Taylor expanded in x1 around inf 19.6%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -3.10000000000000026e107 < x1 < 2.00000000000000003e151Initial program 98.7%
if 2.00000000000000003e151 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
associate-*r/0.0%
*-commutative0.0%
unpow20.0%
associate-*r*0.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
fma-def100.0%
*-commutative100.0%
unpow2100.0%
Simplified100.0%
Final simplification99.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (fma -2.0 x1 (* (* x1 x1) 9.0))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ 1.0 (* x1 x1)))
(t_3 (* 3.0 (/ (- (- t_1 (* x2 2.0)) x1) t_2)))
(t_4 (/ (- (+ (* x2 2.0) t_1) x1) t_2)))
(if (<= x1 -5e+159)
t_0
(if (<= x1 -3.1e+107)
(+ x1 (+ t_3 (+ x1 (* -3.0 (pow x1 3.0)))))
(if (<= x1 2e+151)
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_4)
(*
t_2
(+
(* (* x1 x1) (- (* 4.0 t_4) 6.0))
(* (- t_4 3.0) (* (* x1 2.0) t_4)))))))))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 + fma(-2.0, x1, ((x1 * x1) * 9.0));
double t_1 = x1 * (x1 * 3.0);
double t_2 = 1.0 + (x1 * x1);
double t_3 = 3.0 * (((t_1 - (x2 * 2.0)) - x1) / t_2);
double t_4 = (((x2 * 2.0) + t_1) - x1) / t_2;
double tmp;
if (x1 <= -5e+159) {
tmp = t_0;
} else if (x1 <= -3.1e+107) {
tmp = x1 + (t_3 + (x1 + (-3.0 * pow(x1, 3.0))));
} else if (x1 <= 2e+151) {
tmp = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_4) + (t_2 * (((x1 * x1) * ((4.0 * t_4) - 6.0)) + ((t_4 - 3.0) * ((x1 * 2.0) * t_4))))))));
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 + fma(-2.0, x1, Float64(Float64(x1 * x1) * 9.0))) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(1.0 + Float64(x1 * x1)) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(x2 * 2.0)) - x1) / t_2)) t_4 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_1) - x1) / t_2) tmp = 0.0 if (x1 <= -5e+159) tmp = t_0; elseif (x1 <= -3.1e+107) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(-3.0 * (x1 ^ 3.0))))); elseif (x1 <= 2e+151) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * t_4) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0)) + Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * t_4))))))))); else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(-2.0 * x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$1), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -5e+159], t$95$0, If[LessEqual[x1, -3.1e+107], N[(x1 + N[(t$95$3 + N[(x1 + N[(-3.0 * N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+151], N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * t$95$4), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \mathsf{fma}\left(-2, x1, \left(x1 \cdot x1\right) \cdot 9\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 1 + x1 \cdot x1\\
t_3 := 3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_2}\\
t_4 := \frac{\left(x2 \cdot 2 + t_1\right) - x1}{t_2}\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+159}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -3.1 \cdot 10^{+107}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + -3 \cdot {x1}^{3}\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+151}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot t_4 + t_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right) + \left(t_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t_4\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x1 < -5.00000000000000003e159 or 2.00000000000000003e151 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
associate-*r/0.0%
*-commutative0.0%
unpow20.0%
associate-*r*0.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 100.0%
fma-def100.0%
*-commutative100.0%
unpow2100.0%
Simplified100.0%
if -5.00000000000000003e159 < x1 < -3.10000000000000026e107Initial program 0.0%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -3.10000000000000026e107 < x1 < 2.00000000000000003e151Initial program 98.7%
Final simplification99.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (/ (- (+ (* x2 2.0) t_0) x1) t_1)))
(if (or (<= x1 -1.55e+109) (not (<= x1 2e+151)))
(+ x1 (fma -2.0 x1 (* (* x1 x1) 9.0)))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_1
(+
(* (* x1 x1) (- (* 4.0 t_2) 6.0))
(* (- t_2 3.0) (* (* x1 2.0) t_2))))
(* 3.0 t_0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = (((x2 * 2.0) + t_0) - x1) / t_1;
double tmp;
if ((x1 <= -1.55e+109) || !(x1 <= 2e+151)) {
tmp = x1 + fma(-2.0, x1, ((x1 * x1) * 9.0));
} else {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * t_2)))) + (3.0 * t_0)))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(1.0 + Float64(x1 * x1)) t_2 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_0) - x1) / t_1) tmp = 0.0 if ((x1 <= -1.55e+109) || !(x1 <= 2e+151)) tmp = Float64(x1 + fma(-2.0, x1, Float64(Float64(x1 * x1) * 9.0))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)) + Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * t_2)))) + Float64(3.0 * t_0)))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -1.55e+109], N[Not[LessEqual[x1, 2e+151]], $MachinePrecision]], N[(x1 + N[(-2.0 * x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * t$95$0), $MachinePrecision]), $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(x2 \cdot 2 + t_0\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -1.55 \cdot 10^{+109} \lor \neg \left(x1 \leq 2 \cdot 10^{+151}\right):\\
\;\;\;\;x1 + \mathsf{fma}\left(-2, x1, \left(x1 \cdot x1\right) \cdot 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right) + \left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t_2\right)\right) + 3 \cdot t_0\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.54999999999999996e109 or 2.00000000000000003e151 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
associate-*r/0.0%
*-commutative0.0%
unpow20.0%
associate-*r*0.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 88.8%
fma-def88.8%
*-commutative88.8%
unpow288.8%
Simplified88.8%
if -1.54999999999999996e109 < x1 < 2.00000000000000003e151Initial program 98.7%
Taylor expanded in x1 around inf 98.4%
Final simplification95.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (/ (- (+ (* x2 2.0) t_0) x1) t_1)))
(if (or (<= x1 -1.6e+109) (not (<= x1 5e+153)))
(+ x1 (fma -2.0 x1 (* (* x1 x1) 9.0)))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_1
(+
(* (* x1 x1) (- (* 4.0 t_2) 6.0))
(* (- t_2 3.0) (* (* x1 2.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 = (((x2 * 2.0) + t_0) - x1) / t_1;
double tmp;
if ((x1 <= -1.6e+109) || !(x1 <= 5e+153)) {
tmp = x1 + fma(-2.0, x1, ((x1 * x1) * 9.0));
} else {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.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(x2 * 2.0) + t_0) - x1) / t_1) tmp = 0.0 if ((x1 <= -1.6e+109) || !(x1 <= 5e+153)) tmp = Float64(x1 + fma(-2.0, x1, Float64(Float64(x1 * x1) * 9.0))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)) + Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(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[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -1.6e+109], N[Not[LessEqual[x1, 5e+153]], $MachinePrecision]], N[(x1 + N[(-2.0 * x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(x2 * 2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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(x2 \cdot 2 + t_0\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -1.6 \cdot 10^{+109} \lor \neg \left(x1 \leq 5 \cdot 10^{+153}\right):\\
\;\;\;\;x1 + \mathsf{fma}\left(-2, x1, \left(x1 \cdot x1\right) \cdot 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_0 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right) + \left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot 2 - x1\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.6000000000000001e109 or 5.00000000000000018e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
associate-*r/0.0%
*-commutative0.0%
unpow20.0%
associate-*r*0.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 88.8%
fma-def88.8%
*-commutative88.8%
unpow288.8%
Simplified88.8%
if -1.6000000000000001e109 < x1 < 5.00000000000000018e153Initial program 98.7%
Taylor expanded in x1 around 0 95.4%
Taylor expanded in x1 around inf 95.3%
Final simplification93.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (/ (- (+ (* x2 2.0) t_0) x1) t_1)))
(if (or (<= x1 -5.8e+107) (not (<= x1 2e+151)))
(+ x1 (fma -2.0 x1 (* (* x1 x1) 9.0)))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+ (* (- t_2 3.0) (* (* x1 2.0) t_2)) (* 6.0 (* x1 x1))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = (((x2 * 2.0) + t_0) - x1) / t_1;
double tmp;
if ((x1 <= -5.8e+107) || !(x1 <= 2e+151)) {
tmp = x1 + fma(-2.0, x1, ((x1 * x1) * 9.0));
} else {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 - 3.0) * ((x1 * 2.0) * t_2)) + (6.0 * (x1 * 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(x2 * 2.0) + t_0) - x1) / t_1) tmp = 0.0 if ((x1 <= -5.8e+107) || !(x1 <= 2e+151)) tmp = Float64(x1 + fma(-2.0, x1, Float64(Float64(x1 * x1) * 9.0))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * t_2)) + Float64(6.0 * Float64(x1 * 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[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -5.8e+107], N[Not[LessEqual[x1, 2e+151]], $MachinePrecision]], N[(x1 + N[(-2.0 * x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(6.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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(x2 \cdot 2 + t_0\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -5.8 \cdot 10^{+107} \lor \neg \left(x1 \leq 2 \cdot 10^{+151}\right):\\
\;\;\;\;x1 + \mathsf{fma}\left(-2, x1, \left(x1 \cdot x1\right) \cdot 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_2 + t_1 \cdot \left(\left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t_2\right) + 6 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.79999999999999975e107 or 2.00000000000000003e151 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 0.0%
associate-*r/0.0%
*-commutative0.0%
unpow20.0%
associate-*r*0.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 88.8%
fma-def88.8%
*-commutative88.8%
unpow288.8%
Simplified88.8%
if -5.79999999999999975e107 < x1 < 2.00000000000000003e151Initial program 98.7%
Taylor expanded in x1 around inf 97.1%
Final simplification94.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (/ (- (+ (* x2 2.0) t_0) x1) t_1)))
(if (<= x1 -3.1e+107)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 7.6e+153)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_1
(+
(* (* x1 x1) (- (* 4.0 t_2) 6.0))
(* (- t_2 3.0) (* (* x1 2.0) (- (* x2 2.0) x1))))))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = (((x2 * 2.0) + t_0) - x1) / t_1;
double tmp;
if (x1 <= -3.1e+107) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 7.6e+153) {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1)))))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 1.0d0 + (x1 * x1)
t_2 = (((x2 * 2.0d0) + t_0) - x1) / t_1
if (x1 <= (-3.1d+107)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= 7.6d+153) then
tmp = x1 + ((3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_1 * (((x1 * x1) * ((4.0d0 * t_2) - 6.0d0)) + ((t_2 - 3.0d0) * ((x1 * 2.0d0) * ((x2 * 2.0d0) - x1)))))))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = 1.0 + (x1 * x1);
double t_2 = (((x2 * 2.0) + t_0) - x1) / t_1;
double tmp;
if (x1 <= -3.1e+107) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 7.6e+153) {
tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1)))))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = 1.0 + (x1 * x1) t_2 = (((x2 * 2.0) + t_0) - x1) / t_1 tmp = 0 if x1 <= -3.1e+107: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= 7.6e+153: tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1))))))))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(1.0 + Float64(x1 * x1)) t_2 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_0) - x1) / t_1) tmp = 0.0 if (x1 <= -3.1e+107) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= 7.6e+153) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0)) + Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(x2 * 2.0) - x1)))))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = 1.0 + (x1 * x1); t_2 = (((x2 * 2.0) + t_0) - x1) / t_1; tmp = 0.0; if (x1 <= -3.1e+107) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= 7.6e+153) tmp = x1 + ((3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * ((4.0 * t_2) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((x2 * 2.0) - x1))))))))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -3.1e+107], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.6e+153], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(x2 * 2.0), $MachinePrecision] - x1), $MachinePrecision]), $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 := 1 + x1 \cdot x1\\
t_2 := \frac{\left(x2 \cdot 2 + t_0\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -3.1 \cdot 10^{+107}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_0 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right) + \left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot 2 - x1\right)\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 < -3.10000000000000026e107Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 2.2%
*-commutative2.2%
*-commutative2.2%
associate-*l*2.2%
Simplified2.2%
Taylor expanded in x1 around 0 25.1%
if -3.10000000000000026e107 < x1 < 7.59999999999999933e153Initial program 98.7%
Taylor expanded in x1 around 0 95.4%
Taylor expanded in x1 around inf 95.3%
if 7.59999999999999933e153 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.6%
*-commutative5.6%
Simplified5.6%
flip-+77.4%
Applied egg-rr77.4%
swap-sqr77.4%
metadata-eval77.4%
Simplified77.4%
Final simplification79.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* 3.0 (/ (- (- t_2 (* x2 2.0)) x1) t_1)))
(t_4 (/ (- (+ (* x2 2.0) t_2) x1) t_1))
(t_5 (* (* x1 x1) (- (* 4.0 t_4) 6.0))))
(if (<= x1 -5.5e+102)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 -5500000000.0)
(+
x1
(+
t_3
(+
x1
(+
t_0
(+
(* t_2 t_4)
(* t_1 (+ t_5 (* (* (* x1 2.0) (- (* x2 2.0) x1)) 0.0))))))))
(if (<= x1 1950.0)
(+ x1 (+ t_3 (+ x1 (* 4.0 (* 2.0 (* x2 (* x1 x2)))))))
(if (<= x1 1.35e+154)
(+
x1
(+ t_3 (+ x1 (+ t_0 (+ (* 3.0 t_2) (* t_1 (+ (* x1 2.0) t_5)))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = 1.0 + (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_1);
double t_4 = (((x2 * 2.0) + t_2) - x1) / t_1;
double t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0);
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -5500000000.0) {
tmp = x1 + (t_3 + (x1 + (t_0 + ((t_2 * t_4) + (t_1 * (t_5 + (((x1 * 2.0) * ((x2 * 2.0) - x1)) * 0.0)))))));
} else if (x1 <= 1950.0) {
tmp = x1 + (t_3 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else if (x1 <= 1.35e+154) {
tmp = x1 + (t_3 + (x1 + (t_0 + ((3.0 * t_2) + (t_1 * ((x1 * 2.0) + 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 * x1)
t_1 = 1.0d0 + (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = 3.0d0 * (((t_2 - (x2 * 2.0d0)) - x1) / t_1)
t_4 = (((x2 * 2.0d0) + t_2) - x1) / t_1
t_5 = (x1 * x1) * ((4.0d0 * t_4) - 6.0d0)
if (x1 <= (-5.5d+102)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= (-5500000000.0d0)) then
tmp = x1 + (t_3 + (x1 + (t_0 + ((t_2 * t_4) + (t_1 * (t_5 + (((x1 * 2.0d0) * ((x2 * 2.0d0) - x1)) * 0.0d0)))))))
else if (x1 <= 1950.0d0) then
tmp = x1 + (t_3 + (x1 + (4.0d0 * (2.0d0 * (x2 * (x1 * x2))))))
else if (x1 <= 1.35d+154) then
tmp = x1 + (t_3 + (x1 + (t_0 + ((3.0d0 * t_2) + (t_1 * ((x1 * 2.0d0) + 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 * x1);
double t_1 = 1.0 + (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_1);
double t_4 = (((x2 * 2.0) + t_2) - x1) / t_1;
double t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0);
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -5500000000.0) {
tmp = x1 + (t_3 + (x1 + (t_0 + ((t_2 * t_4) + (t_1 * (t_5 + (((x1 * 2.0) * ((x2 * 2.0) - x1)) * 0.0)))))));
} else if (x1 <= 1950.0) {
tmp = x1 + (t_3 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else if (x1 <= 1.35e+154) {
tmp = x1 + (t_3 + (x1 + (t_0 + ((3.0 * t_2) + (t_1 * ((x1 * 2.0) + t_5))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = 1.0 + (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_1) t_4 = (((x2 * 2.0) + t_2) - x1) / t_1 t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0) tmp = 0 if x1 <= -5.5e+102: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= -5500000000.0: tmp = x1 + (t_3 + (x1 + (t_0 + ((t_2 * t_4) + (t_1 * (t_5 + (((x1 * 2.0) * ((x2 * 2.0) - x1)) * 0.0))))))) elif x1 <= 1950.0: tmp = x1 + (t_3 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))) elif x1 <= 1.35e+154: tmp = x1 + (t_3 + (x1 + (t_0 + ((3.0 * t_2) + (t_1 * ((x1 * 2.0) + 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 * x1)) t_1 = Float64(1.0 + Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(x2 * 2.0)) - x1) / t_1)) t_4 = Float64(Float64(Float64(Float64(x2 * 2.0) + t_2) - x1) / t_1) t_5 = Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0)) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= -5500000000.0) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(Float64(t_2 * t_4) + Float64(t_1 * Float64(t_5 + Float64(Float64(Float64(x1 * 2.0) * Float64(Float64(x2 * 2.0) - x1)) * 0.0)))))))); elseif (x1 <= 1950.0) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(4.0 * Float64(2.0 * Float64(x2 * Float64(x1 * x2))))))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(Float64(3.0 * t_2) + Float64(t_1 * Float64(Float64(x1 * 2.0) + 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 * x1); t_1 = 1.0 + (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = 3.0 * (((t_2 - (x2 * 2.0)) - x1) / t_1); t_4 = (((x2 * 2.0) + t_2) - x1) / t_1; t_5 = (x1 * x1) * ((4.0 * t_4) - 6.0); tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= -5500000000.0) tmp = x1 + (t_3 + (x1 + (t_0 + ((t_2 * t_4) + (t_1 * (t_5 + (((x1 * 2.0) * ((x2 * 2.0) - x1)) * 0.0))))))); elseif (x1 <= 1950.0) tmp = x1 + (t_3 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))); elseif (x1 <= 1.35e+154) tmp = x1 + (t_3 + (x1 + (t_0 + ((3.0 * t_2) + (t_1 * ((x1 * 2.0) + 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 * x1), $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[(3.0 * N[(N[(N[(t$95$2 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$2), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5500000000.0], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(N[(t$95$2 * t$95$4), $MachinePrecision] + N[(t$95$1 * N[(t$95$5 + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(x2 * 2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] * 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1950.0], N[(x1 + N[(t$95$3 + N[(x1 + N[(4.0 * N[(2.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(N[(3.0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(x1 * 2.0), $MachinePrecision] + t$95$5), $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 x1\right)\\
t_1 := 1 + x1 \cdot x1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 3 \cdot \frac{\left(t_2 - x2 \cdot 2\right) - x1}{t_1}\\
t_4 := \frac{\left(x2 \cdot 2 + t_2\right) - x1}{t_1}\\
t_5 := \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq -5500000000:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_0 + \left(t_2 \cdot t_4 + t_1 \cdot \left(t_5 + \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot 2 - x1\right)\right) \cdot 0\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1950:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 4 \cdot \left(2 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_0 + \left(3 \cdot t_2 + t_1 \cdot \left(x1 \cdot 2 + t_5\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.49999999999999981e102Initial program 1.9%
Taylor expanded in x1 around 0 1.9%
Taylor expanded in x2 around 0 4.1%
*-commutative4.1%
*-commutative4.1%
associate-*l*4.1%
Simplified4.1%
Taylor expanded in x1 around 0 26.5%
if -5.49999999999999981e102 < x1 < -5.5e9Initial program 99.2%
Taylor expanded in x1 around 0 93.8%
Taylor expanded in x1 around inf 83.4%
if -5.5e9 < x1 < 1950Initial program 99.2%
Taylor expanded in x1 around 0 83.9%
Taylor expanded in x2 around inf 83.9%
*-commutative83.9%
unpow283.9%
associate-*l*98.6%
Simplified98.6%
if 1950 < x1 < 1.35000000000000003e154Initial program 95.9%
Taylor expanded in x1 around 0 83.4%
Taylor expanded in x1 around inf 82.4%
Taylor expanded in x1 around inf 82.4%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.6%
*-commutative5.6%
Simplified5.6%
flip-+77.4%
Applied egg-rr77.4%
swap-sqr77.4%
metadata-eval77.4%
Simplified77.4%
Final simplification78.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1)))
(t_3
(+
x1
(+
t_2
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_1
(+
(* x1 2.0)
(*
(* x1 x1)
(- (* 4.0 (/ (- (+ (* x2 2.0) t_0) x1) t_1)) 6.0)))))))))))
(if (<= x1 -3.1e+107)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 -37000000.0)
t_3
(if (<= x1 9600.0)
(+ x1 (+ t_2 (+ x1 (* 4.0 (* 2.0 (* x2 (* x1 x2)))))))
(if (<= x1 1.35e+154)
t_3
(/ (- (* 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 = 1.0 + (x1 * x1);
double t_2 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1);
double t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * ((((x2 * 2.0) + t_0) - x1) / t_1)) - 6.0))))))));
double tmp;
if (x1 <= -3.1e+107) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -37000000.0) {
tmp = t_3;
} else if (x1 <= 9600.0) {
tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else if (x1 <= 1.35e+154) {
tmp = t_3;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 1.0d0 + (x1 * x1)
t_2 = 3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_1)
t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_1 * ((x1 * 2.0d0) + ((x1 * x1) * ((4.0d0 * ((((x2 * 2.0d0) + t_0) - x1) / t_1)) - 6.0d0))))))))
if (x1 <= (-3.1d+107)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= (-37000000.0d0)) then
tmp = t_3
else if (x1 <= 9600.0d0) then
tmp = x1 + (t_2 + (x1 + (4.0d0 * (2.0d0 * (x2 * (x1 * x2))))))
else if (x1 <= 1.35d+154) then
tmp = t_3
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 = 1.0 + (x1 * x1);
double t_2 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1);
double t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * ((((x2 * 2.0) + t_0) - x1) / t_1)) - 6.0))))))));
double tmp;
if (x1 <= -3.1e+107) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -37000000.0) {
tmp = t_3;
} else if (x1 <= 9600.0) {
tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else if (x1 <= 1.35e+154) {
tmp = t_3;
} 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 = 1.0 + (x1 * x1) t_2 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1) t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * ((((x2 * 2.0) + t_0) - x1) / t_1)) - 6.0)))))))) tmp = 0 if x1 <= -3.1e+107: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= -37000000.0: tmp = t_3 elif x1 <= 9600.0: tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))) elif x1 <= 1.35e+154: tmp = t_3 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(1.0 + Float64(x1 * x1)) t_2 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)) t_3 = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_1 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(Float64(Float64(x2 * 2.0) + t_0) - x1) / t_1)) - 6.0))))))))) tmp = 0.0 if (x1 <= -3.1e+107) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= -37000000.0) tmp = t_3; elseif (x1 <= 9600.0) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(4.0 * Float64(2.0 * Float64(x2 * Float64(x1 * x2))))))); elseif (x1 <= 1.35e+154) tmp = t_3; 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 = 1.0 + (x1 * x1); t_2 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1); t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((x1 * 2.0) + ((x1 * x1) * ((4.0 * ((((x2 * 2.0) + t_0) - x1) / t_1)) - 6.0)))))))); tmp = 0.0; if (x1 <= -3.1e+107) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= -37000000.0) tmp = t_3; elseif (x1 <= 9600.0) tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))); elseif (x1 <= 1.35e+154) tmp = t_3; 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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(t$95$2 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$1 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.1e+107], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -37000000.0], t$95$3, If[LessEqual[x1, 9600.0], N[(x1 + N[(t$95$2 + N[(x1 + N[(4.0 * N[(2.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], t$95$3, 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 := 1 + x1 \cdot x1\\
t_2 := 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1}\\
t_3 := x1 + \left(t_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_0 + t_1 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x2 \cdot 2 + t_0\right) - x1}{t_1} - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -3.1 \cdot 10^{+107}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq -37000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x1 \leq 9600:\\
\;\;\;\;x1 + \left(t_2 + \left(x1 + 4 \cdot \left(2 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -3.10000000000000026e107Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 2.2%
*-commutative2.2%
*-commutative2.2%
associate-*l*2.2%
Simplified2.2%
Taylor expanded in x1 around 0 25.1%
if -3.10000000000000026e107 < x1 < -3.7e7 or 9600 < x1 < 1.35000000000000003e154Initial program 97.5%
Taylor expanded in x1 around 0 88.3%
Taylor expanded in x1 around inf 83.0%
Taylor expanded in x1 around inf 83.0%
if -3.7e7 < x1 < 9600Initial program 99.2%
Taylor expanded in x1 around 0 83.9%
Taylor expanded in x2 around inf 83.9%
*-commutative83.9%
unpow283.9%
associate-*l*98.6%
Simplified98.6%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.6%
*-commutative5.6%
Simplified5.6%
flip-+77.4%
Applied egg-rr77.4%
swap-sqr77.4%
metadata-eval77.4%
Simplified77.4%
Final simplification78.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ 1.0 (* x1 x1)))
(t_2 (* 3.0 (/ (- (- t_0 (* x2 2.0)) x1) t_1)))
(t_3
(+
x1
(+
t_2
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (/ (- (+ (* x2 2.0) t_0) x1) t_1))
(* t_1 (+ (* x1 2.0) (* 6.0 (* x1 x1)))))))))))
(if (<= x1 -5.5e+102)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 -68000000.0)
t_3
(if (<= x1 42000000000000.0)
(+ x1 (+ t_2 (+ x1 (* 4.0 (* 2.0 (* x2 (* x1 x2)))))))
(if (<= x1 1.35e+154)
t_3
(/ (- (* 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 = 1.0 + (x1 * x1);
double t_2 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1);
double t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x2 * 2.0) + t_0) - x1) / t_1)) + (t_1 * ((x1 * 2.0) + (6.0 * (x1 * x1))))))));
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -68000000.0) {
tmp = t_3;
} else if (x1 <= 42000000000000.0) {
tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else if (x1 <= 1.35e+154) {
tmp = t_3;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = 1.0d0 + (x1 * x1)
t_2 = 3.0d0 * (((t_0 - (x2 * 2.0d0)) - x1) / t_1)
t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x2 * 2.0d0) + t_0) - x1) / t_1)) + (t_1 * ((x1 * 2.0d0) + (6.0d0 * (x1 * x1))))))))
if (x1 <= (-5.5d+102)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= (-68000000.0d0)) then
tmp = t_3
else if (x1 <= 42000000000000.0d0) then
tmp = x1 + (t_2 + (x1 + (4.0d0 * (2.0d0 * (x2 * (x1 * x2))))))
else if (x1 <= 1.35d+154) then
tmp = t_3
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 = 1.0 + (x1 * x1);
double t_2 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1);
double t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x2 * 2.0) + t_0) - x1) / t_1)) + (t_1 * ((x1 * 2.0) + (6.0 * (x1 * x1))))))));
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -68000000.0) {
tmp = t_3;
} else if (x1 <= 42000000000000.0) {
tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else if (x1 <= 1.35e+154) {
tmp = t_3;
} 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 = 1.0 + (x1 * x1) t_2 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1) t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x2 * 2.0) + t_0) - x1) / t_1)) + (t_1 * ((x1 * 2.0) + (6.0 * (x1 * x1)))))))) tmp = 0 if x1 <= -5.5e+102: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= -68000000.0: tmp = t_3 elif x1 <= 42000000000000.0: tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))) elif x1 <= 1.35e+154: tmp = t_3 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(1.0 + Float64(x1 * x1)) t_2 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(x2 * 2.0)) - x1) / t_1)) t_3 = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x2 * 2.0) + t_0) - x1) / t_1)) + Float64(t_1 * Float64(Float64(x1 * 2.0) + Float64(6.0 * Float64(x1 * x1))))))))) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= -68000000.0) tmp = t_3; elseif (x1 <= 42000000000000.0) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(4.0 * Float64(2.0 * Float64(x2 * Float64(x1 * x2))))))); elseif (x1 <= 1.35e+154) tmp = t_3; 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 = 1.0 + (x1 * x1); t_2 = 3.0 * (((t_0 - (x2 * 2.0)) - x1) / t_1); t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((((x2 * 2.0) + t_0) - x1) / t_1)) + (t_1 * ((x1 * 2.0) + (6.0 * (x1 * x1)))))))); tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= -68000000.0) tmp = t_3; elseif (x1 <= 42000000000000.0) tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))); elseif (x1 <= 1.35e+154) tmp = t_3; 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[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(N[(t$95$0 - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(t$95$2 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(N[(x2 * 2.0), $MachinePrecision] + t$95$0), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(6.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -68000000.0], t$95$3, If[LessEqual[x1, 42000000000000.0], N[(x1 + N[(t$95$2 + N[(x1 + N[(4.0 * N[(2.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], t$95$3, 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 := 1 + x1 \cdot x1\\
t_2 := 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1}\\
t_3 := x1 + \left(t_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \frac{\left(x2 \cdot 2 + t_0\right) - x1}{t_1} + t_1 \cdot \left(x1 \cdot 2 + 6 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq -68000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x1 \leq 42000000000000:\\
\;\;\;\;x1 + \left(t_2 + \left(x1 + 4 \cdot \left(2 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 1.9%
Taylor expanded in x1 around 0 1.9%
Taylor expanded in x2 around 0 4.1%
*-commutative4.1%
*-commutative4.1%
associate-*l*4.1%
Simplified4.1%
Taylor expanded in x1 around 0 26.5%
if -5.49999999999999981e102 < x1 < -6.8e7 or 4.2e13 < x1 < 1.35000000000000003e154Initial program 97.4%
Taylor expanded in x1 around 0 91.2%
Taylor expanded in x1 around inf 85.5%
Taylor expanded in x1 around inf 80.2%
if -6.8e7 < x1 < 4.2e13Initial program 99.2%
Taylor expanded in x1 around 0 82.7%
Taylor expanded in x2 around inf 82.7%
*-commutative82.7%
unpow282.7%
associate-*l*97.2%
Simplified97.2%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.6%
*-commutative5.6%
Simplified5.6%
flip-+77.4%
Applied egg-rr77.4%
swap-sqr77.4%
metadata-eval77.4%
Simplified77.4%
Final simplification77.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.75e+75)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 1.35e+154)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* x2 2.0)) x1) (+ 1.0 (* x1 x1))))
(+ x1 (* 4.0 (* 2.0 (* x2 (* x1 x2)))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.75e+75) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} 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 (x1 <= (-1.75d+75)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= 1.35d+154) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (x2 * 2.0d0)) - x1) / (1.0d0 + (x1 * x1)))) + (x1 + (4.0d0 * (2.0d0 * (x2 * (x1 * x2))))))
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 (x1 <= -1.75e+75) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.75e+75: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= 1.35e+154: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.75e+75) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x2 * 2.0)) - x1) / Float64(1.0 + Float64(x1 * x1)))) + Float64(x1 + Float64(4.0 * Float64(2.0 * Float64(x2 * Float64(x1 * x2))))))); 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 (x1 <= -1.75e+75) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= 1.35e+154) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (x2 * 2.0)) - x1) / (1.0 + (x1 * x1)))) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.75e+75], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x2 * 2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(1.0 + N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(2.0 * N[(x2 * N[(x1 * x2), $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}
\mathbf{if}\;x1 \leq -1.75 \cdot 10^{+75}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + 4 \cdot \left(2 \cdot \left(x2 \cdot \left(x1 \cdot x2\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 < -1.7499999999999999e75Initial program 15.0%
Taylor expanded in x1 around 0 1.7%
Taylor expanded in x2 around 0 3.7%
*-commutative3.7%
*-commutative3.7%
associate-*l*3.7%
Simplified3.7%
Taylor expanded in x1 around 0 23.5%
if -1.7499999999999999e75 < x1 < 1.35000000000000003e154Initial program 98.6%
Taylor expanded in x1 around 0 69.7%
Taylor expanded in x2 around inf 69.7%
*-commutative69.7%
unpow269.7%
associate-*l*80.5%
Simplified80.5%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 5.6%
*-commutative5.6%
Simplified5.6%
flip-+77.4%
Applied egg-rr77.4%
swap-sqr77.4%
metadata-eval77.4%
Simplified77.4%
Final simplification66.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* x2 2.0) 3.0))) 2.0)))))
(t_1 (+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))))
(if (<= x1 -1.75e+75)
t_1
(if (<= x1 -1.95e-190)
t_0
(if (<= x1 2e-226)
t_1
(if (<= x1 7.5e+169)
t_0
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
double t_1 = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
double tmp;
if (x1 <= -1.75e+75) {
tmp = t_1;
} else if (x1 <= -1.95e-190) {
tmp = t_0;
} else if (x1 <= 2e-226) {
tmp = t_1;
} else if (x1 <= 7.5e+169) {
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) :: t_1
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0))) - 2.0d0)))
t_1 = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
if (x1 <= (-1.75d+75)) then
tmp = t_1
else if (x1 <= (-1.95d-190)) then
tmp = t_0
else if (x1 <= 2d-226) then
tmp = t_1
else if (x1 <= 7.5d+169) then
tmp = t_0
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0)));
double t_1 = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
double tmp;
if (x1 <= -1.75e+75) {
tmp = t_1;
} else if (x1 <= -1.95e-190) {
tmp = t_0;
} else if (x1 <= 2e-226) {
tmp = t_1;
} else if (x1 <= 7.5e+169) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))) t_1 = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) tmp = 0 if x1 <= -1.75e+75: tmp = t_1 elif x1 <= -1.95e-190: tmp = t_0 elif x1 <= 2e-226: tmp = t_1 elif x1 <= 7.5e+169: tmp = t_0 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0))) - 2.0)))) t_1 = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))) tmp = 0.0 if (x1 <= -1.75e+75) tmp = t_1; elseif (x1 <= -1.95e-190) tmp = t_0; elseif (x1 <= 2e-226) tmp = t_1; elseif (x1 <= 7.5e+169) tmp = t_0; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((x2 * 2.0) - 3.0))) - 2.0))); t_1 = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); tmp = 0.0; if (x1 <= -1.75e+75) tmp = t_1; elseif (x1 <= -1.95e-190) tmp = t_0; elseif (x1 <= 2e-226) tmp = t_1; elseif (x1 <= 7.5e+169) tmp = t_0; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.75e+75], t$95$1, If[LessEqual[x1, -1.95e-190], t$95$0, If[LessEqual[x1, 2e-226], t$95$1, If[LessEqual[x1, 7.5e+169], t$95$0, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\
t_1 := x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{if}\;x1 \leq -1.75 \cdot 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -1.95 \cdot 10^{-190}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{-226}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{+169}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.7499999999999999e75 or -1.94999999999999997e-190 < x1 < 1.99999999999999984e-226Initial program 50.7%
Taylor expanded in x1 around 0 30.5%
Taylor expanded in x2 around 0 40.8%
*-commutative40.8%
*-commutative40.8%
associate-*l*40.8%
Simplified40.8%
Taylor expanded in x1 around 0 52.3%
if -1.7499999999999999e75 < x1 < -1.94999999999999997e-190 or 1.99999999999999984e-226 < x1 < 7.49999999999999992e169Initial program 95.2%
Taylor expanded in x1 around 0 67.5%
Taylor expanded in x1 around 0 70.0%
if 7.49999999999999992e169 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.2%
*-commutative6.2%
Simplified6.2%
flip-+85.2%
Applied egg-rr85.2%
swap-sqr85.2%
metadata-eval85.2%
Simplified85.2%
Final simplification64.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))))
(if (<= x1 -1.45e+75)
t_0
(if (<= x1 -3.05e-16)
(+ x1 (* x1 (* (* x2 x2) 8.0)))
(if (<= x1 5e-38)
t_0
(if (<= x1 7.5e+169)
(+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* x2 2.0) 3.0))))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
double tmp;
if (x1 <= -1.45e+75) {
tmp = t_0;
} else if (x1 <= -3.05e-16) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else if (x1 <= 5e-38) {
tmp = t_0;
} else if (x1 <= 7.5e+169) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
if (x1 <= (-1.45d+75)) then
tmp = t_0
else if (x1 <= (-3.05d-16)) then
tmp = x1 + (x1 * ((x2 * x2) * 8.0d0))
else if (x1 <= 5d-38) then
tmp = t_0
else if (x1 <= 7.5d+169) then
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0)))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
double tmp;
if (x1 <= -1.45e+75) {
tmp = t_0;
} else if (x1 <= -3.05e-16) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else if (x1 <= 5e-38) {
tmp = t_0;
} else if (x1 <= 7.5e+169) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) tmp = 0 if x1 <= -1.45e+75: tmp = t_0 elif x1 <= -3.05e-16: tmp = x1 + (x1 * ((x2 * x2) * 8.0)) elif x1 <= 5e-38: tmp = t_0 elif x1 <= 7.5e+169: tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.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(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))) tmp = 0.0 if (x1 <= -1.45e+75) tmp = t_0; elseif (x1 <= -3.05e-16) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * x2) * 8.0))); elseif (x1 <= 5e-38) tmp = t_0; elseif (x1 <= 7.5e+169) tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0)))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); tmp = 0.0; if (x1 <= -1.45e+75) tmp = t_0; elseif (x1 <= -3.05e-16) tmp = x1 + (x1 * ((x2 * x2) * 8.0)); elseif (x1 <= 5e-38) tmp = t_0; elseif (x1 <= 7.5e+169) tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.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[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.45e+75], t$95$0, If[LessEqual[x1, -3.05e-16], N[(x1 + N[(x1 * N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e-38], t$95$0, If[LessEqual[x1, 7.5e+169], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{if}\;x1 \leq -1.45 \cdot 10^{+75}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -3.05 \cdot 10^{-16}:\\
\;\;\;\;x1 + x1 \cdot \left(\left(x2 \cdot x2\right) \cdot 8\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{-38}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 7.5 \cdot 10^{+169}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.4499999999999999e75 or -3.04999999999999976e-16 < x1 < 5.00000000000000033e-38Initial program 69.1%
Taylor expanded in x1 around 0 53.9%
Taylor expanded in x2 around 0 53.5%
*-commutative53.5%
*-commutative53.5%
associate-*l*53.5%
Simplified53.5%
Taylor expanded in x1 around 0 60.9%
if -1.4499999999999999e75 < x1 < -3.04999999999999976e-16Initial program 99.0%
Taylor expanded in x1 around 0 36.6%
Taylor expanded in x2 around inf 36.6%
*-commutative36.6%
associate-*l*36.6%
unpow236.6%
Simplified36.6%
if 5.00000000000000033e-38 < x1 < 7.49999999999999992e169Initial program 88.1%
Taylor expanded in x1 around 0 44.1%
Taylor expanded in x1 around inf 43.8%
if 7.49999999999999992e169 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.2%
*-commutative6.2%
Simplified6.2%
flip-+85.2%
Applied egg-rr85.2%
swap-sqr85.2%
metadata-eval85.2%
Simplified85.2%
Final simplification58.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))))
(if (<= x1 -1.75e+75)
t_0
(if (<= x1 -7.2e-29)
(+ x1 (* x1 (* (* x2 x2) 8.0)))
(if (<= x1 3e-41)
t_0
(+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* x2 2.0) 3.0)))))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
double tmp;
if (x1 <= -1.75e+75) {
tmp = t_0;
} else if (x1 <= -7.2e-29) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else if (x1 <= 3e-41) {
tmp = t_0;
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
if (x1 <= (-1.75d+75)) then
tmp = t_0
else if (x1 <= (-7.2d-29)) then
tmp = x1 + (x1 * ((x2 * x2) * 8.0d0))
else if (x1 <= 3d-41) then
tmp = t_0
else
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((x2 * 2.0d0) - 3.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
double tmp;
if (x1 <= -1.75e+75) {
tmp = t_0;
} else if (x1 <= -7.2e-29) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else if (x1 <= 3e-41) {
tmp = t_0;
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) tmp = 0 if x1 <= -1.75e+75: tmp = t_0 elif x1 <= -7.2e-29: tmp = x1 + (x1 * ((x2 * x2) * 8.0)) elif x1 <= 3e-41: tmp = t_0 else: tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))))) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))) tmp = 0.0 if (x1 <= -1.75e+75) tmp = t_0; elseif (x1 <= -7.2e-29) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * x2) * 8.0))); elseif (x1 <= 3e-41) tmp = t_0; else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(x2 * 2.0) - 3.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); tmp = 0.0; if (x1 <= -1.75e+75) tmp = t_0; elseif (x1 <= -7.2e-29) tmp = x1 + (x1 * ((x2 * x2) * 8.0)); elseif (x1 <= 3e-41) tmp = t_0; else tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((x2 * 2.0) - 3.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.75e+75], t$95$0, If[LessEqual[x1, -7.2e-29], N[(x1 + N[(x1 * N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3e-41], t$95$0, N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(x2 * 2.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{if}\;x1 \leq -1.75 \cdot 10^{+75}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -7.2 \cdot 10^{-29}:\\
\;\;\;\;x1 + x1 \cdot \left(\left(x2 \cdot x2\right) \cdot 8\right)\\
\mathbf{elif}\;x1 \leq 3 \cdot 10^{-41}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.7499999999999999e75 or -7.19999999999999948e-29 < x1 < 2.99999999999999989e-41Initial program 69.1%
Taylor expanded in x1 around 0 53.9%
Taylor expanded in x2 around 0 53.5%
*-commutative53.5%
*-commutative53.5%
associate-*l*53.5%
Simplified53.5%
Taylor expanded in x1 around 0 60.9%
if -1.7499999999999999e75 < x1 < -7.19999999999999948e-29Initial program 99.0%
Taylor expanded in x1 around 0 36.6%
Taylor expanded in x2 around inf 36.6%
*-commutative36.6%
associate-*l*36.6%
unpow236.6%
Simplified36.6%
if 2.99999999999999989e-41 < x1 Initial program 54.6%
Taylor expanded in x1 around 0 27.3%
Taylor expanded in x1 around inf 45.4%
Final simplification55.0%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -1.75e+75) (and (not (<= x1 -2.2e-13)) (<= x1 5.4e-37))) (+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0))) (+ x1 (* x1 (* (* x2 x2) 8.0)))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.75e+75) || (!(x1 <= -2.2e-13) && (x1 <= 5.4e-37))) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else {
tmp = x1 + (x1 * ((x2 * x2) * 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.75d+75)) .or. (.not. (x1 <= (-2.2d-13))) .and. (x1 <= 5.4d-37)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else
tmp = x1 + (x1 * ((x2 * x2) * 8.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.75e+75) || (!(x1 <= -2.2e-13) && (x1 <= 5.4e-37))) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -1.75e+75) or (not (x1 <= -2.2e-13) and (x1 <= 5.4e-37)): tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) else: tmp = x1 + (x1 * ((x2 * x2) * 8.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -1.75e+75) || (!(x1 <= -2.2e-13) && (x1 <= 5.4e-37))) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * x2) * 8.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -1.75e+75) || (~((x1 <= -2.2e-13)) && (x1 <= 5.4e-37))) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); else tmp = x1 + (x1 * ((x2 * x2) * 8.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -1.75e+75], And[N[Not[LessEqual[x1, -2.2e-13]], $MachinePrecision], LessEqual[x1, 5.4e-37]]], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.75 \cdot 10^{+75} \lor \neg \left(x1 \leq -2.2 \cdot 10^{-13}\right) \land x1 \leq 5.4 \cdot 10^{-37}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(\left(x2 \cdot x2\right) \cdot 8\right)\\
\end{array}
\end{array}
if x1 < -1.7499999999999999e75 or -2.19999999999999997e-13 < x1 < 5.40000000000000032e-37Initial program 69.1%
Taylor expanded in x1 around 0 53.9%
Taylor expanded in x2 around 0 53.5%
*-commutative53.5%
*-commutative53.5%
associate-*l*53.5%
Simplified53.5%
Taylor expanded in x1 around 0 60.9%
if -1.7499999999999999e75 < x1 < -2.19999999999999997e-13 or 5.40000000000000032e-37 < x1 Initial program 63.2%
Taylor expanded in x1 around 0 29.1%
Taylor expanded in x2 around inf 43.7%
*-commutative43.7%
associate-*l*43.7%
unpow243.7%
Simplified43.7%
Final simplification55.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x1 (* (* x2 x2) 8.0)))))
(if (<= x1 -1.75e+75)
(+ x1 (* x1 (+ 1.0 (* x2 -12.0))))
(if (<= x1 -2.2e-19)
t_0
(if (<= x1 -9.2e-179)
(+ x1 (* x1 -2.0))
(if (<= x1 2.1e-52) (* x2 -6.0) t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((x2 * x2) * 8.0));
double tmp;
if (x1 <= -1.75e+75) {
tmp = x1 + (x1 * (1.0 + (x2 * -12.0)));
} else if (x1 <= -2.2e-19) {
tmp = t_0;
} else if (x1 <= -9.2e-179) {
tmp = x1 + (x1 * -2.0);
} else if (x1 <= 2.1e-52) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 * ((x2 * x2) * 8.0d0))
if (x1 <= (-1.75d+75)) then
tmp = x1 + (x1 * (1.0d0 + (x2 * (-12.0d0))))
else if (x1 <= (-2.2d-19)) then
tmp = t_0
else if (x1 <= (-9.2d-179)) then
tmp = x1 + (x1 * (-2.0d0))
else if (x1 <= 2.1d-52) then
tmp = x2 * (-6.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 * ((x2 * x2) * 8.0));
double tmp;
if (x1 <= -1.75e+75) {
tmp = x1 + (x1 * (1.0 + (x2 * -12.0)));
} else if (x1 <= -2.2e-19) {
tmp = t_0;
} else if (x1 <= -9.2e-179) {
tmp = x1 + (x1 * -2.0);
} else if (x1 <= 2.1e-52) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 * ((x2 * x2) * 8.0)) tmp = 0 if x1 <= -1.75e+75: tmp = x1 + (x1 * (1.0 + (x2 * -12.0))) elif x1 <= -2.2e-19: tmp = t_0 elif x1 <= -9.2e-179: tmp = x1 + (x1 * -2.0) elif x1 <= 2.1e-52: tmp = x2 * -6.0 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 * Float64(Float64(x2 * x2) * 8.0))) tmp = 0.0 if (x1 <= -1.75e+75) tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(x2 * -12.0)))); elseif (x1 <= -2.2e-19) tmp = t_0; elseif (x1 <= -9.2e-179) tmp = Float64(x1 + Float64(x1 * -2.0)); elseif (x1 <= 2.1e-52) tmp = Float64(x2 * -6.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 * ((x2 * x2) * 8.0)); tmp = 0.0; if (x1 <= -1.75e+75) tmp = x1 + (x1 * (1.0 + (x2 * -12.0))); elseif (x1 <= -2.2e-19) tmp = t_0; elseif (x1 <= -9.2e-179) tmp = x1 + (x1 * -2.0); elseif (x1 <= 2.1e-52) tmp = x2 * -6.0; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 * N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.75e+75], N[(x1 + N[(x1 * N[(1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.2e-19], t$95$0, If[LessEqual[x1, -9.2e-179], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.1e-52], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x1 \cdot \left(\left(x2 \cdot x2\right) \cdot 8\right)\\
\mathbf{if}\;x1 \leq -1.75 \cdot 10^{+75}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq -2.2 \cdot 10^{-19}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -9.2 \cdot 10^{-179}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\mathbf{elif}\;x1 \leq 2.1 \cdot 10^{-52}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x1 < -1.7499999999999999e75Initial program 15.0%
Taylor expanded in x1 around 0 1.7%
Taylor expanded in x2 around 0 3.7%
*-commutative3.7%
*-commutative3.7%
associate-*l*3.7%
Simplified3.7%
Taylor expanded in x1 around inf 20.5%
*-commutative20.5%
Simplified20.5%
if -1.7499999999999999e75 < x1 < -2.1999999999999998e-19 or 2.0999999999999999e-52 < x1 Initial program 63.2%
Taylor expanded in x1 around 0 29.1%
Taylor expanded in x2 around inf 43.7%
*-commutative43.7%
associate-*l*43.7%
unpow243.7%
Simplified43.7%
if -2.1999999999999998e-19 < x1 < -9.1999999999999995e-179Initial program 98.8%
Taylor expanded in x1 around 0 95.3%
Taylor expanded in x2 around 0 53.4%
associate-*r/53.4%
*-commutative53.4%
unpow253.4%
associate-*r*53.4%
+-commutative53.4%
unpow253.4%
fma-udef53.4%
Simplified53.4%
Taylor expanded in x1 around 0 54.6%
*-commutative54.6%
Simplified54.6%
if -9.1999999999999995e-179 < x1 < 2.0999999999999999e-52Initial program 99.3%
Taylor expanded in x1 around 0 78.9%
Taylor expanded in x1 around 0 65.2%
*-commutative65.2%
Simplified65.2%
Taylor expanded in x1 around 0 65.6%
*-commutative65.6%
Simplified65.6%
Final simplification46.4%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -9.2e-179) (+ x1 (* x1 -2.0)) (if (<= x1 1.6e-64) (* x2 -6.0) (+ x1 (* x1 (* (* x2 x2) 8.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -9.2e-179) {
tmp = x1 + (x1 * -2.0);
} else if (x1 <= 1.6e-64) {
tmp = x2 * -6.0;
} else {
tmp = x1 + (x1 * ((x2 * x2) * 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 <= (-9.2d-179)) then
tmp = x1 + (x1 * (-2.0d0))
else if (x1 <= 1.6d-64) then
tmp = x2 * (-6.0d0)
else
tmp = x1 + (x1 * ((x2 * x2) * 8.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -9.2e-179) {
tmp = x1 + (x1 * -2.0);
} else if (x1 <= 1.6e-64) {
tmp = x2 * -6.0;
} else {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -9.2e-179: tmp = x1 + (x1 * -2.0) elif x1 <= 1.6e-64: tmp = x2 * -6.0 else: tmp = x1 + (x1 * ((x2 * x2) * 8.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -9.2e-179) tmp = Float64(x1 + Float64(x1 * -2.0)); elseif (x1 <= 1.6e-64) tmp = Float64(x2 * -6.0); else tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * x2) * 8.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -9.2e-179) tmp = x1 + (x1 * -2.0); elseif (x1 <= 1.6e-64) tmp = x2 * -6.0; else tmp = x1 + (x1 * ((x2 * x2) * 8.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -9.2e-179], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.6e-64], N[(x2 * -6.0), $MachinePrecision], N[(x1 + N[(x1 * N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -9.2 \cdot 10^{-179}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\mathbf{elif}\;x1 \leq 1.6 \cdot 10^{-64}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(\left(x2 \cdot x2\right) \cdot 8\right)\\
\end{array}
\end{array}
if x1 < -9.1999999999999995e-179Initial program 50.0%
Taylor expanded in x1 around 0 31.1%
Taylor expanded in x2 around 0 13.9%
associate-*r/13.9%
*-commutative13.9%
unpow213.9%
associate-*r*13.9%
+-commutative13.9%
unpow213.9%
fma-udef13.9%
Simplified13.9%
Taylor expanded in x1 around 0 18.1%
*-commutative18.1%
Simplified18.1%
if -9.1999999999999995e-179 < x1 < 1.59999999999999988e-64Initial program 99.3%
Taylor expanded in x1 around 0 78.9%
Taylor expanded in x1 around 0 65.2%
*-commutative65.2%
Simplified65.2%
Taylor expanded in x1 around 0 65.6%
*-commutative65.6%
Simplified65.6%
if 1.59999999999999988e-64 < x1 Initial program 54.6%
Taylor expanded in x1 around 0 27.3%
Taylor expanded in x2 around inf 45.4%
*-commutative45.4%
associate-*l*45.4%
unpow245.4%
Simplified45.4%
Final simplification40.9%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -1.15e-173) (* x2 -6.0) (if (<= x2 1.85e-73) (+ x1 (* x1 -2.0)) (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -1.15e-173) {
tmp = x2 * -6.0;
} else if (x2 <= 1.85e-73) {
tmp = x1 + (x1 * -2.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 (x2 <= (-1.15d-173)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 1.85d-73) then
tmp = x1 + (x1 * (-2.0d0))
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -1.15e-173) {
tmp = x2 * -6.0;
} else if (x2 <= 1.85e-73) {
tmp = x1 + (x1 * -2.0);
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -1.15e-173: tmp = x2 * -6.0 elif x2 <= 1.85e-73: tmp = x1 + (x1 * -2.0) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -1.15e-173) tmp = Float64(x2 * -6.0); elseif (x2 <= 1.85e-73) tmp = Float64(x1 + Float64(x1 * -2.0)); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -1.15e-173) tmp = x2 * -6.0; elseif (x2 <= 1.85e-73) tmp = x1 + (x1 * -2.0); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -1.15e-173], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 1.85e-73], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.15 \cdot 10^{-173}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 1.85 \cdot 10^{-73}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -1.14999999999999994e-173 or 1.85e-73 < x2 Initial program 65.2%
Taylor expanded in x1 around 0 43.8%
Taylor expanded in x1 around 0 29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in x1 around 0 28.9%
*-commutative28.9%
Simplified28.9%
if -1.14999999999999994e-173 < x2 < 1.85e-73Initial program 71.2%
Taylor expanded in x1 around 0 48.8%
Taylor expanded in x2 around 0 37.3%
associate-*r/37.3%
*-commutative37.3%
unpow237.3%
associate-*r*37.3%
+-commutative37.3%
unpow237.3%
fma-udef37.3%
Simplified37.3%
Taylor expanded in x1 around 0 39.1%
*-commutative39.1%
Simplified39.1%
Final simplification32.0%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -1.05e-173) (* x2 -6.0) (if (<= x2 5.2e-83) (+ x1 (* x1 -2.0)) (+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -1.05e-173) {
tmp = x2 * -6.0;
} else if (x2 <= 5.2e-83) {
tmp = x1 + (x1 * -2.0);
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-1.05d-173)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 5.2d-83) then
tmp = x1 + (x1 * (-2.0d0))
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -1.05e-173) {
tmp = x2 * -6.0;
} else if (x2 <= 5.2e-83) {
tmp = x1 + (x1 * -2.0);
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -1.05e-173: tmp = x2 * -6.0 elif x2 <= 5.2e-83: tmp = x1 + (x1 * -2.0) else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -1.05e-173) tmp = Float64(x2 * -6.0); elseif (x2 <= 5.2e-83) tmp = Float64(x1 + Float64(x1 * -2.0)); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -1.05e-173) tmp = x2 * -6.0; elseif (x2 <= 5.2e-83) tmp = x1 + (x1 * -2.0); else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -1.05e-173], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 5.2e-83], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.05 \cdot 10^{-173}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 5.2 \cdot 10^{-83}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -1.05000000000000001e-173Initial program 65.3%
Taylor expanded in x1 around 0 45.5%
Taylor expanded in x1 around 0 31.6%
*-commutative31.6%
Simplified31.6%
Taylor expanded in x1 around 0 31.9%
*-commutative31.9%
Simplified31.9%
if -1.05000000000000001e-173 < x2 < 5.20000000000000018e-83Initial program 73.0%
Taylor expanded in x1 around 0 50.1%
Taylor expanded in x2 around 0 38.2%
associate-*r/38.2%
*-commutative38.2%
unpow238.2%
associate-*r*38.2%
+-commutative38.2%
unpow238.2%
fma-udef38.2%
Simplified38.2%
Taylor expanded in x1 around 0 40.0%
*-commutative40.0%
Simplified40.0%
if 5.20000000000000018e-83 < x2 Initial program 63.5%
Taylor expanded in x1 around 0 40.7%
Taylor expanded in x1 around 0 25.1%
*-commutative25.1%
Simplified25.1%
Final simplification32.2%
(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 67.1%
Taylor expanded in x1 around 0 45.4%
Taylor expanded in x1 around 0 23.9%
*-commutative23.9%
Simplified23.9%
Taylor expanded in x1 around 0 23.9%
*-commutative23.9%
Simplified23.9%
Final simplification23.9%
(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 67.1%
Taylor expanded in x1 around 0 45.4%
Taylor expanded in x1 around 0 23.9%
*-commutative23.9%
Simplified23.9%
Taylor expanded in x1 around inf 3.0%
Final simplification3.0%
herbie shell --seed 2023268
(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))))))