
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2)))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* t_3 (* x1 2.0)) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_0 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(fma
3.0
(/ (- (fma x1 (* x1 3.0) (* x2 -2.0)) x1) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma (* x1 (* 2.0 t_1)) (+ t_1 -3.0) (* (* x1 x1) (fma t_1 4.0 -6.0)))
(fma (* x1 3.0) (* x1 t_1) (pow x1 3.0))))))
(+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_0 + (2.0 * x2)) - x1) / t_2;
double tmp;
if ((x1 + ((x1 + (((t_2 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((fma(x1, (x1 * 3.0), (x2 * -2.0)) - x1) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma((x1 * (2.0 * t_1)), (t_1 + -3.0), ((x1 * x1) * fma(t_1, 4.0, -6.0))), fma((x1 * 3.0), (x1 * t_1), pow(x1, 3.0)))));
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(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)))) + Float64(t_0 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(x2 * -2.0)) - x1) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(Float64(x1 * Float64(2.0 * t_1)), Float64(t_1 + -3.0), Float64(Float64(x1 * x1) * fma(t_1, 4.0, -6.0))), fma(Float64(x1 * 3.0), Float64(x1 * t_1), (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[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(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] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(N[(x1 * N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 + -3.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(t$95$1 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * 3.0), $MachinePrecision] * N[(x1 * t$95$1), $MachinePrecision] + 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 \left(x1 \cdot 3\right)\\
t_1 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(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) + t\_0 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{\mathsf{fma}\left(x1, x1 \cdot 3, x2 \cdot -2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1 \cdot \left(2 \cdot t\_1\right), t\_1 + -3, \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(t\_1, 4, -6\right)\right), \mathsf{fma}\left(x1 \cdot 3, x1 \cdot t\_1, {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 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.5%
Simplified99.7%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around inf 9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in x1 around inf 98.8%
Final simplification99.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_0
(+
(* (* t_2 (* x1 2.0)) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_1 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))))
(if (<= t_3 INFINITY) t_3 (+ x1 (* 6.0 (pow x1 4.0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_3 = x1 + ((x1 + (((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_1 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = x1 + (6.0 * pow(x1, 4.0));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_3 = x1 + ((x1 + (((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_1 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = x1 + (6.0 * Math.pow(x1, 4.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 t_3 = x1 + ((x1 + (((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_1 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = x1 + (6.0 * math.pow(x1, 4.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_0 * 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_1 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; t_3 = x1 + ((x1 + (((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_1 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = x1 + (6.0 * (x1 ^ 4.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$0 * 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$1 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t\_0 \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\_1 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.5%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around inf 9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in x1 around inf 98.8%
Final simplification99.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0)))
(if (or (<= x1 -2e+103) (not (<= x1 1e+102)))
(+ x1 (* 6.0 (pow x1 4.0)))
(+
x1
(+
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* t_2 (* x1 2.0)) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* 3.0 t_1)))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if ((x1 <= -2e+103) || !(x1 <= 1e+102)) {
tmp = x1 + (6.0 * pow(x1, 4.0));
} else {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
if ((x1 <= (-2d+103)) .or. (.not. (x1 <= 1d+102))) then
tmp = x1 + (6.0d0 * (x1 ** 4.0d0))
else
tmp = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_2 * (x1 * 2.0d0)) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (3.0d0 * t_1)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double tmp;
if ((x1 <= -2e+103) || !(x1 <= 1e+102)) {
tmp = x1 + (6.0 * Math.pow(x1, 4.0));
} else {
tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1)))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 tmp = 0 if (x1 <= -2e+103) or not (x1 <= 1e+102): tmp = x1 + (6.0 * math.pow(x1, 4.0)) else: tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if ((x1 <= -2e+103) || !(x1 <= 1e+102)) tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * 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_1)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if ((x1 <= -2e+103) || ~((x1 <= 1e+102))) tmp = x1 + (6.0 * (x1 ^ 4.0)); else tmp = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (3.0 * t_1))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[Or[LessEqual[x1, -2e+103], N[Not[LessEqual[x1, 1e+102]], $MachinePrecision]], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - 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[(t$95$0 * 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$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+103} \lor \neg \left(x1 \leq 10^{+102}\right):\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \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\_1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2e103 or 9.99999999999999977e101 < x1 Initial program 7.7%
Taylor expanded in x1 around inf 16.5%
*-commutative16.5%
Simplified16.5%
Taylor expanded in x1 around inf 100.0%
if -2e103 < x1 < 9.99999999999999977e101Initial program 98.9%
Taylor expanded in x1 around inf 97.3%
Final simplification98.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (/ (- (+ (* x1 (* x1 3.0)) (* 2.0 x2)) x1) t_0)))
(if (or (<= x1 -5e+104) (not (<= x1 1e+102)))
(+ x1 (* 6.0 (pow x1 4.0)))
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_0
(+
(* (* t_1 (* x1 2.0)) (- t_1 3.0))
(* (* x1 x1) (- (* t_1 4.0) 6.0))))
(* x1 -3.0))))
(* 3.0 (* x2 -2.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_0;
double tmp;
if ((x1 <= -5e+104) || !(x1 <= 1e+102)) {
tmp = x1 + (6.0 * pow(x1, 4.0));
} else {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_1 * (x1 * 2.0)) * (t_1 - 3.0)) + ((x1 * x1) * ((t_1 * 4.0) - 6.0)))) + (x1 * -3.0)))) + (3.0 * (x2 * -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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = (((x1 * (x1 * 3.0d0)) + (2.0d0 * x2)) - x1) / t_0
if ((x1 <= (-5d+104)) .or. (.not. (x1 <= 1d+102))) then
tmp = x1 + (6.0d0 * (x1 ** 4.0d0))
else
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_1 * (x1 * 2.0d0)) * (t_1 - 3.0d0)) + ((x1 * x1) * ((t_1 * 4.0d0) - 6.0d0)))) + (x1 * (-3.0d0))))) + (3.0d0 * (x2 * (-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 * 3.0)) + (2.0 * x2)) - x1) / t_0;
double tmp;
if ((x1 <= -5e+104) || !(x1 <= 1e+102)) {
tmp = x1 + (6.0 * Math.pow(x1, 4.0));
} else {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_1 * (x1 * 2.0)) * (t_1 - 3.0)) + ((x1 * x1) * ((t_1 * 4.0) - 6.0)))) + (x1 * -3.0)))) + (3.0 * (x2 * -2.0)));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_0 tmp = 0 if (x1 <= -5e+104) or not (x1 <= 1e+102): tmp = x1 + (6.0 * math.pow(x1, 4.0)) else: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_1 * (x1 * 2.0)) * (t_1 - 3.0)) + ((x1 * x1) * ((t_1 * 4.0) - 6.0)))) + (x1 * -3.0)))) + (3.0 * (x2 * -2.0))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if ((x1 <= -5e+104) || !(x1 <= 1e+102)) tmp = Float64(x1 + Float64(6.0 * (x1 ^ 4.0))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(Float64(t_1 * Float64(x1 * 2.0)) * Float64(t_1 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_1 * 4.0) - 6.0)))) + Float64(x1 * -3.0)))) + Float64(3.0 * Float64(x2 * -2.0)))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if ((x1 <= -5e+104) || ~((x1 <= 1e+102))) tmp = x1 + (6.0 * (x1 ^ 4.0)); else tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_0 * (((t_1 * (x1 * 2.0)) * (t_1 - 3.0)) + ((x1 * x1) * ((t_1 * 4.0) - 6.0)))) + (x1 * -3.0)))) + (3.0 * (x2 * -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[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[Or[LessEqual[x1, -5e+104], N[Not[LessEqual[x1, 1e+102]], $MachinePrecision]], N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(t$95$1 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$1 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -5 \cdot 10^{+104} \lor \neg \left(x1 \leq 10^{+102}\right):\\
\;\;\;\;x1 + 6 \cdot {x1}^{4}\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot \left(\left(t\_1 \cdot \left(x1 \cdot 2\right)\right) \cdot \left(t\_1 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_1 \cdot 4 - 6\right)\right) + x1 \cdot -3\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\end{array}
\end{array}
if x1 < -4.9999999999999997e104 or 9.99999999999999977e101 < x1 Initial program 7.7%
Taylor expanded in x1 around inf 16.5%
*-commutative16.5%
Simplified16.5%
Taylor expanded in x1 around inf 100.0%
if -4.9999999999999997e104 < x1 < 9.99999999999999977e101Initial program 98.9%
Taylor expanded in x1 around 0 81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in x1 around inf 93.3%
Taylor expanded in x1 around 0 97.1%
Final simplification98.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* 3.0 (* x2 -2.0)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (/ (- (+ t_2 (* 2.0 x2)) x1) t_4))
(t_6 (+ x1 (+ (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_4)) (+ x1 t_0))))
(t_7
(+
x1
(+
t_3
(+
x1
(+
t_1
(+
(* t_2 t_5)
(* t_4 (+ (* (* x1 x1) (- (* t_5 4.0) 6.0)) (* x1 2.0))))))))))
(if (<= x1 -5.5e+102)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 -500.0)
t_7
(if (<= x1 -2.25e-154)
t_6
(if (<= x1 2.2e-211)
(+ x1 (+ (* x1 -2.0) (* x2 -6.0)))
(if (<= x1 430000000000.0)
t_6
(if (<= x1 1.4e+154)
t_7
(+
x1
(+ t_3 (+ x1 (+ t_1 (+ (* x1 -3.0) (* t_4 t_0))))))))))))))
double code(double x1, double x2) {
double t_0 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * (x2 * -2.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = ((t_2 + (2.0 * x2)) - x1) / t_4;
double t_6 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + t_0));
double t_7 = x1 + (t_3 + (x1 + (t_1 + ((t_2 * t_5) + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (x1 * 2.0)))))));
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -500.0) {
tmp = t_7;
} else if (x1 <= -2.25e-154) {
tmp = t_6;
} else if (x1 <= 2.2e-211) {
tmp = x1 + ((x1 * -2.0) + (x2 * -6.0));
} else if (x1 <= 430000000000.0) {
tmp = t_6;
} else if (x1 <= 1.4e+154) {
tmp = t_7;
} else {
tmp = x1 + (t_3 + (x1 + (t_1 + ((x1 * -3.0) + (t_4 * t_0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = 4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = 3.0d0 * (x2 * (-2.0d0))
t_4 = (x1 * x1) + 1.0d0
t_5 = ((t_2 + (2.0d0 * x2)) - x1) / t_4
t_6 = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_4)) + (x1 + t_0))
t_7 = x1 + (t_3 + (x1 + (t_1 + ((t_2 * t_5) + (t_4 * (((x1 * x1) * ((t_5 * 4.0d0) - 6.0d0)) + (x1 * 2.0d0)))))))
if (x1 <= (-5.5d+102)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= (-500.0d0)) then
tmp = t_7
else if (x1 <= (-2.25d-154)) then
tmp = t_6
else if (x1 <= 2.2d-211) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= 430000000000.0d0) then
tmp = t_6
else if (x1 <= 1.4d+154) then
tmp = t_7
else
tmp = x1 + (t_3 + (x1 + (t_1 + ((x1 * (-3.0d0)) + (t_4 * t_0)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = 3.0 * (x2 * -2.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = ((t_2 + (2.0 * x2)) - x1) / t_4;
double t_6 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + t_0));
double t_7 = x1 + (t_3 + (x1 + (t_1 + ((t_2 * t_5) + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (x1 * 2.0)))))));
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -500.0) {
tmp = t_7;
} else if (x1 <= -2.25e-154) {
tmp = t_6;
} else if (x1 <= 2.2e-211) {
tmp = x1 + ((x1 * -2.0) + (x2 * -6.0));
} else if (x1 <= 430000000000.0) {
tmp = t_6;
} else if (x1 <= 1.4e+154) {
tmp = t_7;
} else {
tmp = x1 + (t_3 + (x1 + (t_1 + ((x1 * -3.0) + (t_4 * t_0)))));
}
return tmp;
}
def code(x1, x2): t_0 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))) t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = 3.0 * (x2 * -2.0) t_4 = (x1 * x1) + 1.0 t_5 = ((t_2 + (2.0 * x2)) - x1) / t_4 t_6 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + t_0)) t_7 = x1 + (t_3 + (x1 + (t_1 + ((t_2 * t_5) + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (x1 * 2.0))))))) tmp = 0 if x1 <= -5.5e+102: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= -500.0: tmp = t_7 elif x1 <= -2.25e-154: tmp = t_6 elif x1 <= 2.2e-211: tmp = x1 + ((x1 * -2.0) + (x2 * -6.0)) elif x1 <= 430000000000.0: tmp = t_6 elif x1 <= 1.4e+154: tmp = t_7 else: tmp = x1 + (t_3 + (x1 + (t_1 + ((x1 * -3.0) + (t_4 * t_0))))) return tmp
function code(x1, x2) t_0 = Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(3.0 * Float64(x2 * -2.0)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_4) t_6 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_4)) + Float64(x1 + t_0))) t_7 = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * t_5) + Float64(t_4 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_5 * 4.0) - 6.0)) + Float64(x1 * 2.0)))))))) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= -500.0) tmp = t_7; elseif (x1 <= -2.25e-154) tmp = t_6; elseif (x1 <= 2.2e-211) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * -6.0))); elseif (x1 <= 430000000000.0) tmp = t_6; elseif (x1 <= 1.4e+154) tmp = t_7; else tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_1 + Float64(Float64(x1 * -3.0) + Float64(t_4 * t_0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))); t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = 3.0 * (x2 * -2.0); t_4 = (x1 * x1) + 1.0; t_5 = ((t_2 + (2.0 * x2)) - x1) / t_4; t_6 = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_4)) + (x1 + t_0)); t_7 = x1 + (t_3 + (x1 + (t_1 + ((t_2 * t_5) + (t_4 * (((x1 * x1) * ((t_5 * 4.0) - 6.0)) + (x1 * 2.0))))))); tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= -500.0) tmp = t_7; elseif (x1 <= -2.25e-154) tmp = t_6; elseif (x1 <= 2.2e-211) tmp = x1 + ((x1 * -2.0) + (x2 * -6.0)); elseif (x1 <= 430000000000.0) tmp = t_6; elseif (x1 <= 1.4e+154) tmp = t_7; else tmp = x1 + (t_3 + (x1 + (t_1 + ((x1 * -3.0) + (t_4 * t_0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x1 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * t$95$5), $MachinePrecision] + N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$5 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -500.0], t$95$7, If[LessEqual[x1, -2.25e-154], t$95$6, If[LessEqual[x1, 2.2e-211], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 430000000000.0], t$95$6, If[LessEqual[x1, 1.4e+154], t$95$7, N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(t$95$4 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := 3 \cdot \left(x2 \cdot -2\right)\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_4}\\
t_6 := x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_4} + \left(x1 + t\_0\right)\right)\\
t_7 := x1 + \left(t\_3 + \left(x1 + \left(t\_1 + \left(t\_2 \cdot t\_5 + t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_5 \cdot 4 - 6\right) + x1 \cdot 2\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq -500:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x1 \leq -2.25 \cdot 10^{-154}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x1 \leq 2.2 \cdot 10^{-211}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 430000000000:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;t\_7\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(t\_1 + \left(x1 \cdot -3 + t\_4 \cdot t\_0\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 3.7%
fma-define3.7%
fma-neg3.7%
*-commutative3.7%
fma-neg3.7%
metadata-eval3.7%
metadata-eval3.7%
Simplified3.7%
Taylor expanded in x2 around 0 21.0%
if -5.49999999999999981e102 < x1 < -500 or 4.3e11 < x1 < 1.4e154Initial program 99.8%
Taylor expanded in x1 around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x1 around 0 85.5%
Taylor expanded in x1 around inf 90.8%
*-commutative90.8%
Simplified90.8%
if -500 < x1 < -2.2499999999999999e-154 or 2.19999999999999998e-211 < x1 < 4.3e11Initial program 98.0%
Taylor expanded in x1 around 0 87.6%
if -2.2499999999999999e-154 < x1 < 2.19999999999999998e-211Initial program 99.6%
Taylor expanded in x1 around inf 96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in x1 around 0 96.4%
if 1.4e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 88.4%
Final simplification79.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (/ (- (+ t_1 (* 2.0 x2)) x1) t_0))
(t_3 (* (* x1 x1) (- (* t_2 4.0) 6.0)))
(t_4 (* x1 (* x1 x1)))
(t_5 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
(t_6 (* 3.0 (* x2 -2.0)))
(t_7 (+ x1 (+ (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0)) (+ x1 t_5)))))
(if (<= x1 -5.5e+102)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 -260.0)
(+
x1
(+
t_6
(+
x1
(+ t_4 (+ (* x1 -3.0) (* t_0 (+ t_3 (* (* t_2 (* x1 2.0)) 0.0))))))))
(if (<= x1 -2.25e-154)
t_7
(if (<= x1 3.6e-212)
(+ x1 (+ (* x1 -2.0) (* x2 -6.0)))
(if (<= x1 430000000000.0)
t_7
(if (<= x1 1.4e+154)
(+
x1
(+
t_6
(+ x1 (+ t_4 (+ (* t_1 t_2) (* t_0 (+ t_3 (* x1 2.0))))))))
(+
x1
(+ t_6 (+ x1 (+ t_4 (+ (* x1 -3.0) (* t_0 t_5))))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_3 = (x1 * x1) * ((t_2 * 4.0) - 6.0);
double t_4 = x1 * (x1 * x1);
double t_5 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
double t_6 = 3.0 * (x2 * -2.0);
double t_7 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + t_5));
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -260.0) {
tmp = x1 + (t_6 + (x1 + (t_4 + ((x1 * -3.0) + (t_0 * (t_3 + ((t_2 * (x1 * 2.0)) * 0.0)))))));
} else if (x1 <= -2.25e-154) {
tmp = t_7;
} else if (x1 <= 3.6e-212) {
tmp = x1 + ((x1 * -2.0) + (x2 * -6.0));
} else if (x1 <= 430000000000.0) {
tmp = t_7;
} else if (x1 <= 1.4e+154) {
tmp = x1 + (t_6 + (x1 + (t_4 + ((t_1 * t_2) + (t_0 * (t_3 + (x1 * 2.0)))))));
} else {
tmp = x1 + (t_6 + (x1 + (t_4 + ((x1 * -3.0) + (t_0 * t_5)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = ((t_1 + (2.0d0 * x2)) - x1) / t_0
t_3 = (x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)
t_4 = x1 * (x1 * x1)
t_5 = 4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))
t_6 = 3.0d0 * (x2 * (-2.0d0))
t_7 = x1 + ((3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + t_5))
if (x1 <= (-5.5d+102)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= (-260.0d0)) then
tmp = x1 + (t_6 + (x1 + (t_4 + ((x1 * (-3.0d0)) + (t_0 * (t_3 + ((t_2 * (x1 * 2.0d0)) * 0.0d0)))))))
else if (x1 <= (-2.25d-154)) then
tmp = t_7
else if (x1 <= 3.6d-212) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= 430000000000.0d0) then
tmp = t_7
else if (x1 <= 1.4d+154) then
tmp = x1 + (t_6 + (x1 + (t_4 + ((t_1 * t_2) + (t_0 * (t_3 + (x1 * 2.0d0)))))))
else
tmp = x1 + (t_6 + (x1 + (t_4 + ((x1 * (-3.0d0)) + (t_0 * t_5)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0;
double t_3 = (x1 * x1) * ((t_2 * 4.0) - 6.0);
double t_4 = x1 * (x1 * x1);
double t_5 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
double t_6 = 3.0 * (x2 * -2.0);
double t_7 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + t_5));
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -260.0) {
tmp = x1 + (t_6 + (x1 + (t_4 + ((x1 * -3.0) + (t_0 * (t_3 + ((t_2 * (x1 * 2.0)) * 0.0)))))));
} else if (x1 <= -2.25e-154) {
tmp = t_7;
} else if (x1 <= 3.6e-212) {
tmp = x1 + ((x1 * -2.0) + (x2 * -6.0));
} else if (x1 <= 430000000000.0) {
tmp = t_7;
} else if (x1 <= 1.4e+154) {
tmp = x1 + (t_6 + (x1 + (t_4 + ((t_1 * t_2) + (t_0 * (t_3 + (x1 * 2.0)))))));
} else {
tmp = x1 + (t_6 + (x1 + (t_4 + ((x1 * -3.0) + (t_0 * t_5)))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0 t_3 = (x1 * x1) * ((t_2 * 4.0) - 6.0) t_4 = x1 * (x1 * x1) t_5 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))) t_6 = 3.0 * (x2 * -2.0) t_7 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + t_5)) tmp = 0 if x1 <= -5.5e+102: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= -260.0: tmp = x1 + (t_6 + (x1 + (t_4 + ((x1 * -3.0) + (t_0 * (t_3 + ((t_2 * (x1 * 2.0)) * 0.0))))))) elif x1 <= -2.25e-154: tmp = t_7 elif x1 <= 3.6e-212: tmp = x1 + ((x1 * -2.0) + (x2 * -6.0)) elif x1 <= 430000000000.0: tmp = t_7 elif x1 <= 1.4e+154: tmp = x1 + (t_6 + (x1 + (t_4 + ((t_1 * t_2) + (t_0 * (t_3 + (x1 * 2.0))))))) else: tmp = x1 + (t_6 + (x1 + (t_4 + ((x1 * -3.0) + (t_0 * t_5))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_0) t_3 = Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) t_4 = Float64(x1 * Float64(x1 * x1)) t_5 = Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))) t_6 = Float64(3.0 * Float64(x2 * -2.0)) t_7 = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + t_5))) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= -260.0) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_4 + Float64(Float64(x1 * -3.0) + Float64(t_0 * Float64(t_3 + Float64(Float64(t_2 * Float64(x1 * 2.0)) * 0.0)))))))); elseif (x1 <= -2.25e-154) tmp = t_7; elseif (x1 <= 3.6e-212) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * -6.0))); elseif (x1 <= 430000000000.0) tmp = t_7; elseif (x1 <= 1.4e+154) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_4 + Float64(Float64(t_1 * t_2) + Float64(t_0 * Float64(t_3 + Float64(x1 * 2.0)))))))); else tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_4 + Float64(Float64(x1 * -3.0) + Float64(t_0 * t_5)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = ((t_1 + (2.0 * x2)) - x1) / t_0; t_3 = (x1 * x1) * ((t_2 * 4.0) - 6.0); t_4 = x1 * (x1 * x1); t_5 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))); t_6 = 3.0 * (x2 * -2.0); t_7 = x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) + (x1 + t_5)); tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= -260.0) tmp = x1 + (t_6 + (x1 + (t_4 + ((x1 * -3.0) + (t_0 * (t_3 + ((t_2 * (x1 * 2.0)) * 0.0))))))); elseif (x1 <= -2.25e-154) tmp = t_7; elseif (x1 <= 3.6e-212) tmp = x1 + ((x1 * -2.0) + (x2 * -6.0)); elseif (x1 <= 430000000000.0) tmp = t_7; elseif (x1 <= 1.4e+154) tmp = x1 + (t_6 + (x1 + (t_4 + ((t_1 * t_2) + (t_0 * (t_3 + (x1 * 2.0))))))); else tmp = x1 + (t_6 + (x1 + (t_4 + ((x1 * -3.0) + (t_0 * t_5))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -260.0], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$4 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(t$95$0 * N[(t$95$3 + N[(N[(t$95$2 * N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision] * 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.25e-154], t$95$7, If[LessEqual[x1, 3.6e-212], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 430000000000.0], t$95$7, If[LessEqual[x1, 1.4e+154], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$4 + N[(N[(t$95$1 * t$95$2), $MachinePrecision] + N[(t$95$0 * N[(t$95$3 + N[(x1 * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$4 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(t$95$0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_0}\\
t_3 := \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
t_5 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_6 := 3 \cdot \left(x2 \cdot -2\right)\\
t_7 := x1 + \left(3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + t\_5\right)\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq -260:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + \left(t\_4 + \left(x1 \cdot -3 + t\_0 \cdot \left(t\_3 + \left(t\_2 \cdot \left(x1 \cdot 2\right)\right) \cdot 0\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.25 \cdot 10^{-154}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x1 \leq 3.6 \cdot 10^{-212}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 430000000000:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + \left(t\_4 + \left(t\_1 \cdot t\_2 + t\_0 \cdot \left(t\_3 + x1 \cdot 2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + \left(t\_4 + \left(x1 \cdot -3 + t\_0 \cdot t\_5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 3.7%
fma-define3.7%
fma-neg3.7%
*-commutative3.7%
fma-neg3.7%
metadata-eval3.7%
metadata-eval3.7%
Simplified3.7%
Taylor expanded in x2 around 0 21.0%
if -5.49999999999999981e102 < x1 < -260Initial program 99.8%
Taylor expanded in x1 around 0 97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in x1 around inf 99.8%
Taylor expanded in x1 around 0 95.6%
Taylor expanded in x1 around inf 81.2%
if -260 < x1 < -2.2499999999999999e-154 or 3.6000000000000001e-212 < x1 < 4.3e11Initial program 98.0%
Taylor expanded in x1 around 0 87.6%
if -2.2499999999999999e-154 < x1 < 3.6000000000000001e-212Initial program 99.6%
Taylor expanded in x1 around inf 96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in x1 around 0 96.4%
if 4.3e11 < x1 < 1.4e154Initial program 99.9%
Taylor expanded in x1 around 0 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x1 around 0 84.5%
Taylor expanded in x1 around inf 95.1%
*-commutative95.1%
Simplified95.1%
if 1.4e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 88.4%
Final simplification79.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ (* x1 (* x1 3.0)) (* 2.0 x2)) x1) t_1))
(t_3 (* 3.0 (* x2 -2.0))))
(if (<= x1 -5.5e+102)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 1e+154)
(+
x1
(+
(+
x1
(+
t_0
(+
(*
t_1
(+
(* (* t_2 (* x1 2.0)) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* x1 -3.0))))
t_3))
(+
x1
(+
t_3
(+
x1
(+
t_0
(+
(* x1 -3.0)
(* t_1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0))))))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_1;
double t_3 = 3.0 * (x2 * -2.0);
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 1e+154) {
tmp = x1 + ((x1 + (t_0 + ((t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (x1 * -3.0)))) + t_3);
} else {
tmp = x1 + (t_3 + (x1 + (t_0 + ((x1 * -3.0) + (t_1 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
t_2 = (((x1 * (x1 * 3.0d0)) + (2.0d0 * x2)) - x1) / t_1
t_3 = 3.0d0 * (x2 * (-2.0d0))
if (x1 <= (-5.5d+102)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= 1d+154) then
tmp = x1 + ((x1 + (t_0 + ((t_1 * (((t_2 * (x1 * 2.0d0)) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (x1 * (-3.0d0))))) + t_3)
else
tmp = x1 + (t_3 + (x1 + (t_0 + ((x1 * (-3.0d0)) + (t_1 * (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_1;
double t_3 = 3.0 * (x2 * -2.0);
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 1e+154) {
tmp = x1 + ((x1 + (t_0 + ((t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (x1 * -3.0)))) + t_3);
} else {
tmp = x1 + (t_3 + (x1 + (t_0 + ((x1 * -3.0) + (t_1 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_1 t_3 = 3.0 * (x2 * -2.0) tmp = 0 if x1 <= -5.5e+102: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= 1e+154: tmp = x1 + ((x1 + (t_0 + ((t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (x1 * -3.0)))) + t_3) else: tmp = x1 + (t_3 + (x1 + (t_0 + ((x1 * -3.0) + (t_1 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(3.0 * Float64(x2 * -2.0)) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= 1e+154) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_0 + 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(x1 * -3.0)))) + t_3)); else tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(Float64(x1 * -3.0) + Float64(t_1 * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_1; t_3 = 3.0 * (x2 * -2.0); tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= 1e+154) tmp = x1 + ((x1 + (t_0 + ((t_1 * (((t_2 * (x1 * 2.0)) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (x1 * -3.0)))) + t_3); else tmp = x1 + (t_3 + (x1 + (t_0 + ((x1 * -3.0) + (t_1 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+154], N[(x1 + N[(N[(x1 + N[(t$95$0 + 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[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(t$95$1 * N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := 3 \cdot \left(x2 \cdot -2\right)\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{+154}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_0 + \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) + x1 \cdot -3\right)\right)\right) + t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_3 + \left(x1 + \left(t\_0 + \left(x1 \cdot -3 + t\_1 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 3.7%
fma-define3.7%
fma-neg3.7%
*-commutative3.7%
fma-neg3.7%
metadata-eval3.7%
metadata-eval3.7%
Simplified3.7%
Taylor expanded in x2 around 0 21.0%
if -5.49999999999999981e102 < x1 < 1.00000000000000004e154Initial program 99.0%
Taylor expanded in x1 around 0 82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in x1 around inf 93.6%
Taylor expanded in x1 around 0 97.2%
if 1.00000000000000004e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 88.4%
Final simplification83.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 3.0 (* x2 -2.0)))
(t_2 (* x1 (* x1 x1)))
(t_3 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))
(t_4 (* x1 (* x1 3.0)))
(t_5
(+
x1
(+
t_1
(+
x1
(+
t_2
(+
(* 3.0 t_4)
(*
t_0
(+
(* (* x1 x1) (- (* (/ (- (+ t_4 (* 2.0 x2)) x1) t_0) 4.0) 6.0))
t_3)))))))))
(if (<= x1 -2.7e+98)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 -0.8)
t_5
(if (<= x1 1.9)
(+ x1 (+ (* 3.0 (/ (- (- t_4 (* 2.0 x2)) x1) t_0)) (+ x1 t_3)))
(if (<= x1 1.35e+154)
t_5
(+ x1 (+ t_1 (+ x1 (+ t_2 (+ (* x1 -3.0) (* t_0 t_3))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = x1 * (x1 * x1);
double t_3 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
double t_4 = x1 * (x1 * 3.0);
double t_5 = x1 + (t_1 + (x1 + (t_2 + ((3.0 * t_4) + (t_0 * (((x1 * x1) * (((((t_4 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + t_3))))));
double tmp;
if (x1 <= -2.7e+98) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -0.8) {
tmp = t_5;
} else if (x1 <= 1.9) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + t_3));
} else if (x1 <= 1.35e+154) {
tmp = t_5;
} else {
tmp = x1 + (t_1 + (x1 + (t_2 + ((x1 * -3.0) + (t_0 * t_3)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = 3.0d0 * (x2 * (-2.0d0))
t_2 = x1 * (x1 * x1)
t_3 = 4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))
t_4 = x1 * (x1 * 3.0d0)
t_5 = x1 + (t_1 + (x1 + (t_2 + ((3.0d0 * t_4) + (t_0 * (((x1 * x1) * (((((t_4 + (2.0d0 * x2)) - x1) / t_0) * 4.0d0) - 6.0d0)) + t_3))))))
if (x1 <= (-2.7d+98)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= (-0.8d0)) then
tmp = t_5
else if (x1 <= 1.9d0) then
tmp = x1 + ((3.0d0 * (((t_4 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + t_3))
else if (x1 <= 1.35d+154) then
tmp = t_5
else
tmp = x1 + (t_1 + (x1 + (t_2 + ((x1 * (-3.0d0)) + (t_0 * t_3)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 3.0 * (x2 * -2.0);
double t_2 = x1 * (x1 * x1);
double t_3 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)));
double t_4 = x1 * (x1 * 3.0);
double t_5 = x1 + (t_1 + (x1 + (t_2 + ((3.0 * t_4) + (t_0 * (((x1 * x1) * (((((t_4 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + t_3))))));
double tmp;
if (x1 <= -2.7e+98) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -0.8) {
tmp = t_5;
} else if (x1 <= 1.9) {
tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + t_3));
} else if (x1 <= 1.35e+154) {
tmp = t_5;
} else {
tmp = x1 + (t_1 + (x1 + (t_2 + ((x1 * -3.0) + (t_0 * t_3)))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = 3.0 * (x2 * -2.0) t_2 = x1 * (x1 * x1) t_3 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))) t_4 = x1 * (x1 * 3.0) t_5 = x1 + (t_1 + (x1 + (t_2 + ((3.0 * t_4) + (t_0 * (((x1 * x1) * (((((t_4 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + t_3)))))) tmp = 0 if x1 <= -2.7e+98: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= -0.8: tmp = t_5 elif x1 <= 1.9: tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + t_3)) elif x1 <= 1.35e+154: tmp = t_5 else: tmp = x1 + (t_1 + (x1 + (t_2 + ((x1 * -3.0) + (t_0 * t_3))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(3.0 * Float64(x2 * -2.0)) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))) t_4 = Float64(x1 * Float64(x1 * 3.0)) t_5 = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_2 + Float64(Float64(3.0 * t_4) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(Float64(Float64(Float64(t_4 + Float64(2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + t_3))))))) tmp = 0.0 if (x1 <= -2.7e+98) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= -0.8) tmp = t_5; elseif (x1 <= 1.9) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_4 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + t_3))); elseif (x1 <= 1.35e+154) tmp = t_5; else tmp = Float64(x1 + Float64(t_1 + Float64(x1 + Float64(t_2 + Float64(Float64(x1 * -3.0) + Float64(t_0 * t_3)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = 3.0 * (x2 * -2.0); t_2 = x1 * (x1 * x1); t_3 = 4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))); t_4 = x1 * (x1 * 3.0); t_5 = x1 + (t_1 + (x1 + (t_2 + ((3.0 * t_4) + (t_0 * (((x1 * x1) * (((((t_4 + (2.0 * x2)) - x1) / t_0) * 4.0) - 6.0)) + t_3)))))); tmp = 0.0; if (x1 <= -2.7e+98) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= -0.8) tmp = t_5; elseif (x1 <= 1.9) tmp = x1 + ((3.0 * (((t_4 - (2.0 * x2)) - x1) / t_0)) + (x1 + t_3)); elseif (x1 <= 1.35e+154) tmp = t_5; else tmp = x1 + (t_1 + (x1 + (t_2 + ((x1 * -3.0) + (t_0 * t_3))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$2 + N[(N[(3.0 * t$95$4), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$4 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision] * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.7e+98], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.8], t$95$5, If[LessEqual[x1, 1.9], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$4 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], t$95$5, N[(x1 + N[(t$95$1 + N[(x1 + N[(t$95$2 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 3 \cdot \left(x2 \cdot -2\right)\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
t_4 := x1 \cdot \left(x1 \cdot 3\right)\\
t_5 := x1 + \left(t\_1 + \left(x1 + \left(t\_2 + \left(3 \cdot t\_4 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{\left(t\_4 + 2 \cdot x2\right) - x1}{t\_0} \cdot 4 - 6\right) + t\_3\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -2.7 \cdot 10^{+98}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq -0.8:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;x1 \leq 1.9:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_4 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + t\_3\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_1 + \left(x1 + \left(t\_2 + \left(x1 \cdot -3 + t\_0 \cdot t\_3\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.7e98Initial program 2.4%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.6%
fma-define3.6%
fma-neg3.6%
*-commutative3.6%
fma-neg3.6%
metadata-eval3.6%
metadata-eval3.6%
Simplified3.6%
Taylor expanded in x2 around 0 20.6%
if -2.7e98 < x1 < -0.80000000000000004 or 1.8999999999999999 < x1 < 1.35000000000000003e154Initial program 99.8%
Taylor expanded in x1 around 0 98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in x1 around 0 85.0%
Taylor expanded in x1 around 0 82.8%
Taylor expanded in x1 around inf 82.8%
if -0.80000000000000004 < x1 < 1.8999999999999999Initial program 98.6%
Taylor expanded in x1 around 0 86.8%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 88.4%
Final simplification75.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* 3.0 (* x2 -2.0)))
(t_3 (/ (- (+ (* x1 (* x1 3.0)) (* 2.0 x2)) x1) t_0)))
(if (<= x1 -5.5e+102)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 1.35e+154)
(+
x1
(+
t_2
(+
x1
(+
t_1
(+
(* x1 -3.0)
(*
t_0
(+ (* (* t_3 (* x1 2.0)) (- t_3 3.0)) (* (* x1 x1) 6.0))))))))
(+
x1
(+
t_2
(+
x1
(+
t_1
(+
(* x1 -3.0)
(* t_0 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0))))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = 3.0 * (x2 * -2.0);
double t_3 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 1.35e+154) {
tmp = x1 + (t_2 + (x1 + (t_1 + ((x1 * -3.0) + (t_0 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + (t_2 + (x1 + (t_1 + ((x1 * -3.0) + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = 3.0d0 * (x2 * (-2.0d0))
t_3 = (((x1 * (x1 * 3.0d0)) + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-5.5d+102)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= 1.35d+154) then
tmp = x1 + (t_2 + (x1 + (t_1 + ((x1 * (-3.0d0)) + (t_0 * (((t_3 * (x1 * 2.0d0)) * (t_3 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 + (t_2 + (x1 + (t_1 + ((x1 * (-3.0d0)) + (t_0 * (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0)))))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = 3.0 * (x2 * -2.0);
double t_3 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -5.5e+102) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= 1.35e+154) {
tmp = x1 + (t_2 + (x1 + (t_1 + ((x1 * -3.0) + (t_0 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + (t_2 + (x1 + (t_1 + ((x1 * -3.0) + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = 3.0 * (x2 * -2.0) t_3 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= -5.5e+102: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= 1.35e+154: tmp = x1 + (t_2 + (x1 + (t_1 + ((x1 * -3.0) + (t_0 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * 6.0))))))) else: tmp = x1 + (t_2 + (x1 + (t_1 + ((x1 * -3.0) + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(3.0 * Float64(x2 * -2.0)) t_3 = Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= -5.5e+102) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(t_1 + Float64(Float64(x1 * -3.0) + Float64(t_0 * Float64(Float64(Float64(t_3 * Float64(x1 * 2.0)) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 + Float64(t_2 + Float64(x1 + Float64(t_1 + Float64(Float64(x1 * -3.0) + Float64(t_0 * Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)))))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = 3.0 * (x2 * -2.0); t_3 = (((x1 * (x1 * 3.0)) + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= -5.5e+102) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= 1.35e+154) tmp = x1 + (t_2 + (x1 + (t_1 + ((x1 * -3.0) + (t_0 * (((t_3 * (x1 * 2.0)) * (t_3 - 3.0)) + ((x1 * x1) * 6.0))))))); else tmp = x1 + (t_2 + (x1 + (t_1 + ((x1 * -3.0) + (t_0 * (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.5e+102], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(t$95$2 + N[(x1 + N[(t$95$1 + N[(N[(x1 * -3.0), $MachinePrecision] + 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] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$2 + N[(x1 + N[(t$95$1 + N[(N[(x1 * -3.0), $MachinePrecision] + N[(t$95$0 * N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := 3 \cdot \left(x2 \cdot -2\right)\\
t_3 := \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + \left(t\_1 + \left(x1 \cdot -3 + 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 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_2 + \left(x1 + \left(t\_1 + \left(x1 \cdot -3 + t\_0 \cdot \left(4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 3.7%
fma-define3.7%
fma-neg3.7%
*-commutative3.7%
fma-neg3.7%
metadata-eval3.7%
metadata-eval3.7%
Simplified3.7%
Taylor expanded in x2 around 0 21.0%
if -5.49999999999999981e102 < x1 < 1.35000000000000003e154Initial program 99.0%
Taylor expanded in x1 around 0 82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in x1 around inf 93.6%
Taylor expanded in x1 around 0 97.2%
Taylor expanded in x1 around inf 94.9%
if 1.35000000000000003e154 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 88.4%
Final simplification82.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x2 (- (* 2.0 x2) 3.0))))
(if (<= x1 -1.46e+85)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x1 -1e-152)
(+ (* x1 (+ (* 4.0 t_0) -1.0)) (* x2 -6.0))
(if (<= x1 2.1e-210)
(+ x1 (+ (* x1 -2.0) (* x2 -6.0)))
(+
x1
(+
(* 3.0 (* x2 -2.0))
(+
x1
(+
(* x1 (* x1 x1))
(+ (* x1 -3.0) (* (+ (* x1 x1) 1.0) (* 4.0 (* x1 t_0)))))))))))))
double code(double x1, double x2) {
double t_0 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -1.46e+85) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -1e-152) {
tmp = (x1 * ((4.0 * t_0) + -1.0)) + (x2 * -6.0);
} else if (x1 <= 2.1e-210) {
tmp = x1 + ((x1 * -2.0) + (x2 * -6.0));
} else {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((x1 * -3.0) + (((x1 * x1) + 1.0) * (4.0 * (x1 * 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 = x2 * ((2.0d0 * x2) - 3.0d0)
if (x1 <= (-1.46d+85)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if (x1 <= (-1d-152)) then
tmp = (x1 * ((4.0d0 * t_0) + (-1.0d0))) + (x2 * (-6.0d0))
else if (x1 <= 2.1d-210) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (-6.0d0)))
else
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + ((x1 * (x1 * x1)) + ((x1 * (-3.0d0)) + (((x1 * x1) + 1.0d0) * (4.0d0 * (x1 * t_0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x2 * ((2.0 * x2) - 3.0);
double tmp;
if (x1 <= -1.46e+85) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if (x1 <= -1e-152) {
tmp = (x1 * ((4.0 * t_0) + -1.0)) + (x2 * -6.0);
} else if (x1 <= 2.1e-210) {
tmp = x1 + ((x1 * -2.0) + (x2 * -6.0));
} else {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((x1 * -3.0) + (((x1 * x1) + 1.0) * (4.0 * (x1 * t_0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x2 * ((2.0 * x2) - 3.0) tmp = 0 if x1 <= -1.46e+85: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif x1 <= -1e-152: tmp = (x1 * ((4.0 * t_0) + -1.0)) + (x2 * -6.0) elif x1 <= 2.1e-210: tmp = x1 + ((x1 * -2.0) + (x2 * -6.0)) else: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((x1 * -3.0) + (((x1 * x1) + 1.0) * (4.0 * (x1 * t_0))))))) return tmp
function code(x1, x2) t_0 = Float64(x2 * Float64(Float64(2.0 * x2) - 3.0)) tmp = 0.0 if (x1 <= -1.46e+85) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif (x1 <= -1e-152) tmp = Float64(Float64(x1 * Float64(Float64(4.0 * t_0) + -1.0)) + Float64(x2 * -6.0)); elseif (x1 <= 2.1e-210) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(x1 * -3.0) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(4.0 * Float64(x1 * t_0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x2 * ((2.0 * x2) - 3.0); tmp = 0.0; if (x1 <= -1.46e+85) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif (x1 <= -1e-152) tmp = (x1 * ((4.0 * t_0) + -1.0)) + (x2 * -6.0); elseif (x1 <= 2.1e-210) tmp = x1 + ((x1 * -2.0) + (x2 * -6.0)); else tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + ((x1 * (x1 * x1)) + ((x1 * -3.0) + (((x1 * x1) + 1.0) * (4.0 * (x1 * t_0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.46e+85], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1e-152], N[(N[(x1 * N[(N[(4.0 * t$95$0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.1e-210], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * -3.0), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(4.0 * N[(x1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot \left(2 \cdot x2 - 3\right)\\
\mathbf{if}\;x1 \leq -1.46 \cdot 10^{+85}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq -1 \cdot 10^{-152}:\\
\;\;\;\;x1 \cdot \left(4 \cdot t\_0 + -1\right) + x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 2.1 \cdot 10^{-210}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(x1 \cdot -3 + \left(x1 \cdot x1 + 1\right) \cdot \left(4 \cdot \left(x1 \cdot t\_0\right)\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.46e85Initial program 6.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.6%
fma-define3.6%
fma-neg3.6%
*-commutative3.6%
fma-neg3.6%
metadata-eval3.6%
metadata-eval3.6%
Simplified3.6%
Taylor expanded in x2 around 0 19.8%
if -1.46e85 < x1 < -1.00000000000000007e-152Initial program 99.1%
Taylor expanded in x1 around 0 63.3%
Taylor expanded in x1 around 0 64.1%
fma-define64.2%
fma-neg64.2%
*-commutative64.2%
fma-neg64.2%
metadata-eval64.2%
metadata-eval64.2%
Simplified64.2%
Taylor expanded in x1 around 0 64.1%
if -1.00000000000000007e-152 < x1 < 2.10000000000000016e-210Initial program 99.6%
Taylor expanded in x1 around inf 96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in x1 around 0 96.4%
if 2.10000000000000016e-210 < x1 Initial program 64.9%
Taylor expanded in x1 around 0 58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in x1 around inf 63.4%
Taylor expanded in x1 around 0 64.1%
Taylor expanded in x1 around 0 77.0%
Final simplification69.5%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -2.5e+85)
(+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0))))
(if (or (<= x1 -4e-147) (not (<= x1 5.1e-256)))
(+ (* x1 (+ (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) -1.0)) (* x2 -6.0))
(+ x1 (+ (* x1 -2.0) (* x2 -6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -2.5e+85) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if ((x1 <= -4e-147) || !(x1 <= 5.1e-256)) {
tmp = (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)) + (x2 * -6.0);
} else {
tmp = x1 + ((x1 * -2.0) + (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-2.5d+85)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else if ((x1 <= (-4d-147)) .or. (.not. (x1 <= 5.1d-256))) then
tmp = (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) + (-1.0d0))) + (x2 * (-6.0d0))
else
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -2.5e+85) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else if ((x1 <= -4e-147) || !(x1 <= 5.1e-256)) {
tmp = (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)) + (x2 * -6.0);
} else {
tmp = x1 + ((x1 * -2.0) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -2.5e+85: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) elif (x1 <= -4e-147) or not (x1 <= 5.1e-256): tmp = (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)) + (x2 * -6.0) else: tmp = x1 + ((x1 * -2.0) + (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -2.5e+85) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); elseif ((x1 <= -4e-147) || !(x1 <= 5.1e-256)) tmp = Float64(Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) + -1.0)) + Float64(x2 * -6.0)); else tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -2.5e+85) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); elseif ((x1 <= -4e-147) || ~((x1 <= 5.1e-256))) tmp = (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) + -1.0)) + (x2 * -6.0); else tmp = x1 + ((x1 * -2.0) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -2.5e+85], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -4e-147], N[Not[LessEqual[x1, 5.1e-256]], $MachinePrecision]], N[(N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.5 \cdot 10^{+85}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{elif}\;x1 \leq -4 \cdot 10^{-147} \lor \neg \left(x1 \leq 5.1 \cdot 10^{-256}\right):\\
\;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + -1\right) + x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -2.5e85Initial program 6.8%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.6%
fma-define3.6%
fma-neg3.6%
*-commutative3.6%
fma-neg3.6%
metadata-eval3.6%
metadata-eval3.6%
Simplified3.6%
Taylor expanded in x2 around 0 19.8%
if -2.5e85 < x1 < -3.9999999999999999e-147 or 5.10000000000000011e-256 < x1 Initial program 73.9%
Taylor expanded in x1 around 0 48.7%
Taylor expanded in x1 around 0 58.4%
fma-define59.0%
fma-neg59.0%
*-commutative59.0%
fma-neg59.0%
metadata-eval59.0%
metadata-eval59.0%
Simplified59.0%
Taylor expanded in x1 around 0 58.4%
if -3.9999999999999999e-147 < x1 < 5.10000000000000011e-256Initial program 99.5%
Taylor expanded in x1 around inf 97.3%
*-commutative97.3%
Simplified97.3%
Taylor expanded in x1 around 0 97.5%
Final simplification58.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (+ x1 (* -12.0 (* x1 x2))))))
(if (<= x1 -5.8e+195)
t_0
(if (<= x1 -1.42e-105) (- x1) (if (<= x1 1.4) (* x2 -6.0) t_0)))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 + (-12.0 * (x1 * x2)));
double tmp;
if (x1 <= -5.8e+195) {
tmp = t_0;
} else if (x1 <= -1.42e-105) {
tmp = -x1;
} else if (x1 <= 1.4) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + (x1 + ((-12.0d0) * (x1 * x2)))
if (x1 <= (-5.8d+195)) then
tmp = t_0
else if (x1 <= (-1.42d-105)) then
tmp = -x1
else if (x1 <= 1.4d0) then
tmp = x2 * (-6.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 + (-12.0 * (x1 * x2)));
double tmp;
if (x1 <= -5.8e+195) {
tmp = t_0;
} else if (x1 <= -1.42e-105) {
tmp = -x1;
} else if (x1 <= 1.4) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 + (-12.0 * (x1 * x2))) tmp = 0 if x1 <= -5.8e+195: tmp = t_0 elif x1 <= -1.42e-105: tmp = -x1 elif x1 <= 1.4: tmp = x2 * -6.0 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 + Float64(-12.0 * Float64(x1 * x2)))) tmp = 0.0 if (x1 <= -5.8e+195) tmp = t_0; elseif (x1 <= -1.42e-105) tmp = Float64(-x1); elseif (x1 <= 1.4) tmp = Float64(x2 * -6.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 + (-12.0 * (x1 * x2))); tmp = 0.0; if (x1 <= -5.8e+195) tmp = t_0; elseif (x1 <= -1.42e-105) tmp = -x1; elseif (x1 <= 1.4) tmp = x2 * -6.0; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 + N[(-12.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.8e+195], t$95$0, If[LessEqual[x1, -1.42e-105], (-x1), If[LessEqual[x1, 1.4], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 + -12 \cdot \left(x1 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -5.8 \cdot 10^{+195}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.42 \cdot 10^{-105}:\\
\;\;\;\;-x1\\
\mathbf{elif}\;x1 \leq 1.4:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -5.79999999999999984e195 or 1.3999999999999999 < x1 Initial program 33.9%
Taylor expanded in x1 around 0 8.8%
Taylor expanded in x1 around inf 26.7%
Taylor expanded in x2 around 0 19.8%
if -5.79999999999999984e195 < x1 < -1.4199999999999999e-105Initial program 70.2%
Taylor expanded in x1 around 0 41.2%
Taylor expanded in x1 around 0 42.8%
fma-define42.9%
fma-neg42.9%
*-commutative42.9%
fma-neg42.9%
metadata-eval42.9%
metadata-eval42.9%
Simplified42.9%
Taylor expanded in x2 around 0 26.9%
distribute-rgt1-in26.9%
metadata-eval26.9%
neg-mul-126.9%
Simplified26.9%
if -1.4199999999999999e-105 < x1 < 1.3999999999999999Initial program 98.6%
Taylor expanded in x1 around 0 86.4%
Taylor expanded in x1 around 0 64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in x1 around 0 65.0%
*-commutative65.0%
Simplified65.0%
Final simplification39.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -3.5e+190)
(+ x1 (+ x1 (* -12.0 (* x1 x2))))
(if (<= x1 2.65e-76)
(+ x1 (+ (* x1 -2.0) (* x2 -6.0)))
(* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -3.5e+190) {
tmp = x1 + (x1 + (-12.0 * (x1 * x2)));
} else if (x1 <= 2.65e-76) {
tmp = x1 + ((x1 * -2.0) + (x2 * -6.0));
} else {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-3.5d+190)) then
tmp = x1 + (x1 + ((-12.0d0) * (x1 * x2)))
else if (x1 <= 2.65d-76) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (-6.0d0)))
else
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -3.5e+190) {
tmp = x1 + (x1 + (-12.0 * (x1 * x2)));
} else if (x1 <= 2.65e-76) {
tmp = x1 + ((x1 * -2.0) + (x2 * -6.0));
} else {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -3.5e+190: tmp = x1 + (x1 + (-12.0 * (x1 * x2))) elif x1 <= 2.65e-76: tmp = x1 + ((x1 * -2.0) + (x2 * -6.0)) else: tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -3.5e+190) tmp = Float64(x1 + Float64(x1 + Float64(-12.0 * Float64(x1 * x2)))); elseif (x1 <= 2.65e-76) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * -6.0))); else tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -3.5e+190) tmp = x1 + (x1 + (-12.0 * (x1 * x2))); elseif (x1 <= 2.65e-76) tmp = x1 + ((x1 * -2.0) + (x2 * -6.0)); else tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -3.5e+190], N[(x1 + N[(x1 + N[(-12.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.65e-76], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.5 \cdot 10^{+190}:\\
\;\;\;\;x1 + \left(x1 + -12 \cdot \left(x1 \cdot x2\right)\right)\\
\mathbf{elif}\;x1 \leq 2.65 \cdot 10^{-76}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -3.4999999999999999e190Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around inf 0.0%
Taylor expanded in x2 around 0 26.2%
if -3.4999999999999999e190 < x1 < 2.65e-76Initial program 88.6%
Taylor expanded in x1 around inf 78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in x1 around 0 66.6%
if 2.65e-76 < x1 Initial program 53.1%
Taylor expanded in x1 around 0 24.2%
Taylor expanded in x1 around inf 39.6%
Taylor expanded in x1 around 0 39.6%
Final simplification52.6%
(FPCore (x1 x2) :precision binary64 (if (<= x1 2.65e-76) (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0)))) (+ x1 (+ (+ x1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0))))) 9.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 2.65e-76) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + 9.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 2.65d-76) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else
tmp = x1 + ((x1 + (4.0d0 * (x1 * (x2 * ((2.0d0 * x2) - 3.0d0))))) + 9.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 2.65e-76) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else {
tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + 9.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 2.65e-76: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) else: tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + 9.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 2.65e-76) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(4.0 * Float64(x1 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + 9.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 2.65e-76) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); else tmp = x1 + ((x1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0))))) + 9.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 2.65e-76], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 2.65 \cdot 10^{-76}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right) + 9\right)\\
\end{array}
\end{array}
if x1 < 2.65e-76Initial program 74.0%
Taylor expanded in x1 around 0 58.0%
Taylor expanded in x1 around 0 59.2%
fma-define59.9%
fma-neg59.9%
*-commutative59.9%
fma-neg59.9%
metadata-eval59.9%
metadata-eval59.9%
Simplified59.9%
Taylor expanded in x2 around 0 60.4%
if 2.65e-76 < x1 Initial program 53.1%
Taylor expanded in x1 around 0 24.2%
Taylor expanded in x1 around inf 39.6%
Final simplification52.9%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -6.6e+189) (not (<= x1 1.4))) (+ x1 (+ x1 (* -12.0 (* x1 x2)))) (+ x1 (+ (* x1 -2.0) (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -6.6e+189) || !(x1 <= 1.4)) {
tmp = x1 + (x1 + (-12.0 * (x1 * x2)));
} else {
tmp = x1 + ((x1 * -2.0) + (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-6.6d+189)) .or. (.not. (x1 <= 1.4d0))) then
tmp = x1 + (x1 + ((-12.0d0) * (x1 * x2)))
else
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -6.6e+189) || !(x1 <= 1.4)) {
tmp = x1 + (x1 + (-12.0 * (x1 * x2)));
} else {
tmp = x1 + ((x1 * -2.0) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -6.6e+189) or not (x1 <= 1.4): tmp = x1 + (x1 + (-12.0 * (x1 * x2))) else: tmp = x1 + ((x1 * -2.0) + (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -6.6e+189) || !(x1 <= 1.4)) tmp = Float64(x1 + Float64(x1 + Float64(-12.0 * Float64(x1 * x2)))); else tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -6.6e+189) || ~((x1 <= 1.4))) tmp = x1 + (x1 + (-12.0 * (x1 * x2))); else tmp = x1 + ((x1 * -2.0) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -6.6e+189], N[Not[LessEqual[x1, 1.4]], $MachinePrecision]], N[(x1 + N[(x1 + N[(-12.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -6.6 \cdot 10^{+189} \lor \neg \left(x1 \leq 1.4\right):\\
\;\;\;\;x1 + \left(x1 + -12 \cdot \left(x1 \cdot x2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x1 < -6.6000000000000004e189 or 1.3999999999999999 < x1 Initial program 33.9%
Taylor expanded in x1 around 0 8.8%
Taylor expanded in x1 around inf 26.7%
Taylor expanded in x2 around 0 19.8%
if -6.6000000000000004e189 < x1 < 1.3999999999999999Initial program 89.5%
Taylor expanded in x1 around inf 75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in x1 around 0 64.0%
Final simplification45.7%
(FPCore (x1 x2) :precision binary64 (if (<= x1 1.08e-77) (+ x1 (+ (* x1 -2.0) (* x2 (- (* x1 -12.0) 6.0)))) (* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 1.08e-77) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 1.08d-77) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * ((x1 * (-12.0d0)) - 6.0d0)))
else
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 1.08e-77) {
tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0)));
} else {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 1.08e-77: tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))) else: tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 1.08e-77) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)))); else tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 1.08e-77) tmp = x1 + ((x1 * -2.0) + (x2 * ((x1 * -12.0) - 6.0))); else tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 1.08e-77], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 1.08 \cdot 10^{-77}:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\end{array}
\end{array}
if x1 < 1.07999999999999997e-77Initial program 74.0%
Taylor expanded in x1 around 0 58.0%
Taylor expanded in x1 around 0 59.2%
fma-define59.9%
fma-neg59.9%
*-commutative59.9%
fma-neg59.9%
metadata-eval59.9%
metadata-eval59.9%
Simplified59.9%
Taylor expanded in x2 around 0 60.4%
if 1.07999999999999997e-77 < x1 Initial program 53.1%
Taylor expanded in x1 around 0 24.2%
Taylor expanded in x1 around inf 39.6%
Taylor expanded in x1 around 0 39.6%
Final simplification52.9%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -7.6e-258) (not (<= x2 1.05e-125))) (* x2 -6.0) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -7.6e-258) || !(x2 <= 1.05e-125)) {
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 <= (-7.6d-258)) .or. (.not. (x2 <= 1.05d-125))) 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 <= -7.6e-258) || !(x2 <= 1.05e-125)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -7.6e-258) or not (x2 <= 1.05e-125): tmp = x2 * -6.0 else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -7.6e-258) || !(x2 <= 1.05e-125)) tmp = Float64(x2 * -6.0); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -7.6e-258) || ~((x2 <= 1.05e-125))) tmp = x2 * -6.0; else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -7.6e-258], N[Not[LessEqual[x2, 1.05e-125]], $MachinePrecision]], N[(x2 * -6.0), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -7.6 \cdot 10^{-258} \lor \neg \left(x2 \leq 1.05 \cdot 10^{-125}\right):\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -7.5999999999999996e-258 or 1.05e-125 < x2 Initial program 65.5%
Taylor expanded in x1 around 0 44.8%
Taylor expanded in x1 around 0 33.0%
*-commutative33.0%
Simplified33.0%
Taylor expanded in x1 around 0 32.3%
*-commutative32.3%
Simplified32.3%
if -7.5999999999999996e-258 < x2 < 1.05e-125Initial program 70.4%
Taylor expanded in x1 around 0 50.0%
Taylor expanded in x1 around 0 51.4%
fma-define51.4%
fma-neg51.4%
*-commutative51.4%
fma-neg51.4%
metadata-eval51.4%
metadata-eval51.4%
Simplified51.4%
Taylor expanded in x2 around 0 41.2%
distribute-rgt1-in41.2%
metadata-eval41.2%
neg-mul-141.2%
Simplified41.2%
Final simplification34.1%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -2.55e-110) (- x1) (+ x1 (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -2.55e-110) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-2.55d-110)) then
tmp = -x1
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -2.55e-110) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -2.55e-110: tmp = -x1 else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -2.55e-110) tmp = Float64(-x1); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -2.55e-110) tmp = -x1; else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -2.55e-110], (-x1), N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.55 \cdot 10^{-110}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -2.5500000000000001e-110Initial program 44.9%
Taylor expanded in x1 around 0 26.4%
Taylor expanded in x1 around 0 28.8%
fma-define28.8%
fma-neg28.8%
*-commutative28.8%
fma-neg28.8%
metadata-eval28.8%
metadata-eval28.8%
Simplified28.8%
Taylor expanded in x2 around 0 20.1%
distribute-rgt1-in20.1%
metadata-eval20.1%
neg-mul-120.1%
Simplified20.1%
if -2.5500000000000001e-110 < x1 Initial program 75.4%
Taylor expanded in x1 around 0 53.9%
Taylor expanded in x1 around 0 38.8%
*-commutative38.8%
Simplified38.8%
Final simplification33.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 66.5%
Taylor expanded in x1 around 0 45.8%
Taylor expanded in x1 around 0 52.9%
fma-define53.4%
fma-neg53.4%
*-commutative53.4%
fma-neg53.4%
metadata-eval53.4%
metadata-eval53.4%
Simplified53.4%
Taylor expanded in x2 around 0 12.3%
distribute-rgt1-in12.3%
metadata-eval12.3%
neg-mul-112.3%
Simplified12.3%
Final simplification12.3%
(FPCore (x1 x2) :precision binary64 x1)
double code(double x1, double x2) {
return x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x1
end function
public static double code(double x1, double x2) {
return x1;
}
def code(x1, x2): return x1
function code(x1, x2) return x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 66.5%
Taylor expanded in x1 around 0 45.8%
Taylor expanded in x1 around 0 28.5%
*-commutative28.5%
Simplified28.5%
Taylor expanded in x1 around inf 3.4%
Final simplification3.4%
herbie shell --seed 2024034
(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))))))