
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 3.0 (* x1 x1)) (fma x2 -2.0 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ t_0 (fma x1 x1 1.0)))
(t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_5 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_4) (- t_4 3.0))
(* (* x1 x1) (- (* t_4 4.0) 6.0))))
(* t_1 t_4))
(* x1 (* x1 x1))))
t_5))
INFINITY)
(+
x1
(+
t_5
(+
x1
(+
(pow x1 3.0)
(fma
(* x1 3.0)
(* x1 t_3)
(*
(fma x1 x1 1.0)
(fma
(+ t_3 -3.0)
(/ x1 (/ (fma x1 x1 1.0) (* 2.0 t_0)))
(* x1 (* x1 (fma t_3 4.0 -6.0))))))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = (3.0 * (x1 * x1)) - fma(x2, -2.0, x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = t_0 / fma(x1, x1, 1.0);
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_5 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + (t_1 * t_4)) + (x1 * (x1 * x1)))) + t_5)) <= ((double) INFINITY)) {
tmp = x1 + (t_5 + (x1 + (pow(x1, 3.0) + fma((x1 * 3.0), (x1 * t_3), (fma(x1, x1, 1.0) * fma((t_3 + -3.0), (x1 / (fma(x1, x1, 1.0) / (2.0 * t_0))), (x1 * (x1 * fma(t_3, 4.0, -6.0)))))))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(3.0 * Float64(x1 * x1)) - fma(x2, -2.0, x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(t_0 / fma(x1, x1, 1.0)) t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_5 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)))) + Float64(t_1 * t_4)) + Float64(x1 * Float64(x1 * x1)))) + t_5)) <= Inf) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64((x1 ^ 3.0) + fma(Float64(x1 * 3.0), Float64(x1 * t_3), Float64(fma(x1, x1, 1.0) * fma(Float64(t_3 + -3.0), Float64(x1 / Float64(fma(x1, x1, 1.0) / Float64(2.0 * t_0))), Float64(x1 * Float64(x1 * fma(t_3, 4.0, -6.0)))))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(x2 * -2.0 + x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$5 + N[(x1 + N[(N[Power[x1, 3.0], $MachinePrecision] + N[(N[(x1 * 3.0), $MachinePrecision] * N[(x1 * t$95$3), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(N[(t$95$3 + -3.0), $MachinePrecision] * N[(x1 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * N[(t$95$3 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(x2, -2, x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{t_0}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_4 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2}\\
t_5 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(t_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_4 \cdot 4 - 6\right)\right) + t_1 \cdot t_4\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + t_5\right) \leq \infty:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left({x1}^{3} + \mathsf{fma}\left(x1 \cdot 3, x1 \cdot t_3, \mathsf{fma}\left(x1, x1, 1\right) \cdot \mathsf{fma}\left(t_3 + -3, \frac{x1}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2 \cdot t_0}}, x1 \cdot \left(x1 \cdot \mathsf{fma}\left(t_3, 4, -6\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 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.4%
Applied egg-rr91.1%
Simplified99.4%
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 inf 10.8%
*-commutative10.8%
Simplified10.8%
Taylor expanded in x1 around inf 97.3%
Final simplification98.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
(if (<= t_3 INFINITY) t_3 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + t_0 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)\\
\mathbf{if}\;t_3 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 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.4%
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 inf 10.8%
*-commutative10.8%
Simplified10.8%
Taylor expanded in x1 around inf 97.3%
Final simplification98.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -9e+52) (not (<= x1 1.3e+67)))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+
(* (- t_2 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1)))
(*
(* x1 x1)
(-
(* 4.0 (/ (- (+ (* 2.0 x2) (* 3.0 (* x1 x1))) x1) t_1))
6.0))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -9e+52) || !(x1 <= 1.3e+67)) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * ((4.0 * ((((2.0 * x2) + (3.0 * (x1 * x1))) - x1) / t_1)) - 6.0))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-9d+52)) .or. (.not. (x1 <= 1.3d+67))) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + ((x1 * x1) * ((4.0d0 * ((((2.0d0 * x2) + (3.0d0 * (x1 * x1))) - x1) / t_1)) - 6.0d0))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -9e+52) || !(x1 <= 1.3e+67)) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * ((4.0 * ((((2.0 * x2) + (3.0 * (x1 * x1))) - x1) / t_1)) - 6.0))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -9e+52) or not (x1 <= 1.3e+67): tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * ((4.0 * ((((2.0 * x2) + (3.0 * (x1 * x1))) - x1) / t_1)) - 6.0)))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -9e+52) || !(x1 <= 1.3e+67)) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_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) * Float64(Float64(2.0 * x2) - x1))) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(Float64(Float64(2.0 * x2) + Float64(3.0 * Float64(x1 * x1))) - x1) / t_1)) - 6.0))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -9e+52) || ~((x1 <= 1.3e+67))) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * ((4.0 * ((((2.0 * x2) + (3.0 * (x1 * x1))) - x1) / t_1)) - 6.0)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -9e+52], N[Not[LessEqual[x1, 1.3e+67]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$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] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - 6.0), $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 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -9 \cdot 10^{+52} \lor \neg \left(x1 \leq 1.3 \cdot 10^{+67}\right):\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_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 \left(2 \cdot x2 - x1\right)\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(2 \cdot x2 + 3 \cdot \left(x1 \cdot x1\right)\right) - x1}{t_1} - 6\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -8.9999999999999999e52 or 1.3e67 < x1 Initial program 34.1%
Taylor expanded in x1 around inf 39.7%
*-commutative39.7%
Simplified39.7%
Taylor expanded in x1 around inf 97.4%
if -8.9999999999999999e52 < x1 < 1.3e67Initial program 98.6%
Taylor expanded in x1 around 0 94.9%
Taylor expanded in x1 around 0 94.9%
unpow294.9%
Simplified94.9%
Final simplification95.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -4e+101) (not (<= x1 2.6e+67)))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+
(* (* x1 x1) (- (* t_2 4.0) 6.0))
(* (- t_2 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1)))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -4e+101) || !(x1 <= 2.6e+67)) {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-4d+101)) .or. (.not. (x1 <= 2.6d+67))) then
tmp = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)) + ((t_2 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -4e+101) || !(x1 <= 2.6e+67)) {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -4e+101) or not (x1 <= 2.6e+67): tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -4e+101) || !(x1 <= 2.6e+67)) tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) + Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -4e+101) || ~((x1 <= 2.6e+67))) tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -4e+101], N[Not[LessEqual[x1, 2.6e+67]], $MachinePrecision]], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$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[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -4 \cdot 10^{+101} \lor \neg \left(x1 \leq 2.6 \cdot 10^{+67}\right):\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_2 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right) + \left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -3.9999999999999999e101 or 2.6e67 < x1 Initial program 27.7%
Taylor expanded in x1 around inf 33.7%
*-commutative33.7%
Simplified33.7%
Taylor expanded in x1 around inf 97.1%
if -3.9999999999999999e101 < x1 < 2.6e67Initial program 98.7%
Taylor expanded in x1 around 0 95.2%
Final simplification96.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_4
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_0 t_3))
(* x1 (* x1 x1))))
9.0))))
(if (<= x1 -1.22e+53)
t_1
(if (<= x1 -0.0011)
t_4
(if (<= x1 1.1e-27)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(+ x1 (* 4.0 (* x2 (+ (* x1 (* 2.0 x2)) (* x1 -3.0)))))))
(if (<= x1 4.2e+69) t_4 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + 9.0);
double tmp;
if (x1 <= -1.22e+53) {
tmp = t_1;
} else if (x1 <= -0.0011) {
tmp = t_4;
} else if (x1 <= 1.1e-27) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 4.2e+69) {
tmp = t_4;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_0 + (2.0d0 * x2)) - x1) / t_2
t_4 = x1 + ((x1 + (((t_2 * ((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + 9.0d0)
if (x1 <= (-1.22d+53)) then
tmp = t_1
else if (x1 <= (-0.0011d0)) then
tmp = t_4
else if (x1 <= 1.1d-27) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (4.0d0 * (x2 * ((x1 * (2.0d0 * x2)) + (x1 * (-3.0d0)))))))
else if (x1 <= 4.2d+69) then
tmp = t_4
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + 9.0);
double tmp;
if (x1 <= -1.22e+53) {
tmp = t_1;
} else if (x1 <= -0.0011) {
tmp = t_4;
} else if (x1 <= 1.1e-27) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 4.2e+69) {
tmp = t_4;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2 t_4 = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + 9.0) tmp = 0 if x1 <= -1.22e+53: tmp = t_1 elif x1 <= -0.0011: tmp = t_4 elif x1 <= 1.1e-27: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))) elif x1 <= 4.2e+69: tmp = t_4 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_0 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + 9.0)) tmp = 0.0 if (x1 <= -1.22e+53) tmp = t_1; elseif (x1 <= -0.0011) tmp = t_4; elseif (x1 <= 1.1e-27) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * Float64(2.0 * x2)) + Float64(x1 * -3.0))))))); elseif (x1 <= 4.2e+69) tmp = t_4; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2; t_4 = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + 9.0); tmp = 0.0; if (x1 <= -1.22e+53) tmp = t_1; elseif (x1 <= -0.0011) tmp = t_4; elseif (x1 <= 1.1e-27) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))); elseif (x1 <= 4.2e+69) tmp = t_4; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.22e+53], t$95$1, If[LessEqual[x1, -0.0011], t$95$4, If[LessEqual[x1, 1.1e-27], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e+69], t$95$4, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2}\\
t_4 := x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right)\right) + t_0 \cdot t_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 9\right)\\
\mathbf{if}\;x1 \leq -1.22 \cdot 10^{+53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -0.0011:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x1 \leq 1.1 \cdot 10^{-27}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2\right) + x1 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{+69}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x1 < -1.21999999999999999e53 or 4.2000000000000003e69 < x1 Initial program 32.9%
Taylor expanded in x1 around inf 39.4%
*-commutative39.4%
Simplified39.4%
Taylor expanded in x1 around inf 98.1%
if -1.21999999999999999e53 < x1 < -0.00110000000000000007 or 1.09999999999999993e-27 < x1 < 4.2000000000000003e69Initial program 96.2%
Taylor expanded in x1 around inf 96.3%
if -0.00110000000000000007 < x1 < 1.09999999999999993e-27Initial program 99.3%
Taylor expanded in x1 around 0 87.7%
associate-*r*99.3%
sub-neg99.3%
metadata-eval99.3%
distribute-rgt-in99.3%
*-commutative99.3%
Applied egg-rr99.3%
*-commutative99.3%
associate-*r*99.3%
associate-*r*99.3%
distribute-rgt-out99.3%
*-commutative99.3%
*-commutative99.3%
Applied egg-rr99.3%
Final simplification98.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
(if (<= x1 -2.6e+34)
t_0
(if (<= x1 58000000000.0)
(+ x1 (+ t_4 (+ x1 (* 4.0 (* x2 (+ (* x1 (* 2.0 x2)) (* x1 -3.0)))))))
(if (<= x1 4.2e+69)
(+
x1
(+
t_4
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_3)
(* t_2 (+ (* x1 2.0) (* (* x1 x1) (- (* t_3 4.0) 6.0)))))))))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if (x1 <= -2.6e+34) {
tmp = t_0;
} else if (x1 <= 58000000000.0) {
tmp = x1 + (t_4 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 4.2e+69) {
tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_3) + (t_2 * ((x1 * 2.0) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))))))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
t_4 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)
if (x1 <= (-2.6d+34)) then
tmp = t_0
else if (x1 <= 58000000000.0d0) then
tmp = x1 + (t_4 + (x1 + (4.0d0 * (x2 * ((x1 * (2.0d0 * x2)) + (x1 * (-3.0d0)))))))
else if (x1 <= 4.2d+69) then
tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_3) + (t_2 * ((x1 * 2.0d0) + ((x1 * x1) * ((t_3 * 4.0d0) - 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 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if (x1 <= -2.6e+34) {
tmp = t_0;
} else if (x1 <= 58000000000.0) {
tmp = x1 + (t_4 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 4.2e+69) {
tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_3) + (t_2 * ((x1 * 2.0) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))))))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2) tmp = 0 if x1 <= -2.6e+34: tmp = t_0 elif x1 <= 58000000000.0: tmp = x1 + (t_4 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))) elif x1 <= 4.2e+69: tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_3) + (t_2 * ((x1 * 2.0) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))))))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) tmp = 0.0 if (x1 <= -2.6e+34) tmp = t_0; elseif (x1 <= 58000000000.0) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * Float64(2.0 * x2)) + Float64(x1 * -3.0))))))); elseif (x1 <= 4.2e+69) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * t_3) + Float64(t_2 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0))))))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_4 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2); tmp = 0.0; if (x1 <= -2.6e+34) tmp = t_0; elseif (x1 <= 58000000000.0) tmp = x1 + (t_4 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))); elseif (x1 <= 4.2e+69) tmp = x1 + (t_4 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_3) + (t_2 * ((x1 * 2.0) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))))))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.6e+34], t$95$0, If[LessEqual[x1, 58000000000.0], N[(x1 + N[(t$95$4 + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.2e+69], N[(x1 + N[(t$95$4 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * t$95$3), $MachinePrecision] + N[(t$95$2 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2}\\
t_4 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\\
\mathbf{if}\;x1 \leq -2.6 \cdot 10^{+34}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 58000000000:\\
\;\;\;\;x1 + \left(t_4 + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2\right) + x1 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{+69}:\\
\;\;\;\;x1 + \left(t_4 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot t_3 + t_2 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x1 < -2.59999999999999997e34 or 4.2000000000000003e69 < x1 Initial program 36.4%
Taylor expanded in x1 around inf 40.6%
*-commutative40.6%
Simplified40.6%
Taylor expanded in x1 around inf 96.3%
if -2.59999999999999997e34 < x1 < 5.8e10Initial program 98.5%
Taylor expanded in x1 around 0 84.4%
associate-*r*94.8%
sub-neg94.8%
metadata-eval94.8%
distribute-rgt-in94.8%
*-commutative94.8%
Applied egg-rr94.8%
*-commutative94.8%
associate-*r*94.8%
associate-*r*94.8%
distribute-rgt-out94.8%
*-commutative94.8%
*-commutative94.8%
Applied egg-rr94.8%
if 5.8e10 < x1 < 4.2000000000000003e69Initial program 99.1%
Taylor expanded in x1 around 0 78.4%
Taylor expanded in x1 around inf 88.7%
*-commutative88.7%
Simplified88.7%
Final simplification95.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0))
(t_3 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0)))
(t_4 (* t_1 t_2))
(t_5 (+ x1 (* x2 6.0)))
(t_6 (* x1 (* x1 x1)))
(t_7 (* (* x1 x1) (- (* t_2 4.0) 6.0))))
(if (<= x1 -6e+124)
(- (/ x1 (/ t_5 x1)) (/ 36.0 (/ t_5 (* x2 x2))))
(if (<= x1 -0.47)
(+
x1
(+
9.0
(+
x1
(+
t_6
(+
t_4
(*
t_0
(+ t_7 (* (- t_2 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1))))))))))
(if (<= x1 30500000.0)
(+ x1 (+ t_3 (+ x1 (* 4.0 (* x2 (+ (* x1 (* 2.0 x2)) (* x1 -3.0)))))))
(if (<= x1 1.35e+154)
(+ x1 (+ t_3 (+ x1 (+ t_6 (+ t_4 (* t_0 (+ (* x1 2.0) t_7)))))))
(/ (- (* 36.0 (* x2 x2)) (* x1 x1)) (- (* x2 -6.0) x1))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double t_4 = t_1 * t_2;
double t_5 = x1 + (x2 * 6.0);
double t_6 = x1 * (x1 * x1);
double t_7 = (x1 * x1) * ((t_2 * 4.0) - 6.0);
double tmp;
if (x1 <= -6e+124) {
tmp = (x1 / (t_5 / x1)) - (36.0 / (t_5 / (x2 * x2)));
} else if (x1 <= -0.47) {
tmp = x1 + (9.0 + (x1 + (t_6 + (t_4 + (t_0 * (t_7 + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else if (x1 <= 30500000.0) {
tmp = x1 + (t_3 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 1.35e+154) {
tmp = x1 + (t_3 + (x1 + (t_6 + (t_4 + (t_0 * ((x1 * 2.0) + t_7))))));
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
t_3 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)
t_4 = t_1 * t_2
t_5 = x1 + (x2 * 6.0d0)
t_6 = x1 * (x1 * x1)
t_7 = (x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)
if (x1 <= (-6d+124)) then
tmp = (x1 / (t_5 / x1)) - (36.0d0 / (t_5 / (x2 * x2)))
else if (x1 <= (-0.47d0)) then
tmp = x1 + (9.0d0 + (x1 + (t_6 + (t_4 + (t_0 * (t_7 + ((t_2 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1)))))))))
else if (x1 <= 30500000.0d0) then
tmp = x1 + (t_3 + (x1 + (4.0d0 * (x2 * ((x1 * (2.0d0 * x2)) + (x1 * (-3.0d0)))))))
else if (x1 <= 1.35d+154) then
tmp = x1 + (t_3 + (x1 + (t_6 + (t_4 + (t_0 * ((x1 * 2.0d0) + t_7))))))
else
tmp = ((36.0d0 * (x2 * x2)) - (x1 * x1)) / ((x2 * (-6.0d0)) - x1)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double t_4 = t_1 * t_2;
double t_5 = x1 + (x2 * 6.0);
double t_6 = x1 * (x1 * x1);
double t_7 = (x1 * x1) * ((t_2 * 4.0) - 6.0);
double tmp;
if (x1 <= -6e+124) {
tmp = (x1 / (t_5 / x1)) - (36.0 / (t_5 / (x2 * x2)));
} else if (x1 <= -0.47) {
tmp = x1 + (9.0 + (x1 + (t_6 + (t_4 + (t_0 * (t_7 + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else if (x1 <= 30500000.0) {
tmp = x1 + (t_3 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 1.35e+154) {
tmp = x1 + (t_3 + (x1 + (t_6 + (t_4 + (t_0 * ((x1 * 2.0) + t_7))))));
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0) t_4 = t_1 * t_2 t_5 = x1 + (x2 * 6.0) t_6 = x1 * (x1 * x1) t_7 = (x1 * x1) * ((t_2 * 4.0) - 6.0) tmp = 0 if x1 <= -6e+124: tmp = (x1 / (t_5 / x1)) - (36.0 / (t_5 / (x2 * x2))) elif x1 <= -0.47: tmp = x1 + (9.0 + (x1 + (t_6 + (t_4 + (t_0 * (t_7 + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))) elif x1 <= 30500000.0: tmp = x1 + (t_3 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))) elif x1 <= 1.35e+154: tmp = x1 + (t_3 + (x1 + (t_6 + (t_4 + (t_0 * ((x1 * 2.0) + t_7)))))) else: tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) t_4 = Float64(t_1 * t_2) t_5 = Float64(x1 + Float64(x2 * 6.0)) t_6 = Float64(x1 * Float64(x1 * x1)) t_7 = Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) tmp = 0.0 if (x1 <= -6e+124) tmp = Float64(Float64(x1 / Float64(t_5 / x1)) - Float64(36.0 / Float64(t_5 / Float64(x2 * x2)))); elseif (x1 <= -0.47) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_6 + Float64(t_4 + Float64(t_0 * Float64(t_7 + Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)))))))))); elseif (x1 <= 30500000.0) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * Float64(2.0 * x2)) + Float64(x1 * -3.0))))))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_6 + Float64(t_4 + Float64(t_0 * Float64(Float64(x1 * 2.0) + t_7))))))); else tmp = Float64(Float64(Float64(36.0 * Float64(x2 * x2)) - Float64(x1 * x1)) / Float64(Float64(x2 * -6.0) - x1)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0); t_4 = t_1 * t_2; t_5 = x1 + (x2 * 6.0); t_6 = x1 * (x1 * x1); t_7 = (x1 * x1) * ((t_2 * 4.0) - 6.0); tmp = 0.0; if (x1 <= -6e+124) tmp = (x1 / (t_5 / x1)) - (36.0 / (t_5 / (x2 * x2))); elseif (x1 <= -0.47) tmp = x1 + (9.0 + (x1 + (t_6 + (t_4 + (t_0 * (t_7 + ((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))); elseif (x1 <= 30500000.0) tmp = x1 + (t_3 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))); elseif (x1 <= 1.35e+154) tmp = x1 + (t_3 + (x1 + (t_6 + (t_4 + (t_0 * ((x1 * 2.0) + t_7)))))); else tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6e+124], N[(N[(x1 / N[(t$95$5 / x1), $MachinePrecision]), $MachinePrecision] - N[(36.0 / N[(t$95$5 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.47], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$6 + N[(t$95$4 + N[(t$95$0 * N[(t$95$7 + N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 30500000.0], N[(x1 + N[(t$95$3 + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$6 + N[(t$95$4 + N[(t$95$0 * N[(N[(x1 * 2.0), $MachinePrecision] + t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_0}\\
t_3 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0}\\
t_4 := t_1 \cdot t_2\\
t_5 := x1 + x2 \cdot 6\\
t_6 := x1 \cdot \left(x1 \cdot x1\right)\\
t_7 := \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\\
\mathbf{if}\;x1 \leq -6 \cdot 10^{+124}:\\
\;\;\;\;\frac{x1}{\frac{t_5}{x1}} - \frac{36}{\frac{t_5}{x2 \cdot x2}}\\
\mathbf{elif}\;x1 \leq -0.47:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t_6 + \left(t_4 + t_0 \cdot \left(t_7 + \left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 30500000:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2\right) + x1 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_6 + \left(t_4 + t_0 \cdot \left(x1 \cdot 2 + t_7\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{36 \cdot \left(x2 \cdot x2\right) - x1 \cdot x1}{x2 \cdot -6 - x1}\\
\end{array}
\end{array}
if x1 < -5.9999999999999999e124Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 1.1%
*-commutative1.1%
Simplified1.1%
flip-+7.0%
div-sub7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
*-commutative7.0%
*-commutative7.0%
swap-sqr7.0%
metadata-eval7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
Applied egg-rr7.0%
associate-/l*28.0%
unpow228.0%
associate-/l*28.0%
unpow228.0%
Simplified28.0%
if -5.9999999999999999e124 < x1 < -0.46999999999999997Initial program 92.0%
Taylor expanded in x1 around 0 79.7%
Taylor expanded in x1 around inf 79.7%
if -0.46999999999999997 < x1 < 3.05e7Initial program 98.5%
Taylor expanded in x1 around 0 87.3%
associate-*r*98.5%
sub-neg98.5%
metadata-eval98.5%
distribute-rgt-in98.5%
*-commutative98.5%
Applied egg-rr98.5%
*-commutative98.5%
associate-*r*98.5%
associate-*r*98.5%
distribute-rgt-out98.5%
*-commutative98.5%
*-commutative98.5%
Applied egg-rr98.5%
if 3.05e7 < x1 < 1.35000000000000003e154Initial program 97.1%
Taylor expanded in x1 around 0 84.9%
Taylor expanded in x1 around inf 93.5%
*-commutative93.5%
Simplified93.5%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.8%
*-commutative6.8%
Simplified6.8%
+-commutative6.8%
flip-+74.1%
*-commutative74.1%
*-commutative74.1%
swap-sqr74.1%
metadata-eval74.1%
Applied egg-rr74.1%
Final simplification81.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x2 6.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2)))
(t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_5
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 t_4)
(* t_2 (+ (* x1 2.0) (* (* x1 x1) (- (* t_4 4.0) 6.0)))))))))))
(if (<= x1 -1.22e+125)
(- (/ x1 (/ t_0 x1)) (/ 36.0 (/ t_0 (* x2 x2))))
(if (<= x1 -22000000000000.0)
t_5
(if (<= x1 1450000000.0)
(+ x1 (+ t_3 (+ x1 (* 4.0 (* x2 (+ (* x1 (* 2.0 x2)) (* x1 -3.0)))))))
(if (<= x1 1.35e+154)
t_5
(/ (- (* 36.0 (* x2 x2)) (* x1 x1)) (- (* x2 -6.0) x1))))))))
double code(double x1, double x2) {
double t_0 = x1 + (x2 * 6.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_4) + (t_2 * ((x1 * 2.0) + ((x1 * x1) * ((t_4 * 4.0) - 6.0))))))));
double tmp;
if (x1 <= -1.22e+125) {
tmp = (x1 / (t_0 / x1)) - (36.0 / (t_0 / (x2 * x2)));
} else if (x1 <= -22000000000000.0) {
tmp = t_5;
} else if (x1 <= 1450000000.0) {
tmp = x1 + (t_3 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 1.35e+154) {
tmp = t_5;
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 + (x2 * 6.0d0)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)
t_4 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_4) + (t_2 * ((x1 * 2.0d0) + ((x1 * x1) * ((t_4 * 4.0d0) - 6.0d0))))))))
if (x1 <= (-1.22d+125)) then
tmp = (x1 / (t_0 / x1)) - (36.0d0 / (t_0 / (x2 * x2)))
else if (x1 <= (-22000000000000.0d0)) then
tmp = t_5
else if (x1 <= 1450000000.0d0) then
tmp = x1 + (t_3 + (x1 + (4.0d0 * (x2 * ((x1 * (2.0d0 * x2)) + (x1 * (-3.0d0)))))))
else if (x1 <= 1.35d+154) then
tmp = t_5
else
tmp = ((36.0d0 * (x2 * x2)) - (x1 * x1)) / ((x2 * (-6.0d0)) - x1)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x2 * 6.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_4) + (t_2 * ((x1 * 2.0) + ((x1 * x1) * ((t_4 * 4.0) - 6.0))))))));
double tmp;
if (x1 <= -1.22e+125) {
tmp = (x1 / (t_0 / x1)) - (36.0 / (t_0 / (x2 * x2)));
} else if (x1 <= -22000000000000.0) {
tmp = t_5;
} else if (x1 <= 1450000000.0) {
tmp = x1 + (t_3 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 1.35e+154) {
tmp = t_5;
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x2 * 6.0) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2) t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_4) + (t_2 * ((x1 * 2.0) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))))))) tmp = 0 if x1 <= -1.22e+125: tmp = (x1 / (t_0 / x1)) - (36.0 / (t_0 / (x2 * x2))) elif x1 <= -22000000000000.0: tmp = t_5 elif x1 <= 1450000000.0: tmp = x1 + (t_3 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))) elif x1 <= 1.35e+154: tmp = t_5 else: tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x2 * 6.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_5 = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * t_4) + Float64(t_2 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0))))))))) tmp = 0.0 if (x1 <= -1.22e+125) tmp = Float64(Float64(x1 / Float64(t_0 / x1)) - Float64(36.0 / Float64(t_0 / Float64(x2 * x2)))); elseif (x1 <= -22000000000000.0) tmp = t_5; elseif (x1 <= 1450000000.0) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * Float64(2.0 * x2)) + Float64(x1 * -3.0))))))); elseif (x1 <= 1.35e+154) tmp = t_5; else tmp = Float64(Float64(Float64(36.0 * Float64(x2 * x2)) - Float64(x1 * x1)) / Float64(Float64(x2 * -6.0) - x1)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x2 * 6.0); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2); t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_5 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * t_4) + (t_2 * ((x1 * 2.0) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))))))); tmp = 0.0; if (x1 <= -1.22e+125) tmp = (x1 / (t_0 / x1)) - (36.0 / (t_0 / (x2 * x2))); elseif (x1 <= -22000000000000.0) tmp = t_5; elseif (x1 <= 1450000000.0) tmp = x1 + (t_3 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))); elseif (x1 <= 1.35e+154) tmp = t_5; else tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = 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[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.22e+125], N[(N[(x1 / N[(t$95$0 / x1), $MachinePrecision]), $MachinePrecision] - N[(36.0 / N[(t$95$0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -22000000000000.0], t$95$5, If[LessEqual[x1, 1450000000.0], N[(x1 + N[(t$95$3 + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], t$95$5, N[(N[(N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x2 \cdot 6\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\\
t_4 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2}\\
t_5 := x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot t_4 + t_2 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(t_4 \cdot 4 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.22 \cdot 10^{+125}:\\
\;\;\;\;\frac{x1}{\frac{t_0}{x1}} - \frac{36}{\frac{t_0}{x2 \cdot x2}}\\
\mathbf{elif}\;x1 \leq -22000000000000:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq 1450000000:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2\right) + x1 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;\frac{36 \cdot \left(x2 \cdot x2\right) - x1 \cdot x1}{x2 \cdot -6 - x1}\\
\end{array}
\end{array}
if x1 < -1.22e125Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 1.1%
*-commutative1.1%
Simplified1.1%
flip-+7.0%
div-sub7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
*-commutative7.0%
*-commutative7.0%
swap-sqr7.0%
metadata-eval7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
Applied egg-rr7.0%
associate-/l*28.0%
unpow228.0%
associate-/l*28.0%
unpow228.0%
Simplified28.0%
if -1.22e125 < x1 < -2.2e13 or 1.45e9 < x1 < 1.35000000000000003e154Initial program 94.8%
Taylor expanded in x1 around 0 85.6%
Taylor expanded in x1 around inf 89.3%
*-commutative89.3%
Simplified89.3%
if -2.2e13 < x1 < 1.45e9Initial program 98.5%
Taylor expanded in x1 around 0 85.5%
associate-*r*96.2%
sub-neg96.2%
metadata-eval96.2%
distribute-rgt-in96.2%
*-commutative96.2%
Applied egg-rr96.2%
*-commutative96.2%
associate-*r*96.2%
associate-*r*96.2%
distribute-rgt-out96.2%
*-commutative96.2%
*-commutative96.2%
Applied egg-rr96.2%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.8%
*-commutative6.8%
Simplified6.8%
+-commutative6.8%
flip-+74.1%
*-commutative74.1%
*-commutative74.1%
swap-sqr74.1%
metadata-eval74.1%
Applied egg-rr74.1%
Final simplification80.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (+ x1 (* x2 6.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0))
(t_4
(+
x1
(+
9.0
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 t_3)
(*
t_0
(+
(* (* x1 x1) (- (* t_3 4.0) 6.0))
(* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))))))))))
(if (<= x1 -9.8e+124)
(- (/ x1 (/ t_1 x1)) (/ 36.0 (/ t_1 (* x2 x2))))
(if (<= x1 -4.4e-27)
t_4
(if (<= x1 4.8e+21)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x2 (+ (* x1 (* 2.0 x2)) (* x1 -3.0)))))))
(if (<= x1 1.35e+154)
t_4
(/ (- (* 36.0 (* x2 x2)) (* x1 x1)) (- (* x2 -6.0) x1))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + (x2 * 6.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))));
double tmp;
if (x1 <= -9.8e+124) {
tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2)));
} else if (x1 <= -4.4e-27) {
tmp = t_4;
} else if (x1 <= 4.8e+21) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 1.35e+154) {
tmp = t_4;
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 + (x2 * 6.0d0)
t_2 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
t_4 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_0 * (((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)) + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))))))))
if (x1 <= (-9.8d+124)) then
tmp = (x1 / (t_1 / x1)) - (36.0d0 / (t_1 / (x2 * x2)))
else if (x1 <= (-4.4d-27)) then
tmp = t_4
else if (x1 <= 4.8d+21) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x2 * ((x1 * (2.0d0 * x2)) + (x1 * (-3.0d0)))))))
else if (x1 <= 1.35d+154) then
tmp = t_4
else
tmp = ((36.0d0 * (x2 * x2)) - (x1 * x1)) / ((x2 * (-6.0d0)) - x1)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + (x2 * 6.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))));
double tmp;
if (x1 <= -9.8e+124) {
tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2)));
} else if (x1 <= -4.4e-27) {
tmp = t_4;
} else if (x1 <= 4.8e+21) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 1.35e+154) {
tmp = t_4;
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 + (x2 * 6.0) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0 t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))))) tmp = 0 if x1 <= -9.8e+124: tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2))) elif x1 <= -4.4e-27: tmp = t_4 elif x1 <= 4.8e+21: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))) elif x1 <= 1.35e+154: tmp = t_4 else: tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 + Float64(x2 * 6.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) t_4 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * t_3) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))))))))) tmp = 0.0 if (x1 <= -9.8e+124) tmp = Float64(Float64(x1 / Float64(t_1 / x1)) - Float64(36.0 / Float64(t_1 / Float64(x2 * x2)))); elseif (x1 <= -4.4e-27) tmp = t_4; elseif (x1 <= 4.8e+21) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * Float64(2.0 * x2)) + Float64(x1 * -3.0))))))); elseif (x1 <= 1.35e+154) tmp = t_4; else tmp = Float64(Float64(Float64(36.0 * Float64(x2 * x2)) - Float64(x1 * x1)) / Float64(Float64(x2 * -6.0) - x1)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 + (x2 * 6.0); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0; t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_2 * t_3) + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))))); tmp = 0.0; if (x1 <= -9.8e+124) tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2))); elseif (x1 <= -4.4e-27) tmp = t_4; elseif (x1 <= 4.8e+21) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))); elseif (x1 <= 1.35e+154) tmp = t_4; else tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -9.8e+124], N[(N[(x1 / N[(t$95$1 / x1), $MachinePrecision]), $MachinePrecision] - N[(36.0 / N[(t$95$1 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.4e-27], t$95$4, If[LessEqual[x1, 4.8e+21], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], t$95$4, N[(N[(N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 + x2 \cdot 6\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_0}\\
t_4 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_2 \cdot t_3 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right) + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -9.8 \cdot 10^{+124}:\\
\;\;\;\;\frac{x1}{\frac{t_1}{x1}} - \frac{36}{\frac{t_1}{x2 \cdot x2}}\\
\mathbf{elif}\;x1 \leq -4.4 \cdot 10^{-27}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{+21}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2\right) + x1 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;\frac{36 \cdot \left(x2 \cdot x2\right) - x1 \cdot x1}{x2 \cdot -6 - x1}\\
\end{array}
\end{array}
if x1 < -9.80000000000000069e124Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 1.1%
*-commutative1.1%
Simplified1.1%
flip-+7.0%
div-sub7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
*-commutative7.0%
*-commutative7.0%
swap-sqr7.0%
metadata-eval7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
Applied egg-rr7.0%
associate-/l*28.0%
unpow228.0%
associate-/l*28.0%
unpow228.0%
Simplified28.0%
if -9.80000000000000069e124 < x1 < -4.39999999999999974e-27 or 4.8e21 < x1 < 1.35000000000000003e154Initial program 95.1%
Taylor expanded in x1 around 0 84.3%
Taylor expanded in x1 around 0 81.8%
Taylor expanded in x1 around inf 81.8%
if -4.39999999999999974e-27 < x1 < 4.8e21Initial program 98.4%
Taylor expanded in x1 around 0 86.5%
associate-*r*97.7%
sub-neg97.7%
metadata-eval97.7%
distribute-rgt-in97.7%
*-commutative97.7%
Applied egg-rr97.7%
*-commutative97.7%
associate-*r*97.7%
associate-*r*97.7%
distribute-rgt-out97.7%
*-commutative97.7%
*-commutative97.7%
Applied egg-rr97.7%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.8%
*-commutative6.8%
Simplified6.8%
+-commutative6.8%
flip-+74.1%
*-commutative74.1%
*-commutative74.1%
swap-sqr74.1%
metadata-eval74.1%
Applied egg-rr74.1%
Final simplification79.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x2 6.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2)))
(t_4
(+
x1
(+
t_3
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_1 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(* t_2 (* x1 (* x1 6.0))))))))))
(if (<= x1 -5.6e+102)
(- (/ x1 (/ t_0 x1)) (/ 36.0 (/ t_0 (* x2 x2))))
(if (<= x1 -5.2e+16)
t_4
(if (<= x1 16200000000.0)
(+ x1 (+ t_3 (+ x1 (* 4.0 (* x2 (+ (* x1 (* 2.0 x2)) (* x1 -3.0)))))))
(if (<= x1 1.35e+154)
t_4
(/ (- (* 36.0 (* x2 x2)) (* x1 x1)) (- (* x2 -6.0) x1))))))))
double code(double x1, double x2) {
double t_0 = x1 + (x2 * 6.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double t_4 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + (t_2 * (x1 * (x1 * 6.0)))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = (x1 / (t_0 / x1)) - (36.0 / (t_0 / (x2 * x2)));
} else if (x1 <= -5.2e+16) {
tmp = t_4;
} else if (x1 <= 16200000000.0) {
tmp = x1 + (t_3 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 1.35e+154) {
tmp = t_4;
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 + (x2 * 6.0d0)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)
t_4 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0d0 * x2)) - x1) / t_2)) + (t_2 * (x1 * (x1 * 6.0d0)))))))
if (x1 <= (-5.6d+102)) then
tmp = (x1 / (t_0 / x1)) - (36.0d0 / (t_0 / (x2 * x2)))
else if (x1 <= (-5.2d+16)) then
tmp = t_4
else if (x1 <= 16200000000.0d0) then
tmp = x1 + (t_3 + (x1 + (4.0d0 * (x2 * ((x1 * (2.0d0 * x2)) + (x1 * (-3.0d0)))))))
else if (x1 <= 1.35d+154) then
tmp = t_4
else
tmp = ((36.0d0 * (x2 * x2)) - (x1 * x1)) / ((x2 * (-6.0d0)) - x1)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x2 * 6.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double t_4 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + (t_2 * (x1 * (x1 * 6.0)))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = (x1 / (t_0 / x1)) - (36.0 / (t_0 / (x2 * x2)));
} else if (x1 <= -5.2e+16) {
tmp = t_4;
} else if (x1 <= 16200000000.0) {
tmp = x1 + (t_3 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 1.35e+154) {
tmp = t_4;
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x2 * 6.0) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2) t_4 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + (t_2 * (x1 * (x1 * 6.0))))))) tmp = 0 if x1 <= -5.6e+102: tmp = (x1 / (t_0 / x1)) - (36.0 / (t_0 / (x2 * x2))) elif x1 <= -5.2e+16: tmp = t_4 elif x1 <= 16200000000.0: tmp = x1 + (t_3 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))) elif x1 <= 1.35e+154: tmp = t_4 else: tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x2 * 6.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2)) + Float64(t_2 * Float64(x1 * Float64(x1 * 6.0)))))))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(Float64(x1 / Float64(t_0 / x1)) - Float64(36.0 / Float64(t_0 / Float64(x2 * x2)))); elseif (x1 <= -5.2e+16) tmp = t_4; elseif (x1 <= 16200000000.0) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * Float64(2.0 * x2)) + Float64(x1 * -3.0))))))); elseif (x1 <= 1.35e+154) tmp = t_4; else tmp = Float64(Float64(Float64(36.0 * Float64(x2 * x2)) - Float64(x1 * x1)) / Float64(Float64(x2 * -6.0) - x1)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x2 * 6.0); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2); t_4 = x1 + (t_3 + (x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + (t_2 * (x1 * (x1 * 6.0))))))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = (x1 / (t_0 / x1)) - (36.0 / (t_0 / (x2 * x2))); elseif (x1 <= -5.2e+16) tmp = t_4; elseif (x1 <= 16200000000.0) tmp = x1 + (t_3 + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))); elseif (x1 <= 1.35e+154) tmp = t_4; else tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(t$95$3 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(N[(x1 / N[(t$95$0 / x1), $MachinePrecision]), $MachinePrecision] - N[(36.0 / N[(t$95$0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.2e+16], t$95$4, If[LessEqual[x1, 16200000000.0], N[(x1 + N[(t$95$3 + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], t$95$4, N[(N[(N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x2 \cdot 6\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\\
t_4 := x1 + \left(t_3 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2} + t_2 \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{x1}{\frac{t_0}{x1}} - \frac{36}{\frac{t_0}{x2 \cdot x2}}\\
\mathbf{elif}\;x1 \leq -5.2 \cdot 10^{+16}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x1 \leq 16200000000:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2\right) + x1 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;\frac{36 \cdot \left(x2 \cdot x2\right) - x1 \cdot x1}{x2 \cdot -6 - x1}\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 2.2%
Taylor expanded in x1 around 0 2.2%
Taylor expanded in x1 around 0 1.0%
*-commutative1.0%
Simplified1.0%
flip-+6.5%
div-sub6.5%
*-commutative6.5%
cancel-sign-sub-inv6.5%
metadata-eval6.5%
*-commutative6.5%
*-commutative6.5%
swap-sqr6.5%
metadata-eval6.5%
*-commutative6.5%
cancel-sign-sub-inv6.5%
metadata-eval6.5%
Applied egg-rr6.5%
associate-/l*26.2%
unpow226.2%
associate-/l*26.2%
unpow226.2%
Simplified26.2%
if -5.60000000000000037e102 < x1 < -5.2e16 or 1.62e10 < x1 < 1.35000000000000003e154Initial program 97.8%
Taylor expanded in x1 around 0 88.2%
Taylor expanded in x1 around 0 85.1%
Taylor expanded in x1 around inf 81.4%
*-commutative81.4%
unpow281.4%
associate-*r*81.5%
Simplified81.5%
if -5.2e16 < x1 < 1.62e10Initial program 98.5%
Taylor expanded in x1 around 0 85.5%
associate-*r*96.2%
sub-neg96.2%
metadata-eval96.2%
distribute-rgt-in96.2%
*-commutative96.2%
Applied egg-rr96.2%
*-commutative96.2%
associate-*r*96.2%
associate-*r*96.2%
distribute-rgt-out96.2%
*-commutative96.2%
*-commutative96.2%
Applied egg-rr96.2%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.8%
*-commutative6.8%
Simplified6.8%
+-commutative6.8%
flip-+74.1%
*-commutative74.1%
*-commutative74.1%
swap-sqr74.1%
metadata-eval74.1%
Applied egg-rr74.1%
Final simplification77.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 36.0 (* x2 x2))) (t_1 (+ x1 (* x2 6.0))))
(if (<= x1 -9e+124)
(- (/ x1 (/ t_1 x1)) (/ 36.0 (/ t_1 (* x2 x2))))
(if (<= x1 -1.45e-165)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))
(if (<= x1 1e-285)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 3.4e+114)
(+
x1
(+
(*
3.0
(/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* 2.0 (* x1 (* x2 x2)))))))
(if (<= x1 1.35e+154)
(/ (- (* (* x1 x1) t_1) (* t_1 t_0)) (* t_1 t_1))
(/ (- t_0 (* x1 x1)) (- (* x2 -6.0) x1)))))))))
double code(double x1, double x2) {
double t_0 = 36.0 * (x2 * x2);
double t_1 = x1 + (x2 * 6.0);
double tmp;
if (x1 <= -9e+124) {
tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2)));
} else if (x1 <= -1.45e-165) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else if (x1 <= 1e-285) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 3.4e+114) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2))))));
} else if (x1 <= 1.35e+154) {
tmp = (((x1 * x1) * t_1) - (t_1 * t_0)) / (t_1 * t_1);
} else {
tmp = (t_0 - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 36.0d0 * (x2 * x2)
t_1 = x1 + (x2 * 6.0d0)
if (x1 <= (-9d+124)) then
tmp = (x1 / (t_1 / x1)) - (36.0d0 / (t_1 / (x2 * x2)))
else if (x1 <= (-1.45d-165)) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
else if (x1 <= 1d-285) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= 3.4d+114) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (2.0d0 * (x1 * (x2 * x2))))))
else if (x1 <= 1.35d+154) then
tmp = (((x1 * x1) * t_1) - (t_1 * t_0)) / (t_1 * t_1)
else
tmp = (t_0 - (x1 * x1)) / ((x2 * (-6.0d0)) - x1)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 36.0 * (x2 * x2);
double t_1 = x1 + (x2 * 6.0);
double tmp;
if (x1 <= -9e+124) {
tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2)));
} else if (x1 <= -1.45e-165) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else if (x1 <= 1e-285) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 3.4e+114) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2))))));
} else if (x1 <= 1.35e+154) {
tmp = (((x1 * x1) * t_1) - (t_1 * t_0)) / (t_1 * t_1);
} else {
tmp = (t_0 - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
def code(x1, x2): t_0 = 36.0 * (x2 * x2) t_1 = x1 + (x2 * 6.0) tmp = 0 if x1 <= -9e+124: tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2))) elif x1 <= -1.45e-165: tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) elif x1 <= 1e-285: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= 3.4e+114: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2)))))) elif x1 <= 1.35e+154: tmp = (((x1 * x1) * t_1) - (t_1 * t_0)) / (t_1 * t_1) else: tmp = (t_0 - (x1 * x1)) / ((x2 * -6.0) - x1) return tmp
function code(x1, x2) t_0 = Float64(36.0 * Float64(x2 * x2)) t_1 = Float64(x1 + Float64(x2 * 6.0)) tmp = 0.0 if (x1 <= -9e+124) tmp = Float64(Float64(x1 / Float64(t_1 / x1)) - Float64(36.0 / Float64(t_1 / Float64(x2 * x2)))); elseif (x1 <= -1.45e-165) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))); elseif (x1 <= 1e-285) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= 3.4e+114) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(2.0 * Float64(x1 * Float64(x2 * x2))))))); elseif (x1 <= 1.35e+154) tmp = Float64(Float64(Float64(Float64(x1 * x1) * t_1) - Float64(t_1 * t_0)) / Float64(t_1 * t_1)); else tmp = Float64(Float64(t_0 - Float64(x1 * x1)) / Float64(Float64(x2 * -6.0) - x1)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 36.0 * (x2 * x2); t_1 = x1 + (x2 * 6.0); tmp = 0.0; if (x1 <= -9e+124) tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2))); elseif (x1 <= -1.45e-165) tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); elseif (x1 <= 1e-285) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= 3.4e+114) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2)))))); elseif (x1 <= 1.35e+154) tmp = (((x1 * x1) * t_1) - (t_1 * t_0)) / (t_1 * t_1); else tmp = (t_0 - (x1 * x1)) / ((x2 * -6.0) - x1); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -9e+124], N[(N[(x1 / N[(t$95$1 / x1), $MachinePrecision]), $MachinePrecision] - N[(36.0 / N[(t$95$1 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.45e-165], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e-285], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.4e+114], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(2.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(N[(N[(N[(x1 * x1), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(t$95$1 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 36 \cdot \left(x2 \cdot x2\right)\\
t_1 := x1 + x2 \cdot 6\\
\mathbf{if}\;x1 \leq -9 \cdot 10^{+124}:\\
\;\;\;\;\frac{x1}{\frac{t_1}{x1}} - \frac{36}{\frac{t_1}{x2 \cdot x2}}\\
\mathbf{elif}\;x1 \leq -1.45 \cdot 10^{-165}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{-285}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+114}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(2 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{\left(x1 \cdot x1\right) \cdot t_1 - t_1 \cdot t_0}{t_1 \cdot t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0 - x1 \cdot x1}{x2 \cdot -6 - x1}\\
\end{array}
\end{array}
if x1 < -9.0000000000000008e124Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 1.1%
*-commutative1.1%
Simplified1.1%
flip-+7.0%
div-sub7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
*-commutative7.0%
*-commutative7.0%
swap-sqr7.0%
metadata-eval7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
Applied egg-rr7.0%
associate-/l*28.0%
unpow228.0%
associate-/l*28.0%
unpow228.0%
Simplified28.0%
if -9.0000000000000008e124 < x1 < -1.45e-165Initial program 95.7%
Taylor expanded in x1 around 0 56.1%
Taylor expanded in x1 around 0 57.4%
fma-def57.4%
associate-*r*57.4%
*-commutative57.4%
fma-neg57.4%
metadata-eval57.4%
fma-neg57.4%
*-commutative57.4%
metadata-eval57.4%
Simplified57.4%
Taylor expanded in x1 around 0 57.4%
if -1.45e-165 < x1 < 1.00000000000000007e-285Initial program 99.3%
Taylor expanded in x1 around 0 78.3%
Taylor expanded in x1 around 0 78.7%
fma-def78.9%
associate-*r*78.9%
*-commutative78.9%
fma-neg78.9%
metadata-eval78.9%
fma-neg78.9%
*-commutative78.9%
metadata-eval78.9%
Simplified78.9%
Taylor expanded in x2 around 0 99.7%
if 1.00000000000000007e-285 < x1 < 3.4000000000000001e114Initial program 98.2%
Taylor expanded in x1 around 0 76.7%
Taylor expanded in x2 around inf 76.7%
unpow276.7%
Simplified76.7%
if 3.4000000000000001e114 < x1 < 1.35000000000000003e154Initial program 93.3%
Taylor expanded in x1 around 0 16.9%
Taylor expanded in x1 around 0 3.9%
*-commutative3.9%
Simplified3.9%
flip-+3.9%
div-sub3.9%
frac-sub80.0%
*-commutative80.0%
cancel-sign-sub-inv80.0%
metadata-eval80.0%
*-commutative80.0%
cancel-sign-sub-inv80.0%
metadata-eval80.0%
*-commutative80.0%
*-commutative80.0%
swap-sqr80.0%
metadata-eval80.0%
Applied egg-rr80.0%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.8%
*-commutative6.8%
Simplified6.8%
+-commutative6.8%
flip-+74.1%
*-commutative74.1%
*-commutative74.1%
swap-sqr74.1%
metadata-eval74.1%
Applied egg-rr74.1%
Final simplification66.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x2 6.0))))
(if (<= x1 -2.6e+125)
(- (/ x1 (/ t_0 x1)) (/ 36.0 (/ t_0 (* x2 x2))))
(if (<= x1 -8.4e-166)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))
(if (<= x1 4.9e-285)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 1.35e+154)
(+
x1
(+
(*
3.0
(/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* 2.0 (* x1 (* x2 x2)))))))
(/ (- (* 36.0 (* x2 x2)) (* x1 x1)) (- (* x2 -6.0) x1))))))))
double code(double x1, double x2) {
double t_0 = x1 + (x2 * 6.0);
double tmp;
if (x1 <= -2.6e+125) {
tmp = (x1 / (t_0 / x1)) - (36.0 / (t_0 / (x2 * x2)));
} else if (x1 <= -8.4e-166) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else if (x1 <= 4.9e-285) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2))))));
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x2 * 6.0d0)
if (x1 <= (-2.6d+125)) then
tmp = (x1 / (t_0 / x1)) - (36.0d0 / (t_0 / (x2 * x2)))
else if (x1 <= (-8.4d-166)) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
else if (x1 <= 4.9d-285) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= 1.35d+154) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (2.0d0 * (x1 * (x2 * x2))))))
else
tmp = ((36.0d0 * (x2 * x2)) - (x1 * x1)) / ((x2 * (-6.0d0)) - x1)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x2 * 6.0);
double tmp;
if (x1 <= -2.6e+125) {
tmp = (x1 / (t_0 / x1)) - (36.0 / (t_0 / (x2 * x2)));
} else if (x1 <= -8.4e-166) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else if (x1 <= 4.9e-285) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2))))));
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x2 * 6.0) tmp = 0 if x1 <= -2.6e+125: tmp = (x1 / (t_0 / x1)) - (36.0 / (t_0 / (x2 * x2))) elif x1 <= -8.4e-166: tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) elif x1 <= 4.9e-285: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= 1.35e+154: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2)))))) else: tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x2 * 6.0)) tmp = 0.0 if (x1 <= -2.6e+125) tmp = Float64(Float64(x1 / Float64(t_0 / x1)) - Float64(36.0 / Float64(t_0 / Float64(x2 * x2)))); elseif (x1 <= -8.4e-166) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))); elseif (x1 <= 4.9e-285) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(2.0 * Float64(x1 * Float64(x2 * x2))))))); else tmp = Float64(Float64(Float64(36.0 * Float64(x2 * x2)) - Float64(x1 * x1)) / Float64(Float64(x2 * -6.0) - x1)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x2 * 6.0); tmp = 0.0; if (x1 <= -2.6e+125) tmp = (x1 / (t_0 / x1)) - (36.0 / (t_0 / (x2 * x2))); elseif (x1 <= -8.4e-166) tmp = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); elseif (x1 <= 4.9e-285) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= 1.35e+154) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x1 * (x2 * x2)))))); else tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.6e+125], N[(N[(x1 / N[(t$95$0 / x1), $MachinePrecision]), $MachinePrecision] - N[(36.0 / N[(t$95$0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -8.4e-166], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.9e-285], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $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[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(2.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x2 \cdot 6\\
\mathbf{if}\;x1 \leq -2.6 \cdot 10^{+125}:\\
\;\;\;\;\frac{x1}{\frac{t_0}{x1}} - \frac{36}{\frac{t_0}{x2 \cdot x2}}\\
\mathbf{elif}\;x1 \leq -8.4 \cdot 10^{-166}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.9 \cdot 10^{-285}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(2 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{36 \cdot \left(x2 \cdot x2\right) - x1 \cdot x1}{x2 \cdot -6 - x1}\\
\end{array}
\end{array}
if x1 < -2.60000000000000003e125Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 1.1%
*-commutative1.1%
Simplified1.1%
flip-+7.0%
div-sub7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
*-commutative7.0%
*-commutative7.0%
swap-sqr7.0%
metadata-eval7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
Applied egg-rr7.0%
associate-/l*28.0%
unpow228.0%
associate-/l*28.0%
unpow228.0%
Simplified28.0%
if -2.60000000000000003e125 < x1 < -8.3999999999999998e-166Initial program 95.7%
Taylor expanded in x1 around 0 56.1%
Taylor expanded in x1 around 0 57.4%
fma-def57.4%
associate-*r*57.4%
*-commutative57.4%
fma-neg57.4%
metadata-eval57.4%
fma-neg57.4%
*-commutative57.4%
metadata-eval57.4%
Simplified57.4%
Taylor expanded in x1 around 0 57.4%
if -8.3999999999999998e-166 < x1 < 4.89999999999999975e-285Initial program 99.3%
Taylor expanded in x1 around 0 78.3%
Taylor expanded in x1 around 0 78.7%
fma-def78.9%
associate-*r*78.9%
*-commutative78.9%
fma-neg78.9%
metadata-eval78.9%
fma-neg78.9%
*-commutative78.9%
metadata-eval78.9%
Simplified78.9%
Taylor expanded in x2 around 0 99.7%
if 4.89999999999999975e-285 < x1 < 1.35000000000000003e154Initial program 97.5%
Taylor expanded in x1 around 0 67.9%
Taylor expanded in x2 around inf 67.9%
unpow267.9%
Simplified67.9%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.8%
*-commutative6.8%
Simplified6.8%
+-commutative6.8%
flip-+74.1%
*-commutative74.1%
*-commutative74.1%
swap-sqr74.1%
metadata-eval74.1%
Applied egg-rr74.1%
Final simplification63.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 36.0 (* x2 x2))) (t_1 (+ x1 (* x2 6.0))))
(if (<= x1 -4.6e+124)
(- (/ x1 (/ t_1 x1)) (/ 36.0 (/ t_1 (* x2 x2))))
(if (<= x1 3.4e+114)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* x2 (+ (* x1 (* 2.0 x2)) (* x1 -3.0)))))))
(if (<= x1 1.35e+154)
(/ (- (* (* x1 x1) t_1) (* t_1 t_0)) (* t_1 t_1))
(/ (- t_0 (* x1 x1)) (- (* x2 -6.0) x1)))))))
double code(double x1, double x2) {
double t_0 = 36.0 * (x2 * x2);
double t_1 = x1 + (x2 * 6.0);
double tmp;
if (x1 <= -4.6e+124) {
tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2)));
} else if (x1 <= 3.4e+114) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 1.35e+154) {
tmp = (((x1 * x1) * t_1) - (t_1 * t_0)) / (t_1 * t_1);
} else {
tmp = (t_0 - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 36.0d0 * (x2 * x2)
t_1 = x1 + (x2 * 6.0d0)
if (x1 <= (-4.6d+124)) then
tmp = (x1 / (t_1 / x1)) - (36.0d0 / (t_1 / (x2 * x2)))
else if (x1 <= 3.4d+114) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (x2 * ((x1 * (2.0d0 * x2)) + (x1 * (-3.0d0)))))))
else if (x1 <= 1.35d+154) then
tmp = (((x1 * x1) * t_1) - (t_1 * t_0)) / (t_1 * t_1)
else
tmp = (t_0 - (x1 * x1)) / ((x2 * (-6.0d0)) - x1)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 36.0 * (x2 * x2);
double t_1 = x1 + (x2 * 6.0);
double tmp;
if (x1 <= -4.6e+124) {
tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2)));
} else if (x1 <= 3.4e+114) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0))))));
} else if (x1 <= 1.35e+154) {
tmp = (((x1 * x1) * t_1) - (t_1 * t_0)) / (t_1 * t_1);
} else {
tmp = (t_0 - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
def code(x1, x2): t_0 = 36.0 * (x2 * x2) t_1 = x1 + (x2 * 6.0) tmp = 0 if x1 <= -4.6e+124: tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2))) elif x1 <= 3.4e+114: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))) elif x1 <= 1.35e+154: tmp = (((x1 * x1) * t_1) - (t_1 * t_0)) / (t_1 * t_1) else: tmp = (t_0 - (x1 * x1)) / ((x2 * -6.0) - x1) return tmp
function code(x1, x2) t_0 = Float64(36.0 * Float64(x2 * x2)) t_1 = Float64(x1 + Float64(x2 * 6.0)) tmp = 0.0 if (x1 <= -4.6e+124) tmp = Float64(Float64(x1 / Float64(t_1 / x1)) - Float64(36.0 / Float64(t_1 / Float64(x2 * x2)))); elseif (x1 <= 3.4e+114) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * Float64(2.0 * x2)) + Float64(x1 * -3.0))))))); elseif (x1 <= 1.35e+154) tmp = Float64(Float64(Float64(Float64(x1 * x1) * t_1) - Float64(t_1 * t_0)) / Float64(t_1 * t_1)); else tmp = Float64(Float64(t_0 - Float64(x1 * x1)) / Float64(Float64(x2 * -6.0) - x1)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 36.0 * (x2 * x2); t_1 = x1 + (x2 * 6.0); tmp = 0.0; if (x1 <= -4.6e+124) tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2))); elseif (x1 <= 3.4e+114) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (x2 * ((x1 * (2.0 * x2)) + (x1 * -3.0)))))); elseif (x1 <= 1.35e+154) tmp = (((x1 * x1) * t_1) - (t_1 * t_0)) / (t_1 * t_1); else tmp = (t_0 - (x1 * x1)) / ((x2 * -6.0) - x1); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.6e+124], N[(N[(x1 / N[(t$95$1 / x1), $MachinePrecision]), $MachinePrecision] - N[(36.0 / N[(t$95$1 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.4e+114], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(N[(N[(N[(x1 * x1), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(t$95$1 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 36 \cdot \left(x2 \cdot x2\right)\\
t_1 := x1 + x2 \cdot 6\\
\mathbf{if}\;x1 \leq -4.6 \cdot 10^{+124}:\\
\;\;\;\;\frac{x1}{\frac{t_1}{x1}} - \frac{36}{\frac{t_1}{x2 \cdot x2}}\\
\mathbf{elif}\;x1 \leq 3.4 \cdot 10^{+114}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2\right) + x1 \cdot -3\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{\left(x1 \cdot x1\right) \cdot t_1 - t_1 \cdot t_0}{t_1 \cdot t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0 - x1 \cdot x1}{x2 \cdot -6 - x1}\\
\end{array}
\end{array}
if x1 < -4.59999999999999969e124Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 1.1%
*-commutative1.1%
Simplified1.1%
flip-+7.0%
div-sub7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
*-commutative7.0%
*-commutative7.0%
swap-sqr7.0%
metadata-eval7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
Applied egg-rr7.0%
associate-/l*28.0%
unpow228.0%
associate-/l*28.0%
unpow228.0%
Simplified28.0%
if -4.59999999999999969e124 < x1 < 3.4000000000000001e114Initial program 97.6%
Taylor expanded in x1 around 0 70.2%
associate-*r*78.0%
sub-neg78.0%
metadata-eval78.0%
distribute-rgt-in76.2%
*-commutative76.2%
Applied egg-rr76.2%
*-commutative76.2%
associate-*r*76.2%
associate-*r*76.2%
distribute-rgt-out78.0%
*-commutative78.0%
*-commutative78.0%
Applied egg-rr78.0%
if 3.4000000000000001e114 < x1 < 1.35000000000000003e154Initial program 93.3%
Taylor expanded in x1 around 0 16.9%
Taylor expanded in x1 around 0 3.9%
*-commutative3.9%
Simplified3.9%
flip-+3.9%
div-sub3.9%
frac-sub80.0%
*-commutative80.0%
cancel-sign-sub-inv80.0%
metadata-eval80.0%
*-commutative80.0%
cancel-sign-sub-inv80.0%
metadata-eval80.0%
*-commutative80.0%
*-commutative80.0%
swap-sqr80.0%
metadata-eval80.0%
Applied egg-rr80.0%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 6.8%
*-commutative6.8%
Simplified6.8%
+-commutative6.8%
flip-+74.1%
*-commutative74.1%
*-commutative74.1%
swap-sqr74.1%
metadata-eval74.1%
Applied egg-rr74.1%
Final simplification69.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x2 -6.0) (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))))
(t_1 (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))))
(if (<= x1 -5.5e+66)
t_1
(if (<= x1 -8.4e-166)
t_0
(if (<= x1 4.9e-285)
t_1
(if (<= x1 7.6e+147)
t_0
(/ (- (* 36.0 (* x2 x2)) (* x1 x1)) (- (* x2 -6.0) x1))))))))
double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
double t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double tmp;
if (x1 <= -5.5e+66) {
tmp = t_1;
} else if (x1 <= -8.4e-166) {
tmp = t_0;
} else if (x1 <= 4.9e-285) {
tmp = t_1;
} else if (x1 <= 7.6e+147) {
tmp = t_0;
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
t_1 = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
if (x1 <= (-5.5d+66)) then
tmp = t_1
else if (x1 <= (-8.4d-166)) then
tmp = t_0
else if (x1 <= 4.9d-285) then
tmp = t_1
else if (x1 <= 7.6d+147) then
tmp = t_0
else
tmp = ((36.0d0 * (x2 * x2)) - (x1 * x1)) / ((x2 * (-6.0d0)) - x1)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
double t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double tmp;
if (x1 <= -5.5e+66) {
tmp = t_1;
} else if (x1 <= -8.4e-166) {
tmp = t_0;
} else if (x1 <= 4.9e-285) {
tmp = t_1;
} else if (x1 <= 7.6e+147) {
tmp = t_0;
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) tmp = 0 if x1 <= -5.5e+66: tmp = t_1 elif x1 <= -8.4e-166: tmp = t_0 elif x1 <= 4.9e-285: tmp = t_1 elif x1 <= 7.6e+147: tmp = t_0 else: tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1) return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))) t_1 = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))) tmp = 0.0 if (x1 <= -5.5e+66) tmp = t_1; elseif (x1 <= -8.4e-166) tmp = t_0; elseif (x1 <= 4.9e-285) tmp = t_1; elseif (x1 <= 7.6e+147) tmp = t_0; else tmp = Float64(Float64(Float64(36.0 * Float64(x2 * x2)) - Float64(x1 * x1)) / Float64(Float64(x2 * -6.0) - x1)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); tmp = 0.0; if (x1 <= -5.5e+66) tmp = t_1; elseif (x1 <= -8.4e-166) tmp = t_0; elseif (x1 <= 4.9e-285) tmp = t_1; elseif (x1 <= 7.6e+147) tmp = t_0; else tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+66], t$95$1, If[LessEqual[x1, -8.4e-166], t$95$0, If[LessEqual[x1, 4.9e-285], t$95$1, If[LessEqual[x1, 7.6e+147], t$95$0, N[(N[(N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot -6 + x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_1 := x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -8.4 \cdot 10^{-166}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 4.9 \cdot 10^{-285}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+147}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{36 \cdot \left(x2 \cdot x2\right) - x1 \cdot x1}{x2 \cdot -6 - x1}\\
\end{array}
\end{array}
if x1 < -5.5e66 or -8.3999999999999998e-166 < x1 < 4.89999999999999975e-285Initial program 43.5%
Taylor expanded in x1 around 0 28.7%
Taylor expanded in x1 around 0 30.7%
fma-def30.7%
associate-*r*30.7%
*-commutative30.7%
fma-neg30.7%
metadata-eval30.7%
fma-neg30.7%
*-commutative30.7%
metadata-eval30.7%
Simplified30.7%
Taylor expanded in x2 around 0 49.3%
if -5.5e66 < x1 < -8.3999999999999998e-166 or 4.89999999999999975e-285 < x1 < 7.59999999999999941e147Initial program 98.0%
Taylor expanded in x1 around 0 68.6%
Taylor expanded in x1 around 0 68.5%
fma-def69.3%
associate-*r*69.3%
*-commutative69.3%
fma-neg69.3%
metadata-eval69.3%
fma-neg69.3%
*-commutative69.3%
metadata-eval69.3%
Simplified69.3%
Taylor expanded in x1 around 0 68.5%
if 7.59999999999999941e147 < x1 Initial program 12.9%
Taylor expanded in x1 around 0 0.6%
Taylor expanded in x1 around 0 6.5%
*-commutative6.5%
Simplified6.5%
+-commutative6.5%
flip-+65.1%
*-commutative65.1%
*-commutative65.1%
swap-sqr65.1%
metadata-eval65.1%
Applied egg-rr65.1%
Final simplification62.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x2 -6.0) (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))))
(t_1 (+ x1 (* x2 6.0))))
(if (<= x1 -5.4e+124)
(- (/ x1 (/ t_1 x1)) (/ 36.0 (/ t_1 (* x2 x2))))
(if (<= x1 -8.4e-166)
t_0
(if (<= x1 4.9e-285)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 7.6e+147)
t_0
(/ (- (* 36.0 (* x2 x2)) (* x1 x1)) (- (* x2 -6.0) x1))))))))
double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
double t_1 = x1 + (x2 * 6.0);
double tmp;
if (x1 <= -5.4e+124) {
tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2)));
} else if (x1 <= -8.4e-166) {
tmp = t_0;
} else if (x1 <= 4.9e-285) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 7.6e+147) {
tmp = t_0;
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
t_1 = x1 + (x2 * 6.0d0)
if (x1 <= (-5.4d+124)) then
tmp = (x1 / (t_1 / x1)) - (36.0d0 / (t_1 / (x2 * x2)))
else if (x1 <= (-8.4d-166)) then
tmp = t_0
else if (x1 <= 4.9d-285) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= 7.6d+147) then
tmp = t_0
else
tmp = ((36.0d0 * (x2 * x2)) - (x1 * x1)) / ((x2 * (-6.0d0)) - x1)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
double t_1 = x1 + (x2 * 6.0);
double tmp;
if (x1 <= -5.4e+124) {
tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2)));
} else if (x1 <= -8.4e-166) {
tmp = t_0;
} else if (x1 <= 4.9e-285) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 7.6e+147) {
tmp = t_0;
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) t_1 = x1 + (x2 * 6.0) tmp = 0 if x1 <= -5.4e+124: tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2))) elif x1 <= -8.4e-166: tmp = t_0 elif x1 <= 4.9e-285: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= 7.6e+147: tmp = t_0 else: tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1) return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))) t_1 = Float64(x1 + Float64(x2 * 6.0)) tmp = 0.0 if (x1 <= -5.4e+124) tmp = Float64(Float64(x1 / Float64(t_1 / x1)) - Float64(36.0 / Float64(t_1 / Float64(x2 * x2)))); elseif (x1 <= -8.4e-166) tmp = t_0; elseif (x1 <= 4.9e-285) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= 7.6e+147) tmp = t_0; else tmp = Float64(Float64(Float64(36.0 * Float64(x2 * x2)) - Float64(x1 * x1)) / Float64(Float64(x2 * -6.0) - x1)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * -6.0) + (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); t_1 = x1 + (x2 * 6.0); tmp = 0.0; if (x1 <= -5.4e+124) tmp = (x1 / (t_1 / x1)) - (36.0 / (t_1 / (x2 * x2))); elseif (x1 <= -8.4e-166) tmp = t_0; elseif (x1 <= 4.9e-285) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= 7.6e+147) tmp = t_0; else tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.4e+124], N[(N[(x1 / N[(t$95$1 / x1), $MachinePrecision]), $MachinePrecision] - N[(36.0 / N[(t$95$1 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -8.4e-166], t$95$0, If[LessEqual[x1, 4.9e-285], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.6e+147], t$95$0, N[(N[(N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot -6 + x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_1 := x1 + x2 \cdot 6\\
\mathbf{if}\;x1 \leq -5.4 \cdot 10^{+124}:\\
\;\;\;\;\frac{x1}{\frac{t_1}{x1}} - \frac{36}{\frac{t_1}{x2 \cdot x2}}\\
\mathbf{elif}\;x1 \leq -8.4 \cdot 10^{-166}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 4.9 \cdot 10^{-285}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+147}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{36 \cdot \left(x2 \cdot x2\right) - x1 \cdot x1}{x2 \cdot -6 - x1}\\
\end{array}
\end{array}
if x1 < -5.39999999999999956e124Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 1.1%
*-commutative1.1%
Simplified1.1%
flip-+7.0%
div-sub7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
*-commutative7.0%
*-commutative7.0%
swap-sqr7.0%
metadata-eval7.0%
*-commutative7.0%
cancel-sign-sub-inv7.0%
metadata-eval7.0%
Applied egg-rr7.0%
associate-/l*28.0%
unpow228.0%
associate-/l*28.0%
unpow228.0%
Simplified28.0%
if -5.39999999999999956e124 < x1 < -8.3999999999999998e-166 or 4.89999999999999975e-285 < x1 < 7.59999999999999941e147Initial program 96.8%
Taylor expanded in x1 around 0 65.3%
Taylor expanded in x1 around 0 65.2%
fma-def66.0%
associate-*r*66.0%
*-commutative66.0%
fma-neg66.0%
metadata-eval66.0%
fma-neg66.0%
*-commutative66.0%
metadata-eval66.0%
Simplified66.0%
Taylor expanded in x1 around 0 65.2%
if -8.3999999999999998e-166 < x1 < 4.89999999999999975e-285Initial program 99.3%
Taylor expanded in x1 around 0 78.3%
Taylor expanded in x1 around 0 78.7%
fma-def78.9%
associate-*r*78.9%
*-commutative78.9%
fma-neg78.9%
metadata-eval78.9%
fma-neg78.9%
*-commutative78.9%
metadata-eval78.9%
Simplified78.9%
Taylor expanded in x2 around 0 99.7%
if 7.59999999999999941e147 < x1 Initial program 12.9%
Taylor expanded in x1 around 0 0.6%
Taylor expanded in x1 around 0 6.5%
*-commutative6.5%
Simplified6.5%
+-commutative6.5%
flip-+65.1%
*-commutative65.1%
*-commutative65.1%
swap-sqr65.1%
metadata-eval65.1%
Applied egg-rr65.1%
Final simplification62.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))
(t_1 (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))))
(if (<= x1 -5.5e+66)
t_1
(if (<= x1 -5.6e-109)
t_0
(if (<= x1 1.02e-104)
t_1
(if (<= x1 5.5e+147)
t_0
(/ (- (* 36.0 (* x2 x2)) (* x1 x1)) (- (* x2 -6.0) x1))))))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
double t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double tmp;
if (x1 <= -5.5e+66) {
tmp = t_1;
} else if (x1 <= -5.6e-109) {
tmp = t_0;
} else if (x1 <= 1.02e-104) {
tmp = t_1;
} else if (x1 <= 5.5e+147) {
tmp = t_0;
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
t_1 = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
if (x1 <= (-5.5d+66)) then
tmp = t_1
else if (x1 <= (-5.6d-109)) then
tmp = t_0
else if (x1 <= 1.02d-104) then
tmp = t_1
else if (x1 <= 5.5d+147) then
tmp = t_0
else
tmp = ((36.0d0 * (x2 * x2)) - (x1 * x1)) / ((x2 * (-6.0d0)) - x1)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
double t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double tmp;
if (x1 <= -5.5e+66) {
tmp = t_1;
} else if (x1 <= -5.6e-109) {
tmp = t_0;
} else if (x1 <= 1.02e-104) {
tmp = t_1;
} else if (x1 <= 5.5e+147) {
tmp = t_0;
} else {
tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) tmp = 0 if x1 <= -5.5e+66: tmp = t_1 elif x1 <= -5.6e-109: tmp = t_0 elif x1 <= 1.02e-104: tmp = t_1 elif x1 <= 5.5e+147: tmp = t_0 else: tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) t_1 = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))) tmp = 0.0 if (x1 <= -5.5e+66) tmp = t_1; elseif (x1 <= -5.6e-109) tmp = t_0; elseif (x1 <= 1.02e-104) tmp = t_1; elseif (x1 <= 5.5e+147) tmp = t_0; else tmp = Float64(Float64(Float64(36.0 * Float64(x2 * x2)) - Float64(x1 * x1)) / Float64(Float64(x2 * -6.0) - x1)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); tmp = 0.0; if (x1 <= -5.5e+66) tmp = t_1; elseif (x1 <= -5.6e-109) tmp = t_0; elseif (x1 <= 1.02e-104) tmp = t_1; elseif (x1 <= 5.5e+147) tmp = t_0; else tmp = ((36.0 * (x2 * x2)) - (x1 * x1)) / ((x2 * -6.0) - x1); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+66], t$95$1, If[LessEqual[x1, -5.6e-109], t$95$0, If[LessEqual[x1, 1.02e-104], t$95$1, If[LessEqual[x1, 5.5e+147], t$95$0, N[(N[(N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_1 := x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -5.6 \cdot 10^{-109}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 1.02 \cdot 10^{-104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+147}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{36 \cdot \left(x2 \cdot x2\right) - x1 \cdot x1}{x2 \cdot -6 - x1}\\
\end{array}
\end{array}
if x1 < -5.5e66 or -5.59999999999999958e-109 < x1 < 1.02000000000000001e-104Initial program 64.1%
Taylor expanded in x1 around 0 50.4%
Taylor expanded in x1 around 0 51.8%
fma-def52.0%
associate-*r*52.0%
*-commutative52.0%
fma-neg52.0%
metadata-eval52.0%
fma-neg52.0%
*-commutative52.0%
metadata-eval52.0%
Simplified52.0%
Taylor expanded in x2 around 0 59.4%
if -5.5e66 < x1 < -5.59999999999999958e-109 or 1.02000000000000001e-104 < x1 < 5.4999999999999997e147Initial program 97.4%
Taylor expanded in x1 around 0 59.6%
Taylor expanded in x1 around 0 59.2%
fma-def60.2%
associate-*r*60.2%
*-commutative60.2%
fma-neg60.2%
metadata-eval60.2%
fma-neg60.2%
*-commutative60.2%
metadata-eval60.2%
Simplified60.2%
Taylor expanded in x1 around inf 50.7%
if 5.4999999999999997e147 < x1 Initial program 12.9%
Taylor expanded in x1 around 0 0.6%
Taylor expanded in x1 around 0 6.5%
*-commutative6.5%
Simplified6.5%
+-commutative6.5%
flip-+65.1%
*-commutative65.1%
*-commutative65.1%
swap-sqr65.1%
metadata-eval65.1%
Applied egg-rr65.1%
Final simplification56.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* x2 x2) (* x1 8.0))) (t_1 (+ x1 (* x2 -6.0))))
(if (<= x2 -1.36e+216)
t_0
(if (<= x2 -2.35e+126)
(* x2 -6.0)
(if (<= x2 -2.7e+57)
t_0
(if (<= x2 -2.8e-190)
t_1
(if (<= x2 2.2e-243) (- x1) (if (<= x2 2.2e+118) t_1 t_0))))))))
double code(double x1, double x2) {
double t_0 = (x2 * x2) * (x1 * 8.0);
double t_1 = x1 + (x2 * -6.0);
double tmp;
if (x2 <= -1.36e+216) {
tmp = t_0;
} else if (x2 <= -2.35e+126) {
tmp = x2 * -6.0;
} else if (x2 <= -2.7e+57) {
tmp = t_0;
} else if (x2 <= -2.8e-190) {
tmp = t_1;
} else if (x2 <= 2.2e-243) {
tmp = -x1;
} else if (x2 <= 2.2e+118) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x2 * x2) * (x1 * 8.0d0)
t_1 = x1 + (x2 * (-6.0d0))
if (x2 <= (-1.36d+216)) then
tmp = t_0
else if (x2 <= (-2.35d+126)) then
tmp = x2 * (-6.0d0)
else if (x2 <= (-2.7d+57)) then
tmp = t_0
else if (x2 <= (-2.8d-190)) then
tmp = t_1
else if (x2 <= 2.2d-243) then
tmp = -x1
else if (x2 <= 2.2d+118) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * x2) * (x1 * 8.0);
double t_1 = x1 + (x2 * -6.0);
double tmp;
if (x2 <= -1.36e+216) {
tmp = t_0;
} else if (x2 <= -2.35e+126) {
tmp = x2 * -6.0;
} else if (x2 <= -2.7e+57) {
tmp = t_0;
} else if (x2 <= -2.8e-190) {
tmp = t_1;
} else if (x2 <= 2.2e-243) {
tmp = -x1;
} else if (x2 <= 2.2e+118) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * x2) * (x1 * 8.0) t_1 = x1 + (x2 * -6.0) tmp = 0 if x2 <= -1.36e+216: tmp = t_0 elif x2 <= -2.35e+126: tmp = x2 * -6.0 elif x2 <= -2.7e+57: tmp = t_0 elif x2 <= -2.8e-190: tmp = t_1 elif x2 <= 2.2e-243: tmp = -x1 elif x2 <= 2.2e+118: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * x2) * Float64(x1 * 8.0)) t_1 = Float64(x1 + Float64(x2 * -6.0)) tmp = 0.0 if (x2 <= -1.36e+216) tmp = t_0; elseif (x2 <= -2.35e+126) tmp = Float64(x2 * -6.0); elseif (x2 <= -2.7e+57) tmp = t_0; elseif (x2 <= -2.8e-190) tmp = t_1; elseif (x2 <= 2.2e-243) tmp = Float64(-x1); elseif (x2 <= 2.2e+118) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * x2) * (x1 * 8.0); t_1 = x1 + (x2 * -6.0); tmp = 0.0; if (x2 <= -1.36e+216) tmp = t_0; elseif (x2 <= -2.35e+126) tmp = x2 * -6.0; elseif (x2 <= -2.7e+57) tmp = t_0; elseif (x2 <= -2.8e-190) tmp = t_1; elseif (x2 <= 2.2e-243) tmp = -x1; elseif (x2 <= 2.2e+118) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -1.36e+216], t$95$0, If[LessEqual[x2, -2.35e+126], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, -2.7e+57], t$95$0, If[LessEqual[x2, -2.8e-190], t$95$1, If[LessEqual[x2, 2.2e-243], (-x1), If[LessEqual[x2, 2.2e+118], t$95$1, t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
t_1 := x1 + x2 \cdot -6\\
\mathbf{if}\;x2 \leq -1.36 \cdot 10^{+216}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x2 \leq -2.35 \cdot 10^{+126}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq -2.7 \cdot 10^{+57}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x2 \leq -2.8 \cdot 10^{-190}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x2 \leq 2.2 \cdot 10^{-243}:\\
\;\;\;\;-x1\\
\mathbf{elif}\;x2 \leq 2.2 \cdot 10^{+118}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x2 < -1.36000000000000007e216 or -2.3499999999999999e126 < x2 < -2.6999999999999998e57 or 2.19999999999999986e118 < x2 Initial program 64.0%
Taylor expanded in x1 around 0 52.0%
associate-*r*59.2%
sub-neg59.2%
metadata-eval59.2%
distribute-rgt-in54.1%
*-commutative54.1%
Applied egg-rr54.1%
Taylor expanded in x1 around inf 58.4%
Taylor expanded in x2 around inf 62.4%
associate-*r*62.4%
unpow262.4%
Simplified62.4%
if -1.36000000000000007e216 < x2 < -2.3499999999999999e126Initial program 55.5%
Taylor expanded in x1 around 0 13.0%
Taylor expanded in x1 around 0 42.2%
*-commutative42.2%
Simplified42.2%
Taylor expanded in x1 around 0 42.2%
*-commutative42.2%
Simplified42.2%
if -2.6999999999999998e57 < x2 < -2.80000000000000005e-190 or 2.1999999999999999e-243 < x2 < 2.19999999999999986e118Initial program 79.3%
Taylor expanded in x1 around 0 51.6%
Taylor expanded in x1 around 0 37.6%
*-commutative37.6%
Simplified37.6%
if -2.80000000000000005e-190 < x2 < 2.1999999999999999e-243Initial program 64.2%
Taylor expanded in x1 around 0 44.7%
Taylor expanded in x1 around 0 47.1%
fma-def47.1%
associate-*r*47.1%
*-commutative47.1%
fma-neg47.1%
metadata-eval47.1%
fma-neg47.1%
*-commutative47.1%
metadata-eval47.1%
Simplified47.1%
Taylor expanded in x2 around 0 40.5%
distribute-rgt1-in40.5%
metadata-eval40.5%
mul-1-neg40.5%
Simplified40.5%
Final simplification45.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.45e+111)
(+ 9.0 (+ (* x1 2.0) (* -12.0 (* x1 x2))))
(if (or (<= x1 -4.6e-209) (not (<= x1 1.16e-160)))
(* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
(* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.45e+111) {
tmp = 9.0 + ((x1 * 2.0) + (-12.0 * (x1 * x2)));
} else if ((x1 <= -4.6e-209) || !(x1 <= 1.16e-160)) {
tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.45d+111)) then
tmp = 9.0d0 + ((x1 * 2.0d0) + ((-12.0d0) * (x1 * x2)))
else if ((x1 <= (-4.6d-209)) .or. (.not. (x1 <= 1.16d-160))) then
tmp = x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.45e+111) {
tmp = 9.0 + ((x1 * 2.0) + (-12.0 * (x1 * x2)));
} else if ((x1 <= -4.6e-209) || !(x1 <= 1.16e-160)) {
tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.45e+111: tmp = 9.0 + ((x1 * 2.0) + (-12.0 * (x1 * x2))) elif (x1 <= -4.6e-209) or not (x1 <= 1.16e-160): tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.45e+111) tmp = Float64(9.0 + Float64(Float64(x1 * 2.0) + Float64(-12.0 * Float64(x1 * x2)))); elseif ((x1 <= -4.6e-209) || !(x1 <= 1.16e-160)) tmp = Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.45e+111) tmp = 9.0 + ((x1 * 2.0) + (-12.0 * (x1 * x2))); elseif ((x1 <= -4.6e-209) || ~((x1 <= 1.16e-160))) tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.45e+111], N[(9.0 + N[(N[(x1 * 2.0), $MachinePrecision] + N[(-12.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -4.6e-209], N[Not[LessEqual[x1, 1.16e-160]], $MachinePrecision]], N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.45 \cdot 10^{+111}:\\
\;\;\;\;9 + \left(x1 \cdot 2 + -12 \cdot \left(x1 \cdot x2\right)\right)\\
\mathbf{elif}\;x1 \leq -4.6 \cdot 10^{-209} \lor \neg \left(x1 \leq 1.16 \cdot 10^{-160}\right):\\
\;\;\;\;x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -1.45e111Initial program 2.2%
Taylor expanded in x1 around 0 2.2%
associate-*r*2.2%
sub-neg2.2%
metadata-eval2.2%
distribute-rgt-in2.2%
*-commutative2.2%
Applied egg-rr2.2%
Taylor expanded in x1 around inf 2.3%
Taylor expanded in x2 around 0 21.8%
if -1.45e111 < x1 < -4.5999999999999999e-209 or 1.16e-160 < x1 Initial program 82.0%
Taylor expanded in x1 around 0 51.6%
Taylor expanded in x1 around 0 59.3%
fma-def60.0%
associate-*r*60.0%
*-commutative60.0%
fma-neg60.0%
metadata-eval60.0%
fma-neg60.0%
*-commutative60.0%
metadata-eval60.0%
Simplified60.0%
Taylor expanded in x1 around inf 47.2%
if -4.5999999999999999e-209 < x1 < 1.16e-160Initial program 99.5%
Taylor expanded in x1 around 0 81.9%
Taylor expanded in x1 around 0 81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in x1 around 0 82.0%
*-commutative82.0%
Simplified82.0%
Final simplification48.6%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -5e+66) (and (not (<= x1 -2.3e-110)) (<= x1 8.2e-105))) (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0)))) (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -5e+66) || (!(x1 <= -2.3e-110) && (x1 <= 8.2e-105))) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else {
tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-5d+66)) .or. (.not. (x1 <= (-2.3d-110))) .and. (x1 <= 8.2d-105)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else
tmp = x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -5e+66) || (!(x1 <= -2.3e-110) && (x1 <= 8.2e-105))) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else {
tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -5e+66) or (not (x1 <= -2.3e-110) and (x1 <= 8.2e-105)): tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) else: tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -5e+66) || (!(x1 <= -2.3e-110) && (x1 <= 8.2e-105))) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); else tmp = Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -5e+66) || (~((x1 <= -2.3e-110)) && (x1 <= 8.2e-105))) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); else tmp = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -5e+66], And[N[Not[LessEqual[x1, -2.3e-110]], $MachinePrecision], LessEqual[x1, 8.2e-105]]], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5 \cdot 10^{+66} \lor \neg \left(x1 \leq -2.3 \cdot 10^{-110}\right) \land x1 \leq 8.2 \cdot 10^{-105}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.99999999999999991e66 or -2.3000000000000001e-110 < x1 < 8.20000000000000061e-105Initial program 64.1%
Taylor expanded in x1 around 0 50.4%
Taylor expanded in x1 around 0 51.8%
fma-def52.0%
associate-*r*52.0%
*-commutative52.0%
fma-neg52.0%
metadata-eval52.0%
fma-neg52.0%
*-commutative52.0%
metadata-eval52.0%
Simplified52.0%
Taylor expanded in x2 around 0 59.4%
if -4.99999999999999991e66 < x1 < -2.3000000000000001e-110 or 8.20000000000000061e-105 < x1 Initial program 77.1%
Taylor expanded in x1 around 0 45.4%
Taylor expanded in x1 around 0 55.1%
fma-def55.9%
associate-*r*55.9%
*-commutative55.9%
fma-neg55.9%
metadata-eval55.9%
fma-neg55.9%
*-commutative55.9%
metadata-eval55.9%
Simplified55.9%
Taylor expanded in x1 around inf 48.7%
Final simplification54.0%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -6.8e+100)
(+ 9.0 (+ (* x1 2.0) (* -12.0 (* x1 x2))))
(if (<= x1 -3.4e-110)
(* (* x2 x2) (* x1 8.0))
(if (<= x1 5.7e-158) (* x2 -6.0) (+ x1 (* (* x1 (* x2 x2)) 8.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -6.8e+100) {
tmp = 9.0 + ((x1 * 2.0) + (-12.0 * (x1 * x2)));
} else if (x1 <= -3.4e-110) {
tmp = (x2 * x2) * (x1 * 8.0);
} else if (x1 <= 5.7e-158) {
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 <= (-6.8d+100)) then
tmp = 9.0d0 + ((x1 * 2.0d0) + ((-12.0d0) * (x1 * x2)))
else if (x1 <= (-3.4d-110)) then
tmp = (x2 * x2) * (x1 * 8.0d0)
else if (x1 <= 5.7d-158) 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 <= -6.8e+100) {
tmp = 9.0 + ((x1 * 2.0) + (-12.0 * (x1 * x2)));
} else if (x1 <= -3.4e-110) {
tmp = (x2 * x2) * (x1 * 8.0);
} else if (x1 <= 5.7e-158) {
tmp = x2 * -6.0;
} else {
tmp = x1 + ((x1 * (x2 * x2)) * 8.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -6.8e+100: tmp = 9.0 + ((x1 * 2.0) + (-12.0 * (x1 * x2))) elif x1 <= -3.4e-110: tmp = (x2 * x2) * (x1 * 8.0) elif x1 <= 5.7e-158: tmp = x2 * -6.0 else: tmp = x1 + ((x1 * (x2 * x2)) * 8.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -6.8e+100) tmp = Float64(9.0 + Float64(Float64(x1 * 2.0) + Float64(-12.0 * Float64(x1 * x2)))); elseif (x1 <= -3.4e-110) tmp = Float64(Float64(x2 * x2) * Float64(x1 * 8.0)); elseif (x1 <= 5.7e-158) tmp = Float64(x2 * -6.0); else tmp = Float64(x1 + Float64(Float64(x1 * Float64(x2 * x2)) * 8.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -6.8e+100) tmp = 9.0 + ((x1 * 2.0) + (-12.0 * (x1 * x2))); elseif (x1 <= -3.4e-110) tmp = (x2 * x2) * (x1 * 8.0); elseif (x1 <= 5.7e-158) tmp = x2 * -6.0; else tmp = x1 + ((x1 * (x2 * x2)) * 8.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -6.8e+100], N[(9.0 + N[(N[(x1 * 2.0), $MachinePrecision] + N[(-12.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.4e-110], N[(N[(x2 * x2), $MachinePrecision] * N[(x1 * 8.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.7e-158], N[(x2 * -6.0), $MachinePrecision], N[(x1 + N[(N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6.8 \cdot 10^{+100}:\\
\;\;\;\;9 + \left(x1 \cdot 2 + -12 \cdot \left(x1 \cdot x2\right)\right)\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{-110}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\
\mathbf{elif}\;x1 \leq 5.7 \cdot 10^{-158}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot x2\right)\right) \cdot 8\\
\end{array}
\end{array}
if x1 < -6.79999999999999988e100Initial program 2.2%
Taylor expanded in x1 around 0 2.2%
associate-*r*2.2%
sub-neg2.2%
metadata-eval2.2%
distribute-rgt-in2.2%
*-commutative2.2%
Applied egg-rr2.2%
Taylor expanded in x1 around inf 2.3%
Taylor expanded in x2 around 0 21.8%
if -6.79999999999999988e100 < x1 < -3.4000000000000001e-110Initial program 99.3%
Taylor expanded in x1 around 0 53.1%
associate-*r*57.2%
sub-neg57.2%
metadata-eval57.2%
distribute-rgt-in54.9%
*-commutative54.9%
Applied egg-rr54.9%
Taylor expanded in x1 around inf 33.5%
Taylor expanded in x2 around inf 31.2%
associate-*r*31.2%
unpow231.2%
Simplified31.2%
if -3.4000000000000001e-110 < x1 < 5.69999999999999982e-158Initial program 99.2%
Taylor expanded in x1 around 0 84.3%
Taylor expanded in x1 around 0 68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in x1 around 0 69.1%
*-commutative69.1%
Simplified69.1%
if 5.69999999999999982e-158 < x1 Initial program 71.2%
Taylor expanded in x1 around 0 43.5%
Taylor expanded in x2 around inf 41.4%
*-commutative41.4%
unpow241.4%
Simplified41.4%
Final simplification43.1%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -2.8e-190) (* x2 -6.0) (if (<= x2 3e-243) (- x1) (+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -2.8e-190) {
tmp = x2 * -6.0;
} else if (x2 <= 3e-243) {
tmp = -x1;
} 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 <= (-2.8d-190)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 3d-243) then
tmp = -x1
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -2.8e-190) {
tmp = x2 * -6.0;
} else if (x2 <= 3e-243) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -2.8e-190: tmp = x2 * -6.0 elif x2 <= 3e-243: tmp = -x1 else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -2.8e-190) tmp = Float64(x2 * -6.0); elseif (x2 <= 3e-243) tmp = Float64(-x1); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -2.8e-190) tmp = x2 * -6.0; elseif (x2 <= 3e-243) tmp = -x1; else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -2.8e-190], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 3e-243], (-x1), N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -2.8 \cdot 10^{-190}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 3 \cdot 10^{-243}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -2.80000000000000005e-190Initial program 66.4%
Taylor expanded in x1 around 0 40.8%
Taylor expanded in x1 around 0 27.8%
*-commutative27.8%
Simplified27.8%
Taylor expanded in x1 around 0 27.8%
*-commutative27.8%
Simplified27.8%
if -2.80000000000000005e-190 < x2 < 3.0000000000000001e-243Initial program 64.2%
Taylor expanded in x1 around 0 44.7%
Taylor expanded in x1 around 0 47.1%
fma-def47.1%
associate-*r*47.1%
*-commutative47.1%
fma-neg47.1%
metadata-eval47.1%
fma-neg47.1%
*-commutative47.1%
metadata-eval47.1%
Simplified47.1%
Taylor expanded in x2 around 0 40.5%
distribute-rgt1-in40.5%
metadata-eval40.5%
mul-1-neg40.5%
Simplified40.5%
if 3.0000000000000001e-243 < x2 Initial program 77.0%
Taylor expanded in x1 around 0 55.7%
Taylor expanded in x1 around 0 25.9%
*-commutative25.9%
Simplified25.9%
Final simplification29.0%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -2.35e-190) (* x2 -6.0) (if (<= x2 3e-243) (- x1) (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -2.35e-190) {
tmp = x2 * -6.0;
} else if (x2 <= 3e-243) {
tmp = -x1;
} 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 <= (-2.35d-190)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 3d-243) then
tmp = -x1
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -2.35e-190) {
tmp = x2 * -6.0;
} else if (x2 <= 3e-243) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -2.35e-190: tmp = x2 * -6.0 elif x2 <= 3e-243: tmp = -x1 else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -2.35e-190) tmp = Float64(x2 * -6.0); elseif (x2 <= 3e-243) tmp = Float64(-x1); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -2.35e-190) tmp = x2 * -6.0; elseif (x2 <= 3e-243) tmp = -x1; else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -2.35e-190], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 3e-243], (-x1), N[(x2 * -6.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -2.35 \cdot 10^{-190}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 3 \cdot 10^{-243}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -2.3500000000000002e-190 or 3.0000000000000001e-243 < x2 Initial program 71.8%
Taylor expanded in x1 around 0 48.5%
Taylor expanded in x1 around 0 26.8%
*-commutative26.8%
Simplified26.8%
Taylor expanded in x1 around 0 26.7%
*-commutative26.7%
Simplified26.7%
if -2.3500000000000002e-190 < x2 < 3.0000000000000001e-243Initial program 64.2%
Taylor expanded in x1 around 0 44.7%
Taylor expanded in x1 around 0 47.1%
fma-def47.1%
associate-*r*47.1%
*-commutative47.1%
fma-neg47.1%
metadata-eval47.1%
fma-neg47.1%
*-commutative47.1%
metadata-eval47.1%
Simplified47.1%
Taylor expanded in x2 around 0 40.5%
distribute-rgt1-in40.5%
metadata-eval40.5%
mul-1-neg40.5%
Simplified40.5%
Final simplification28.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 Float64(-x1) end
function tmp = code(x1, x2) tmp = -x1; end
code[x1_, x2_] := (-x1)
\begin{array}{l}
\\
-x1
\end{array}
Initial program 70.6%
Taylor expanded in x1 around 0 47.9%
Taylor expanded in x1 around 0 53.5%
fma-def53.9%
associate-*r*53.9%
*-commutative53.9%
fma-neg53.9%
metadata-eval53.9%
fma-neg53.9%
*-commutative53.9%
metadata-eval53.9%
Simplified53.9%
Taylor expanded in x2 around 0 13.0%
distribute-rgt1-in13.0%
metadata-eval13.0%
mul-1-neg13.0%
Simplified13.0%
Final simplification13.0%
(FPCore (x1 x2) :precision binary64 9.0)
double code(double x1, double x2) {
return 9.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = 9.0d0
end function
public static double code(double x1, double x2) {
return 9.0;
}
def code(x1, x2): return 9.0
function code(x1, x2) return 9.0 end
function tmp = code(x1, x2) tmp = 9.0; end
code[x1_, x2_] := 9.0
\begin{array}{l}
\\
9
\end{array}
Initial program 70.6%
Taylor expanded in x1 around 0 47.9%
associate-*r*53.1%
sub-neg53.1%
metadata-eval53.1%
distribute-rgt-in51.5%
*-commutative51.5%
Applied egg-rr51.5%
Taylor expanded in x1 around inf 23.6%
Taylor expanded in x1 around 0 3.4%
Final simplification3.4%
herbie shell --seed 2023297
(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))))))