
(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 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3 (/ (fma x1 (* x1 3.0) (- (* 2.0 x2) x1)) (fma x1 x1 1.0))))
(if (<=
(+
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))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_0 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_3 4.0 -6.0)) (* t_3 (* (* x1 2.0) (+ t_3 -3.0))))
(fma t_0 t_3 (pow x1 3.0))))))
(+ 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 = fma(x1, (x1 * 3.0), ((2.0 * x2) - x1)) / fma(x1, x1, 1.0);
double tmp;
if ((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) INFINITY)) {
tmp = x1 + fma(3.0, ((t_0 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_3, 4.0, -6.0)), (t_3 * ((x1 * 2.0) * (t_3 + -3.0)))), fma(t_0, t_3, pow(x1, 3.0)))));
} else {
tmp = x1 + ((x1 + (6.0 * 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(fma(x1, Float64(x1 * 3.0), Float64(Float64(2.0 * x2) - x1)) / fma(x1, x1, 1.0)) tmp = 0.0 if (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)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_0 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_3, 4.0, -6.0)), Float64(t_3 * Float64(Float64(x1 * 2.0) * Float64(t_3 + -3.0)))), fma(t_0, t_3, (x1 ^ 3.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[(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[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[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], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$0 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$3 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$3 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3 + N[Power[x1, 3.0], $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 := 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 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;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) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_0 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t_3, 4, -6\right), t_3 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(t_3 + -3\right)\right)\right), \mathsf{fma}\left(t_0, t_3, {x1}^{3}\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%
Simplified99.7%
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.1%
*-commutative10.1%
Simplified10.1%
Taylor expanded in x1 around inf 100.0%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (/ (- (fma (* x1 3.0) x1 (* 2.0 x2)) x1) (fma x1 x1 1.0))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_1 t_3))
t_0))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(+
(+
t_0
(fma
(fma (* (* x1 2.0) t_4) (+ -3.0 t_4) (* (* x1 x1) (fma 4.0 t_4 -6.0)))
(fma x1 x1 1.0)
(* t_1 t_4)))
(+ x1 (* 3.0 (/ (- (+ t_1 (* x2 -2.0)) x1) (fma x1 x1 1.0))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = (fma((x1 * 3.0), x1, (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + ((t_0 + fma(fma(((x1 * 2.0) * t_4), (-3.0 + t_4), ((x1 * x1) * fma(4.0, t_4, -6.0))), fma(x1, x1, 1.0), (t_1 * t_4))) + (x1 + (3.0 * (((t_1 + (x2 * -2.0)) - x1) / fma(x1, x1, 1.0)))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(Float64(fma(Float64(x1 * 3.0), x1, Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + t_0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + Float64(Float64(t_0 + fma(fma(Float64(Float64(x1 * 2.0) * t_4), Float64(-3.0 + t_4), Float64(Float64(x1 * x1) * fma(4.0, t_4, -6.0))), fma(x1, x1, 1.0), Float64(t_1 * t_4))) + Float64(x1 + Float64(3.0 * Float64(Float64(Float64(t_1 + Float64(x2 * -2.0)) - x1) / fma(x1, x1, 1.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[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(t$95$0 + N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(-3.0 + t$95$4), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(4.0 * t$95$4 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1 + 1.0), $MachinePrecision] + N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(3.0 * N[(N[(N[(t$95$1 + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $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 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2}\\
t_4 := \frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right)\right) + t_1 \cdot t_3\right) + t_0\right)\right) + 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\right) \leq \infty:\\
\;\;\;\;x1 + \left(\left(t_0 + \mathsf{fma}\left(\mathsf{fma}\left(\left(x1 \cdot 2\right) \cdot t_4, -3 + t_4, \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(4, t_4, -6\right)\right), \mathsf{fma}\left(x1, x1, 1\right), t_1 \cdot t_4\right)\right) + \left(x1 + 3 \cdot \frac{\left(t_1 + x2 \cdot -2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\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%
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.1%
*-commutative10.1%
Simplified10.1%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* t_1 t_3))
(t_5 (* (* (* x1 2.0) t_3) (- t_3 3.0)))
(t_6 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
(if (<=
(+
x1
(+
(+
x1
(+ (+ (* t_2 (+ t_5 (* (* x1 x1) (- (* t_3 4.0) 6.0)))) t_4) t_0))
t_6))
INFINITY)
(+
x1
(+
t_6
(+
x1
(+
t_0
(+
t_4
(*
t_2
(+
t_5
(*
(* x1 x1)
(-
(*
4.0
(-
(/ (fma (* x1 3.0) x1 (+ x2 x2)) (fma x1 x1 1.0))
(/ x1 (fma x1 x1 1.0))))
6.0)))))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_1 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if ((x1 + ((x1 + (((t_2 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= ((double) INFINITY)) {
tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_2 * (t_5 + ((x1 * x1) * ((4.0 * ((fma((x1 * 3.0), x1, (x2 + x2)) / fma(x1, x1, 1.0)) - (x1 / fma(x1, x1, 1.0)))) - 6.0))))))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(t_1 * t_3) t_5 = Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) t_6 = 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(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Inf) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_2 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(fma(Float64(x1 * 3.0), x1, Float64(x2 + x2)) / fma(x1, x1, 1.0)) - Float64(x1 / fma(x1, x1, 1.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[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = 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[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$2 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * x1 + N[(x2 + x2), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] - N[(x1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $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 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2}\\
t_4 := t_1 \cdot t_3\\
t_5 := \left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right)\\
t_6 := 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(t_5 + \left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right)\right) + t_4\right) + t_0\right)\right) + t_6\right) \leq \infty:\\
\;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_0 + \left(t_4 + t_2 \cdot \left(t_5 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(\frac{\mathsf{fma}\left(x1 \cdot 3, x1, x2 + x2\right)}{\mathsf{fma}\left(x1, x1, 1\right)} - \frac{x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right) - 6\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%
fma-def99.4%
div-sub99.4%
fma-def99.4%
count-299.4%
Applied egg-rr99.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.1%
*-commutative10.1%
Simplified10.1%
Taylor expanded in x1 around inf 100.0%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* t_1 t_3))
(t_5 (* (* (* x1 2.0) t_3) (- t_3 3.0)))
(t_6 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
(if (<=
(+
x1
(+
(+
x1
(+ (+ (* t_2 (+ t_5 (* (* x1 x1) (- (* t_3 4.0) 6.0)))) t_4) t_0))
t_6))
INFINITY)
(+
x1
(+
t_6
(+
x1
(+
t_0
(+
t_4
(*
t_2
(+
t_5
(*
(* x1 x1)
(-
(* 4.0 (/ (- (fma (* x1 3.0) x1 (+ x2 x2)) x1) (fma x1 x1 1.0)))
6.0)))))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_1 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if ((x1 + ((x1 + (((t_2 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= ((double) INFINITY)) {
tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_2 * (t_5 + ((x1 * x1) * ((4.0 * ((fma((x1 * 3.0), x1, (x2 + x2)) - x1) / fma(x1, x1, 1.0))) - 6.0))))))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(t_1 * t_3) t_5 = Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) t_6 = 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(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Inf) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_2 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(fma(Float64(x1 * 3.0), x1, Float64(x2 + x2)) - x1) / fma(x1, x1, 1.0))) - 6.0))))))))); 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[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = 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[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$2 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * x1 + N[(x2 + x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2}\\
t_4 := t_1 \cdot t_3\\
t_5 := \left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right)\\
t_6 := 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(t_5 + \left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right)\right) + t_4\right) + t_0\right)\right) + t_6\right) \leq \infty:\\
\;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_0 + \left(t_4 + t_2 \cdot \left(t_5 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\mathsf{fma}\left(x1 \cdot 3, x1, x2 + x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)} - 6\right)\right)\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%
fma-def99.4%
div-sub99.4%
fma-def99.4%
count-299.4%
Applied egg-rr99.4%
div-sub99.4%
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.1%
*-commutative10.1%
Simplified10.1%
Taylor expanded in x1 around inf 100.0%
Final simplification99.5%
(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.1%
*-commutative10.1%
Simplified10.1%
Taylor expanded in x1 around inf 100.0%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (- (* x1 (* x1 9.0)) x1))
(t_2 (* x1 (* x1 x1)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (/ (- (+ t_3 (* 2.0 x2)) x1) t_0))
(t_5 (* (* x1 x1) (- (* t_4 4.0) 6.0)))
(t_6 (* (* x1 2.0) t_4))
(t_7
(+
x1
(+
(+ x1 (+ (+ (* t_0 (+ (* t_6 (- t_4 3.0)) t_5)) (* t_3 t_4)) t_2))
9.0))))
(if (<= x1 -6.5e+104)
t_1
(if (<= x1 -0.0035)
t_7
(if (<= x1 1.15)
(+
x1
(+
(* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_0))
(+
x1
(+
t_2
(+
(* t_0 (+ t_5 (* t_6 (- (+ x2 x2) 3.0))))
(* t_3 (+ x2 x2)))))))
(if (<= x1 1e+153) t_7 t_1))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = (x1 * (x1 * 9.0)) - x1;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double t_5 = (x1 * x1) * ((t_4 * 4.0) - 6.0);
double t_6 = (x1 * 2.0) * t_4;
double t_7 = x1 + ((x1 + (((t_0 * ((t_6 * (t_4 - 3.0)) + t_5)) + (t_3 * t_4)) + t_2)) + 9.0);
double tmp;
if (x1 <= -6.5e+104) {
tmp = t_1;
} else if (x1 <= -0.0035) {
tmp = t_7;
} else if (x1 <= 1.15) {
tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_2 + ((t_0 * (t_5 + (t_6 * ((x2 + x2) - 3.0)))) + (t_3 * (x2 + x2))))));
} else if (x1 <= 1e+153) {
tmp = t_7;
} 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) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = (x1 * (x1 * 9.0d0)) - x1
t_2 = x1 * (x1 * x1)
t_3 = x1 * (x1 * 3.0d0)
t_4 = ((t_3 + (2.0d0 * x2)) - x1) / t_0
t_5 = (x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)
t_6 = (x1 * 2.0d0) * t_4
t_7 = x1 + ((x1 + (((t_0 * ((t_6 * (t_4 - 3.0d0)) + t_5)) + (t_3 * t_4)) + t_2)) + 9.0d0)
if (x1 <= (-6.5d+104)) then
tmp = t_1
else if (x1 <= (-0.0035d0)) then
tmp = t_7
else if (x1 <= 1.15d0) then
tmp = x1 + ((3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (t_2 + ((t_0 * (t_5 + (t_6 * ((x2 + x2) - 3.0d0)))) + (t_3 * (x2 + x2))))))
else if (x1 <= 1d+153) then
tmp = t_7
else
tmp = t_1
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 * 9.0)) - x1;
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double t_5 = (x1 * x1) * ((t_4 * 4.0) - 6.0);
double t_6 = (x1 * 2.0) * t_4;
double t_7 = x1 + ((x1 + (((t_0 * ((t_6 * (t_4 - 3.0)) + t_5)) + (t_3 * t_4)) + t_2)) + 9.0);
double tmp;
if (x1 <= -6.5e+104) {
tmp = t_1;
} else if (x1 <= -0.0035) {
tmp = t_7;
} else if (x1 <= 1.15) {
tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_2 + ((t_0 * (t_5 + (t_6 * ((x2 + x2) - 3.0)))) + (t_3 * (x2 + x2))))));
} else if (x1 <= 1e+153) {
tmp = t_7;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = (x1 * (x1 * 9.0)) - x1 t_2 = x1 * (x1 * x1) t_3 = x1 * (x1 * 3.0) t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0 t_5 = (x1 * x1) * ((t_4 * 4.0) - 6.0) t_6 = (x1 * 2.0) * t_4 t_7 = x1 + ((x1 + (((t_0 * ((t_6 * (t_4 - 3.0)) + t_5)) + (t_3 * t_4)) + t_2)) + 9.0) tmp = 0 if x1 <= -6.5e+104: tmp = t_1 elif x1 <= -0.0035: tmp = t_7 elif x1 <= 1.15: tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_2 + ((t_0 * (t_5 + (t_6 * ((x2 + x2) - 3.0)))) + (t_3 * (x2 + x2)))))) elif x1 <= 1e+153: tmp = t_7 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_0) t_5 = Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)) t_6 = Float64(Float64(x1 * 2.0) * t_4) t_7 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_0 * Float64(Float64(t_6 * Float64(t_4 - 3.0)) + t_5)) + Float64(t_3 * t_4)) + t_2)) + 9.0)) tmp = 0.0 if (x1 <= -6.5e+104) tmp = t_1; elseif (x1 <= -0.0035) tmp = t_7; elseif (x1 <= 1.15) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(t_2 + Float64(Float64(t_0 * Float64(t_5 + Float64(t_6 * Float64(Float64(x2 + x2) - 3.0)))) + Float64(t_3 * Float64(x2 + x2))))))); elseif (x1 <= 1e+153) tmp = t_7; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = (x1 * (x1 * 9.0)) - x1; t_2 = x1 * (x1 * x1); t_3 = x1 * (x1 * 3.0); t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0; t_5 = (x1 * x1) * ((t_4 * 4.0) - 6.0); t_6 = (x1 * 2.0) * t_4; t_7 = x1 + ((x1 + (((t_0 * ((t_6 * (t_4 - 3.0)) + t_5)) + (t_3 * t_4)) + t_2)) + 9.0); tmp = 0.0; if (x1 <= -6.5e+104) tmp = t_1; elseif (x1 <= -0.0035) tmp = t_7; elseif (x1 <= 1.15) tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_2 + ((t_0 * (t_5 + (t_6 * ((x2 + x2) - 3.0)))) + (t_3 * (x2 + x2)))))); elseif (x1 <= 1e+153) tmp = t_7; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$0 * N[(N[(t$95$6 * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * t$95$4), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.5e+104], t$95$1, If[LessEqual[x1, -0.0035], t$95$7, If[LessEqual[x1, 1.15], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$2 + N[(N[(t$95$0 * N[(t$95$5 + N[(t$95$6 * N[(N[(x2 + x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+153], t$95$7, t$95$1]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 9\right) - x1\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \frac{\left(t_3 + 2 \cdot x2\right) - x1}{t_0}\\
t_5 := \left(x1 \cdot x1\right) \cdot \left(t_4 \cdot 4 - 6\right)\\
t_6 := \left(x1 \cdot 2\right) \cdot t_4\\
t_7 := x1 + \left(\left(x1 + \left(\left(t_0 \cdot \left(t_6 \cdot \left(t_4 - 3\right) + t_5\right) + t_3 \cdot t_4\right) + t_2\right)\right) + 9\right)\\
\mathbf{if}\;x1 \leq -6.5 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -0.0035:\\
\;\;\;\;t_7\\
\mathbf{elif}\;x1 \leq 1.15:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_3 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + \left(t_2 + \left(t_0 \cdot \left(t_5 + t_6 \cdot \left(\left(x2 + x2\right) - 3\right)\right) + t_3 \cdot \left(x2 + x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{+153}:\\
\;\;\;\;t_7\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x1 < -6.5000000000000005e104 or 1e153 < x1 Initial program 0.0%
Taylor expanded in x2 around inf 0.0%
associate-*r/0.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 67.2%
*-commutative67.2%
fma-def67.2%
+-commutative67.2%
fma-def75.9%
*-commutative75.9%
fma-neg75.9%
metadata-eval75.9%
unpow275.9%
associate-*r*75.9%
*-commutative75.9%
associate-*l*75.9%
unpow275.9%
cancel-sign-sub-inv75.9%
metadata-eval75.9%
+-commutative75.9%
count-275.9%
Simplified75.9%
Taylor expanded in x2 around 0 90.6%
associate-+r+90.6%
distribute-rgt1-in90.6%
metadata-eval90.6%
neg-mul-190.6%
+-commutative90.6%
unsub-neg90.6%
*-commutative90.6%
unpow290.6%
associate-*l*90.6%
Simplified90.6%
if -6.5000000000000005e104 < x1 < -0.00350000000000000007 or 1.1499999999999999 < x1 < 1e153Initial program 99.5%
Taylor expanded in x1 around inf 97.2%
if -0.00350000000000000007 < x1 < 1.1499999999999999Initial program 99.3%
Taylor expanded in x1 around 0 98.8%
count-298.8%
Simplified98.8%
Taylor expanded in x1 around 0 98.8%
count-298.8%
Simplified98.8%
Final simplification96.3%
(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 -1e+97) (not (<= x1 4e+76)))
(+ 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))
(* (* (* x1 2.0) t_2) (- (+ x2 x2) 3.0))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -1e+97) || !(x1 <= 4e+76)) {
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)) + (((x1 * 2.0) * t_2) * ((x2 + x2) - 3.0))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-1d+97)) .or. (.not. (x1 <= 4d+76))) 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)) + (((x1 * 2.0d0) * t_2) * ((x2 + x2) - 3.0d0))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -1e+97) || !(x1 <= 4e+76)) {
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)) + (((x1 * 2.0) * t_2) * ((x2 + x2) - 3.0))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -1e+97) or not (x1 <= 4e+76): 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)) + (((x1 * 2.0) * t_2) * ((x2 + x2) - 3.0)))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -1e+97) || !(x1 <= 4e+76)) 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(Float64(x1 * 2.0) * t_2) * Float64(Float64(x2 + x2) - 3.0))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -1e+97) || ~((x1 <= 4e+76))) 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)) + (((x1 * 2.0) * t_2) * ((x2 + x2) - 3.0)))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -1e+97], N[Not[LessEqual[x1, 4e+76]], $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[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(N[(x2 + x2), $MachinePrecision] - 3.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 -1 \cdot 10^{+97} \lor \neg \left(x1 \leq 4 \cdot 10^{+76}\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(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(\left(x2 + x2\right) - 3\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.0000000000000001e97 or 4.0000000000000002e76 < x1 Initial program 16.9%
Taylor expanded in x1 around inf 25.3%
*-commutative25.3%
Simplified25.3%
Taylor expanded in x1 around inf 100.0%
if -1.0000000000000001e97 < x1 < 4.0000000000000002e76Initial program 99.3%
Taylor expanded in x1 around 0 95.3%
count-295.0%
Simplified95.3%
Final simplification96.8%
(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_3 4.0) 6.0)))
(t_5 (* (* x1 2.0) t_3))
(t_6 (* x1 (* x1 x1))))
(if (<= x1 -5e+102)
t_1
(if (<= x1 -0.034)
(+
x1
(+
(+ x1 (+ (+ (* t_2 (+ (* t_5 (- t_3 3.0)) t_4)) (* t_0 t_3)) t_6))
9.0))
(if (<= x1 3.5e+48)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(+
x1
(+
t_6
(+
(* t_2 (+ t_4 (* t_5 (- (+ x2 x2) 3.0))))
(* t_0 (+ x2 x2)))))))
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_3 * 4.0) - 6.0);
double t_5 = (x1 * 2.0) * t_3;
double t_6 = x1 * (x1 * x1);
double tmp;
if (x1 <= -5e+102) {
tmp = t_1;
} else if (x1 <= -0.034) {
tmp = x1 + ((x1 + (((t_2 * ((t_5 * (t_3 - 3.0)) + t_4)) + (t_0 * t_3)) + t_6)) + 9.0);
} else if (x1 <= 3.5e+48) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_6 + ((t_2 * (t_4 + (t_5 * ((x2 + x2) - 3.0)))) + (t_0 * (x2 + x2))))));
} 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) :: t_5
real(8) :: t_6
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_3 * 4.0d0) - 6.0d0)
t_5 = (x1 * 2.0d0) * t_3
t_6 = x1 * (x1 * x1)
if (x1 <= (-5d+102)) then
tmp = t_1
else if (x1 <= (-0.034d0)) then
tmp = x1 + ((x1 + (((t_2 * ((t_5 * (t_3 - 3.0d0)) + t_4)) + (t_0 * t_3)) + t_6)) + 9.0d0)
else if (x1 <= 3.5d+48) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (t_6 + ((t_2 * (t_4 + (t_5 * ((x2 + x2) - 3.0d0)))) + (t_0 * (x2 + x2))))))
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_3 * 4.0) - 6.0);
double t_5 = (x1 * 2.0) * t_3;
double t_6 = x1 * (x1 * x1);
double tmp;
if (x1 <= -5e+102) {
tmp = t_1;
} else if (x1 <= -0.034) {
tmp = x1 + ((x1 + (((t_2 * ((t_5 * (t_3 - 3.0)) + t_4)) + (t_0 * t_3)) + t_6)) + 9.0);
} else if (x1 <= 3.5e+48) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_6 + ((t_2 * (t_4 + (t_5 * ((x2 + x2) - 3.0)))) + (t_0 * (x2 + x2))))));
} 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_3 * 4.0) - 6.0) t_5 = (x1 * 2.0) * t_3 t_6 = x1 * (x1 * x1) tmp = 0 if x1 <= -5e+102: tmp = t_1 elif x1 <= -0.034: tmp = x1 + ((x1 + (((t_2 * ((t_5 * (t_3 - 3.0)) + t_4)) + (t_0 * t_3)) + t_6)) + 9.0) elif x1 <= 3.5e+48: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_6 + ((t_2 * (t_4 + (t_5 * ((x2 + x2) - 3.0)))) + (t_0 * (x2 + x2)))))) 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(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) t_5 = Float64(Float64(x1 * 2.0) * t_3) t_6 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if (x1 <= -5e+102) tmp = t_1; elseif (x1 <= -0.034) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(t_5 * Float64(t_3 - 3.0)) + t_4)) + Float64(t_0 * t_3)) + t_6)) + 9.0)); elseif (x1 <= 3.5e+48) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(t_6 + Float64(Float64(t_2 * Float64(t_4 + Float64(t_5 * Float64(Float64(x2 + x2) - 3.0)))) + Float64(t_0 * Float64(x2 + x2))))))); 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_3 * 4.0) - 6.0); t_5 = (x1 * 2.0) * t_3; t_6 = x1 * (x1 * x1); tmp = 0.0; if (x1 <= -5e+102) tmp = t_1; elseif (x1 <= -0.034) tmp = x1 + ((x1 + (((t_2 * ((t_5 * (t_3 - 3.0)) + t_4)) + (t_0 * t_3)) + t_6)) + 9.0); elseif (x1 <= 3.5e+48) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_6 + ((t_2 * (t_4 + (t_5 * ((x2 + x2) - 3.0)))) + (t_0 * (x2 + x2)))))); 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[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5e+102], t$95$1, If[LessEqual[x1, -0.034], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(t$95$5 * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.5e+48], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$6 + N[(N[(t$95$2 * N[(t$95$4 + N[(t$95$5 * N[(N[(x2 + x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 := \left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right)\\
t_5 := \left(x1 \cdot 2\right) \cdot t_3\\
t_6 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -0.034:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(t_5 \cdot \left(t_3 - 3\right) + t_4\right) + t_0 \cdot t_3\right) + t_6\right)\right) + 9\right)\\
\mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+48}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2} + \left(x1 + \left(t_6 + \left(t_2 \cdot \left(t_4 + t_5 \cdot \left(\left(x2 + x2\right) - 3\right)\right) + t_0 \cdot \left(x2 + x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x1 < -5e102 or 3.4999999999999997e48 < x1 Initial program 19.7%
Taylor expanded in x1 around inf 26.0%
*-commutative26.0%
Simplified26.0%
Taylor expanded in x1 around inf 98.1%
if -5e102 < x1 < -0.034000000000000002Initial program 99.4%
Taylor expanded in x1 around inf 95.8%
if -0.034000000000000002 < x1 < 3.4999999999999997e48Initial program 99.3%
Taylor expanded in x1 around 0 98.2%
count-298.2%
Simplified98.2%
Taylor expanded in x1 around 0 97.1%
count-298.2%
Simplified97.1%
Final simplification97.3%
(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 -2.9e+103) (not (<= x1 4.5e+153)))
(- (* x1 (* x1 9.0)) x1)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (+ x2 x2))
(*
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 <= -2.9e+103) || !(x1 <= 4.5e+153)) {
tmp = (x1 * (x1 * 9.0)) - x1;
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (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 <= (-2.9d+103)) .or. (.not. (x1 <= 4.5d+153))) then
tmp = (x1 * (x1 * 9.0d0)) - x1
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (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 <= -2.9e+103) || !(x1 <= 4.5e+153)) {
tmp = (x1 * (x1 * 9.0)) - x1;
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (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 <= -2.9e+103) or not (x1 <= 4.5e+153): tmp = (x1 * (x1 * 9.0)) - x1 else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (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 <= -2.9e+103) || !(x1 <= 4.5e+153)) tmp = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1); 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 * Float64(x2 + x2)) + 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 <= -2.9e+103) || ~((x1 <= 4.5e+153))) tmp = (x1 * (x1 * 9.0)) - x1; else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (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, -2.9e+103], N[Not[LessEqual[x1, 4.5e+153]], $MachinePrecision]], N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $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 * N[(x2 + x2), $MachinePrecision]), $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 -2.9 \cdot 10^{+103} \lor \neg \left(x1 \leq 4.5 \cdot 10^{+153}\right):\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9\right) - x1\\
\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 \left(x2 + x2\right) + 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 < -2.8999999999999998e103 or 4.5000000000000001e153 < x1 Initial program 0.0%
Taylor expanded in x2 around inf 0.0%
associate-*r/0.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 67.2%
*-commutative67.2%
fma-def67.2%
+-commutative67.2%
fma-def75.9%
*-commutative75.9%
fma-neg75.9%
metadata-eval75.9%
unpow275.9%
associate-*r*75.9%
*-commutative75.9%
associate-*l*75.9%
unpow275.9%
cancel-sign-sub-inv75.9%
metadata-eval75.9%
+-commutative75.9%
count-275.9%
Simplified75.9%
Taylor expanded in x2 around 0 90.6%
associate-+r+90.6%
distribute-rgt1-in90.6%
metadata-eval90.6%
neg-mul-190.6%
+-commutative90.6%
unsub-neg90.6%
*-commutative90.6%
unpow290.6%
associate-*l*90.6%
Simplified90.6%
if -2.8999999999999998e103 < x1 < 4.5000000000000001e153Initial program 99.4%
Taylor expanded in x1 around 0 95.4%
count-295.4%
Simplified95.4%
Taylor expanded in x1 around 0 94.0%
Final simplification93.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (- (* x1 (* x1 9.0)) x1))
(t_3 (* x1 (* x1 3.0)))
(t_4 (* t_3 (+ x2 x2)))
(t_5 (/ (- (+ t_3 (* 2.0 x2)) x1) t_1))
(t_6 (* (* x1 2.0) t_5))
(t_7
(+
x1
(+
9.0
(+
x1
(+
t_0
(+
(* t_1 (+ (* t_6 (- t_5 3.0)) (* (* x1 x1) (- (* t_5 4.0) 6.0))))
t_4)))))))
(if (<= x1 -7.5e+105)
t_2
(if (<= x1 -0.0115)
t_7
(if (<= x1 0.65)
(+
x1
(+
(* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_1))
(+
x1
(+
t_0
(+
t_4
(*
t_1
(+
(* t_6 (- (+ x2 x2) 3.0))
(* (* x1 x1) (- (* 4.0 (+ x2 x2)) 6.0)))))))))
(if (<= x1 4.5e+153) t_7 t_2))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (x1 * (x1 * 9.0)) - x1;
double t_3 = x1 * (x1 * 3.0);
double t_4 = t_3 * (x2 + x2);
double t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = x1 + (9.0 + (x1 + (t_0 + ((t_1 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))) + t_4))));
double tmp;
if (x1 <= -7.5e+105) {
tmp = t_2;
} else if (x1 <= -0.0115) {
tmp = t_7;
} else if (x1 <= 0.65) {
tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_1)) + (x1 + (t_0 + (t_4 + (t_1 * ((t_6 * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0))))))));
} else if (x1 <= 4.5e+153) {
tmp = t_7;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
t_2 = (x1 * (x1 * 9.0d0)) - x1
t_3 = x1 * (x1 * 3.0d0)
t_4 = t_3 * (x2 + x2)
t_5 = ((t_3 + (2.0d0 * x2)) - x1) / t_1
t_6 = (x1 * 2.0d0) * t_5
t_7 = x1 + (9.0d0 + (x1 + (t_0 + ((t_1 * ((t_6 * (t_5 - 3.0d0)) + ((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)))) + t_4))))
if (x1 <= (-7.5d+105)) then
tmp = t_2
else if (x1 <= (-0.0115d0)) then
tmp = t_7
else if (x1 <= 0.65d0) then
tmp = x1 + ((3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + (t_0 + (t_4 + (t_1 * ((t_6 * ((x2 + x2) - 3.0d0)) + ((x1 * x1) * ((4.0d0 * (x2 + x2)) - 6.0d0))))))))
else if (x1 <= 4.5d+153) then
tmp = t_7
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (x1 * (x1 * 9.0)) - x1;
double t_3 = x1 * (x1 * 3.0);
double t_4 = t_3 * (x2 + x2);
double t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1;
double t_6 = (x1 * 2.0) * t_5;
double t_7 = x1 + (9.0 + (x1 + (t_0 + ((t_1 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))) + t_4))));
double tmp;
if (x1 <= -7.5e+105) {
tmp = t_2;
} else if (x1 <= -0.0115) {
tmp = t_7;
} else if (x1 <= 0.65) {
tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_1)) + (x1 + (t_0 + (t_4 + (t_1 * ((t_6 * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0))))))));
} else if (x1 <= 4.5e+153) {
tmp = t_7;
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = (x1 * (x1 * 9.0)) - x1 t_3 = x1 * (x1 * 3.0) t_4 = t_3 * (x2 + x2) t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1 t_6 = (x1 * 2.0) * t_5 t_7 = x1 + (9.0 + (x1 + (t_0 + ((t_1 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))) + t_4)))) tmp = 0 if x1 <= -7.5e+105: tmp = t_2 elif x1 <= -0.0115: tmp = t_7 elif x1 <= 0.65: tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_1)) + (x1 + (t_0 + (t_4 + (t_1 * ((t_6 * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0)))))))) elif x1 <= 4.5e+153: tmp = t_7 else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(t_3 * Float64(x2 + x2)) t_5 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_1) t_6 = Float64(Float64(x1 * 2.0) * t_5) t_7 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(Float64(t_1 * Float64(Float64(t_6 * Float64(t_5 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)))) + t_4))))) tmp = 0.0 if (x1 <= -7.5e+105) tmp = t_2; elseif (x1 <= -0.0115) tmp = t_7; elseif (x1 <= 0.65) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_1 * Float64(Float64(t_6 * Float64(Float64(x2 + x2) - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(x2 + x2)) - 6.0))))))))); elseif (x1 <= 4.5e+153) tmp = t_7; else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = (x1 * (x1 * 9.0)) - x1; t_3 = x1 * (x1 * 3.0); t_4 = t_3 * (x2 + x2); t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1; t_6 = (x1 * 2.0) * t_5; t_7 = x1 + (9.0 + (x1 + (t_0 + ((t_1 * ((t_6 * (t_5 - 3.0)) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))) + t_4)))); tmp = 0.0; if (x1 <= -7.5e+105) tmp = t_2; elseif (x1 <= -0.0115) tmp = t_7; elseif (x1 <= 0.65) tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_1)) + (x1 + (t_0 + (t_4 + (t_1 * ((t_6 * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0)))))))); elseif (x1 <= 4.5e+153) tmp = t_7; else tmp = t_2; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(N[(t$95$1 * N[(N[(t$95$6 * N[(t$95$5 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.5e+105], t$95$2, If[LessEqual[x1, -0.0115], t$95$7, If[LessEqual[x1, 0.65], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$1 * N[(N[(t$95$6 * N[(N[(x2 + x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], t$95$7, t$95$2]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot 9\right) - x1\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := t_3 \cdot \left(x2 + x2\right)\\
t_5 := \frac{\left(t_3 + 2 \cdot x2\right) - x1}{t_1}\\
t_6 := \left(x1 \cdot 2\right) \cdot t_5\\
t_7 := x1 + \left(9 + \left(x1 + \left(t_0 + \left(t_1 \cdot \left(t_6 \cdot \left(t_5 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_5 \cdot 4 - 6\right)\right) + t_4\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+105}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x1 \leq -0.0115:\\
\;\;\;\;t_7\\
\mathbf{elif}\;x1 \leq 0.65:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_3 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(t_0 + \left(t_4 + t_1 \cdot \left(t_6 \cdot \left(\left(x2 + x2\right) - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(x2 + x2\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;t_7\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x1 < -7.5000000000000002e105 or 4.5000000000000001e153 < x1 Initial program 0.0%
Taylor expanded in x2 around inf 0.0%
associate-*r/0.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 67.2%
*-commutative67.2%
fma-def67.2%
+-commutative67.2%
fma-def75.9%
*-commutative75.9%
fma-neg75.9%
metadata-eval75.9%
unpow275.9%
associate-*r*75.9%
*-commutative75.9%
associate-*l*75.9%
unpow275.9%
cancel-sign-sub-inv75.9%
metadata-eval75.9%
+-commutative75.9%
count-275.9%
Simplified75.9%
Taylor expanded in x2 around 0 90.6%
associate-+r+90.6%
distribute-rgt1-in90.6%
metadata-eval90.6%
neg-mul-190.6%
+-commutative90.6%
unsub-neg90.6%
*-commutative90.6%
unpow290.6%
associate-*l*90.6%
Simplified90.6%
if -7.5000000000000002e105 < x1 < -0.0115 or 0.650000000000000022 < x1 < 4.5000000000000001e153Initial program 99.5%
Taylor expanded in x1 around 0 84.1%
count-284.1%
Simplified84.1%
Taylor expanded in x1 around inf 84.1%
if -0.0115 < x1 < 0.650000000000000022Initial program 99.3%
Taylor expanded in x1 around 0 98.8%
count-298.8%
Simplified98.8%
Taylor expanded in x1 around 0 98.7%
count-298.8%
Simplified98.7%
Taylor expanded in x1 around 0 98.8%
count-298.8%
Simplified98.8%
Final simplification94.1%
(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 -1.45e+107) (not (<= x1 5e+153)))
(- (* x1 (* x1 9.0)) x1)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (+ x2 x2))
(*
t_1
(+
(* (* x1 x1) (- (* t_2 4.0) 6.0))
(* (- t_2 3.0) (* (* x1 2.0) (+ x2 x2)))))))))))))
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 <= -1.45e+107) || !(x1 <= 5e+153)) {
tmp = (x1 * (x1 * 9.0)) - x1;
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * (x2 + x2)))))))));
}
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 <= (-1.45d+107)) .or. (.not. (x1 <= 5d+153))) then
tmp = (x1 * (x1 * 9.0d0)) - x1
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_1 * (((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)) + ((t_2 - 3.0d0) * ((x1 * 2.0d0) * (x2 + x2)))))))))
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 <= -1.45e+107) || !(x1 <= 5e+153)) {
tmp = (x1 * (x1 * 9.0)) - x1;
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * (x2 + x2)))))))));
}
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 <= -1.45e+107) or not (x1 <= 5e+153): tmp = (x1 * (x1 * 9.0)) - x1 else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * (x2 + x2))))))))) 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 <= -1.45e+107) || !(x1 <= 5e+153)) tmp = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1); 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 * Float64(x2 + x2)) + 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(x2 + x2)))))))))); 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 <= -1.45e+107) || ~((x1 <= 5e+153))) tmp = (x1 * (x1 * 9.0)) - x1; else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * (x2 + x2))))))))); 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, -1.45e+107], N[Not[LessEqual[x1, 5e+153]], $MachinePrecision]], N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $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 * N[(x2 + x2), $MachinePrecision]), $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[(x2 + x2), $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 -1.45 \cdot 10^{+107} \lor \neg \left(x1 \leq 5 \cdot 10^{+153}\right):\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9\right) - x1\\
\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 \left(x2 + x2\right) + 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(x2 + x2\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.44999999999999994e107 or 5.00000000000000018e153 < x1 Initial program 0.0%
Taylor expanded in x2 around inf 0.0%
associate-*r/0.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 67.2%
*-commutative67.2%
fma-def67.2%
+-commutative67.2%
fma-def75.9%
*-commutative75.9%
fma-neg75.9%
metadata-eval75.9%
unpow275.9%
associate-*r*75.9%
*-commutative75.9%
associate-*l*75.9%
unpow275.9%
cancel-sign-sub-inv75.9%
metadata-eval75.9%
+-commutative75.9%
count-275.9%
Simplified75.9%
Taylor expanded in x2 around 0 90.6%
associate-+r+90.6%
distribute-rgt1-in90.6%
metadata-eval90.6%
neg-mul-190.6%
+-commutative90.6%
unsub-neg90.6%
*-commutative90.6%
unpow290.6%
associate-*l*90.6%
Simplified90.6%
if -1.44999999999999994e107 < x1 < 5.00000000000000018e153Initial program 99.4%
Taylor expanded in x1 around 0 95.4%
count-295.4%
Simplified95.4%
Taylor expanded in x1 around 0 93.6%
count-295.4%
Simplified93.6%
Final simplification92.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (* x1 (* x1 9.0)) x1))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_4
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (+ x2 x2))
(*
t_2
(+
(* (* x1 x1) (- (* t_3 4.0) 6.0))
(* (- t_3 3.0) (* (* x1 2.0) (+ x2 x2))))))))))
(if (<= x1 -4.3e+104)
t_1
(if (<= x1 -0.45)
(+ x1 (+ 9.0 t_4))
(if (<= x1 0.004)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(+ x1 (* 4.0 (* 2.0 (* x2 (* x1 x2)))))))
(if (<= x1 4.5e+153) (+ x1 (+ t_4 (* 3.0 (* x2 -2.0)))) t_1))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * (x1 * 9.0)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * ((x1 * 2.0) * (x2 + x2)))))));
double tmp;
if (x1 <= -4.3e+104) {
tmp = t_1;
} else if (x1 <= -0.45) {
tmp = x1 + (9.0 + t_4);
} else if (x1 <= 0.004) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + (t_4 + (3.0 * (x2 * -2.0)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * (x1 * 9.0d0)) - x1
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_0 + (2.0d0 * x2)) - x1) / t_2
t_4 = x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_2 * (((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)) + ((t_3 - 3.0d0) * ((x1 * 2.0d0) * (x2 + x2)))))))
if (x1 <= (-4.3d+104)) then
tmp = t_1
else if (x1 <= (-0.45d0)) then
tmp = x1 + (9.0d0 + t_4)
else if (x1 <= 0.004d0) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (4.0d0 * (2.0d0 * (x2 * (x1 * x2))))))
else if (x1 <= 4.5d+153) then
tmp = x1 + (t_4 + (3.0d0 * (x2 * (-2.0d0))))
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 * 9.0)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * ((x1 * 2.0) * (x2 + x2)))))));
double tmp;
if (x1 <= -4.3e+104) {
tmp = t_1;
} else if (x1 <= -0.45) {
tmp = x1 + (9.0 + t_4);
} else if (x1 <= 0.004) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + (t_4 + (3.0 * (x2 * -2.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * (x1 * 9.0)) - x1 t_2 = (x1 * x1) + 1.0 t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2 t_4 = x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * ((x1 * 2.0) * (x2 + x2))))))) tmp = 0 if x1 <= -4.3e+104: tmp = t_1 elif x1 <= -0.45: tmp = x1 + (9.0 + t_4) elif x1 <= 0.004: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))) elif x1 <= 4.5e+153: tmp = x1 + (t_4 + (3.0 * (x2 * -2.0))) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1) 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(x1 * x1)) + Float64(Float64(t_0 * Float64(x2 + x2)) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) + Float64(Float64(t_3 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x2 + x2)))))))) tmp = 0.0 if (x1 <= -4.3e+104) tmp = t_1; elseif (x1 <= -0.45) tmp = Float64(x1 + Float64(9.0 + t_4)); elseif (x1 <= 0.004) 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(2.0 * Float64(x2 * Float64(x1 * x2))))))); elseif (x1 <= 4.5e+153) tmp = Float64(x1 + Float64(t_4 + Float64(3.0 * Float64(x2 * -2.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * (x1 * 9.0)) - x1; t_2 = (x1 * x1) + 1.0; t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2; t_4 = x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * ((x1 * 2.0) * (x2 + x2))))))); tmp = 0.0; if (x1 <= -4.3e+104) tmp = t_1; elseif (x1 <= -0.45) tmp = x1 + (9.0 + t_4); elseif (x1 <= 0.004) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))); elseif (x1 <= 4.5e+153) tmp = x1 + (t_4 + (3.0 * (x2 * -2.0))); 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[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $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[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.3e+104], t$95$1, If[LessEqual[x1, -0.45], N[(x1 + N[(9.0 + t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.004], 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[(2.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x1 + N[(t$95$4 + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 9\right) - x1\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2}\\
t_4 := x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \left(x2 + x2\right) + t_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right) + \left(t_3 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 + x2\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.3 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -0.45:\\
\;\;\;\;x1 + \left(9 + t_4\right)\\
\mathbf{elif}\;x1 \leq 0.004:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2} + \left(x1 + 4 \cdot \left(2 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(t_4 + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x1 < -4.3000000000000002e104 or 4.5000000000000001e153 < x1 Initial program 0.0%
Taylor expanded in x2 around inf 0.0%
associate-*r/0.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 67.2%
*-commutative67.2%
fma-def67.2%
+-commutative67.2%
fma-def75.9%
*-commutative75.9%
fma-neg75.9%
metadata-eval75.9%
unpow275.9%
associate-*r*75.9%
*-commutative75.9%
associate-*l*75.9%
unpow275.9%
cancel-sign-sub-inv75.9%
metadata-eval75.9%
+-commutative75.9%
count-275.9%
Simplified75.9%
Taylor expanded in x2 around 0 90.6%
associate-+r+90.6%
distribute-rgt1-in90.6%
metadata-eval90.6%
neg-mul-190.6%
+-commutative90.6%
unsub-neg90.6%
*-commutative90.6%
unpow290.6%
associate-*l*90.6%
Simplified90.6%
if -4.3000000000000002e104 < x1 < -0.450000000000000011Initial program 99.4%
Taylor expanded in x1 around 0 77.3%
count-277.3%
Simplified77.3%
Taylor expanded in x1 around 0 73.5%
count-277.3%
Simplified73.5%
Taylor expanded in x1 around inf 73.5%
if -0.450000000000000011 < x1 < 0.0040000000000000001Initial program 99.3%
Taylor expanded in x1 around 0 88.7%
Taylor expanded in x2 around inf 88.7%
unpow288.1%
associate-*r*98.7%
*-commutative98.7%
Simplified99.3%
if 0.0040000000000000001 < x1 < 4.5000000000000001e153Initial program 99.6%
Taylor expanded in x1 around 0 86.9%
count-286.9%
Simplified86.9%
Taylor expanded in x1 around 0 79.9%
count-286.9%
Simplified79.9%
Taylor expanded in x1 around 0 80.7%
*-commutative80.7%
Simplified80.7%
Final simplification93.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* t_0 (+ x2 x2)))
(t_2 (- (* x1 (* x1 9.0)) x1))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (* x1 (* x1 x1)))
(t_5 (/ (- (+ t_0 (* 2.0 x2)) x1) t_3))
(t_6
(+
x1
(+
t_4
(+
t_1
(*
t_3
(+
(* (* x1 x1) (- (* t_5 4.0) 6.0))
(* (- t_5 3.0) (* (* x1 2.0) (+ x2 x2))))))))))
(if (<= x1 -3.3e+107)
t_2
(if (<= x1 -1.45)
(+ x1 (+ 9.0 t_6))
(if (<= x1 0.004)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_3))
(+
x1
(+
t_4
(+
t_1
(*
t_3
(+
(* (* (* x1 2.0) t_5) (- (+ x2 x2) 3.0))
(* (* x1 x1) (- (* 4.0 (+ x2 x2)) 6.0)))))))))
(if (<= x1 4.5e+153) (+ x1 (+ t_6 (* 3.0 (* x2 -2.0)))) t_2))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 * (x2 + x2);
double t_2 = (x1 * (x1 * 9.0)) - x1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = x1 * (x1 * x1);
double t_5 = ((t_0 + (2.0 * x2)) - x1) / t_3;
double t_6 = x1 + (t_4 + (t_1 + (t_3 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((t_5 - 3.0) * ((x1 * 2.0) * (x2 + x2)))))));
double tmp;
if (x1 <= -3.3e+107) {
tmp = t_2;
} else if (x1 <= -1.45) {
tmp = x1 + (9.0 + t_6);
} else if (x1 <= 0.004) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_4 + (t_1 + (t_3 * ((((x1 * 2.0) * t_5) * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0))))))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + (t_6 + (3.0 * (x2 * -2.0)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = t_0 * (x2 + x2)
t_2 = (x1 * (x1 * 9.0d0)) - x1
t_3 = (x1 * x1) + 1.0d0
t_4 = x1 * (x1 * x1)
t_5 = ((t_0 + (2.0d0 * x2)) - x1) / t_3
t_6 = x1 + (t_4 + (t_1 + (t_3 * (((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)) + ((t_5 - 3.0d0) * ((x1 * 2.0d0) * (x2 + x2)))))))
if (x1 <= (-3.3d+107)) then
tmp = t_2
else if (x1 <= (-1.45d0)) then
tmp = x1 + (9.0d0 + t_6)
else if (x1 <= 0.004d0) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_3)) + (x1 + (t_4 + (t_1 + (t_3 * ((((x1 * 2.0d0) * t_5) * ((x2 + x2) - 3.0d0)) + ((x1 * x1) * ((4.0d0 * (x2 + x2)) - 6.0d0))))))))
else if (x1 <= 4.5d+153) then
tmp = x1 + (t_6 + (3.0d0 * (x2 * (-2.0d0))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 * (x2 + x2);
double t_2 = (x1 * (x1 * 9.0)) - x1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = x1 * (x1 * x1);
double t_5 = ((t_0 + (2.0 * x2)) - x1) / t_3;
double t_6 = x1 + (t_4 + (t_1 + (t_3 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((t_5 - 3.0) * ((x1 * 2.0) * (x2 + x2)))))));
double tmp;
if (x1 <= -3.3e+107) {
tmp = t_2;
} else if (x1 <= -1.45) {
tmp = x1 + (9.0 + t_6);
} else if (x1 <= 0.004) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_4 + (t_1 + (t_3 * ((((x1 * 2.0) * t_5) * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0))))))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + (t_6 + (3.0 * (x2 * -2.0)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = t_0 * (x2 + x2) t_2 = (x1 * (x1 * 9.0)) - x1 t_3 = (x1 * x1) + 1.0 t_4 = x1 * (x1 * x1) t_5 = ((t_0 + (2.0 * x2)) - x1) / t_3 t_6 = x1 + (t_4 + (t_1 + (t_3 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((t_5 - 3.0) * ((x1 * 2.0) * (x2 + x2))))))) tmp = 0 if x1 <= -3.3e+107: tmp = t_2 elif x1 <= -1.45: tmp = x1 + (9.0 + t_6) elif x1 <= 0.004: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_4 + (t_1 + (t_3 * ((((x1 * 2.0) * t_5) * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0)))))))) elif x1 <= 4.5e+153: tmp = x1 + (t_6 + (3.0 * (x2 * -2.0))) else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(t_0 * Float64(x2 + x2)) t_2 = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(x1 * Float64(x1 * x1)) t_5 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_3) t_6 = Float64(x1 + Float64(t_4 + Float64(t_1 + Float64(t_3 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) + Float64(Float64(t_5 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x2 + x2)))))))) tmp = 0.0 if (x1 <= -3.3e+107) tmp = t_2; elseif (x1 <= -1.45) tmp = Float64(x1 + Float64(9.0 + t_6)); elseif (x1 <= 0.004) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_3)) + Float64(x1 + Float64(t_4 + Float64(t_1 + Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(Float64(x2 + x2) - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(x2 + x2)) - 6.0))))))))); elseif (x1 <= 4.5e+153) tmp = Float64(x1 + Float64(t_6 + Float64(3.0 * Float64(x2 * -2.0)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = t_0 * (x2 + x2); t_2 = (x1 * (x1 * 9.0)) - x1; t_3 = (x1 * x1) + 1.0; t_4 = x1 * (x1 * x1); t_5 = ((t_0 + (2.0 * x2)) - x1) / t_3; t_6 = x1 + (t_4 + (t_1 + (t_3 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((t_5 - 3.0) * ((x1 * 2.0) * (x2 + x2))))))); tmp = 0.0; if (x1 <= -3.3e+107) tmp = t_2; elseif (x1 <= -1.45) tmp = x1 + (9.0 + t_6); elseif (x1 <= 0.004) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_4 + (t_1 + (t_3 * ((((x1 * 2.0) * t_5) * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0)))))))); elseif (x1 <= 4.5e+153) tmp = x1 + (t_6 + (3.0 * (x2 * -2.0))); else tmp = t_2; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(t$95$4 + N[(t$95$1 + N[(t$95$3 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$5 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.3e+107], t$95$2, If[LessEqual[x1, -1.45], N[(x1 + N[(9.0 + t$95$6), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.004], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$4 + N[(t$95$1 + N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(N[(x2 + x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x1 + N[(t$95$6 + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := t_0 \cdot \left(x2 + x2\right)\\
t_2 := x1 \cdot \left(x1 \cdot 9\right) - x1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
t_5 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_3}\\
t_6 := x1 + \left(t_4 + \left(t_1 + t_3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_5 \cdot 4 - 6\right) + \left(t_5 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 + x2\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -3.3 \cdot 10^{+107}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x1 \leq -1.45:\\
\;\;\;\;x1 + \left(9 + t_6\right)\\
\mathbf{elif}\;x1 \leq 0.004:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_3} + \left(x1 + \left(t_4 + \left(t_1 + t_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_5\right) \cdot \left(\left(x2 + x2\right) - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(x2 + x2\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(t_6 + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x1 < -3.30000000000000032e107 or 4.5000000000000001e153 < x1 Initial program 0.0%
Taylor expanded in x2 around inf 0.0%
associate-*r/0.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 67.2%
*-commutative67.2%
fma-def67.2%
+-commutative67.2%
fma-def75.9%
*-commutative75.9%
fma-neg75.9%
metadata-eval75.9%
unpow275.9%
associate-*r*75.9%
*-commutative75.9%
associate-*l*75.9%
unpow275.9%
cancel-sign-sub-inv75.9%
metadata-eval75.9%
+-commutative75.9%
count-275.9%
Simplified75.9%
Taylor expanded in x2 around 0 90.6%
associate-+r+90.6%
distribute-rgt1-in90.6%
metadata-eval90.6%
neg-mul-190.6%
+-commutative90.6%
unsub-neg90.6%
*-commutative90.6%
unpow290.6%
associate-*l*90.6%
Simplified90.6%
if -3.30000000000000032e107 < x1 < -1.44999999999999996Initial program 99.4%
Taylor expanded in x1 around 0 77.3%
count-277.3%
Simplified77.3%
Taylor expanded in x1 around 0 73.5%
count-277.3%
Simplified73.5%
Taylor expanded in x1 around inf 73.5%
if -1.44999999999999996 < x1 < 0.0040000000000000001Initial program 99.3%
Taylor expanded in x1 around 0 99.3%
count-299.3%
Simplified99.3%
Taylor expanded in x1 around 0 99.3%
count-299.3%
Simplified99.3%
Taylor expanded in x1 around 0 99.3%
count-299.3%
Simplified99.3%
if 0.0040000000000000001 < x1 < 4.5000000000000001e153Initial program 99.6%
Taylor expanded in x1 around 0 86.9%
count-286.9%
Simplified86.9%
Taylor expanded in x1 around 0 79.9%
count-286.9%
Simplified79.9%
Taylor expanded in x1 around 0 80.7%
*-commutative80.7%
Simplified80.7%
Final simplification93.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* t_0 (+ x2 x2)))
(t_2 (- (* x1 (* x1 9.0)) x1))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (* x1 (* x1 x1)))
(t_5 (/ (- (+ t_0 (* 2.0 x2)) x1) t_3))
(t_6
(+
x1
(+
t_4
(+
t_1
(*
t_3
(+
(* (* x1 x1) (- (* t_5 4.0) 6.0))
(* (- t_5 3.0) (* (* x1 2.0) (+ x2 x2))))))))))
(if (<= x1 -2.85e+103)
t_2
(if (<= x1 -0.66)
(+ x1 (+ t_6 (* 3.0 (+ 3.0 (/ -1.0 x1)))))
(if (<= x1 0.004)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_3))
(+
x1
(+
t_4
(+
t_1
(*
t_3
(+
(* (* (* x1 2.0) t_5) (- (+ x2 x2) 3.0))
(* (* x1 x1) (- (* 4.0 (+ x2 x2)) 6.0)))))))))
(if (<= x1 4.5e+153) (+ x1 (+ t_6 (* 3.0 (* x2 -2.0)))) t_2))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 * (x2 + x2);
double t_2 = (x1 * (x1 * 9.0)) - x1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = x1 * (x1 * x1);
double t_5 = ((t_0 + (2.0 * x2)) - x1) / t_3;
double t_6 = x1 + (t_4 + (t_1 + (t_3 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((t_5 - 3.0) * ((x1 * 2.0) * (x2 + x2)))))));
double tmp;
if (x1 <= -2.85e+103) {
tmp = t_2;
} else if (x1 <= -0.66) {
tmp = x1 + (t_6 + (3.0 * (3.0 + (-1.0 / x1))));
} else if (x1 <= 0.004) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_4 + (t_1 + (t_3 * ((((x1 * 2.0) * t_5) * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0))))))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + (t_6 + (3.0 * (x2 * -2.0)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = t_0 * (x2 + x2)
t_2 = (x1 * (x1 * 9.0d0)) - x1
t_3 = (x1 * x1) + 1.0d0
t_4 = x1 * (x1 * x1)
t_5 = ((t_0 + (2.0d0 * x2)) - x1) / t_3
t_6 = x1 + (t_4 + (t_1 + (t_3 * (((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)) + ((t_5 - 3.0d0) * ((x1 * 2.0d0) * (x2 + x2)))))))
if (x1 <= (-2.85d+103)) then
tmp = t_2
else if (x1 <= (-0.66d0)) then
tmp = x1 + (t_6 + (3.0d0 * (3.0d0 + ((-1.0d0) / x1))))
else if (x1 <= 0.004d0) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_3)) + (x1 + (t_4 + (t_1 + (t_3 * ((((x1 * 2.0d0) * t_5) * ((x2 + x2) - 3.0d0)) + ((x1 * x1) * ((4.0d0 * (x2 + x2)) - 6.0d0))))))))
else if (x1 <= 4.5d+153) then
tmp = x1 + (t_6 + (3.0d0 * (x2 * (-2.0d0))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 * (x2 + x2);
double t_2 = (x1 * (x1 * 9.0)) - x1;
double t_3 = (x1 * x1) + 1.0;
double t_4 = x1 * (x1 * x1);
double t_5 = ((t_0 + (2.0 * x2)) - x1) / t_3;
double t_6 = x1 + (t_4 + (t_1 + (t_3 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((t_5 - 3.0) * ((x1 * 2.0) * (x2 + x2)))))));
double tmp;
if (x1 <= -2.85e+103) {
tmp = t_2;
} else if (x1 <= -0.66) {
tmp = x1 + (t_6 + (3.0 * (3.0 + (-1.0 / x1))));
} else if (x1 <= 0.004) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_4 + (t_1 + (t_3 * ((((x1 * 2.0) * t_5) * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0))))))));
} else if (x1 <= 4.5e+153) {
tmp = x1 + (t_6 + (3.0 * (x2 * -2.0)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = t_0 * (x2 + x2) t_2 = (x1 * (x1 * 9.0)) - x1 t_3 = (x1 * x1) + 1.0 t_4 = x1 * (x1 * x1) t_5 = ((t_0 + (2.0 * x2)) - x1) / t_3 t_6 = x1 + (t_4 + (t_1 + (t_3 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((t_5 - 3.0) * ((x1 * 2.0) * (x2 + x2))))))) tmp = 0 if x1 <= -2.85e+103: tmp = t_2 elif x1 <= -0.66: tmp = x1 + (t_6 + (3.0 * (3.0 + (-1.0 / x1)))) elif x1 <= 0.004: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_4 + (t_1 + (t_3 * ((((x1 * 2.0) * t_5) * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0)))))))) elif x1 <= 4.5e+153: tmp = x1 + (t_6 + (3.0 * (x2 * -2.0))) else: tmp = t_2 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(t_0 * Float64(x2 + x2)) t_2 = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(x1 * Float64(x1 * x1)) t_5 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_3) t_6 = Float64(x1 + Float64(t_4 + Float64(t_1 + Float64(t_3 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) + Float64(Float64(t_5 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x2 + x2)))))))) tmp = 0.0 if (x1 <= -2.85e+103) tmp = t_2; elseif (x1 <= -0.66) tmp = Float64(x1 + Float64(t_6 + Float64(3.0 * Float64(3.0 + Float64(-1.0 / x1))))); elseif (x1 <= 0.004) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_3)) + Float64(x1 + Float64(t_4 + Float64(t_1 + Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(Float64(x2 + x2) - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(x2 + x2)) - 6.0))))))))); elseif (x1 <= 4.5e+153) tmp = Float64(x1 + Float64(t_6 + Float64(3.0 * Float64(x2 * -2.0)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = t_0 * (x2 + x2); t_2 = (x1 * (x1 * 9.0)) - x1; t_3 = (x1 * x1) + 1.0; t_4 = x1 * (x1 * x1); t_5 = ((t_0 + (2.0 * x2)) - x1) / t_3; t_6 = x1 + (t_4 + (t_1 + (t_3 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + ((t_5 - 3.0) * ((x1 * 2.0) * (x2 + x2))))))); tmp = 0.0; if (x1 <= -2.85e+103) tmp = t_2; elseif (x1 <= -0.66) tmp = x1 + (t_6 + (3.0 * (3.0 + (-1.0 / x1)))); elseif (x1 <= 0.004) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_4 + (t_1 + (t_3 * ((((x1 * 2.0) * t_5) * ((x2 + x2) - 3.0)) + ((x1 * x1) * ((4.0 * (x2 + x2)) - 6.0)))))))); elseif (x1 <= 4.5e+153) tmp = x1 + (t_6 + (3.0 * (x2 * -2.0))); else tmp = t_2; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(t$95$4 + N[(t$95$1 + N[(t$95$3 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$5 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.85e+103], t$95$2, If[LessEqual[x1, -0.66], N[(x1 + N[(t$95$6 + N[(3.0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.004], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$4 + N[(t$95$1 + N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(N[(x2 + x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x1 + N[(t$95$6 + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := t_0 \cdot \left(x2 + x2\right)\\
t_2 := x1 \cdot \left(x1 \cdot 9\right) - x1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
t_5 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_3}\\
t_6 := x1 + \left(t_4 + \left(t_1 + t_3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_5 \cdot 4 - 6\right) + \left(t_5 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 + x2\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.85 \cdot 10^{+103}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x1 \leq -0.66:\\
\;\;\;\;x1 + \left(t_6 + 3 \cdot \left(3 + \frac{-1}{x1}\right)\right)\\
\mathbf{elif}\;x1 \leq 0.004:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_3} + \left(x1 + \left(t_4 + \left(t_1 + t_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_5\right) \cdot \left(\left(x2 + x2\right) - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(x2 + x2\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 + \left(t_6 + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x1 < -2.85000000000000016e103 or 4.5000000000000001e153 < x1 Initial program 0.0%
Taylor expanded in x2 around inf 0.0%
associate-*r/0.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 67.2%
*-commutative67.2%
fma-def67.2%
+-commutative67.2%
fma-def75.9%
*-commutative75.9%
fma-neg75.9%
metadata-eval75.9%
unpow275.9%
associate-*r*75.9%
*-commutative75.9%
associate-*l*75.9%
unpow275.9%
cancel-sign-sub-inv75.9%
metadata-eval75.9%
+-commutative75.9%
count-275.9%
Simplified75.9%
Taylor expanded in x2 around 0 90.6%
associate-+r+90.6%
distribute-rgt1-in90.6%
metadata-eval90.6%
neg-mul-190.6%
+-commutative90.6%
unsub-neg90.6%
*-commutative90.6%
unpow290.6%
associate-*l*90.6%
Simplified90.6%
if -2.85000000000000016e103 < x1 < -0.660000000000000031Initial program 99.4%
Taylor expanded in x1 around 0 77.3%
count-277.3%
Simplified77.3%
Taylor expanded in x1 around 0 73.5%
count-277.3%
Simplified73.5%
Taylor expanded in x1 around inf 73.5%
if -0.660000000000000031 < x1 < 0.0040000000000000001Initial program 99.3%
Taylor expanded in x1 around 0 99.3%
count-299.3%
Simplified99.3%
Taylor expanded in x1 around 0 99.3%
count-299.3%
Simplified99.3%
Taylor expanded in x1 around 0 99.3%
count-299.3%
Simplified99.3%
if 0.0040000000000000001 < x1 < 4.5000000000000001e153Initial program 99.6%
Taylor expanded in x1 around 0 86.9%
count-286.9%
Simplified86.9%
Taylor expanded in x1 around 0 79.9%
count-286.9%
Simplified79.9%
Taylor expanded in x1 around 0 80.7%
*-commutative80.7%
Simplified80.7%
Final simplification93.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (* x1 (* x1 9.0)) x1))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
(t_4
(+
x1
(+
9.0
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (+ x2 x2))
(*
t_2
(+
(* (* x1 x1) (- (* t_3 4.0) 6.0))
(* (- t_3 3.0) (* (* x1 2.0) (+ x2 x2))))))))))))
(if (<= x1 -3.8e+103)
t_1
(if (<= x1 -0.45)
t_4
(if (<= x1 1.75)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))
(+ x1 (* 4.0 (* 2.0 (* x2 (* x1 x2)))))))
(if (<= x1 5e+153) t_4 t_1))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * (x1 * 9.0)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * ((x1 * 2.0) * (x2 + x2)))))))));
double tmp;
if (x1 <= -3.8e+103) {
tmp = t_1;
} else if (x1 <= -0.45) {
tmp = t_4;
} else if (x1 <= 1.75) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else if (x1 <= 5e+153) {
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 * 9.0d0)) - x1
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_0 + (2.0d0 * x2)) - x1) / t_2
t_4 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_2 * (((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)) + ((t_3 - 3.0d0) * ((x1 * 2.0d0) * (x2 + x2)))))))))
if (x1 <= (-3.8d+103)) then
tmp = t_1
else if (x1 <= (-0.45d0)) then
tmp = t_4
else if (x1 <= 1.75d0) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (4.0d0 * (2.0d0 * (x2 * (x1 * x2))))))
else if (x1 <= 5d+153) 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 * 9.0)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * ((x1 * 2.0) * (x2 + x2)))))))));
double tmp;
if (x1 <= -3.8e+103) {
tmp = t_1;
} else if (x1 <= -0.45) {
tmp = t_4;
} else if (x1 <= 1.75) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else if (x1 <= 5e+153) {
tmp = t_4;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * (x1 * 9.0)) - x1 t_2 = (x1 * x1) + 1.0 t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2 t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * ((x1 * 2.0) * (x2 + x2))))))))) tmp = 0 if x1 <= -3.8e+103: tmp = t_1 elif x1 <= -0.45: tmp = t_4 elif x1 <= 1.75: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))) elif x1 <= 5e+153: tmp = t_4 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1) 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(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(x2 + x2)) + Float64(t_2 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) + Float64(Float64(t_3 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(x2 + x2)))))))))) tmp = 0.0 if (x1 <= -3.8e+103) tmp = t_1; elseif (x1 <= -0.45) tmp = t_4; elseif (x1 <= 1.75) 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(2.0 * Float64(x2 * Float64(x1 * x2))))))); elseif (x1 <= 5e+153) 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 * 9.0)) - x1; t_2 = (x1 * x1) + 1.0; t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2; t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (x2 + x2)) + (t_2 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * ((x1 * 2.0) * (x2 + x2))))))))); tmp = 0.0; if (x1 <= -3.8e+103) tmp = t_1; elseif (x1 <= -0.45) tmp = t_4; elseif (x1 <= 1.75) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))); elseif (x1 <= 5e+153) 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[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $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[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(x2 + x2), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(x2 + x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.8e+103], t$95$1, If[LessEqual[x1, -0.45], t$95$4, If[LessEqual[x1, 1.75], 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[(2.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], t$95$4, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot 9\right) - x1\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_2}\\
t_4 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \left(x2 + x2\right) + t_2 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right) + \left(t_3 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 + x2\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -3.8 \cdot 10^{+103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -0.45:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x1 \leq 1.75:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_2} + \left(x1 + 4 \cdot \left(2 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x1 < -3.7999999999999997e103 or 5.00000000000000018e153 < x1 Initial program 0.0%
Taylor expanded in x2 around inf 0.0%
associate-*r/0.0%
unpow20.0%
+-commutative0.0%
unpow20.0%
fma-udef0.0%
Simplified0.0%
Taylor expanded in x1 around 0 67.2%
*-commutative67.2%
fma-def67.2%
+-commutative67.2%
fma-def75.9%
*-commutative75.9%
fma-neg75.9%
metadata-eval75.9%
unpow275.9%
associate-*r*75.9%
*-commutative75.9%
associate-*l*75.9%
unpow275.9%
cancel-sign-sub-inv75.9%
metadata-eval75.9%
+-commutative75.9%
count-275.9%
Simplified75.9%
Taylor expanded in x2 around 0 90.6%
associate-+r+90.6%
distribute-rgt1-in90.6%
metadata-eval90.6%
neg-mul-190.6%
+-commutative90.6%
unsub-neg90.6%
*-commutative90.6%
unpow290.6%
associate-*l*90.6%
Simplified90.6%
if -3.7999999999999997e103 < x1 < -0.450000000000000011 or 1.75 < x1 < 5.00000000000000018e153Initial program 99.5%
Taylor expanded in x1 around 0 84.1%
count-284.1%
Simplified84.1%
Taylor expanded in x1 around 0 78.6%
count-284.1%
Simplified78.6%
Taylor expanded in x1 around inf 78.6%
if -0.450000000000000011 < x1 < 1.75Initial program 99.3%
Taylor expanded in x1 around 0 88.2%
Taylor expanded in x2 around inf 88.2%
unpow287.7%
associate-*r*98.2%
*-commutative98.2%
Simplified98.6%
Final simplification93.1%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -4.5e+91) (not (<= x1 4.1e+130)))
(- (* x1 (* x1 9.0)) x1)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* 2.0 (* x2 (* x1 x2)))))))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -4.5e+91) || !(x1 <= 4.1e+130)) {
tmp = (x1 * (x1 * 9.0)) - x1;
} else {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-4.5d+91)) .or. (.not. (x1 <= 4.1d+130))) then
tmp = (x1 * (x1 * 9.0d0)) - x1
else
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (2.0d0 * (x2 * (x1 * x2))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -4.5e+91) || !(x1 <= 4.1e+130)) {
tmp = (x1 * (x1 * 9.0)) - x1;
} else {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -4.5e+91) or not (x1 <= 4.1e+130): tmp = (x1 * (x1 * 9.0)) - x1 else: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -4.5e+91) || !(x1 <= 4.1e+130)) tmp = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1); else 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(x2 * Float64(x1 * x2))))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -4.5e+91) || ~((x1 <= 4.1e+130))) tmp = (x1 * (x1 * 9.0)) - x1; else tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -4.5e+91], N[Not[LessEqual[x1, 4.1e+130]], $MachinePrecision]], N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], 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[(x2 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+91} \lor \neg \left(x1 \leq 4.1 \cdot 10^{+130}\right):\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9\right) - x1\\
\mathbf{else}:\\
\;\;\;\;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(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5e91 or 4.09999999999999978e130 < x1 Initial program 8.0%
Taylor expanded in x2 around inf 0.2%
associate-*r/0.2%
unpow20.2%
+-commutative0.2%
unpow20.2%
fma-udef0.2%
Simplified0.2%
Taylor expanded in x1 around 0 62.0%
*-commutative62.0%
fma-def62.0%
+-commutative62.0%
fma-def71.3%
*-commutative71.3%
fma-neg71.3%
metadata-eval71.3%
unpow271.3%
associate-*r*71.3%
*-commutative71.3%
associate-*l*71.3%
unpow271.3%
cancel-sign-sub-inv71.3%
metadata-eval71.3%
+-commutative71.3%
count-271.3%
Simplified71.3%
Taylor expanded in x2 around 0 83.9%
associate-+r+83.9%
distribute-rgt1-in83.9%
metadata-eval83.9%
neg-mul-183.9%
+-commutative83.9%
unsub-neg83.9%
*-commutative83.9%
unpow283.9%
associate-*l*83.9%
Simplified83.9%
if -4.5e91 < x1 < 4.09999999999999978e130Initial program 99.3%
Taylor expanded in x1 around 0 75.8%
Taylor expanded in x2 around inf 75.8%
unpow275.3%
associate-*r*83.6%
*-commutative83.6%
Simplified84.1%
Final simplification84.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* x1 (* x1 9.0)) x1)))
(if (<= x1 -3.7e+91)
t_0
(if (<= x1 -5e-114)
(+ (* x1 (+ -1.0 (* x2 (* x2 8.0)))) (* x2 -6.0))
(if (<= x1 5.4e-235)
(- (* x2 -6.0) x1)
(if (<= x1 4.1e+130)
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))
t_0))))))
double code(double x1, double x2) {
double t_0 = (x1 * (x1 * 9.0)) - x1;
double tmp;
if (x1 <= -3.7e+91) {
tmp = t_0;
} else if (x1 <= -5e-114) {
tmp = (x1 * (-1.0 + (x2 * (x2 * 8.0)))) + (x2 * -6.0);
} else if (x1 <= 5.4e-235) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 4.1e+130) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = (x1 * (x1 * 9.0d0)) - x1
if (x1 <= (-3.7d+91)) then
tmp = t_0
else if (x1 <= (-5d-114)) then
tmp = (x1 * ((-1.0d0) + (x2 * (x2 * 8.0d0)))) + (x2 * (-6.0d0))
else if (x1 <= 5.4d-235) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 4.1d+130) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * (x1 * 9.0)) - x1;
double tmp;
if (x1 <= -3.7e+91) {
tmp = t_0;
} else if (x1 <= -5e-114) {
tmp = (x1 * (-1.0 + (x2 * (x2 * 8.0)))) + (x2 * -6.0);
} else if (x1 <= 5.4e-235) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 4.1e+130) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * (x1 * 9.0)) - x1 tmp = 0 if x1 <= -3.7e+91: tmp = t_0 elif x1 <= -5e-114: tmp = (x1 * (-1.0 + (x2 * (x2 * 8.0)))) + (x2 * -6.0) elif x1 <= 5.4e-235: tmp = (x2 * -6.0) - x1 elif x1 <= 4.1e+130: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1) tmp = 0.0 if (x1 <= -3.7e+91) tmp = t_0; elseif (x1 <= -5e-114) tmp = Float64(Float64(x1 * Float64(-1.0 + Float64(x2 * Float64(x2 * 8.0)))) + Float64(x2 * -6.0)); elseif (x1 <= 5.4e-235) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 4.1e+130) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * (x1 * 9.0)) - x1; tmp = 0.0; if (x1 <= -3.7e+91) tmp = t_0; elseif (x1 <= -5e-114) tmp = (x1 * (-1.0 + (x2 * (x2 * 8.0)))) + (x2 * -6.0); elseif (x1 <= 5.4e-235) tmp = (x2 * -6.0) - x1; elseif (x1 <= 4.1e+130) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, If[LessEqual[x1, -3.7e+91], t$95$0, If[LessEqual[x1, -5e-114], N[(N[(x1 * N[(-1.0 + N[(x2 * N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.4e-235], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 4.1e+130], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9\right) - x1\\
\mathbf{if}\;x1 \leq -3.7 \cdot 10^{+91}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{-114}:\\
\;\;\;\;x1 \cdot \left(-1 + x2 \cdot \left(x2 \cdot 8\right)\right) + x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 5.4 \cdot 10^{-235}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 4.1 \cdot 10^{+130}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x1 < -3.69999999999999984e91 or 4.09999999999999978e130 < x1 Initial program 8.0%
Taylor expanded in x2 around inf 0.2%
associate-*r/0.2%
unpow20.2%
+-commutative0.2%
unpow20.2%
fma-udef0.2%
Simplified0.2%
Taylor expanded in x1 around 0 62.0%
*-commutative62.0%
fma-def62.0%
+-commutative62.0%
fma-def71.3%
*-commutative71.3%
fma-neg71.3%
metadata-eval71.3%
unpow271.3%
associate-*r*71.3%
*-commutative71.3%
associate-*l*71.3%
unpow271.3%
cancel-sign-sub-inv71.3%
metadata-eval71.3%
+-commutative71.3%
count-271.3%
Simplified71.3%
Taylor expanded in x2 around 0 83.9%
associate-+r+83.9%
distribute-rgt1-in83.9%
metadata-eval83.9%
neg-mul-183.9%
+-commutative83.9%
unsub-neg83.9%
*-commutative83.9%
unpow283.9%
associate-*l*83.9%
Simplified83.9%
if -3.69999999999999984e91 < x1 < -4.99999999999999989e-114Initial program 99.2%
Taylor expanded in x2 around inf 72.4%
associate-*r/72.4%
unpow272.4%
+-commutative72.4%
unpow272.4%
fma-udef72.4%
Simplified72.4%
Taylor expanded in x1 around 0 68.9%
*-commutative68.9%
fma-def69.0%
+-commutative69.0%
fma-def69.0%
*-commutative69.0%
fma-neg69.0%
metadata-eval69.0%
unpow269.0%
associate-*r*69.0%
*-commutative69.0%
associate-*l*69.0%
unpow269.0%
cancel-sign-sub-inv69.0%
metadata-eval69.0%
+-commutative69.0%
count-269.0%
Simplified69.0%
Taylor expanded in x1 around 0 72.3%
pow172.3%
pow272.3%
*-commutative72.3%
Applied egg-rr72.3%
unpow172.3%
associate-*l*72.3%
Simplified72.3%
if -4.99999999999999989e-114 < x1 < 5.4000000000000003e-235Initial program 99.5%
Taylor expanded in x2 around inf 87.4%
associate-*r/87.4%
unpow287.4%
+-commutative87.4%
unpow287.4%
fma-udef87.4%
Simplified87.4%
Taylor expanded in x1 around 0 87.6%
*-commutative87.6%
fma-def87.8%
+-commutative87.8%
fma-def87.8%
*-commutative87.8%
fma-neg87.8%
metadata-eval87.8%
unpow287.8%
associate-*r*87.8%
*-commutative87.8%
associate-*l*87.8%
unpow287.8%
cancel-sign-sub-inv87.8%
metadata-eval87.8%
+-commutative87.8%
count-287.8%
Simplified87.8%
Taylor expanded in x1 around 0 87.7%
Taylor expanded in x2 around 0 99.7%
*-commutative99.7%
mul-1-neg99.7%
unsub-neg99.7%
Simplified99.7%
if 5.4000000000000003e-235 < x1 < 4.09999999999999978e130Initial program 99.3%
Taylor expanded in x1 around 0 67.8%
Taylor expanded in x1 around 0 67.1%
Final simplification81.0%
(FPCore (x1 x2)
:precision binary64
(if (or (<= x1 -5.3e+91) (not (<= x1 4.1e+130)))
(- (* x1 (* x1 9.0)) x1)
(+
x1
(+ (+ x1 (* 4.0 (* 2.0 (* x2 (* x1 x2))))) (* 3.0 (- (* x2 -2.0) x1))))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -5.3e+91) || !(x1 <= 4.1e+130)) {
tmp = (x1 * (x1 * 9.0)) - x1;
} else {
tmp = x1 + ((x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))) + (3.0 * ((x2 * -2.0) - x1)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-5.3d+91)) .or. (.not. (x1 <= 4.1d+130))) then
tmp = (x1 * (x1 * 9.0d0)) - x1
else
tmp = x1 + ((x1 + (4.0d0 * (2.0d0 * (x2 * (x1 * x2))))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -5.3e+91) || !(x1 <= 4.1e+130)) {
tmp = (x1 * (x1 * 9.0)) - x1;
} else {
tmp = x1 + ((x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))) + (3.0 * ((x2 * -2.0) - x1)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -5.3e+91) or not (x1 <= 4.1e+130): tmp = (x1 * (x1 * 9.0)) - x1 else: tmp = x1 + ((x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))) + (3.0 * ((x2 * -2.0) - x1))) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -5.3e+91) || !(x1 <= 4.1e+130)) tmp = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(2.0 * Float64(x2 * Float64(x1 * x2))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -5.3e+91) || ~((x1 <= 4.1e+130))) tmp = (x1 * (x1 * 9.0)) - x1; else tmp = x1 + ((x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))) + (3.0 * ((x2 * -2.0) - x1))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -5.3e+91], N[Not[LessEqual[x1, 4.1e+130]], $MachinePrecision]], N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(2.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.3 \cdot 10^{+91} \lor \neg \left(x1 \leq 4.1 \cdot 10^{+130}\right):\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9\right) - x1\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(2 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -5.29999999999999997e91 or 4.09999999999999978e130 < x1 Initial program 8.0%
Taylor expanded in x2 around inf 0.2%
associate-*r/0.2%
unpow20.2%
+-commutative0.2%
unpow20.2%
fma-udef0.2%
Simplified0.2%
Taylor expanded in x1 around 0 62.0%
*-commutative62.0%
fma-def62.0%
+-commutative62.0%
fma-def71.3%
*-commutative71.3%
fma-neg71.3%
metadata-eval71.3%
unpow271.3%
associate-*r*71.3%
*-commutative71.3%
associate-*l*71.3%
unpow271.3%
cancel-sign-sub-inv71.3%
metadata-eval71.3%
+-commutative71.3%
count-271.3%
Simplified71.3%
Taylor expanded in x2 around 0 83.9%
associate-+r+83.9%
distribute-rgt1-in83.9%
metadata-eval83.9%
neg-mul-183.9%
+-commutative83.9%
unsub-neg83.9%
*-commutative83.9%
unpow283.9%
associate-*l*83.9%
Simplified83.9%
if -5.29999999999999997e91 < x1 < 4.09999999999999978e130Initial program 99.3%
Taylor expanded in x1 around 0 75.8%
Taylor expanded in x1 around 0 75.3%
mul-1-neg75.3%
unsub-neg75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in x2 around inf 75.3%
unpow275.3%
associate-*r*83.6%
*-commutative83.6%
Simplified83.6%
Final simplification83.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* x1 (* x1 9.0)) x1))
(t_1 (- (* x2 -6.0) x1))
(t_2 (+ x1 (* (* x1 x2) (* x2 8.0)))))
(if (<= x1 -1.12e+89)
t_0
(if (<= x1 -6.8e+40)
(/ (* x2 x2) (/ x1 8.0))
(if (<= x1 -4.2e-25)
t_0
(if (<= x1 2.25e-154)
t_1
(if (<= x1 1.1e-105)
t_2
(if (<= x1 2.6e-28) t_1 (if (<= x1 4.1e+130) t_2 t_0)))))))))
double code(double x1, double x2) {
double t_0 = (x1 * (x1 * 9.0)) - x1;
double t_1 = (x2 * -6.0) - x1;
double t_2 = x1 + ((x1 * x2) * (x2 * 8.0));
double tmp;
if (x1 <= -1.12e+89) {
tmp = t_0;
} else if (x1 <= -6.8e+40) {
tmp = (x2 * x2) / (x1 / 8.0);
} else if (x1 <= -4.2e-25) {
tmp = t_0;
} else if (x1 <= 2.25e-154) {
tmp = t_1;
} else if (x1 <= 1.1e-105) {
tmp = t_2;
} else if (x1 <= 2.6e-28) {
tmp = t_1;
} else if (x1 <= 4.1e+130) {
tmp = t_2;
} 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) :: tmp
t_0 = (x1 * (x1 * 9.0d0)) - x1
t_1 = (x2 * (-6.0d0)) - x1
t_2 = x1 + ((x1 * x2) * (x2 * 8.0d0))
if (x1 <= (-1.12d+89)) then
tmp = t_0
else if (x1 <= (-6.8d+40)) then
tmp = (x2 * x2) / (x1 / 8.0d0)
else if (x1 <= (-4.2d-25)) then
tmp = t_0
else if (x1 <= 2.25d-154) then
tmp = t_1
else if (x1 <= 1.1d-105) then
tmp = t_2
else if (x1 <= 2.6d-28) then
tmp = t_1
else if (x1 <= 4.1d+130) then
tmp = t_2
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * (x1 * 9.0)) - x1;
double t_1 = (x2 * -6.0) - x1;
double t_2 = x1 + ((x1 * x2) * (x2 * 8.0));
double tmp;
if (x1 <= -1.12e+89) {
tmp = t_0;
} else if (x1 <= -6.8e+40) {
tmp = (x2 * x2) / (x1 / 8.0);
} else if (x1 <= -4.2e-25) {
tmp = t_0;
} else if (x1 <= 2.25e-154) {
tmp = t_1;
} else if (x1 <= 1.1e-105) {
tmp = t_2;
} else if (x1 <= 2.6e-28) {
tmp = t_1;
} else if (x1 <= 4.1e+130) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * (x1 * 9.0)) - x1 t_1 = (x2 * -6.0) - x1 t_2 = x1 + ((x1 * x2) * (x2 * 8.0)) tmp = 0 if x1 <= -1.12e+89: tmp = t_0 elif x1 <= -6.8e+40: tmp = (x2 * x2) / (x1 / 8.0) elif x1 <= -4.2e-25: tmp = t_0 elif x1 <= 2.25e-154: tmp = t_1 elif x1 <= 1.1e-105: tmp = t_2 elif x1 <= 2.6e-28: tmp = t_1 elif x1 <= 4.1e+130: tmp = t_2 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1) t_1 = Float64(Float64(x2 * -6.0) - x1) t_2 = Float64(x1 + Float64(Float64(x1 * x2) * Float64(x2 * 8.0))) tmp = 0.0 if (x1 <= -1.12e+89) tmp = t_0; elseif (x1 <= -6.8e+40) tmp = Float64(Float64(x2 * x2) / Float64(x1 / 8.0)); elseif (x1 <= -4.2e-25) tmp = t_0; elseif (x1 <= 2.25e-154) tmp = t_1; elseif (x1 <= 1.1e-105) tmp = t_2; elseif (x1 <= 2.6e-28) tmp = t_1; elseif (x1 <= 4.1e+130) tmp = t_2; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * (x1 * 9.0)) - x1; t_1 = (x2 * -6.0) - x1; t_2 = x1 + ((x1 * x2) * (x2 * 8.0)); tmp = 0.0; if (x1 <= -1.12e+89) tmp = t_0; elseif (x1 <= -6.8e+40) tmp = (x2 * x2) / (x1 / 8.0); elseif (x1 <= -4.2e-25) tmp = t_0; elseif (x1 <= 2.25e-154) tmp = t_1; elseif (x1 <= 1.1e-105) tmp = t_2; elseif (x1 <= 2.6e-28) tmp = t_1; elseif (x1 <= 4.1e+130) tmp = t_2; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(N[(x1 * x2), $MachinePrecision] * N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.12e+89], t$95$0, If[LessEqual[x1, -6.8e+40], N[(N[(x2 * x2), $MachinePrecision] / N[(x1 / 8.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.2e-25], t$95$0, If[LessEqual[x1, 2.25e-154], t$95$1, If[LessEqual[x1, 1.1e-105], t$95$2, If[LessEqual[x1, 2.6e-28], t$95$1, If[LessEqual[x1, 4.1e+130], t$95$2, t$95$0]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9\right) - x1\\
t_1 := x2 \cdot -6 - x1\\
t_2 := x1 + \left(x1 \cdot x2\right) \cdot \left(x2 \cdot 8\right)\\
\mathbf{if}\;x1 \leq -1.12 \cdot 10^{+89}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -6.8 \cdot 10^{+40}:\\
\;\;\;\;\frac{x2 \cdot x2}{\frac{x1}{8}}\\
\mathbf{elif}\;x1 \leq -4.2 \cdot 10^{-25}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 2.25 \cdot 10^{-154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 1.1 \cdot 10^{-105}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x1 \leq 2.6 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 4.1 \cdot 10^{+130}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x1 < -1.11999999999999995e89 or -6.79999999999999977e40 < x1 < -4.20000000000000005e-25 or 4.09999999999999978e130 < x1 Initial program 17.8%
Taylor expanded in x2 around inf 6.2%
associate-*r/6.2%
unpow26.2%
+-commutative6.2%
unpow26.2%
fma-udef6.2%
Simplified6.2%
Taylor expanded in x1 around 0 61.6%
*-commutative61.6%
fma-def61.6%
+-commutative61.6%
fma-def69.9%
*-commutative69.9%
fma-neg69.9%
metadata-eval69.9%
unpow269.9%
associate-*r*69.9%
*-commutative69.9%
associate-*l*69.9%
unpow269.9%
cancel-sign-sub-inv69.9%
metadata-eval69.9%
+-commutative69.9%
count-269.9%
Simplified69.9%
Taylor expanded in x2 around 0 78.8%
associate-+r+78.8%
distribute-rgt1-in78.8%
metadata-eval78.8%
neg-mul-178.8%
+-commutative78.8%
unsub-neg78.8%
*-commutative78.8%
unpow278.8%
associate-*l*78.8%
Simplified78.8%
if -1.11999999999999995e89 < x1 < -6.79999999999999977e40Initial program 99.3%
Taylor expanded in x2 around inf 37.4%
associate-*r/37.4%
unpow237.4%
+-commutative37.4%
unpow237.4%
fma-udef37.4%
Simplified37.4%
Taylor expanded in x1 around -inf 41.5%
associate-+r+41.5%
+-commutative41.5%
mul-1-neg41.5%
*-commutative41.5%
unpow241.5%
Simplified41.5%
Taylor expanded in x2 around inf 41.9%
associate-*r/41.9%
*-commutative41.9%
associate-/l*41.9%
unpow241.9%
Simplified41.9%
if -4.20000000000000005e-25 < x1 < 2.2499999999999999e-154 or 1.10000000000000002e-105 < x1 < 2.6e-28Initial program 99.3%
Taylor expanded in x2 around inf 92.1%
associate-*r/92.1%
unpow292.1%
+-commutative92.1%
unpow292.1%
fma-udef92.1%
Simplified92.1%
Taylor expanded in x1 around 0 92.5%
*-commutative92.5%
fma-def92.7%
+-commutative92.7%
fma-def92.7%
*-commutative92.7%
fma-neg92.7%
metadata-eval92.7%
unpow292.7%
associate-*r*92.7%
*-commutative92.7%
associate-*l*92.7%
unpow292.7%
cancel-sign-sub-inv92.7%
metadata-eval92.7%
+-commutative92.7%
count-292.7%
Simplified92.7%
Taylor expanded in x1 around 0 92.6%
Taylor expanded in x2 around 0 85.9%
*-commutative85.9%
mul-1-neg85.9%
unsub-neg85.9%
Simplified85.9%
if 2.2499999999999999e-154 < x1 < 1.10000000000000002e-105 or 2.6e-28 < x1 < 4.09999999999999978e130Initial program 99.4%
Taylor expanded in x1 around 0 42.6%
Taylor expanded in x2 around inf 33.2%
*-commutative33.2%
unpow233.2%
associate-*r*48.7%
associate-*l*48.7%
*-commutative48.7%
Simplified48.7%
Final simplification75.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* x1 (* x1 9.0)) x1))
(t_1 (+ (* x1 (+ -1.0 (* x2 (* x2 8.0)))) (* x2 -6.0))))
(if (<= x1 -7.9e+90)
t_0
(if (<= x1 -5e-114)
t_1
(if (<= x1 7.8e-235)
(- (* x2 -6.0) x1)
(if (<= x1 4.1e+130) t_1 t_0))))))
double code(double x1, double x2) {
double t_0 = (x1 * (x1 * 9.0)) - x1;
double t_1 = (x1 * (-1.0 + (x2 * (x2 * 8.0)))) + (x2 * -6.0);
double tmp;
if (x1 <= -7.9e+90) {
tmp = t_0;
} else if (x1 <= -5e-114) {
tmp = t_1;
} else if (x1 <= 7.8e-235) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 4.1e+130) {
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 = (x1 * (x1 * 9.0d0)) - x1
t_1 = (x1 * ((-1.0d0) + (x2 * (x2 * 8.0d0)))) + (x2 * (-6.0d0))
if (x1 <= (-7.9d+90)) then
tmp = t_0
else if (x1 <= (-5d-114)) then
tmp = t_1
else if (x1 <= 7.8d-235) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 4.1d+130) 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 = (x1 * (x1 * 9.0)) - x1;
double t_1 = (x1 * (-1.0 + (x2 * (x2 * 8.0)))) + (x2 * -6.0);
double tmp;
if (x1 <= -7.9e+90) {
tmp = t_0;
} else if (x1 <= -5e-114) {
tmp = t_1;
} else if (x1 <= 7.8e-235) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 4.1e+130) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * (x1 * 9.0)) - x1 t_1 = (x1 * (-1.0 + (x2 * (x2 * 8.0)))) + (x2 * -6.0) tmp = 0 if x1 <= -7.9e+90: tmp = t_0 elif x1 <= -5e-114: tmp = t_1 elif x1 <= 7.8e-235: tmp = (x2 * -6.0) - x1 elif x1 <= 4.1e+130: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1) t_1 = Float64(Float64(x1 * Float64(-1.0 + Float64(x2 * Float64(x2 * 8.0)))) + Float64(x2 * -6.0)) tmp = 0.0 if (x1 <= -7.9e+90) tmp = t_0; elseif (x1 <= -5e-114) tmp = t_1; elseif (x1 <= 7.8e-235) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 4.1e+130) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * (x1 * 9.0)) - x1; t_1 = (x1 * (-1.0 + (x2 * (x2 * 8.0)))) + (x2 * -6.0); tmp = 0.0; if (x1 <= -7.9e+90) tmp = t_0; elseif (x1 <= -5e-114) tmp = t_1; elseif (x1 <= 7.8e-235) tmp = (x2 * -6.0) - x1; elseif (x1 <= 4.1e+130) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * N[(-1.0 + N[(x2 * N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -7.9e+90], t$95$0, If[LessEqual[x1, -5e-114], t$95$1, If[LessEqual[x1, 7.8e-235], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 4.1e+130], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9\right) - x1\\
t_1 := x1 \cdot \left(-1 + x2 \cdot \left(x2 \cdot 8\right)\right) + x2 \cdot -6\\
\mathbf{if}\;x1 \leq -7.9 \cdot 10^{+90}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{-114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 7.8 \cdot 10^{-235}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 4.1 \cdot 10^{+130}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x1 < -7.8999999999999996e90 or 4.09999999999999978e130 < x1 Initial program 8.0%
Taylor expanded in x2 around inf 0.2%
associate-*r/0.2%
unpow20.2%
+-commutative0.2%
unpow20.2%
fma-udef0.2%
Simplified0.2%
Taylor expanded in x1 around 0 62.0%
*-commutative62.0%
fma-def62.0%
+-commutative62.0%
fma-def71.3%
*-commutative71.3%
fma-neg71.3%
metadata-eval71.3%
unpow271.3%
associate-*r*71.3%
*-commutative71.3%
associate-*l*71.3%
unpow271.3%
cancel-sign-sub-inv71.3%
metadata-eval71.3%
+-commutative71.3%
count-271.3%
Simplified71.3%
Taylor expanded in x2 around 0 83.9%
associate-+r+83.9%
distribute-rgt1-in83.9%
metadata-eval83.9%
neg-mul-183.9%
+-commutative83.9%
unsub-neg83.9%
*-commutative83.9%
unpow283.9%
associate-*l*83.9%
Simplified83.9%
if -7.8999999999999996e90 < x1 < -4.99999999999999989e-114 or 7.79999999999999939e-235 < x1 < 4.09999999999999978e130Initial program 99.3%
Taylor expanded in x2 around inf 70.8%
associate-*r/70.8%
unpow270.8%
+-commutative70.8%
unpow270.8%
fma-udef70.8%
Simplified70.8%
Taylor expanded in x1 around 0 68.5%
*-commutative68.5%
fma-def68.5%
+-commutative68.5%
fma-def68.5%
*-commutative68.5%
fma-neg68.5%
metadata-eval68.5%
unpow268.5%
associate-*r*68.5%
*-commutative68.5%
associate-*l*68.5%
unpow268.5%
cancel-sign-sub-inv68.5%
metadata-eval68.5%
+-commutative68.5%
count-268.5%
Simplified68.5%
Taylor expanded in x1 around 0 69.0%
pow169.0%
pow269.0%
*-commutative69.0%
Applied egg-rr69.0%
unpow169.0%
associate-*l*69.0%
Simplified69.0%
if -4.99999999999999989e-114 < x1 < 7.79999999999999939e-235Initial program 99.5%
Taylor expanded in x2 around inf 87.4%
associate-*r/87.4%
unpow287.4%
+-commutative87.4%
unpow287.4%
fma-udef87.4%
Simplified87.4%
Taylor expanded in x1 around 0 87.6%
*-commutative87.6%
fma-def87.8%
+-commutative87.8%
fma-def87.8%
*-commutative87.8%
fma-neg87.8%
metadata-eval87.8%
unpow287.8%
associate-*r*87.8%
*-commutative87.8%
associate-*l*87.8%
unpow287.8%
cancel-sign-sub-inv87.8%
metadata-eval87.8%
+-commutative87.8%
count-287.8%
Simplified87.8%
Taylor expanded in x1 around 0 87.7%
Taylor expanded in x2 around 0 99.7%
*-commutative99.7%
mul-1-neg99.7%
unsub-neg99.7%
Simplified99.7%
Final simplification81.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* x1 (* x1 9.0)) x1)) (t_1 (/ (* x2 x2) (/ x1 8.0))))
(if (<= x1 -1.3e+89)
t_0
(if (<= x1 -6.8e+40)
t_1
(if (<= x1 -4.2e-25)
t_0
(if (<= x1 3.9e-25)
(- (* x2 -6.0) x1)
(if (<= x1 2.5e+77) t_1 t_0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * (x1 * 9.0)) - x1;
double t_1 = (x2 * x2) / (x1 / 8.0);
double tmp;
if (x1 <= -1.3e+89) {
tmp = t_0;
} else if (x1 <= -6.8e+40) {
tmp = t_1;
} else if (x1 <= -4.2e-25) {
tmp = t_0;
} else if (x1 <= 3.9e-25) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 2.5e+77) {
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 = (x1 * (x1 * 9.0d0)) - x1
t_1 = (x2 * x2) / (x1 / 8.0d0)
if (x1 <= (-1.3d+89)) then
tmp = t_0
else if (x1 <= (-6.8d+40)) then
tmp = t_1
else if (x1 <= (-4.2d-25)) then
tmp = t_0
else if (x1 <= 3.9d-25) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 2.5d+77) 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 = (x1 * (x1 * 9.0)) - x1;
double t_1 = (x2 * x2) / (x1 / 8.0);
double tmp;
if (x1 <= -1.3e+89) {
tmp = t_0;
} else if (x1 <= -6.8e+40) {
tmp = t_1;
} else if (x1 <= -4.2e-25) {
tmp = t_0;
} else if (x1 <= 3.9e-25) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 2.5e+77) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * (x1 * 9.0)) - x1 t_1 = (x2 * x2) / (x1 / 8.0) tmp = 0 if x1 <= -1.3e+89: tmp = t_0 elif x1 <= -6.8e+40: tmp = t_1 elif x1 <= -4.2e-25: tmp = t_0 elif x1 <= 3.9e-25: tmp = (x2 * -6.0) - x1 elif x1 <= 2.5e+77: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1) t_1 = Float64(Float64(x2 * x2) / Float64(x1 / 8.0)) tmp = 0.0 if (x1 <= -1.3e+89) tmp = t_0; elseif (x1 <= -6.8e+40) tmp = t_1; elseif (x1 <= -4.2e-25) tmp = t_0; elseif (x1 <= 3.9e-25) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 2.5e+77) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * (x1 * 9.0)) - x1; t_1 = (x2 * x2) / (x1 / 8.0); tmp = 0.0; if (x1 <= -1.3e+89) tmp = t_0; elseif (x1 <= -6.8e+40) tmp = t_1; elseif (x1 <= -4.2e-25) tmp = t_0; elseif (x1 <= 3.9e-25) tmp = (x2 * -6.0) - x1; elseif (x1 <= 2.5e+77) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x2 * x2), $MachinePrecision] / N[(x1 / 8.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.3e+89], t$95$0, If[LessEqual[x1, -6.8e+40], t$95$1, If[LessEqual[x1, -4.2e-25], t$95$0, If[LessEqual[x1, 3.9e-25], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 2.5e+77], t$95$1, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9\right) - x1\\
t_1 := \frac{x2 \cdot x2}{\frac{x1}{8}}\\
\mathbf{if}\;x1 \leq -1.3 \cdot 10^{+89}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq -6.8 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -4.2 \cdot 10^{-25}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{-25}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 2.5 \cdot 10^{+77}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x1 < -1.3e89 or -6.79999999999999977e40 < x1 < -4.20000000000000005e-25 or 2.50000000000000002e77 < x1 Initial program 26.5%
Taylor expanded in x2 around inf 7.0%
associate-*r/7.0%
unpow27.0%
+-commutative7.0%
unpow27.0%
fma-udef7.0%
Simplified7.0%
Taylor expanded in x1 around 0 57.6%
*-commutative57.6%
fma-def57.6%
+-commutative57.6%
fma-def65.0%
*-commutative65.0%
fma-neg65.0%
metadata-eval65.0%
unpow265.0%
associate-*r*65.0%
*-commutative65.0%
associate-*l*65.0%
unpow265.0%
cancel-sign-sub-inv65.0%
metadata-eval65.0%
+-commutative65.0%
count-265.0%
Simplified65.0%
Taylor expanded in x2 around 0 71.0%
associate-+r+71.0%
distribute-rgt1-in71.0%
metadata-eval71.0%
neg-mul-171.0%
+-commutative71.0%
unsub-neg71.0%
*-commutative71.0%
unpow271.0%
associate-*l*71.0%
Simplified71.0%
if -1.3e89 < x1 < -6.79999999999999977e40 or 3.9e-25 < x1 < 2.50000000000000002e77Initial program 99.3%
Taylor expanded in x2 around inf 52.8%
associate-*r/52.8%
unpow252.8%
+-commutative52.8%
unpow252.8%
fma-udef52.8%
Simplified52.8%
Taylor expanded in x1 around -inf 48.5%
associate-+r+48.5%
+-commutative48.5%
mul-1-neg48.5%
*-commutative48.5%
unpow248.5%
Simplified48.5%
Taylor expanded in x2 around inf 47.8%
associate-*r/47.8%
*-commutative47.8%
associate-/l*47.8%
unpow247.8%
Simplified47.8%
if -4.20000000000000005e-25 < x1 < 3.9e-25Initial program 99.3%
Taylor expanded in x2 around inf 88.5%
associate-*r/88.5%
unpow288.5%
+-commutative88.5%
unpow288.5%
fma-udef88.5%
Simplified88.5%
Taylor expanded in x1 around 0 88.9%
*-commutative88.9%
fma-def89.1%
+-commutative89.1%
fma-def89.1%
*-commutative89.1%
fma-neg89.1%
metadata-eval89.1%
unpow289.1%
associate-*r*89.1%
*-commutative89.1%
associate-*l*89.1%
unpow289.1%
cancel-sign-sub-inv89.1%
metadata-eval89.1%
+-commutative89.1%
count-289.1%
Simplified89.1%
Taylor expanded in x1 around 0 88.9%
Taylor expanded in x2 around 0 81.1%
*-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
Simplified81.1%
Final simplification73.4%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -4.2e-25) (not (<= x1 3e-9))) (- (* x1 (* x1 9.0)) x1) (- (* x2 -6.0) x1)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -4.2e-25) || !(x1 <= 3e-9)) {
tmp = (x1 * (x1 * 9.0)) - x1;
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-4.2d-25)) .or. (.not. (x1 <= 3d-9))) then
tmp = (x1 * (x1 * 9.0d0)) - x1
else
tmp = (x2 * (-6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -4.2e-25) || !(x1 <= 3e-9)) {
tmp = (x1 * (x1 * 9.0)) - x1;
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -4.2e-25) or not (x1 <= 3e-9): tmp = (x1 * (x1 * 9.0)) - x1 else: tmp = (x2 * -6.0) - x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -4.2e-25) || !(x1 <= 3e-9)) tmp = Float64(Float64(x1 * Float64(x1 * 9.0)) - x1); else tmp = Float64(Float64(x2 * -6.0) - x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -4.2e-25) || ~((x1 <= 3e-9))) tmp = (x1 * (x1 * 9.0)) - x1; else tmp = (x2 * -6.0) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -4.2e-25], N[Not[LessEqual[x1, 3e-9]], $MachinePrecision]], N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4.2 \cdot 10^{-25} \lor \neg \left(x1 \leq 3 \cdot 10^{-9}\right):\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9\right) - x1\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\end{array}
\end{array}
if x1 < -4.20000000000000005e-25 or 2.99999999999999998e-9 < x1 Initial program 42.3%
Taylor expanded in x2 around inf 15.7%
associate-*r/15.7%
unpow215.7%
+-commutative15.7%
unpow215.7%
fma-udef15.7%
Simplified15.7%
Taylor expanded in x1 around 0 51.7%
*-commutative51.7%
fma-def51.7%
+-commutative51.7%
fma-def57.6%
*-commutative57.6%
fma-neg57.6%
metadata-eval57.6%
unpow257.6%
associate-*r*57.6%
*-commutative57.6%
associate-*l*57.6%
unpow257.6%
cancel-sign-sub-inv57.6%
metadata-eval57.6%
+-commutative57.6%
count-257.6%
Simplified57.6%
Taylor expanded in x2 around 0 57.3%
associate-+r+57.3%
distribute-rgt1-in57.3%
metadata-eval57.3%
neg-mul-157.3%
+-commutative57.3%
unsub-neg57.3%
*-commutative57.3%
unpow257.3%
associate-*l*57.3%
Simplified57.3%
if -4.20000000000000005e-25 < x1 < 2.99999999999999998e-9Initial program 99.3%
Taylor expanded in x2 around inf 88.3%
associate-*r/88.3%
unpow288.3%
+-commutative88.3%
unpow288.3%
fma-udef88.3%
Simplified88.3%
Taylor expanded in x1 around 0 88.7%
*-commutative88.7%
fma-def88.8%
+-commutative88.8%
fma-def88.8%
*-commutative88.8%
fma-neg88.8%
metadata-eval88.8%
unpow288.8%
associate-*r*88.8%
*-commutative88.8%
associate-*l*88.8%
unpow288.8%
cancel-sign-sub-inv88.8%
metadata-eval88.8%
+-commutative88.8%
count-288.8%
Simplified88.8%
Taylor expanded in x1 around 0 88.7%
Taylor expanded in x2 around 0 78.3%
*-commutative78.3%
mul-1-neg78.3%
unsub-neg78.3%
Simplified78.3%
Final simplification68.4%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -2.2e-113) (* x2 -6.0) (if (<= x2 1.62e-158) (+ x1 (* x1 -2.0)) (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -2.2e-113) {
tmp = x2 * -6.0;
} else if (x2 <= 1.62e-158) {
tmp = x1 + (x1 * -2.0);
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-2.2d-113)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 1.62d-158) then
tmp = x1 + (x1 * (-2.0d0))
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -2.2e-113) {
tmp = x2 * -6.0;
} else if (x2 <= 1.62e-158) {
tmp = x1 + (x1 * -2.0);
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -2.2e-113: tmp = x2 * -6.0 elif x2 <= 1.62e-158: tmp = x1 + (x1 * -2.0) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -2.2e-113) tmp = Float64(x2 * -6.0); elseif (x2 <= 1.62e-158) tmp = Float64(x1 + Float64(x1 * -2.0)); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -2.2e-113) tmp = x2 * -6.0; elseif (x2 <= 1.62e-158) tmp = x1 + (x1 * -2.0); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -2.2e-113], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 1.62e-158], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -2.2 \cdot 10^{-113}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 1.62 \cdot 10^{-158}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -2.20000000000000004e-113 or 1.62000000000000002e-158 < x2 Initial program 71.7%
Taylor expanded in x2 around inf 52.2%
associate-*r/52.2%
unpow252.2%
+-commutative52.2%
unpow252.2%
fma-udef52.2%
Simplified52.2%
Taylor expanded in x1 around 0 67.5%
*-commutative67.5%
fma-def67.6%
+-commutative67.6%
fma-def71.4%
*-commutative71.4%
fma-neg71.4%
metadata-eval71.4%
unpow271.4%
associate-*r*71.4%
*-commutative71.4%
associate-*l*71.4%
unpow271.4%
cancel-sign-sub-inv71.4%
metadata-eval71.4%
+-commutative71.4%
count-271.4%
Simplified71.4%
Taylor expanded in x1 around 0 34.7%
*-commutative34.7%
Simplified34.7%
if -2.20000000000000004e-113 < x2 < 1.62000000000000002e-158Initial program 74.8%
Taylor expanded in x1 around 0 59.4%
Taylor expanded in x1 around 0 59.7%
mul-1-neg59.7%
unsub-neg59.7%
*-commutative59.7%
Simplified59.7%
Taylor expanded in x2 around 0 43.2%
distribute-rgt1-in43.7%
metadata-eval43.7%
*-commutative43.7%
Simplified43.7%
Final simplification37.3%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -1.38e-111) (* x2 -6.0) (if (<= x2 1.45e-159) (+ x1 (* x1 -2.0)) (+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -1.38e-111) {
tmp = x2 * -6.0;
} else if (x2 <= 1.45e-159) {
tmp = x1 + (x1 * -2.0);
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-1.38d-111)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 1.45d-159) then
tmp = x1 + (x1 * (-2.0d0))
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -1.38e-111) {
tmp = x2 * -6.0;
} else if (x2 <= 1.45e-159) {
tmp = x1 + (x1 * -2.0);
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -1.38e-111: tmp = x2 * -6.0 elif x2 <= 1.45e-159: tmp = x1 + (x1 * -2.0) else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -1.38e-111) tmp = Float64(x2 * -6.0); elseif (x2 <= 1.45e-159) tmp = Float64(x1 + Float64(x1 * -2.0)); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -1.38e-111) tmp = x2 * -6.0; elseif (x2 <= 1.45e-159) tmp = x1 + (x1 * -2.0); else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -1.38e-111], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 1.45e-159], N[(x1 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.38 \cdot 10^{-111}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 1.45 \cdot 10^{-159}:\\
\;\;\;\;x1 + x1 \cdot -2\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -1.38000000000000004e-111Initial program 79.2%
Taylor expanded in x2 around inf 58.4%
associate-*r/58.4%
unpow258.4%
+-commutative58.4%
unpow258.4%
fma-udef58.4%
Simplified58.4%
Taylor expanded in x1 around 0 65.0%
*-commutative65.0%
fma-def65.1%
+-commutative65.1%
fma-def65.1%
*-commutative65.1%
fma-neg65.1%
metadata-eval65.1%
unpow265.1%
associate-*r*65.1%
*-commutative65.1%
associate-*l*65.1%
unpow265.1%
cancel-sign-sub-inv65.1%
metadata-eval65.1%
+-commutative65.1%
count-265.1%
Simplified65.1%
Taylor expanded in x1 around 0 43.7%
*-commutative43.7%
Simplified43.7%
if -1.38000000000000004e-111 < x2 < 1.44999999999999995e-159Initial program 74.8%
Taylor expanded in x1 around 0 59.4%
Taylor expanded in x1 around 0 59.7%
mul-1-neg59.7%
unsub-neg59.7%
*-commutative59.7%
Simplified59.7%
Taylor expanded in x2 around 0 43.2%
distribute-rgt1-in43.7%
metadata-eval43.7%
*-commutative43.7%
Simplified43.7%
if 1.44999999999999995e-159 < x2 Initial program 66.0%
Taylor expanded in x1 around 0 46.0%
Taylor expanded in x1 around 0 29.4%
*-commutative29.4%
Simplified29.4%
Final simplification37.9%
(FPCore (x1 x2) :precision binary64 (- (* x2 -6.0) x1))
double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = (x2 * (-6.0d0)) - x1
end function
public static double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
def code(x1, x2): return (x2 * -6.0) - x1
function code(x1, x2) return Float64(Float64(x2 * -6.0) - x1) end
function tmp = code(x1, x2) tmp = (x2 * -6.0) - x1; end
code[x1_, x2_] := N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6 - x1
\end{array}
Initial program 72.6%
Taylor expanded in x2 around inf 54.3%
associate-*r/54.3%
unpow254.3%
+-commutative54.3%
unpow254.3%
fma-udef54.3%
Simplified54.3%
Taylor expanded in x1 around 0 71.4%
*-commutative71.4%
fma-def71.4%
+-commutative71.4%
fma-def74.2%
*-commutative74.2%
fma-neg74.2%
metadata-eval74.2%
unpow274.2%
associate-*r*74.2%
*-commutative74.2%
associate-*l*74.2%
unpow274.2%
cancel-sign-sub-inv74.2%
metadata-eval74.2%
+-commutative74.2%
count-274.2%
Simplified74.2%
Taylor expanded in x1 around 0 61.0%
Taylor expanded in x2 around 0 44.1%
*-commutative44.1%
mul-1-neg44.1%
unsub-neg44.1%
Simplified44.1%
Final simplification44.1%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 72.6%
Taylor expanded in x2 around inf 54.3%
associate-*r/54.3%
unpow254.3%
+-commutative54.3%
unpow254.3%
fma-udef54.3%
Simplified54.3%
Taylor expanded in x1 around 0 71.4%
*-commutative71.4%
fma-def71.4%
+-commutative71.4%
fma-def74.2%
*-commutative74.2%
fma-neg74.2%
metadata-eval74.2%
unpow274.2%
associate-*r*74.2%
*-commutative74.2%
associate-*l*74.2%
unpow274.2%
cancel-sign-sub-inv74.2%
metadata-eval74.2%
+-commutative74.2%
count-274.2%
Simplified74.2%
Taylor expanded in x1 around 0 30.2%
*-commutative30.2%
Simplified30.2%
Final simplification30.2%
herbie shell --seed 2023283
(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))))))