
(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 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (- (fma x1 (* x1 3.0) (* 2.0 x2)) x1) (fma x1 x1 1.0)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* 3.0 (* x1 x1))))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_2
(+
(* (* (* x1 2.0) t_3) (- t_3 3.0))
(* (* x1 x1) (- (* t_3 4.0) 6.0))))
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_4 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(+
x1
(fma
(fma x1 x1 1.0)
(fma x1 (* x1 (fma t_0 4.0 -6.0)) (* (* x1 (* 2.0 t_0)) (+ t_0 -3.0)))
(fma t_4 t_0 (pow x1 3.0))))))
(* (pow x1 4.0) (+ 6.0 (/ -3.0 x1))))))
double code(double x1, double x2) {
double t_0 = (fma(x1, (x1 * 3.0), (2.0 * x2)) - x1) / fma(x1, x1, 1.0);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = 3.0 * (x1 * x1);
double tmp;
if ((x1 + ((x1 + (((t_2 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), (x1 + fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_0, 4.0, -6.0)), ((x1 * (2.0 * t_0)) * (t_0 + -3.0))), fma(t_4, t_0, pow(x1, 3.0)))));
} else {
tmp = pow(x1, 4.0) * (6.0 + (-3.0 / x1));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(fma(x1, Float64(x1 * 3.0), Float64(2.0 * x2)) - x1) / fma(x1, x1, 1.0)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(3.0 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_4 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), Float64(x1 + fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_0, 4.0, -6.0)), Float64(Float64(x1 * Float64(2.0 * t_0)) * Float64(t_0 + -3.0))), fma(t_4, t_0, (x1 ^ 3.0)))))); else tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-3.0 / x1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$4 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$0 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * t$95$0 + N[Power[x1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, x1 \cdot 3, 2 \cdot x2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := 3 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t\_4 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, x1 + \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_0, 4, -6\right), \left(x1 \cdot \left(2 \cdot t\_0\right)\right) \cdot \left(t\_0 + -3\right)\right), \mathsf{fma}\left(t\_4, t\_0, {x1}^{3}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{-3}{x1}\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
Simplified99.6%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 7.4%
associate-*r/7.4%
metadata-eval7.4%
Simplified7.4%
Taylor expanded in x1 around inf 98.5%
Taylor expanded in x1 around inf 98.5%
sub-neg98.5%
associate-*r/98.5%
metadata-eval98.5%
distribute-neg-frac98.5%
metadata-eval98.5%
Simplified98.5%
Final simplification99.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
(t_4 (* t_1 t_3))
(t_5 (* (* (* x1 2.0) t_3) (- t_3 3.0)))
(t_6 (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
(if (<=
(+
x1
(+
(+
x1
(+ (+ (* t_2 (+ t_5 (* (* x1 x1) (- (* t_3 4.0) 6.0)))) t_4) t_0))
t_6))
INFINITY)
(+
x1
(+
t_6
(+
x1
(+
t_0
(+
t_4
(*
t_2
(+
t_5
(*
(* x1 x1)
(-
(*
4.0
(/ (fma 3.0 (pow x1 2.0) (- (* 2.0 x2) x1)) (fma x1 x1 1.0)))
6.0)))))))))
(* (pow x1 4.0) (+ 6.0 (/ -3.0 x1))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 3.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
double t_4 = t_1 * t_3;
double t_5 = ((x1 * 2.0) * t_3) * (t_3 - 3.0);
double t_6 = 3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2);
double tmp;
if ((x1 + ((x1 + (((t_2 * (t_5 + ((x1 * x1) * ((t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= ((double) INFINITY)) {
tmp = x1 + (t_6 + (x1 + (t_0 + (t_4 + (t_2 * (t_5 + ((x1 * x1) * ((4.0 * (fma(3.0, pow(x1, 2.0), ((2.0 * x2) - x1)) / fma(x1, x1, 1.0))) - 6.0))))))));
} else {
tmp = pow(x1, 4.0) * (6.0 + (-3.0 / x1));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2) t_4 = Float64(t_1 * t_3) t_5 = Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) t_6 = Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_2 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)))) + t_4) + t_0)) + t_6)) <= Inf) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_0 + Float64(t_4 + Float64(t_2 * Float64(t_5 + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * Float64(fma(3.0, (x1 ^ 2.0), Float64(Float64(2.0 * x2) - x1)) / fma(x1, x1, 1.0))) - 6.0))))))))); else tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-3.0 / x1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$2 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$0 + N[(t$95$4 + N[(t$95$2 * N[(t$95$5 + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * N[(N[(3.0 * N[Power[x1, 2.0], $MachinePrecision] + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_4 := t\_1 \cdot t\_3\\
t_5 := \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right)\\
t_6 := 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_2 \cdot \left(t\_5 + \left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right)\right) + t\_4\right) + t\_0\right)\right) + t\_6\right) \leq \infty:\\
\;\;\;\;x1 + \left(t\_6 + \left(x1 + \left(t\_0 + \left(t\_4 + t\_2 \cdot \left(t\_5 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\mathsf{fma}\left(3, {x1}^{2}, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)} - 6\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{-3}{x1}\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
fma-define99.4%
*-un-lft-identity99.4%
associate--l+99.4%
associate-*r*99.5%
fma-define99.5%
pow299.5%
Applied egg-rr99.5%
*-lft-identity99.5%
Simplified99.5%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 7.4%
associate-*r/7.4%
metadata-eval7.4%
Simplified7.4%
Taylor expanded in x1 around inf 98.5%
Taylor expanded in x1 around inf 98.5%
sub-neg98.5%
associate-*r/98.5%
metadata-eval98.5%
distribute-neg-frac98.5%
metadata-eval98.5%
Simplified98.5%
Final simplification99.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3
(+
x1
(+
(+
x1
(+
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 t_2))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
(if (<= t_3 INFINITY) t_3 (* (pow x1 4.0) (+ 6.0 (/ -3.0 x1))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = pow(x1, 4.0) * (6.0 + (-3.0 / x1));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = Math.pow(x1, 4.0) * (6.0 + (-3.0 / x1));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))) tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = math.pow(x1, 4.0) * (6.0 + (-3.0 / x1)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * t_2)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-3.0 / x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 + ((x1 + (((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * t_2)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = (x1 ^ 4.0) * (6.0 + (-3.0 / x1)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 + \left(\left(x1 + \left(\left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot t\_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{-3}{x1}\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf 7.4%
associate-*r/7.4%
metadata-eval7.4%
Simplified7.4%
Taylor expanded in x1 around inf 98.5%
Taylor expanded in x1 around inf 98.5%
sub-neg98.5%
associate-*r/98.5%
metadata-eval98.5%
distribute-neg-frac98.5%
metadata-eval98.5%
Simplified98.5%
Final simplification99.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -2e+95) (not (<= x1 1e+58)))
(* (pow x1 4.0) (+ 6.0 (/ -3.0 x1)))
(+
x1
(+
(+
x1
(+
(* x1 (* x1 x1))
(+
(*
t_1
(+
(* (* (* x1 2.0) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* t_2 4.0) 6.0))))
(* t_0 (- (* 2.0 x2) x1)))))
(*
3.0
(+ (* x2 -2.0) (* x1 (+ (* x1 (- (+ x1 3.0) (* x2 -2.0))) -1.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -2e+95) || !(x1 <= 1e+58)) {
tmp = pow(x1, 4.0) * (6.0 + (-3.0 / x1));
} else {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * ((2.0 * x2) - x1))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * ((x1 + 3.0) - (x2 * -2.0))) + -1.0)))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-2d+95)) .or. (.not. (x1 <= 1d+58))) then
tmp = (x1 ** 4.0d0) * (6.0d0 + ((-3.0d0) / x1))
else
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)))) + (t_0 * ((2.0d0 * x2) - x1))))) + (3.0d0 * ((x2 * (-2.0d0)) + (x1 * ((x1 * ((x1 + 3.0d0) - (x2 * (-2.0d0)))) + (-1.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -2e+95) || !(x1 <= 1e+58)) {
tmp = Math.pow(x1, 4.0) * (6.0 + (-3.0 / x1));
} else {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * ((2.0 * x2) - x1))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * ((x1 + 3.0) - (x2 * -2.0))) + -1.0)))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -2e+95) or not (x1 <= 1e+58): tmp = math.pow(x1, 4.0) * (6.0 + (-3.0 / x1)) else: tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * ((2.0 * x2) - x1))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * ((x1 + 3.0) - (x2 * -2.0))) + -1.0))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -2e+95) || !(x1 <= 1e+58)) tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-3.0 / x1))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)))) + Float64(t_0 * Float64(Float64(2.0 * x2) - x1))))) + Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(x1 + 3.0) - Float64(x2 * -2.0))) + -1.0)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -2e+95) || ~((x1 <= 1e+58))) tmp = (x1 ^ 4.0) * (6.0 + (-3.0 / x1)); else tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + ((t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((t_2 * 4.0) - 6.0)))) + (t_0 * ((2.0 * x2) - x1))))) + (3.0 * ((x2 * -2.0) + (x1 * ((x1 * ((x1 + 3.0) - (x2 * -2.0))) + -1.0))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -2e+95], N[Not[LessEqual[x1, 1e+58]], $MachinePrecision]], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(x1 + 3.0), $MachinePrecision] - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -2 \cdot 10^{+95} \lor \neg \left(x1 \leq 10^{+58}\right):\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{-3}{x1}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right)\right) + t\_0 \cdot \left(2 \cdot x2 - x1\right)\right)\right)\right) + 3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(x1 \cdot \left(\left(x1 + 3\right) - x2 \cdot -2\right) + -1\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.00000000000000004e95 or 9.99999999999999944e57 < x1 Initial program 26.8%
Taylor expanded in x1 around inf 31.3%
associate-*r/31.3%
metadata-eval31.3%
Simplified31.3%
Taylor expanded in x1 around inf 98.0%
Taylor expanded in x1 around inf 98.0%
sub-neg98.0%
associate-*r/98.0%
metadata-eval98.0%
distribute-neg-frac98.0%
metadata-eval98.0%
Simplified98.0%
if -2.00000000000000004e95 < x1 < 9.99999999999999944e57Initial program 99.4%
Taylor expanded in x1 around 0 96.6%
+-commutative96.6%
mul-1-neg96.6%
sub-neg96.6%
Simplified96.6%
Taylor expanded in x1 around 0 97.5%
Final simplification97.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -4e+105) (not (<= x1 1e+58)))
(* (pow x1 4.0) (+ 6.0 (/ -3.0 x1)))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 t_2)
(*
t_1
(+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -4e+105) || !(x1 <= 1e+58)) {
tmp = pow(x1, 4.0) * (6.0 + (-3.0 / x1));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-4d+105)) .or. (.not. (x1 <= 1d+58))) then
tmp = (x1 ** 4.0d0) * (6.0d0 + ((-3.0d0) / x1))
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -4e+105) || !(x1 <= 1e+58)) {
tmp = Math.pow(x1, 4.0) * (6.0 + (-3.0 / x1));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -4e+105) or not (x1 <= 1e+58): tmp = math.pow(x1, 4.0) * (6.0 + (-3.0 / x1)) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -4e+105) || !(x1 <= 1e+58)) tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-3.0 / x1))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * t_2) + Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -4e+105) || ~((x1 <= 1e+58))) tmp = (x1 ^ 4.0) * (6.0 + (-3.0 / x1)); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * t_2) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -4e+105], N[Not[LessEqual[x1, 1e+58]], $MachinePrecision]], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$2), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -4 \cdot 10^{+105} \lor \neg \left(x1 \leq 10^{+58}\right):\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{-3}{x1}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot t\_2 + t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -3.9999999999999998e105 or 9.99999999999999944e57 < x1 Initial program 26.8%
Taylor expanded in x1 around inf 31.3%
associate-*r/31.3%
metadata-eval31.3%
Simplified31.3%
Taylor expanded in x1 around inf 98.0%
Taylor expanded in x1 around inf 98.0%
sub-neg98.0%
associate-*r/98.0%
metadata-eval98.0%
distribute-neg-frac98.0%
metadata-eval98.0%
Simplified98.0%
if -3.9999999999999998e105 < x1 < 9.99999999999999944e57Initial program 99.4%
fma-define99.4%
*-un-lft-identity99.4%
associate--l+99.4%
associate-*r*99.4%
fma-define99.4%
pow299.4%
Applied egg-rr99.4%
*-lft-identity99.4%
Simplified99.4%
Taylor expanded in x1 around inf 97.4%
Final simplification97.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(if (or (<= x1 -8.2e+91) (not (<= x1 4.2e+76)))
(* (pow x1 4.0) (+ 6.0 (/ -3.0 x1)))
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+
x1
(+
(* x1 (* x1 x1))
(+
(* t_0 (- (* 2.0 x2) x1))
(*
t_1
(+ (* (* (* x1 2.0) t_2) (- t_2 3.0)) (* (* x1 x1) 6.0)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -8.2e+91) || !(x1 <= 4.2e+76)) {
tmp = pow(x1, 4.0) * (6.0 + (-3.0 / x1));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
if ((x1 <= (-8.2d+91)) .or. (.not. (x1 <= 4.2d+76))) then
tmp = (x1 ** 4.0d0) * (6.0d0 + ((-3.0d0) / x1))
else
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0d0 * x2) - x1)) + (t_1 * ((((x1 * 2.0d0) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double tmp;
if ((x1 <= -8.2e+91) || !(x1 <= 4.2e+76)) {
tmp = Math.pow(x1, 4.0) * (6.0 + (-3.0 / x1));
} else {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 tmp = 0 if (x1 <= -8.2e+91) or not (x1 <= 4.2e+76): tmp = math.pow(x1, 4.0) * (6.0 + (-3.0 / x1)) else: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) tmp = 0.0 if ((x1 <= -8.2e+91) || !(x1 <= 4.2e+76)) tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-3.0 / x1))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) + Float64(Float64(t_0 * Float64(Float64(2.0 * x2) - x1)) + Float64(t_1 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = 0.0; if ((x1 <= -8.2e+91) || ~((x1 <= 4.2e+76))) tmp = (x1 ^ 4.0) * (6.0 + (-3.0 / x1)); else tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + ((x1 * (x1 * x1)) + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * ((((x1 * 2.0) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * 6.0))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[x1, -8.2e+91], N[Not[LessEqual[x1, 4.2e+76]], $MachinePrecision]], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
\mathbf{if}\;x1 \leq -8.2 \cdot 10^{+91} \lor \neg \left(x1 \leq 4.2 \cdot 10^{+76}\right):\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{-3}{x1}\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t\_0 \cdot \left(2 \cdot x2 - x1\right) + t\_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -8.2000000000000005e91 or 4.20000000000000013e76 < x1 Initial program 21.8%
Taylor expanded in x1 around inf 27.6%
associate-*r/27.6%
metadata-eval27.6%
Simplified27.6%
Taylor expanded in x1 around inf 98.9%
Taylor expanded in x1 around inf 98.9%
sub-neg98.9%
associate-*r/98.9%
metadata-eval98.9%
distribute-neg-frac98.9%
metadata-eval98.9%
Simplified98.9%
if -8.2000000000000005e91 < x1 < 4.20000000000000013e76Initial program 99.4%
fma-define99.4%
*-un-lft-identity99.4%
associate--l+99.4%
associate-*r*99.4%
fma-define99.4%
pow299.4%
Applied egg-rr99.4%
*-lft-identity99.4%
Simplified99.4%
Taylor expanded in x1 around inf 97.0%
Taylor expanded in x1 around 0 95.9%
+-commutative96.2%
mul-1-neg96.2%
sub-neg96.2%
Simplified95.9%
Final simplification96.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0))
(t_4
(+
x1
(+
(+
x1
(+
t_1
(+
(* t_2 t_3)
(*
t_0
(+ (* (* (* x1 2.0) t_3) (- t_3 3.0)) (* (* x1 x1) 6.0))))))
9.0))))
(if (<= x1 -5.6e+102)
(+ x1 (+ (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0)) (* x2 -6.0)))
(if (<= x1 -0.00045)
t_4
(if (<= x1 4.3e-5)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 7.3e+99)
t_4
(+
x1
(+
(+ x1 (+ t_1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0))))))
9.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = x1 + ((x1 + (t_1 + ((t_2 * t_3) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))) + 9.0);
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -0.00045) {
tmp = t_4;
} else if (x1 <= 4.3e-5) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 7.3e+99) {
tmp = t_4;
} else {
tmp = x1 + ((x1 + (t_1 + (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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
t_4 = x1 + ((x1 + (t_1 + ((t_2 * t_3) + (t_0 * ((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))) + 9.0d0)
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= (-0.00045d0)) then
tmp = t_4
else if (x1 <= 4.3d-5) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 7.3d+99) then
tmp = t_4
else
tmp = x1 + ((x1 + (t_1 + (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 t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = x1 + ((x1 + (t_1 + ((t_2 * t_3) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))) + 9.0);
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -0.00045) {
tmp = t_4;
} else if (x1 <= 4.3e-5) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 7.3e+99) {
tmp = t_4;
} else {
tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0 t_4 = x1 + ((x1 + (t_1 + ((t_2 * t_3) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))) + 9.0) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)) elif x1 <= -0.00045: tmp = t_4 elif x1 <= 4.3e-5: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 7.3e+99: tmp = t_4 else: tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.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(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * t_3) + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))) + 9.0)) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= -0.00045) tmp = t_4; elseif (x1 <= 4.3e-5) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 7.3e+99) tmp = t_4; else tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + 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) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0; t_4 = x1 + ((x1 + (t_1 + ((t_2 * t_3) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))) + 9.0); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)); elseif (x1 <= -0.00045) tmp = t_4; elseif (x1 <= 4.3e-5) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 7.3e+99) tmp = t_4; else tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.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[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.00045], t$95$4, If[LessEqual[x1, 4.3e-5], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.3e+99], t$95$4, N[(x1 + N[(N[(x1 + 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] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_0}\\
t_4 := x1 + \left(\left(x1 + \left(t\_1 + \left(t\_2 \cdot t\_3 + t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right) + 9\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq -0.00045:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 7.3 \cdot 10^{+99}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right) + 9\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around inf 14.7%
associate-*r/14.7%
metadata-eval14.7%
Simplified14.7%
Taylor expanded in x1 around 0 74.2%
if -5.60000000000000037e102 < x1 < -4.4999999999999999e-4 or 4.3000000000000002e-5 < x1 < 7.2999999999999998e99Initial program 99.2%
fma-define99.2%
*-un-lft-identity99.2%
associate--l+99.2%
associate-*r*99.5%
fma-define99.5%
pow299.5%
Applied egg-rr99.5%
*-lft-identity99.5%
Simplified99.5%
Taylor expanded in x1 around inf 93.2%
Taylor expanded in x1 around inf 93.2%
if -4.4999999999999999e-4 < x1 < 4.3000000000000002e-5Initial program 99.5%
Taylor expanded in x1 around 0 89.3%
Taylor expanded in x2 around 0 99.0%
if 7.2999999999999998e99 < x1 Initial program 26.1%
Taylor expanded in x1 around 0 2.2%
+-commutative2.2%
mul-1-neg2.2%
sub-neg2.2%
Simplified2.2%
Taylor expanded in x1 around 0 26.1%
Taylor expanded in x1 around inf 97.8%
Final simplification94.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* (* x1 x1) 6.0))
(t_3 (* x1 (* x1 3.0)))
(t_4 (/ (- (+ t_3 (* 2.0 x2)) x1) t_0))
(t_5 (- t_4 3.0))
(t_6 (* t_3 t_4)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0)) (* x2 -6.0)))
(if (<= x1 -7.4)
(+
x1
(+
(+ x1 (+ t_1 (+ t_6 (* t_0 (+ (* (* (* x1 2.0) t_4) t_5) t_2)))))
9.0))
(if (<= x1 7.3e+99)
(+
x1
(+
(* 3.0 (/ (- (- t_3 (* 2.0 x2)) x1) t_0))
(+
x1
(+
t_1
(+ t_6 (* t_0 (+ t_2 (* t_5 (* (* x1 2.0) (* 2.0 x2))))))))))
(+
x1
(+ (+ x1 (+ t_1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))) 9.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = (x1 * x1) * 6.0;
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double t_5 = t_4 - 3.0;
double t_6 = t_3 * t_4;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -7.4) {
tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * ((((x1 * 2.0) * t_4) * t_5) + t_2))))) + 9.0);
} else if (x1 <= 7.3e+99) {
tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_6 + (t_0 * (t_2 + (t_5 * ((x1 * 2.0) * (2.0 * x2)))))))));
} else {
tmp = x1 + ((x1 + (t_1 + (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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = (x1 * x1) * 6.0d0
t_3 = x1 * (x1 * 3.0d0)
t_4 = ((t_3 + (2.0d0 * x2)) - x1) / t_0
t_5 = t_4 - 3.0d0
t_6 = t_3 * t_4
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= (-7.4d0)) then
tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * ((((x1 * 2.0d0) * t_4) * t_5) + t_2))))) + 9.0d0)
else if (x1 <= 7.3d+99) then
tmp = x1 + ((3.0d0 * (((t_3 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_6 + (t_0 * (t_2 + (t_5 * ((x1 * 2.0d0) * (2.0d0 * x2)))))))))
else
tmp = x1 + ((x1 + (t_1 + (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 t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = (x1 * x1) * 6.0;
double t_3 = x1 * (x1 * 3.0);
double t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0;
double t_5 = t_4 - 3.0;
double t_6 = t_3 * t_4;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -7.4) {
tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * ((((x1 * 2.0) * t_4) * t_5) + t_2))))) + 9.0);
} else if (x1 <= 7.3e+99) {
tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_6 + (t_0 * (t_2 + (t_5 * ((x1 * 2.0) * (2.0 * x2)))))))));
} else {
tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = (x1 * x1) * 6.0 t_3 = x1 * (x1 * 3.0) t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0 t_5 = t_4 - 3.0 t_6 = t_3 * t_4 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)) elif x1 <= -7.4: tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * ((((x1 * 2.0) * t_4) * t_5) + t_2))))) + 9.0) elif x1 <= 7.3e+99: tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_6 + (t_0 * (t_2 + (t_5 * ((x1 * 2.0) * (2.0 * x2))))))))) else: tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.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(Float64(x1 * x1) * 6.0) t_3 = Float64(x1 * Float64(x1 * 3.0)) t_4 = Float64(Float64(Float64(t_3 + Float64(2.0 * x2)) - x1) / t_0) t_5 = Float64(t_4 - 3.0) t_6 = Float64(t_3 * t_4) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= -7.4) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + Float64(t_6 + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * t_5) + t_2))))) + 9.0)); elseif (x1 <= 7.3e+99) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_3 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(t_1 + Float64(t_6 + Float64(t_0 * Float64(t_2 + Float64(t_5 * Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)))))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + 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) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = (x1 * x1) * 6.0; t_3 = x1 * (x1 * 3.0); t_4 = ((t_3 + (2.0 * x2)) - x1) / t_0; t_5 = t_4 - 3.0; t_6 = t_3 * t_4; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)); elseif (x1 <= -7.4) tmp = x1 + ((x1 + (t_1 + (t_6 + (t_0 * ((((x1 * 2.0) * t_4) * t_5) + t_2))))) + 9.0); elseif (x1 <= 7.3e+99) tmp = x1 + ((3.0 * (((t_3 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + (t_6 + (t_0 * (t_2 + (t_5 * ((x1 * 2.0) * (2.0 * x2))))))))); else tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.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[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 - 3.0), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$3 * t$95$4), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -7.4], N[(x1 + N[(N[(x1 + N[(t$95$1 + N[(t$95$6 + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * t$95$5), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.3e+99], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$3 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 + N[(t$95$6 + N[(t$95$0 * N[(t$95$2 + N[(t$95$5 * N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + 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] + 9.0), $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 := \left(x1 \cdot x1\right) \cdot 6\\
t_3 := x1 \cdot \left(x1 \cdot 3\right)\\
t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_0}\\
t_5 := t\_4 - 3\\
t_6 := t\_3 \cdot t\_4\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq -7.4:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_1 + \left(t\_6 + t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_4\right) \cdot t\_5 + t\_2\right)\right)\right)\right) + 9\right)\\
\mathbf{elif}\;x1 \leq 7.3 \cdot 10^{+99}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(t\_1 + \left(t\_6 + t\_0 \cdot \left(t\_2 + t\_5 \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right) + 9\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around inf 14.7%
associate-*r/14.7%
metadata-eval14.7%
Simplified14.7%
Taylor expanded in x1 around 0 74.2%
if -5.60000000000000037e102 < x1 < -7.4000000000000004Initial program 99.3%
fma-define99.3%
*-un-lft-identity99.3%
associate--l+99.3%
associate-*r*99.4%
fma-define99.4%
pow299.4%
Applied egg-rr99.4%
*-lft-identity99.4%
Simplified99.4%
Taylor expanded in x1 around inf 95.7%
Taylor expanded in x1 around inf 95.7%
if -7.4000000000000004 < x1 < 7.2999999999999998e99Initial program 99.4%
fma-define99.4%
*-un-lft-identity99.4%
associate--l+99.4%
associate-*r*99.5%
fma-define99.5%
pow299.5%
Applied egg-rr99.5%
*-lft-identity99.5%
Simplified99.5%
Taylor expanded in x1 around inf 97.3%
Taylor expanded in x1 around 0 95.6%
if 7.2999999999999998e99 < x1 Initial program 26.1%
Taylor expanded in x1 around 0 2.2%
+-commutative2.2%
mul-1-neg2.2%
sub-neg2.2%
Simplified2.2%
Taylor expanded in x1 around 0 26.1%
Taylor expanded in x1 around inf 97.8%
Final simplification93.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0)) (* x2 -6.0)))
(if (<= x1 4.5e+92)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+
x1
(+
t_1
(+
(* t_2 (- (* 2.0 x2) x1))
(*
t_0
(+ (* (* (* x1 2.0) t_3) (- t_3 3.0)) (* (* x1 x1) 6.0))))))))
(+
x1
(+ (+ x1 (+ t_1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))) 9.0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 4.5e+92) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((t_2 * ((2.0 * x2) - x1)) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((x1 + (t_1 + (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) :: 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 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= 4.5d+92) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((t_2 * ((2.0d0 * x2) - x1)) + (t_0 * ((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 + ((x1 + (t_1 + (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 t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 4.5e+92) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((t_2 * ((2.0 * x2) - x1)) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)) elif x1 <= 4.5e+92: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((t_2 * ((2.0 * x2) - x1)) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0))))))) else: tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.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(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= 4.5e+92) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * Float64(Float64(2.0 * x2) - x1)) + Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + 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) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)); elseif (x1 <= 4.5e+92) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((t_2 * ((2.0 * x2) - x1)) + (t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0))))))); else tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.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[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+92], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + 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] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+92}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(t\_1 + \left(t\_2 \cdot \left(2 \cdot x2 - x1\right) + t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right) + 9\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around inf 14.7%
associate-*r/14.7%
metadata-eval14.7%
Simplified14.7%
Taylor expanded in x1 around 0 74.2%
if -5.60000000000000037e102 < x1 < 4.4999999999999999e92Initial program 99.4%
fma-define99.4%
*-un-lft-identity99.4%
associate--l+99.4%
associate-*r*99.4%
fma-define99.4%
pow299.4%
Applied egg-rr99.4%
*-lft-identity99.4%
Simplified99.4%
Taylor expanded in x1 around inf 97.0%
Taylor expanded in x1 around 0 96.0%
+-commutative96.3%
mul-1-neg96.3%
sub-neg96.3%
Simplified96.0%
if 4.4999999999999999e92 < x1 Initial program 32.0%
Taylor expanded in x1 around 0 6.0%
+-commutative6.0%
mul-1-neg6.0%
sub-neg6.0%
Simplified6.0%
Taylor expanded in x1 around 0 28.4%
Taylor expanded in x1 around inf 94.4%
Final simplification92.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0))
(t_4
(+
x1
(+
t_1
(+
(* t_2 (- (* 2.0 x2) x1))
(*
t_0
(+
(* (* x1 x1) (- (* t_3 4.0) 6.0))
(* (- t_3 3.0) (* (* x1 2.0) (* 2.0 x2))))))))))
(if (<= x1 -3.15e+119)
(+ x1 (+ (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0)) (* x2 -6.0)))
(if (<= x1 -1.0)
(+ x1 (+ t_4 (* 3.0 (* x2 -2.0))))
(if (<= x1 4.3e-5)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 4.5e+92)
(+ x1 (+ 9.0 t_4))
(+
x1
(+
(+ x1 (+ t_1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0))))))
9.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = x1 + (t_1 + ((t_2 * ((2.0 * x2) - x1)) + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * ((x1 * 2.0) * (2.0 * x2)))))));
double tmp;
if (x1 <= -3.15e+119) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -1.0) {
tmp = x1 + (t_4 + (3.0 * (x2 * -2.0)));
} else if (x1 <= 4.3e-5) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 4.5e+92) {
tmp = x1 + (9.0 + t_4);
} else {
tmp = x1 + ((x1 + (t_1 + (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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * x1)
t_2 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
t_4 = x1 + (t_1 + ((t_2 * ((2.0d0 * x2) - x1)) + (t_0 * (((x1 * x1) * ((t_3 * 4.0d0) - 6.0d0)) + ((t_3 - 3.0d0) * ((x1 * 2.0d0) * (2.0d0 * x2)))))))
if (x1 <= (-3.15d+119)) then
tmp = x1 + ((x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= (-1.0d0)) then
tmp = x1 + (t_4 + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 4.3d-5) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 4.5d+92) then
tmp = x1 + (9.0d0 + t_4)
else
tmp = x1 + ((x1 + (t_1 + (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 t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double t_4 = x1 + (t_1 + ((t_2 * ((2.0 * x2) - x1)) + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * ((x1 * 2.0) * (2.0 * x2)))))));
double tmp;
if (x1 <= -3.15e+119) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -1.0) {
tmp = x1 + (t_4 + (3.0 * (x2 * -2.0)));
} else if (x1 <= 4.3e-5) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 4.5e+92) {
tmp = x1 + (9.0 + t_4);
} else {
tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0 t_4 = x1 + (t_1 + ((t_2 * ((2.0 * x2) - x1)) + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * ((x1 * 2.0) * (2.0 * x2))))))) tmp = 0 if x1 <= -3.15e+119: tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)) elif x1 <= -1.0: tmp = x1 + (t_4 + (3.0 * (x2 * -2.0))) elif x1 <= 4.3e-5: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 4.5e+92: tmp = x1 + (9.0 + t_4) else: tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.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(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) t_4 = Float64(x1 + Float64(t_1 + Float64(Float64(t_2 * Float64(Float64(2.0 * x2) - x1)) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_3 * 4.0) - 6.0)) + Float64(Float64(t_3 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)))))))) tmp = 0.0 if (x1 <= -3.15e+119) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= -1.0) tmp = Float64(x1 + Float64(t_4 + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 4.3e-5) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 4.5e+92) tmp = Float64(x1 + Float64(9.0 + t_4)); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + 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) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0; t_4 = x1 + (t_1 + ((t_2 * ((2.0 * x2) - x1)) + (t_0 * (((x1 * x1) * ((t_3 * 4.0) - 6.0)) + ((t_3 - 3.0) * ((x1 * 2.0) * (2.0 * x2))))))); tmp = 0.0; if (x1 <= -3.15e+119) tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)); elseif (x1 <= -1.0) tmp = x1 + (t_4 + (3.0 * (x2 * -2.0))); elseif (x1 <= 4.3e-5) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 4.5e+92) tmp = x1 + (9.0 + t_4); else tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.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[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(t$95$1 + N[(N[(t$95$2 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$3 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$3 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.15e+119], N[(x1 + N[(N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.0], N[(x1 + N[(t$95$4 + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.3e-5], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+92], N[(x1 + N[(9.0 + t$95$4), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + 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] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_0}\\
t_4 := x1 + \left(t\_1 + \left(t\_2 \cdot \left(2 \cdot x2 - x1\right) + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_3 \cdot 4 - 6\right) + \left(t\_3 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -3.15 \cdot 10^{+119}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq -1:\\
\;\;\;\;x1 + \left(t\_4 + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+92}:\\
\;\;\;\;x1 + \left(9 + t\_4\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right) + 9\right)\\
\end{array}
\end{array}
if x1 < -3.1499999999999999e119Initial program 0.0%
Taylor expanded in x1 around inf 12.1%
associate-*r/12.1%
metadata-eval12.1%
Simplified12.1%
Taylor expanded in x1 around 0 76.4%
if -3.1499999999999999e119 < x1 < -1Initial program 94.5%
Taylor expanded in x1 around 0 78.1%
+-commutative78.1%
mul-1-neg78.1%
sub-neg78.1%
Simplified78.1%
Taylor expanded in x1 around 0 55.5%
Taylor expanded in x1 around 0 55.5%
*-commutative55.5%
Simplified55.5%
if -1 < x1 < 4.3000000000000002e-5Initial program 99.5%
Taylor expanded in x1 around 0 89.3%
Taylor expanded in x2 around 0 99.0%
if 4.3000000000000002e-5 < x1 < 4.4999999999999999e92Initial program 99.1%
Taylor expanded in x1 around 0 93.0%
+-commutative93.0%
mul-1-neg93.0%
sub-neg93.0%
Simplified93.0%
Taylor expanded in x1 around 0 82.6%
Taylor expanded in x1 around inf 82.6%
if 4.4999999999999999e92 < x1 Initial program 32.0%
Taylor expanded in x1 around 0 6.0%
+-commutative6.0%
mul-1-neg6.0%
sub-neg6.0%
Simplified6.0%
Taylor expanded in x1 around 0 28.4%
Taylor expanded in x1 around inf 94.4%
Final simplification90.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
(t_3 (* x1 (* x1 x1)))
(t_4
(+
x1
(+
9.0
(+
x1
(+
t_3
(+
(* t_0 (- (* 2.0 x2) x1))
(*
t_1
(+
(* (* x1 x1) (- (* t_2 4.0) 6.0))
(* (- t_2 3.0) (* (* x1 2.0) (* 2.0 x2))))))))))))
(if (<= x1 -3.15e+119)
(+ x1 (+ (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0)) (* x2 -6.0)))
(if (<= x1 -0.45)
t_4
(if (<= x1 4.3e-5)
(+
x1
(+
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))
(+ x1 (* 4.0 (* x2 (+ (* x1 -3.0) (* 2.0 (* x1 x2))))))))
(if (<= x1 4.5e+92)
t_4
(+
x1
(+
(+ x1 (+ t_3 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0))))))
9.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 * (x1 * x1);
double t_4 = x1 + (9.0 + (x1 + (t_3 + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * (2.0 * x2)))))))));
double tmp;
if (x1 <= -3.15e+119) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -0.45) {
tmp = t_4;
} else if (x1 <= 4.3e-5) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 4.5e+92) {
tmp = t_4;
} else {
tmp = x1 + ((x1 + (t_3 + (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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
t_3 = x1 * (x1 * x1)
t_4 = x1 + (9.0d0 + (x1 + (t_3 + ((t_0 * ((2.0d0 * x2) - x1)) + (t_1 * (((x1 * x1) * ((t_2 * 4.0d0) - 6.0d0)) + ((t_2 - 3.0d0) * ((x1 * 2.0d0) * (2.0d0 * x2)))))))))
if (x1 <= (-3.15d+119)) then
tmp = x1 + ((x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= (-0.45d0)) then
tmp = t_4
else if (x1 <= 4.3d-5) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)) + (x1 + (4.0d0 * (x2 * ((x1 * (-3.0d0)) + (2.0d0 * (x1 * x2)))))))
else if (x1 <= 4.5d+92) then
tmp = t_4
else
tmp = x1 + ((x1 + (t_3 + (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 t_0 = x1 * (x1 * 3.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
double t_3 = x1 * (x1 * x1);
double t_4 = x1 + (9.0 + (x1 + (t_3 + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * (2.0 * x2)))))))));
double tmp;
if (x1 <= -3.15e+119) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= -0.45) {
tmp = t_4;
} else if (x1 <= 4.3e-5) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2)))))));
} else if (x1 <= 4.5e+92) {
tmp = t_4;
} else {
tmp = x1 + ((x1 + (t_3 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 t_3 = x1 * (x1 * x1) t_4 = x1 + (9.0 + (x1 + (t_3 + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * (2.0 * x2))))))))) tmp = 0 if x1 <= -3.15e+119: tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)) elif x1 <= -0.45: tmp = t_4 elif x1 <= 4.3e-5: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))) elif x1 <= 4.5e+92: tmp = t_4 else: tmp = x1 + ((x1 + (t_3 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) t_3 = Float64(x1 * Float64(x1 * x1)) t_4 = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_3 + Float64(Float64(t_0 * Float64(Float64(2.0 * x2) - x1)) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(Float64(t_2 * 4.0) - 6.0)) + Float64(Float64(t_2 - 3.0) * Float64(Float64(x1 * 2.0) * Float64(2.0 * x2)))))))))) tmp = 0.0 if (x1 <= -3.15e+119) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= -0.45) tmp = t_4; elseif (x1 <= 4.3e-5) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * -3.0) + Float64(2.0 * Float64(x1 * x2)))))))); elseif (x1 <= 4.5e+92) tmp = t_4; else tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_3 + 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) t_0 = x1 * (x1 * 3.0); t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; t_3 = x1 * (x1 * x1); t_4 = x1 + (9.0 + (x1 + (t_3 + ((t_0 * ((2.0 * x2) - x1)) + (t_1 * (((x1 * x1) * ((t_2 * 4.0) - 6.0)) + ((t_2 - 3.0) * ((x1 * 2.0) * (2.0 * x2))))))))); tmp = 0.0; if (x1 <= -3.15e+119) tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)); elseif (x1 <= -0.45) tmp = t_4; elseif (x1 <= 4.3e-5) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)) + (x1 + (4.0 * (x2 * ((x1 * -3.0) + (2.0 * (x1 * x2))))))); elseif (x1 <= 4.5e+92) tmp = t_4; else tmp = x1 + ((x1 + (t_3 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(9.0 + N[(x1 + N[(t$95$3 + N[(N[(t$95$0 * N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(N[(t$95$2 * 4.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.15e+119], N[(x1 + N[(N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.45], t$95$4, If[LessEqual[x1, 4.3e-5], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * -3.0), $MachinePrecision] + N[(2.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+92], t$95$4, N[(x1 + N[(N[(x1 + N[(t$95$3 + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
t_3 := x1 \cdot \left(x1 \cdot x1\right)\\
t_4 := x1 + \left(9 + \left(x1 + \left(t\_3 + \left(t\_0 \cdot \left(2 \cdot x2 - x1\right) + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(t\_2 \cdot 4 - 6\right) + \left(t\_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -3.15 \cdot 10^{+119}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq -0.45:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x1 \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot -3 + 2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+92}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_3 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right) + 9\right)\\
\end{array}
\end{array}
if x1 < -3.1499999999999999e119Initial program 0.0%
Taylor expanded in x1 around inf 12.1%
associate-*r/12.1%
metadata-eval12.1%
Simplified12.1%
Taylor expanded in x1 around 0 76.4%
if -3.1499999999999999e119 < x1 < -0.450000000000000011 or 4.3000000000000002e-5 < x1 < 4.4999999999999999e92Initial program 97.0%
Taylor expanded in x1 around 0 86.4%
+-commutative86.4%
mul-1-neg86.4%
sub-neg86.4%
Simplified86.4%
Taylor expanded in x1 around 0 70.5%
Taylor expanded in x1 around inf 70.5%
if -0.450000000000000011 < x1 < 4.3000000000000002e-5Initial program 99.5%
Taylor expanded in x1 around 0 89.3%
Taylor expanded in x2 around 0 99.0%
if 4.4999999999999999e92 < x1 Initial program 32.0%
Taylor expanded in x1 around 0 6.0%
+-commutative6.0%
mul-1-neg6.0%
sub-neg6.0%
Simplified6.0%
Taylor expanded in x1 around 0 28.4%
Taylor expanded in x1 around inf 94.4%
Final simplification90.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 x1)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (/ (- (+ t_2 (* 2.0 x2)) x1) t_0)))
(if (<= x1 -5.6e+102)
(+ x1 (+ (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0)) (* x2 -6.0)))
(if (<= x1 4.5e+92)
(+
x1
(+
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(+
x1
(+
t_1
(+
(* t_0 (+ (* (* (* x1 2.0) t_3) (- t_3 3.0)) (* (* x1 x1) 6.0)))
(* t_2 (* 2.0 x2)))))))
(+
x1
(+ (+ x1 (+ t_1 (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0)))))) 9.0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 4.5e+92) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0))) + (t_2 * (2.0 * x2))))));
} else {
tmp = x1 + ((x1 + (t_1 + (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) :: 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 = x1 * (x1 * 3.0d0)
t_3 = ((t_2 + (2.0d0 * x2)) - x1) / t_0
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= 4.5d+92) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((t_0 * ((((x1 * 2.0d0) * t_3) * (t_3 - 3.0d0)) + ((x1 * x1) * 6.0d0))) + (t_2 * (2.0d0 * x2))))))
else
tmp = x1 + ((x1 + (t_1 + (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 t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * x1);
double t_2 = x1 * (x1 * 3.0);
double t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 4.5e+92) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0))) + (t_2 * (2.0 * x2))))));
} else {
tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * x1) t_2 = x1 * (x1 * 3.0) t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)) elif x1 <= 4.5e+92: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0))) + (t_2 * (2.0 * x2)))))) else: tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.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(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= 4.5e+92) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) + Float64(x1 + Float64(t_1 + Float64(Float64(t_0 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * 6.0))) + Float64(t_2 * Float64(2.0 * x2))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_1 + 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) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * x1); t_2 = x1 * (x1 * 3.0); t_3 = ((t_2 + (2.0 * x2)) - x1) / t_0; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)); elseif (x1 <= 4.5e+92) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) + (x1 + (t_1 + ((t_0 * ((((x1 * 2.0) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * 6.0))) + (t_2 * (2.0 * x2)))))); else tmp = x1 + ((x1 + (t_1 + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.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[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+92], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(t$95$1 + N[(N[(t$95$0 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + 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] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_0}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+92}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0} + \left(x1 + \left(t\_1 + \left(t\_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right) + t\_2 \cdot \left(2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_1 + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right) + 9\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around inf 14.7%
associate-*r/14.7%
metadata-eval14.7%
Simplified14.7%
Taylor expanded in x1 around 0 74.2%
if -5.60000000000000037e102 < x1 < 4.4999999999999999e92Initial program 99.4%
fma-define99.4%
*-un-lft-identity99.4%
associate--l+99.4%
associate-*r*99.4%
fma-define99.4%
pow299.4%
Applied egg-rr99.4%
*-lft-identity99.4%
Simplified99.4%
Taylor expanded in x1 around inf 97.0%
Taylor expanded in x1 around 0 95.9%
if 4.4999999999999999e92 < x1 Initial program 32.0%
Taylor expanded in x1 around 0 6.0%
+-commutative6.0%
mul-1-neg6.0%
sub-neg6.0%
Simplified6.0%
Taylor expanded in x1 around 0 28.4%
Taylor expanded in x1 around inf 94.4%
Final simplification92.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+ (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))) (* x2 -6.0))))
(if (<= x1 -3.4e+91)
(* x2 (- -6.0 (/ x1 x2)))
(if (<= x1 -4e-144)
t_0
(if (<= x1 3.9e-263)
(- (* x2 -6.0) x1)
(if (<= x1 2.3e+102) t_0 (* x2 (- (/ x1 x2) 6.0))))))))
double code(double x1, double x2) {
double t_0 = (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) + (x2 * -6.0);
double tmp;
if (x1 <= -3.4e+91) {
tmp = x2 * (-6.0 - (x1 / x2));
} else if (x1 <= -4e-144) {
tmp = t_0;
} else if (x1 <= 3.9e-263) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 2.3e+102) {
tmp = t_0;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = (x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))) + (x2 * (-6.0d0))
if (x1 <= (-3.4d+91)) then
tmp = x2 * ((-6.0d0) - (x1 / x2))
else if (x1 <= (-4d-144)) then
tmp = t_0
else if (x1 <= 3.9d-263) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 2.3d+102) then
tmp = t_0
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) + (x2 * -6.0);
double tmp;
if (x1 <= -3.4e+91) {
tmp = x2 * (-6.0 - (x1 / x2));
} else if (x1 <= -4e-144) {
tmp = t_0;
} else if (x1 <= 3.9e-263) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 2.3e+102) {
tmp = t_0;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) + (x2 * -6.0) tmp = 0 if x1 <= -3.4e+91: tmp = x2 * (-6.0 - (x1 / x2)) elif x1 <= -4e-144: tmp = t_0 elif x1 <= 3.9e-263: tmp = (x2 * -6.0) - x1 elif x1 <= 2.3e+102: tmp = t_0 else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(x2 * -6.0)) tmp = 0.0 if (x1 <= -3.4e+91) tmp = Float64(x2 * Float64(-6.0 - Float64(x1 / x2))); elseif (x1 <= -4e-144) tmp = t_0; elseif (x1 <= 3.9e-263) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 2.3e+102) tmp = t_0; else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) + (x2 * -6.0); tmp = 0.0; if (x1 <= -3.4e+91) tmp = x2 * (-6.0 - (x1 / x2)); elseif (x1 <= -4e-144) tmp = t_0; elseif (x1 <= 3.9e-263) tmp = (x2 * -6.0) - x1; elseif (x1 <= 2.3e+102) tmp = t_0; else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.4e+91], N[(x2 * N[(-6.0 - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4e-144], t$95$0, If[LessEqual[x1, 3.9e-263], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 2.3e+102], t$95$0, N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x2 \cdot -6\\
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+91}:\\
\;\;\;\;x2 \cdot \left(-6 - \frac{x1}{x2}\right)\\
\mathbf{elif}\;x1 \leq -4 \cdot 10^{-144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{-263}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 2.3 \cdot 10^{+102}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -3.4000000000000001e91Initial program 2.9%
Taylor expanded in x1 around inf 17.1%
associate-*r/17.1%
metadata-eval17.1%
Simplified17.1%
Taylor expanded in x1 around 0 6.1%
fma-define6.1%
*-commutative6.1%
Simplified6.1%
Taylor expanded in x2 around inf 3.5%
sub-neg3.5%
distribute-lft1-in43.5%
metadata-eval43.5%
metadata-eval43.5%
+-commutative43.5%
mul-1-neg43.5%
unsub-neg43.5%
Simplified43.5%
if -3.4000000000000001e91 < x1 < -3.9999999999999998e-144 or 3.8999999999999997e-263 < x1 < 2.2999999999999999e102Initial program 99.4%
Taylor expanded in x1 around 0 92.7%
+-commutative92.7%
mul-1-neg92.7%
sub-neg92.7%
Simplified92.7%
Taylor expanded in x1 around 0 65.3%
Taylor expanded in x1 around 0 64.4%
Taylor expanded in x1 around 0 64.4%
if -3.9999999999999998e-144 < x1 < 3.8999999999999997e-263Initial program 99.4%
Taylor expanded in x1 around inf 98.8%
associate-*r/98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in x1 around 0 99.0%
fma-define99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in x1 around 0 99.0%
*-commutative99.0%
neg-mul-199.0%
unsub-neg99.0%
Simplified99.0%
if 2.2999999999999999e102 < x1 Initial program 24.4%
Taylor expanded in x1 around inf 24.4%
associate-*r/24.4%
metadata-eval24.4%
Simplified24.4%
Taylor expanded in x1 around 0 5.8%
*-commutative5.8%
Simplified5.8%
Taylor expanded in x2 around inf 43.4%
Final simplification64.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))))
(if (<= x1 -3.5e+91)
(* x2 (- -6.0 (/ x1 x2)))
(if (<= x1 -1.85e-75)
t_0
(if (<= x1 1.5e-124)
(- (* x2 -6.0) x1)
(if (<= x1 5.5e+101) t_0 (* x2 (- (/ x1 x2) 6.0))))))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
double tmp;
if (x1 <= -3.5e+91) {
tmp = x2 * (-6.0 - (x1 / x2));
} else if (x1 <= -1.85e-75) {
tmp = t_0;
} else if (x1 <= 1.5e-124) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 5.5e+101) {
tmp = t_0;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
if (x1 <= (-3.5d+91)) then
tmp = x2 * ((-6.0d0) - (x1 / x2))
else if (x1 <= (-1.85d-75)) then
tmp = t_0
else if (x1 <= 1.5d-124) then
tmp = (x2 * (-6.0d0)) - x1
else if (x1 <= 5.5d+101) then
tmp = t_0
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
double tmp;
if (x1 <= -3.5e+91) {
tmp = x2 * (-6.0 - (x1 / x2));
} else if (x1 <= -1.85e-75) {
tmp = t_0;
} else if (x1 <= 1.5e-124) {
tmp = (x2 * -6.0) - x1;
} else if (x1 <= 5.5e+101) {
tmp = t_0;
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) tmp = 0 if x1 <= -3.5e+91: tmp = x2 * (-6.0 - (x1 / x2)) elif x1 <= -1.85e-75: tmp = t_0 elif x1 <= 1.5e-124: tmp = (x2 * -6.0) - x1 elif x1 <= 5.5e+101: tmp = t_0 else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) tmp = 0.0 if (x1 <= -3.5e+91) tmp = Float64(x2 * Float64(-6.0 - Float64(x1 / x2))); elseif (x1 <= -1.85e-75) tmp = t_0; elseif (x1 <= 1.5e-124) tmp = Float64(Float64(x2 * -6.0) - x1); elseif (x1 <= 5.5e+101) tmp = t_0; else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); tmp = 0.0; if (x1 <= -3.5e+91) tmp = x2 * (-6.0 - (x1 / x2)); elseif (x1 <= -1.85e-75) tmp = t_0; elseif (x1 <= 1.5e-124) tmp = (x2 * -6.0) - x1; elseif (x1 <= 5.5e+101) tmp = t_0; else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.5e+91], N[(x2 * N[(-6.0 - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.85e-75], t$95$0, If[LessEqual[x1, 1.5e-124], N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision], If[LessEqual[x1, 5.5e+101], t$95$0, N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{if}\;x1 \leq -3.5 \cdot 10^{+91}:\\
\;\;\;\;x2 \cdot \left(-6 - \frac{x1}{x2}\right)\\
\mathbf{elif}\;x1 \leq -1.85 \cdot 10^{-75}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.5 \cdot 10^{-124}:\\
\;\;\;\;x2 \cdot -6 - x1\\
\mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+101}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < -3.50000000000000001e91Initial program 2.9%
Taylor expanded in x1 around inf 17.1%
associate-*r/17.1%
metadata-eval17.1%
Simplified17.1%
Taylor expanded in x1 around 0 6.1%
fma-define6.1%
*-commutative6.1%
Simplified6.1%
Taylor expanded in x2 around inf 3.5%
sub-neg3.5%
distribute-lft1-in43.5%
metadata-eval43.5%
metadata-eval43.5%
+-commutative43.5%
mul-1-neg43.5%
unsub-neg43.5%
Simplified43.5%
if -3.50000000000000001e91 < x1 < -1.85000000000000012e-75 or 1.5e-124 < x1 < 5.50000000000000018e101Initial program 99.2%
Taylor expanded in x1 around 0 88.8%
+-commutative88.8%
mul-1-neg88.8%
sub-neg88.8%
Simplified88.8%
Taylor expanded in x1 around 0 55.3%
Taylor expanded in x1 around 0 53.8%
Taylor expanded in x1 around inf 50.9%
if -1.85000000000000012e-75 < x1 < 1.5e-124Initial program 99.5%
Taylor expanded in x1 around inf 84.6%
associate-*r/84.6%
metadata-eval84.6%
Simplified84.6%
Taylor expanded in x1 around 0 84.8%
fma-define84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in x1 around 0 84.8%
*-commutative84.8%
neg-mul-184.8%
unsub-neg84.8%
Simplified84.8%
if 5.50000000000000018e101 < x1 Initial program 24.4%
Taylor expanded in x1 around inf 24.4%
associate-*r/24.4%
metadata-eval24.4%
Simplified24.4%
Taylor expanded in x1 around 0 5.8%
*-commutative5.8%
Simplified5.8%
Taylor expanded in x2 around inf 43.4%
Final simplification61.3%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -2.9e+46)
(+ x1 (+ (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0)) (* x2 -6.0)))
(if (<= x1 0.185)
(+ x1 (+ (* x1 -2.0) (* x2 (- (+ (* x1 -12.0) (* (* x1 x2) 8.0)) 6.0))))
(+
x1
(+
(+ x1 (+ (* x1 (* x1 x1)) (* 4.0 (* x1 (* x2 (- (* 2.0 x2) 3.0))))))
9.0)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -2.9e+46) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 0.185) {
tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0)));
} else {
tmp = x1 + ((x1 + ((x1 * (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.9d+46)) then
tmp = x1 + ((x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)) + (x2 * (-6.0d0)))
else if (x1 <= 0.185d0) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (((x1 * (-12.0d0)) + ((x1 * x2) * 8.0d0)) - 6.0d0)))
else
tmp = x1 + ((x1 + ((x1 * (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.9e+46) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else if (x1 <= 0.185) {
tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0)));
} else {
tmp = x1 + ((x1 + ((x1 * (x1 * x1)) + (4.0 * (x1 * (x2 * ((2.0 * x2) - 3.0)))))) + 9.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -2.9e+46: tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)) elif x1 <= 0.185: tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0))) else: tmp = x1 + ((x1 + ((x1 * (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.9e+46) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)) + Float64(x2 * -6.0))); elseif (x1 <= 0.185) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(Float64(x1 * x2) * 8.0)) - 6.0)))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * 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.9e+46) tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)); elseif (x1 <= 0.185) tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0))); else tmp = x1 + ((x1 + ((x1 * (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.9e+46], N[(x1 + N[(N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.185], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(N[(x1 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x1 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -2.9 \cdot 10^{+46}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right) + x2 \cdot -6\right)\\
\mathbf{elif}\;x1 \leq 0.185:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(\left(x1 \cdot -12 + \left(x1 \cdot x2\right) \cdot 8\right) - 6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right) + 9\right)\\
\end{array}
\end{array}
if x1 < -2.9000000000000002e46Initial program 14.9%
Taylor expanded in x1 around inf 25.0%
associate-*r/25.0%
metadata-eval25.0%
Simplified25.0%
Taylor expanded in x1 around 0 66.2%
if -2.9000000000000002e46 < x1 < 0.185Initial program 99.4%
Taylor expanded in x1 around 0 96.8%
+-commutative96.8%
mul-1-neg96.8%
sub-neg96.8%
Simplified96.8%
Taylor expanded in x1 around 0 82.8%
Taylor expanded in x1 around 0 82.8%
Taylor expanded in x2 around 0 91.5%
if 0.185 < x1 Initial program 54.4%
Taylor expanded in x1 around 0 34.9%
+-commutative34.9%
mul-1-neg34.9%
sub-neg34.9%
Simplified34.9%
Taylor expanded in x1 around 0 27.7%
Taylor expanded in x1 around inf 71.7%
Final simplification81.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 -12.0) (* (* x1 x2) 8.0))))
(if (<= x2 -1.5)
(+ x1 (+ (* x1 -2.0) (* x2 (- t_0 6.0))))
(if (<= x2 9e+77)
(+ x1 (+ (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0)) (* x2 -6.0)))
(+ x1 (+ (+ (* x1 -2.0) (* x2 t_0)) (* x2 -6.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * -12.0) + ((x1 * x2) * 8.0);
double tmp;
if (x2 <= -1.5) {
tmp = x1 + ((x1 * -2.0) + (x2 * (t_0 - 6.0)));
} else if (x2 <= 9e+77) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else {
tmp = x1 + (((x1 * -2.0) + (x2 * t_0)) + (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = (x1 * (-12.0d0)) + ((x1 * x2) * 8.0d0)
if (x2 <= (-1.5d0)) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (t_0 - 6.0d0)))
else if (x2 <= 9d+77) then
tmp = x1 + ((x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)) + (x2 * (-6.0d0)))
else
tmp = x1 + (((x1 * (-2.0d0)) + (x2 * t_0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * -12.0) + ((x1 * x2) * 8.0);
double tmp;
if (x2 <= -1.5) {
tmp = x1 + ((x1 * -2.0) + (x2 * (t_0 - 6.0)));
} else if (x2 <= 9e+77) {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
} else {
tmp = x1 + (((x1 * -2.0) + (x2 * t_0)) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * -12.0) + ((x1 * x2) * 8.0) tmp = 0 if x2 <= -1.5: tmp = x1 + ((x1 * -2.0) + (x2 * (t_0 - 6.0))) elif x2 <= 9e+77: tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)) else: tmp = x1 + (((x1 * -2.0) + (x2 * t_0)) + (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * -12.0) + Float64(Float64(x1 * x2) * 8.0)) tmp = 0.0 if (x2 <= -1.5) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(t_0 - 6.0)))); elseif (x2 <= 9e+77) tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)) + Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(Float64(Float64(x1 * -2.0) + Float64(x2 * t_0)) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * -12.0) + ((x1 * x2) * 8.0); tmp = 0.0; if (x2 <= -1.5) tmp = x1 + ((x1 * -2.0) + (x2 * (t_0 - 6.0))); elseif (x2 <= 9e+77) tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)); else tmp = x1 + (((x1 * -2.0) + (x2 * t_0)) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * -12.0), $MachinePrecision] + N[(N[(x1 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -1.5], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(t$95$0 - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 9e+77], N[(x1 + N[(N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot -12 + \left(x1 \cdot x2\right) \cdot 8\\
\mathbf{if}\;x2 \leq -1.5:\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(t\_0 - 6\right)\right)\\
\mathbf{elif}\;x2 \leq 9 \cdot 10^{+77}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right) + x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 \cdot -2 + x2 \cdot t\_0\right) + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x2 < -1.5Initial program 73.6%
Taylor expanded in x1 around 0 64.1%
+-commutative64.1%
mul-1-neg64.1%
sub-neg64.1%
Simplified64.1%
Taylor expanded in x1 around 0 51.9%
Taylor expanded in x1 around 0 61.5%
Taylor expanded in x2 around 0 71.8%
if -1.5 < x2 < 9.00000000000000049e77Initial program 69.3%
Taylor expanded in x1 around inf 69.4%
associate-*r/69.4%
metadata-eval69.4%
Simplified69.4%
Taylor expanded in x1 around 0 76.9%
if 9.00000000000000049e77 < x2 Initial program 85.5%
Taylor expanded in x1 around 0 76.5%
+-commutative76.5%
mul-1-neg76.5%
sub-neg76.5%
Simplified76.5%
Taylor expanded in x1 around 0 58.3%
Taylor expanded in x1 around 0 60.6%
Taylor expanded in x2 around 0 73.8%
Final simplification75.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.5) (not (<= x2 3.5e+76))) (+ x1 (+ (* x1 -2.0) (* x2 (- (+ (* x1 -12.0) (* (* x1 x2) 8.0)) 6.0)))) (+ x1 (+ (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0)) (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.5) || !(x2 <= 3.5e+76)) {
tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0)));
} else {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-1.5d0)) .or. (.not. (x2 <= 3.5d+76))) then
tmp = x1 + ((x1 * (-2.0d0)) + (x2 * (((x1 * (-12.0d0)) + ((x1 * x2) * 8.0d0)) - 6.0d0)))
else
tmp = x1 + ((x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.5) || !(x2 <= 3.5e+76)) {
tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0)));
} else {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.5) or not (x2 <= 3.5e+76): tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0))) else: tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.5) || !(x2 <= 3.5e+76)) tmp = Float64(x1 + Float64(Float64(x1 * -2.0) + Float64(x2 * Float64(Float64(Float64(x1 * -12.0) + Float64(Float64(x1 * x2) * 8.0)) - 6.0)))); else tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.5) || ~((x2 <= 3.5e+76))) tmp = x1 + ((x1 * -2.0) + (x2 * (((x1 * -12.0) + ((x1 * x2) * 8.0)) - 6.0))); else tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.5], N[Not[LessEqual[x2, 3.5e+76]], $MachinePrecision]], N[(x1 + N[(N[(x1 * -2.0), $MachinePrecision] + N[(x2 * N[(N[(N[(x1 * -12.0), $MachinePrecision] + N[(N[(x1 * x2), $MachinePrecision] * 8.0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.5 \lor \neg \left(x2 \leq 3.5 \cdot 10^{+76}\right):\\
\;\;\;\;x1 + \left(x1 \cdot -2 + x2 \cdot \left(\left(x1 \cdot -12 + \left(x1 \cdot x2\right) \cdot 8\right) - 6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right) + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x2 < -1.5 or 3.5e76 < x2 Initial program 78.2%
Taylor expanded in x1 around 0 68.9%
+-commutative68.9%
mul-1-neg68.9%
sub-neg68.9%
Simplified68.9%
Taylor expanded in x1 around 0 54.4%
Taylor expanded in x1 around 0 61.2%
Taylor expanded in x2 around 0 72.6%
if -1.5 < x2 < 3.5e76Initial program 69.3%
Taylor expanded in x1 around inf 69.4%
associate-*r/69.4%
metadata-eval69.4%
Simplified69.4%
Taylor expanded in x1 around 0 76.9%
Final simplification75.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.5) (not (<= x2 2.8e+79))) (+ (* x1 (+ -1.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0))))) (* x2 -6.0)) (+ x1 (+ (* x1 (- (* 3.0 (* x1 (- 3.0 (* x2 -2.0)))) 2.0)) (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.5) || !(x2 <= 2.8e+79)) {
tmp = (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) + (x2 * -6.0);
} else {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-1.5d0)) .or. (.not. (x2 <= 2.8d+79))) then
tmp = (x1 * ((-1.0d0) + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))) + (x2 * (-6.0d0))
else
tmp = x1 + ((x1 * ((3.0d0 * (x1 * (3.0d0 - (x2 * (-2.0d0))))) - 2.0d0)) + (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.5) || !(x2 <= 2.8e+79)) {
tmp = (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) + (x2 * -6.0);
} else {
tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.5) or not (x2 <= 2.8e+79): tmp = (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) + (x2 * -6.0) else: tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.5) || !(x2 <= 2.8e+79)) tmp = Float64(Float64(x1 * Float64(-1.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))) + Float64(x2 * -6.0)); else tmp = Float64(x1 + Float64(Float64(x1 * Float64(Float64(3.0 * Float64(x1 * Float64(3.0 - Float64(x2 * -2.0)))) - 2.0)) + Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.5) || ~((x2 <= 2.8e+79))) tmp = (x1 * (-1.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))))) + (x2 * -6.0); else tmp = x1 + ((x1 * ((3.0 * (x1 * (3.0 - (x2 * -2.0)))) - 2.0)) + (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.5], N[Not[LessEqual[x2, 2.8e+79]], $MachinePrecision]], N[(N[(x1 * N[(-1.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * N[(N[(3.0 * N[(x1 * N[(3.0 - N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.5 \lor \neg \left(x2 \leq 2.8 \cdot 10^{+79}\right):\\
\;\;\;\;x1 \cdot \left(-1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot \left(3 \cdot \left(x1 \cdot \left(3 - x2 \cdot -2\right)\right) - 2\right) + x2 \cdot -6\right)\\
\end{array}
\end{array}
if x2 < -1.5 or 2.8000000000000001e79 < x2 Initial program 78.2%
Taylor expanded in x1 around 0 68.9%
+-commutative68.9%
mul-1-neg68.9%
sub-neg68.9%
Simplified68.9%
Taylor expanded in x1 around 0 54.4%
Taylor expanded in x1 around 0 61.2%
Taylor expanded in x1 around 0 61.2%
if -1.5 < x2 < 2.8000000000000001e79Initial program 69.3%
Taylor expanded in x1 around inf 69.4%
associate-*r/69.4%
metadata-eval69.4%
Simplified69.4%
Taylor expanded in x1 around 0 76.9%
Final simplification70.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -4.7e-129) (not (<= x2 1.95e-247))) (+ x1 (* x2 -6.0)) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -4.7e-129) || !(x2 <= 1.95e-247)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = -x1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-4.7d-129)) .or. (.not. (x2 <= 1.95d-247))) then
tmp = x1 + (x2 * (-6.0d0))
else
tmp = -x1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -4.7e-129) || !(x2 <= 1.95e-247)) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -4.7e-129) or not (x2 <= 1.95e-247): tmp = x1 + (x2 * -6.0) else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -4.7e-129) || !(x2 <= 1.95e-247)) tmp = Float64(x1 + Float64(x2 * -6.0)); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -4.7e-129) || ~((x2 <= 1.95e-247))) tmp = x1 + (x2 * -6.0); else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -4.7e-129], N[Not[LessEqual[x2, 1.95e-247]], $MachinePrecision]], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -4.7 \cdot 10^{-129} \lor \neg \left(x2 \leq 1.95 \cdot 10^{-247}\right):\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -4.7000000000000002e-129 or 1.9500000000000001e-247 < x2 Initial program 74.4%
Taylor expanded in x1 around inf 51.3%
associate-*r/51.3%
metadata-eval51.3%
Simplified51.3%
Taylor expanded in x1 around 0 34.5%
*-commutative34.5%
Simplified34.5%
if -4.7000000000000002e-129 < x2 < 1.9500000000000001e-247Initial program 67.3%
Taylor expanded in x1 around inf 73.5%
associate-*r/73.5%
metadata-eval73.5%
Simplified73.5%
Taylor expanded in x1 around 0 40.9%
fma-define40.9%
*-commutative40.9%
Simplified40.9%
Taylor expanded in x1 around inf 32.2%
neg-mul-132.2%
Simplified32.2%
Final simplification34.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -5e-129) (not (<= x2 3.6e-216))) (* x2 -6.0) (- x1)))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -5e-129) || !(x2 <= 3.6e-216)) {
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 <= (-5d-129)) .or. (.not. (x2 <= 3.6d-216))) 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 <= -5e-129) || !(x2 <= 3.6e-216)) {
tmp = x2 * -6.0;
} else {
tmp = -x1;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -5e-129) or not (x2 <= 3.6e-216): tmp = x2 * -6.0 else: tmp = -x1 return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -5e-129) || !(x2 <= 3.6e-216)) tmp = Float64(x2 * -6.0); else tmp = Float64(-x1); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -5e-129) || ~((x2 <= 3.6e-216))) tmp = x2 * -6.0; else tmp = -x1; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -5e-129], N[Not[LessEqual[x2, 3.6e-216]], $MachinePrecision]], N[(x2 * -6.0), $MachinePrecision], (-x1)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -5 \cdot 10^{-129} \lor \neg \left(x2 \leq 3.6 \cdot 10^{-216}\right):\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;-x1\\
\end{array}
\end{array}
if x2 < -5.00000000000000027e-129 or 3.5999999999999999e-216 < x2 Initial program 75.0%
Taylor expanded in x1 around inf 51.6%
associate-*r/51.6%
metadata-eval51.6%
Simplified51.6%
Taylor expanded in x1 around 0 35.0%
*-commutative35.0%
Simplified35.0%
Taylor expanded in x1 around 0 34.6%
*-commutative34.6%
Simplified34.6%
if -5.00000000000000027e-129 < x2 < 3.5999999999999999e-216Initial program 65.3%
Taylor expanded in x1 around inf 71.2%
associate-*r/71.2%
metadata-eval71.2%
Simplified71.2%
Taylor expanded in x1 around 0 38.7%
fma-define38.7%
*-commutative38.7%
Simplified38.7%
Taylor expanded in x1 around inf 30.5%
neg-mul-130.5%
Simplified30.5%
Final simplification33.7%
(FPCore (x1 x2) :precision binary64 (if (<= x1 4.3e-5) (* x2 (- -6.0 (/ x1 x2))) (* x2 (- (/ x1 x2) 6.0))))
double code(double x1, double x2) {
double tmp;
if (x1 <= 4.3e-5) {
tmp = x2 * (-6.0 - (x1 / x2));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= 4.3d-5) then
tmp = x2 * ((-6.0d0) - (x1 / x2))
else
tmp = x2 * ((x1 / x2) - 6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= 4.3e-5) {
tmp = x2 * (-6.0 - (x1 / x2));
} else {
tmp = x2 * ((x1 / x2) - 6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= 4.3e-5: tmp = x2 * (-6.0 - (x1 / x2)) else: tmp = x2 * ((x1 / x2) - 6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= 4.3e-5) tmp = Float64(x2 * Float64(-6.0 - Float64(x1 / x2))); else tmp = Float64(x2 * Float64(Float64(x1 / x2) - 6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= 4.3e-5) tmp = x2 * (-6.0 - (x1 / x2)); else tmp = x2 * ((x1 / x2) - 6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, 4.3e-5], N[(x2 * N[(-6.0 - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x1 / x2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;x2 \cdot \left(-6 - \frac{x1}{x2}\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot \left(\frac{x1}{x2} - 6\right)\\
\end{array}
\end{array}
if x1 < 4.3000000000000002e-5Initial program 80.6%
Taylor expanded in x1 around inf 61.0%
associate-*r/61.0%
metadata-eval61.0%
Simplified61.0%
Taylor expanded in x1 around 0 54.5%
fma-define54.5%
*-commutative54.5%
Simplified54.5%
Taylor expanded in x2 around inf 54.0%
sub-neg54.0%
distribute-lft1-in62.3%
metadata-eval62.3%
metadata-eval62.3%
+-commutative62.3%
mul-1-neg62.3%
unsub-neg62.3%
Simplified62.3%
if 4.3000000000000002e-5 < x1 Initial program 55.0%
Taylor expanded in x1 around inf 42.8%
associate-*r/42.8%
metadata-eval42.8%
Simplified42.8%
Taylor expanded in x1 around 0 5.3%
*-commutative5.3%
Simplified5.3%
Taylor expanded in x2 around inf 30.2%
(FPCore (x1 x2) :precision binary64 (* x2 (- -6.0 (/ x1 x2))))
double code(double x1, double x2) {
return x2 * (-6.0 - (x1 / x2));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * ((-6.0d0) - (x1 / x2))
end function
public static double code(double x1, double x2) {
return x2 * (-6.0 - (x1 / x2));
}
def code(x1, x2): return x2 * (-6.0 - (x1 / x2))
function code(x1, x2) return Float64(x2 * Float64(-6.0 - Float64(x1 / x2))) end
function tmp = code(x1, x2) tmp = x2 * (-6.0 - (x1 / x2)); end
code[x1_, x2_] := N[(x2 * N[(-6.0 - N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot \left(-6 - \frac{x1}{x2}\right)
\end{array}
Initial program 73.0%
Taylor expanded in x1 around inf 55.6%
associate-*r/55.6%
metadata-eval55.6%
Simplified55.6%
Taylor expanded in x1 around 0 38.7%
fma-define38.7%
*-commutative38.7%
Simplified38.7%
Taylor expanded in x2 around inf 38.3%
sub-neg38.3%
distribute-lft1-in44.2%
metadata-eval44.2%
metadata-eval44.2%
+-commutative44.2%
mul-1-neg44.2%
unsub-neg44.2%
Simplified44.2%
(FPCore (x1 x2) :precision binary64 (- (* x2 -6.0) x1))
double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = (x2 * (-6.0d0)) - x1
end function
public static double code(double x1, double x2) {
return (x2 * -6.0) - x1;
}
def code(x1, x2): return (x2 * -6.0) - x1
function code(x1, x2) return Float64(Float64(x2 * -6.0) - x1) end
function tmp = code(x1, x2) tmp = (x2 * -6.0) - x1; end
code[x1_, x2_] := N[(N[(x2 * -6.0), $MachinePrecision] - x1), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6 - x1
\end{array}
Initial program 73.0%
Taylor expanded in x1 around inf 55.6%
associate-*r/55.6%
metadata-eval55.6%
Simplified55.6%
Taylor expanded in x1 around 0 38.7%
fma-define38.7%
*-commutative38.7%
Simplified38.7%
Taylor expanded in x1 around 0 38.7%
*-commutative38.7%
neg-mul-138.7%
unsub-neg38.7%
Simplified38.7%
(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 73.0%
Taylor expanded in x1 around inf 55.6%
associate-*r/55.6%
metadata-eval55.6%
Simplified55.6%
Taylor expanded in x1 around 0 38.7%
fma-define38.7%
*-commutative38.7%
Simplified38.7%
Taylor expanded in x1 around inf 11.0%
neg-mul-111.0%
Simplified11.0%
(FPCore (x1 x2) :precision binary64 9.0)
double code(double x1, double x2) {
return 9.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = 9.0d0
end function
public static double code(double x1, double x2) {
return 9.0;
}
def code(x1, x2): return 9.0
function code(x1, x2) return 9.0 end
function tmp = code(x1, x2) tmp = 9.0; end
code[x1_, x2_] := 9.0
\begin{array}{l}
\\
9
\end{array}
Initial program 73.0%
Taylor expanded in x1 around inf 55.6%
associate-*r/55.6%
metadata-eval55.6%
Simplified55.6%
Taylor expanded in x1 around inf 44.5%
Taylor expanded in x1 around 0 3.7%
herbie shell --seed 2024095
(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))))))