
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma x1 (* x1 3.0) (fma 2.0 x2 (- x1))))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2)))
(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_1 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(fma
x1
(* x1 (/ t_0 (/ (fma x1 x1 1.0) 3.0)))
(*
(fma x1 x1 1.0)
(+
x1
(+
(* x1 (* x1 -6.0))
(*
(/ t_0 (fma x1 x1 1.0))
(+
(* x1 (+ -6.0 (/ t_0 (/ (fma x1 x1 1.0) 2.0))))
(* (* x1 x1) 4.0)))))))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = fma(x1, (x1 * 3.0), fma(2.0, x2, -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 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_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, (x1 * (t_0 / (fma(x1, x1, 1.0) / 3.0))), (fma(x1, x1, 1.0) * (x1 + ((x1 * (x1 * -6.0)) + ((t_0 / fma(x1, x1, 1.0)) * ((x1 * (-6.0 + (t_0 / (fma(x1, x1, 1.0) / 2.0)))) + ((x1 * x1) * 4.0))))))));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
function code(x1, x2) t_0 = fma(x1, Float64(x1 * 3.0), fma(2.0, x2, Float64(-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) 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_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, Float64(x1 * Float64(t_0 / Float64(fma(x1, x1, 1.0) / 3.0))), Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(Float64(x1 * Float64(x1 * -6.0)) + Float64(Float64(t_0 / fma(x1, x1, 1.0)) * Float64(Float64(x1 * Float64(-6.0 + Float64(t_0 / Float64(fma(x1, x1, 1.0) / 2.0)))) + Float64(Float64(x1 * x1) * 4.0))))))))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2 + (-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]}, 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$1 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * N[(t$95$0 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(N[(x1 * N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(t$95$0 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\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}\\
\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_1 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot \frac{t_0}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{3}}, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{t_0}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{t_0}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\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 11.3%
*-commutative11.3%
Simplified11.3%
Taylor expanded in x1 around inf 100.0%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3 (fma x1 (* x1 3.0) (fma 2.0 x2 (- x1)))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_0 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(fma
x1
(* x1 (* 3.0 (/ (- (* 3.0 (* x1 x1)) x1) (fma x1 x1 1.0))))
(*
(fma x1 x1 1.0)
(+
x1
(+
(* x1 (* x1 -6.0))
(*
(/ t_3 (fma x1 x1 1.0))
(+
(* x1 (+ -6.0 (/ t_3 (/ (fma x1 x1 1.0) 2.0))))
(* (* x1 x1) 4.0)))))))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = fma(x1, (x1 * 3.0), fma(2.0, x2, -x1));
double tmp;
if ((x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_0 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, (x1 * (3.0 * (((3.0 * (x1 * x1)) - x1) / fma(x1, x1, 1.0)))), (fma(x1, x1, 1.0) * (x1 + ((x1 * (x1 * -6.0)) + ((t_3 / fma(x1, x1, 1.0)) * ((x1 * (-6.0 + (t_3 / (fma(x1, x1, 1.0) / 2.0)))) + ((x1 * x1) * 4.0))))))));
} else {
tmp = x1 + (6.0 * pow(x1, 4.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 = fma(x1, Float64(x1 * 3.0), fma(2.0, x2, Float64(-x1))) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_0 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, Float64(x1 * Float64(3.0 * Float64(Float64(Float64(3.0 * Float64(x1 * x1)) - x1) / fma(x1, x1, 1.0)))), Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(Float64(x1 * Float64(x1 * -6.0)) + Float64(Float64(t_3 / fma(x1, x1, 1.0)) * Float64(Float64(x1 * Float64(-6.0 + Float64(t_3 / Float64(fma(x1, x1, 1.0) / 2.0)))) + Float64(Float64(x1 * x1) * 4.0))))))))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2 + (-x1)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$0 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * N[(3.0 * N[(N[(N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(N[(x1 * N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(t$95$3 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $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}\\
t_3 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t_2 \cdot 4 - 6\right)\right) + t_0 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_0 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot \left(3 \cdot \frac{3 \cdot \left(x1 \cdot x1\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{t_3}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{t_3}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\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%
Taylor expanded in x2 around 0 99.7%
unpow299.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
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 11.3%
*-commutative11.3%
Simplified11.3%
Taylor expanded in x1 around inf 100.0%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* t_1 t_3))
(t_5 (* (* (* x1 2.0) t_3) (- t_3 3.0)))
(t_6 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
(if (<=
(+
x1
(+
(+
x1
(+ (+ (* t_2 (+ t_5 (* (* x1 x1) (- (* t_3 4.0) 6.0)))) t_4) t_0))
t_6))
INFINITY)
(+
x1
(+
t_6
(+
x1
(+
t_0
(+
t_4
(*
t_2
(+
t_5
(*
(* x1 x1)
(-
(*
4.0
(-
(/ (fma (* x1 3.0) x1 (* 2.0 x2)) (fma x1 x1 1.0))
(/ x1 (fma x1 x1 1.0))))
6.0)))))))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_1 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if ((x1 + ((x1 + (((t_2 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= ((double) INFINITY)) {
tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_2 * (t_5 + ((x1 * x1) * ((4.0 * ((fma((x1 * 3.0), x1, (2.0 * x2)) / fma(x1, x1, 1.0)) - (x1 / fma(x1, x1, 1.0)))) - 6.0))))))));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(t_1 * t_3) t_5 = Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) t_6 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Inf) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_2 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(Float64(fma(Float64(x1 * 3.0), x1, Float64(2.0 * x2)) / fma(x1, x1, 1.0)) - Float64(x1 / fma(x1, x1, 1.0)))) - 6.0))))))))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$2 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] - N[(x1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $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 := \left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right)\\
t_6 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(t_5 + \left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right)\right) + t_4\right) + t_0\right)\right) + t_6\right) \leq \infty:\\
\;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_0 + \left(t_4 + t_2 \cdot \left(t_5 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(\frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right)}{\mathsf{fma}\left(x1, x1, 1\right)} - \frac{x1}{\mathsf{fma}\left(x1, x1, 1\right)}\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\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%
fma-def99.5%
div-sub99.5%
fma-def99.5%
Applied egg-rr99.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 11.3%
*-commutative11.3%
Simplified11.3%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* t_1 t_3))
(t_5 (* (* x1 x1) (- (* t_3 4.0) 6.0)))
(t_6 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2)))
(t_7 (- t_3 3.0)))
(if (<=
(+
x1
(+
(+ x1 (+ (+ (* t_2 (+ (* (* (* x1 2.0) t_3) t_7) t_5)) t_4) t_0))
t_6))
INFINITY)
(+
x1
(+
t_6
(+
x1
(+
t_0
(+
t_4
(*
t_2
(+
t_5
(*
t_7
(*
(* x1 2.0)
(*
(- (fma (* x1 3.0) x1 (* 2.0 x2)) x1)
(/ 1.0 (fma x1 x1 1.0))))))))))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_1 * t_3;
double t_5 = (x1 * x1) * ((t_3 * 4.0) - 6.0);
double t_6 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double t_7 = t_3 - 3.0;
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * t_7) + t_5)) + t_4) + t_0)) + t_6)) <= ((double) INFINITY)) {
tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_2 * (t_5 + (t_7 * ((x1 * 2.0) * ((fma((x1 * 3.0), x1, (2.0 * x2)) - x1) * (1.0 / fma(x1, x1, 1.0)))))))))));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(t_1 * t_3) t_5 = Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) t_6 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) t_7 = Float64(t_3 - 3.0) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * t_7) + t_5)) + t_4) + t_0)) + t_6)) <= Inf) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_2 * Float64(t_5 + Float64(t_7 * Float64(Float64(x1 * 2.0) * Float64(Float64(fma(Float64(x1 * 3.0), x1, Float64(2.0 * x2)) - x1) * Float64(1.0 / fma(x1, x1, 1.0)))))))))))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$3 - 3.0), $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] * t$95$7), $MachinePrecision] + t$95$5), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$2 * N[(t$95$5 + N[(t$95$7 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] * N[(1.0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $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 := \left(x1 \cdot x1\right) \cdot \left(t_3 \cdot 4 - 6\right)\\
t_6 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_2}\\
t_7 := t_3 - 3\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot t_7 + t_5\right) + t_4\right) + t_0\right)\right) + t_6\right) \leq \infty:\\
\;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_0 + \left(t_4 + t_2 \cdot \left(t_5 + t_7 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(\left(\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2\right) - x1\right) \cdot \frac{1}{\mathsf{fma}\left(x1, x1, 1\right)}\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\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%
fma-def99.5%
div-inv99.5%
fma-def99.5%
Applied egg-rr99.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 11.3%
*-commutative11.3%
Simplified11.3%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(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 (* 6.0 (pow x1 4.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 + (6.0 * pow(x1, 4.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 + (6.0 * Math.pow(x1, 4.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 + (6.0 * math.pow(x1, 4.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(6.0 * (x1 ^ 4.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 + (6.0 * (x1 ^ 4.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[(6.0 * N[Power[x1, 4.0], $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}\\
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 + 6 \cdot {x1}^{4}\\
\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 11.3%
*-commutative11.3%
Simplified11.3%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -5.6e+102) (not (<= x1 5e+101)))
(+ x1 (* 6.0 (pow x1 4.0)))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* 3.0 t_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) || !(x1 <= 5e+101)) {
tmp = x1 + (6.0 * pow(x1, 4.0));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: 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)) .or. (.not. (x1 <= 5d+101))) then
tmp = x1 + (6.0d0 * (x1 ** 4.0d0))
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (3.0d0 * t_0)))))
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) || !(x1 <= 5e+101)) {
tmp = x1 + (6.0 * Math.pow(x1, 4.0));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_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) or not (x1 <= 5e+101): tmp = x1 + (6.0 * math.pow(x1, 4.0)) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_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) || !(x1 <= 5e+101)) tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_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(3.0 * t_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) || ~((x1 <= 5e+101))) tmp = x1 + (6.0 * (x1 ^ 4.0)); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -5.6e+102], N[Not[LessEqual[x1, 5e+101]], $MachinePrecision]], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$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[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := 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} \lor \neg \left(x1 \leq 5 \cdot 10^{+101}\right):\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_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) + 3 \cdot t_0\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102 or 4.99999999999999989e101 < x1 Initial program 10.1%
Taylor expanded in x1 around inf 20.2%
*-commutative20.2%
Simplified20.2%
Taylor expanded in x1 around inf 100.0%
if -5.60000000000000037e102 < x1 < 4.99999999999999989e101Initial program 99.4%
Taylor expanded in x1 around inf 98.7%
Final simplification99.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -1.42e+49) (not (<= x1 3.9e+64)))
(+ x1 (* 6.0 (pow x1 4.0)))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -1.42e+49) || !(x1 <= 3.9e+64)) {
tmp = x1 + (6.0 * pow(x1, 4.0));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-1.42d+49)) .or. (.not. (x1 <= 3.9d+64))) then
tmp = x1 + (6.0d0 * (x1 ** 4.0d0))
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -1.42e+49) || !(x1 <= 3.9e+64)) {
tmp = x1 + (6.0 * Math.pow(x1, 4.0));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -1.42e+49) or not (x1 <= 3.9e+64): tmp = x1 + (6.0 * math.pow(x1, 4.0)) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -1.42e+49) || !(x1 <= 3.9e+64)) tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -1.42e+49) || ~((x1 <= 3.9e+64))) tmp = x1 + (6.0 * (x1 ^ 4.0)); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -1.42e+49], N[Not[LessEqual[x1, 3.9e+64]], $MachinePrecision]], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
\mathbf{if}\;x1 \leq -1.42 \cdot 10^{+49} \lor \neg \left(x1 \leq 3.9 \cdot 10^{+64}\right):\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_2 + t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.42e49 or 3.8999999999999998e64 < x1 Initial program 27.8%
Taylor expanded in x1 around inf 34.5%
*-commutative34.5%
Simplified34.5%
Taylor expanded in x1 around inf 98.5%
if -1.42e49 < x1 < 3.8999999999999998e64Initial program 99.4%
Taylor expanded in x1 around inf 96.6%
Final simplification97.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0))) (t_1 (+ (* x1 x1) 1.0)))
(if (or (<= x1 -2.9e+63) (not (<= x1 1.3e+64)))
(+ x1 (* 6.0 (pow x1 4.0)))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_1
(+
(* (* x1 x1) (- (* (/ (- (+ t_0 (* 2.0 x2)) x1) t_1) 4.0) 6.0))
(* 4.0 (* x2 (* x1 (- (* 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 tmp;
if ((x1 <= -2.9e+63) || !(x1 <= 1.3e+64)) {
tmp = x1 + (6.0 * pow(x1, 4.0));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + (4.0 * (x2 * (x1 * ((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) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
if ((x1 <= (-2.9d+63)) .or. (.not. (x1 <= 1.3d+64))) then
tmp = x1 + (6.0d0 * (x1 ** 4.0d0))
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0d0 * x2)) - x1) / t_1) * 4.0d0) - 6.0d0)) + (4.0d0 * (x2 * (x1 * ((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 tmp;
if ((x1 <= -2.9e+63) || !(x1 <= 1.3e+64)) {
tmp = x1 + (6.0 * Math.pow(x1, 4.0));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 tmp = 0 if (x1 <= -2.9e+63) or not (x1 <= 1.3e+64): tmp = x1 + (6.0 * math.pow(x1, 4.0)) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + (4.0 * (x2 * (x1 * ((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) tmp = 0.0 if ((x1 <= -2.9e+63) || !(x1 <= 1.3e+64)) tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + Float64(4.0 * Float64(x2 * Float64(x1 * 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; tmp = 0.0; if ((x1 <= -2.9e+63) || ~((x1 <= 1.3e+64))) tmp = x1 + (6.0 * (x1 ^ 4.0)); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + (4.0 * (x2 * (x1 * ((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]}, If[Or[LessEqual[x1, -2.9e+63], N[Not[LessEqual[x1, 1.3e+64]], $MachinePrecision]], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -2.9 \cdot 10^{+63} \lor \neg \left(x1 \leq 1.3 \cdot 10^{+64}\right):\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_0 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1} \cdot 4 - 6\right) + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.8999999999999999e63 or 1.29999999999999998e64 < x1 Initial program 26.5%
Taylor expanded in x1 around inf 33.4%
*-commutative33.4%
Simplified33.4%
Taylor expanded in x1 around inf 98.5%
if -2.8999999999999999e63 < x1 < 1.29999999999999998e64Initial program 99.4%
Taylor expanded in x1 around 0 94.7%
Taylor expanded in x1 around inf 94.4%
Taylor expanded in x1 around 0 94.4%
Final simplification96.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0)))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0))
(t_4
(+
x1
(+
t_2
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_1)
(*
t_0
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* 4.0 (+ 3.0 (/ -1.0 x1))) 6.0)))))))))))
(if (<= x1 -1.15e+99)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 -12.5)
t_4
(if (<= x1 1.56)
(+ x1 (+ t_2 (+ x1 (* 4.0 (* 2.0 (* x2 (* x1 x2)))))))
(if (<= x1 1.4e+154)
t_4
(/ (- (* x1 x1) (* 36.0 (* x2 x2))) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_4 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0))))))));
double tmp;
if (x1 <= -1.15e+99) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -12.5) {
tmp = t_4;
} else if (x1 <= 1.56) {
tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else if (x1 <= 1.4e+154) {
tmp = t_4;
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = 3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)
t_3 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
t_4 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_1) + (t_0 * ((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * (3.0d0 + ((-1.0d0) / x1))) - 6.0d0))))))))
if (x1 <= (-1.15d+99)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= (-12.5d0)) then
tmp = t_4
else if (x1 <= 1.56d0) then
tmp = x1 + (t_2 + (x1 + (4.0d0 * (2.0d0 * (x2 * (x1 * x2))))))
else if (x1 <= 1.4d+154) then
tmp = t_4
else
tmp = ((x1 * x1) - (36.0d0 * (x2 * x2))) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0);
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_4 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0))))))));
double tmp;
if (x1 <= -1.15e+99) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -12.5) {
tmp = t_4;
} else if (x1 <= 1.56) {
tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else if (x1 <= 1.4e+154) {
tmp = t_4;
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0) t_3 = ((t_1 + (2.0 * x2)) - x1) / t_0 t_4 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0)))))))) tmp = 0 if x1 <= -1.15e+99: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= -12.5: tmp = t_4 elif x1 <= 1.56: tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))) elif x1 <= 1.4e+154: tmp = t_4 else: tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) t_4 = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_1) + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(3.0 + Float64(-1.0 / x1))) - 6.0))))))))) tmp = 0.0 if (x1 <= -1.15e+99) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= -12.5) tmp = t_4; elseif (x1 <= 1.56) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(4.0 * Float64(2.0 * Float64(x2 * Float64(x1 * x2))))))); elseif (x1 <= 1.4e+154) tmp = t_4; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(36.0 * Float64(x2 * x2))) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0); t_3 = ((t_1 + (2.0 * x2)) - x1) / t_0; t_4 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_1) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * (3.0 + (-1.0 / x1))) - 6.0)))))))); tmp = 0.0; if (x1 <= -1.15e+99) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= -12.5) tmp = t_4; elseif (x1 <= 1.56) tmp = x1 + (t_2 + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))); elseif (x1 <= 1.4e+154) tmp = t_4; else tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(t$95$2 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$1), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.15e+99], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -12.5], t$95$4, If[LessEqual[x1, 1.56], N[(x1 + N[(t$95$2 + N[(x1 + N[(4.0 * N[(2.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4e+154], t$95$4, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := 3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0}\\
t_3 := \frac{\left(t_1 + 2 \cdot x2\right) - x1}{t_0}\\
t_4 := x1 + \left(t_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_1 + t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \left(3 + \frac{-1}{x1}\right) - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.15 \cdot 10^{+99}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq -12.5:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x1 \leq 1.56:\\
\;\;\;\;x1 + \left(t_2 + \left(x1 + 4 \cdot \left(2 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - 36 \cdot \left(x2 \cdot x2\right)}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.1500000000000001e99Initial program 4.1%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 6.3%
Taylor expanded in x1 around 0 27.7%
if -1.1500000000000001e99 < x1 < -12.5 or 1.5600000000000001 < x1 < 1.4e154Initial program 99.4%
Taylor expanded in x1 around inf 91.3%
Taylor expanded in x1 around inf 91.3%
if -12.5 < x1 < 1.5600000000000001Initial program 99.5%
Taylor expanded in x1 around 0 98.9%
Taylor expanded in x2 around inf 87.7%
unpow287.7%
associate-*l*98.9%
Simplified98.9%
if 1.4e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 7.8%
*-commutative7.8%
Simplified7.8%
flip-+90.9%
*-commutative90.9%
*-commutative90.9%
*-commutative90.9%
Applied egg-rr90.9%
swap-sqr90.9%
metadata-eval90.9%
*-commutative90.9%
Simplified90.9%
Final simplification82.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0))) (t_1 (+ (* x1 x1) 1.0)))
(if (<= x1 -1.15e+99)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 1.4e+154)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_1
(+
(* (* x1 x1) (- (* (/ (- (+ t_0 (* 2.0 x2)) x1) t_1) 4.0) 6.0))
(* 4.0 (* x2 (* x1 (- (* 2.0 x2) 3.0)))))))))))
(/ (- (* x1 x1) (* 36.0 (* x2 x2))) (- x1 (* x2 -6.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -1.15e+99) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 1.4e+154) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))))))));
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
if (x1 <= (-1.15d+99)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= 1.4d+154) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0d0 * x2)) - x1) / t_1) * 4.0d0) - 6.0d0)) + (4.0d0 * (x2 * (x1 * ((2.0d0 * x2) - 3.0d0))))))))))
else
tmp = ((x1 * x1) - (36.0d0 * (x2 * x2))) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -1.15e+99) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 1.4e+154) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))))))));
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -1.15e+99: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= 1.4e+154: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))))))) else: tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -1.15e+99) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= 1.4e+154) 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(3.0 * t_0) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))))))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(36.0 * Float64(x2 * x2))) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -1.15e+99) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= 1.4e+154) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)) + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))))))); else tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -1.15e+99], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4e+154], 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[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -1.15 \cdot 10^{+99}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;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(3 \cdot t_0 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1} \cdot 4 - 6\right) + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - 36 \cdot \left(x2 \cdot x2\right)}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.1500000000000001e99Initial program 4.1%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 6.3%
Taylor expanded in x1 around 0 27.7%
if -1.1500000000000001e99 < x1 < 1.4e154Initial program 99.5%
Taylor expanded in x1 around 0 93.7%
Taylor expanded in x1 around inf 93.4%
Taylor expanded in x1 around 0 92.5%
if 1.4e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 7.8%
*-commutative7.8%
Simplified7.8%
flip-+90.9%
*-commutative90.9%
*-commutative90.9%
*-commutative90.9%
Applied egg-rr90.9%
swap-sqr90.9%
metadata-eval90.9%
*-commutative90.9%
Simplified90.9%
Final simplification79.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0))) (t_1 (+ (* x1 x1) 1.0)))
(if (<= x1 -1.15e+99)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 1.4e+154)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_1
(+
(* (* x1 x1) 6.0)
(*
(- (/ (- (+ t_0 (* 2.0 x2)) x1) t_1) 3.0)
(* (* x1 2.0) (- (* 2.0 x2) x1))))))))))
(/ (- (* x1 x1) (* 36.0 (* x2 x2))) (- x1 (* x2 -6.0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -1.15e+99) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 1.4e+154) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * 6.0) + (((((t_0 + (2.0 * x2)) - x1) / t_1) - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
if (x1 <= (-1.15d+99)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= 1.4d+154) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_1 * (((x1 * x1) * 6.0d0) + (((((t_0 + (2.0d0 * x2)) - x1) / t_1) - 3.0d0) * ((x1 * 2.0d0) * ((2.0d0 * x2) - x1)))))))))
else
tmp = ((x1 * x1) - (36.0d0 * (x2 * x2))) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -1.15e+99) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 1.4e+154) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * 6.0) + (((((t_0 + (2.0 * x2)) - x1) / t_1) - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1)))))))));
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -1.15e+99: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= 1.4e+154: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * 6.0) + (((((t_0 + (2.0 * x2)) - x1) / t_1) - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))) else: tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -1.15e+99) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= 1.4e+154) 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(3.0 * t_0) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * 6.0) + Float64(Float64(Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) - 3.0) * Float64(Float64(x1 * 2.0) * Float64(Float64(2.0 * x2) - x1)))))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(36.0 * Float64(x2 * x2))) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -1.15e+99) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= 1.4e+154) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((x1 * x1) * 6.0) + (((((t_0 + (2.0 * x2)) - x1) / t_1) - 3.0) * ((x1 * 2.0) * ((2.0 * x2) - x1))))))))); else tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -1.15e+99], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4e+154], 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[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(N[(N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -1.15 \cdot 10^{+99}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;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(3 \cdot t_0 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6 + \left(\frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - 36 \cdot \left(x2 \cdot x2\right)}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.1500000000000001e99Initial program 4.1%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 6.3%
Taylor expanded in x1 around 0 27.7%
if -1.1500000000000001e99 < x1 < 1.4e154Initial program 99.5%
Taylor expanded in x1 around 0 93.7%
Taylor expanded in x1 around inf 93.4%
Taylor expanded in x1 around inf 93.3%
if 1.4e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 7.8%
*-commutative7.8%
Simplified7.8%
flip-+90.9%
*-commutative90.9%
*-commutative90.9%
*-commutative90.9%
Applied egg-rr90.9%
swap-sqr90.9%
metadata-eval90.9%
*-commutative90.9%
Simplified90.9%
Final simplification80.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1)))
(t_3
(+
x1
(+
t_2
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_1
(+
(* x1 2.0)
(*
(* x1 x1)
(- (* (/ (- (+ t_0 (* 2.0 x2)) x1) t_1) 4.0) 6.0)))))))))))
(if (<= x1 -5.6e+102)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 -6.5e+48)
t_3
(if (<= x1 1.2e+31)
(+ x1 (+ t_2 (+ x1 (* 4.0 (* x2 (* x1 (- (* 2.0 x2) 3.0)))))))
(if (<= x1 1.4e+154)
t_3
(/ (- (* x1 x1) (* 36.0 (* x2 x2))) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1);
double t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((x1 * 2.0) + ((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0))))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -6.5e+48) {
tmp = t_3;
} else if (x1 <= 1.2e+31) {
tmp = x1 + (t_2 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else if (x1 <= 1.4e+154) {
tmp = t_3;
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = 3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)
t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_1 * ((x1 * 2.0d0) + ((x1 * x1) * (((((t_0 + (2.0d0 * x2)) - x1) / t_1) * 4.0d0) - 6.0d0))))))))
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= (-6.5d+48)) then
tmp = t_3
else if (x1 <= 1.2d+31) then
tmp = x1 + (t_2 + (x1 + (4.0d0 * (x2 * (x1 * ((2.0d0 * x2) - 3.0d0))))))
else if (x1 <= 1.4d+154) then
tmp = t_3
else
tmp = ((x1 * x1) - (36.0d0 * (x2 * x2))) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1);
double t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((x1 * 2.0) + ((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0))))))));
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -6.5e+48) {
tmp = t_3;
} else if (x1 <= 1.2e+31) {
tmp = x1 + (t_2 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else if (x1 <= 1.4e+154) {
tmp = t_3;
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1) t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((x1 * 2.0) + ((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)))))))) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= -6.5e+48: tmp = t_3 elif x1 <= 1.2e+31: tmp = x1 + (t_2 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))) elif x1 <= 1.4e+154: tmp = t_3 else: tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) t_3 = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_1 * Float64(Float64(x1 * 2.0) + Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) * 4.0) - 6.0))))))))) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= -6.5e+48) tmp = t_3; elseif (x1 <= 1.2e+31) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))))))); elseif (x1 <= 1.4e+154) tmp = t_3; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(36.0 * Float64(x2 * x2))) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = 3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1); t_3 = x1 + (t_2 + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * ((x1 * 2.0) + ((x1 * x1) * (((((t_0 + (2.0 * x2)) - x1) / t_1) * 4.0) - 6.0)))))))); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= -6.5e+48) tmp = t_3; elseif (x1 <= 1.2e+31) tmp = x1 + (t_2 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))); elseif (x1 <= 1.4e+154) tmp = t_3; else tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(t$95$2 + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$0), $MachinePrecision] + N[(t$95$1 * N[(N[(x1 * 2.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -6.5e+48], t$95$3, If[LessEqual[x1, 1.2e+31], N[(x1 + N[(t$95$2 + N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4e+154], t$95$3, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\\
t_3 := x1 + \left(t_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_0 + t_1 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(\frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1} \cdot 4 - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq -6.5 \cdot 10^{+48}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x1 \leq 1.2 \cdot 10^{+31}:\\
\;\;\;\;x1 + \left(t_2 + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - 36 \cdot \left(x2 \cdot x2\right)}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x2 around 0 4.3%
Taylor expanded in x1 around 0 26.6%
if -5.60000000000000037e102 < x1 < -6.49999999999999972e48 or 1.19999999999999991e31 < x1 < 1.4e154Initial program 99.5%
Taylor expanded in x1 around 0 82.6%
Taylor expanded in x1 around inf 82.6%
Taylor expanded in x1 around inf 95.3%
*-commutative95.3%
Simplified95.3%
if -6.49999999999999972e48 < x1 < 1.19999999999999991e31Initial program 99.4%
Taylor expanded in x1 around 0 93.0%
if 1.4e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 7.8%
*-commutative7.8%
Simplified7.8%
flip-+90.9%
*-commutative90.9%
*-commutative90.9%
*-commutative90.9%
Applied egg-rr90.9%
swap-sqr90.9%
metadata-eval90.9%
*-commutative90.9%
Simplified90.9%
Final simplification80.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.42e+49)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 1.4e+154)
(+
x1
(+
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(+ x1 (* 4.0 (* 2.0 (* x2 (* x1 x2)))))))
(/ (- (* x1 x1) (* 36.0 (* x2 x2))) (- x1 (* x2 -6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.42e+49) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 1.4e+154) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.42d+49)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= 1.4d+154) then
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) + (x1 + (4.0d0 * (2.0d0 * (x2 * (x1 * x2))))))
else
tmp = ((x1 * x1) - (36.0d0 * (x2 * x2))) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.42e+49) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 1.4e+154) {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2))))));
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.42e+49: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= 1.4e+154: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))) else: tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.42e+49) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= 1.4e+154) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) + Float64(x1 + Float64(4.0 * Float64(2.0 * Float64(x2 * Float64(x1 * x2))))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(36.0 * Float64(x2 * x2))) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.42e+49) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= 1.4e+154) tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) + (x1 + (4.0 * (2.0 * (x2 * (x1 * x2)))))); else tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.42e+49], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4e+154], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(2.0 * N[(x2 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.42 \cdot 10^{+49}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(x1 + 4 \cdot \left(2 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - 36 \cdot \left(x2 \cdot x2\right)}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.42e49Initial program 20.2%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 5.6%
Taylor expanded in x1 around 0 23.7%
if -1.42e49 < x1 < 1.4e154Initial program 99.5%
Taylor expanded in x1 around 0 82.9%
Taylor expanded in x2 around inf 74.3%
unpow274.3%
associate-*l*82.9%
Simplified82.9%
if 1.4e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 7.8%
*-commutative7.8%
Simplified7.8%
flip-+90.9%
*-commutative90.9%
*-commutative90.9%
*-commutative90.9%
Applied egg-rr90.9%
swap-sqr90.9%
metadata-eval90.9%
*-commutative90.9%
Simplified90.9%
Final simplification70.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (- (* 2.0 x2) 3.0))
(t_1 (+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 t_0)) 2.0))))))
(if (<= x1 -1.25e+65)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 -2.1e-202)
t_1
(if (<= x1 4.4e-122)
(+ x1 (+ (+ x1 (* 4.0 (* x2 (* x1 t_0)))) (* 3.0 (* x2 -2.0))))
(if (<= x1 6.2e+131)
t_1
(/ (- (* x1 x1) (* 36.0 (* x2 x2))) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * t_0)) - 2.0)));
double tmp;
if (x1 <= -1.25e+65) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -2.1e-202) {
tmp = t_1;
} else if (x1 <= 4.4e-122) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * t_0)))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 6.2e+131) {
tmp = t_1;
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (2.0d0 * x2) - 3.0d0
t_1 = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * t_0)) - 2.0d0)))
if (x1 <= (-1.25d+65)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= (-2.1d-202)) then
tmp = t_1
else if (x1 <= 4.4d-122) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * (x1 * t_0)))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 6.2d+131) then
tmp = t_1
else
tmp = ((x1 * x1) - (36.0d0 * (x2 * x2))) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) - 3.0;
double t_1 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * t_0)) - 2.0)));
double tmp;
if (x1 <= -1.25e+65) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -2.1e-202) {
tmp = t_1;
} else if (x1 <= 4.4e-122) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * t_0)))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 6.2e+131) {
tmp = t_1;
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) - 3.0 t_1 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * t_0)) - 2.0))) tmp = 0 if x1 <= -1.25e+65: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= -2.1e-202: tmp = t_1 elif x1 <= 4.4e-122: tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * t_0)))) + (3.0 * (x2 * -2.0))) elif x1 <= 6.2e+131: tmp = t_1 else: tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) - 3.0) t_1 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * t_0)) - 2.0)))) tmp = 0.0 if (x1 <= -1.25e+65) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= -2.1e-202) tmp = t_1; elseif (x1 <= 4.4e-122) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * t_0)))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 6.2e+131) tmp = t_1; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(36.0 * Float64(x2 * x2))) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) - 3.0; t_1 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * t_0)) - 2.0))); tmp = 0.0; if (x1 <= -1.25e+65) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= -2.1e-202) tmp = t_1; elseif (x1 <= 4.4e-122) tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * t_0)))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 6.2e+131) tmp = t_1; else tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.25e+65], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.1e-202], t$95$1, If[LessEqual[x1, 4.4e-122], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.2e+131], t$95$1, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot t_0\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -1.25 \cdot 10^{+65}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq -2.1 \cdot 10^{-202}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x1 \leq 4.4 \cdot 10^{-122}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot t_0\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 6.2 \cdot 10^{+131}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - 36 \cdot \left(x2 \cdot x2\right)}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.24999999999999993e65Initial program 17.5%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 5.7%
Taylor expanded in x1 around 0 24.4%
if -1.24999999999999993e65 < x1 < -2.09999999999999985e-202 or 4.4e-122 < x1 < 6.20000000000000032e131Initial program 99.2%
Taylor expanded in x1 around 0 74.8%
Taylor expanded in x1 around 0 70.9%
if -2.09999999999999985e-202 < x1 < 4.4e-122Initial program 99.8%
Taylor expanded in x1 around 0 99.8%
Taylor expanded in x1 around 0 92.3%
*-commutative78.1%
Simplified92.3%
if 6.20000000000000032e131 < x1 Initial program 13.2%
Taylor expanded in x1 around 0 0.7%
Taylor expanded in x1 around 0 7.3%
*-commutative7.3%
Simplified7.3%
flip-+79.5%
*-commutative79.5%
*-commutative79.5%
*-commutative79.5%
Applied egg-rr79.5%
swap-sqr79.5%
metadata-eval79.5%
*-commutative79.5%
Simplified79.5%
Final simplification66.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.3e+65)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 7.2e+131)
(+
x1
(+
(+ x1 (* 4.0 (* x2 (* x1 (- (* 2.0 x2) 3.0)))))
(* 3.0 (- (* x2 -2.0) x1))))
(/ (- (* x1 x1) (* 36.0 (* x2 x2))) (- x1 (* x2 -6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.3e+65) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 7.2e+131) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.3d+65)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= 7.2d+131) then
tmp = x1 + ((x1 + (4.0d0 * (x2 * (x1 * ((2.0d0 * x2) - 3.0d0))))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else
tmp = ((x1 * x1) - (36.0d0 * (x2 * x2))) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.3e+65) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 7.2e+131) {
tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.3e+65: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= 7.2e+131: tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) - x1))) else: tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.3e+65) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= 7.2e+131) tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(36.0 * Float64(x2 * x2))) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.3e+65) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= 7.2e+131) tmp = x1 + ((x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))) + (3.0 * ((x2 * -2.0) - x1))); else tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.3e+65], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.2e+131], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.3 \cdot 10^{+65}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 7.2 \cdot 10^{+131}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - 36 \cdot \left(x2 \cdot x2\right)}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.30000000000000001e65Initial program 17.5%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 5.7%
Taylor expanded in x1 around 0 24.4%
if -1.30000000000000001e65 < x1 < 7.20000000000000063e131Initial program 99.4%
Taylor expanded in x1 around 0 84.3%
Taylor expanded in x1 around 0 83.9%
+-commutative83.9%
neg-mul-183.9%
unsub-neg83.9%
*-commutative83.9%
Simplified83.9%
if 7.20000000000000063e131 < x1 Initial program 13.2%
Taylor expanded in x1 around 0 0.7%
Taylor expanded in x1 around 0 7.3%
*-commutative7.3%
Simplified7.3%
flip-+79.5%
*-commutative79.5%
*-commutative79.5%
*-commutative79.5%
Applied egg-rr79.5%
swap-sqr79.5%
metadata-eval79.5%
*-commutative79.5%
Simplified79.5%
Final simplification70.0%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.42e+49)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 -1.1e-25)
(+ x1 (* x1 (* (* x2 x2) 8.0)))
(if (<= x1 4.8e-71)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 1.45e+154)
(+ x1 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))
(/ (- (* x1 x1) (* 36.0 (* x2 x2))) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.42e+49) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -1.1e-25) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else if (x1 <= 4.8e-71) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 1.45e+154) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.42d+49)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= (-1.1d-25)) then
tmp = x1 + (x1 * ((x2 * x2) * 8.0d0))
else if (x1 <= 4.8d-71) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 1.45d+154) then
tmp = x1 + (x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0)))))
else
tmp = ((x1 * x1) - (36.0d0 * (x2 * x2))) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.42e+49) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -1.1e-25) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else if (x1 <= 4.8e-71) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 1.45e+154) {
tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))));
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.42e+49: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= -1.1e-25: tmp = x1 + (x1 * ((x2 * x2) * 8.0)) elif x1 <= 4.8e-71: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 1.45e+154: tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) else: tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.42e+49) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= -1.1e-25) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * x2) * 8.0))); elseif (x1 <= 4.8e-71) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 1.45e+154) tmp = Float64(x1 + Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(36.0 * Float64(x2 * x2))) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.42e+49) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= -1.1e-25) tmp = x1 + (x1 * ((x2 * x2) * 8.0)); elseif (x1 <= 4.8e-71) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 1.45e+154) tmp = x1 + (x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))); else tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.42e+49], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.1e-25], N[(x1 + N[(x1 * N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.8e-71], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.45e+154], 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], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.42 \cdot 10^{+49}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq -1.1 \cdot 10^{-25}:\\
\;\;\;\;x1 + x1 \cdot \left(\left(x2 \cdot x2\right) \cdot 8\right)\\
\mathbf{elif}\;x1 \leq 4.8 \cdot 10^{-71}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 1.45 \cdot 10^{+154}:\\
\;\;\;\;x1 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - 36 \cdot \left(x2 \cdot x2\right)}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.42e49Initial program 20.2%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 5.6%
Taylor expanded in x1 around 0 23.7%
if -1.42e49 < x1 < -1.1000000000000001e-25Initial program 99.2%
Taylor expanded in x1 around 0 58.2%
Taylor expanded in x2 around inf 52.2%
associate-*r*52.2%
*-commutative52.2%
unpow252.2%
Simplified52.2%
if -1.1000000000000001e-25 < x1 < 4.8e-71Initial program 99.5%
Taylor expanded in x1 around inf 78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in x1 around 0 78.5%
if 4.8e-71 < x1 < 1.4499999999999999e154Initial program 99.4%
Taylor expanded in x1 around 0 49.1%
Taylor expanded in x1 around inf 35.3%
if 1.4499999999999999e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 7.8%
*-commutative7.8%
Simplified7.8%
flip-+90.9%
*-commutative90.9%
*-commutative90.9%
*-commutative90.9%
Applied egg-rr90.9%
swap-sqr90.9%
metadata-eval90.9%
*-commutative90.9%
Simplified90.9%
Final simplification58.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ 1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))))
(if (<= x1 -1.42e+49)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 -1.3e-27)
(+ x1 (+ 9.0 t_0))
(if (<= x1 1.8e-67)
(+ x1 (+ (* x2 -6.0) (* x1 -2.0)))
(if (<= x1 1.4e+154)
(+ x1 t_0)
(/ (- (* x1 x1) (* 36.0 (* x2 x2))) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
double tmp;
if (x1 <= -1.42e+49) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -1.3e-27) {
tmp = x1 + (9.0 + t_0);
} else if (x1 <= 1.8e-67) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 1.4e+154) {
tmp = x1 + t_0;
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 * (1.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
if (x1 <= (-1.42d+49)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= (-1.3d-27)) then
tmp = x1 + (9.0d0 + t_0)
else if (x1 <= 1.8d-67) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
else if (x1 <= 1.4d+154) then
tmp = x1 + t_0
else
tmp = ((x1 * x1) - (36.0d0 * (x2 * x2))) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
double tmp;
if (x1 <= -1.42e+49) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -1.3e-27) {
tmp = x1 + (9.0 + t_0);
} else if (x1 <= 1.8e-67) {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
} else if (x1 <= 1.4e+154) {
tmp = x1 + t_0;
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) tmp = 0 if x1 <= -1.42e+49: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= -1.3e-27: tmp = x1 + (9.0 + t_0) elif x1 <= 1.8e-67: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) elif x1 <= 1.4e+154: tmp = x1 + t_0 else: tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) tmp = 0.0 if (x1 <= -1.42e+49) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= -1.3e-27) tmp = Float64(x1 + Float64(9.0 + t_0)); elseif (x1 <= 1.8e-67) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); elseif (x1 <= 1.4e+154) tmp = Float64(x1 + t_0); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(36.0 * Float64(x2 * x2))) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); tmp = 0.0; if (x1 <= -1.42e+49) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= -1.3e-27) tmp = x1 + (9.0 + t_0); elseif (x1 <= 1.8e-67) tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); elseif (x1 <= 1.4e+154) tmp = x1 + t_0; else tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.42e+49], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.3e-27], N[(x1 + N[(9.0 + t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.8e-67], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4e+154], N[(x1 + t$95$0), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.42 \cdot 10^{+49}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq -1.3 \cdot 10^{-27}:\\
\;\;\;\;x1 + \left(9 + t_0\right)\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{-67}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;x1 + t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - 36 \cdot \left(x2 \cdot x2\right)}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.42e49Initial program 20.2%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 5.6%
Taylor expanded in x1 around 0 23.7%
if -1.42e49 < x1 < -1.30000000000000009e-27Initial program 99.2%
Taylor expanded in x1 around 0 58.2%
Taylor expanded in x1 around inf 52.7%
if -1.30000000000000009e-27 < x1 < 1.8e-67Initial program 99.5%
Taylor expanded in x1 around inf 78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in x1 around 0 78.5%
if 1.8e-67 < x1 < 1.4e154Initial program 99.4%
Taylor expanded in x1 around 0 49.1%
Taylor expanded in x1 around inf 35.3%
if 1.4e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 7.8%
*-commutative7.8%
Simplified7.8%
flip-+90.9%
*-commutative90.9%
*-commutative90.9%
*-commutative90.9%
Applied egg-rr90.9%
swap-sqr90.9%
metadata-eval90.9%
*-commutative90.9%
Simplified90.9%
Final simplification58.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.3e+65)
(+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))
(if (<= x1 7.2e+131)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))
(/ (- (* x1 x1) (* 36.0 (* x2 x2))) (- x1 (* x2 -6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.3e+65) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 7.2e+131) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.3d+65)) then
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= 7.2d+131) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
else
tmp = ((x1 * x1) - (36.0d0 * (x2 * x2))) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.3e+65) {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 7.2e+131) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else {
tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.3e+65: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) elif x1 <= 7.2e+131: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) else: tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.3e+65) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= 7.2e+131) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(36.0 * Float64(x2 * x2))) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.3e+65) tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); elseif (x1 <= 7.2e+131) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); else tmp = ((x1 * x1) - (36.0 * (x2 * x2))) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.3e+65], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.2e+131], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(36.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.3 \cdot 10^{+65}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 7.2 \cdot 10^{+131}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - 36 \cdot \left(x2 \cdot x2\right)}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -1.30000000000000001e65Initial program 17.5%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 5.7%
Taylor expanded in x1 around 0 24.4%
if -1.30000000000000001e65 < x1 < 7.20000000000000063e131Initial program 99.4%
Taylor expanded in x1 around 0 84.3%
Taylor expanded in x1 around 0 75.4%
if 7.20000000000000063e131 < x1 Initial program 13.2%
Taylor expanded in x1 around 0 0.7%
Taylor expanded in x1 around 0 7.3%
*-commutative7.3%
Simplified7.3%
flip-+79.5%
*-commutative79.5%
*-commutative79.5%
*-commutative79.5%
Applied egg-rr79.5%
swap-sqr79.5%
metadata-eval79.5%
*-commutative79.5%
Simplified79.5%
Final simplification64.6%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -5.4e+184) (not (<= x2 3.9e+269))) (+ x1 (* x1 (* (* x2 x2) 8.0))) (+ x1 (+ (* x1 (- (* x2 -12.0) 2.0)) (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -5.4e+184) || !(x2 <= 3.9e+269)) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.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 ((x2 <= (-5.4d+184)) .or. (.not. (x2 <= 3.9d+269))) then
tmp = x1 + (x1 * ((x2 * x2) * 8.0d0))
else
tmp = x1 + ((x1 * ((x2 * (-12.0d0)) - 2.0d0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -5.4e+184) || !(x2 <= 3.9e+269)) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else {
tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -5.4e+184) or not (x2 <= 3.9e+269): tmp = x1 + (x1 * ((x2 * x2) * 8.0)) else: tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -5.4e+184) || !(x2 <= 3.9e+269)) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * x2) * 8.0))); else tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -5.4e+184) || ~((x2 <= 3.9e+269))) tmp = x1 + (x1 * ((x2 * x2) * 8.0)); else tmp = x1 + ((x1 * ((x2 * -12.0) - 2.0)) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -5.4e+184], N[Not[LessEqual[x2, 3.9e+269]], $MachinePrecision]], N[(x1 + N[(x1 * N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -5.4 \cdot 10^{+184} \lor \neg \left(x2 \leq 3.9 \cdot 10^{+269}\right):\\
\;\;\;\;x1 + x1 \cdot \left(\left(x2 \cdot x2\right) \cdot 8\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(x2 \cdot -12 - 2\right) + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x2 < -5.3999999999999998e184 or 3.8999999999999997e269 < x2 Initial program 83.7%
Taylor expanded in x1 around 0 81.0%
Taylor expanded in x2 around inf 68.5%
associate-*r*68.5%
*-commutative68.5%
unpow268.5%
Simplified68.5%
if -5.3999999999999998e184 < x2 < 3.8999999999999997e269Initial program 65.8%
Taylor expanded in x1 around 0 48.4%
Taylor expanded in x2 around 0 41.4%
Taylor expanded in x1 around 0 48.8%
Final simplification51.7%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -7.5e+63)
(* x1 (+ 2.0 (* x2 -12.0)))
(if (or (<= x1 -1.55e-31) (not (<= x1 2.8e-122)))
(+ x1 (* x1 (* (* x2 x2) 8.0)))
(* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -7.5e+63) {
tmp = x1 * (2.0 + (x2 * -12.0));
} else if ((x1 <= -1.55e-31) || !(x1 <= 2.8e-122)) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-7.5d+63)) then
tmp = x1 * (2.0d0 + (x2 * (-12.0d0)))
else if ((x1 <= (-1.55d-31)) .or. (.not. (x1 <= 2.8d-122))) then
tmp = x1 + (x1 * ((x2 * x2) * 8.0d0))
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -7.5e+63) {
tmp = x1 * (2.0 + (x2 * -12.0));
} else if ((x1 <= -1.55e-31) || !(x1 <= 2.8e-122)) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -7.5e+63: tmp = x1 * (2.0 + (x2 * -12.0)) elif (x1 <= -1.55e-31) or not (x1 <= 2.8e-122): tmp = x1 + (x1 * ((x2 * x2) * 8.0)) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -7.5e+63) tmp = Float64(x1 * Float64(2.0 + Float64(x2 * -12.0))); elseif ((x1 <= -1.55e-31) || !(x1 <= 2.8e-122)) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * x2) * 8.0))); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -7.5e+63) tmp = x1 * (2.0 + (x2 * -12.0)); elseif ((x1 <= -1.55e-31) || ~((x1 <= 2.8e-122))) tmp = x1 + (x1 * ((x2 * x2) * 8.0)); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -7.5e+63], N[(x1 * N[(2.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -1.55e-31], N[Not[LessEqual[x1, 2.8e-122]], $MachinePrecision]], N[(x1 + N[(x1 * N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{+63}:\\
\;\;\;\;x1 \cdot \left(2 + x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq -1.55 \cdot 10^{-31} \lor \neg \left(x1 \leq 2.8 \cdot 10^{-122}\right):\\
\;\;\;\;x1 + x1 \cdot \left(\left(x2 \cdot x2\right) \cdot 8\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -7.5000000000000005e63Initial program 17.5%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 5.7%
Taylor expanded in x1 around 0 21.6%
*-commutative21.6%
Simplified21.6%
Taylor expanded in x1 around inf 21.6%
if -7.5000000000000005e63 < x1 < -1.55e-31 or 2.7999999999999999e-122 < x1 Initial program 67.2%
Taylor expanded in x1 around 0 38.6%
Taylor expanded in x2 around inf 40.7%
associate-*r*40.7%
*-commutative40.7%
unpow240.7%
Simplified40.7%
if -1.55e-31 < x1 < 2.7999999999999999e-122Initial program 99.6%
Taylor expanded in x1 around 0 99.6%
Taylor expanded in x1 around 0 60.3%
*-commutative60.3%
Simplified60.3%
Taylor expanded in x1 around 0 60.8%
*-commutative60.8%
Simplified60.8%
Final simplification44.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.3e+65)
(+ x1 (* x2 (- (* x1 -12.0) 6.0)))
(if (or (<= x1 -1.55e-31) (not (<= x1 1.5e-122)))
(+ x1 (* x1 (* (* x2 x2) 8.0)))
(* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.3e+65) {
tmp = x1 + (x2 * ((x1 * -12.0) - 6.0));
} else if ((x1 <= -1.55e-31) || !(x1 <= 1.5e-122)) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.3d+65)) then
tmp = x1 + (x2 * ((x1 * (-12.0d0)) - 6.0d0))
else if ((x1 <= (-1.55d-31)) .or. (.not. (x1 <= 1.5d-122))) then
tmp = x1 + (x1 * ((x2 * x2) * 8.0d0))
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.3e+65) {
tmp = x1 + (x2 * ((x1 * -12.0) - 6.0));
} else if ((x1 <= -1.55e-31) || !(x1 <= 1.5e-122)) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.3e+65: tmp = x1 + (x2 * ((x1 * -12.0) - 6.0)) elif (x1 <= -1.55e-31) or not (x1 <= 1.5e-122): tmp = x1 + (x1 * ((x2 * x2) * 8.0)) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.3e+65) tmp = Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0))); elseif ((x1 <= -1.55e-31) || !(x1 <= 1.5e-122)) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * x2) * 8.0))); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.3e+65) tmp = x1 + (x2 * ((x1 * -12.0) - 6.0)); elseif ((x1 <= -1.55e-31) || ~((x1 <= 1.5e-122))) tmp = x1 + (x1 * ((x2 * x2) * 8.0)); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.3e+65], N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -1.55e-31], N[Not[LessEqual[x1, 1.5e-122]], $MachinePrecision]], N[(x1 + N[(x1 * N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.3 \cdot 10^{+65}:\\
\;\;\;\;x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\\
\mathbf{elif}\;x1 \leq -1.55 \cdot 10^{-31} \lor \neg \left(x1 \leq 1.5 \cdot 10^{-122}\right):\\
\;\;\;\;x1 + x1 \cdot \left(\left(x2 \cdot x2\right) \cdot 8\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -1.30000000000000001e65Initial program 17.5%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 5.7%
Taylor expanded in x1 around 0 21.6%
*-commutative21.6%
Simplified21.6%
Taylor expanded in x2 around inf 21.6%
if -1.30000000000000001e65 < x1 < -1.55e-31 or 1.50000000000000002e-122 < x1 Initial program 67.2%
Taylor expanded in x1 around 0 38.6%
Taylor expanded in x2 around inf 40.7%
associate-*r*40.7%
*-commutative40.7%
unpow240.7%
Simplified40.7%
if -1.55e-31 < x1 < 1.50000000000000002e-122Initial program 99.6%
Taylor expanded in x1 around 0 99.6%
Taylor expanded in x1 around 0 60.3%
*-commutative60.3%
Simplified60.3%
Taylor expanded in x1 around 0 60.8%
*-commutative60.8%
Simplified60.8%
Final simplification44.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.22e+65)
(+ x1 (* x2 (- (* x1 -12.0) 6.0)))
(if (or (<= x1 -5.4e-27) (not (<= x1 8e-72)))
(+ x1 (* x1 (* (* x2 x2) 8.0)))
(+ x1 (+ (* x2 -6.0) (* x1 -2.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.22e+65) {
tmp = x1 + (x2 * ((x1 * -12.0) - 6.0));
} else if ((x1 <= -5.4e-27) || !(x1 <= 8e-72)) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.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.22d+65)) then
tmp = x1 + (x2 * ((x1 * (-12.0d0)) - 6.0d0))
else if ((x1 <= (-5.4d-27)) .or. (.not. (x1 <= 8d-72))) then
tmp = x1 + (x1 * ((x2 * x2) * 8.0d0))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * (-2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.22e+65) {
tmp = x1 + (x2 * ((x1 * -12.0) - 6.0));
} else if ((x1 <= -5.4e-27) || !(x1 <= 8e-72)) {
tmp = x1 + (x1 * ((x2 * x2) * 8.0));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * -2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.22e+65: tmp = x1 + (x2 * ((x1 * -12.0) - 6.0)) elif (x1 <= -5.4e-27) or not (x1 <= 8e-72): tmp = x1 + (x1 * ((x2 * x2) * 8.0)) else: tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.22e+65) tmp = Float64(x1 + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0))); elseif ((x1 <= -5.4e-27) || !(x1 <= 8e-72)) tmp = Float64(x1 + Float64(x1 * Float64(Float64(x2 * x2) * 8.0))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * -2.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.22e+65) tmp = x1 + (x2 * ((x1 * -12.0) - 6.0)); elseif ((x1 <= -5.4e-27) || ~((x1 <= 8e-72))) tmp = x1 + (x1 * ((x2 * x2) * 8.0)); else tmp = x1 + ((x2 * -6.0) + (x1 * -2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.22e+65], N[(x1 + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -5.4e-27], N[Not[LessEqual[x1, 8e-72]], $MachinePrecision]], N[(x1 + N[(x1 * N[(N[(x2 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.22 \cdot 10^{+65}:\\
\;\;\;\;x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\\
\mathbf{elif}\;x1 \leq -5.4 \cdot 10^{-27} \lor \neg \left(x1 \leq 8 \cdot 10^{-72}\right):\\
\;\;\;\;x1 + x1 \cdot \left(\left(x2 \cdot x2\right) \cdot 8\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot -2\right)\\
\end{array}
\end{array}
if x1 < -1.22e65Initial program 17.5%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x2 around 0 5.7%
Taylor expanded in x1 around 0 21.6%
*-commutative21.6%
Simplified21.6%
Taylor expanded in x2 around inf 21.6%
if -1.22e65 < x1 < -5.39999999999999978e-27 or 7.9999999999999997e-72 < x1 Initial program 63.7%
Taylor expanded in x1 around 0 32.0%
Taylor expanded in x2 around inf 41.5%
associate-*r*41.5%
*-commutative41.5%
unpow241.5%
Simplified41.5%
if -5.39999999999999978e-27 < x1 < 7.9999999999999997e-72Initial program 99.5%
Taylor expanded in x1 around inf 78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in x1 around 0 78.5%
Final simplification52.5%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -7.5e-25) (not (<= x1 0.185))) (* x1 (+ 2.0 (* x2 -12.0))) (* x2 -6.0)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -7.5e-25) || !(x1 <= 0.185)) {
tmp = x1 * (2.0 + (x2 * -12.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 <= (-7.5d-25)) .or. (.not. (x1 <= 0.185d0))) then
tmp = x1 * (2.0d0 + (x2 * (-12.0d0)))
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -7.5e-25) || !(x1 <= 0.185)) {
tmp = x1 * (2.0 + (x2 * -12.0));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -7.5e-25) or not (x1 <= 0.185): tmp = x1 * (2.0 + (x2 * -12.0)) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -7.5e-25) || !(x1 <= 0.185)) tmp = Float64(x1 * Float64(2.0 + Float64(x2 * -12.0))); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -7.5e-25) || ~((x1 <= 0.185))) tmp = x1 * (2.0 + (x2 * -12.0)); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -7.5e-25], N[Not[LessEqual[x1, 0.185]], $MachinePrecision]], N[(x1 * N[(2.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -7.5 \cdot 10^{-25} \lor \neg \left(x1 \leq 0.185\right):\\
\;\;\;\;x1 \cdot \left(2 + x2 \cdot -12\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -7.49999999999999989e-25 or 0.185 < x1 Initial program 40.9%
Taylor expanded in x1 around 0 12.2%
Taylor expanded in x2 around 0 4.9%
Taylor expanded in x1 around 0 17.7%
*-commutative17.7%
Simplified17.7%
Taylor expanded in x1 around inf 17.9%
if -7.49999999999999989e-25 < x1 < 0.185Initial program 99.5%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around 0 51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in x1 around 0 51.5%
*-commutative51.5%
Simplified51.5%
Final simplification33.6%
(FPCore (x1 x2) :precision binary64 (+ x1 (* x2 -6.0)))
double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1 + (x2 * (-6.0d0))
end function
public static double code(double x1, double x2) {
return x1 + (x2 * -6.0);
}
def code(x1, x2): return x1 + (x2 * -6.0)
function code(x1, x2) return Float64(x1 + Float64(x2 * -6.0)) end
function tmp = code(x1, x2) tmp = x1 + (x2 * -6.0); end
code[x1_, x2_] := N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x1 + x2 \cdot -6
\end{array}
Initial program 68.4%
Taylor expanded in x1 around 0 53.1%
Taylor expanded in x1 around 0 25.7%
*-commutative25.7%
Simplified25.7%
Final simplification25.7%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 68.4%
Taylor expanded in x1 around 0 53.1%
Taylor expanded in x1 around 0 25.7%
*-commutative25.7%
Simplified25.7%
Taylor expanded in x1 around 0 25.3%
*-commutative25.3%
Simplified25.3%
Final simplification25.3%
(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 68.4%
Taylor expanded in x1 around 0 53.1%
Taylor expanded in x1 around 0 25.7%
*-commutative25.7%
Simplified25.7%
Taylor expanded in x1 around inf 3.3%
Final simplification3.3%
herbie shell --seed 2023230
(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))))))