
(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 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t_0 + 2 \cdot x2\right) - x1}{t_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) \cdot t_1 + t_0 \cdot t_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (fma x1 (* x1 3.0) (fma 2.0 x2 (- x1))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (+ t_2 (* 2.0 x2)))
(t_4 (/ (- x1 t_3) t_0)))
(if (<=
(+
x1
(-
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(-
(-
(+
(* t_2 t_4)
(*
t_0
(+
(* (- (/ (- t_3 x1) t_0) 3.0) (* (* x1 2.0) t_4))
(* (* x1 x1) (+ 6.0 (* 4.0 t_4))))))
(* x1 (* x1 x1)))
x1)))
INFINITY)
(+
x1
(fma
3.0
(/ (- t_2 (fma 2.0 x2 x1)) (fma x1 x1 1.0))
(fma
x1
(* x1 (/ t_1 (/ (fma x1 x1 1.0) 3.0)))
(*
(fma x1 x1 1.0)
(+
x1
(+
(* x1 (* x1 -6.0))
(*
(/ t_1 (fma x1 x1 1.0))
(+
(* x1 (+ -6.0 (/ t_1 (/ (fma x1 x1 1.0) 2.0))))
(* (* x1 x1) 4.0)))))))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = fma(x1, (x1 * 3.0), fma(2.0, x2, -x1));
double t_2 = x1 * (x1 * 3.0);
double t_3 = t_2 + (2.0 * x2);
double t_4 = (x1 - t_3) / t_0;
double tmp;
if ((x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) - ((((t_2 * t_4) + (t_0 * (((((t_3 - x1) / t_0) - 3.0) * ((x1 * 2.0) * t_4)) + ((x1 * x1) * (6.0 + (4.0 * t_4)))))) - (x1 * (x1 * x1))) - x1))) <= ((double) INFINITY)) {
tmp = x1 + fma(3.0, ((t_2 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, (x1 * (t_1 / (fma(x1, x1, 1.0) / 3.0))), (fma(x1, x1, 1.0) * (x1 + ((x1 * (x1 * -6.0)) + ((t_1 / fma(x1, x1, 1.0)) * ((x1 * (-6.0 + (t_1 / (fma(x1, x1, 1.0) / 2.0)))) + ((x1 * x1) * 4.0))))))));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = fma(x1, Float64(x1 * 3.0), fma(2.0, x2, Float64(-x1))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(t_2 + Float64(2.0 * x2)) t_4 = Float64(Float64(x1 - t_3) / t_0) tmp = 0.0 if (Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) - Float64(Float64(Float64(Float64(t_2 * t_4) + Float64(t_0 * Float64(Float64(Float64(Float64(Float64(t_3 - x1) / t_0) - 3.0) * Float64(Float64(x1 * 2.0) * t_4)) + Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4)))))) - Float64(x1 * Float64(x1 * x1))) - x1))) <= Inf) tmp = Float64(x1 + fma(3.0, Float64(Float64(t_2 - fma(2.0, x2, x1)) / fma(x1, x1, 1.0)), fma(x1, Float64(x1 * Float64(t_1 / Float64(fma(x1, x1, 1.0) / 3.0))), Float64(fma(x1, x1, 1.0) * Float64(x1 + Float64(Float64(x1 * Float64(x1 * -6.0)) + Float64(Float64(t_1 / fma(x1, x1, 1.0)) * Float64(Float64(x1 * Float64(-6.0 + Float64(t_1 / Float64(fma(x1, x1, 1.0) / 2.0)))) + Float64(Float64(x1 * x1) * 4.0))))))))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision] + N[(2.0 * x2 + (-x1)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 - t$95$3), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[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[(N[(N[(N[(t$95$2 * t$95$4), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(N[(N[(t$95$3 - x1), $MachinePrecision] / t$95$0), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(3.0 * N[(N[(t$95$2 - N[(2.0 * x2 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * N[(t$95$1 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 + N[(N[(x1 * N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(t$95$1 / N[(N[(x1 * x1 + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := t_2 + 2 \cdot x2\\
t_4 := \frac{x1 - t_3}{t_0}\\
\mathbf{if}\;x1 + \left(3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0} - \left(\left(\left(t_2 \cdot t_4 + t_0 \cdot \left(\left(\frac{t_3 - x1}{t_0} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t_4\right) + \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t_4\right)\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, \frac{t_2 - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot \frac{t_1}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{3}}, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{t_1}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{t_1}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.4%
Simplified99.8%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around inf 14.1%
*-commutative14.1%
Simplified14.1%
Taylor expanded in x1 around inf 100.0%
Final simplification99.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (+ t_1 (* 2.0 x2)))
(t_3 (/ (- x1 t_2) t_0))
(t_4
(*
t_0
(+
(* (- (/ (- t_2 x1) t_0) 3.0) (* (* x1 2.0) t_3))
(* (* x1 x1) (+ 6.0 (* 4.0 t_3))))))
(t_5 (* x1 (* x1 x1))))
(if (<=
(+
x1
(-
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))
(- (- (+ (* t_1 t_3) t_4) t_5) x1)))
INFINITY)
(+
x1
(+ (+ x1 (+ t_5 (- (* x1 (* x1 9.0)) t_4))) (+ (* x1 -3.0) (* x2 -6.0))))
(+ x1 (+ (+ x1 (* 6.0 (pow x1 4.0))) 9.0)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = t_1 + (2.0 * x2);
double t_3 = (x1 - t_2) / t_0;
double t_4 = t_0 * (((((t_2 - x1) / t_0) - 3.0) * ((x1 * 2.0) * t_3)) + ((x1 * x1) * (6.0 + (4.0 * t_3))));
double t_5 = x1 * (x1 * x1);
double tmp;
if ((x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) - ((((t_1 * t_3) + t_4) - t_5) - x1))) <= ((double) INFINITY)) {
tmp = x1 + ((x1 + (t_5 + ((x1 * (x1 * 9.0)) - t_4))) + ((x1 * -3.0) + (x2 * -6.0)));
} else {
tmp = x1 + ((x1 + (6.0 * pow(x1, 4.0))) + 9.0);
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = t_1 + (2.0 * x2);
double t_3 = (x1 - t_2) / t_0;
double t_4 = t_0 * (((((t_2 - x1) / t_0) - 3.0) * ((x1 * 2.0) * t_3)) + ((x1 * x1) * (6.0 + (4.0 * t_3))));
double t_5 = x1 * (x1 * x1);
double tmp;
if ((x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) - ((((t_1 * t_3) + t_4) - t_5) - x1))) <= Double.POSITIVE_INFINITY) {
tmp = x1 + ((x1 + (t_5 + ((x1 * (x1 * 9.0)) - t_4))) + ((x1 * -3.0) + (x2 * -6.0)));
} else {
tmp = x1 + ((x1 + (6.0 * Math.pow(x1, 4.0))) + 9.0);
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = t_1 + (2.0 * x2) t_3 = (x1 - t_2) / t_0 t_4 = t_0 * (((((t_2 - x1) / t_0) - 3.0) * ((x1 * 2.0) * t_3)) + ((x1 * x1) * (6.0 + (4.0 * t_3)))) t_5 = x1 * (x1 * x1) tmp = 0 if (x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) - ((((t_1 * t_3) + t_4) - t_5) - x1))) <= math.inf: tmp = x1 + ((x1 + (t_5 + ((x1 * (x1 * 9.0)) - t_4))) + ((x1 * -3.0) + (x2 * -6.0))) else: tmp = x1 + ((x1 + (6.0 * math.pow(x1, 4.0))) + 9.0) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(t_1 + Float64(2.0 * x2)) t_3 = Float64(Float64(x1 - t_2) / t_0) t_4 = Float64(t_0 * Float64(Float64(Float64(Float64(Float64(t_2 - x1) / t_0) - 3.0) * Float64(Float64(x1 * 2.0) * t_3)) + Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_3))))) t_5 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if (Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)) - Float64(Float64(Float64(Float64(t_1 * t_3) + t_4) - t_5) - x1))) <= Inf) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_5 + Float64(Float64(x1 * Float64(x1 * 9.0)) - t_4))) + Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)))); else tmp = Float64(x1 + Float64(Float64(x1 + Float64(6.0 * (x1 ^ 4.0))) + 9.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = t_1 + (2.0 * x2); t_3 = (x1 - t_2) / t_0; t_4 = t_0 * (((((t_2 - x1) / t_0) - 3.0) * ((x1 * 2.0) * t_3)) + ((x1 * x1) * (6.0 + (4.0 * t_3)))); t_5 = x1 * (x1 * x1); tmp = 0.0; if ((x1 + ((3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)) - ((((t_1 * t_3) + t_4) - t_5) - x1))) <= Inf) tmp = x1 + ((x1 + (t_5 + ((x1 * (x1 * 9.0)) - t_4))) + ((x1 * -3.0) + (x2 * -6.0))); else tmp = x1 + ((x1 + (6.0 * (x1 ^ 4.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 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 - t$95$2), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$0 * N[(N[(N[(N[(N[(t$95$2 - x1), $MachinePrecision] / t$95$0), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(t$95$1 * t$95$3), $MachinePrecision] + t$95$4), $MachinePrecision] - t$95$5), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(x1 + N[(t$95$5 + N[(N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 + N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := t_1 + 2 \cdot x2\\
t_3 := \frac{x1 - t_2}{t_0}\\
t_4 := t_0 \cdot \left(\left(\frac{t_2 - x1}{t_0} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t_3\right) + \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t_3\right)\right)\\
t_5 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 + \left(3 \cdot \frac{\left(t_1 - 2 \cdot x2\right) - x1}{t_0} - \left(\left(\left(t_1 \cdot t_3 + t_4\right) - t_5\right) - x1\right)\right) \leq \infty:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t_5 + \left(x1 \cdot \left(x1 \cdot 9\right) - t_4\right)\right)\right) + \left(x1 \cdot -3 + x2 \cdot -6\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 + 6 \cdot {x1}^{4}\right) + 9\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) < +inf.0Initial program 99.4%
Taylor expanded in x1 around inf 98.9%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around 0 99.4%
unpow299.4%
*-commutative99.4%
associate-*l*99.4%
Simplified99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 2 x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)) 3)) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 4 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))) 6))) (+.f64 (*.f64 x1 x1) 1)) (*.f64 (*.f64 (*.f64 3 x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1)))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 3 (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 3 x1) x1) (*.f64 2 x2)) x1) (+.f64 (*.f64 x1 x1) 1))))) Initial program 0.0%
Taylor expanded in x1 around inf 14.1%
*-commutative14.1%
Simplified14.1%
Taylor expanded in x1 around inf 100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 9.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (+ (* x1 -3.0) (* x2 -6.0)))
(t_3 (+ (* x1 (* x1 3.0)) (* 2.0 x2)))
(t_4 (* x1 (* x1 x1)))
(t_5 (/ (- x1 t_3) t_1)))
(if (<= x1 -5.6e+102)
(+
x1
(+
(* x2 (- (* x1 -12.0) 6.0))
(/ (* x1 (- x1 (* x1 9.0))) (+ x1 (* x1 3.0)))))
(if (<= x1 6e+102)
(+
x1
(+
(+
x1
(+
t_4
(-
t_0
(*
t_1
(+
(* (- (/ (- t_3 x1) t_1) 3.0) (* (* x1 2.0) t_5))
(* (* x1 x1) (+ 6.0 (* 4.0 t_5))))))))
t_2))
(+
x1
(-
t_2
(- (- (- (* (* x1 (* x1 6.0)) (- -1.0 (* x1 x1))) t_0) t_4) x1)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 9.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (x1 * -3.0) + (x2 * -6.0);
double t_3 = (x1 * (x1 * 3.0)) + (2.0 * x2);
double t_4 = x1 * (x1 * x1);
double t_5 = (x1 - t_3) / t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= 6e+102) {
tmp = x1 + ((x1 + (t_4 + (t_0 - (t_1 * (((((t_3 - x1) / t_1) - 3.0) * ((x1 * 2.0) * t_5)) + ((x1 * x1) * (6.0 + (4.0 * t_5)))))))) + t_2);
} else {
tmp = x1 + (t_2 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - t_0) - t_4) - x1));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = x1 * (x1 * 9.0d0)
t_1 = (x1 * x1) + 1.0d0
t_2 = (x1 * (-3.0d0)) + (x2 * (-6.0d0))
t_3 = (x1 * (x1 * 3.0d0)) + (2.0d0 * x2)
t_4 = x1 * (x1 * x1)
t_5 = (x1 - t_3) / t_1
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x2 * ((x1 * (-12.0d0)) - 6.0d0)) + ((x1 * (x1 - (x1 * 9.0d0))) / (x1 + (x1 * 3.0d0))))
else if (x1 <= 6d+102) then
tmp = x1 + ((x1 + (t_4 + (t_0 - (t_1 * (((((t_3 - x1) / t_1) - 3.0d0) * ((x1 * 2.0d0) * t_5)) + ((x1 * x1) * (6.0d0 + (4.0d0 * t_5)))))))) + t_2)
else
tmp = x1 + (t_2 - (((((x1 * (x1 * 6.0d0)) * ((-1.0d0) - (x1 * x1))) - t_0) - t_4) - x1))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 9.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (x1 * -3.0) + (x2 * -6.0);
double t_3 = (x1 * (x1 * 3.0)) + (2.0 * x2);
double t_4 = x1 * (x1 * x1);
double t_5 = (x1 - t_3) / t_1;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= 6e+102) {
tmp = x1 + ((x1 + (t_4 + (t_0 - (t_1 * (((((t_3 - x1) / t_1) - 3.0) * ((x1 * 2.0) * t_5)) + ((x1 * x1) * (6.0 + (4.0 * t_5)))))))) + t_2);
} else {
tmp = x1 + (t_2 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - t_0) - t_4) - x1));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 9.0) t_1 = (x1 * x1) + 1.0 t_2 = (x1 * -3.0) + (x2 * -6.0) t_3 = (x1 * (x1 * 3.0)) + (2.0 * x2) t_4 = x1 * (x1 * x1) t_5 = (x1 - t_3) / t_1 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))) elif x1 <= 6e+102: tmp = x1 + ((x1 + (t_4 + (t_0 - (t_1 * (((((t_3 - x1) / t_1) - 3.0) * ((x1 * 2.0) * t_5)) + ((x1 * x1) * (6.0 + (4.0 * t_5)))))))) + t_2) else: tmp = x1 + (t_2 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - t_0) - t_4) - x1)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 9.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)) t_3 = Float64(Float64(x1 * Float64(x1 * 3.0)) + Float64(2.0 * x2)) t_4 = Float64(x1 * Float64(x1 * x1)) t_5 = Float64(Float64(x1 - t_3) / t_1) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(Float64(x1 * Float64(x1 - Float64(x1 * 9.0))) / Float64(x1 + Float64(x1 * 3.0))))); elseif (x1 <= 6e+102) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_4 + Float64(t_0 - Float64(t_1 * Float64(Float64(Float64(Float64(Float64(t_3 - x1) / t_1) - 3.0) * Float64(Float64(x1 * 2.0) * t_5)) + Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5)))))))) + t_2)); else tmp = Float64(x1 + Float64(t_2 - Float64(Float64(Float64(Float64(Float64(x1 * Float64(x1 * 6.0)) * Float64(-1.0 - Float64(x1 * x1))) - t_0) - t_4) - x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 9.0); t_1 = (x1 * x1) + 1.0; t_2 = (x1 * -3.0) + (x2 * -6.0); t_3 = (x1 * (x1 * 3.0)) + (2.0 * x2); t_4 = x1 * (x1 * x1); t_5 = (x1 - t_3) / t_1; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))); elseif (x1 <= 6e+102) tmp = x1 + ((x1 + (t_4 + (t_0 - (t_1 * (((((t_3 - x1) / t_1) - 3.0) * ((x1 * 2.0) * t_5)) + ((x1 * x1) * (6.0 + (4.0 * t_5)))))))) + t_2); else tmp = x1 + (t_2 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - t_0) - t_4) - x1)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 - t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(x1 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6e+102], N[(x1 + N[(N[(x1 + N[(t$95$4 + N[(t$95$0 - N[(t$95$1 * N[(N[(N[(N[(N[(t$95$3 - x1), $MachinePrecision] / t$95$1), $MachinePrecision] - 3.0), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$2 - N[(N[(N[(N[(N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision] * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] - t$95$4), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 9\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot -3 + x2 \cdot -6\\
t_3 := x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\\
t_4 := x1 \cdot \left(x1 \cdot x1\right)\\
t_5 := \frac{x1 - t_3}{t_1}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(x1 \cdot -12 - 6\right) + \frac{x1 \cdot \left(x1 - x1 \cdot 9\right)}{x1 + x1 \cdot 3}\right)\\
\mathbf{elif}\;x1 \leq 6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t_4 + \left(t_0 - t_1 \cdot \left(\left(\frac{t_3 - x1}{t_1} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t_5\right) + \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t_5\right)\right)\right)\right)\right) + t_2\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t_2 - \left(\left(\left(\left(x1 \cdot \left(x1 \cdot 6\right)\right) \cdot \left(-1 - x1 \cdot x1\right) - t_0\right) - t_4\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.5%
+-commutative3.5%
*-commutative3.5%
fma-def3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x2 around 0 20.3%
flip-+5.4%
*-commutative5.4%
*-commutative5.4%
*-commutative5.4%
Applied egg-rr5.4%
swap-sqr5.4%
metadata-eval5.4%
associate-*r*5.4%
distribute-lft-out--69.7%
*-commutative69.7%
cancel-sign-sub-inv69.7%
metadata-eval69.7%
*-commutative69.7%
Simplified69.7%
if -5.60000000000000037e102 < x1 < 5.9999999999999996e102Initial program 99.4%
Taylor expanded in x1 around inf 98.8%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around 0 99.4%
unpow299.4%
*-commutative99.4%
associate-*l*99.4%
Simplified99.4%
if 5.9999999999999996e102 < x1 Initial program 21.6%
Taylor expanded in x1 around inf 21.6%
Taylor expanded in x1 around 0 21.6%
Taylor expanded in x1 around 0 21.6%
unpow221.6%
*-commutative21.6%
associate-*l*21.6%
Simplified21.6%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
unpow2100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification94.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (+ t_0 (* 2.0 x2)))
(t_2 (* x1 (* x1 x1)))
(t_3 (* x1 (* x1 9.0)))
(t_4 (+ (* x1 x1) 1.0))
(t_5 (/ (- x1 t_1) t_4))
(t_6 (+ (* x1 -3.0) (* x2 -6.0)))
(t_7 (* (* x1 2.0) t_5)))
(if (<= x1 -5.6e+102)
(+
x1
(+
(* x2 (- (* x1 -12.0) 6.0))
(/ (* x1 (- x1 (* x1 9.0))) (+ x1 (* x1 3.0)))))
(if (<= x1 0.6)
(+
x1
(+
t_6
(+
x1
(+ t_2 (+ t_3 (* t_4 (+ (* t_7 (+ 3.0 t_5)) (* (* x1 x1) 6.0))))))))
(if (<= x1 2e+102)
(+
x1
(+
9.0
(+
x1
(-
t_2
(-
(*
t_4
(+
(* (- (/ (- t_1 x1) t_4) 3.0) t_7)
(* (* x1 x1) (+ 6.0 (* 4.0 t_5)))))
(* 3.0 t_0))))))
(+
x1
(-
t_6
(-
(- (- (* (* x1 (* x1 6.0)) (- -1.0 (* x1 x1))) t_3) t_2)
x1))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 + (2.0 * x2);
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 9.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = (x1 - t_1) / t_4;
double t_6 = (x1 * -3.0) + (x2 * -6.0);
double t_7 = (x1 * 2.0) * t_5;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= 0.6) {
tmp = x1 + (t_6 + (x1 + (t_2 + (t_3 + (t_4 * ((t_7 * (3.0 + t_5)) + ((x1 * x1) * 6.0)))))));
} else if (x1 <= 2e+102) {
tmp = x1 + (9.0 + (x1 + (t_2 - ((t_4 * (((((t_1 - x1) / t_4) - 3.0) * t_7) + ((x1 * x1) * (6.0 + (4.0 * t_5))))) - (3.0 * t_0)))));
} else {
tmp = x1 + (t_6 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - t_3) - t_2) - x1));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = t_0 + (2.0d0 * x2)
t_2 = x1 * (x1 * x1)
t_3 = x1 * (x1 * 9.0d0)
t_4 = (x1 * x1) + 1.0d0
t_5 = (x1 - t_1) / t_4
t_6 = (x1 * (-3.0d0)) + (x2 * (-6.0d0))
t_7 = (x1 * 2.0d0) * t_5
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x2 * ((x1 * (-12.0d0)) - 6.0d0)) + ((x1 * (x1 - (x1 * 9.0d0))) / (x1 + (x1 * 3.0d0))))
else if (x1 <= 0.6d0) then
tmp = x1 + (t_6 + (x1 + (t_2 + (t_3 + (t_4 * ((t_7 * (3.0d0 + t_5)) + ((x1 * x1) * 6.0d0)))))))
else if (x1 <= 2d+102) then
tmp = x1 + (9.0d0 + (x1 + (t_2 - ((t_4 * (((((t_1 - x1) / t_4) - 3.0d0) * t_7) + ((x1 * x1) * (6.0d0 + (4.0d0 * t_5))))) - (3.0d0 * t_0)))))
else
tmp = x1 + (t_6 - (((((x1 * (x1 * 6.0d0)) * ((-1.0d0) - (x1 * x1))) - t_3) - t_2) - x1))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = t_0 + (2.0 * x2);
double t_2 = x1 * (x1 * x1);
double t_3 = x1 * (x1 * 9.0);
double t_4 = (x1 * x1) + 1.0;
double t_5 = (x1 - t_1) / t_4;
double t_6 = (x1 * -3.0) + (x2 * -6.0);
double t_7 = (x1 * 2.0) * t_5;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= 0.6) {
tmp = x1 + (t_6 + (x1 + (t_2 + (t_3 + (t_4 * ((t_7 * (3.0 + t_5)) + ((x1 * x1) * 6.0)))))));
} else if (x1 <= 2e+102) {
tmp = x1 + (9.0 + (x1 + (t_2 - ((t_4 * (((((t_1 - x1) / t_4) - 3.0) * t_7) + ((x1 * x1) * (6.0 + (4.0 * t_5))))) - (3.0 * t_0)))));
} else {
tmp = x1 + (t_6 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - t_3) - t_2) - x1));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = t_0 + (2.0 * x2) t_2 = x1 * (x1 * x1) t_3 = x1 * (x1 * 9.0) t_4 = (x1 * x1) + 1.0 t_5 = (x1 - t_1) / t_4 t_6 = (x1 * -3.0) + (x2 * -6.0) t_7 = (x1 * 2.0) * t_5 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))) elif x1 <= 0.6: tmp = x1 + (t_6 + (x1 + (t_2 + (t_3 + (t_4 * ((t_7 * (3.0 + t_5)) + ((x1 * x1) * 6.0))))))) elif x1 <= 2e+102: tmp = x1 + (9.0 + (x1 + (t_2 - ((t_4 * (((((t_1 - x1) / t_4) - 3.0) * t_7) + ((x1 * x1) * (6.0 + (4.0 * t_5))))) - (3.0 * t_0))))) else: tmp = x1 + (t_6 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - t_3) - t_2) - x1)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(t_0 + Float64(2.0 * x2)) t_2 = Float64(x1 * Float64(x1 * x1)) t_3 = Float64(x1 * Float64(x1 * 9.0)) t_4 = Float64(Float64(x1 * x1) + 1.0) t_5 = Float64(Float64(x1 - t_1) / t_4) t_6 = Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)) t_7 = Float64(Float64(x1 * 2.0) * t_5) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(Float64(x1 * Float64(x1 - Float64(x1 * 9.0))) / Float64(x1 + Float64(x1 * 3.0))))); elseif (x1 <= 0.6) tmp = Float64(x1 + Float64(t_6 + Float64(x1 + Float64(t_2 + Float64(t_3 + Float64(t_4 * Float64(Float64(t_7 * Float64(3.0 + t_5)) + Float64(Float64(x1 * x1) * 6.0)))))))); elseif (x1 <= 2e+102) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(t_2 - Float64(Float64(t_4 * Float64(Float64(Float64(Float64(Float64(t_1 - x1) / t_4) - 3.0) * t_7) + Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))))) - Float64(3.0 * t_0)))))); else tmp = Float64(x1 + Float64(t_6 - Float64(Float64(Float64(Float64(Float64(x1 * Float64(x1 * 6.0)) * Float64(-1.0 - Float64(x1 * x1))) - t_3) - t_2) - x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = t_0 + (2.0 * x2); t_2 = x1 * (x1 * x1); t_3 = x1 * (x1 * 9.0); t_4 = (x1 * x1) + 1.0; t_5 = (x1 - t_1) / t_4; t_6 = (x1 * -3.0) + (x2 * -6.0); t_7 = (x1 * 2.0) * t_5; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))); elseif (x1 <= 0.6) tmp = x1 + (t_6 + (x1 + (t_2 + (t_3 + (t_4 * ((t_7 * (3.0 + t_5)) + ((x1 * x1) * 6.0))))))); elseif (x1 <= 2e+102) tmp = x1 + (9.0 + (x1 + (t_2 - ((t_4 * (((((t_1 - x1) / t_4) - 3.0) * t_7) + ((x1 * x1) * (6.0 + (4.0 * t_5))))) - (3.0 * t_0))))); else tmp = x1 + (t_6 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - t_3) - t_2) - 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[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x1 - t$95$1), $MachinePrecision] / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(x1 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 0.6], N[(x1 + N[(t$95$6 + N[(x1 + N[(t$95$2 + N[(t$95$3 + N[(t$95$4 * N[(N[(t$95$7 * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+102], N[(x1 + N[(9.0 + N[(x1 + N[(t$95$2 - N[(N[(t$95$4 * N[(N[(N[(N[(N[(t$95$1 - x1), $MachinePrecision] / t$95$4), $MachinePrecision] - 3.0), $MachinePrecision] * t$95$7), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$6 - N[(N[(N[(N[(N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision] * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] - t$95$2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := t_0 + 2 \cdot x2\\
t_2 := x1 \cdot \left(x1 \cdot x1\right)\\
t_3 := x1 \cdot \left(x1 \cdot 9\right)\\
t_4 := x1 \cdot x1 + 1\\
t_5 := \frac{x1 - t_1}{t_4}\\
t_6 := x1 \cdot -3 + x2 \cdot -6\\
t_7 := \left(x1 \cdot 2\right) \cdot t_5\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(x1 \cdot -12 - 6\right) + \frac{x1 \cdot \left(x1 - x1 \cdot 9\right)}{x1 + x1 \cdot 3}\right)\\
\mathbf{elif}\;x1 \leq 0.6:\\
\;\;\;\;x1 + \left(t_6 + \left(x1 + \left(t_2 + \left(t_3 + t_4 \cdot \left(t_7 \cdot \left(3 + t_5\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + \left(t_2 - \left(t_4 \cdot \left(\left(\frac{t_1 - x1}{t_4} - 3\right) \cdot t_7 + \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t_5\right)\right) - 3 \cdot t_0\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t_6 - \left(\left(\left(\left(x1 \cdot \left(x1 \cdot 6\right)\right) \cdot \left(-1 - x1 \cdot x1\right) - t_3\right) - t_2\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.5%
+-commutative3.5%
*-commutative3.5%
fma-def3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x2 around 0 20.3%
flip-+5.4%
*-commutative5.4%
*-commutative5.4%
*-commutative5.4%
Applied egg-rr5.4%
swap-sqr5.4%
metadata-eval5.4%
associate-*r*5.4%
distribute-lft-out--69.7%
*-commutative69.7%
cancel-sign-sub-inv69.7%
metadata-eval69.7%
*-commutative69.7%
Simplified69.7%
if -5.60000000000000037e102 < x1 < 0.599999999999999978Initial program 99.4%
Taylor expanded in x1 around inf 99.0%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around 0 99.4%
unpow299.4%
*-commutative99.4%
associate-*l*99.4%
Simplified99.4%
Taylor expanded in x1 around inf 99.0%
*-commutative99.0%
unpow299.0%
Simplified99.0%
if 0.599999999999999978 < x1 < 1.99999999999999995e102Initial program 99.4%
Taylor expanded in x1 around inf 98.0%
Taylor expanded in x1 around inf 98.0%
if 1.99999999999999995e102 < x1 Initial program 21.6%
Taylor expanded in x1 around inf 21.6%
Taylor expanded in x1 around 0 21.6%
Taylor expanded in x1 around 0 21.6%
unpow221.6%
*-commutative21.6%
associate-*l*21.6%
Simplified21.6%
Taylor expanded in x1 around inf 100.0%
*-commutative100.0%
unpow2100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification94.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1)))
(t_1 (* x1 (* x1 9.0)))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (+ (* x1 -3.0) (* x2 -6.0)))
(t_4 (/ (- x1 (+ (* x1 (* x1 3.0)) (* 2.0 x2))) t_2)))
(if (<= x1 -5.6e+102)
(+
x1
(+
(* x2 (- (* x1 -12.0) 6.0))
(/ (* x1 (- x1 (* x1 9.0))) (+ x1 (* x1 3.0)))))
(if (<= x1 5.8e+49)
(+
x1
(+
t_3
(+
x1
(+
t_0
(+
t_1
(*
t_2
(+ (* (* (* x1 2.0) t_4) (+ 3.0 t_4)) (* (* x1 x1) 6.0))))))))
(+
x1
(-
t_3
(- (- (- (* (* x1 (* x1 6.0)) (- -1.0 (* x1 x1))) t_1) t_0) x1)))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 9.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = (x1 * -3.0) + (x2 * -6.0);
double t_4 = (x1 - ((x1 * (x1 * 3.0)) + (2.0 * x2))) / t_2;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= 5.8e+49) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_1 + (t_2 * ((((x1 * 2.0) * t_4) * (3.0 + t_4)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + (t_3 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - t_1) - t_0) - x1));
}
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 * x1)
t_1 = x1 * (x1 * 9.0d0)
t_2 = (x1 * x1) + 1.0d0
t_3 = (x1 * (-3.0d0)) + (x2 * (-6.0d0))
t_4 = (x1 - ((x1 * (x1 * 3.0d0)) + (2.0d0 * x2))) / t_2
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x2 * ((x1 * (-12.0d0)) - 6.0d0)) + ((x1 * (x1 - (x1 * 9.0d0))) / (x1 + (x1 * 3.0d0))))
else if (x1 <= 5.8d+49) then
tmp = x1 + (t_3 + (x1 + (t_0 + (t_1 + (t_2 * ((((x1 * 2.0d0) * t_4) * (3.0d0 + t_4)) + ((x1 * x1) * 6.0d0)))))))
else
tmp = x1 + (t_3 - (((((x1 * (x1 * 6.0d0)) * ((-1.0d0) - (x1 * x1))) - t_1) - t_0) - x1))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = x1 * (x1 * 9.0);
double t_2 = (x1 * x1) + 1.0;
double t_3 = (x1 * -3.0) + (x2 * -6.0);
double t_4 = (x1 - ((x1 * (x1 * 3.0)) + (2.0 * x2))) / t_2;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= 5.8e+49) {
tmp = x1 + (t_3 + (x1 + (t_0 + (t_1 + (t_2 * ((((x1 * 2.0) * t_4) * (3.0 + t_4)) + ((x1 * x1) * 6.0)))))));
} else {
tmp = x1 + (t_3 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - t_1) - t_0) - x1));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * x1) t_1 = x1 * (x1 * 9.0) t_2 = (x1 * x1) + 1.0 t_3 = (x1 * -3.0) + (x2 * -6.0) t_4 = (x1 - ((x1 * (x1 * 3.0)) + (2.0 * x2))) / t_2 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))) elif x1 <= 5.8e+49: tmp = x1 + (t_3 + (x1 + (t_0 + (t_1 + (t_2 * ((((x1 * 2.0) * t_4) * (3.0 + t_4)) + ((x1 * x1) * 6.0))))))) else: tmp = x1 + (t_3 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - t_1) - t_0) - x1)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(x1 * Float64(x1 * 9.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)) t_4 = Float64(Float64(x1 - Float64(Float64(x1 * Float64(x1 * 3.0)) + Float64(2.0 * x2))) / t_2) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(Float64(x1 * Float64(x1 - Float64(x1 * 9.0))) / Float64(x1 + Float64(x1 * 3.0))))); elseif (x1 <= 5.8e+49) tmp = Float64(x1 + Float64(t_3 + Float64(x1 + Float64(t_0 + Float64(t_1 + Float64(t_2 * Float64(Float64(Float64(Float64(x1 * 2.0) * t_4) * Float64(3.0 + t_4)) + Float64(Float64(x1 * x1) * 6.0)))))))); else tmp = Float64(x1 + Float64(t_3 - Float64(Float64(Float64(Float64(Float64(x1 * Float64(x1 * 6.0)) * Float64(-1.0 - Float64(x1 * x1))) - t_1) - t_0) - x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * x1); t_1 = x1 * (x1 * 9.0); t_2 = (x1 * x1) + 1.0; t_3 = (x1 * -3.0) + (x2 * -6.0); t_4 = (x1 - ((x1 * (x1 * 3.0)) + (2.0 * x2))) / t_2; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))); elseif (x1 <= 5.8e+49) tmp = x1 + (t_3 + (x1 + (t_0 + (t_1 + (t_2 * ((((x1 * 2.0) * t_4) * (3.0 + t_4)) + ((x1 * x1) * 6.0))))))); else tmp = x1 + (t_3 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - t_1) - t_0) - x1)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x1 - N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(x1 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.8e+49], N[(x1 + N[(t$95$3 + N[(x1 + N[(t$95$0 + N[(t$95$1 + N[(t$95$2 * N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$3 - N[(N[(N[(N[(N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision] * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$0), $MachinePrecision] - 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 9\right)\\
t_2 := x1 \cdot x1 + 1\\
t_3 := x1 \cdot -3 + x2 \cdot -6\\
t_4 := \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) + 2 \cdot x2\right)}{t_2}\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(x1 \cdot -12 - 6\right) + \frac{x1 \cdot \left(x1 - x1 \cdot 9\right)}{x1 + x1 \cdot 3}\right)\\
\mathbf{elif}\;x1 \leq 5.8 \cdot 10^{+49}:\\
\;\;\;\;x1 + \left(t_3 + \left(x1 + \left(t_0 + \left(t_1 + t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(3 + t_4\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t_3 - \left(\left(\left(\left(x1 \cdot \left(x1 \cdot 6\right)\right) \cdot \left(-1 - x1 \cdot x1\right) - t_1\right) - t_0\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.5%
+-commutative3.5%
*-commutative3.5%
fma-def3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x2 around 0 20.3%
flip-+5.4%
*-commutative5.4%
*-commutative5.4%
*-commutative5.4%
Applied egg-rr5.4%
swap-sqr5.4%
metadata-eval5.4%
associate-*r*5.4%
distribute-lft-out--69.7%
*-commutative69.7%
cancel-sign-sub-inv69.7%
metadata-eval69.7%
*-commutative69.7%
Simplified69.7%
if -5.60000000000000037e102 < x1 < 5.8e49Initial program 99.4%
Taylor expanded in x1 around inf 98.8%
Taylor expanded in x1 around 0 99.4%
Taylor expanded in x1 around 0 99.4%
unpow299.4%
*-commutative99.4%
associate-*l*99.4%
Simplified99.4%
Taylor expanded in x1 around inf 97.4%
*-commutative97.4%
unpow297.4%
Simplified97.4%
if 5.8e49 < x1 Initial program 41.9%
Taylor expanded in x1 around inf 41.9%
Taylor expanded in x1 around 0 41.9%
Taylor expanded in x1 around 0 41.9%
unpow241.9%
*-commutative41.9%
associate-*l*41.9%
Simplified41.9%
Taylor expanded in x1 around inf 95.9%
*-commutative95.9%
unpow295.9%
associate-*l*96.0%
Simplified96.0%
Final simplification92.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (* x1 (* x1 x1)))
(t_2 (+ (* x1 -3.0) (* x2 -6.0)))
(t_3 (+ (* x1 x1) 1.0)))
(if (<= x1 -5.6e+102)
(+
x1
(+
(* x2 (- (* x1 -12.0) 6.0))
(/ (* x1 (- x1 (* x1 9.0))) (+ x1 (* x1 3.0)))))
(if (<= x1 -1200.0)
(-
x1
(-
(-
(-
(-
(*
t_3
(+
(* (/ 1.0 x1) (* (* x1 2.0) (+ 3.0 (/ -1.0 x1))))
(* (* x1 x1) (+ 6.0 (* 4.0 (/ (- x1 (+ t_0 (* 2.0 x2))) t_3))))))
(* 3.0 t_0))
t_1)
x1)
t_2))
(if (<= x1 260.0)
(+
x1
(-
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_3))
(- (* 4.0 (* x2 (* x1 (- 3.0 (* 2.0 x2))))) x1)))
(+
x1
(-
t_2
(-
(-
(- (* (* x1 (* x1 6.0)) (- -1.0 (* x1 x1))) (* x1 (* x1 9.0)))
t_1)
x1))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = x1 * (x1 * x1);
double t_2 = (x1 * -3.0) + (x2 * -6.0);
double t_3 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= -1200.0) {
tmp = x1 - (((((t_3 * (((1.0 / x1) * ((x1 * 2.0) * (3.0 + (-1.0 / x1)))) + ((x1 * x1) * (6.0 + (4.0 * ((x1 - (t_0 + (2.0 * x2))) / t_3)))))) - (3.0 * t_0)) - t_1) - x1) - t_2);
} else if (x1 <= 260.0) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
} else {
tmp = x1 + (t_2 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - (x1 * (x1 * 9.0))) - t_1) - x1));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = x1 * (x1 * 3.0d0)
t_1 = x1 * (x1 * x1)
t_2 = (x1 * (-3.0d0)) + (x2 * (-6.0d0))
t_3 = (x1 * x1) + 1.0d0
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x2 * ((x1 * (-12.0d0)) - 6.0d0)) + ((x1 * (x1 - (x1 * 9.0d0))) / (x1 + (x1 * 3.0d0))))
else if (x1 <= (-1200.0d0)) then
tmp = x1 - (((((t_3 * (((1.0d0 / x1) * ((x1 * 2.0d0) * (3.0d0 + ((-1.0d0) / x1)))) + ((x1 * x1) * (6.0d0 + (4.0d0 * ((x1 - (t_0 + (2.0d0 * x2))) / t_3)))))) - (3.0d0 * t_0)) - t_1) - x1) - t_2)
else if (x1 <= 260.0d0) then
tmp = x1 + ((3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_3)) - ((4.0d0 * (x2 * (x1 * (3.0d0 - (2.0d0 * x2))))) - x1))
else
tmp = x1 + (t_2 - (((((x1 * (x1 * 6.0d0)) * ((-1.0d0) - (x1 * x1))) - (x1 * (x1 * 9.0d0))) - t_1) - x1))
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 * x1);
double t_2 = (x1 * -3.0) + (x2 * -6.0);
double t_3 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= -1200.0) {
tmp = x1 - (((((t_3 * (((1.0 / x1) * ((x1 * 2.0) * (3.0 + (-1.0 / x1)))) + ((x1 * x1) * (6.0 + (4.0 * ((x1 - (t_0 + (2.0 * x2))) / t_3)))))) - (3.0 * t_0)) - t_1) - x1) - t_2);
} else if (x1 <= 260.0) {
tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
} else {
tmp = x1 + (t_2 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - (x1 * (x1 * 9.0))) - t_1) - x1));
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = x1 * (x1 * x1) t_2 = (x1 * -3.0) + (x2 * -6.0) t_3 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))) elif x1 <= -1200.0: tmp = x1 - (((((t_3 * (((1.0 / x1) * ((x1 * 2.0) * (3.0 + (-1.0 / x1)))) + ((x1 * x1) * (6.0 + (4.0 * ((x1 - (t_0 + (2.0 * x2))) / t_3)))))) - (3.0 * t_0)) - t_1) - x1) - t_2) elif x1 <= 260.0: tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)) else: tmp = x1 + (t_2 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - (x1 * (x1 * 9.0))) - t_1) - x1)) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(x1 * Float64(x1 * x1)) t_2 = Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)) t_3 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(Float64(x1 * Float64(x1 - Float64(x1 * 9.0))) / Float64(x1 + Float64(x1 * 3.0))))); elseif (x1 <= -1200.0) tmp = Float64(x1 - Float64(Float64(Float64(Float64(Float64(t_3 * Float64(Float64(Float64(1.0 / x1) * Float64(Float64(x1 * 2.0) * Float64(3.0 + Float64(-1.0 / x1)))) + Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * Float64(Float64(x1 - Float64(t_0 + Float64(2.0 * x2))) / t_3)))))) - Float64(3.0 * t_0)) - t_1) - x1) - t_2)); elseif (x1 <= 260.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_3)) - Float64(Float64(4.0 * Float64(x2 * Float64(x1 * Float64(3.0 - Float64(2.0 * x2))))) - x1))); else tmp = Float64(x1 + Float64(t_2 - Float64(Float64(Float64(Float64(Float64(x1 * Float64(x1 * 6.0)) * Float64(-1.0 - Float64(x1 * x1))) - Float64(x1 * Float64(x1 * 9.0))) - t_1) - x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = x1 * (x1 * x1); t_2 = (x1 * -3.0) + (x2 * -6.0); t_3 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))); elseif (x1 <= -1200.0) tmp = x1 - (((((t_3 * (((1.0 / x1) * ((x1 * 2.0) * (3.0 + (-1.0 / x1)))) + ((x1 * x1) * (6.0 + (4.0 * ((x1 - (t_0 + (2.0 * x2))) / t_3)))))) - (3.0 * t_0)) - t_1) - x1) - t_2); elseif (x1 <= 260.0) tmp = x1 + ((3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)); else tmp = x1 + (t_2 - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - (x1 * (x1 * 9.0))) - t_1) - 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[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(x1 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1200.0], N[(x1 - N[(N[(N[(N[(N[(t$95$3 * N[(N[(N[(1.0 / x1), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * N[(3.0 + N[(-1.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * N[(N[(x1 - N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - x1), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 260.0], N[(x1 + N[(N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x2 * N[(x1 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$2 - N[(N[(N[(N[(N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision] * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := x1 \cdot \left(x1 \cdot x1\right)\\
t_2 := x1 \cdot -3 + x2 \cdot -6\\
t_3 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(x1 \cdot -12 - 6\right) + \frac{x1 \cdot \left(x1 - x1 \cdot 9\right)}{x1 + x1 \cdot 3}\right)\\
\mathbf{elif}\;x1 \leq -1200:\\
\;\;\;\;x1 - \left(\left(\left(\left(t_3 \cdot \left(\frac{1}{x1} \cdot \left(\left(x1 \cdot 2\right) \cdot \left(3 + \frac{-1}{x1}\right)\right) + \left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot \frac{x1 - \left(t_0 + 2 \cdot x2\right)}{t_3}\right)\right) - 3 \cdot t_0\right) - t_1\right) - x1\right) - t_2\right)\\
\mathbf{elif}\;x1 \leq 260:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - 2 \cdot x2\right) - x1}{t_3} - \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t_2 - \left(\left(\left(\left(x1 \cdot \left(x1 \cdot 6\right)\right) \cdot \left(-1 - x1 \cdot x1\right) - x1 \cdot \left(x1 \cdot 9\right)\right) - t_1\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.5%
+-commutative3.5%
*-commutative3.5%
fma-def3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x2 around 0 20.3%
flip-+5.4%
*-commutative5.4%
*-commutative5.4%
*-commutative5.4%
Applied egg-rr5.4%
swap-sqr5.4%
metadata-eval5.4%
associate-*r*5.4%
distribute-lft-out--69.7%
*-commutative69.7%
cancel-sign-sub-inv69.7%
metadata-eval69.7%
*-commutative69.7%
Simplified69.7%
if -5.60000000000000037e102 < x1 < -1200Initial program 99.5%
Taylor expanded in x1 around inf 99.5%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around inf 94.8%
Taylor expanded in x1 around inf 94.8%
if -1200 < x1 < 260Initial program 99.4%
Taylor expanded in x1 around 0 99.1%
if 260 < x1 Initial program 55.8%
Taylor expanded in x1 around inf 55.2%
Taylor expanded in x1 around 0 55.8%
Taylor expanded in x1 around 0 55.8%
unpow255.8%
*-commutative55.8%
associate-*l*55.8%
Simplified55.8%
Taylor expanded in x1 around inf 85.5%
*-commutative85.5%
unpow285.5%
associate-*l*85.5%
Simplified85.5%
Final simplification90.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 6.0)))
(t_2 (* x1 (* x1 3.0)))
(t_3 (* x1 (* x1 x1))))
(if (<= x1 -5.6e+102)
(+
x1
(+
(* x2 (- (* x1 -12.0) 6.0))
(/ (* x1 (- x1 (* x1 9.0))) (+ x1 (* x1 3.0)))))
(if (<= x1 -128000.0)
(+
x1
(+
(+
x1
(+ t_3 (- (* t_0 t_1) (* t_2 (/ (- x1 (+ t_2 (* 2.0 x2))) t_0)))))
(* 3.0 (* x2 -2.0))))
(if (<= x1 260.0)
(+
x1
(-
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))
(- (* 4.0 (* x2 (* x1 (- 3.0 (* 2.0 x2))))) x1)))
(+
x1
(-
(+ (* x1 -3.0) (* x2 -6.0))
(-
(- (- (* t_1 (- -1.0 (* x1 x1))) (* x1 (* x1 9.0))) t_3)
x1))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 6.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = x1 * (x1 * x1);
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= -128000.0) {
tmp = x1 + ((x1 + (t_3 + ((t_0 * t_1) - (t_2 * ((x1 - (t_2 + (2.0 * x2))) / t_0))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 260.0) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
} else {
tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - ((((t_1 * (-1.0 - (x1 * x1))) - (x1 * (x1 * 9.0))) - t_3) - x1));
}
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 * 6.0d0)
t_2 = x1 * (x1 * 3.0d0)
t_3 = x1 * (x1 * x1)
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x2 * ((x1 * (-12.0d0)) - 6.0d0)) + ((x1 * (x1 - (x1 * 9.0d0))) / (x1 + (x1 * 3.0d0))))
else if (x1 <= (-128000.0d0)) then
tmp = x1 + ((x1 + (t_3 + ((t_0 * t_1) - (t_2 * ((x1 - (t_2 + (2.0d0 * x2))) / t_0))))) + (3.0d0 * (x2 * (-2.0d0))))
else if (x1 <= 260.0d0) then
tmp = x1 + ((3.0d0 * (((t_2 - (2.0d0 * x2)) - x1) / t_0)) - ((4.0d0 * (x2 * (x1 * (3.0d0 - (2.0d0 * x2))))) - x1))
else
tmp = x1 + (((x1 * (-3.0d0)) + (x2 * (-6.0d0))) - ((((t_1 * ((-1.0d0) - (x1 * x1))) - (x1 * (x1 * 9.0d0))) - t_3) - x1))
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 * 6.0);
double t_2 = x1 * (x1 * 3.0);
double t_3 = x1 * (x1 * x1);
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= -128000.0) {
tmp = x1 + ((x1 + (t_3 + ((t_0 * t_1) - (t_2 * ((x1 - (t_2 + (2.0 * x2))) / t_0))))) + (3.0 * (x2 * -2.0)));
} else if (x1 <= 260.0) {
tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
} else {
tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - ((((t_1 * (-1.0 - (x1 * x1))) - (x1 * (x1 * 9.0))) - t_3) - x1));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 6.0) t_2 = x1 * (x1 * 3.0) t_3 = x1 * (x1 * x1) tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))) elif x1 <= -128000.0: tmp = x1 + ((x1 + (t_3 + ((t_0 * t_1) - (t_2 * ((x1 - (t_2 + (2.0 * x2))) / t_0))))) + (3.0 * (x2 * -2.0))) elif x1 <= 260.0: tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)) else: tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - ((((t_1 * (-1.0 - (x1 * x1))) - (x1 * (x1 * 9.0))) - t_3) - x1)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 6.0)) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(Float64(x1 * Float64(x1 - Float64(x1 * 9.0))) / Float64(x1 + Float64(x1 * 3.0))))); elseif (x1 <= -128000.0) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_3 + Float64(Float64(t_0 * t_1) - Float64(t_2 * Float64(Float64(x1 - Float64(t_2 + Float64(2.0 * x2))) / t_0))))) + Float64(3.0 * Float64(x2 * -2.0)))); elseif (x1 <= 260.0) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)) - Float64(Float64(4.0 * Float64(x2 * Float64(x1 * Float64(3.0 - Float64(2.0 * x2))))) - x1))); else tmp = Float64(x1 + Float64(Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)) - Float64(Float64(Float64(Float64(t_1 * Float64(-1.0 - Float64(x1 * x1))) - Float64(x1 * Float64(x1 * 9.0))) - t_3) - x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 6.0); t_2 = x1 * (x1 * 3.0); t_3 = x1 * (x1 * x1); tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))); elseif (x1 <= -128000.0) tmp = x1 + ((x1 + (t_3 + ((t_0 * t_1) - (t_2 * ((x1 - (t_2 + (2.0 * x2))) / t_0))))) + (3.0 * (x2 * -2.0))); elseif (x1 <= 260.0) tmp = x1 + ((3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)); else tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - ((((t_1 * (-1.0 - (x1 * x1))) - (x1 * (x1 * 9.0))) - t_3) - x1)); 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 * 6.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(x1 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -128000.0], N[(x1 + N[(N[(x1 + N[(t$95$3 + N[(N[(t$95$0 * t$95$1), $MachinePrecision] - N[(t$95$2 * N[(N[(x1 - N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 260.0], 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[(N[(4.0 * N[(x2 * N[(x1 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(t$95$1 * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 6\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(x1 \cdot -12 - 6\right) + \frac{x1 \cdot \left(x1 - x1 \cdot 9\right)}{x1 + x1 \cdot 3}\right)\\
\mathbf{elif}\;x1 \leq -128000:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t_3 + \left(t_0 \cdot t_1 - t_2 \cdot \frac{x1 - \left(t_2 + 2 \cdot x2\right)}{t_0}\right)\right)\right) + 3 \cdot \left(x2 \cdot -2\right)\right)\\
\mathbf{elif}\;x1 \leq 260:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(t_2 - 2 \cdot x2\right) - x1}{t_0} - \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 \cdot -3 + x2 \cdot -6\right) - \left(\left(\left(t_1 \cdot \left(-1 - x1 \cdot x1\right) - x1 \cdot \left(x1 \cdot 9\right)\right) - t_3\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.5%
+-commutative3.5%
*-commutative3.5%
fma-def3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x2 around 0 20.3%
flip-+5.4%
*-commutative5.4%
*-commutative5.4%
*-commutative5.4%
Applied egg-rr5.4%
swap-sqr5.4%
metadata-eval5.4%
associate-*r*5.4%
distribute-lft-out--69.7%
*-commutative69.7%
cancel-sign-sub-inv69.7%
metadata-eval69.7%
*-commutative69.7%
Simplified69.7%
if -5.60000000000000037e102 < x1 < -128000Initial program 99.5%
Taylor expanded in x1 around 0 99.5%
*-commutative10.5%
Simplified99.5%
Taylor expanded in x1 around inf 85.5%
*-commutative85.3%
unpow285.3%
associate-*l*85.6%
Simplified85.8%
if -128000 < x1 < 260Initial program 99.4%
Taylor expanded in x1 around 0 99.1%
if 260 < x1 Initial program 55.8%
Taylor expanded in x1 around inf 55.2%
Taylor expanded in x1 around 0 55.8%
Taylor expanded in x1 around 0 55.8%
unpow255.8%
*-commutative55.8%
associate-*l*55.8%
Simplified55.8%
Taylor expanded in x1 around inf 85.5%
*-commutative85.5%
unpow285.5%
associate-*l*85.5%
Simplified85.5%
Final simplification89.7%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -5.6e+102)
(+
x1
(+
(* x2 (- (* x1 -12.0) 6.0))
(/ (* x1 (- x1 (* x1 9.0))) (+ x1 (* x1 3.0)))))
(if (or (<= x1 -48000.0) (not (<= x1 260.0)))
(+
x1
(-
(+ (* x1 -3.0) (* x2 -6.0))
(-
(-
(- (* (* x1 (* x1 6.0)) (- -1.0 (* x1 x1))) (* x1 (* x1 9.0)))
(* x1 (* x1 x1)))
x1)))
(+
x1
(-
(* 3.0 (/ (- (- (* x1 (* x1 3.0)) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))
(- (* 4.0 (* x2 (* x1 (- 3.0 (* 2.0 x2))))) x1))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if ((x1 <= -48000.0) || !(x1 <= 260.0)) {
tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - (x1 * (x1 * 9.0))) - (x1 * (x1 * x1))) - x1));
} else {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-5.6d+102)) then
tmp = x1 + ((x2 * ((x1 * (-12.0d0)) - 6.0d0)) + ((x1 * (x1 - (x1 * 9.0d0))) / (x1 + (x1 * 3.0d0))))
else if ((x1 <= (-48000.0d0)) .or. (.not. (x1 <= 260.0d0))) then
tmp = x1 + (((x1 * (-3.0d0)) + (x2 * (-6.0d0))) - (((((x1 * (x1 * 6.0d0)) * ((-1.0d0) - (x1 * x1))) - (x1 * (x1 * 9.0d0))) - (x1 * (x1 * x1))) - x1))
else
tmp = x1 + ((3.0d0 * ((((x1 * (x1 * 3.0d0)) - (2.0d0 * x2)) - x1) / ((x1 * x1) + 1.0d0))) - ((4.0d0 * (x2 * (x1 * (3.0d0 - (2.0d0 * x2))))) - x1))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -5.6e+102) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if ((x1 <= -48000.0) || !(x1 <= 260.0)) {
tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - (x1 * (x1 * 9.0))) - (x1 * (x1 * x1))) - x1));
} else {
tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -5.6e+102: tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))) elif (x1 <= -48000.0) or not (x1 <= 260.0): tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - (x1 * (x1 * 9.0))) - (x1 * (x1 * x1))) - x1)) else: tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -5.6e+102) tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(Float64(x1 * Float64(x1 - Float64(x1 * 9.0))) / Float64(x1 + Float64(x1 * 3.0))))); elseif ((x1 <= -48000.0) || !(x1 <= 260.0)) tmp = Float64(x1 + Float64(Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)) - Float64(Float64(Float64(Float64(Float64(x1 * Float64(x1 * 6.0)) * Float64(-1.0 - Float64(x1 * x1))) - Float64(x1 * Float64(x1 * 9.0))) - Float64(x1 * Float64(x1 * x1))) - x1))); else tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) - x1) / Float64(Float64(x1 * x1) + 1.0))) - Float64(Float64(4.0 * Float64(x2 * Float64(x1 * Float64(3.0 - Float64(2.0 * x2))))) - x1))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -5.6e+102) tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))); elseif ((x1 <= -48000.0) || ~((x1 <= 260.0))) tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - (((((x1 * (x1 * 6.0)) * (-1.0 - (x1 * x1))) - (x1 * (x1 * 9.0))) - (x1 * (x1 * x1))) - x1)); else tmp = x1 + ((3.0 * ((((x1 * (x1 * 3.0)) - (2.0 * x2)) - x1) / ((x1 * x1) + 1.0))) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -5.6e+102], N[(x1 + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(x1 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -48000.0], N[Not[LessEqual[x1, 260.0]], $MachinePrecision]], N[(x1 + N[(N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision] * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(3.0 * N[(N[(N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x2 * N[(x1 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(x1 \cdot -12 - 6\right) + \frac{x1 \cdot \left(x1 - x1 \cdot 9\right)}{x1 + x1 \cdot 3}\right)\\
\mathbf{elif}\;x1 \leq -48000 \lor \neg \left(x1 \leq 260\right):\\
\;\;\;\;x1 + \left(\left(x1 \cdot -3 + x2 \cdot -6\right) - \left(\left(\left(\left(x1 \cdot \left(x1 \cdot 6\right)\right) \cdot \left(-1 - x1 \cdot x1\right) - x1 \cdot \left(x1 \cdot 9\right)\right) - x1 \cdot \left(x1 \cdot x1\right)\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1\right)\right)\\
\end{array}
\end{array}
if x1 < -5.60000000000000037e102Initial program 0.0%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.5%
+-commutative3.5%
*-commutative3.5%
fma-def3.5%
*-commutative3.5%
Simplified3.5%
Taylor expanded in x2 around 0 20.3%
flip-+5.4%
*-commutative5.4%
*-commutative5.4%
*-commutative5.4%
Applied egg-rr5.4%
swap-sqr5.4%
metadata-eval5.4%
associate-*r*5.4%
distribute-lft-out--69.7%
*-commutative69.7%
cancel-sign-sub-inv69.7%
metadata-eval69.7%
*-commutative69.7%
Simplified69.7%
if -5.60000000000000037e102 < x1 < -48000 or 260 < x1 Initial program 66.3%
Taylor expanded in x1 around inf 65.9%
Taylor expanded in x1 around 0 66.3%
Taylor expanded in x1 around 0 66.3%
unpow266.3%
*-commutative66.3%
associate-*l*66.3%
Simplified66.3%
Taylor expanded in x1 around inf 85.4%
*-commutative85.4%
unpow285.4%
associate-*l*85.5%
Simplified85.5%
if -48000 < x1 < 260Initial program 99.4%
Taylor expanded in x1 around 0 99.1%
Final simplification89.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0)) (t_1 (- (* x1 (* x1 3.0)) (* 2.0 x2))))
(if (<= x1 -9.5e+62)
(+
x1
(+
(* x2 (- (* x1 -12.0) 6.0))
(/ (* x1 (- x1 (* x1 9.0))) (+ x1 (* x1 3.0)))))
(if (<= x1 5.8e+100)
(+
x1
(-
(* 3.0 (/ (- t_1 x1) t_0))
(- (* 4.0 (* x2 (* x1 (- 3.0 (* 2.0 x2))))) x1)))
(if (<= x1 1.35e+154)
(+ x1 (- (+ x1 (* (* x1 x1) (+ x1 15.0))) (* 3.0 (/ (- x1 t_1) t_0))))
(if (<= x1 2e+283)
(* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = (x1 * (x1 * 3.0)) - (2.0 * x2);
double tmp;
if (x1 <= -9.5e+62) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= 5.8e+100) {
tmp = x1 + ((3.0 * ((t_1 - x1) / t_0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((x1 + ((x1 * x1) * (x1 + 15.0))) - (3.0 * ((x1 - t_1) / t_0)));
} else if (x1 <= 2e+283) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = (x1 * (x1 * 3.0d0)) - (2.0d0 * x2)
if (x1 <= (-9.5d+62)) then
tmp = x1 + ((x2 * ((x1 * (-12.0d0)) - 6.0d0)) + ((x1 * (x1 - (x1 * 9.0d0))) / (x1 + (x1 * 3.0d0))))
else if (x1 <= 5.8d+100) then
tmp = x1 + ((3.0d0 * ((t_1 - x1) / t_0)) - ((4.0d0 * (x2 * (x1 * (3.0d0 - (2.0d0 * x2))))) - x1))
else if (x1 <= 1.35d+154) then
tmp = x1 + ((x1 + ((x1 * x1) * (x1 + 15.0d0))) - (3.0d0 * ((x1 - t_1) / t_0)))
else if (x1 <= 2d+283) then
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = (x1 * (x1 * 3.0)) - (2.0 * x2);
double tmp;
if (x1 <= -9.5e+62) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= 5.8e+100) {
tmp = x1 + ((3.0 * ((t_1 - x1) / t_0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((x1 + ((x1 * x1) * (x1 + 15.0))) - (3.0 * ((x1 - t_1) / t_0)));
} else if (x1 <= 2e+283) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = (x1 * (x1 * 3.0)) - (2.0 * x2) tmp = 0 if x1 <= -9.5e+62: tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))) elif x1 <= 5.8e+100: tmp = x1 + ((3.0 * ((t_1 - x1) / t_0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)) elif x1 <= 1.35e+154: tmp = x1 + ((x1 + ((x1 * x1) * (x1 + 15.0))) - (3.0 * ((x1 - t_1) / t_0))) elif x1 <= 2e+283: tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2)) tmp = 0.0 if (x1 <= -9.5e+62) tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(Float64(x1 * Float64(x1 - Float64(x1 * 9.0))) / Float64(x1 + Float64(x1 * 3.0))))); elseif (x1 <= 5.8e+100) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(Float64(t_1 - x1) / t_0)) - Float64(Float64(4.0 * Float64(x2 * Float64(x1 * Float64(3.0 - Float64(2.0 * x2))))) - x1))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * x1) * Float64(x1 + 15.0))) - Float64(3.0 * Float64(Float64(x1 - t_1) / t_0)))); elseif (x1 <= 2e+283) tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = (x1 * (x1 * 3.0)) - (2.0 * x2); tmp = 0.0; if (x1 <= -9.5e+62) tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))); elseif (x1 <= 5.8e+100) tmp = x1 + ((3.0 * ((t_1 - x1) / t_0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)); elseif (x1 <= 1.35e+154) tmp = x1 + ((x1 + ((x1 * x1) * (x1 + 15.0))) - (3.0 * ((x1 - t_1) / t_0))); elseif (x1 <= 2e+283) tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -9.5e+62], N[(x1 + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(x1 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.8e+100], N[(x1 + N[(N[(3.0 * N[(N[(t$95$1 - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x2 * N[(x1 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 15.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * N[(N[(x1 - t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2e+283], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\\
\mathbf{if}\;x1 \leq -9.5 \cdot 10^{+62}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(x1 \cdot -12 - 6\right) + \frac{x1 \cdot \left(x1 - x1 \cdot 9\right)}{x1 + x1 \cdot 3}\right)\\
\mathbf{elif}\;x1 \leq 5.8 \cdot 10^{+100}:\\
\;\;\;\;x1 + \left(3 \cdot \frac{t_1 - x1}{t_0} - \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot x1\right) \cdot \left(x1 + 15\right)\right) - 3 \cdot \frac{x1 - t_1}{t_0}\right)\\
\mathbf{elif}\;x1 \leq 2 \cdot 10^{+283}:\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -9.5000000000000003e62Initial program 22.1%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.3%
+-commutative3.3%
*-commutative3.3%
fma-def3.3%
*-commutative3.3%
Simplified3.3%
Taylor expanded in x2 around 0 16.6%
flip-+5.0%
*-commutative5.0%
*-commutative5.0%
*-commutative5.0%
Applied egg-rr5.0%
swap-sqr5.0%
metadata-eval5.0%
associate-*r*5.0%
distribute-lft-out--55.0%
*-commutative55.0%
cancel-sign-sub-inv55.0%
metadata-eval55.0%
*-commutative55.0%
Simplified55.0%
if -9.5000000000000003e62 < x1 < 5.8000000000000001e100Initial program 99.4%
Taylor expanded in x1 around 0 80.2%
if 5.8000000000000001e100 < x1 < 1.35000000000000003e154Initial program 100.0%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around inf 88.9%
*-commutative88.9%
unpow288.9%
Simplified88.9%
Taylor expanded in x1 around 0 88.9%
+-commutative88.9%
unpow288.9%
cube-mult88.9%
distribute-rgt-out88.9%
Simplified88.9%
if 1.35000000000000003e154 < x1 < 1.99999999999999991e283Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in x1 around inf 75.6%
if 1.99999999999999991e283 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 10.5%
*-commutative10.5%
Simplified10.5%
flip-+100.0%
Applied egg-rr100.0%
swap-sqr100.0%
metadata-eval100.0%
*-commutative100.0%
Simplified100.0%
Final simplification75.3%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -5.5e+70)
(+
x1
(+
(* x2 (- (* x1 -12.0) 6.0))
(/ (* x1 (- x1 (* x1 9.0))) (+ x1 (* x1 3.0)))))
(if (<= x1 5.8e+100)
(+
x1
(-
(+ (* x1 -3.0) (* x2 -6.0))
(- (* 4.0 (* x2 (* x1 (- 3.0 (* 2.0 x2))))) x1)))
(if (<= x1 1.35e+154)
(+
x1
(-
(+ x1 (* (* x1 x1) (+ x1 15.0)))
(*
3.0
(/ (- x1 (- (* x1 (* x1 3.0)) (* 2.0 x2))) (+ (* x1 x1) 1.0)))))
(if (<= x1 2.1e+283)
(* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -5.5e+70) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= 5.8e+100) {
tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((x1 + ((x1 * x1) * (x1 + 15.0))) - (3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / ((x1 * x1) + 1.0))));
} else if (x1 <= 2.1e+283) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (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 <= (-5.5d+70)) then
tmp = x1 + ((x2 * ((x1 * (-12.0d0)) - 6.0d0)) + ((x1 * (x1 - (x1 * 9.0d0))) / (x1 + (x1 * 3.0d0))))
else if (x1 <= 5.8d+100) then
tmp = x1 + (((x1 * (-3.0d0)) + (x2 * (-6.0d0))) - ((4.0d0 * (x2 * (x1 * (3.0d0 - (2.0d0 * x2))))) - x1))
else if (x1 <= 1.35d+154) then
tmp = x1 + ((x1 + ((x1 * x1) * (x1 + 15.0d0))) - (3.0d0 * ((x1 - ((x1 * (x1 * 3.0d0)) - (2.0d0 * x2))) / ((x1 * x1) + 1.0d0))))
else if (x1 <= 2.1d+283) then
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -5.5e+70) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= 5.8e+100) {
tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
} else if (x1 <= 1.35e+154) {
tmp = x1 + ((x1 + ((x1 * x1) * (x1 + 15.0))) - (3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / ((x1 * x1) + 1.0))));
} else if (x1 <= 2.1e+283) {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -5.5e+70: tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))) elif x1 <= 5.8e+100: tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)) elif x1 <= 1.35e+154: tmp = x1 + ((x1 + ((x1 * x1) * (x1 + 15.0))) - (3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / ((x1 * x1) + 1.0)))) elif x1 <= 2.1e+283: tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -5.5e+70) tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(Float64(x1 * Float64(x1 - Float64(x1 * 9.0))) / Float64(x1 + Float64(x1 * 3.0))))); elseif (x1 <= 5.8e+100) tmp = Float64(x1 + Float64(Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)) - Float64(Float64(4.0 * Float64(x2 * Float64(x1 * Float64(3.0 - Float64(2.0 * x2))))) - x1))); elseif (x1 <= 1.35e+154) tmp = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * x1) * Float64(x1 + 15.0))) - Float64(3.0 * Float64(Float64(x1 - Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(2.0 * x2))) / Float64(Float64(x1 * x1) + 1.0))))); elseif (x1 <= 2.1e+283) tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -5.5e+70) tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))); elseif (x1 <= 5.8e+100) tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)); elseif (x1 <= 1.35e+154) tmp = x1 + ((x1 + ((x1 * x1) * (x1 + 15.0))) - (3.0 * ((x1 - ((x1 * (x1 * 3.0)) - (2.0 * x2))) / ((x1 * x1) + 1.0)))); elseif (x1 <= 2.1e+283) tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -5.5e+70], N[(x1 + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(x1 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.8e+100], N[(x1 + N[(N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x2 * N[(x1 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.35e+154], N[(x1 + N[(N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(x1 + 15.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(3.0 * N[(N[(x1 - N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.1e+283], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.5 \cdot 10^{+70}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(x1 \cdot -12 - 6\right) + \frac{x1 \cdot \left(x1 - x1 \cdot 9\right)}{x1 + x1 \cdot 3}\right)\\
\mathbf{elif}\;x1 \leq 5.8 \cdot 10^{+100}:\\
\;\;\;\;x1 + \left(\left(x1 \cdot -3 + x2 \cdot -6\right) - \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1\right)\right)\\
\mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;x1 + \left(\left(x1 + \left(x1 \cdot x1\right) \cdot \left(x1 + 15\right)\right) - 3 \cdot \frac{x1 - \left(x1 \cdot \left(x1 \cdot 3\right) - 2 \cdot x2\right)}{x1 \cdot x1 + 1}\right)\\
\mathbf{elif}\;x1 \leq 2.1 \cdot 10^{+283}:\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -5.49999999999999986e70Initial program 20.7%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.3%
+-commutative3.3%
*-commutative3.3%
fma-def3.3%
*-commutative3.3%
Simplified3.3%
Taylor expanded in x2 around 0 16.8%
flip-+5.1%
*-commutative5.1%
*-commutative5.1%
*-commutative5.1%
Applied egg-rr5.1%
swap-sqr5.1%
metadata-eval5.1%
associate-*r*5.1%
distribute-lft-out--56.0%
*-commutative56.0%
cancel-sign-sub-inv56.0%
metadata-eval56.0%
*-commutative56.0%
Simplified56.0%
if -5.49999999999999986e70 < x1 < 5.8000000000000001e100Initial program 99.4%
Taylor expanded in x1 around 0 79.7%
Taylor expanded in x1 around 0 79.4%
if 5.8000000000000001e100 < x1 < 1.35000000000000003e154Initial program 100.0%
Taylor expanded in x1 around inf 100.0%
Taylor expanded in x1 around inf 88.9%
*-commutative88.9%
unpow288.9%
Simplified88.9%
Taylor expanded in x1 around 0 88.9%
+-commutative88.9%
unpow288.9%
cube-mult88.9%
distribute-rgt-out88.9%
Simplified88.9%
if 1.35000000000000003e154 < x1 < 2.10000000000000013e283Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in x1 around inf 75.6%
if 2.10000000000000013e283 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 10.5%
*-commutative10.5%
Simplified10.5%
flip-+100.0%
Applied egg-rr100.0%
swap-sqr100.0%
metadata-eval100.0%
*-commutative100.0%
Simplified100.0%
Final simplification75.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))))
(if (<= x1 -3.4e+70)
(* x1 (+ -1.0 (* x2 -12.0)))
(if (<= x1 -6e-231)
t_0
(if (<= x1 6.8e-196)
(+ x1 (+ (* x2 -6.0) (+ x1 (* x1 -3.0))))
(if (<= x1 7.6e+283)
t_0
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -3.4e+70) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else if (x1 <= -6e-231) {
tmp = t_0;
} else if (x1 <= 6.8e-196) {
tmp = x1 + ((x2 * -6.0) + (x1 + (x1 * -3.0)));
} else if (x1 <= 7.6e+283) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (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 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
if (x1 <= (-3.4d+70)) then
tmp = x1 * ((-1.0d0) + (x2 * (-12.0d0)))
else if (x1 <= (-6d-231)) then
tmp = t_0
else if (x1 <= 6.8d-196) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 + (x1 * (-3.0d0))))
else if (x1 <= 7.6d+283) then
tmp = t_0
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -3.4e+70) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else if (x1 <= -6e-231) {
tmp = t_0;
} else if (x1 <= 6.8e-196) {
tmp = x1 + ((x2 * -6.0) + (x1 + (x1 * -3.0)));
} else if (x1 <= 7.6e+283) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) tmp = 0 if x1 <= -3.4e+70: tmp = x1 * (-1.0 + (x2 * -12.0)) elif x1 <= -6e-231: tmp = t_0 elif x1 <= 6.8e-196: tmp = x1 + ((x2 * -6.0) + (x1 + (x1 * -3.0))) elif x1 <= 7.6e+283: tmp = t_0 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))) tmp = 0.0 if (x1 <= -3.4e+70) tmp = Float64(x1 * Float64(-1.0 + Float64(x2 * -12.0))); elseif (x1 <= -6e-231) tmp = t_0; elseif (x1 <= 6.8e-196) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 + Float64(x1 * -3.0)))); elseif (x1 <= 7.6e+283) tmp = t_0; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); tmp = 0.0; if (x1 <= -3.4e+70) tmp = x1 * (-1.0 + (x2 * -12.0)); elseif (x1 <= -6e-231) tmp = t_0; elseif (x1 <= 6.8e-196) tmp = x1 + ((x2 * -6.0) + (x1 + (x1 * -3.0))); elseif (x1 <= 7.6e+283) tmp = t_0; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.4e+70], N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -6e-231], t$95$0, If[LessEqual[x1, 6.8e-196], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.6e+283], t$95$0, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -3.4 \cdot 10^{+70}:\\
\;\;\;\;x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq -6 \cdot 10^{-231}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 6.8 \cdot 10^{-196}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 + x1 \cdot -3\right)\right)\\
\mathbf{elif}\;x1 \leq 7.6 \cdot 10^{+283}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -3.4000000000000001e70Initial program 20.7%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.3%
+-commutative3.3%
*-commutative3.3%
fma-def3.3%
*-commutative3.3%
Simplified3.3%
Taylor expanded in x2 around 0 16.8%
Taylor expanded in x1 around inf 16.8%
if -3.4000000000000001e70 < x1 < -6.0000000000000005e-231 or 6.8e-196 < x1 < 7.6000000000000004e283Initial program 84.5%
Taylor expanded in x1 around 0 58.5%
Taylor expanded in x1 around 0 64.7%
if -6.0000000000000005e-231 < x1 < 6.8e-196Initial program 99.6%
Taylor expanded in x1 around 0 99.6%
Taylor expanded in x1 around 0 99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x2 around 0 95.2%
Taylor expanded in x1 around 0 95.2%
*-commutative95.2%
Simplified95.2%
if 7.6000000000000004e283 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 10.5%
*-commutative10.5%
Simplified10.5%
flip-+100.0%
Applied egg-rr100.0%
swap-sqr100.0%
metadata-eval100.0%
*-commutative100.0%
Simplified100.0%
Final simplification60.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))))
(if (<= x1 -6.4e+68)
(+
x1
(+
(* x2 (- (* x1 -12.0) 6.0))
(/ (* x1 (- x1 (* x1 9.0))) (+ x1 (* x1 3.0)))))
(if (<= x1 -1.9e-205)
t_0
(if (<= x1 1.55e-196)
(+ x1 (+ (* 3.0 (* x2 -2.0)) (+ x1 (* 4.0 (* x2 (* (* x1 2.0) x2))))))
(if (<= x1 5.5e+283)
t_0
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0)))))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -6.4e+68) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= -1.9e-205) {
tmp = t_0;
} else if (x1 <= 1.55e-196) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * ((x1 * 2.0) * x2)))));
} else if (x1 <= 5.5e+283) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (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 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
if (x1 <= (-6.4d+68)) then
tmp = x1 + ((x2 * ((x1 * (-12.0d0)) - 6.0d0)) + ((x1 * (x1 - (x1 * 9.0d0))) / (x1 + (x1 * 3.0d0))))
else if (x1 <= (-1.9d-205)) then
tmp = t_0
else if (x1 <= 1.55d-196) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + (4.0d0 * (x2 * ((x1 * 2.0d0) * x2)))))
else if (x1 <= 5.5d+283) then
tmp = t_0
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
double tmp;
if (x1 <= -6.4e+68) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= -1.9e-205) {
tmp = t_0;
} else if (x1 <= 1.55e-196) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * ((x1 * 2.0) * x2)))));
} else if (x1 <= 5.5e+283) {
tmp = t_0;
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) tmp = 0 if x1 <= -6.4e+68: tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))) elif x1 <= -1.9e-205: tmp = t_0 elif x1 <= 1.55e-196: tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * ((x1 * 2.0) * x2))))) elif x1 <= 5.5e+283: tmp = t_0 else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))) tmp = 0.0 if (x1 <= -6.4e+68) tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(Float64(x1 * Float64(x1 - Float64(x1 * 9.0))) / Float64(x1 + Float64(x1 * 3.0))))); elseif (x1 <= -1.9e-205) tmp = t_0; elseif (x1 <= 1.55e-196) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * 2.0) * x2)))))); elseif (x1 <= 5.5e+283) tmp = t_0; else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); tmp = 0.0; if (x1 <= -6.4e+68) tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))); elseif (x1 <= -1.9e-205) tmp = t_0; elseif (x1 <= 1.55e-196) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * ((x1 * 2.0) * x2))))); elseif (x1 <= 5.5e+283) tmp = t_0; else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.4e+68], N[(x1 + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(x1 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.9e-205], t$95$0, If[LessEqual[x1, 1.55e-196], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * 2.0), $MachinePrecision] * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5.5e+283], t$95$0, N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{if}\;x1 \leq -6.4 \cdot 10^{+68}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(x1 \cdot -12 - 6\right) + \frac{x1 \cdot \left(x1 - x1 \cdot 9\right)}{x1 + x1 \cdot 3}\right)\\
\mathbf{elif}\;x1 \leq -1.9 \cdot 10^{-205}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x1 \leq 1.55 \cdot 10^{-196}:\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + 4 \cdot \left(x2 \cdot \left(\left(x1 \cdot 2\right) \cdot x2\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5.5 \cdot 10^{+283}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -6.39999999999999989e68Initial program 20.7%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.3%
+-commutative3.3%
*-commutative3.3%
fma-def3.3%
*-commutative3.3%
Simplified3.3%
Taylor expanded in x2 around 0 16.8%
flip-+5.1%
*-commutative5.1%
*-commutative5.1%
*-commutative5.1%
Applied egg-rr5.1%
swap-sqr5.1%
metadata-eval5.1%
associate-*r*5.1%
distribute-lft-out--56.0%
*-commutative56.0%
cancel-sign-sub-inv56.0%
metadata-eval56.0%
*-commutative56.0%
Simplified56.0%
if -6.39999999999999989e68 < x1 < -1.89999999999999996e-205 or 1.54999999999999996e-196 < x1 < 5.49999999999999986e283Initial program 84.1%
Taylor expanded in x1 around 0 57.4%
Taylor expanded in x1 around 0 64.9%
if -1.89999999999999996e-205 < x1 < 1.54999999999999996e-196Initial program 99.6%
Taylor expanded in x1 around 0 99.6%
Taylor expanded in x1 around 0 93.7%
*-commutative93.7%
Simplified93.7%
Taylor expanded in x2 around inf 93.7%
*-commutative93.7%
associate-*l*93.7%
Simplified93.7%
if 5.49999999999999986e283 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 10.5%
*-commutative10.5%
Simplified10.5%
flip-+100.0%
Applied egg-rr100.0%
swap-sqr100.0%
metadata-eval100.0%
*-commutative100.0%
Simplified100.0%
Final simplification69.2%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -5.8e+70)
(+
x1
(+
(* x2 (- (* x1 -12.0) 6.0))
(/ (* x1 (- x1 (* x1 9.0))) (+ x1 (* x1 3.0)))))
(if (<= x1 2.4e+283)
(+
x1
(-
(+ (* x1 -3.0) (* x2 -6.0))
(- (* 4.0 (* x2 (* x1 (- 3.0 (* 2.0 x2))))) x1)))
(/ (- (* x1 x1) (* (* x2 x2) 36.0)) (- x1 (* x2 -6.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -5.8e+70) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= 2.4e+283) {
tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (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 <= (-5.8d+70)) then
tmp = x1 + ((x2 * ((x1 * (-12.0d0)) - 6.0d0)) + ((x1 * (x1 - (x1 * 9.0d0))) / (x1 + (x1 * 3.0d0))))
else if (x1 <= 2.4d+283) then
tmp = x1 + (((x1 * (-3.0d0)) + (x2 * (-6.0d0))) - ((4.0d0 * (x2 * (x1 * (3.0d0 - (2.0d0 * x2))))) - x1))
else
tmp = ((x1 * x1) - ((x2 * x2) * 36.0d0)) / (x1 - (x2 * (-6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -5.8e+70) {
tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0))));
} else if (x1 <= 2.4e+283) {
tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
} else {
tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -5.8e+70: tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))) elif x1 <= 2.4e+283: tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)) else: tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -5.8e+70) tmp = Float64(x1 + Float64(Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) + Float64(Float64(x1 * Float64(x1 - Float64(x1 * 9.0))) / Float64(x1 + Float64(x1 * 3.0))))); elseif (x1 <= 2.4e+283) tmp = Float64(x1 + Float64(Float64(Float64(x1 * -3.0) + Float64(x2 * -6.0)) - Float64(Float64(4.0 * Float64(x2 * Float64(x1 * Float64(3.0 - Float64(2.0 * x2))))) - x1))); else tmp = Float64(Float64(Float64(x1 * x1) - Float64(Float64(x2 * x2) * 36.0)) / Float64(x1 - Float64(x2 * -6.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -5.8e+70) tmp = x1 + ((x2 * ((x1 * -12.0) - 6.0)) + ((x1 * (x1 - (x1 * 9.0))) / (x1 + (x1 * 3.0)))); elseif (x1 <= 2.4e+283) tmp = x1 + (((x1 * -3.0) + (x2 * -6.0)) - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)); else tmp = ((x1 * x1) - ((x2 * x2) * 36.0)) / (x1 - (x2 * -6.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -5.8e+70], N[(x1 + N[(N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(x1 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x1 + N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.4e+283], N[(x1 + N[(N[(N[(x1 * -3.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x2 * N[(x1 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x1 * x1), $MachinePrecision] - N[(N[(x2 * x2), $MachinePrecision] * 36.0), $MachinePrecision]), $MachinePrecision] / N[(x1 - N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -5.8 \cdot 10^{+70}:\\
\;\;\;\;x1 + \left(x2 \cdot \left(x1 \cdot -12 - 6\right) + \frac{x1 \cdot \left(x1 - x1 \cdot 9\right)}{x1 + x1 \cdot 3}\right)\\
\mathbf{elif}\;x1 \leq 2.4 \cdot 10^{+283}:\\
\;\;\;\;x1 + \left(\left(x1 \cdot -3 + x2 \cdot -6\right) - \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x1 \cdot x1 - \left(x2 \cdot x2\right) \cdot 36}{x1 - x2 \cdot -6}\\
\end{array}
\end{array}
if x1 < -5.7999999999999997e70Initial program 20.7%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.3%
+-commutative3.3%
*-commutative3.3%
fma-def3.3%
*-commutative3.3%
Simplified3.3%
Taylor expanded in x2 around 0 16.8%
flip-+5.1%
*-commutative5.1%
*-commutative5.1%
*-commutative5.1%
Applied egg-rr5.1%
swap-sqr5.1%
metadata-eval5.1%
associate-*r*5.1%
distribute-lft-out--56.0%
*-commutative56.0%
cancel-sign-sub-inv56.0%
metadata-eval56.0%
*-commutative56.0%
Simplified56.0%
if -5.7999999999999997e70 < x1 < 2.39999999999999998e283Initial program 87.8%
Taylor expanded in x1 around 0 67.5%
Taylor expanded in x1 around 0 75.8%
if 2.39999999999999998e283 < x1 Initial program 0.0%
Taylor expanded in x1 around 0 0.0%
Taylor expanded in x1 around 0 10.5%
*-commutative10.5%
Simplified10.5%
flip-+100.0%
Applied egg-rr100.0%
swap-sqr100.0%
metadata-eval100.0%
*-commutative100.0%
Simplified100.0%
Final simplification72.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -8.2e-26) (not (<= x2 2e-15))) (+ x1 (+ (* 3.0 (* x2 -2.0)) (+ x1 (* 4.0 (* x2 (* (* x1 2.0) x2)))))) (+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -8.2e-26) || !(x2 <= 2e-15)) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * ((x1 * 2.0) * x2)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x2 <= (-8.2d-26)) .or. (.not. (x2 <= 2d-15))) then
tmp = x1 + ((3.0d0 * (x2 * (-2.0d0))) + (x1 + (4.0d0 * (x2 * ((x1 * 2.0d0) * x2)))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -8.2e-26) || !(x2 <= 2e-15)) {
tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * ((x1 * 2.0) * x2)))));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -8.2e-26) or not (x2 <= 2e-15): tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * ((x1 * 2.0) * x2))))) else: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -8.2e-26) || !(x2 <= 2e-15)) tmp = Float64(x1 + Float64(Float64(3.0 * Float64(x2 * -2.0)) + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * 2.0) * x2)))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -8.2e-26) || ~((x2 <= 2e-15))) tmp = x1 + ((3.0 * (x2 * -2.0)) + (x1 + (4.0 * (x2 * ((x1 * 2.0) * x2))))); else tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -8.2e-26], N[Not[LessEqual[x2, 2e-15]], $MachinePrecision]], N[(x1 + N[(N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * 2.0), $MachinePrecision] * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -8.2 \cdot 10^{-26} \lor \neg \left(x2 \leq 2 \cdot 10^{-15}\right):\\
\;\;\;\;x1 + \left(3 \cdot \left(x2 \cdot -2\right) + \left(x1 + 4 \cdot \left(x2 \cdot \left(\left(x1 \cdot 2\right) \cdot x2\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\end{array}
\end{array}
if x2 < -8.1999999999999997e-26 or 2.0000000000000002e-15 < x2 Initial program 71.3%
Taylor expanded in x1 around 0 54.5%
Taylor expanded in x1 around 0 66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in x2 around inf 66.4%
*-commutative66.4%
associate-*l*66.4%
Simplified66.4%
if -8.1999999999999997e-26 < x2 < 2.0000000000000002e-15Initial program 72.6%
Taylor expanded in x1 around 0 48.5%
Taylor expanded in x1 around 0 49.9%
Final simplification59.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 3.0 (* x2 -2.0))))
(if (<= x2 -1.04e-25)
(+ x1 (- t_0 (- (* 4.0 (* x2 (* x1 (- 3.0 (* 2.0 x2))))) x1)))
(if (<= x2 3.6e-21)
(+ x1 (+ (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 2.0))))
(+ x1 (+ t_0 (+ x1 (* 4.0 (* x2 (* (* x1 2.0) x2))))))))))
double code(double x1, double x2) {
double t_0 = 3.0 * (x2 * -2.0);
double tmp;
if (x2 <= -1.04e-25) {
tmp = x1 + (t_0 - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
} else if (x2 <= 3.6e-21) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else {
tmp = x1 + (t_0 + (x1 + (4.0 * (x2 * ((x1 * 2.0) * x2)))));
}
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 = 3.0d0 * (x2 * (-2.0d0))
if (x2 <= (-1.04d-25)) then
tmp = x1 + (t_0 - ((4.0d0 * (x2 * (x1 * (3.0d0 - (2.0d0 * x2))))) - x1))
else if (x2 <= 3.6d-21) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 2.0d0)))
else
tmp = x1 + (t_0 + (x1 + (4.0d0 * (x2 * ((x1 * 2.0d0) * x2)))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 3.0 * (x2 * -2.0);
double tmp;
if (x2 <= -1.04e-25) {
tmp = x1 + (t_0 - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1));
} else if (x2 <= 3.6e-21) {
tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0)));
} else {
tmp = x1 + (t_0 + (x1 + (4.0 * (x2 * ((x1 * 2.0) * x2)))));
}
return tmp;
}
def code(x1, x2): t_0 = 3.0 * (x2 * -2.0) tmp = 0 if x2 <= -1.04e-25: tmp = x1 + (t_0 - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)) elif x2 <= 3.6e-21: tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))) else: tmp = x1 + (t_0 + (x1 + (4.0 * (x2 * ((x1 * 2.0) * x2))))) return tmp
function code(x1, x2) t_0 = Float64(3.0 * Float64(x2 * -2.0)) tmp = 0.0 if (x2 <= -1.04e-25) tmp = Float64(x1 + Float64(t_0 - Float64(Float64(4.0 * Float64(x2 * Float64(x1 * Float64(3.0 - Float64(2.0 * x2))))) - x1))); elseif (x2 <= 3.6e-21) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 2.0)))); else tmp = Float64(x1 + Float64(t_0 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(Float64(x1 * 2.0) * x2)))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = 3.0 * (x2 * -2.0); tmp = 0.0; if (x2 <= -1.04e-25) tmp = x1 + (t_0 - ((4.0 * (x2 * (x1 * (3.0 - (2.0 * x2))))) - x1)); elseif (x2 <= 3.6e-21) tmp = x1 + ((x2 * -6.0) + (x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 2.0))); else tmp = x1 + (t_0 + (x1 + (4.0 * (x2 * ((x1 * 2.0) * x2))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(3.0 * N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -1.04e-25], N[(x1 + N[(t$95$0 - N[(N[(4.0 * N[(x2 * N[(x1 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 3.6e-21], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$0 + N[(x1 + N[(4.0 * N[(x2 * N[(N[(x1 * 2.0), $MachinePrecision] * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(x2 \cdot -2\right)\\
\mathbf{if}\;x2 \leq -1.04 \cdot 10^{-25}:\\
\;\;\;\;x1 + \left(t_0 - \left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - x1\right)\right)\\
\mathbf{elif}\;x2 \leq 3.6 \cdot 10^{-21}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t_0 + \left(x1 + 4 \cdot \left(x2 \cdot \left(\left(x1 \cdot 2\right) \cdot x2\right)\right)\right)\right)\\
\end{array}
\end{array}
if x2 < -1.04000000000000004e-25Initial program 74.9%
Taylor expanded in x1 around 0 56.0%
Taylor expanded in x1 around 0 64.1%
*-commutative64.1%
Simplified64.1%
if -1.04000000000000004e-25 < x2 < 3.59999999999999989e-21Initial program 72.6%
Taylor expanded in x1 around 0 48.5%
Taylor expanded in x1 around 0 49.9%
if 3.59999999999999989e-21 < x2 Initial program 67.4%
Taylor expanded in x1 around 0 53.0%
Taylor expanded in x1 around 0 68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in x2 around inf 68.7%
*-commutative68.7%
associate-*l*68.7%
Simplified68.7%
Final simplification59.3%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.9e+187) (not (<= x2 3.6e+127))) (+ x1 (+ 9.0 (+ x1 (* 4.0 (* x2 (* x1 (- (* 2.0 x2) 3.0))))))) (- x1 (- (* x2 (- 6.0 (* x1 -12.0))) (+ x1 (* x1 -3.0))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.9e+187) || !(x2 <= 3.6e+127)) {
tmp = x1 + (9.0 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else {
tmp = x1 - ((x2 * (6.0 - (x1 * -12.0))) - (x1 + (x1 * -3.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.9d+187)) .or. (.not. (x2 <= 3.6d+127))) then
tmp = x1 + (9.0d0 + (x1 + (4.0d0 * (x2 * (x1 * ((2.0d0 * x2) - 3.0d0))))))
else
tmp = x1 - ((x2 * (6.0d0 - (x1 * (-12.0d0)))) - (x1 + (x1 * (-3.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.9e+187) || !(x2 <= 3.6e+127)) {
tmp = x1 + (9.0 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else {
tmp = x1 - ((x2 * (6.0 - (x1 * -12.0))) - (x1 + (x1 * -3.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.9e+187) or not (x2 <= 3.6e+127): tmp = x1 + (9.0 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))) else: tmp = x1 - ((x2 * (6.0 - (x1 * -12.0))) - (x1 + (x1 * -3.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.9e+187) || !(x2 <= 3.6e+127)) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))))))); else tmp = Float64(x1 - Float64(Float64(x2 * Float64(6.0 - Float64(x1 * -12.0))) - Float64(x1 + Float64(x1 * -3.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.9e+187) || ~((x2 <= 3.6e+127))) tmp = x1 + (9.0 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))); else tmp = x1 - ((x2 * (6.0 - (x1 * -12.0))) - (x1 + (x1 * -3.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.9e+187], N[Not[LessEqual[x2, 3.6e+127]], $MachinePrecision]], N[(x1 + N[(9.0 + N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x2 * N[(6.0 - N[(x1 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.9 \cdot 10^{+187} \lor \neg \left(x2 \leq 3.6 \cdot 10^{+127}\right):\\
\;\;\;\;x1 + \left(9 + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x2 \cdot \left(6 - x1 \cdot -12\right) - \left(x1 + x1 \cdot -3\right)\right)\\
\end{array}
\end{array}
if x2 < -1.9e187 or 3.59999999999999979e127 < x2 Initial program 64.9%
Taylor expanded in x1 around 0 57.1%
Taylor expanded in x1 around inf 72.0%
if -1.9e187 < x2 < 3.59999999999999979e127Initial program 74.0%
Taylor expanded in x1 around 0 50.4%
Taylor expanded in x1 around 0 53.0%
+-commutative53.0%
*-commutative53.0%
fma-def53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in x2 around 0 49.4%
Final simplification54.7%
(FPCore (x1 x2)
:precision binary64
(if (<= x2 -3.2e+187)
(+ x1 (+ 9.0 (+ x1 (* 4.0 (* x2 (* x1 (- (* 2.0 x2) 3.0)))))))
(if (<= x2 9.8e-20)
(- x1 (- (* x2 (- 6.0 (* x1 -12.0))) (+ x1 (* x1 -3.0))))
(- (* x2 -6.0) (* x1 (- (* 4.0 (* x2 (- 3.0 (* 2.0 x2)))) 2.0))))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -3.2e+187) {
tmp = x1 + (9.0 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else if (x2 <= 9.8e-20) {
tmp = x1 - ((x2 * (6.0 - (x1 * -12.0))) - (x1 + (x1 * -3.0)));
} else {
tmp = (x2 * -6.0) - (x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - 2.0));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-3.2d+187)) then
tmp = x1 + (9.0d0 + (x1 + (4.0d0 * (x2 * (x1 * ((2.0d0 * x2) - 3.0d0))))))
else if (x2 <= 9.8d-20) then
tmp = x1 - ((x2 * (6.0d0 - (x1 * (-12.0d0)))) - (x1 + (x1 * (-3.0d0))))
else
tmp = (x2 * (-6.0d0)) - (x1 * ((4.0d0 * (x2 * (3.0d0 - (2.0d0 * x2)))) - 2.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -3.2e+187) {
tmp = x1 + (9.0 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0))))));
} else if (x2 <= 9.8e-20) {
tmp = x1 - ((x2 * (6.0 - (x1 * -12.0))) - (x1 + (x1 * -3.0)));
} else {
tmp = (x2 * -6.0) - (x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - 2.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -3.2e+187: tmp = x1 + (9.0 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))) elif x2 <= 9.8e-20: tmp = x1 - ((x2 * (6.0 - (x1 * -12.0))) - (x1 + (x1 * -3.0))) else: tmp = (x2 * -6.0) - (x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - 2.0)) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -3.2e+187) tmp = Float64(x1 + Float64(9.0 + Float64(x1 + Float64(4.0 * Float64(x2 * Float64(x1 * Float64(Float64(2.0 * x2) - 3.0))))))); elseif (x2 <= 9.8e-20) tmp = Float64(x1 - Float64(Float64(x2 * Float64(6.0 - Float64(x1 * -12.0))) - Float64(x1 + Float64(x1 * -3.0)))); else tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))) - 2.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -3.2e+187) tmp = x1 + (9.0 + (x1 + (4.0 * (x2 * (x1 * ((2.0 * x2) - 3.0)))))); elseif (x2 <= 9.8e-20) tmp = x1 - ((x2 * (6.0 - (x1 * -12.0))) - (x1 + (x1 * -3.0))); else tmp = (x2 * -6.0) - (x1 * ((4.0 * (x2 * (3.0 - (2.0 * x2)))) - 2.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -3.2e+187], N[(x1 + N[(9.0 + N[(x1 + N[(4.0 * N[(x2 * N[(x1 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 9.8e-20], N[(x1 - N[(N[(x2 * N[(6.0 - N[(x1 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(N[(4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -3.2 \cdot 10^{+187}:\\
\;\;\;\;x1 + \left(9 + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)\right)\\
\mathbf{elif}\;x2 \leq 9.8 \cdot 10^{-20}:\\
\;\;\;\;x1 - \left(x2 \cdot \left(6 - x1 \cdot -12\right) - \left(x1 + x1 \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right) - 2\right)\\
\end{array}
\end{array}
if x2 < -3.19999999999999993e187Initial program 68.0%
Taylor expanded in x1 around 0 64.0%
Taylor expanded in x1 around inf 75.7%
if -3.19999999999999993e187 < x2 < 9.8000000000000003e-20Initial program 74.4%
Taylor expanded in x1 around 0 49.6%
Taylor expanded in x1 around 0 51.4%
+-commutative51.4%
*-commutative51.4%
fma-def51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in x2 around 0 49.3%
if 9.8000000000000003e-20 < x2 Initial program 67.4%
Taylor expanded in x1 around 0 53.0%
Taylor expanded in x1 around 0 68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in x1 around 0 60.7%
Final simplification55.0%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -9.5e+62)
(* x1 (+ -1.0 (* x2 -12.0)))
(if (<= x1 -2.5e-30)
(+ x1 (* x1 (* x2 (* x2 8.0))))
(if (<= x1 1.7e-5)
(+ x1 (+ (* x2 -6.0) (+ x1 (* x1 -3.0))))
(* x1 (+ 2.0 (* 4.0 (* x2 (- (* 2.0 x2) 3.0)))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -9.5e+62) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else if (x1 <= -2.5e-30) {
tmp = x1 + (x1 * (x2 * (x2 * 8.0)));
} else if (x1 <= 1.7e-5) {
tmp = x1 + ((x2 * -6.0) + (x1 + (x1 * -3.0)));
} else {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-9.5d+62)) then
tmp = x1 * ((-1.0d0) + (x2 * (-12.0d0)))
else if (x1 <= (-2.5d-30)) then
tmp = x1 + (x1 * (x2 * (x2 * 8.0d0)))
else if (x1 <= 1.7d-5) then
tmp = x1 + ((x2 * (-6.0d0)) + (x1 + (x1 * (-3.0d0))))
else
tmp = x1 * (2.0d0 + (4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -9.5e+62) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else if (x1 <= -2.5e-30) {
tmp = x1 + (x1 * (x2 * (x2 * 8.0)));
} else if (x1 <= 1.7e-5) {
tmp = x1 + ((x2 * -6.0) + (x1 + (x1 * -3.0)));
} else {
tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -9.5e+62: tmp = x1 * (-1.0 + (x2 * -12.0)) elif x1 <= -2.5e-30: tmp = x1 + (x1 * (x2 * (x2 * 8.0))) elif x1 <= 1.7e-5: tmp = x1 + ((x2 * -6.0) + (x1 + (x1 * -3.0))) else: tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -9.5e+62) tmp = Float64(x1 * Float64(-1.0 + Float64(x2 * -12.0))); elseif (x1 <= -2.5e-30) tmp = Float64(x1 + Float64(x1 * Float64(x2 * Float64(x2 * 8.0)))); elseif (x1 <= 1.7e-5) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 + Float64(x1 * -3.0)))); else tmp = Float64(x1 * Float64(2.0 + Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -9.5e+62) tmp = x1 * (-1.0 + (x2 * -12.0)); elseif (x1 <= -2.5e-30) tmp = x1 + (x1 * (x2 * (x2 * 8.0))); elseif (x1 <= 1.7e-5) tmp = x1 + ((x2 * -6.0) + (x1 + (x1 * -3.0))); else tmp = x1 * (2.0 + (4.0 * (x2 * ((2.0 * x2) - 3.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -9.5e+62], N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.5e-30], N[(x1 + N[(x1 * N[(x2 * N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.7e-5], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(2.0 + N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -9.5 \cdot 10^{+62}:\\
\;\;\;\;x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq -2.5 \cdot 10^{-30}:\\
\;\;\;\;x1 + x1 \cdot \left(x2 \cdot \left(x2 \cdot 8\right)\right)\\
\mathbf{elif}\;x1 \leq 1.7 \cdot 10^{-5}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 + x1 \cdot -3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(2 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -9.5000000000000003e62Initial program 22.1%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.3%
+-commutative3.3%
*-commutative3.3%
fma-def3.3%
*-commutative3.3%
Simplified3.3%
Taylor expanded in x2 around 0 16.6%
Taylor expanded in x1 around inf 16.6%
if -9.5000000000000003e62 < x1 < -2.49999999999999986e-30Initial program 99.5%
Taylor expanded in x1 around 0 59.7%
Taylor expanded in x2 around inf 47.9%
associate-*r*47.9%
*-commutative47.9%
unpow247.9%
associate-*r*47.9%
*-commutative47.9%
Simplified47.9%
if -2.49999999999999986e-30 < x1 < 1.7e-5Initial program 99.4%
Taylor expanded in x1 around 0 99.1%
Taylor expanded in x1 around 0 98.9%
+-commutative98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in x2 around 0 78.4%
Taylor expanded in x1 around 0 78.4%
*-commutative78.4%
Simplified78.4%
if 1.7e-5 < x1 Initial program 55.8%
Taylor expanded in x1 around 0 7.4%
Taylor expanded in x1 around 0 34.7%
*-commutative34.7%
Simplified34.7%
Taylor expanded in x1 around inf 34.7%
Final simplification52.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.16e+191) (not (<= x2 7.5e+127))) (+ x1 (* x1 (* x2 (* x2 8.0)))) (- x1 (- (* x2 (- 6.0 (* x1 -12.0))) (+ x1 (* x1 -3.0))))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.16e+191) || !(x2 <= 7.5e+127)) {
tmp = x1 + (x1 * (x2 * (x2 * 8.0)));
} else {
tmp = x1 - ((x2 * (6.0 - (x1 * -12.0))) - (x1 + (x1 * -3.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.16d+191)) .or. (.not. (x2 <= 7.5d+127))) then
tmp = x1 + (x1 * (x2 * (x2 * 8.0d0)))
else
tmp = x1 - ((x2 * (6.0d0 - (x1 * (-12.0d0)))) - (x1 + (x1 * (-3.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.16e+191) || !(x2 <= 7.5e+127)) {
tmp = x1 + (x1 * (x2 * (x2 * 8.0)));
} else {
tmp = x1 - ((x2 * (6.0 - (x1 * -12.0))) - (x1 + (x1 * -3.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.16e+191) or not (x2 <= 7.5e+127): tmp = x1 + (x1 * (x2 * (x2 * 8.0))) else: tmp = x1 - ((x2 * (6.0 - (x1 * -12.0))) - (x1 + (x1 * -3.0))) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.16e+191) || !(x2 <= 7.5e+127)) tmp = Float64(x1 + Float64(x1 * Float64(x2 * Float64(x2 * 8.0)))); else tmp = Float64(x1 - Float64(Float64(x2 * Float64(6.0 - Float64(x1 * -12.0))) - Float64(x1 + Float64(x1 * -3.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.16e+191) || ~((x2 <= 7.5e+127))) tmp = x1 + (x1 * (x2 * (x2 * 8.0))); else tmp = x1 - ((x2 * (6.0 - (x1 * -12.0))) - (x1 + (x1 * -3.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.16e+191], N[Not[LessEqual[x2, 7.5e+127]], $MachinePrecision]], N[(x1 + N[(x1 * N[(x2 * N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 - N[(N[(x2 * N[(6.0 - N[(x1 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.16 \cdot 10^{+191} \lor \neg \left(x2 \leq 7.5 \cdot 10^{+127}\right):\\
\;\;\;\;x1 + x1 \cdot \left(x2 \cdot \left(x2 \cdot 8\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 - \left(x2 \cdot \left(6 - x1 \cdot -12\right) - \left(x1 + x1 \cdot -3\right)\right)\\
\end{array}
\end{array}
if x2 < -1.15999999999999996e191 or 7.4999999999999996e127 < x2 Initial program 64.3%
Taylor expanded in x1 around 0 56.3%
Taylor expanded in x2 around inf 62.2%
associate-*r*62.2%
*-commutative62.2%
unpow262.2%
associate-*r*62.2%
*-commutative62.2%
Simplified62.2%
if -1.15999999999999996e191 < x2 < 7.4999999999999996e127Initial program 74.1%
Taylor expanded in x1 around 0 50.6%
Taylor expanded in x1 around 0 53.2%
+-commutative53.2%
*-commutative53.2%
fma-def53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in x2 around 0 49.2%
Final simplification52.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* x1 (* x2 (* x2 8.0)))))
(t_1 (* x2 (- (* x1 -12.0) 6.0))))
(if (<= x2 -1.6e+189)
t_0
(if (<= x2 -7e-68)
t_1
(if (<= x2 5e-92)
(* x1 (+ -1.0 (* x2 -12.0)))
(if (<= x2 1.85e+127) t_1 t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + (x1 * (x2 * (x2 * 8.0)));
double t_1 = x2 * ((x1 * -12.0) - 6.0);
double tmp;
if (x2 <= -1.6e+189) {
tmp = t_0;
} else if (x2 <= -7e-68) {
tmp = t_1;
} else if (x2 <= 5e-92) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else if (x2 <= 1.85e+127) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x1 + (x1 * (x2 * (x2 * 8.0d0)))
t_1 = x2 * ((x1 * (-12.0d0)) - 6.0d0)
if (x2 <= (-1.6d+189)) then
tmp = t_0
else if (x2 <= (-7d-68)) then
tmp = t_1
else if (x2 <= 5d-92) then
tmp = x1 * ((-1.0d0) + (x2 * (-12.0d0)))
else if (x2 <= 1.85d+127) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + (x1 * (x2 * (x2 * 8.0)));
double t_1 = x2 * ((x1 * -12.0) - 6.0);
double tmp;
if (x2 <= -1.6e+189) {
tmp = t_0;
} else if (x2 <= -7e-68) {
tmp = t_1;
} else if (x2 <= 5e-92) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else if (x2 <= 1.85e+127) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + (x1 * (x2 * (x2 * 8.0))) t_1 = x2 * ((x1 * -12.0) - 6.0) tmp = 0 if x2 <= -1.6e+189: tmp = t_0 elif x2 <= -7e-68: tmp = t_1 elif x2 <= 5e-92: tmp = x1 * (-1.0 + (x2 * -12.0)) elif x2 <= 1.85e+127: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(x1 * Float64(x2 * Float64(x2 * 8.0)))) t_1 = Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)) tmp = 0.0 if (x2 <= -1.6e+189) tmp = t_0; elseif (x2 <= -7e-68) tmp = t_1; elseif (x2 <= 5e-92) tmp = Float64(x1 * Float64(-1.0 + Float64(x2 * -12.0))); elseif (x2 <= 1.85e+127) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + (x1 * (x2 * (x2 * 8.0))); t_1 = x2 * ((x1 * -12.0) - 6.0); tmp = 0.0; if (x2 <= -1.6e+189) tmp = t_0; elseif (x2 <= -7e-68) tmp = t_1; elseif (x2 <= 5e-92) tmp = x1 * (-1.0 + (x2 * -12.0)); elseif (x2 <= 1.85e+127) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(x1 * N[(x2 * N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -1.6e+189], t$95$0, If[LessEqual[x2, -7e-68], t$95$1, If[LessEqual[x2, 5e-92], N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x2, 1.85e+127], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + x1 \cdot \left(x2 \cdot \left(x2 \cdot 8\right)\right)\\
t_1 := x2 \cdot \left(x1 \cdot -12 - 6\right)\\
\mathbf{if}\;x2 \leq -1.6 \cdot 10^{+189}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x2 \leq -7 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x2 \leq 5 \cdot 10^{-92}:\\
\;\;\;\;x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\mathbf{elif}\;x2 \leq 1.85 \cdot 10^{+127}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x2 < -1.6e189 or 1.8499999999999999e127 < x2 Initial program 64.3%
Taylor expanded in x1 around 0 56.3%
Taylor expanded in x2 around inf 62.2%
associate-*r*62.2%
*-commutative62.2%
unpow262.2%
associate-*r*62.2%
*-commutative62.2%
Simplified62.2%
if -1.6e189 < x2 < -7.00000000000000026e-68 or 5.00000000000000011e-92 < x2 < 1.8499999999999999e127Initial program 76.3%
Taylor expanded in x1 around 0 53.7%
Taylor expanded in x1 around 0 57.4%
+-commutative57.4%
*-commutative57.4%
fma-def57.4%
*-commutative57.4%
Simplified57.4%
Taylor expanded in x2 around 0 50.2%
Taylor expanded in x2 around inf 49.2%
if -7.00000000000000026e-68 < x2 < 5.00000000000000011e-92Initial program 71.3%
Taylor expanded in x1 around 0 46.6%
Taylor expanded in x1 around 0 47.9%
+-commutative47.9%
*-commutative47.9%
fma-def47.9%
*-commutative47.9%
Simplified47.9%
Taylor expanded in x2 around 0 47.9%
Taylor expanded in x1 around inf 34.3%
Final simplification47.2%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -8.8e+62)
(* x1 (+ -1.0 (* x2 -12.0)))
(if (or (<= x1 -3.4e-30) (not (<= x1 1.7e-5)))
(+ x1 (* x1 (* x2 (* x2 8.0))))
(+ x1 (+ (* x2 -6.0) (+ x1 (* x1 -3.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -8.8e+62) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else if ((x1 <= -3.4e-30) || !(x1 <= 1.7e-5)) {
tmp = x1 + (x1 * (x2 * (x2 * 8.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 + (x1 * -3.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-8.8d+62)) then
tmp = x1 * ((-1.0d0) + (x2 * (-12.0d0)))
else if ((x1 <= (-3.4d-30)) .or. (.not. (x1 <= 1.7d-5))) then
tmp = x1 + (x1 * (x2 * (x2 * 8.0d0)))
else
tmp = x1 + ((x2 * (-6.0d0)) + (x1 + (x1 * (-3.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -8.8e+62) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else if ((x1 <= -3.4e-30) || !(x1 <= 1.7e-5)) {
tmp = x1 + (x1 * (x2 * (x2 * 8.0)));
} else {
tmp = x1 + ((x2 * -6.0) + (x1 + (x1 * -3.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -8.8e+62: tmp = x1 * (-1.0 + (x2 * -12.0)) elif (x1 <= -3.4e-30) or not (x1 <= 1.7e-5): tmp = x1 + (x1 * (x2 * (x2 * 8.0))) else: tmp = x1 + ((x2 * -6.0) + (x1 + (x1 * -3.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -8.8e+62) tmp = Float64(x1 * Float64(-1.0 + Float64(x2 * -12.0))); elseif ((x1 <= -3.4e-30) || !(x1 <= 1.7e-5)) tmp = Float64(x1 + Float64(x1 * Float64(x2 * Float64(x2 * 8.0)))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(x1 + Float64(x1 * -3.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -8.8e+62) tmp = x1 * (-1.0 + (x2 * -12.0)); elseif ((x1 <= -3.4e-30) || ~((x1 <= 1.7e-5))) tmp = x1 + (x1 * (x2 * (x2 * 8.0))); else tmp = x1 + ((x2 * -6.0) + (x1 + (x1 * -3.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -8.8e+62], N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x1, -3.4e-30], N[Not[LessEqual[x1, 1.7e-5]], $MachinePrecision]], N[(x1 + N[(x1 * N[(x2 * N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -8.8 \cdot 10^{+62}:\\
\;\;\;\;x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq -3.4 \cdot 10^{-30} \lor \neg \left(x1 \leq 1.7 \cdot 10^{-5}\right):\\
\;\;\;\;x1 + x1 \cdot \left(x2 \cdot \left(x2 \cdot 8\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 + x1 \cdot -3\right)\right)\\
\end{array}
\end{array}
if x1 < -8.80000000000000058e62Initial program 22.1%
Taylor expanded in x1 around 0 0.1%
Taylor expanded in x1 around 0 3.3%
+-commutative3.3%
*-commutative3.3%
fma-def3.3%
*-commutative3.3%
Simplified3.3%
Taylor expanded in x2 around 0 16.6%
Taylor expanded in x1 around inf 16.6%
if -8.80000000000000058e62 < x1 < -3.4000000000000003e-30 or 1.7e-5 < x1 Initial program 64.7%
Taylor expanded in x1 around 0 18.1%
Taylor expanded in x2 around inf 37.4%
associate-*r*37.4%
*-commutative37.4%
unpow237.4%
associate-*r*37.4%
*-commutative37.4%
Simplified37.4%
if -3.4000000000000003e-30 < x1 < 1.7e-5Initial program 99.4%
Taylor expanded in x1 around 0 99.1%
Taylor expanded in x1 around 0 98.9%
+-commutative98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in x2 around 0 78.4%
Taylor expanded in x1 around 0 78.4%
*-commutative78.4%
Simplified78.4%
Final simplification52.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x1 -7.2e-84) (not (<= x1 1.15e-97))) (* x1 (+ -1.0 (* x2 -12.0))) (* x2 -6.0)))
double code(double x1, double x2) {
double tmp;
if ((x1 <= -7.2e-84) || !(x1 <= 1.15e-97)) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((x1 <= (-7.2d-84)) .or. (.not. (x1 <= 1.15d-97))) then
tmp = x1 * ((-1.0d0) + (x2 * (-12.0d0)))
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x1 <= -7.2e-84) || !(x1 <= 1.15e-97)) {
tmp = x1 * (-1.0 + (x2 * -12.0));
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x1 <= -7.2e-84) or not (x1 <= 1.15e-97): tmp = x1 * (-1.0 + (x2 * -12.0)) else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if ((x1 <= -7.2e-84) || !(x1 <= 1.15e-97)) tmp = Float64(x1 * Float64(-1.0 + Float64(x2 * -12.0))); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x1 <= -7.2e-84) || ~((x1 <= 1.15e-97))) tmp = x1 * (-1.0 + (x2 * -12.0)); else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x1, -7.2e-84], N[Not[LessEqual[x1, 1.15e-97]], $MachinePrecision]], N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * -6.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -7.2 \cdot 10^{-84} \lor \neg \left(x1 \leq 1.15 \cdot 10^{-97}\right):\\
\;\;\;\;x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x1 < -7.20000000000000007e-84 or 1.14999999999999997e-97 < x1 Initial program 57.6%
Taylor expanded in x1 around 0 27.5%
Taylor expanded in x1 around 0 38.2%
+-commutative38.2%
*-commutative38.2%
fma-def38.2%
*-commutative38.2%
Simplified38.2%
Taylor expanded in x2 around 0 22.2%
Taylor expanded in x1 around inf 19.6%
if -7.20000000000000007e-84 < x1 < 1.14999999999999997e-97Initial program 99.5%
Taylor expanded in x1 around 0 99.5%
Taylor expanded in x1 around 0 70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in x1 around 0 71.1%
Final simplification37.1%
(FPCore (x1 x2) :precision binary64 (if (or (<= x2 -1.44e-67) (not (<= x2 4.2e-92))) (* x2 (- (* x1 -12.0) 6.0)) (* x1 (+ -1.0 (* x2 -12.0)))))
double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.44e-67) || !(x2 <= 4.2e-92)) {
tmp = x2 * ((x1 * -12.0) - 6.0);
} else {
tmp = x1 * (-1.0 + (x2 * -12.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.44d-67)) .or. (.not. (x2 <= 4.2d-92))) then
tmp = x2 * ((x1 * (-12.0d0)) - 6.0d0)
else
tmp = x1 * ((-1.0d0) + (x2 * (-12.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((x2 <= -1.44e-67) || !(x2 <= 4.2e-92)) {
tmp = x2 * ((x1 * -12.0) - 6.0);
} else {
tmp = x1 * (-1.0 + (x2 * -12.0));
}
return tmp;
}
def code(x1, x2): tmp = 0 if (x2 <= -1.44e-67) or not (x2 <= 4.2e-92): tmp = x2 * ((x1 * -12.0) - 6.0) else: tmp = x1 * (-1.0 + (x2 * -12.0)) return tmp
function code(x1, x2) tmp = 0.0 if ((x2 <= -1.44e-67) || !(x2 <= 4.2e-92)) tmp = Float64(x2 * Float64(Float64(x1 * -12.0) - 6.0)); else tmp = Float64(x1 * Float64(-1.0 + Float64(x2 * -12.0))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((x2 <= -1.44e-67) || ~((x2 <= 4.2e-92))) tmp = x2 * ((x1 * -12.0) - 6.0); else tmp = x1 * (-1.0 + (x2 * -12.0)); end tmp_2 = tmp; end
code[x1_, x2_] := If[Or[LessEqual[x2, -1.44e-67], N[Not[LessEqual[x2, 4.2e-92]], $MachinePrecision]], N[(x2 * N[(N[(x1 * -12.0), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(-1.0 + N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -1.44 \cdot 10^{-67} \lor \neg \left(x2 \leq 4.2 \cdot 10^{-92}\right):\\
\;\;\;\;x2 \cdot \left(x1 \cdot -12 - 6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 \cdot \left(-1 + x2 \cdot -12\right)\\
\end{array}
\end{array}
if x2 < -1.44000000000000003e-67 or 4.2e-92 < x2 Initial program 72.1%
Taylor expanded in x1 around 0 54.6%
Taylor expanded in x1 around 0 64.7%
+-commutative64.7%
*-commutative64.7%
fma-def64.7%
*-commutative64.7%
Simplified64.7%
Taylor expanded in x2 around 0 41.2%
Taylor expanded in x2 around inf 40.6%
if -1.44000000000000003e-67 < x2 < 4.2e-92Initial program 71.3%
Taylor expanded in x1 around 0 46.6%
Taylor expanded in x1 around 0 47.9%
+-commutative47.9%
*-commutative47.9%
fma-def47.9%
*-commutative47.9%
Simplified47.9%
Taylor expanded in x2 around 0 47.9%
Taylor expanded in x1 around inf 34.3%
Final simplification38.4%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -6e-68) (* x2 -6.0) (if (<= x2 2.5e-85) (- x1) (+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -6e-68) {
tmp = x2 * -6.0;
} else if (x2 <= 2.5e-85) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-6d-68)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 2.5d-85) then
tmp = -x1
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -6e-68) {
tmp = x2 * -6.0;
} else if (x2 <= 2.5e-85) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -6e-68: tmp = x2 * -6.0 elif x2 <= 2.5e-85: tmp = -x1 else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -6e-68) tmp = Float64(x2 * -6.0); elseif (x2 <= 2.5e-85) tmp = Float64(-x1); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -6e-68) tmp = x2 * -6.0; elseif (x2 <= 2.5e-85) tmp = -x1; else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -6e-68], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 2.5e-85], (-x1), N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -6 \cdot 10^{-68}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 2.5 \cdot 10^{-85}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -6e-68Initial program 75.1%
Taylor expanded in x1 around 0 55.6%
Taylor expanded in x1 around 0 35.1%
*-commutative35.1%
Simplified35.1%
Taylor expanded in x1 around 0 35.2%
if -6e-68 < x2 < 2.5000000000000001e-85Initial program 71.9%
Taylor expanded in x1 around 0 47.8%
Taylor expanded in x1 around 0 49.0%
+-commutative49.0%
*-commutative49.0%
fma-def49.0%
*-commutative49.0%
Simplified49.0%
Taylor expanded in x2 around 0 49.0%
Taylor expanded in x2 around 0 34.2%
distribute-rgt-out34.7%
metadata-eval34.7%
*-commutative34.7%
neg-mul-134.7%
Simplified34.7%
if 2.5000000000000001e-85 < x2 Initial program 68.4%
Taylor expanded in x1 around 0 52.6%
Taylor expanded in x1 around 0 30.5%
*-commutative30.5%
Simplified30.5%
Final simplification33.5%
(FPCore (x1 x2) :precision binary64 (if (<= x2 -6e-68) (* x2 -6.0) (if (<= x2 4.2e-92) (- x1) (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if (x2 <= -6e-68) {
tmp = x2 * -6.0;
} else if (x2 <= 4.2e-92) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x2 <= (-6d-68)) then
tmp = x2 * (-6.0d0)
else if (x2 <= 4.2d-92) then
tmp = -x1
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x2 <= -6e-68) {
tmp = x2 * -6.0;
} else if (x2 <= 4.2e-92) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if x2 <= -6e-68: tmp = x2 * -6.0 elif x2 <= 4.2e-92: tmp = -x1 else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if (x2 <= -6e-68) tmp = Float64(x2 * -6.0); elseif (x2 <= 4.2e-92) tmp = Float64(-x1); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x2 <= -6e-68) tmp = x2 * -6.0; elseif (x2 <= 4.2e-92) tmp = -x1; else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x2, -6e-68], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x2, 4.2e-92], (-x1), N[(x2 * -6.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x2 \leq -6 \cdot 10^{-68}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x2 \leq 4.2 \cdot 10^{-92}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if x2 < -6e-68 or 4.2e-92 < x2 Initial program 72.1%
Taylor expanded in x1 around 0 54.6%
Taylor expanded in x1 around 0 33.0%
*-commutative33.0%
Simplified33.0%
Taylor expanded in x1 around 0 32.7%
if -6e-68 < x2 < 4.2e-92Initial program 71.3%
Taylor expanded in x1 around 0 46.6%
Taylor expanded in x1 around 0 47.9%
+-commutative47.9%
*-commutative47.9%
fma-def47.9%
*-commutative47.9%
Simplified47.9%
Taylor expanded in x2 around 0 47.9%
Taylor expanded in x2 around 0 33.8%
distribute-rgt-out34.3%
metadata-eval34.3%
*-commutative34.3%
neg-mul-134.3%
Simplified34.3%
Final simplification33.3%
(FPCore (x1 x2) :precision binary64 (- x1))
double code(double x1, double x2) {
return -x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = -x1
end function
public static double code(double x1, double x2) {
return -x1;
}
def code(x1, x2): return -x1
function code(x1, x2) return Float64(-x1) end
function tmp = code(x1, x2) tmp = -x1; end
code[x1_, x2_] := (-x1)
\begin{array}{l}
\\
-x1
\end{array}
Initial program 71.8%
Taylor expanded in x1 around 0 51.9%
Taylor expanded in x1 around 0 59.0%
+-commutative59.0%
*-commutative59.0%
fma-def59.0%
*-commutative59.0%
Simplified59.0%
Taylor expanded in x2 around 0 43.5%
Taylor expanded in x2 around 0 13.5%
distribute-rgt-out13.7%
metadata-eval13.7%
*-commutative13.7%
neg-mul-113.7%
Simplified13.7%
Final simplification13.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 x1 end
function tmp = code(x1, x2) tmp = x1; end
code[x1_, x2_] := x1
\begin{array}{l}
\\
x1
\end{array}
Initial program 71.8%
Taylor expanded in x1 around 0 51.9%
Taylor expanded in x1 around 0 27.8%
*-commutative27.8%
Simplified27.8%
Taylor expanded in x1 around inf 3.3%
Final simplification3.3%
herbie shell --seed 2023200
(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))))))