
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* 3.0 (* x1 x1))))
(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))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_4 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_0 4.0 -6.0)) (* (* x1 (* 2.0 t_0)) (+ t_0 -3.0)))
(fma t_4 t_0 (pow x1 3.0))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (x1 * x1);
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)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_0, 4.0, -6.0)), ((x1 * (2.0 * t_0)) * (t_0 + -3.0))), fma(t_4, t_0, 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(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(3.0 * Float64(x1 * x1)) 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)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_0, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_0)) * Float64(t_0 + -3.0))), fma(t_4, t_0, (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[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(x1 * x1), $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] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $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[(3.0 * N[(N[(t$95$4 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * t$95$0 + 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 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2}\\
t_4 := 3 \cdot \left(x1 \cdot x1\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) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_4 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t_0, 4, -6\right), \left(x1 \cdot \left(2 \cdot t_0\right)\right) \cdot \left(t_0 + -3\right)\right), \mathsf{fma}\left(t_4, t_0, {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.5%
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 0.0%
Taylor expanded in x1 around inf 98.7%
*-commutative98.7%
Simplified98.7%
Final simplification99.4%
(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.5%
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 0.0%
Taylor expanded in x1 around inf 98.7%
*-commutative98.7%
Simplified98.7%
Final simplification99.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (/ (- (+ t_2 (* 2.0 x2)) x1) t_3))
(t_5 (* t_2 t_4))
(t_6 (* (* x1 x1) (- (* t_4 4.0) 6.0)))
(t_7 (* (* x1 2.0) t_4)))
(if (<= x1 -1.8e+51)
t_1
(if (<= x1 8.6e-7)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_3))
(+ x1 (+ t_0 (+ t_5 (* t_3 (+ t_6 (* t_7 (- (* 2.0 x2) 3.0)))))))))
(if (<= x1 5e+83)
(+
x1
(+ (+ x1 (+ (+ (* t_3 (+ (* t_7 (- t_4 3.0)) t_6)) t_5) t_0)) 9.0))
t_1)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_2 + (2.0 * x2)) - x1) / t_3;
double t_5 = t_2 * t_4;
double t_6 = (x1 * x1) * ((t_4 * 4.0) - 6.0);
double t_7 = (x1 * 2.0) * t_4;
double tmp;
if (x1 <= -1.8e+51) {
tmp = t_1;
} else if (x1 <= 8.6e-7) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_0 + (t_5 + (t_3 * (t_6 + (t_7 * ((2.0 * x2) - 3.0))))))));
} else if (x1 <= 5e+83) {
tmp = x1 + ((x1 + (((t_3 * ((t_7 * (t_4 - 3.0)) + t_6)) + t_5) + t_0)) + 9.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) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
t_2 = x1 * (x1 * 3.0d0)
t_3 = (x1 * x1) + 1.0d0
t_4 = ((t_2 + (2.0d0 * x2)) - x1) / t_3
t_5 = t_2 * t_4
t_6 = (x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)
t_7 = (x1 * 2.0d0) * t_4
if (x1 <= (-1.8d+51)) then
tmp = t_1
else if (x1 <= 8.6d-7) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_3)) + (x1 + (t_0 + (t_5 + (t_3 * (t_6 + (t_7 * ((2.0d0 * x2) - 3.0d0))))))))
else if (x1 <= 5d+83) then
tmp = x1 + ((x1 + (((t_3 * ((t_7 * (t_4 - 3.0d0)) + t_6)) + t_5) + t_0)) + 9.0d0)
else
tmp = t_1
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 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_2 + (2.0 * x2)) - x1) / t_3;
double t_5 = t_2 * t_4;
double t_6 = (x1 * x1) * ((t_4 * 4.0) - 6.0);
double t_7 = (x1 * 2.0) * t_4;
double tmp;
if (x1 <= -1.8e+51) {
tmp = t_1;
} else if (x1 <= 8.6e-7) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_0 + (t_5 + (t_3 * (t_6 + (t_7 * ((2.0 * x2) - 3.0))))))));
} else if (x1 <= 5e+83) {
tmp = x1 + ((x1 + (((t_3 * ((t_7 * (t_4 - 3.0)) + t_6)) + t_5) + t_0)) + 9.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) t_2 = x1 * (x1 * 3.0) t_3 = (x1 * x1) + 1.0 t_4 = ((t_2 + (2.0 * x2)) - x1) / t_3 t_5 = t_2 * t_4 t_6 = (x1 * x1) * ((t_4 * 4.0) - 6.0) t_7 = (x1 * 2.0) * t_4 tmp = 0 if x1 <= -1.8e+51: tmp = t_1 elif x1 <= 8.6e-7: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_0 + (t_5 + (t_3 * (t_6 + (t_7 * ((2.0 * x2) - 3.0)))))))) elif x1 <= 5e+83: tmp = x1 + ((x1 + (((t_3 * ((t_7 * (t_4 - 3.0)) + t_6)) + t_5) + t_0)) + 9.0) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_3) t_5 = Float64(t_2 * t_4) t_6 = Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)) t_7 = Float64(Float64(x1 * 2.0) * t_4) tmp = 0.0 if (x1 <= -1.8e+51) tmp = t_1; elseif (x1 <= 8.6e-7) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_3)) + Float64(x1 + Float64(t_0 + Float64(t_5 + Float64(t_3 * Float64(t_6 + Float64(t_7 * Float64(Float64(2.0 * x2) - 3.0))))))))); elseif (x1 <= 5e+83) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * Float64(Float64(t_7 * Float64(t_4 - 3.0)) + t_6)) + t_5) + t_0)) + 9.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); t_2 = x1 * (x1 * 3.0); t_3 = (x1 * x1) + 1.0; t_4 = ((t_2 + (2.0 * x2)) - x1) / t_3; t_5 = t_2 * t_4; t_6 = (x1 * x1) * ((t_4 * 4.0) - 6.0); t_7 = (x1 * 2.0) * t_4; tmp = 0.0; if (x1 <= -1.8e+51) tmp = t_1; elseif (x1 <= 8.6e-7) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_0 + (t_5 + (t_3 * (t_6 + (t_7 * ((2.0 * x2) - 3.0)))))))); elseif (x1 <= 5e+83) tmp = x1 + ((x1 + (((t_3 * ((t_7 * (t_4 - 3.0)) + t_6)) + t_5) + t_0)) + 9.0); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $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[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision]}, If[LessEqual[x1, -1.8e+51], t$95$1, If[LessEqual[x1, 8.6e-7], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$0 + N[(t$95$5 + N[(t$95$3 * N[(t$95$6 + N[(t$95$7 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+83], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * N[(N[(t$95$7 * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_3}\\
t_5 := t_2 \cdot t_4\\
t_6 := \left(x1 \cdot x1\right) \cdot \left(t_4 \cdot 4 - 6\right)\\
t_7 := \left(x1 \cdot 2\right) \cdot t_4\\
\mathbf{if}\;x1 \leq -1.8 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 8.6 \cdot 10^{-7}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_3} + \left(x1 + \left(t_0 + \left(t_5 + t_3 \cdot \left(t_6 + t_7 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+83}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_3 \cdot \left(t_7 \cdot \left(t_4 - 3\right) + t_6\right) + t_5\right) + t_0\right)\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x1 < -1.80000000000000005e51 or 5.00000000000000029e83 < x1 Initial program 23.2%
Taylor expanded in x1 around inf 23.2%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -1.80000000000000005e51 < x1 < 8.6000000000000002e-7Initial program 98.8%
Taylor expanded in x1 around 0 97.1%
if 8.6000000000000002e-7 < x1 < 5.00000000000000029e83Initial program 99.5%
Taylor expanded in x1 around inf 99.5%
Final simplification98.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ (* x1 x1) 1.0))
(t_4 (/ (- (+ t_2 (* 2.0 x2)) x1) t_3))
(t_5 (* t_2 t_4))
(t_6 (- t_4 3.0)))
(if (<= x1 -1.8e+51)
t_1
(if (<= x1 8.6e-7)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_3))
(+
x1
(+
t_0
(+
t_5
(*
t_3
(+
(* t_6 (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* (* x1 x1) 6.0))))))))
(if (<= x1 5e+82)
(+
x1
(+
(+
x1
(+
(+
(*
t_3
(+
(* (* (* x1 2.0) t_4) t_6)
(* (* x1 x1) (- (* t_4 4.0) 6.0))))
t_5)
t_0))
9.0))
t_1)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_2 + (2.0 * x2)) - x1) / t_3;
double t_5 = t_2 * t_4;
double t_6 = t_4 - 3.0;
double tmp;
if (x1 <= -1.8e+51) {
tmp = t_1;
} else if (x1 <= 8.6e-7) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_0 + (t_5 + (t_3 * ((t_6 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))));
} else if (x1 <= 5e+82) {
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * t_6) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + t_5) + t_0)) + 9.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) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 + ((x1 + (6.0d0 * (x1 ** 4.0d0))) + 9.0d0)
t_2 = x1 * (x1 * 3.0d0)
t_3 = (x1 * x1) + 1.0d0
t_4 = ((t_2 + (2.0d0 * x2)) - x1) / t_3
t_5 = t_2 * t_4
t_6 = t_4 - 3.0d0
if (x1 <= (-1.8d+51)) then
tmp = t_1
else if (x1 <= 8.6d-7) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_3)) + (x1 + (t_0 + (t_5 + (t_3 * ((t_6 * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + ((x1 * x1) * 6.0d0)))))))
else if (x1 <= 5d+82) then
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0d0) * t_4) * t_6) + ((x1 * x1) * ((t_4 * 4.0d0) - 6.0d0)))) + t_5) + t_0)) + 9.0d0)
else
tmp = t_1
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 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = (x1 * x1) + 1.0;
double t_4 = ((t_2 + (2.0 * x2)) - x1) / t_3;
double t_5 = t_2 * t_4;
double t_6 = t_4 - 3.0;
double tmp;
if (x1 <= -1.8e+51) {
tmp = t_1;
} else if (x1 <= 8.6e-7) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_0 + (t_5 + (t_3 * ((t_6 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))));
} else if (x1 <= 5e+82) {
tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * t_6) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + t_5) + t_0)) + 9.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) t_2 = x1 * (x1 * 3.0) t_3 = (x1 * x1) + 1.0 t_4 = ((t_2 + (2.0 * x2)) - x1) / t_3 t_5 = t_2 * t_4 t_6 = t_4 - 3.0 tmp = 0 if x1 <= -1.8e+51: tmp = t_1 elif x1 <= 8.6e-7: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_0 + (t_5 + (t_3 * ((t_6 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0))))))) elif x1 <= 5e+82: tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * t_6) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + t_5) + t_0)) + 9.0) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(x1 * x1) + 1.0) t_4 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_3) t_5 = Float64(t_2 * t_4) t_6 = Float64(t_4 - 3.0) tmp = 0.0 if (x1 <= -1.8e+51) tmp = t_1; elseif (x1 <= 8.6e-7) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_3)) + Float64(x1 + Float64(t_0 + Float64(t_5 + Float64(t_3 * Float64(Float64(t_6 * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(Float64(x1 * x1) * 6.0)))))))); elseif (x1 <= 5e+82) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * t_6) + Float64(Float64(x1 * x1) * Float64(Float64(t_4 * 4.0) - 6.0)))) + t_5) + t_0)) + 9.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 + ((x1 + (6.0 * (x1 ^ 4.0))) + 9.0); t_2 = x1 * (x1 * 3.0); t_3 = (x1 * x1) + 1.0; t_4 = ((t_2 + (2.0 * x2)) - x1) / t_3; t_5 = t_2 * t_4; t_6 = t_4 - 3.0; tmp = 0.0; if (x1 <= -1.8e+51) tmp = t_1; elseif (x1 <= 8.6e-7) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3)) + (x1 + (t_0 + (t_5 + (t_3 * ((t_6 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0))))))); elseif (x1 <= 5e+82) tmp = x1 + ((x1 + (((t_3 * ((((x1 * 2.0) * t_4) * t_6) + ((x1 * x1) * ((t_4 * 4.0) - 6.0)))) + t_5) + t_0)) + 9.0); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $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[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$4 - 3.0), $MachinePrecision]}, If[LessEqual[x1, -1.8e+51], t$95$1, If[LessEqual[x1, 8.6e-7], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$0 + N[(t$95$5 + N[(t$95$3 * N[(N[(t$95$6 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+82], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * t$95$6), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$4 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_3}\\
t_5 := t_2 \cdot t_4\\
t_6 := t_4 - 3\\
\mathbf{if}\;x1 \leq -1.8 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 8.6 \cdot 10^{-7}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_3} + \left(x1 + \left(t_0 + \left(t_5 + t_3 \cdot \left(t_6 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+82}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_3 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot t_6 + \left(x1 \cdot x1\right) \cdot \left(t_4 \cdot 4 - 6\right)\right) + t_5\right) + t_0\right)\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x1 < -1.80000000000000005e51 or 5.00000000000000015e82 < x1 Initial program 23.2%
Taylor expanded in x1 around inf 23.2%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -1.80000000000000005e51 < x1 < 8.6000000000000002e-7Initial program 98.8%
Taylor expanded in x1 around 0 97.0%
+-commutative97.0%
mul-1-neg97.0%
sub-neg97.0%
Simplified97.0%
add-sqr-sqrt97.0%
pow297.0%
associate-*l*97.0%
pow297.0%
Applied egg-rr97.0%
Taylor expanded in x1 around inf 96.2%
unpow296.2%
rem-square-sqrt96.2%
Simplified96.2%
if 8.6000000000000002e-7 < x1 < 5.00000000000000015e82Initial program 99.5%
Taylor expanded in x1 around inf 99.5%
Final simplification97.9%
(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 (- t_3 3.0)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 8.6e-7)
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))
(+
x1
(+
t_0
(+
t_4
(*
t_2
(+
(* t_5 (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* (* x1 x1) 6.0))))))))
(if (<= x1 4e+135)
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) t_5)
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
t_4)
t_0))
9.0))
(+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.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 = t_3 - 3.0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 8.6e-7) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_4 + (t_2 * ((t_5 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))));
} else if (x1 <= 4e+135) {
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_5) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + 9.0);
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = x1 * (x1 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_2
t_4 = t_1 * t_3
t_5 = t_3 - 3.0d0
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= 8.6d-7) then
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_4 + (t_2 * ((t_5 * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + ((x1 * x1) * 6.0d0)))))))
else if (x1 <= 4d+135) then
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0d0) * t_3) * t_5) + ((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)))) + t_4) + t_0)) + 9.0d0)
else
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double 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 = t_3 - 3.0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 8.6e-7) {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_4 + (t_2 * ((t_5 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))));
} else if (x1 <= 4e+135) {
tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_5) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + 9.0);
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
}
return tmp;
}
def code(x1, x2): 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 = t_3 - 3.0 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= 8.6e-7: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_4 + (t_2 * ((t_5 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0))))))) elif x1 <= 4e+135: tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_5) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + 9.0) else: tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.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(t_3 - 3.0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= 8.6e-7) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_2 * Float64(Float64(t_5 * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(Float64(x1 * x1) * 6.0)))))))); elseif (x1 <= 4e+135) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * t_5) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + 9.0)); else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))); end return tmp end
function tmp_2 = code(x1, x2) 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 = t_3 - 3.0; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= 8.6e-7) tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)) + (x1 + (t_0 + (t_4 + (t_2 * ((t_5 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0))))))); elseif (x1 <= 4e+135) tmp = x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_5) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + 9.0); else tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(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[(t$95$3 - 3.0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.6e-7], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$2 * N[(N[(t$95$5 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e+135], N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * t$95$5), $MachinePrecision] + 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] + 9.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 := t_3 - 3\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq 8.6 \cdot 10^{-7}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2} + \left(x1 + \left(t_0 + \left(t_4 + t_2 \cdot \left(t_5 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+135}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot t_5 + \left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right)\right) + t_4\right) + t_0\right)\right) + 9\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 3.7%
fma-def3.7%
fma-neg3.7%
fma-neg3.7%
metadata-eval3.7%
metadata-eval3.7%
Simplified3.7%
Taylor expanded in x2 around 0 22.6%
if -5.60000000000000037e102 < x1 < 8.6000000000000002e-7Initial program 98.8%
Taylor expanded in x1 around 0 97.2%
+-commutative97.2%
mul-1-neg97.2%
sub-neg97.2%
Simplified97.2%
add-sqr-sqrt97.2%
pow297.2%
associate-*l*97.2%
pow297.2%
Applied egg-rr97.2%
Taylor expanded in x1 around inf 96.4%
unpow296.4%
rem-square-sqrt96.5%
Simplified96.5%
if 8.6000000000000002e-7 < x1 < 3.99999999999999985e135Initial program 99.7%
Taylor expanded in x1 around inf 99.7%
if 3.99999999999999985e135 < x1 Initial program 11.1%
Taylor expanded in x1 around 0 11.1%
Taylor expanded in x1 around inf 53.5%
Final simplification78.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0)))
(t_4 (* x2 (- (* 2.0 x2) 3.0)))
(t_5 (* 4.0 (* x1 t_4)))
(t_6 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0))
(t_7 (* t_2 t_6))
(t_8 (- t_6 3.0)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 -0.0135)
(+
x1
(+
9.0
(+
x1
(+
t_1
(+
t_7
(*
t_0
(+ (* (* (* x1 2.0) t_6) t_8) (* x1 (+ (* x1 6.0) -4.0)))))))))
(if (<= x1 -2.5e-177)
(+ x1 (+ t_3 (+ x1 t_5)))
(if (<= x1 5.5e-162)
(+
x1
(+
(+
x1
(+
t_1
(+
t_7
(*
t_0
(+
(* t_8 (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* (* x1 x1) 6.0))))))
(* 3.0 (* x2 -2.0))))
(if (<= x1 4e+135)
(+
x1
(+
t_3
(+
x1
(+
t_1
(+ t_7 (* t_0 (+ (* (* x1 x1) (- (* t_6 4.0) 6.0)) t_5)))))))
(+ x1 (* x1 (+ 1.0 (* 4.0 t_4)))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0);
double t_4 = x2 * ((2.0 * x2) - 3.0);
double t_5 = 4.0 * (x1 * t_4);
double t_6 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_7 = t_2 * t_6;
double t_8 = t_6 - 3.0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -0.0135) {
tmp = x1 + (9.0 + (x1 + (t_1 + (t_7 + (t_0 * ((((x1 * 2.0) * t_6) * t_8) + (x1 * ((x1 * 6.0) + -4.0))))))));
} else if (x1 <= -2.5e-177) {
tmp = x1 + (t_3 + (x1 + t_5));
} else if (x1 <= 5.5e-162) {
tmp = x1 + ((x1 + (t_1 + (t_7 + (t_0 * ((t_8 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 4e+135) {
tmp = x1 + (t_3 + (x1 + (t_1 + (t_7 + (t_0 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + t_5))))));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * t_4)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = 3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)
t_4 = x2 * ((2.0d0 * x2) - 3.0d0)
t_5 = 4.0d0 * (x1 * t_4)
t_6 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
t_7 = t_2 * t_6
t_8 = t_6 - 3.0d0
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= (-0.0135d0)) then
tmp = x1 + (9.0d0 + (x1 + (t_1 + (t_7 + (t_0 * ((((x1 * 2.0d0) * t_6) * t_8) + (x1 * ((x1 * 6.0d0) + (-4.0d0)))))))))
else if (x1 <= (-2.5d-177)) then
tmp = x1 + (t_3 + (x1 + t_5))
else if (x1 <= 5.5d-162) then
tmp = x1 + ((x1 + (t_1 + (t_7 + (t_0 * ((t_8 * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + ((x1 * x1) * 6.0d0)))))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 4d+135) then
tmp = x1 + (t_3 + (x1 + (t_1 + (t_7 + (t_0 * (((x1 * x1) * ((t_6 * 4.0d0) - 6.0d0)) + t_5))))))
else
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * t_4)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0);
double t_4 = x2 * ((2.0 * x2) - 3.0);
double t_5 = 4.0 * (x1 * t_4);
double t_6 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_7 = t_2 * t_6;
double t_8 = t_6 - 3.0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -0.0135) {
tmp = x1 + (9.0 + (x1 + (t_1 + (t_7 + (t_0 * ((((x1 * 2.0) * t_6) * t_8) + (x1 * ((x1 * 6.0) + -4.0))))))));
} else if (x1 <= -2.5e-177) {
tmp = x1 + (t_3 + (x1 + t_5));
} else if (x1 <= 5.5e-162) {
tmp = x1 + ((x1 + (t_1 + (t_7 + (t_0 * ((t_8 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 4e+135) {
tmp = x1 + (t_3 + (x1 + (t_1 + (t_7 + (t_0 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + t_5))))));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * t_4)));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0) t_4 = x2 * ((2.0 * x2) - 3.0) t_5 = 4.0 * (x1 * t_4) t_6 = ((t_2 + (2.0 * x2)) - x1) / t_0 t_7 = t_2 * t_6 t_8 = t_6 - 3.0 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= -0.0135: tmp = x1 + (9.0 + (x1 + (t_1 + (t_7 + (t_0 * ((((x1 * 2.0) * t_6) * t_8) + (x1 * ((x1 * 6.0) + -4.0)))))))) elif x1 <= -2.5e-177: tmp = x1 + (t_3 + (x1 + t_5)) elif x1 <= 5.5e-162: tmp = x1 + ((x1 + (t_1 + (t_7 + (t_0 * ((t_8 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))) elif x1 <= 4e+135: tmp = x1 + (t_3 + (x1 + (t_1 + (t_7 + (t_0 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + t_5)))))) else: tmp = x1 + (x1 * (1.0 + (4.0 * t_4))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) t_4 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_5 = Float64(4.0 * Float64(x1 * t_4)) t_6 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) t_7 = Float64(t_2 * t_6) t_8 = Float64(t_6 - 3.0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= -0.0135) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_1 + Float64(t_7 + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_6) * t_8) + Float64(x1 * Float64(Float64(x1 * 6.0) + -4.0))))))))); elseif (x1 <= -2.5e-177) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + t_5))); elseif (x1 <= 5.5e-162) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(t_7 + Float64(t_0 * Float64(Float64(t_8 * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(Float64(x1 * x1) * 6.0)))))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 4e+135) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_1 + Float64(t_7 + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_6 * 4.0) - 6.0)) + t_5))))))); else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * t_4)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = 3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0); t_4 = x2 * ((2.0 * x2) - 3.0); t_5 = 4.0 * (x1 * t_4); t_6 = ((t_2 + (2.0 * x2)) - x1) / t_0; t_7 = t_2 * t_6; t_8 = t_6 - 3.0; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= -0.0135) tmp = x1 + (9.0 + (x1 + (t_1 + (t_7 + (t_0 * ((((x1 * 2.0) * t_6) * t_8) + (x1 * ((x1 * 6.0) + -4.0)))))))); elseif (x1 <= -2.5e-177) tmp = x1 + (t_3 + (x1 + t_5)); elseif (x1 <= 5.5e-162) tmp = x1 + ((x1 + (t_1 + (t_7 + (t_0 * ((t_8 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 4e+135) tmp = x1 + (t_3 + (x1 + (t_1 + (t_7 + (t_0 * (((x1 * x1) * ((t_6 * 4.0) - 6.0)) + t_5)))))); else tmp = x1 + (x1 * (1.0 + (4.0 * t_4))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(4.0 * N[(x1 * t$95$4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$2 * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$6 - 3.0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.0135], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$1 + N[(t$95$7 + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$6), $MachinePrecision] * t$95$8), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] + -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.5e-177], N[(x1 + N[(t$95$3 + N[(x1 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.5e-162], N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(t$95$7 + N[(t$95$0 * N[(N[(t$95$8 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e+135], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$1 + N[(t$95$7 + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$6 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0}\\
t_4 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_5 := 4 \cdot \left(x1 \cdot t_4\right)\\
t_6 := \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_0}\\
t_7 := t_2 \cdot t_6\\
t_8 := t_6 - 3\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq -0.0135:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t_1 + \left(t_7 + t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_6\right) \cdot t_8 + x1 \cdot \left(x1 \cdot 6 + -4\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-177}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + t_5\right)\right)\\
\mathbf{elif}\;x1 \leq 5.5 \cdot 10^{-162}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t_1 + \left(t_7 + t_0 \cdot \left(t_8 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+135}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_1 + \left(t_7 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t_6 \cdot 4 - 6\right) + t_5\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot t_4\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 3.7%
fma-def3.7%
fma-neg3.7%
fma-neg3.7%
metadata-eval3.7%
metadata-eval3.7%
Simplified3.7%
Taylor expanded in x2 around 0 22.6%
if -5.60000000000000037e102 < x1 < -0.0134999999999999998Initial program 99.4%
Taylor expanded in x1 around inf 99.4%
Taylor expanded in x1 around inf 98.2%
+-commutative76.4%
*-commutative76.4%
unpow276.4%
associate-*l*76.5%
*-commutative76.5%
distribute-lft-out76.5%
Simplified98.4%
if -0.0134999999999999998 < x1 < -2.5e-177Initial program 96.6%
Taylor expanded in x1 around 0 89.7%
if -2.5e-177 < x1 < 5.50000000000000006e-162Initial program 99.7%
Taylor expanded in x1 around 0 99.7%
+-commutative99.7%
mul-1-neg99.7%
sub-neg99.7%
Simplified99.7%
add-sqr-sqrt99.7%
pow299.7%
associate-*l*99.7%
pow299.7%
Applied egg-rr99.7%
Taylor expanded in x1 around inf 99.7%
unpow299.7%
rem-square-sqrt99.7%
Simplified99.7%
Taylor expanded in x1 around 0 93.3%
*-commutative93.3%
Simplified93.3%
if 5.50000000000000006e-162 < x1 < 3.99999999999999985e135Initial program 99.5%
Taylor expanded in x1 around 0 90.4%
+-commutative90.4%
mul-1-neg90.4%
sub-neg90.4%
Simplified90.4%
Taylor expanded in x1 around 0 88.8%
if 3.99999999999999985e135 < x1 Initial program 11.1%
Taylor expanded in x1 around 0 11.1%
Taylor expanded in x1 around inf 53.5%
Final simplification74.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* x2 (- (* 2.0 x2) 3.0)))
(t_4 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0))
(t_5
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x1 t_3))))))
(t_6 (* t_2 t_4))
(t_7 (- t_4 3.0))
(t_8
(+
x1
(+
9.0
(+
x1
(+
t_1
(+
t_6
(*
t_0
(+
(* (* (* x1 2.0) t_4) t_7)
(* x1 (+ (* x1 6.0) -4.0)))))))))))
(if (<= x1 -5.6e+102)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 -0.195)
t_8
(if (<= x1 -2.8e-177)
t_5
(if (<= x1 3.2e-159)
(+
x1
(+
(+
x1
(+
t_1
(+
t_6
(*
t_0
(+
(* t_7 (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* (* x1 x1) 6.0))))))
(* 3.0 (* x2 -2.0))))
(if (<= x1 8.6e-7)
t_5
(if (<= x1 4e+135) t_8 (+ x1 (* x1 (+ 1.0 (* 4.0 t_3))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = x2 * ((2.0 * x2) - 3.0);
double t_4 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_5 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_3))));
double t_6 = t_2 * t_4;
double t_7 = t_4 - 3.0;
double t_8 = x1 + (9.0 + (x1 + (t_1 + (t_6 + (t_0 * ((((x1 * 2.0) * t_4) * t_7) + (x1 * ((x1 * 6.0) + -4.0))))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -0.195) {
tmp = t_8;
} else if (x1 <= -2.8e-177) {
tmp = t_5;
} else if (x1 <= 3.2e-159) {
tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * ((t_7 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 8.6e-7) {
tmp = t_5;
} else if (x1 <= 4e+135) {
tmp = t_8;
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * t_3)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = x2 * ((2.0d0 * x2) - 3.0d0)
t_4 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
t_5 = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x1 * t_3))))
t_6 = t_2 * t_4
t_7 = t_4 - 3.0d0
t_8 = x1 + (9.0d0 + (x1 + (t_1 + (t_6 + (t_0 * ((((x1 * 2.0d0) * t_4) * t_7) + (x1 * ((x1 * 6.0d0) + (-4.0d0)))))))))
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= (-0.195d0)) then
tmp = t_8
else if (x1 <= (-2.8d-177)) then
tmp = t_5
else if (x1 <= 3.2d-159) then
tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * ((t_7 * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + ((x1 * x1) * 6.0d0)))))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 8.6d-7) then
tmp = t_5
else if (x1 <= 4d+135) then
tmp = t_8
else
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * t_3)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = x2 * ((2.0 * x2) - 3.0);
double t_4 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_5 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_3))));
double t_6 = t_2 * t_4;
double t_7 = t_4 - 3.0;
double t_8 = x1 + (9.0 + (x1 + (t_1 + (t_6 + (t_0 * ((((x1 * 2.0) * t_4) * t_7) + (x1 * ((x1 * 6.0) + -4.0))))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -0.195) {
tmp = t_8;
} else if (x1 <= -2.8e-177) {
tmp = t_5;
} else if (x1 <= 3.2e-159) {
tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * ((t_7 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 8.6e-7) {
tmp = t_5;
} else if (x1 <= 4e+135) {
tmp = t_8;
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * t_3)));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = x2 * ((2.0 * x2) - 3.0) t_4 = ((t_2 + (2.0 * x2)) - x1) / t_0 t_5 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_3)))) t_6 = t_2 * t_4 t_7 = t_4 - 3.0 t_8 = x1 + (9.0 + (x1 + (t_1 + (t_6 + (t_0 * ((((x1 * 2.0) * t_4) * t_7) + (x1 * ((x1 * 6.0) + -4.0)))))))) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= -0.195: tmp = t_8 elif x1 <= -2.8e-177: tmp = t_5 elif x1 <= 3.2e-159: tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * ((t_7 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))) elif x1 <= 8.6e-7: tmp = t_5 elif x1 <= 4e+135: tmp = t_8 else: tmp = x1 + (x1 * (1.0 + (4.0 * t_3))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_4 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) t_5 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x1 * t_3))))) t_6 = Float64(t_2 * t_4) t_7 = Float64(t_4 - 3.0) t_8 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_1 + Float64(t_6 + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * t_7) + Float64(x1 * Float64(Float64(x1 * 6.0) + -4.0))))))))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= -0.195) tmp = t_8; elseif (x1 <= -2.8e-177) tmp = t_5; elseif (x1 <= 3.2e-159) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(t_6 + Float64(t_0 * Float64(Float64(t_7 * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(Float64(x1 * x1) * 6.0)))))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 8.6e-7) tmp = t_5; elseif (x1 <= 4e+135) tmp = t_8; else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * t_3)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = x2 * ((2.0 * x2) - 3.0); t_4 = ((t_2 + (2.0 * x2)) - x1) / t_0; t_5 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_3)))); t_6 = t_2 * t_4; t_7 = t_4 - 3.0; t_8 = x1 + (9.0 + (x1 + (t_1 + (t_6 + (t_0 * ((((x1 * 2.0) * t_4) * t_7) + (x1 * ((x1 * 6.0) + -4.0)))))))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= -0.195) tmp = t_8; elseif (x1 <= -2.8e-177) tmp = t_5; elseif (x1 <= 3.2e-159) tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * ((t_7 * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 8.6e-7) tmp = t_5; elseif (x1 <= 4e+135) tmp = t_8; else tmp = x1 + (x1 * (1.0 + (4.0 * t_3))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x1 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$2 * t$95$4), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$4 - 3.0), $MachinePrecision]}, Block[{t$95$8 = N[(x1 + N[(9.0 + N[(x1 + N[(t$95$1 + N[(t$95$6 + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * t$95$7), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] + -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.195], t$95$8, If[LessEqual[x1, -2.8e-177], t$95$5, If[LessEqual[x1, 3.2e-159], N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(t$95$6 + N[(t$95$0 * N[(N[(t$95$7 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.6e-7], t$95$5, If[LessEqual[x1, 4e+135], t$95$8, N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_4 := \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_0}\\
t_5 := x1 + \left(3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + 4 \cdot \left(x1 \cdot t_3\right)\right)\right)\\
t_6 := t_2 \cdot t_4\\
t_7 := t_4 - 3\\
t_8 := x1 + \left(9 + \left(x1 + \left(t_1 + \left(t_6 + t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot t_7 + x1 \cdot \left(x1 \cdot 6 + -4\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq -0.195:\\
\;\;\;\;t_8\\
\mathbf{elif}\;x1 \leq -2.8 \cdot 10^{-177}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq 3.2 \cdot 10^{-159}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t_1 + \left(t_6 + t_0 \cdot \left(t_7 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 8.6 \cdot 10^{-7}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+135}:\\
\;\;\;\;t_8\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot t_3\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 3.7%
fma-def3.7%
fma-neg3.7%
fma-neg3.7%
metadata-eval3.7%
metadata-eval3.7%
Simplified3.7%
Taylor expanded in x2 around 0 22.6%
if -5.60000000000000037e102 < x1 < -0.19500000000000001 or 8.6000000000000002e-7 < x1 < 3.99999999999999985e135Initial program 99.5%
Taylor expanded in x1 around inf 99.5%
Taylor expanded in x1 around inf 94.0%
+-commutative68.8%
*-commutative68.8%
unpow268.8%
associate-*l*68.9%
*-commutative68.9%
distribute-lft-out68.9%
Simplified94.0%
if -0.19500000000000001 < x1 < -2.79999999999999987e-177 or 3.2e-159 < x1 < 8.6000000000000002e-7Initial program 97.8%
Taylor expanded in x1 around 0 92.2%
if -2.79999999999999987e-177 < x1 < 3.2e-159Initial program 99.7%
Taylor expanded in x1 around 0 99.7%
+-commutative99.7%
mul-1-neg99.7%
sub-neg99.7%
Simplified99.7%
add-sqr-sqrt99.7%
pow299.7%
associate-*l*99.7%
pow299.7%
Applied egg-rr99.7%
Taylor expanded in x1 around inf 99.7%
unpow299.7%
rem-square-sqrt99.7%
Simplified99.7%
Taylor expanded in x1 around 0 93.3%
*-commutative93.3%
Simplified93.3%
if 3.99999999999999985e135 < x1 Initial program 11.1%
Taylor expanded in x1 around 0 11.1%
Taylor expanded in x1 around inf 53.5%
Final simplification75.4%
(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 (<= x1 -5.6e+102)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 4e+135)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+
(* (- t_2 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* (* x1 x1) 6.0))))))))
(+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 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 <= -5.6e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 4e+135) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: 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 <= (-5.6d+102)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= 4d+135) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double 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 <= -5.6e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 4e+135) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * 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 <= -5.6e+102: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= 4e+135: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0))))))) else: tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * 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 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= 4e+135) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))); end return tmp end
function tmp_2 = code(x1, x2) 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 <= -5.6e+102) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= 4e+135) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * (((t_2 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0))))))); else tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * 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[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e+135], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $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 -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+135}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_2 + t_1 \cdot \left(\left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 3.7%
fma-def3.7%
fma-neg3.7%
fma-neg3.7%
metadata-eval3.7%
metadata-eval3.7%
Simplified3.7%
Taylor expanded in x2 around 0 22.6%
if -5.60000000000000037e102 < x1 < 3.99999999999999985e135Initial program 98.9%
Taylor expanded in x1 around 0 95.0%
+-commutative95.0%
mul-1-neg95.0%
sub-neg95.0%
Simplified95.0%
add-sqr-sqrt94.9%
pow294.9%
associate-*l*94.9%
pow294.9%
Applied egg-rr94.9%
Taylor expanded in x1 around inf 94.2%
unpow294.2%
rem-square-sqrt94.2%
Simplified94.2%
if 3.99999999999999985e135 < x1 Initial program 11.1%
Taylor expanded in x1 around 0 11.1%
Taylor expanded in x1 around inf 53.5%
Final simplification76.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x2 (- (* 2.0 x2) 3.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x1 t_1))))))
(t_4 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0))
(t_5
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_2 t_4)
(*
t_0
(+
(* (- t_4 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* (* x1 x1) 6.0)))))))
(t_6 (+ x1 (+ t_5 (* 3.0 (* x2 -2.0))))))
(if (<= x1 -5.6e+102)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 -0.55)
(+ x1 (+ 9.0 t_5))
(if (<= x1 -1.95e-177)
t_3
(if (<= x1 1e-162)
t_6
(if (<= x1 8.6e-7)
t_3
(if (<= x1 4e+135) t_6 (+ x1 (* x1 (+ 1.0 (* 4.0 t_1))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x2 * ((2.0 * x2) - 3.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_1))));
double t_4 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_5 = x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) + (t_0 * (((t_4 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))));
double t_6 = x1 + (t_5 + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -0.55) {
tmp = x1 + (9.0 + t_5);
} else if (x1 <= -1.95e-177) {
tmp = t_3;
} else if (x1 <= 1e-162) {
tmp = t_6;
} else if (x1 <= 8.6e-7) {
tmp = t_3;
} else if (x1 <= 4e+135) {
tmp = t_6;
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * 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) + 1.0d0
t_1 = x2 * ((2.0d0 * x2) - 3.0d0)
t_2 = x1 * (x1 * 3.0d0)
t_3 = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x1 * t_1))))
t_4 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
t_5 = x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) + (t_0 * (((t_4 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + ((x1 * x1) * 6.0d0)))))
t_6 = x1 + (t_5 + (3.0d0 * (x2 * (-2.0d0))))
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= (-0.55d0)) then
tmp = x1 + (9.0d0 + t_5)
else if (x1 <= (-1.95d-177)) then
tmp = t_3
else if (x1 <= 1d-162) then
tmp = t_6
else if (x1 <= 8.6d-7) then
tmp = t_3
else if (x1 <= 4d+135) then
tmp = t_6
else
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * 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 = x2 * ((2.0 * x2) - 3.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_1))));
double t_4 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_5 = x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) + (t_0 * (((t_4 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))));
double t_6 = x1 + (t_5 + (3.0 * (x2 * -2.0)));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -0.55) {
tmp = x1 + (9.0 + t_5);
} else if (x1 <= -1.95e-177) {
tmp = t_3;
} else if (x1 <= 1e-162) {
tmp = t_6;
} else if (x1 <= 8.6e-7) {
tmp = t_3;
} else if (x1 <= 4e+135) {
tmp = t_6;
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * t_1)));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x2 * ((2.0 * x2) - 3.0) t_2 = x1 * (x1 * 3.0) t_3 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_1)))) t_4 = ((t_2 + (2.0 * x2)) - x1) / t_0 t_5 = x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) + (t_0 * (((t_4 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0))))) t_6 = x1 + (t_5 + (3.0 * (x2 * -2.0))) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= -0.55: tmp = x1 + (9.0 + t_5) elif x1 <= -1.95e-177: tmp = t_3 elif x1 <= 1e-162: tmp = t_6 elif x1 <= 8.6e-7: tmp = t_3 elif x1 <= 4e+135: tmp = t_6 else: tmp = x1 + (x1 * (1.0 + (4.0 * t_1))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x1 * t_1))))) t_4 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) t_5 = Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_2 * t_4) + Float64(t_0 * Float64(Float64(Float64(t_4 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(Float64(x1 * x1) * 6.0)))))) t_6 = Float64(x1 + Float64(t_5 + Float64(3.0 * Float64(x2 * -2.0)))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= -0.55) tmp = Float64(x1 + Float64(9.0 + t_5)); elseif (x1 <= -1.95e-177) tmp = t_3; elseif (x1 <= 1e-162) tmp = t_6; elseif (x1 <= 8.6e-7) tmp = t_3; elseif (x1 <= 4e+135) tmp = t_6; else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * t_1)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x2 * ((2.0 * x2) - 3.0); t_2 = x1 * (x1 * 3.0); t_3 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_1)))); t_4 = ((t_2 + (2.0 * x2)) - x1) / t_0; t_5 = x1 + ((x1 * (x1 * x1)) + ((t_2 * t_4) + (t_0 * (((t_4 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0))))); t_6 = x1 + (t_5 + (3.0 * (x2 * -2.0))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= -0.55) tmp = x1 + (9.0 + t_5); elseif (x1 <= -1.95e-177) tmp = t_3; elseif (x1 <= 1e-162) tmp = t_6; elseif (x1 <= 8.6e-7) tmp = t_3; elseif (x1 <= 4e+135) tmp = t_6; else tmp = x1 + (x1 * (1.0 + (4.0 * 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[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * t$95$4), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(t$95$4 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(t$95$5 + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.55], N[(x1 + N[(9.0 + t$95$5), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.95e-177], t$95$3, If[LessEqual[x1, 1e-162], t$95$6, If[LessEqual[x1, 8.6e-7], t$95$3, If[LessEqual[x1, 4e+135], t$95$6, N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := x1 + \left(3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + 4 \cdot \left(x1 \cdot t_1\right)\right)\right)\\
t_4 := \frac{\left(t_2 + 2 \cdot x2\right) - x1}{t_0}\\
t_5 := x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_2 \cdot t_4 + t_0 \cdot \left(\left(t_4 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\\
t_6 := x1 + \left(t_5 + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq -0.55:\\
\;\;\;\;x1 + \left(9 + t_5\right)\\
\mathbf{elif}\;x1 \leq -1.95 \cdot 10^{-177}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x1 \leq 10^{-162}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;x1 \leq 8.6 \cdot 10^{-7}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+135}:\\
\;\;\;\;t_6\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot t_1\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 3.7%
fma-def3.7%
fma-neg3.7%
fma-neg3.7%
metadata-eval3.7%
metadata-eval3.7%
Simplified3.7%
Taylor expanded in x2 around 0 22.6%
if -5.60000000000000037e102 < x1 < -0.55000000000000004Initial program 99.4%
Taylor expanded in x1 around 0 92.0%
+-commutative92.0%
mul-1-neg92.0%
sub-neg92.0%
Simplified92.0%
add-sqr-sqrt91.8%
pow291.8%
associate-*l*91.7%
pow291.7%
Applied egg-rr91.7%
Taylor expanded in x1 around inf 91.6%
unpow291.6%
rem-square-sqrt91.8%
Simplified91.8%
Taylor expanded in x1 around inf 91.8%
if -0.55000000000000004 < x1 < -1.95000000000000007e-177 or 9.99999999999999954e-163 < x1 < 8.6000000000000002e-7Initial program 97.8%
Taylor expanded in x1 around 0 92.2%
if -1.95000000000000007e-177 < x1 < 9.99999999999999954e-163 or 8.6000000000000002e-7 < x1 < 3.99999999999999985e135Initial program 99.7%
Taylor expanded in x1 around 0 94.7%
+-commutative94.7%
mul-1-neg94.7%
sub-neg94.7%
Simplified94.7%
add-sqr-sqrt94.7%
pow294.7%
associate-*l*94.6%
pow294.6%
Applied egg-rr94.6%
Taylor expanded in x1 around inf 94.5%
unpow294.5%
rem-square-sqrt94.6%
Simplified94.6%
Taylor expanded in x1 around 0 89.9%
*-commutative89.9%
Simplified89.9%
if 3.99999999999999985e135 < x1 Initial program 11.1%
Taylor expanded in x1 around 0 11.1%
Taylor expanded in x1 around inf 53.5%
Final simplification73.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0)))))
(t_2 (* x2 (- (* 2.0 x2) 3.0)))
(t_3 (* x1 (* x1 3.0)))
(t_4
(+
x1
(+
(* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x1 t_2))))))
(t_5 (/ (- (+ t_3 (* 2.0 x2)) x1) t_0))
(t_6
(+
x1
(+
9.0
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_3 t_5)
(*
t_0
(+
(* (- t_5 3.0) (* (* x1 2.0) (- (* 2.0 x2) x1)))
(* (* x1 x1) 6.0))))))))))
(if (<= x1 -5.6e+102)
t_1
(if (<= x1 -0.55)
t_6
(if (<= x1 -6.2e-193)
t_4
(if (<= x1 7.2e-218)
t_1
(if (<= x1 8.6e-7)
t_4
(if (<= x1 4e+135) t_6 (+ x1 (* x1 (+ 1.0 (* 4.0 t_2))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double t_2 = x2 * ((2.0 * x2) - 3.0);
double t_3 = x1 * (x1 * 3.0);
double t_4 = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_2))));
double t_5 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double t_6 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_5) + (t_0 * (((t_5 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_1;
} else if (x1 <= -0.55) {
tmp = t_6;
} else if (x1 <= -6.2e-193) {
tmp = t_4;
} else if (x1 <= 7.2e-218) {
tmp = t_1;
} else if (x1 <= 8.6e-7) {
tmp = t_4;
} else if (x1 <= 4e+135) {
tmp = t_6;
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * 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) + 1.0d0
t_1 = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
t_2 = x2 * ((2.0d0 * x2) - 3.0d0)
t_3 = x1 * (x1 * 3.0d0)
t_4 = x1 + ((3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x1 * t_2))))
t_5 = ((t_3 + (2.0d0 * x2)) - x1) / t_0
t_6 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_5) + (t_0 * (((t_5 - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1))) + ((x1 * x1) * 6.0d0)))))))
if (x1 <= (-5.6d+102)) then
tmp = t_1
else if (x1 <= (-0.55d0)) then
tmp = t_6
else if (x1 <= (-6.2d-193)) then
tmp = t_4
else if (x1 <= 7.2d-218) then
tmp = t_1
else if (x1 <= 8.6d-7) then
tmp = t_4
else if (x1 <= 4d+135) then
tmp = t_6
else
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * t_2)))
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 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double t_2 = x2 * ((2.0 * x2) - 3.0);
double t_3 = x1 * (x1 * 3.0);
double t_4 = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_2))));
double t_5 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double t_6 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_5) + (t_0 * (((t_5 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0)))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_1;
} else if (x1 <= -0.55) {
tmp = t_6;
} else if (x1 <= -6.2e-193) {
tmp = t_4;
} else if (x1 <= 7.2e-218) {
tmp = t_1;
} else if (x1 <= 8.6e-7) {
tmp = t_4;
} else if (x1 <= 4e+135) {
tmp = t_6;
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * t_2)));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) t_2 = x2 * ((2.0 * x2) - 3.0) t_3 = x1 * (x1 * 3.0) t_4 = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_2)))) t_5 = ((t_3 + (2.0 * x2)) - x1) / t_0 t_6 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_5) + (t_0 * (((t_5 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0))))))) tmp = 0 if x1 <= -5.6e+102: tmp = t_1 elif x1 <= -0.55: tmp = t_6 elif x1 <= -6.2e-193: tmp = t_4 elif x1 <= 7.2e-218: tmp = t_1 elif x1 <= 8.6e-7: tmp = t_4 elif x1 <= 4e+135: tmp = t_6 else: tmp = x1 + (x1 * (1.0 + (4.0 * t_2))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))) t_2 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x1 * t_2))))) t_5 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_0) t_6 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_3 * t_5) + Float64(t_0 * Float64(Float64(Float64(t_5 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1))) + Float64(Float64(x1 * x1) * 6.0)))))))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = t_1; elseif (x1 <= -0.55) tmp = t_6; elseif (x1 <= -6.2e-193) tmp = t_4; elseif (x1 <= 7.2e-218) tmp = t_1; elseif (x1 <= 8.6e-7) tmp = t_4; elseif (x1 <= 4e+135) tmp = t_6; else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * t_2)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); t_2 = x2 * ((2.0 * x2) - 3.0); t_3 = x1 * (x1 * 3.0); t_4 = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_2)))); t_5 = ((t_3 + (2.0 * x2)) - x1) / t_0; t_6 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * t_5) + (t_0 * (((t_5 - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))) + ((x1 * x1) * 6.0))))))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = t_1; elseif (x1 <= -0.55) tmp = t_6; elseif (x1 <= -6.2e-193) tmp = t_4; elseif (x1 <= 7.2e-218) tmp = t_1; elseif (x1 <= 8.6e-7) tmp = t_4; elseif (x1 <= 4e+135) tmp = t_6; else tmp = x1 + (x1 * (1.0 + (4.0 * t_2))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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[(4.0 * N[(x1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 * t$95$5), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(t$95$5 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], t$95$1, If[LessEqual[x1, -0.55], t$95$6, If[LessEqual[x1, -6.2e-193], t$95$4, If[LessEqual[x1, 7.2e-218], t$95$1, If[LessEqual[x1, 8.6e-7], t$95$4, If[LessEqual[x1, 4e+135], t$95$6, N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
t_2 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := x1 + \left(3 \cdot \frac{\left(t_3 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + 4 \cdot \left(x1 \cdot t_2\right)\right)\right)\\
t_5 := \frac{\left(t_3 + 2 \cdot x2\right) - x1}{t_0}\\
t_6 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_3 \cdot t_5 + t_0 \cdot \left(\left(t_5 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -0.55:\\
\;\;\;\;t_6\\
\mathbf{elif}\;x1 \leq -6.2 \cdot 10^{-193}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x1 \leq 7.2 \cdot 10^{-218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 8.6 \cdot 10^{-7}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+135}:\\
\;\;\;\;t_6\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot t_2\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102 or -6.2000000000000004e-193 < x1 < 7.20000000000000023e-218Initial program 52.5%
Taylor expanded in x1 around 0 33.0%
Taylor expanded in x1 around 0 34.8%
fma-def34.8%
fma-neg34.8%
fma-neg34.8%
metadata-eval34.8%
metadata-eval34.8%
Simplified34.8%
Taylor expanded in x2 around 0 59.0%
if -5.60000000000000037e102 < x1 < -0.55000000000000004 or 8.6000000000000002e-7 < x1 < 3.99999999999999985e135Initial program 99.5%
Taylor expanded in x1 around 0 85.6%
+-commutative85.6%
mul-1-neg85.6%
sub-neg85.6%
Simplified85.6%
add-sqr-sqrt85.5%
pow285.5%
associate-*l*85.4%
pow285.4%
Applied egg-rr85.4%
Taylor expanded in x1 around inf 85.2%
unpow285.2%
rem-square-sqrt85.3%
Simplified85.3%
Taylor expanded in x1 around inf 85.3%
if -0.55000000000000004 < x1 < -6.2000000000000004e-193 or 7.20000000000000023e-218 < x1 < 8.6000000000000002e-7Initial program 98.2%
Taylor expanded in x1 around 0 90.5%
if 3.99999999999999985e135 < x1 Initial program 11.1%
Taylor expanded in x1 around 0 11.1%
Taylor expanded in x1 around inf 53.5%
Final simplification73.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0)))))
(t_2 (* x2 (- (* 2.0 x2) 3.0)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_4)))
(t_6 (+ x1 (+ t_5 (+ x1 (* 4.0 (* x1 t_2))))))
(t_7 (/ (- (+ t_3 (* 2.0 x2)) x1) t_4)))
(if (<= x1 -5.6e+102)
t_1
(if (<= x1 -1850.0)
(+
x1
(+
t_5
(+
x1
(+
t_0
(+
(* t_4 (+ (* x1 2.0) (* x1 (+ (* x1 6.0) -4.0))))
(* t_3 (- (* 2.0 x2) x1)))))))
(if (<= x1 -9e-191)
t_6
(if (<= x1 3.35e-220)
t_1
(if (<= x1 85000000.0)
t_6
(if (<= x1 4e+135)
(+
x1
(+
9.0
(+
x1
(+
t_0
(+
(* t_3 t_7)
(*
t_4
(+ (* x1 2.0) (* (* x1 x1) (- (* t_7 4.0) 6.0)))))))))
(+ x1 (* x1 (+ 1.0 (* 4.0 t_2))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double t_2 = x2 * ((2.0 * x2) - 3.0);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_4);
double t_6 = x1 + (t_5 + (x1 + (4.0 * (x1 * t_2))));
double t_7 = ((t_3 + (2.0 * x2)) - x1) / t_4;
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_1;
} else if (x1 <= -1850.0) {
tmp = x1 + (t_5 + (x1 + (t_0 + ((t_4 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0)))) + (t_3 * ((2.0 * x2) - x1))))));
} else if (x1 <= -9e-191) {
tmp = t_6;
} else if (x1 <= 3.35e-220) {
tmp = t_1;
} else if (x1 <= 85000000.0) {
tmp = t_6;
} else if (x1 <= 4e+135) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_3 * t_7) + (t_4 * ((x1 * 2.0) + ((x1 * x1) * ((t_7 * 4.0) - 6.0))))))));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * 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 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
t_2 = x2 * ((2.0d0 * x2) - 3.0d0)
t_3 = x1 * (x1 * 3.0d0)
t_4 = (x1 * x1) + 1.0d0
t_5 = 3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_4)
t_6 = x1 + (t_5 + (x1 + (4.0d0 * (x1 * t_2))))
t_7 = ((t_3 + (2.0d0 * x2)) - x1) / t_4
if (x1 <= (-5.6d+102)) then
tmp = t_1
else if (x1 <= (-1850.0d0)) then
tmp = x1 + (t_5 + (x1 + (t_0 + ((t_4 * ((x1 * 2.0d0) + (x1 * ((x1 * 6.0d0) + (-4.0d0))))) + (t_3 * ((2.0d0 * x2) - x1))))))
else if (x1 <= (-9d-191)) then
tmp = t_6
else if (x1 <= 3.35d-220) then
tmp = t_1
else if (x1 <= 85000000.0d0) then
tmp = t_6
else if (x1 <= 4d+135) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + ((t_3 * t_7) + (t_4 * ((x1 * 2.0d0) + ((x1 * x1) * ((t_7 * 4.0d0) - 6.0d0))))))))
else
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * 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 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double t_2 = x2 * ((2.0 * x2) - 3.0);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_4);
double t_6 = x1 + (t_5 + (x1 + (4.0 * (x1 * t_2))));
double t_7 = ((t_3 + (2.0 * x2)) - x1) / t_4;
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_1;
} else if (x1 <= -1850.0) {
tmp = x1 + (t_5 + (x1 + (t_0 + ((t_4 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0)))) + (t_3 * ((2.0 * x2) - x1))))));
} else if (x1 <= -9e-191) {
tmp = t_6;
} else if (x1 <= 3.35e-220) {
tmp = t_1;
} else if (x1 <= 85000000.0) {
tmp = t_6;
} else if (x1 <= 4e+135) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_3 * t_7) + (t_4 * ((x1 * 2.0) + ((x1 * x1) * ((t_7 * 4.0) - 6.0))))))));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * t_2)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) t_2 = x2 * ((2.0 * x2) - 3.0) t_3 = x1 * (x1 * 3.0) t_4 = (x1 * x1) + 1.0 t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_4) t_6 = x1 + (t_5 + (x1 + (4.0 * (x1 * t_2)))) t_7 = ((t_3 + (2.0 * x2)) - x1) / t_4 tmp = 0 if x1 <= -5.6e+102: tmp = t_1 elif x1 <= -1850.0: tmp = x1 + (t_5 + (x1 + (t_0 + ((t_4 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0)))) + (t_3 * ((2.0 * x2) - x1)))))) elif x1 <= -9e-191: tmp = t_6 elif x1 <= 3.35e-220: tmp = t_1 elif x1 <= 85000000.0: tmp = t_6 elif x1 <= 4e+135: tmp = x1 + (9.0 + (x1 + (t_0 + ((t_3 * t_7) + (t_4 * ((x1 * 2.0) + ((x1 * x1) * ((t_7 * 4.0) - 6.0)))))))) else: tmp = x1 + (x1 * (1.0 + (4.0 * t_2))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))) t_2 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_4)) t_6 = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(4.0 * Float64(x1 * t_2))))) t_7 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_4) tmp = 0.0 if (x1 <= -5.6e+102) tmp = t_1; elseif (x1 <= -1850.0) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_0 + Float64(Float64(t_4 * Float64(Float64(x1 * 2.0) + Float64(x1 * Float64(Float64(x1 * 6.0) + -4.0)))) + Float64(t_3 * Float64(Float64(2.0 * x2) - x1))))))); elseif (x1 <= -9e-191) tmp = t_6; elseif (x1 <= 3.35e-220) tmp = t_1; elseif (x1 <= 85000000.0) tmp = t_6; elseif (x1 <= 4e+135) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(Float64(t_3 * t_7) + Float64(t_4 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * Float64(Float64(t_7 * 4.0) - 6.0))))))))); else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * t_2)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); t_2 = x2 * ((2.0 * x2) - 3.0); t_3 = x1 * (x1 * 3.0); t_4 = (x1 * x1) + 1.0; t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_4); t_6 = x1 + (t_5 + (x1 + (4.0 * (x1 * t_2)))); t_7 = ((t_3 + (2.0 * x2)) - x1) / t_4; tmp = 0.0; if (x1 <= -5.6e+102) tmp = t_1; elseif (x1 <= -1850.0) tmp = x1 + (t_5 + (x1 + (t_0 + ((t_4 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0)))) + (t_3 * ((2.0 * x2) - x1)))))); elseif (x1 <= -9e-191) tmp = t_6; elseif (x1 <= 3.35e-220) tmp = t_1; elseif (x1 <= 85000000.0) tmp = t_6; elseif (x1 <= 4e+135) tmp = x1 + (9.0 + (x1 + (t_0 + ((t_3 * t_7) + (t_4 * ((x1 * 2.0) + ((x1 * x1) * ((t_7 * 4.0) - 6.0)))))))); else tmp = x1 + (x1 * (1.0 + (4.0 * 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[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(t$95$5 + N[(x1 + N[(4.0 * N[(x1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], t$95$1, If[LessEqual[x1, -1850.0], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$0 + N[(N[(t$95$4 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] + -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -9e-191], t$95$6, If[LessEqual[x1, 3.35e-220], t$95$1, If[LessEqual[x1, 85000000.0], t$95$6, If[LessEqual[x1, 4e+135], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(N[(t$95$3 * t$95$7), $MachinePrecision] + N[(t$95$4 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$7 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
t_2 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := x1 \cdot x1 + 1\\
t_5 := 3 \cdot \frac{\left(t_3 - 2 \cdot x2\right) - x1}{t_4}\\
t_6 := x1 + \left(t_5 + \left(x1 + 4 \cdot \left(x1 \cdot t_2\right)\right)\right)\\
t_7 := \frac{\left(t_3 + 2 \cdot x2\right) - x1}{t_4}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -1850:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_0 + \left(t_4 \cdot \left(x1 \cdot 2 + x1 \cdot \left(x1 \cdot 6 + -4\right)\right) + t_3 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -9 \cdot 10^{-191}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;x1 \leq 3.35 \cdot 10^{-220}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 85000000:\\
\;\;\;\;t_6\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+135}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t_0 + \left(t_3 \cdot t_7 + t_4 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(t_7 \cdot 4 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot t_2\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102 or -9.00000000000000017e-191 < x1 < 3.34999999999999996e-220Initial program 52.5%
Taylor expanded in x1 around 0 33.0%
Taylor expanded in x1 around 0 34.8%
fma-def34.8%
fma-neg34.8%
fma-neg34.8%
metadata-eval34.8%
metadata-eval34.8%
Simplified34.8%
Taylor expanded in x2 around 0 59.0%
if -5.60000000000000037e102 < x1 < -1850Initial program 99.4%
Taylor expanded in x1 around 0 92.0%
+-commutative92.0%
mul-1-neg92.0%
sub-neg92.0%
Simplified92.0%
Taylor expanded in x1 around inf 81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in x1 around inf 76.4%
+-commutative76.4%
*-commutative76.4%
unpow276.4%
associate-*l*76.5%
*-commutative76.5%
distribute-lft-out76.5%
Simplified76.5%
Taylor expanded in x1 around 0 81.4%
+-commutative92.0%
mul-1-neg92.0%
sub-neg92.0%
Simplified81.4%
if -1850 < x1 < -9.00000000000000017e-191 or 3.34999999999999996e-220 < x1 < 8.5e7Initial program 98.3%
Taylor expanded in x1 around 0 88.3%
if 8.5e7 < x1 < 3.99999999999999985e135Initial program 99.6%
Taylor expanded in x1 around 0 86.5%
+-commutative86.5%
mul-1-neg86.5%
sub-neg86.5%
Simplified86.5%
Taylor expanded in x1 around inf 86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in x1 around inf 86.9%
if 3.99999999999999985e135 < x1 Initial program 11.1%
Taylor expanded in x1 around 0 11.1%
Taylor expanded in x1 around inf 53.5%
Final simplification72.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0)))))
(t_3 (* x1 (* x1 3.0)))
(t_4 (* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_1)))
(t_5 (/ (- (+ t_3 (* 2.0 x2)) x1) t_1))
(t_6 (* t_3 t_5))
(t_7 (* x2 (- (* 2.0 x2) 3.0)))
(t_8 (+ x1 (+ t_4 (+ x1 (* 4.0 (* x1 t_7)))))))
(if (<= x1 -5.6e+102)
t_2
(if (<= x1 -8.5e+35)
(+
x1
(+
t_4
(+
x1
(+
t_0
(+
t_6
(*
t_1
(+
(* (* x1 x1) 6.0)
(+ (* x1 2.0) (* -2.0 (- (* x2 4.0) 3.0))))))))))
(if (<= x1 -2.2e-193)
t_8
(if (<= x1 3.4e-218)
t_2
(if (<= x1 55000000.0)
t_8
(if (<= x1 4e+135)
(+
x1
(+
9.0
(+
x1
(+
t_0
(+
t_6
(*
t_1
(+ (* x1 2.0) (* (* x1 x1) (- (* t_5 4.0) 6.0)))))))))
(+ x1 (* x1 (+ 1.0 (* 4.0 t_7))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_1);
double t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1;
double t_6 = t_3 * t_5;
double t_7 = x2 * ((2.0 * x2) - 3.0);
double t_8 = x1 + (t_4 + (x1 + (4.0 * (x1 * t_7))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_2;
} else if (x1 <= -8.5e+35) {
tmp = x1 + (t_4 + (x1 + (t_0 + (t_6 + (t_1 * (((x1 * x1) * 6.0) + ((x1 * 2.0) + (-2.0 * ((x2 * 4.0) - 3.0)))))))));
} else if (x1 <= -2.2e-193) {
tmp = t_8;
} else if (x1 <= 3.4e-218) {
tmp = t_2;
} else if (x1 <= 55000000.0) {
tmp = t_8;
} else if (x1 <= 4e+135) {
tmp = x1 + (9.0 + (x1 + (t_0 + (t_6 + (t_1 * ((x1 * 2.0) + ((x1 * x1) * ((t_5 * 4.0) - 6.0))))))));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * t_7)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
t_2 = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
t_3 = x1 * (x1 * 3.0d0)
t_4 = 3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_1)
t_5 = ((t_3 + (2.0d0 * x2)) - x1) / t_1
t_6 = t_3 * t_5
t_7 = x2 * ((2.0d0 * x2) - 3.0d0)
t_8 = x1 + (t_4 + (x1 + (4.0d0 * (x1 * t_7))))
if (x1 <= (-5.6d+102)) then
tmp = t_2
else if (x1 <= (-8.5d+35)) then
tmp = x1 + (t_4 + (x1 + (t_0 + (t_6 + (t_1 * (((x1 * x1) * 6.0d0) + ((x1 * 2.0d0) + ((-2.0d0) * ((x2 * 4.0d0) - 3.0d0)))))))))
else if (x1 <= (-2.2d-193)) then
tmp = t_8
else if (x1 <= 3.4d-218) then
tmp = t_2
else if (x1 <= 55000000.0d0) then
tmp = t_8
else if (x1 <= 4d+135) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + (t_6 + (t_1 * ((x1 * 2.0d0) + ((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0))))))))
else
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * t_7)))
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 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double t_3 = x1 * (x1 * 3.0);
double t_4 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_1);
double t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1;
double t_6 = t_3 * t_5;
double t_7 = x2 * ((2.0 * x2) - 3.0);
double t_8 = x1 + (t_4 + (x1 + (4.0 * (x1 * t_7))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_2;
} else if (x1 <= -8.5e+35) {
tmp = x1 + (t_4 + (x1 + (t_0 + (t_6 + (t_1 * (((x1 * x1) * 6.0) + ((x1 * 2.0) + (-2.0 * ((x2 * 4.0) - 3.0)))))))));
} else if (x1 <= -2.2e-193) {
tmp = t_8;
} else if (x1 <= 3.4e-218) {
tmp = t_2;
} else if (x1 <= 55000000.0) {
tmp = t_8;
} else if (x1 <= 4e+135) {
tmp = x1 + (9.0 + (x1 + (t_0 + (t_6 + (t_1 * ((x1 * 2.0) + ((x1 * x1) * ((t_5 * 4.0) - 6.0))))))));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * t_7)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) t_3 = x1 * (x1 * 3.0) t_4 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_1) t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1 t_6 = t_3 * t_5 t_7 = x2 * ((2.0 * x2) - 3.0) t_8 = x1 + (t_4 + (x1 + (4.0 * (x1 * t_7)))) tmp = 0 if x1 <= -5.6e+102: tmp = t_2 elif x1 <= -8.5e+35: tmp = x1 + (t_4 + (x1 + (t_0 + (t_6 + (t_1 * (((x1 * x1) * 6.0) + ((x1 * 2.0) + (-2.0 * ((x2 * 4.0) - 3.0))))))))) elif x1 <= -2.2e-193: tmp = t_8 elif x1 <= 3.4e-218: tmp = t_2 elif x1 <= 55000000.0: tmp = t_8 elif x1 <= 4e+135: tmp = x1 + (9.0 + (x1 + (t_0 + (t_6 + (t_1 * ((x1 * 2.0) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))))))) else: tmp = x1 + (x1 * (1.0 + (4.0 * t_7))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_1)) t_5 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_1) t_6 = Float64(t_3 * t_5) t_7 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_8 = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(4.0 * Float64(x1 * t_7))))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = t_2; elseif (x1 <= -8.5e+35) tmp = Float64(x1 + Float64(t_4 + Float64(x1 + Float64(t_0 + Float64(t_6 + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(Float64(x1 * 2.0) + Float64(-2.0 * Float64(Float64(x2 * 4.0) - 3.0)))))))))); elseif (x1 <= -2.2e-193) tmp = t_8; elseif (x1 <= 3.4e-218) tmp = t_2; elseif (x1 <= 55000000.0) tmp = t_8; elseif (x1 <= 4e+135) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(t_6 + Float64(t_1 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0))))))))); else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * t_7)))); 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 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); t_3 = x1 * (x1 * 3.0); t_4 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_1); t_5 = ((t_3 + (2.0 * x2)) - x1) / t_1; t_6 = t_3 * t_5; t_7 = x2 * ((2.0 * x2) - 3.0); t_8 = x1 + (t_4 + (x1 + (4.0 * (x1 * t_7)))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = t_2; elseif (x1 <= -8.5e+35) tmp = x1 + (t_4 + (x1 + (t_0 + (t_6 + (t_1 * (((x1 * x1) * 6.0) + ((x1 * 2.0) + (-2.0 * ((x2 * 4.0) - 3.0))))))))); elseif (x1 <= -2.2e-193) tmp = t_8; elseif (x1 <= 3.4e-218) tmp = t_2; elseif (x1 <= 55000000.0) tmp = t_8; elseif (x1 <= 4e+135) tmp = x1 + (9.0 + (x1 + (t_0 + (t_6 + (t_1 * ((x1 * 2.0) + ((x1 * x1) * ((t_5 * 4.0) - 6.0)))))))); else tmp = x1 + (x1 * (1.0 + (4.0 * t_7))); 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[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $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[(t$95$3 * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(x1 + N[(t$95$4 + N[(x1 + N[(4.0 * N[(x1 * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], t$95$2, If[LessEqual[x1, -8.5e+35], N[(x1 + N[(t$95$4 + N[(x1 + N[(t$95$0 + N[(t$95$6 + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(N[(x1 * 2.0), $MachinePrecision] + N[(-2.0 * N[(N[(x2 * 4.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.2e-193], t$95$8, If[LessEqual[x1, 3.4e-218], t$95$2, If[LessEqual[x1, 55000000.0], t$95$8, If[LessEqual[x1, 4e+135], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(t$95$6 + N[(t$95$1 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := 3 \cdot \frac{\left(t_3 - 2 \cdot x2\right) - x1}{t_1}\\
t_5 := \frac{\left(t_3 + 2 \cdot x2\right) - x1}{t_1}\\
t_6 := t_3 \cdot t_5\\
t_7 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_8 := x1 + \left(t_4 + \left(x1 + 4 \cdot \left(x1 \cdot t_7\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x1 \leq -8.5 \cdot 10^{+35}:\\
\;\;\;\;x1 + \left(t_4 + \left(x1 + \left(t_0 + \left(t_6 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(x1 \cdot 2 + -2 \cdot \left(x2 \cdot 4 - 3\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.2 \cdot 10^{-193}:\\
\;\;\;\;t_8\\
\mathbf{elif}\;x1 \leq 3.4 \cdot 10^{-218}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x1 \leq 55000000:\\
\;\;\;\;t_8\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+135}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t_0 + \left(t_6 + t_1 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(t_5 \cdot 4 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot t_7\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102 or -2.19999999999999977e-193 < x1 < 3.39999999999999986e-218Initial program 52.5%
Taylor expanded in x1 around 0 33.0%
Taylor expanded in x1 around 0 34.8%
fma-def34.8%
fma-neg34.8%
fma-neg34.8%
metadata-eval34.8%
metadata-eval34.8%
Simplified34.8%
Taylor expanded in x2 around 0 59.0%
if -5.60000000000000037e102 < x1 < -8.4999999999999995e35Initial program 99.2%
Taylor expanded in x1 around 0 99.4%
+-commutative99.4%
mul-1-neg99.4%
sub-neg99.4%
Simplified99.4%
add-sqr-sqrt99.4%
pow299.4%
associate-*l*99.2%
pow299.2%
Applied egg-rr99.2%
Taylor expanded in x1 around inf 99.3%
unpow299.3%
rem-square-sqrt99.3%
Simplified99.3%
Taylor expanded in x1 around -inf 99.4%
if -8.4999999999999995e35 < x1 < -2.19999999999999977e-193 or 3.39999999999999986e-218 < x1 < 5.5e7Initial program 98.4%
Taylor expanded in x1 around 0 85.8%
if 5.5e7 < x1 < 3.99999999999999985e135Initial program 99.6%
Taylor expanded in x1 around 0 86.5%
+-commutative86.5%
mul-1-neg86.5%
sub-neg86.5%
Simplified86.5%
Taylor expanded in x1 around inf 86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in x1 around inf 86.9%
if 3.99999999999999985e135 < x1 Initial program 11.1%
Taylor expanded in x1 around 0 11.1%
Taylor expanded in x1 around inf 53.5%
Final simplification72.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x2 (- (* 2.0 x2) 3.0)))
(t_2 (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0)))))
(t_3 (* x1 (* x1 3.0)))
(t_4
(+
x1
(+
9.0
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_3 (/ (- (+ t_3 (* 2.0 x2)) x1) t_0))
(* t_0 (+ (* x1 2.0) (* x1 (+ (* x1 6.0) -4.0))))))))))
(t_5 (* 4.0 t_1)))
(if (<= x1 -5.6e+102)
t_2
(if (<= x1 -3e+47)
t_4
(if (<= x1 -3.9e-194)
(+ (* x1 (+ t_5 -1.0)) (* x2 -6.0))
(if (<= x1 1.35e-221)
t_2
(if (<= x1 80000000.0)
(+
x1
(+
(* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x1 t_1)))))
(if (<= x1 4e+135) t_4 (+ x1 (* x1 (+ 1.0 t_5)))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x2 * ((2.0 * x2) - 3.0);
double t_2 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double t_3 = x1 * (x1 * 3.0);
double t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * (((t_3 + (2.0 * x2)) - x1) / t_0)) + (t_0 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0))))))));
double t_5 = 4.0 * t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_2;
} else if (x1 <= -3e+47) {
tmp = t_4;
} else if (x1 <= -3.9e-194) {
tmp = (x1 * (t_5 + -1.0)) + (x2 * -6.0);
} else if (x1 <= 1.35e-221) {
tmp = t_2;
} else if (x1 <= 80000000.0) {
tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_1))));
} else if (x1 <= 4e+135) {
tmp = t_4;
} else {
tmp = x1 + (x1 * (1.0 + t_5));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x2 * ((2.0d0 * x2) - 3.0d0)
t_2 = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
t_3 = x1 * (x1 * 3.0d0)
t_4 = x1 + (9.0d0 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * (((t_3 + (2.0d0 * x2)) - x1) / t_0)) + (t_0 * ((x1 * 2.0d0) + (x1 * ((x1 * 6.0d0) + (-4.0d0)))))))))
t_5 = 4.0d0 * t_1
if (x1 <= (-5.6d+102)) then
tmp = t_2
else if (x1 <= (-3d+47)) then
tmp = t_4
else if (x1 <= (-3.9d-194)) then
tmp = (x1 * (t_5 + (-1.0d0))) + (x2 * (-6.0d0))
else if (x1 <= 1.35d-221) then
tmp = t_2
else if (x1 <= 80000000.0d0) then
tmp = x1 + ((3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x1 * t_1))))
else if (x1 <= 4d+135) then
tmp = t_4
else
tmp = x1 + (x1 * (1.0d0 + t_5))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x2 * ((2.0 * x2) - 3.0);
double t_2 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double t_3 = x1 * (x1 * 3.0);
double t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * (((t_3 + (2.0 * x2)) - x1) / t_0)) + (t_0 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0))))))));
double t_5 = 4.0 * t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_2;
} else if (x1 <= -3e+47) {
tmp = t_4;
} else if (x1 <= -3.9e-194) {
tmp = (x1 * (t_5 + -1.0)) + (x2 * -6.0);
} else if (x1 <= 1.35e-221) {
tmp = t_2;
} else if (x1 <= 80000000.0) {
tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_1))));
} else if (x1 <= 4e+135) {
tmp = t_4;
} else {
tmp = x1 + (x1 * (1.0 + t_5));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x2 * ((2.0 * x2) - 3.0) t_2 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) t_3 = x1 * (x1 * 3.0) t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * (((t_3 + (2.0 * x2)) - x1) / t_0)) + (t_0 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0)))))))) t_5 = 4.0 * t_1 tmp = 0 if x1 <= -5.6e+102: tmp = t_2 elif x1 <= -3e+47: tmp = t_4 elif x1 <= -3.9e-194: tmp = (x1 * (t_5 + -1.0)) + (x2 * -6.0) elif x1 <= 1.35e-221: tmp = t_2 elif x1 <= 80000000.0: tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_1)))) elif x1 <= 4e+135: tmp = t_4 else: tmp = x1 + (x1 * (1.0 + t_5)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_2 = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_3 * Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_0)) + Float64(t_0 * Float64(Float64(x1 * 2.0) + Float64(x1 * Float64(Float64(x1 * 6.0) + -4.0))))))))) t_5 = Float64(4.0 * t_1) tmp = 0.0 if (x1 <= -5.6e+102) tmp = t_2; elseif (x1 <= -3e+47) tmp = t_4; elseif (x1 <= -3.9e-194) tmp = Float64(Float64(x1 * Float64(t_5 + -1.0)) + Float64(x2 * -6.0)); elseif (x1 <= 1.35e-221) tmp = t_2; elseif (x1 <= 80000000.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x1 * t_1))))); elseif (x1 <= 4e+135) tmp = t_4; else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + t_5))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x2 * ((2.0 * x2) - 3.0); t_2 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); t_3 = x1 * (x1 * 3.0); t_4 = x1 + (9.0 + (x1 + ((x1 * (x1 * x1)) + ((t_3 * (((t_3 + (2.0 * x2)) - x1) / t_0)) + (t_0 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0)))))))); t_5 = 4.0 * t_1; tmp = 0.0; if (x1 <= -5.6e+102) tmp = t_2; elseif (x1 <= -3e+47) tmp = t_4; elseif (x1 <= -3.9e-194) tmp = (x1 * (t_5 + -1.0)) + (x2 * -6.0); elseif (x1 <= 1.35e-221) tmp = t_2; elseif (x1 <= 80000000.0) tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x1 * t_1)))); elseif (x1 <= 4e+135) tmp = t_4; else tmp = x1 + (x1 * (1.0 + t_5)); 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[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(9.0 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 * N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] + -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(4.0 * t$95$1), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], t$95$2, If[LessEqual[x1, -3e+47], t$95$4, If[LessEqual[x1, -3.9e-194], N[(N[(x1 * N[(t$95$5 + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e-221], t$95$2, If[LessEqual[x1, 80000000.0], 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[(4.0 * N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e+135], t$95$4, N[(x1 + N[(x1 * N[(1.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_2 := x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := x1 + \left(9 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_3 \cdot \frac{\left(t_3 + 2 \cdot x2\right) - x1}{t_0} + t_0 \cdot \left(x1 \cdot 2 + x1 \cdot \left(x1 \cdot 6 + -4\right)\right)\right)\right)\right)\right)\\
t_5 := 4 \cdot t_1\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x1 \leq -3 \cdot 10^{+47}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x1 \leq -3.9 \cdot 10^{-194}:\\
\;\;\;\;x1 \cdot \left(t_5 + -1\right) + x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{-221}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x1 \leq 80000000:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_3 - 2 \cdot x2\right) - x1}{t_0} + \left(x1 + 4 \cdot \left(x1 \cdot t_1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+135}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + t_5\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102 or -3.8999999999999999e-194 < x1 < 1.35e-221Initial program 52.5%
Taylor expanded in x1 around 0 33.0%
Taylor expanded in x1 around 0 34.8%
fma-def34.8%
fma-neg34.8%
fma-neg34.8%
metadata-eval34.8%
metadata-eval34.8%
Simplified34.8%
Taylor expanded in x2 around 0 59.0%
if -5.60000000000000037e102 < x1 < -3.0000000000000001e47 or 8e7 < x1 < 3.99999999999999985e135Initial program 99.5%
Taylor expanded in x1 around 0 91.5%
+-commutative91.5%
mul-1-neg91.5%
sub-neg91.5%
Simplified91.5%
Taylor expanded in x1 around inf 91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in x1 around inf 85.3%
+-commutative85.3%
*-commutative85.3%
unpow285.3%
associate-*l*85.3%
*-commutative85.3%
distribute-lft-out85.3%
Simplified85.3%
Taylor expanded in x1 around inf 85.3%
if -3.0000000000000001e47 < x1 < -3.8999999999999999e-194Initial program 97.4%
Taylor expanded in x1 around 0 83.0%
Taylor expanded in x1 around 0 83.0%
fma-def83.1%
fma-neg83.1%
fma-neg83.1%
metadata-eval83.1%
metadata-eval83.1%
Simplified83.1%
Taylor expanded in x1 around 0 83.0%
if 1.35e-221 < x1 < 8e7Initial program 99.6%
Taylor expanded in x1 around 0 87.5%
if 3.99999999999999985e135 < x1 Initial program 11.1%
Taylor expanded in x1 around 0 11.1%
Taylor expanded in x1 around inf 53.5%
Final simplification71.2%
(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 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2)))
(t_4 (* t_2 (+ (* x1 2.0) (* x1 (+ (* x1 6.0) -4.0)))))
(t_5 (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0)))))
(t_6 (* x2 (- (* 2.0 x2) 3.0)))
(t_7 (+ x1 (+ t_3 (+ x1 (* 4.0 (* x1 t_6)))))))
(if (<= x1 -5.6e+102)
t_5
(if (<= x1 -125.0)
(+ x1 (+ t_3 (+ x1 (+ t_0 (+ t_4 (* t_1 (* 2.0 x2)))))))
(if (<= x1 -1.2e-193)
t_7
(if (<= x1 1.55e-221)
t_5
(if (<= x1 75000000.0)
t_7
(if (<= x1 4e+135)
(+
x1
(+
9.0
(+
x1
(+ t_0 (+ (* t_1 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2)) t_4)))))
(+ x1 (* x1 (+ 1.0 (* 4.0 t_6))))))))))))
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 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double t_4 = t_2 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0)));
double t_5 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double t_6 = x2 * ((2.0 * x2) - 3.0);
double t_7 = x1 + (t_3 + (x1 + (4.0 * (x1 * t_6))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_5;
} else if (x1 <= -125.0) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_4 + (t_1 * (2.0 * x2))))));
} else if (x1 <= -1.2e-193) {
tmp = t_7;
} else if (x1 <= 1.55e-221) {
tmp = t_5;
} else if (x1 <= 75000000.0) {
tmp = t_7;
} else if (x1 <= 4e+135) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + t_4))));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * t_6)));
}
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 * 3.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_2)
t_4 = t_2 * ((x1 * 2.0d0) + (x1 * ((x1 * 6.0d0) + (-4.0d0))))
t_5 = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
t_6 = x2 * ((2.0d0 * x2) - 3.0d0)
t_7 = x1 + (t_3 + (x1 + (4.0d0 * (x1 * t_6))))
if (x1 <= (-5.6d+102)) then
tmp = t_5
else if (x1 <= (-125.0d0)) then
tmp = x1 + (t_3 + (x1 + (t_0 + (t_4 + (t_1 * (2.0d0 * x2))))))
else if (x1 <= (-1.2d-193)) then
tmp = t_7
else if (x1 <= 1.55d-221) then
tmp = t_5
else if (x1 <= 75000000.0d0) then
tmp = t_7
else if (x1 <= 4d+135) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + ((t_1 * (((t_1 + (2.0d0 * x2)) - x1) / t_2)) + t_4))))
else
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * t_6)))
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 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double t_4 = t_2 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0)));
double t_5 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double t_6 = x2 * ((2.0 * x2) - 3.0);
double t_7 = x1 + (t_3 + (x1 + (4.0 * (x1 * t_6))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_5;
} else if (x1 <= -125.0) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_4 + (t_1 * (2.0 * x2))))));
} else if (x1 <= -1.2e-193) {
tmp = t_7;
} else if (x1 <= 1.55e-221) {
tmp = t_5;
} else if (x1 <= 75000000.0) {
tmp = t_7;
} else if (x1 <= 4e+135) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + t_4))));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * t_6)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2) t_4 = t_2 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0))) t_5 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) t_6 = x2 * ((2.0 * x2) - 3.0) t_7 = x1 + (t_3 + (x1 + (4.0 * (x1 * t_6)))) tmp = 0 if x1 <= -5.6e+102: tmp = t_5 elif x1 <= -125.0: tmp = x1 + (t_3 + (x1 + (t_0 + (t_4 + (t_1 * (2.0 * x2)))))) elif x1 <= -1.2e-193: tmp = t_7 elif x1 <= 1.55e-221: tmp = t_5 elif x1 <= 75000000.0: tmp = t_7 elif x1 <= 4e+135: tmp = x1 + (9.0 + (x1 + (t_0 + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + t_4)))) else: tmp = x1 + (x1 * (1.0 + (4.0 * t_6))) 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(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) t_4 = Float64(t_2 * Float64(Float64(x1 * 2.0) + Float64(x1 * Float64(Float64(x1 * 6.0) + -4.0)))) t_5 = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))) t_6 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_7 = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(4.0 * Float64(x1 * t_6))))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = t_5; elseif (x1 <= -125.0) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_1 * Float64(2.0 * x2))))))); elseif (x1 <= -1.2e-193) tmp = t_7; elseif (x1 <= 1.55e-221) tmp = t_5; elseif (x1 <= 75000000.0) tmp = t_7; elseif (x1 <= 4e+135) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(Float64(t_1 * Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2)) + t_4))))); else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * t_6)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2); t_4 = t_2 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0))); t_5 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); t_6 = x2 * ((2.0 * x2) - 3.0); t_7 = x1 + (t_3 + (x1 + (4.0 * (x1 * t_6)))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = t_5; elseif (x1 <= -125.0) tmp = x1 + (t_3 + (x1 + (t_0 + (t_4 + (t_1 * (2.0 * x2)))))); elseif (x1 <= -1.2e-193) tmp = t_7; elseif (x1 <= 1.55e-221) tmp = t_5; elseif (x1 <= 75000000.0) tmp = t_7; elseif (x1 <= 4e+135) tmp = x1 + (9.0 + (x1 + (t_0 + ((t_1 * (((t_1 + (2.0 * x2)) - x1) / t_2)) + t_4)))); else tmp = x1 + (x1 * (1.0 + (4.0 * t_6))); end tmp_2 = 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[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] + -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(t$95$3 + N[(x1 + N[(4.0 * N[(x1 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], t$95$5, If[LessEqual[x1, -125.0], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$1 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.2e-193], t$95$7, If[LessEqual[x1, 1.55e-221], t$95$5, If[LessEqual[x1, 75000000.0], t$95$7, If[LessEqual[x1, 4e+135], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(N[(t$95$1 * N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $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 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\\
t_4 := t_2 \cdot \left(x1 \cdot 2 + x1 \cdot \left(x1 \cdot 6 + -4\right)\right)\\
t_5 := x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
t_6 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_7 := x1 + \left(t_3 + \left(x1 + 4 \cdot \left(x1 \cdot t_6\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq -125:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_0 + \left(t_4 + t_1 \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.2 \cdot 10^{-193}:\\
\;\;\;\;t_7\\
\mathbf{elif}\;x1 \leq 1.55 \cdot 10^{-221}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;x1 \leq 75000000:\\
\;\;\;\;t_7\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+135}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t_0 + \left(t_1 \cdot \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_2} + t_4\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot t_6\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102 or -1.2e-193 < x1 < 1.55e-221Initial program 52.5%
Taylor expanded in x1 around 0 33.0%
Taylor expanded in x1 around 0 34.8%
fma-def34.8%
fma-neg34.8%
fma-neg34.8%
metadata-eval34.8%
metadata-eval34.8%
Simplified34.8%
Taylor expanded in x2 around 0 59.0%
if -5.60000000000000037e102 < x1 < -125Initial program 99.4%
Taylor expanded in x1 around 0 92.0%
+-commutative92.0%
mul-1-neg92.0%
sub-neg92.0%
Simplified92.0%
Taylor expanded in x1 around inf 81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in x1 around inf 76.4%
+-commutative76.4%
*-commutative76.4%
unpow276.4%
associate-*l*76.5%
*-commutative76.5%
distribute-lft-out76.5%
Simplified76.5%
Taylor expanded in x1 around 0 81.3%
if -125 < x1 < -1.2e-193 or 1.55e-221 < x1 < 7.5e7Initial program 98.3%
Taylor expanded in x1 around 0 88.3%
if 7.5e7 < x1 < 3.99999999999999985e135Initial program 99.6%
Taylor expanded in x1 around 0 86.5%
+-commutative86.5%
mul-1-neg86.5%
sub-neg86.5%
Simplified86.5%
Taylor expanded in x1 around inf 86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in x1 around inf 76.2%
+-commutative76.2%
*-commutative76.2%
unpow276.2%
associate-*l*76.2%
*-commutative76.2%
distribute-lft-out76.2%
Simplified76.2%
Taylor expanded in x1 around inf 76.2%
if 3.99999999999999985e135 < x1 Initial program 11.1%
Taylor expanded in x1 around 0 11.1%
Taylor expanded in x1 around inf 53.5%
Final simplification71.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0)))))
(t_2 (* x2 (- (* 2.0 x2) 3.0)))
(t_3 (* x1 (* x1 3.0)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_4)))
(t_6 (+ x1 (+ t_5 (+ x1 (* 4.0 (* x1 t_2))))))
(t_7 (* t_4 (+ (* x1 2.0) (* x1 (+ (* x1 6.0) -4.0))))))
(if (<= x1 -5.6e+102)
t_1
(if (<= x1 -105000.0)
(+ x1 (+ t_5 (+ x1 (+ t_0 (+ t_7 (* t_3 (- (* 2.0 x2) x1)))))))
(if (<= x1 -8.5e-192)
t_6
(if (<= x1 2.7e-218)
t_1
(if (<= x1 52000000.0)
t_6
(if (<= x1 4e+135)
(+
x1
(+
9.0
(+
x1
(+ t_0 (+ (* t_3 (/ (- (+ t_3 (* 2.0 x2)) x1) t_4)) t_7)))))
(+ x1 (* x1 (+ 1.0 (* 4.0 t_2))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double t_2 = x2 * ((2.0 * x2) - 3.0);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_4);
double t_6 = x1 + (t_5 + (x1 + (4.0 * (x1 * t_2))));
double t_7 = t_4 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0)));
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_1;
} else if (x1 <= -105000.0) {
tmp = x1 + (t_5 + (x1 + (t_0 + (t_7 + (t_3 * ((2.0 * x2) - x1))))));
} else if (x1 <= -8.5e-192) {
tmp = t_6;
} else if (x1 <= 2.7e-218) {
tmp = t_1;
} else if (x1 <= 52000000.0) {
tmp = t_6;
} else if (x1 <= 4e+135) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_3 * (((t_3 + (2.0 * x2)) - x1) / t_4)) + t_7))));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * 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 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
t_2 = x2 * ((2.0d0 * x2) - 3.0d0)
t_3 = x1 * (x1 * 3.0d0)
t_4 = (x1 * x1) + 1.0d0
t_5 = 3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_4)
t_6 = x1 + (t_5 + (x1 + (4.0d0 * (x1 * t_2))))
t_7 = t_4 * ((x1 * 2.0d0) + (x1 * ((x1 * 6.0d0) + (-4.0d0))))
if (x1 <= (-5.6d+102)) then
tmp = t_1
else if (x1 <= (-105000.0d0)) then
tmp = x1 + (t_5 + (x1 + (t_0 + (t_7 + (t_3 * ((2.0d0 * x2) - x1))))))
else if (x1 <= (-8.5d-192)) then
tmp = t_6
else if (x1 <= 2.7d-218) then
tmp = t_1
else if (x1 <= 52000000.0d0) then
tmp = t_6
else if (x1 <= 4d+135) then
tmp = x1 + (9.0d0 + (x1 + (t_0 + ((t_3 * (((t_3 + (2.0d0 * x2)) - x1) / t_4)) + t_7))))
else
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * 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 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
double t_2 = x2 * ((2.0 * x2) - 3.0);
double t_3 = x1 * (x1 * 3.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_4);
double t_6 = x1 + (t_5 + (x1 + (4.0 * (x1 * t_2))));
double t_7 = t_4 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0)));
double tmp;
if (x1 <= -5.6e+102) {
tmp = t_1;
} else if (x1 <= -105000.0) {
tmp = x1 + (t_5 + (x1 + (t_0 + (t_7 + (t_3 * ((2.0 * x2) - x1))))));
} else if (x1 <= -8.5e-192) {
tmp = t_6;
} else if (x1 <= 2.7e-218) {
tmp = t_1;
} else if (x1 <= 52000000.0) {
tmp = t_6;
} else if (x1 <= 4e+135) {
tmp = x1 + (9.0 + (x1 + (t_0 + ((t_3 * (((t_3 + (2.0 * x2)) - x1) / t_4)) + t_7))));
} else {
tmp = x1 + (x1 * (1.0 + (4.0 * t_2)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) t_2 = x2 * ((2.0 * x2) - 3.0) t_3 = x1 * (x1 * 3.0) t_4 = (x1 * x1) + 1.0 t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_4) t_6 = x1 + (t_5 + (x1 + (4.0 * (x1 * t_2)))) t_7 = t_4 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0))) tmp = 0 if x1 <= -5.6e+102: tmp = t_1 elif x1 <= -105000.0: tmp = x1 + (t_5 + (x1 + (t_0 + (t_7 + (t_3 * ((2.0 * x2) - x1)))))) elif x1 <= -8.5e-192: tmp = t_6 elif x1 <= 2.7e-218: tmp = t_1 elif x1 <= 52000000.0: tmp = t_6 elif x1 <= 4e+135: tmp = x1 + (9.0 + (x1 + (t_0 + ((t_3 * (((t_3 + (2.0 * x2)) - x1) / t_4)) + t_7)))) else: tmp = x1 + (x1 * (1.0 + (4.0 * t_2))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))) t_2 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_4)) t_6 = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(4.0 * Float64(x1 * t_2))))) t_7 = Float64(t_4 * Float64(Float64(x1 * 2.0) + Float64(x1 * Float64(Float64(x1 * 6.0) + -4.0)))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = t_1; elseif (x1 <= -105000.0) tmp = Float64(x1 + Float64(t_5 + Float64(x1 + Float64(t_0 + Float64(t_7 + Float64(t_3 * Float64(Float64(2.0 * x2) - x1))))))); elseif (x1 <= -8.5e-192) tmp = t_6; elseif (x1 <= 2.7e-218) tmp = t_1; elseif (x1 <= 52000000.0) tmp = t_6; elseif (x1 <= 4e+135) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_0 + Float64(Float64(t_3 * Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_4)) + t_7))))); else tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * t_2)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); t_2 = x2 * ((2.0 * x2) - 3.0); t_3 = x1 * (x1 * 3.0); t_4 = (x1 * x1) + 1.0; t_5 = 3.0 * (((t_3 - (2.0 * x2)) - x1) / t_4); t_6 = x1 + (t_5 + (x1 + (4.0 * (x1 * t_2)))); t_7 = t_4 * ((x1 * 2.0) + (x1 * ((x1 * 6.0) + -4.0))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = t_1; elseif (x1 <= -105000.0) tmp = x1 + (t_5 + (x1 + (t_0 + (t_7 + (t_3 * ((2.0 * x2) - x1)))))); elseif (x1 <= -8.5e-192) tmp = t_6; elseif (x1 <= 2.7e-218) tmp = t_1; elseif (x1 <= 52000000.0) tmp = t_6; elseif (x1 <= 4e+135) tmp = x1 + (9.0 + (x1 + (t_0 + ((t_3 * (((t_3 + (2.0 * x2)) - x1) / t_4)) + t_7)))); else tmp = x1 + (x1 * (1.0 + (4.0 * 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[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(t$95$5 + N[(x1 + N[(4.0 * N[(x1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$4 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 6.0), $MachinePrecision] + -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], t$95$1, If[LessEqual[x1, -105000.0], N[(x1 + N[(t$95$5 + N[(x1 + N[(t$95$0 + N[(t$95$7 + N[(t$95$3 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -8.5e-192], t$95$6, If[LessEqual[x1, 2.7e-218], t$95$1, If[LessEqual[x1, 52000000.0], t$95$6, If[LessEqual[x1, 4e+135], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$0 + N[(N[(t$95$3 * N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision] + t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(x1 * N[(1.0 + N[(4.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
t_2 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := x1 \cdot x1 + 1\\
t_5 := 3 \cdot \frac{\left(t_3 - 2 \cdot x2\right) - x1}{t_4}\\
t_6 := x1 + \left(t_5 + \left(x1 + 4 \cdot \left(x1 \cdot t_2\right)\right)\right)\\
t_7 := t_4 \cdot \left(x1 \cdot 2 + x1 \cdot \left(x1 \cdot 6 + -4\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq -105000:\\
\;\;\;\;x1 + \left(t_5 + \left(x1 + \left(t_0 + \left(t_7 + t_3 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -8.5 \cdot 10^{-192}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;x1 \leq 2.7 \cdot 10^{-218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 52000000:\\
\;\;\;\;t_6\\
\mathbf{elif}\;x1 \leq 4 \cdot 10^{+135}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t_0 + \left(t_3 \cdot \frac{\left(t_3 + 2 \cdot x2\right) - x1}{t_4} + t_7\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot t_2\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102 or -8.49999999999999985e-192 < x1 < 2.7e-218Initial program 52.5%
Taylor expanded in x1 around 0 33.0%
Taylor expanded in x1 around 0 34.8%
fma-def34.8%
fma-neg34.8%
fma-neg34.8%
metadata-eval34.8%
metadata-eval34.8%
Simplified34.8%
Taylor expanded in x2 around 0 59.0%
if -5.60000000000000037e102 < x1 < -105000Initial program 99.4%
Taylor expanded in x1 around 0 92.0%
+-commutative92.0%
mul-1-neg92.0%
sub-neg92.0%
Simplified92.0%
Taylor expanded in x1 around inf 81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in x1 around inf 76.4%
+-commutative76.4%
*-commutative76.4%
unpow276.4%
associate-*l*76.5%
*-commutative76.5%
distribute-lft-out76.5%
Simplified76.5%
Taylor expanded in x1 around 0 81.4%
+-commutative92.0%
mul-1-neg92.0%
sub-neg92.0%
Simplified81.4%
if -105000 < x1 < -8.49999999999999985e-192 or 2.7e-218 < x1 < 5.2e7Initial program 98.3%
Taylor expanded in x1 around 0 88.3%
if 5.2e7 < x1 < 3.99999999999999985e135Initial program 99.6%
Taylor expanded in x1 around 0 86.5%
+-commutative86.5%
mul-1-neg86.5%
sub-neg86.5%
Simplified86.5%
Taylor expanded in x1 around inf 86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in x1 around inf 76.2%
+-commutative76.2%
*-commutative76.2%
unpow276.2%
associate-*l*76.2%
*-commutative76.2%
distribute-lft-out76.2%
Simplified76.2%
Taylor expanded in x1 around inf 76.2%
if 3.99999999999999985e135 < x1 Initial program 11.1%
Taylor expanded in x1 around 0 11.1%
Taylor expanded in x1 around inf 53.5%
Final simplification71.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -1.2e+71) (and (not (<= x1 -4.4e-194)) (<= x1 4e-222))) (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0)))) (+ (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0)) (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.2e+71) || (!(x1 <= -4.4e-194) && (x1 <= 4e-222))) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else {
tmp = (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)) + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-1.2d+71)) .or. (.not. (x1 <= (-4.4d-194))) .and. (x1 <= 4d-222)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else
tmp = (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))) + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -1.2e+71) || (!(x1 <= -4.4e-194) && (x1 <= 4e-222))) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else {
tmp = (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)) + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -1.2e+71) or (not (x1 <= -4.4e-194) and (x1 <= 4e-222)): tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) else: tmp = (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)) + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -1.2e+71) || (!(x1 <= -4.4e-194) && (x1 <= 4e-222))) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); else tmp = Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)) + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -1.2e+71) || (~((x1 <= -4.4e-194)) && (x1 <= 4e-222))) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); else tmp = (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)) + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -1.2e+71], And[N[Not[LessEqual[x1, -4.4e-194]], $MachinePrecision], LessEqual[x1, 4e-222]]], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.2 \cdot 10^{+71} \lor \neg \left(x1 \leq -4.4 \cdot 10^{-194}\right) \land x1 \leq 4 \cdot 10^{-222}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right) + x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -1.1999999999999999e71 or -4.4000000000000003e-194 < x1 < 4.00000000000000019e-222Initial program 56.7%
Taylor expanded in x1 around 0 30.1%
Taylor expanded in x1 around 0 32.0%
fma-def32.0%
fma-neg32.0%
fma-neg32.0%
metadata-eval32.0%
metadata-eval32.0%
Simplified32.0%
Taylor expanded in x2 around 0 54.1%
if -1.1999999999999999e71 < x1 < -4.4000000000000003e-194 or 4.00000000000000019e-222 < x1 Initial program 78.1%
Taylor expanded in x1 around 0 59.4%
Taylor expanded in x1 around 0 67.9%
fma-def67.9%
fma-neg67.9%
fma-neg67.9%
metadata-eval67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in x1 around 0 67.9%
Final simplification62.4%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -4e+76) (and (not (<= x1 -3.3e-66)) (<= x1 1.35e-105))) (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0)))) (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -4e+76) || (!(x1 <= -3.3e-66) && (x1 <= 1.35e-105))) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-4d+76)) .or. (.not. (x1 <= (-3.3d-66))) .and. (x1 <= 1.35d-105)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else
tmp = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -4e+76) || (!(x1 <= -3.3e-66) && (x1 <= 1.35e-105))) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -4e+76) or (not (x1 <= -3.3e-66) and (x1 <= 1.35e-105)): tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) else: tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -4e+76) || (!(x1 <= -3.3e-66) && (x1 <= 1.35e-105))) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); else tmp = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -4e+76) || (~((x1 <= -3.3e-66)) && (x1 <= 1.35e-105))) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); else tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -4e+76], And[N[Not[LessEqual[x1, -3.3e-66]], $MachinePrecision], LessEqual[x1, 1.35e-105]]], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4 \cdot 10^{+76} \lor \neg \left(x1 \leq -3.3 \cdot 10^{-66}\right) \land x1 \leq 1.35 \cdot 10^{-105}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
\end{array}
\end{array}
if x1 < -4.0000000000000002e76 or -3.2999999999999999e-66 < x1 < 1.34999999999999996e-105Initial program 69.9%
Taylor expanded in x1 around 0 49.6%
Taylor expanded in x1 around 0 51.0%
fma-def51.0%
fma-neg51.0%
fma-neg51.0%
metadata-eval51.0%
metadata-eval51.0%
Simplified51.0%
Taylor expanded in x2 around 0 63.1%
if -4.0000000000000002e76 < x1 < -3.2999999999999999e-66 or 1.34999999999999996e-105 < x1 Initial program 69.1%
Taylor expanded in x1 around 0 45.1%
Taylor expanded in x1 around 0 57.4%
fma-def57.4%
fma-neg57.4%
fma-neg57.4%
metadata-eval57.4%
metadata-eval57.4%
Simplified57.4%
Taylor expanded in x1 around inf 52.5%
Final simplification58.8%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -5.8e-128) (not (<= x1 1.45e-114))) (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0)) (* x2 -6.0)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -5.8e-128) || !(x1 <= 1.45e-114)) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-5.8d-128)) .or. (.not. (x1 <= 1.45d-114))) then
tmp = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -5.8e-128) || !(x1 <= 1.45e-114)) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -5.8e-128) or not (x1 <= 1.45e-114): tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -5.8e-128) || !(x1 <= 1.45e-114)) tmp = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -5.8e-128) || ~((x1 <= 1.45e-114))) tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -5.8e-128], N[Not[LessEqual[x1, 1.45e-114]], $MachinePrecision]], N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.8 \cdot 10^{-128} \lor \neg \left(x1 \leq 1.45 \cdot 10^{-114}\right):\\
\;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -5.8000000000000001e-128 or 1.44999999999999998e-114 < x1 Initial program 53.9%
Taylor expanded in x1 around 0 32.8%
Taylor expanded in x1 around 0 41.7%
fma-def41.7%
fma-neg41.7%
fma-neg41.7%
metadata-eval41.7%
metadata-eval41.7%
Simplified41.7%
Taylor expanded in x1 around inf 36.9%
if -5.8000000000000001e-128 < x1 < 1.44999999999999998e-114Initial program 98.5%
Taylor expanded in x1 around 0 75.3%
Taylor expanded in x1 around 0 76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in x1 around 0 76.8%
*-commutative76.8%
Simplified76.8%
Final simplification50.9%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -8e-232) (* x2 -6.0) (if (<= x2 8.5e-262) (- x1) (+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -8e-232) {
tmp = x2 * -6.0;
} else if (x2 <= 8.5e-262) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-8d-232)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 8.5d-262) then
tmp = -x1
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -8e-232) {
tmp = x2 * -6.0;
} else if (x2 <= 8.5e-262) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -8e-232: tmp = x2 * -6.0 elif x2 <= 8.5e-262: tmp = -x1 else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -8e-232) tmp = Float64(x2 * -6.0); elseif (x2 <= 8.5e-262) tmp = Float64(-x1); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -8e-232) tmp = x2 * -6.0; elseif (x2 <= 8.5e-262) tmp = -x1; else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -8e-232], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 8.5e-262], (-x1), N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -8 \cdot 10^{-232}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 8.5 \cdot 10^{-262}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -8.0000000000000002e-232Initial program 74.5%
Taylor expanded in x1 around 0 50.3%
Taylor expanded in x1 around 0 37.3%
*-commutative37.3%
Simplified37.3%
Taylor expanded in x1 around 0 37.5%
*-commutative37.5%
Simplified37.5%
if -8.0000000000000002e-232 < x2 < 8.5e-262Initial program 61.5%
Taylor expanded in x1 around 0 48.7%
Taylor expanded in x1 around 0 49.8%
fma-def49.8%
fma-neg49.8%
fma-neg49.8%
metadata-eval49.8%
metadata-eval49.8%
Simplified49.8%
Taylor expanded in x2 around 0 47.0%
distribute-rgt1-in47.0%
metadata-eval47.0%
neg-mul-147.0%
Simplified47.0%
if 8.5e-262 < x2 Initial program 67.3%
Taylor expanded in x1 around 0 45.2%
Taylor expanded in x1 around 0 34.2%
*-commutative34.2%
Simplified34.2%
Final simplification37.2%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.2e-234) (not (<= x2 8.5e-262))) (* x2 -6.0) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.2e-234) || !(x2 <= 8.5e-262)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-1.2d-234)) .or. (.not. (x2 <= 8.5d-262))) then
tmp = x2 * (-6.0d0)
else
tmp = -x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.2e-234) || !(x2 <= 8.5e-262)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.2e-234) or not (x2 <= 8.5e-262): tmp = x2 * -6.0 else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.2e-234) || !(x2 <= 8.5e-262)) tmp = Float64(x2 * -6.0); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.2e-234) || ~((x2 <= 8.5e-262))) tmp = x2 * -6.0; else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.2e-234], N[Not[LessEqual[x2, 8.5e-262]], $MachinePrecision]], N[(x2 * -6.0), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.2 \cdot 10^{-234} \lor \neg \left(x2 \leq 8.5 \cdot 10^{-262}\right):\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -1.1999999999999999e-234 or 8.5e-262 < x2 Initial program 70.7%
Taylor expanded in x1 around 0 47.6%
Taylor expanded in x1 around 0 35.7%
*-commutative35.7%
Simplified35.7%
Taylor expanded in x1 around 0 35.5%
*-commutative35.5%
Simplified35.5%
if -1.1999999999999999e-234 < x2 < 8.5e-262Initial program 61.5%
Taylor expanded in x1 around 0 48.7%
Taylor expanded in x1 around 0 49.8%
fma-def49.8%
fma-neg49.8%
fma-neg49.8%
metadata-eval49.8%
metadata-eval49.8%
Simplified49.8%
Taylor expanded in x2 around 0 47.0%
distribute-rgt1-in47.0%
metadata-eval47.0%
neg-mul-147.0%
Simplified47.0%
Final simplification37.0%
(FPCore (x1 x2) :precision binary64 (- x1))
double code(double x1, double x2) {
return -x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = -x1
end function
public static double code(double x1, double x2) {
return -x1;
}
def code(x1, x2): return -x1
function code(x1, x2) return Float64(-x1) end
function tmp = code(x1, x2) tmp = -x1; end
code[x1_, x2_] := (-x1)
\begin{array}{l}
\\
-x1
\end{array}
Initial program 69.6%
Taylor expanded in x1 around 0 47.7%
Taylor expanded in x1 around 0 53.6%
fma-def53.6%
fma-neg53.6%
fma-neg53.6%
metadata-eval53.6%
metadata-eval53.6%
Simplified53.6%
Taylor expanded in x2 around 0 11.2%
distribute-rgt1-in11.2%
metadata-eval11.2%
neg-mul-111.2%
Simplified11.2%
Final simplification11.2%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 69.6%
Taylor expanded in x1 around 0 47.7%
Taylor expanded in x1 around 0 32.0%
*-commutative32.0%
Simplified32.0%
Taylor expanded in x1 around inf 3.2%
Final simplification3.2%
herbie shell --seed 2024010
(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))))))