
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0))
(t_4 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_0
(+
(* (* t_3 (* x1 2.0)) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_2 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_1 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_4 4.0 -6.0)) (* (* x1 (* 2.0 t_4)) (+ t_4 -3.0)))
(fma t_1 t_4 (pow x1 3.0))))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double tmp;
if ((x1 + ((x1 + (((t_0 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_2 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_4, 4.0, -6.0)), ((x1 * (2.0 * t_4)) * (t_4 + -3.0))), fma(t_1, t_4, pow(x1, 3.0)))));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(3.0 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) t_4 = Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_0 * Float64(Float64(Float64(t_3 * Float64(x1 * 2.0)) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_2 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_1 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_4, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_4)) * Float64(t_4 + -3.0))), fma(t_1, t_4, (x1 ^ 3.0)))))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$0 * N[(N[(N[(t$95$3 * N[(x1 * 2.0), $MachinePrecision]), $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$2 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $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[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$4 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$4), $MachinePrecision]), $MachinePrecision] * N[(t$95$4 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$4 + N[Power[x1, 3.0], $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 x1 + 1\\
t_1 := 3 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_0}\\
t_4 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_0 \cdot \left(\left(t\_3 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_2 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0}\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)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_4, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_4\right)\right) \cdot \left(t\_4 + -3\right)\right), \mathsf{fma}\left(t\_1, t\_4, {x1}^{3}\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 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Simplified99.7%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 9.7%
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
(+
x1
(+
(+
(*
t_1
(+
(* (* t_2 (* x1 2.0)) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))))
(if (<= (+ x1 (+ t_3 (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1)))) INFINITY)
(+ x1 (+ t_3 (* 3.0 (/ (- (- (* 3.0 (pow x1 2.0)) (* 2.0 x2)) x1) t_1))))
(+ 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 + (((t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)));
double tmp;
if ((x1 + (t_3 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= ((double) INFINITY)) {
tmp = x1 + (t_3 + (3.0 * ((((3.0 * pow(x1, 2.0)) - (2.0 * x2)) - x1) / t_1)));
} 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 + (((t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)));
double tmp;
if ((x1 + (t_3 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= Double.POSITIVE_INFINITY) {
tmp = x1 + (t_3 + (3.0 * ((((3.0 * Math.pow(x1, 2.0)) - (2.0 * x2)) - x1) / t_1)));
} 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 + (((t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1))) tmp = 0 if (x1 + (t_3 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= math.inf: tmp = x1 + (t_3 + (3.0 * ((((3.0 * math.pow(x1, 2.0)) - (2.0 * x2)) - x1) / t_1))) 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(Float64(t_1 * Float64(Float64(Float64(t_2 * Float64(x1 * 2.0)) * 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)))) tmp = 0.0 if (Float64(x1 + Float64(t_3 + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) <= Inf) tmp = Float64(x1 + Float64(t_3 + Float64(3.0 * Float64(Float64(Float64(Float64(3.0 * (x1 ^ 2.0)) - Float64(2.0 * x2)) - x1) / t_1)))); 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 + (((t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1))); tmp = 0.0; if ((x1 + (t_3 + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= Inf) tmp = x1 + (t_3 + (3.0 * ((((3.0 * (x1 ^ 2.0)) - (2.0 * x2)) - x1) / t_1))); 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[(N[(t$95$1 * N[(N[(N[(t$95$2 * N[(x1 * 2.0), $MachinePrecision]), $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]}, If[LessEqual[N[(x1 + N[(t$95$3 + 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[(t$95$3 + N[(3.0 * N[(N[(N[(N[(3.0 * N[Power[x1, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $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 := x1 + \left(\left(t\_1 \cdot \left(\left(t\_2 \cdot \left(x1 \cdot 2\right)\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)\\
\mathbf{if}\;x1 + \left(t\_3 + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_3 + 3 \cdot \frac{\left(3 \cdot {x1}^{2} - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Taylor expanded in x1 around 0 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 9.7%
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_2
(+
(* (* t_3 (* x1 2.0)) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))))
(if (<=
(+
x1
(+
(+ x1 (+ (+ t_4 (* t_1 t_3)) t_0))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+ x1 (+ (+ x1 (+ t_0 (+ t_4 (* 3.0 t_1)))) (* 3.0 (- (* x2 -2.0) x1))))
(+ 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_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)));
double tmp;
if ((x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + ((x1 + (t_0 + (t_4 + (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)));
double tmp;
if ((x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= Double.POSITIVE_INFINITY) {
tmp = x1 + ((x1 + (t_0 + (t_4 + (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + (6.0 * Math.pow(x1, 4.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 3.0) t_2 = (x1 * x1) + 1.0 t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2 t_4 = t_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))) tmp = 0 if (x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= math.inf: tmp = x1 + ((x1 + (t_0 + (t_4 + (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1))) else: tmp = x1 + (6.0 * math.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_2 * Float64(Float64(Float64(t_3 * Float64(x1 * 2.0)) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(t_4 + Float64(t_1 * t_3)) + t_0)) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(3.0 * t_1)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 3.0); t_2 = (x1 * x1) + 1.0; t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2; t_4 = t_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0))); tmp = 0.0; if ((x1 + ((x1 + ((t_4 + (t_1 * t_3)) + t_0)) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = x1 + ((x1 + (t_0 + (t_4 + (3.0 * t_1)))) + (3.0 * ((x2 * -2.0) - x1))); else tmp = x1 + (6.0 * (x1 ^ 4.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * N[(N[(N[(t$95$3 * N[(x1 * 2.0), $MachinePrecision]), $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]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(t$95$4 + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(3.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $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\_2 \cdot \left(\left(t\_3 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_4 + t\_1 \cdot t\_3\right) + t\_0\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_0 + \left(t\_4 + 3 \cdot t\_1\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 - x1\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 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Taylor expanded in x1 around inf 97.7%
Taylor expanded in x1 around 0 99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 9.7%
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 (<= x1 -1.5e+103)
(+ (* x2 -6.0) (* x1 (+ (* x1 (+ 9.0 (* x1 -19.0))) -1.0)))
(if (<= x1 1e+134)
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_1
(+
(* (* t_2 (* x1 2.0)) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* 3.0 t_0))))
(* 3.0 (- (* x2 -2.0) x1))))
(+
x1
(+
(* x2 -6.0)
(* x1 (- (* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))) 2.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.5e+103) {
tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0));
} else if (x1 <= 1e+134) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.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.5d+103)) then
tmp = (x2 * (-6.0d0)) + (x1 * ((x1 * (9.0d0 + (x1 * (-19.0d0)))) + (-1.0d0)))
else if (x1 <= 1d+134) then
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_2 * (x1 * 2.0d0)) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (3.0d0 * t_0)))) + (3.0d0 * ((x2 * (-2.0d0)) - x1)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0)))))) - 2.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.5e+103) {
tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0));
} else if (x1 <= 1e+134) {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0)))) + (3.0 * ((x2 * -2.0) - x1)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.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.5e+103: tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0)) elif x1 <= 1e+134: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0)))) + (3.0 * ((x2 * -2.0) - x1))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.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.5e+103) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))) + -1.0))); elseif (x1 <= 1e+134) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(Float64(t_2 * Float64(x1 * 2.0)) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(3.0 * t_0)))) + Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0))))) - 2.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.5e+103) tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0)); elseif (x1 <= 1e+134) tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_0)))) + (3.0 * ((x2 * -2.0) - x1))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -1.5e+103], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+134], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(N[(N[(t$95$2 * N[(x1 * 2.0), $MachinePrecision]), $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] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $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.5 \cdot 10^{+103}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(9 + x1 \cdot -19\right) + -1\right)\\
\mathbf{elif}\;x1 \leq 10^{+134}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_1 \cdot \left(\left(t\_2 \cdot \left(x1 \cdot 2\right)\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) + 3 \cdot \left(x2 \cdot -2 - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.5e103Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.8%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -1.5e103 < x1 < 9.99999999999999921e133Initial program 99.3%
Taylor expanded in x1 around inf 97.6%
Taylor expanded in x1 around 0 99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
if 9.99999999999999921e133 < x1 Initial program 14.6%
Taylor expanded in x1 around inf 14.6%
Taylor expanded in x1 around 0 92.7%
Final simplification98.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (+ (* x1 (+ 9.0 (* x1 -19.0))) -1.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_2)
(*
t_0
(+
(* (* x1 x1) (- (* (/ (- (+ t_2 (* 2.0 x2)) x1) t_0) 4.0) 6.0))
(* x1 2.0))))))))))
(if (<= x1 -1.5e+103)
(+ (* x2 -6.0) t_1)
(if (<= x1 -12000000000.0)
t_3
(if (<= x1 260.0)
(+
(* x2 -6.0)
(+
t_1
(*
x2
(+
(* 8.0 (* x1 x2))
(* x1 (- (* x1 (+ 12.0 (* x1 24.0))) 12.0))))))
(if (<= x1 2e+132)
t_3
(+
x1
(+
(* x2 -6.0)
(*
x1
(-
(* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0)))))
2.0))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) + (t_0 * (((x1 * x1) * (((((t_2 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (x1 * 2.0)))))));
double tmp;
if (x1 <= -1.5e+103) {
tmp = (x2 * -6.0) + t_1;
} else if (x1 <= -12000000000.0) {
tmp = t_3;
} else if (x1 <= 260.0) {
tmp = (x2 * -6.0) + (t_1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * (12.0 + (x1 * 24.0))) - 12.0)))));
} else if (x1 <= 2e+132) {
tmp = t_3;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.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) + 1.0d0
t_1 = x1 * ((x1 * (9.0d0 + (x1 * (-19.0d0)))) + (-1.0d0))
t_2 = x1 * (x1 * 3.0d0)
t_3 = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_2) + (t_0 * (((x1 * x1) * (((((t_2 + (2.0d0 * x2)) - x1) / t_0) * 4.0d0) - 6.0d0)) + (x1 * 2.0d0)))))))
if (x1 <= (-1.5d+103)) then
tmp = (x2 * (-6.0d0)) + t_1
else if (x1 <= (-12000000000.0d0)) then
tmp = t_3
else if (x1 <= 260.0d0) then
tmp = (x2 * (-6.0d0)) + (t_1 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * (12.0d0 + (x1 * 24.0d0))) - 12.0d0)))))
else if (x1 <= 2d+132) then
tmp = t_3
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0)))))) - 2.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 * (9.0 + (x1 * -19.0))) + -1.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) + (t_0 * (((x1 * x1) * (((((t_2 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (x1 * 2.0)))))));
double tmp;
if (x1 <= -1.5e+103) {
tmp = (x2 * -6.0) + t_1;
} else if (x1 <= -12000000000.0) {
tmp = t_3;
} else if (x1 <= 260.0) {
tmp = (x2 * -6.0) + (t_1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * (12.0 + (x1 * 24.0))) - 12.0)))));
} else if (x1 <= 2e+132) {
tmp = t_3;
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0) t_2 = x1 * (x1 * 3.0) t_3 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) + (t_0 * (((x1 * x1) * (((((t_2 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (x1 * 2.0))))))) tmp = 0 if x1 <= -1.5e+103: tmp = (x2 * -6.0) + t_1 elif x1 <= -12000000000.0: tmp = t_3 elif x1 <= 260.0: tmp = (x2 * -6.0) + (t_1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * (12.0 + (x1 * 24.0))) - 12.0))))) elif x1 <= 2e+132: tmp = t_3 else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))) + -1.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_2) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + Float64(x1 * 2.0)))))))) tmp = 0.0 if (x1 <= -1.5e+103) tmp = Float64(Float64(x2 * -6.0) + t_1); elseif (x1 <= -12000000000.0) tmp = t_3; elseif (x1 <= 260.0) tmp = Float64(Float64(x2 * -6.0) + Float64(t_1 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * Float64(12.0 + Float64(x1 * 24.0))) - 12.0)))))); elseif (x1 <= 2e+132) tmp = t_3; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0))))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0); t_2 = x1 * (x1 * 3.0); t_3 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_2) + (t_0 * (((x1 * x1) * (((((t_2 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + (x1 * 2.0))))))); tmp = 0.0; if (x1 <= -1.5e+103) tmp = (x2 * -6.0) + t_1; elseif (x1 <= -12000000000.0) tmp = t_3; elseif (x1 <= 260.0) tmp = (x2 * -6.0) + (t_1 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * (12.0 + (x1 * 24.0))) - 12.0))))); elseif (x1 <= 2e+132) tmp = t_3; else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.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[(N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * t$95$2), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.5e+103], N[(N[(x2 * -6.0), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x1, -12000000000.0], t$95$3, If[LessEqual[x1, 260.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$1 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(12.0 + N[(x1 * 24.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+132], t$95$3, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot \left(9 + x1 \cdot -19\right) + -1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_2 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_0} \cdot 4 - 6\right) + x1 \cdot 2\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+103}:\\
\;\;\;\;x2 \cdot -6 + t\_1\\
\mathbf{elif}\;x1 \leq -12000000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 260:\\
\;\;\;\;x2 \cdot -6 + \left(t\_1 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot \left(12 + x1 \cdot 24\right) - 12\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+132}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.5e103Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.8%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -1.5e103 < x1 < -1.2e10 or 260 < x1 < 1.99999999999999998e132Initial program 99.6%
Taylor expanded in x1 around inf 99.6%
Taylor expanded in x1 around 0 87.9%
neg-mul-187.9%
+-commutative87.9%
unsub-neg87.9%
Simplified87.9%
Taylor expanded in x1 around inf 97.1%
*-commutative97.1%
Simplified97.1%
if -1.2e10 < x1 < 260Initial program 99.3%
Simplified99.7%
Taylor expanded in x1 around 0 71.6%
Taylor expanded in x2 around 0 86.3%
Taylor expanded in x2 around 0 96.9%
if 1.99999999999999998e132 < x1 Initial program 14.6%
Taylor expanded in x1 around inf 14.6%
Taylor expanded in x1 around 0 92.7%
Final simplification96.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (<= x1 -1.5e+103)
(+ (* x2 -6.0) (* x1 (+ (* x1 (+ 9.0 (* x1 -19.0))) -1.0)))
(if (<= x1 2e+130)
(+
x1
(+
(* 3.0 (- (* x2 -2.0) x1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* 3.0 t_0)
(*
t_1
(+ (* (* t_2 (* x1 2.0)) (- t_2 3.0)) (* (* x1 x1) 6.0))))))))
(+
x1
(+
(* x2 -6.0)
(* x1 (- (* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))) 2.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.5e+103) {
tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0));
} else if (x1 <= 2e+130) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.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.5d+103)) then
tmp = (x2 * (-6.0d0)) + (x1 * ((x1 * (9.0d0 + (x1 * (-19.0d0)))) + (-1.0d0)))
else if (x1 <= 2d+130) then
tmp = x1 + ((3.0d0 * ((x2 * (-2.0d0)) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0d0 * t_0) + (t_1 * (((t_2 * (x1 * 2.0d0)) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0)))))) - 2.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.5e+103) {
tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0));
} else if (x1 <= 2e+130) {
tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.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.5e+103: tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0)) elif x1 <= 2e+130: tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.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.5e+103) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))) + -1.0))); elseif (x1 <= 2e+130) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) - x1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(3.0 * t_0) + Float64(t_1 * Float64(Float64(Float64(t_2 * Float64(x1 * 2.0)) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0))))) - 2.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.5e+103) tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0)); elseif (x1 <= 2e+130) tmp = x1 + ((3.0 * ((x2 * -2.0) - x1)) + (x1 + ((x1 * (x1 * x1)) + ((3.0 * t_0) + (t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -1.5e+103], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+130], N[(x1 + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] - x1), $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[(t$95$2 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $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.5 \cdot 10^{+103}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(9 + x1 \cdot -19\right) + -1\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+130}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2 - x1\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t\_0 + t\_1 \cdot \left(\left(t\_2 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.5e103Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.8%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -1.5e103 < x1 < 2.0000000000000001e130Initial program 99.3%
Taylor expanded in x1 around inf 97.6%
Taylor expanded in x1 around 0 99.4%
neg-mul-199.4%
unsub-neg99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x1 around inf 95.6%
if 2.0000000000000001e130 < x1 Initial program 14.6%
Taylor expanded in x1 around inf 14.6%
Taylor expanded in x1 around 0 92.7%
Final simplification95.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* x1 (+ 9.0 (* x1 -19.0))) -1.0))))
(if (<= x1 -1.7e+100)
(+ (* x2 -6.0) t_0)
(if (<= x1 3.8e+19)
(+
(* x2 -6.0)
(+
t_0
(*
x2
(+ (* 8.0 (* x1 x2)) (* x1 (- (* x1 (+ 12.0 (* x1 24.0))) 12.0))))))
(+
x1
(+
(* x2 -6.0)
(* x1 (- (* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))) 2.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0);
double tmp;
if (x1 <= -1.7e+100) {
tmp = (x2 * -6.0) + t_0;
} else if (x1 <= 3.8e+19) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * (12.0 + (x1 * 24.0))) - 12.0)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 * ((x1 * (9.0d0 + (x1 * (-19.0d0)))) + (-1.0d0))
if (x1 <= (-1.7d+100)) then
tmp = (x2 * (-6.0d0)) + t_0
else if (x1 <= 3.8d+19) then
tmp = (x2 * (-6.0d0)) + (t_0 + (x2 * ((8.0d0 * (x1 * x2)) + (x1 * ((x1 * (12.0d0 + (x1 * 24.0d0))) - 12.0d0)))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0)))))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0);
double tmp;
if (x1 <= -1.7e+100) {
tmp = (x2 * -6.0) + t_0;
} else if (x1 <= 3.8e+19) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * (12.0 + (x1 * 24.0))) - 12.0)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0) tmp = 0 if x1 <= -1.7e+100: tmp = (x2 * -6.0) + t_0 elif x1 <= 3.8e+19: tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * (12.0 + (x1 * 24.0))) - 12.0))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.0))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))) + -1.0)) tmp = 0.0 if (x1 <= -1.7e+100) tmp = Float64(Float64(x2 * -6.0) + t_0); elseif (x1 <= 3.8e+19) tmp = Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * Float64(Float64(x1 * Float64(12.0 + Float64(x1 * 24.0))) - 12.0)))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0))))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0); tmp = 0.0; if (x1 <= -1.7e+100) tmp = (x2 * -6.0) + t_0; elseif (x1 <= 3.8e+19) tmp = (x2 * -6.0) + (t_0 + (x2 * ((8.0 * (x1 * x2)) + (x1 * ((x1 * (12.0 + (x1 * 24.0))) - 12.0))))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.7e+100], N[(N[(x2 * -6.0), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[x1, 3.8e+19], N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(12.0 + N[(x1 * 24.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot \left(9 + x1 \cdot -19\right) + -1\right)\\
\mathbf{if}\;x1 \leq -1.7 \cdot 10^{+100}:\\
\;\;\;\;x2 \cdot -6 + t\_0\\
\mathbf{elif}\;x1 \leq 3.8 \cdot 10^{+19}:\\
\;\;\;\;x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot \left(x1 \cdot \left(12 + x1 \cdot 24\right) - 12\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.69999999999999997e100Initial program 5.1%
Simplified5.1%
Taylor expanded in x1 around 0 79.5%
Taylor expanded in x2 around 0 95.2%
*-commutative95.2%
Simplified95.2%
if -1.69999999999999997e100 < x1 < 3.8e19Initial program 99.3%
Simplified99.7%
Taylor expanded in x1 around 0 64.5%
Taylor expanded in x2 around 0 77.9%
Taylor expanded in x2 around 0 87.1%
if 3.8e19 < x1 Initial program 43.4%
Taylor expanded in x1 around inf 41.9%
Taylor expanded in x1 around 0 72.9%
Final simplification84.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.5e+103)
(+ (* x2 -6.0) (* x1 (+ (* x1 (+ 9.0 (* x1 -19.0))) -1.0)))
(if (<= x1 1.3e-7)
(+ x1 (+ (* x1 -2.0) (* x2 (- (+ (* 8.0 (* x1 x2)) (* x1 -12.0)) 6.0))))
(+
x1
(+
(* x2 -6.0)
(* x1 (- (* x1 (+ (* x1 3.0) (* 3.0 (- 3.0 (* x2 -2.0))))) 2.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.5e+103) {
tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0));
} else if (x1 <= 1.3e-7) {
tmp = x1 + ((x1 * -2.0) + (x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 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.5d+103)) then
tmp = (x2 * (-6.0d0)) + (x1 * ((x1 * (9.0d0 + (x1 * (-19.0d0)))) + (-1.0d0)))
else if (x1 <= 1.3d-7) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (((8.0d0 * (x1 * x2)) + (x1 * (-12.0d0))) - 6.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x1 * ((x1 * 3.0d0) + (3.0d0 * (3.0d0 - (x2 * (-2.0d0)))))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.5e+103) {
tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0));
} else if (x1 <= 1.3e-7) {
tmp = x1 + ((x1 * -2.0) + (x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.5e+103: tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0)) elif x1 <= 1.3e-7: tmp = x1 + ((x1 * -2.0) + (x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.5e+103) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))) + -1.0))); elseif (x1 <= 1.3e-7) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * -12.0)) - 6.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 * 3.0) + Float64(3.0 * Float64(3.0 - Float64(x2 * -2.0))))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.5e+103) tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0)); elseif (x1 <= 1.3e-7) tmp = x1 + ((x1 * -2.0) + (x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((x1 * ((x1 * 3.0) + (3.0 * (3.0 - (x2 * -2.0))))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.5e+103], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.3e-7], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * -12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + N[(3.0 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+103}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(9 + x1 \cdot -19\right) + -1\right)\\
\mathbf{elif}\;x1 \leq 1.3 \cdot 10^{-7}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot -12\right) - 6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(x1 \cdot 3 + 3 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x1 < -1.5e103Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.8%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -1.5e103 < x1 < 1.29999999999999999e-7Initial program 99.3%
Simplified99.7%
Taylor expanded in x1 around 0 76.9%
Taylor expanded in x2 around 0 85.6%
if 1.29999999999999999e-7 < x1 Initial program 47.5%
Taylor expanded in x1 around inf 41.3%
Taylor expanded in x1 around 0 69.9%
Final simplification83.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.5e+103)
(+ (* x2 -6.0) (* x1 (+ (* x1 (+ 9.0 (* x1 -19.0))) -1.0)))
(if (or (<= x1 -9.2e-248) (not (<= x1 8e-289)))
(+ (* x2 -6.0) (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0)))
(- (* x2 -6.0) x1))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.5e+103) {
tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0));
} else if ((x1 <= -9.2e-248) || !(x1 <= 8e-289)) {
tmp = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0));
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.5d+103)) then
tmp = (x2 * (-6.0d0)) + (x1 * ((x1 * (9.0d0 + (x1 * (-19.0d0)))) + (-1.0d0)))
else if ((x1 <= (-9.2d-248)) .or. (.not. (x1 <= 8d-289))) then
tmp = (x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0)))
else
tmp = (x2 * (-6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.5e+103) {
tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0));
} else if ((x1 <= -9.2e-248) || !(x1 <= 8e-289)) {
tmp = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0));
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.5e+103: tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0)) elif (x1 <= -9.2e-248) or not (x1 <= 8e-289): tmp = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)) else: tmp = (x2 * -6.0) - x1 return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.5e+103) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))) + -1.0))); elseif ((x1 <= -9.2e-248) || !(x1 <= 8e-289)) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0))); else tmp = Float64(Float64(x2 * -6.0) - x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.5e+103) tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0)); elseif ((x1 <= -9.2e-248) || ~((x1 <= 8e-289))) tmp = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)); else tmp = (x2 * -6.0) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.5e+103], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -9.2e-248], N[Not[LessEqual[x1, 8e-289]], $MachinePrecision]], 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] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+103}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(9 + x1 \cdot -19\right) + -1\right)\\
\mathbf{elif}\;x1 \leq -9.2 \cdot 10^{-248} \lor \neg \left(x1 \leq 8 \cdot 10^{-289}\right):\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\end{array}
\end{array}
if x1 < -1.5e103Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.8%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -1.5e103 < x1 < -9.2000000000000001e-248 or 8.0000000000000001e-289 < x1 Initial program 81.6%
Simplified81.9%
Taylor expanded in x1 around 0 62.1%
if -9.2000000000000001e-248 < x1 < 8.0000000000000001e-289Initial program 99.6%
Taylor expanded in x1 around inf 95.8%
Taylor expanded in x1 around 0 95.8%
Taylor expanded in x1 around 0 95.9%
*-commutative95.9%
neg-mul-195.9%
unsub-neg95.9%
Simplified95.9%
Final simplification70.6%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.5) (not (<= x2 6.1e+172))) (+ x1 (+ (* x1 -2.0) (* x2 (- (+ (* 8.0 (* x1 x2)) (* x1 -12.0)) 6.0)))) (+ x1 (+ (* x2 -6.0) (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.5) || !(x2 <= 6.1e+172)) {
tmp = x1 + ((x1 * -2.0) + (x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-1.5d0)) .or. (.not. (x2 <= 6.1d+172))) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (((8.0d0 * (x1 * x2)) + (x1 * (-12.0d0))) - 6.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.5) || !(x2 <= 6.1e+172)) {
tmp = x1 + ((x1 * -2.0) + (x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.5) or not (x2 <= 6.1e+172): tmp = x1 + ((x1 * -2.0) + (x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.5) || !(x2 <= 6.1e+172)) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(x1 * -12.0)) - 6.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.5) || ~((x2 <= 6.1e+172))) tmp = x1 + ((x1 * -2.0) + (x2 * (((8.0 * (x1 * x2)) + (x1 * -12.0)) - 6.0))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.5], N[Not[LessEqual[x2, 6.1e+172]], $MachinePrecision]], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * -12.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.5 \lor \neg \left(x2 \leq 6.1 \cdot 10^{+172}\right):\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(\left(8 \cdot \left(x1 \cdot x2\right) + x1 \cdot -12\right) - 6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x2 < -1.5 or 6.0999999999999998e172 < x2 Initial program 77.4%
Simplified77.5%
Taylor expanded in x1 around 0 65.0%
Taylor expanded in x2 around 0 79.4%
if -1.5 < x2 < 6.0999999999999998e172Initial program 68.4%
Taylor expanded in x1 around inf 68.5%
Taylor expanded in x1 around 0 77.4%
Final simplification78.0%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.5) (not (<= x2 6.5e+220))) (+ (* x2 -6.0) (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0))) (+ x1 (+ (* x2 -6.0) (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.5) || !(x2 <= 6.5e+220)) {
tmp = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-1.5d0)) .or. (.not. (x2 <= 6.5d+220))) then
tmp = (x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.5) || !(x2 <= 6.5e+220)) {
tmp = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.5) or not (x2 <= 6.5e+220): tmp = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.5) || !(x2 <= 6.5e+220)) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.5) || ~((x2 <= 6.5e+220))) tmp = (x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)); else tmp = x1 + ((x2 * -6.0) + (x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.5], N[Not[LessEqual[x2, 6.5e+220]], $MachinePrecision]], 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] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.5 \lor \neg \left(x2 \leq 6.5 \cdot 10^{+220}\right):\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x2 < -1.5 or 6.5000000000000001e220 < x2 Initial program 79.5%
Simplified79.6%
Taylor expanded in x1 around 0 67.1%
if -1.5 < x2 < 6.5000000000000001e220Initial program 67.8%
Taylor expanded in x1 around inf 66.7%
Taylor expanded in x1 around 0 77.0%
Final simplification74.0%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.5e+103)
(+ (* x2 -6.0) (* x1 (+ (* x1 (+ 9.0 (* x1 -19.0))) -1.0)))
(if (or (<= x1 -6.8e-56) (not (<= x1 4.4e-131)))
(* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0))
(- (* x2 -6.0) x1))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.5e+103) {
tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0));
} else if ((x1 <= -6.8e-56) || !(x1 <= 4.4e-131)) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.5d+103)) then
tmp = (x2 * (-6.0d0)) + (x1 * ((x1 * (9.0d0 + (x1 * (-19.0d0)))) + (-1.0d0)))
else if ((x1 <= (-6.8d-56)) .or. (.not. (x1 <= 4.4d-131))) then
tmp = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))
else
tmp = (x2 * (-6.0d0)) - x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.5e+103) {
tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0));
} else if ((x1 <= -6.8e-56) || !(x1 <= 4.4e-131)) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
} else {
tmp = (x2 * -6.0) - x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.5e+103: tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0)) elif (x1 <= -6.8e-56) or not (x1 <= 4.4e-131): tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0) else: tmp = (x2 * -6.0) - x1 return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.5e+103) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(x1 * -19.0))) + -1.0))); elseif ((x1 <= -6.8e-56) || !(x1 <= 4.4e-131)) tmp = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)); else tmp = Float64(Float64(x2 * -6.0) - x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.5e+103) tmp = (x2 * -6.0) + (x1 * ((x1 * (9.0 + (x1 * -19.0))) + -1.0)); elseif ((x1 <= -6.8e-56) || ~((x1 <= 4.4e-131))) tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0); else tmp = (x2 * -6.0) - x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.5e+103], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -6.8e-56], N[Not[LessEqual[x1, 4.4e-131]], $MachinePrecision]], N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+103}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(x1 \cdot \left(9 + x1 \cdot -19\right) + -1\right)\\
\mathbf{elif}\;x1 \leq -6.8 \cdot 10^{-56} \lor \neg \left(x1 \leq 4.4 \cdot 10^{-131}\right):\\
\;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\end{array}
\end{array}
if x1 < -1.5e103Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0 83.8%
Taylor expanded in x2 around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -1.5e103 < x1 < -6.79999999999999964e-56 or 4.3999999999999999e-131 < x1 Initial program 72.8%
Simplified73.0%
Taylor expanded in x1 around 0 48.5%
Taylor expanded in x1 around inf 46.1%
if -6.79999999999999964e-56 < x1 < 4.3999999999999999e-131Initial program 99.4%
Taylor expanded in x1 around inf 84.1%
Taylor expanded in x1 around 0 84.4%
Taylor expanded in x1 around 0 84.4%
*-commutative84.4%
neg-mul-184.4%
unsub-neg84.4%
Simplified84.4%
Final simplification67.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0))))
(if (<= x2 -1.25e+67)
t_0
(if (<= x2 1.9e-45)
(* x2 (- -6.0 (/ x1 x2)))
(if (<= x2 6.6e+171)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* x2 -12.0) 2.0))))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
double tmp;
if (x2 <= -1.25e+67) {
tmp = t_0;
} else if (x2 <= 1.9e-45) {
tmp = x2 * (-6.0 - (x1 / x2));
} else if (x2 <= 6.6e+171) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))
if (x2 <= (-1.25d+67)) then
tmp = t_0
else if (x2 <= 1.9d-45) then
tmp = x2 * ((-6.0d0) - (x1 / x2))
else if (x2 <= 6.6d+171) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((x2 * (-12.0d0)) - 2.0d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
double tmp;
if (x2 <= -1.25e+67) {
tmp = t_0;
} else if (x2 <= 1.9e-45) {
tmp = x2 * (-6.0 - (x1 / x2));
} else if (x2 <= 6.6e+171) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0) tmp = 0 if x2 <= -1.25e+67: tmp = t_0 elif x2 <= 1.9e-45: tmp = x2 * (-6.0 - (x1 / x2)) elif x2 <= 6.6e+171: tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)) tmp = 0.0 if (x2 <= -1.25e+67) tmp = t_0; elseif (x2 <= 1.9e-45) tmp = Float64(x2 * Float64(-6.0 - Float64(x1 / x2))); elseif (x2 <= 6.6e+171) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(x2 * -12.0) - 2.0)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0); tmp = 0.0; if (x2 <= -1.25e+67) tmp = t_0; elseif (x2 <= 1.9e-45) tmp = x2 * (-6.0 - (x1 / x2)); elseif (x2 <= 6.6e+171) tmp = x1 + ((x2 * -6.0) + (x1 * ((x2 * -12.0) - 2.0))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -1.25e+67], t$95$0, If[LessEqual[x2, 1.9e-45], N[(x2 * N[(-6.0 - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 6.6e+171], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(x2 * -12.0), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
\mathbf{if}\;x2 \leq -1.25 \cdot 10^{+67}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x2 \leq 1.9 \cdot 10^{-45}:\\
\;\;\;\;x2 \cdot \left(-6 - \frac{x1}{x2}\right)\\
\mathbf{elif}\;x2 \leq 6.6 \cdot 10^{+171}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(x2 \cdot -12 - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x2 < -1.24999999999999994e67 or 6.59999999999999982e171 < x2 Initial program 75.2%
Simplified75.2%
Taylor expanded in x1 around 0 66.9%
Taylor expanded in x1 around inf 62.5%
if -1.24999999999999994e67 < x2 < 1.89999999999999999e-45Initial program 75.8%
Taylor expanded in x1 around inf 76.4%
Taylor expanded in x1 around 0 53.5%
Taylor expanded in x2 around inf 52.7%
sub-neg52.7%
distribute-lft1-in64.5%
metadata-eval64.5%
metadata-eval64.5%
Simplified64.5%
if 1.89999999999999999e-45 < x2 < 6.59999999999999982e171Initial program 49.9%
Simplified49.9%
Taylor expanded in x1 around 0 41.3%
Taylor expanded in x2 around 0 46.7%
*-commutative46.7%
Simplified46.7%
Final simplification61.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.82e+67) (not (<= x2 2.7e+89))) (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0)) (* x2 (- -6.0 (/ x1 x2)))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.82e+67) || !(x2 <= 2.7e+89)) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
} else {
tmp = x2 * (-6.0 - (x1 / x2));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-1.82d+67)) .or. (.not. (x2 <= 2.7d+89))) then
tmp = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))
else
tmp = x2 * ((-6.0d0) - (x1 / x2))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.82e+67) || !(x2 <= 2.7e+89)) {
tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0);
} else {
tmp = x2 * (-6.0 - (x1 / x2));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.82e+67) or not (x2 <= 2.7e+89): tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0) else: tmp = x2 * (-6.0 - (x1 / x2)) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.82e+67) || !(x2 <= 2.7e+89)) tmp = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)); else tmp = Float64(x2 * Float64(-6.0 - Float64(x1 / x2))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.82e+67) || ~((x2 <= 2.7e+89))) tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0); else tmp = x2 * (-6.0 - (x1 / x2)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.82e+67], N[Not[LessEqual[x2, 2.7e+89]], $MachinePrecision]], N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(-6.0 - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.82 \cdot 10^{+67} \lor \neg \left(x2 \leq 2.7 \cdot 10^{+89}\right):\\
\;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(-6 - \frac{x1}{x2}\right)\\
\end{array}
\end{array}
if x2 < -1.81999999999999997e67 or 2.7e89 < x2 Initial program 66.5%
Simplified66.6%
Taylor expanded in x1 around 0 58.9%
Taylor expanded in x1 around inf 54.4%
if -1.81999999999999997e67 < x2 < 2.7e89Initial program 73.9%
Taylor expanded in x1 around inf 74.5%
Taylor expanded in x1 around 0 51.5%
Taylor expanded in x2 around inf 50.8%
sub-neg50.8%
distribute-lft1-in60.9%
metadata-eval60.9%
metadata-eval60.9%
Simplified60.9%
Final simplification58.7%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.14e-163) (not (<= x2 1.02e-168))) (+ x1 (* x2 -6.0)) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.14e-163) || !(x2 <= 1.02e-168)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = -x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-1.14d-163)) .or. (.not. (x2 <= 1.02d-168))) then
tmp = x1 + (x2 * (-6.0d0))
else
tmp = -x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.14e-163) || !(x2 <= 1.02e-168)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.14e-163) or not (x2 <= 1.02e-168): tmp = x1 + (x2 * -6.0) else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.14e-163) || !(x2 <= 1.02e-168)) tmp = Float64(x1 + Float64(x2 * -6.0)); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.14e-163) || ~((x2 <= 1.02e-168))) tmp = x1 + (x2 * -6.0); else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.14e-163], N[Not[LessEqual[x2, 1.02e-168]], $MachinePrecision]], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.14 \cdot 10^{-163} \lor \neg \left(x2 \leq 1.02 \cdot 10^{-168}\right):\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -1.14000000000000005e-163 or 1.01999999999999999e-168 < x2 Initial program 72.6%
Taylor expanded in x1 around inf 53.4%
Taylor expanded in x1 around 0 35.5%
Taylor expanded in x2 around inf 31.7%
*-commutative31.7%
Simplified31.7%
if -1.14000000000000005e-163 < x2 < 1.01999999999999999e-168Initial program 67.9%
Taylor expanded in x1 around inf 70.6%
Taylor expanded in x1 around 0 50.6%
Taylor expanded in x1 around inf 43.1%
neg-mul-143.1%
Simplified43.1%
Final simplification34.5%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -3.3e-156) (not (<= x2 3e-168))) (* x2 -6.0) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -3.3e-156) || !(x2 <= 3e-168)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-3.3d-156)) .or. (.not. (x2 <= 3d-168))) then
tmp = x2 * (-6.0d0)
else
tmp = -x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -3.3e-156) || !(x2 <= 3e-168)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -3.3e-156) or not (x2 <= 3e-168): tmp = x2 * -6.0 else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -3.3e-156) || !(x2 <= 3e-168)) tmp = Float64(x2 * -6.0); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -3.3e-156) || ~((x2 <= 3e-168))) tmp = x2 * -6.0; else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -3.3e-156], N[Not[LessEqual[x2, 3e-168]], $MachinePrecision]], N[(x2 * -6.0), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -3.3 \cdot 10^{-156} \lor \neg \left(x2 \leq 3 \cdot 10^{-168}\right):\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -3.2999999999999999e-156 or 2.99999999999999991e-168 < x2 Initial program 72.6%
Simplified72.7%
Taylor expanded in x1 around 0 31.2%
*-commutative31.2%
Simplified31.2%
if -3.2999999999999999e-156 < x2 < 2.99999999999999991e-168Initial program 67.9%
Taylor expanded in x1 around inf 70.6%
Taylor expanded in x1 around 0 50.6%
Taylor expanded in x1 around inf 43.1%
neg-mul-143.1%
Simplified43.1%
Final simplification34.2%
(FPCore (x1 x2) :precision binary64 (* x2 (- -6.0 (/ x1 x2))))
double code(double x1, double x2) {
return x2 * (-6.0 - (x1 / x2));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * ((-6.0d0) - (x1 / x2))
end function
public static double code(double x1, double x2) {
return x2 * (-6.0 - (x1 / x2));
}
def code(x1, x2): return x2 * (-6.0 - (x1 / x2))
function code(x1, x2) return Float64(x2 * Float64(-6.0 - Float64(x1 / x2))) end
function tmp = code(x1, x2) tmp = x2 * (-6.0 - (x1 / x2)); end
code[x1_, x2_] := N[(x2 * N[(-6.0 - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot \left(-6 - \frac{x1}{x2}\right)
\end{array}
Initial program 71.4%
Taylor expanded in x1 around inf 57.7%
Taylor expanded in x1 around 0 39.3%
Taylor expanded in x2 around inf 38.8%
sub-neg38.8%
distribute-lft1-in45.5%
metadata-eval45.5%
metadata-eval45.5%
Simplified45.5%
Final simplification45.5%
(FPCore (x1 x2) :precision binary64 (- (* x2 -6.0) x1))
double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = (x2 * (-6.0d0)) - x1
end function
public static double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
def code(x1, x2): return (x2 * -6.0) - x1
function code(x1, x2) return Float64(Float64(x2 * -6.0) - x1) end
function tmp = code(x1, x2) tmp = (x2 * -6.0) - x1; end
code[x1_, x2_] := N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6 - x1
\end{array}
Initial program 71.4%
Taylor expanded in x1 around inf 57.7%
Taylor expanded in x1 around 0 39.3%
Taylor expanded in x1 around 0 39.3%
*-commutative39.3%
neg-mul-139.3%
unsub-neg39.3%
Simplified39.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 Float64(-x1) end
function tmp = code(x1, x2) tmp = -x1; end
code[x1_, x2_] := (-x1)
\begin{array}{l}
\\
-x1
\end{array}
Initial program 71.4%
Taylor expanded in x1 around inf 57.7%
Taylor expanded in x1 around 0 39.3%
Taylor expanded in x1 around inf 15.3%
neg-mul-115.3%
Simplified15.3%
herbie shell --seed 2024110
(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))))))