
(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 28 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 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 t_0))
(t_4 (- -1.0 (* x1 x1)))
(t_5 (/ t_2 t_4))
(t_6
(+
x1
(+
(+
x1
(+
(+
(*
t_4
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_5)))
(* (* (* x1 2.0) t_3) (+ 3.0 t_5))))
(* t_1 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))))
(if (<= t_6 INFINITY) t_6 (* 6.0 (* (* x1 x1) (* x1 x1))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = t_2 / t_4;
double t_6 = x1 + ((x1 + (((t_4 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_6 <= ((double) INFINITY)) {
tmp = t_6;
} else {
tmp = 6.0 * ((x1 * x1) * (x1 * x1));
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / t_0;
double t_4 = -1.0 - (x1 * x1);
double t_5 = t_2 / t_4;
double t_6 = x1 + ((x1 + (((t_4 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_6 <= Double.POSITIVE_INFINITY) {
tmp = t_6;
} else {
tmp = 6.0 * ((x1 * x1) * (x1 * x1));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = (t_1 + (2.0 * x2)) - x1 t_3 = t_2 / t_0 t_4 = -1.0 - (x1 * x1) t_5 = t_2 / t_4 t_6 = x1 + ((x1 + (((t_4 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))) tmp = 0 if t_6 <= math.inf: tmp = t_6 else: tmp = 6.0 * ((x1 * x1) * (x1 * x1)) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / t_0) t_4 = Float64(-1.0 - Float64(x1 * x1)) t_5 = Float64(t_2 / t_4) t_6 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_4 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_5))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_5)))) + Float64(t_1 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_6 <= Inf) tmp = t_6; else tmp = Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = (t_1 + (2.0 * x2)) - x1; t_3 = t_2 / t_0; t_4 = -1.0 - (x1 * x1); t_5 = t_2 / t_4; t_6 = x1 + ((x1 + (((t_4 * (((x1 * x1) * (6.0 + (4.0 * t_5))) + (((x1 * 2.0) * t_3) * (3.0 + t_5)))) + (t_1 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))); tmp = 0.0; if (t_6 <= Inf) tmp = t_6; else tmp = 6.0 * ((x1 * x1) * (x1 * 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 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$4 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, Infinity], t$95$6, N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{t\_0}\\
t_4 := -1 - x1 \cdot x1\\
t_5 := \frac{t\_2}{t\_4}\\
t_6 := x1 + \left(\left(x1 + \left(\left(t\_4 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_5\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_5\right)\right) + t\_1 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_6 \leq \infty:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Simplified12.4%
Taylor expanded in x1 around 0
*-lowering-*.f6412.4%
Simplified12.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification99.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (- (* x2 -6.0) (* (* x1 6.0) (* x1 (- -1.0 (* x1 x1)))))))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (+ (* x1 3.0) -1.0))
(t_3 (+ (* 2.0 x2) (* x1 t_2)))
(t_4 (/ t_1 t_3)))
(if (<= x1 -1.05e+56)
t_0
(if (<= x1 1e+63)
(+
x1
(+
(*
t_1
(+
x1
(+
(* x1 (* x1 -6.0))
(/ (* x1 (+ (+ -6.0 (/ 2.0 t_4)) (* x1 4.0))) t_4))))
(/ (* 3.0 (+ (* x2 -2.0) (* x1 (+ t_2 (* x1 t_3))))) t_1)))
t_0))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
double t_1 = (x1 * x1) + 1.0;
double t_2 = (x1 * 3.0) + -1.0;
double t_3 = (2.0 * x2) + (x1 * t_2);
double t_4 = t_1 / t_3;
double tmp;
if (x1 <= -1.05e+56) {
tmp = t_0;
} else if (x1 <= 1e+63) {
tmp = x1 + ((t_1 * (x1 + ((x1 * (x1 * -6.0)) + ((x1 * ((-6.0 + (2.0 / t_4)) + (x1 * 4.0))) / t_4)))) + ((3.0 * ((x2 * -2.0) + (x1 * (t_2 + (x1 * t_3))))) / 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) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) - ((x1 * 6.0d0) * (x1 * ((-1.0d0) - (x1 * x1)))))
t_1 = (x1 * x1) + 1.0d0
t_2 = (x1 * 3.0d0) + (-1.0d0)
t_3 = (2.0d0 * x2) + (x1 * t_2)
t_4 = t_1 / t_3
if (x1 <= (-1.05d+56)) then
tmp = t_0
else if (x1 <= 1d+63) then
tmp = x1 + ((t_1 * (x1 + ((x1 * (x1 * (-6.0d0))) + ((x1 * (((-6.0d0) + (2.0d0 / t_4)) + (x1 * 4.0d0))) / t_4)))) + ((3.0d0 * ((x2 * (-2.0d0)) + (x1 * (t_2 + (x1 * t_3))))) / t_1))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
double t_1 = (x1 * x1) + 1.0;
double t_2 = (x1 * 3.0) + -1.0;
double t_3 = (2.0 * x2) + (x1 * t_2);
double t_4 = t_1 / t_3;
double tmp;
if (x1 <= -1.05e+56) {
tmp = t_0;
} else if (x1 <= 1e+63) {
tmp = x1 + ((t_1 * (x1 + ((x1 * (x1 * -6.0)) + ((x1 * ((-6.0 + (2.0 / t_4)) + (x1 * 4.0))) / t_4)))) + ((3.0 * ((x2 * -2.0) + (x1 * (t_2 + (x1 * t_3))))) / t_1));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))) t_1 = (x1 * x1) + 1.0 t_2 = (x1 * 3.0) + -1.0 t_3 = (2.0 * x2) + (x1 * t_2) t_4 = t_1 / t_3 tmp = 0 if x1 <= -1.05e+56: tmp = t_0 elif x1 <= 1e+63: tmp = x1 + ((t_1 * (x1 + ((x1 * (x1 * -6.0)) + ((x1 * ((-6.0 + (2.0 / t_4)) + (x1 * 4.0))) / t_4)))) + ((3.0 * ((x2 * -2.0) + (x1 * (t_2 + (x1 * t_3))))) / t_1)) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * 6.0) * Float64(x1 * Float64(-1.0 - Float64(x1 * x1)))))) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(x1 * 3.0) + -1.0) t_3 = Float64(Float64(2.0 * x2) + Float64(x1 * t_2)) t_4 = Float64(t_1 / t_3) tmp = 0.0 if (x1 <= -1.05e+56) tmp = t_0; elseif (x1 <= 1e+63) tmp = Float64(x1 + Float64(Float64(t_1 * Float64(x1 + Float64(Float64(x1 * Float64(x1 * -6.0)) + Float64(Float64(x1 * Float64(Float64(-6.0 + Float64(2.0 / t_4)) + Float64(x1 * 4.0))) / t_4)))) + Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) + Float64(x1 * Float64(t_2 + Float64(x1 * t_3))))) / t_1))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))); t_1 = (x1 * x1) + 1.0; t_2 = (x1 * 3.0) + -1.0; t_3 = (2.0 * x2) + (x1 * t_2); t_4 = t_1 / t_3; tmp = 0.0; if (x1 <= -1.05e+56) tmp = t_0; elseif (x1 <= 1e+63) tmp = x1 + ((t_1 * (x1 + ((x1 * (x1 * -6.0)) + ((x1 * ((-6.0 + (2.0 / t_4)) + (x1 * 4.0))) / t_4)))) + ((3.0 * ((x2 * -2.0) + (x1 * (t_2 + (x1 * t_3))))) / t_1)); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * 6.0), $MachinePrecision] * N[(x1 * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * x2), $MachinePrecision] + N[(x1 * t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 / t$95$3), $MachinePrecision]}, If[LessEqual[x1, -1.05e+56], t$95$0, If[LessEqual[x1, 1e+63], N[(x1 + N[(N[(t$95$1 * N[(x1 + N[(N[(x1 * N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(-6.0 + N[(2.0 / t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x1 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + N[(x1 * N[(t$95$2 + N[(x1 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 - \left(x1 \cdot 6\right) \cdot \left(x1 \cdot \left(-1 - x1 \cdot x1\right)\right)\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot 3 + -1\\
t_3 := 2 \cdot x2 + x1 \cdot t\_2\\
t_4 := \frac{t\_1}{t\_3}\\
\mathbf{if}\;x1 \leq -1.05 \cdot 10^{+56}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 10^{+63}:\\
\;\;\;\;x1 + \left(t\_1 \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{x1 \cdot \left(\left(-6 + \frac{2}{t\_4}\right) + x1 \cdot 4\right)}{t\_4}\right)\right) + \frac{3 \cdot \left(x2 \cdot -2 + x1 \cdot \left(t\_2 + x1 \cdot t\_3\right)\right)}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.05000000000000009e56 or 1.00000000000000006e63 < x1 Initial program 20.5%
Simplified28.5%
Taylor expanded in x1 around 0
*-lowering-*.f6430.3%
Simplified30.3%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6498.3%
Simplified98.3%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6498.4%
Applied egg-rr98.4%
if -1.05000000000000009e56 < x1 < 1.00000000000000006e63Initial program 99.4%
Simplified98.7%
Applied egg-rr98.7%
*-commutativeN/A
*-commutativeN/A
un-div-invN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr98.7%
Final simplification98.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ x2 (* x1 x1)))
(t_1 (+ (* x1 x1) 1.0))
(t_2
(*
(* x1 x1)
(+ 9.0 (/ (- (/ (+ (* t_0 -12.0) (* x2 6.0)) x1) 3.0) x1))))
(t_3 (+ (* 2.0 x2) (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -1.55e+71)
(+ x1 (- (* x2 -6.0) (* (* x1 6.0) (* x1 (- -1.0 (* x1 x1))))))
(if (<= x1 -3.7e-7)
(+
x1
(+
(*
t_1
(+
x1
(+
(* (* x1 x1) -6.0)
(*
(/ t_3 t_1)
(+ (* x1 (+ -6.0 (/ (* 2.0 t_3) t_1))) (* (* x1 x1) 4.0))))))
t_2))
(if (<= x1 5000.0)
(+
(/ (* 3.0 (- (* x1 (* x1 3.0)) (+ x1 (* 2.0 x2)))) t_1)
(+ (+ x1 x1) (* 4.0 (* (+ (* 2.0 x2) -3.0) (* x1 x2)))))
(+
x1
(+
t_2
(*
t_1
(*
(* x1 x1)
(- (+ 6.0 (* t_0 8.0)) (+ (/ 3.0 x1) (/ 18.0 (* x1 x1)))))))))))))
double code(double x1, double x2) {
double t_0 = x2 / (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (x1 * x1) * (9.0 + (((((t_0 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1));
double t_3 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double tmp;
if (x1 <= -1.55e+71) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= -3.7e-7) {
tmp = x1 + ((t_1 * (x1 + (((x1 * x1) * -6.0) + ((t_3 / t_1) * ((x1 * (-6.0 + ((2.0 * t_3) / t_1))) + ((x1 * x1) * 4.0)))))) + t_2);
} else if (x1 <= 5000.0) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_1) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + (t_2 + (t_1 * ((x1 * x1) * ((6.0 + (t_0 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * 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 = x2 / (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
t_2 = (x1 * x1) * (9.0d0 + (((((t_0 * (-12.0d0)) + (x2 * 6.0d0)) / x1) - 3.0d0) / x1))
t_3 = (2.0d0 * x2) + (x1 * ((x1 * 3.0d0) + (-1.0d0)))
if (x1 <= (-1.55d+71)) then
tmp = x1 + ((x2 * (-6.0d0)) - ((x1 * 6.0d0) * (x1 * ((-1.0d0) - (x1 * x1)))))
else if (x1 <= (-3.7d-7)) then
tmp = x1 + ((t_1 * (x1 + (((x1 * x1) * (-6.0d0)) + ((t_3 / t_1) * ((x1 * ((-6.0d0) + ((2.0d0 * t_3) / t_1))) + ((x1 * x1) * 4.0d0)))))) + t_2)
else if (x1 <= 5000.0d0) then
tmp = ((3.0d0 * ((x1 * (x1 * 3.0d0)) - (x1 + (2.0d0 * x2)))) / t_1) + ((x1 + x1) + (4.0d0 * (((2.0d0 * x2) + (-3.0d0)) * (x1 * x2))))
else
tmp = x1 + (t_2 + (t_1 * ((x1 * x1) * ((6.0d0 + (t_0 * 8.0d0)) - ((3.0d0 / x1) + (18.0d0 / (x1 * x1)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x2 / (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double t_2 = (x1 * x1) * (9.0 + (((((t_0 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1));
double t_3 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double tmp;
if (x1 <= -1.55e+71) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= -3.7e-7) {
tmp = x1 + ((t_1 * (x1 + (((x1 * x1) * -6.0) + ((t_3 / t_1) * ((x1 * (-6.0 + ((2.0 * t_3) / t_1))) + ((x1 * x1) * 4.0)))))) + t_2);
} else if (x1 <= 5000.0) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_1) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + (t_2 + (t_1 * ((x1 * x1) * ((6.0 + (t_0 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x2 / (x1 * x1) t_1 = (x1 * x1) + 1.0 t_2 = (x1 * x1) * (9.0 + (((((t_0 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1)) t_3 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)) tmp = 0 if x1 <= -1.55e+71: tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))) elif x1 <= -3.7e-7: tmp = x1 + ((t_1 * (x1 + (((x1 * x1) * -6.0) + ((t_3 / t_1) * ((x1 * (-6.0 + ((2.0 * t_3) / t_1))) + ((x1 * x1) * 4.0)))))) + t_2) elif x1 <= 5000.0: tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_1) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))) else: tmp = x1 + (t_2 + (t_1 * ((x1 * x1) * ((6.0 + (t_0 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1))))))) return tmp
function code(x1, x2) t_0 = Float64(x2 / Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(x1 * x1) * Float64(9.0 + Float64(Float64(Float64(Float64(Float64(t_0 * -12.0) + Float64(x2 * 6.0)) / x1) - 3.0) / x1))) t_3 = Float64(Float64(2.0 * x2) + Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))) tmp = 0.0 if (x1 <= -1.55e+71) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * 6.0) * Float64(x1 * Float64(-1.0 - Float64(x1 * x1)))))); elseif (x1 <= -3.7e-7) tmp = Float64(x1 + Float64(Float64(t_1 * Float64(x1 + Float64(Float64(Float64(x1 * x1) * -6.0) + Float64(Float64(t_3 / t_1) * Float64(Float64(x1 * Float64(-6.0 + Float64(Float64(2.0 * t_3) / t_1))) + Float64(Float64(x1 * x1) * 4.0)))))) + t_2)); elseif (x1 <= 5000.0) tmp = Float64(Float64(Float64(3.0 * Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x1 + Float64(2.0 * x2)))) / t_1) + Float64(Float64(x1 + x1) + Float64(4.0 * Float64(Float64(Float64(2.0 * x2) + -3.0) * Float64(x1 * x2))))); else tmp = Float64(x1 + Float64(t_2 + Float64(t_1 * Float64(Float64(x1 * x1) * Float64(Float64(6.0 + Float64(t_0 * 8.0)) - Float64(Float64(3.0 / x1) + Float64(18.0 / Float64(x1 * x1)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x2 / (x1 * x1); t_1 = (x1 * x1) + 1.0; t_2 = (x1 * x1) * (9.0 + (((((t_0 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1)); t_3 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)); tmp = 0.0; if (x1 <= -1.55e+71) tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))); elseif (x1 <= -3.7e-7) tmp = x1 + ((t_1 * (x1 + (((x1 * x1) * -6.0) + ((t_3 / t_1) * ((x1 * (-6.0 + ((2.0 * t_3) / t_1))) + ((x1 * x1) * 4.0)))))) + t_2); elseif (x1 <= 5000.0) tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_1) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))); else tmp = x1 + (t_2 + (t_1 * ((x1 * x1) * ((6.0 + (t_0 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x2 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] * N[(9.0 + N[(N[(N[(N[(N[(t$95$0 * -12.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * x2), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.55e+71], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * 6.0), $MachinePrecision] * N[(x1 * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -3.7e-7], N[(x1 + N[(N[(t$95$1 * N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * -6.0), $MachinePrecision] + N[(N[(t$95$3 / t$95$1), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(N[(2.0 * t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5000.0], N[(N[(N[(3.0 * N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(x1 + x1), $MachinePrecision] + N[(4.0 * N[(N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision] * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$2 + N[(t$95$1 * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(6.0 + N[(t$95$0 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 / x1), $MachinePrecision] + N[(18.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x2}{x1 \cdot x1}\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \left(x1 \cdot x1\right) \cdot \left(9 + \frac{\frac{t\_0 \cdot -12 + x2 \cdot 6}{x1} - 3}{x1}\right)\\
t_3 := 2 \cdot x2 + x1 \cdot \left(x1 \cdot 3 + -1\right)\\
\mathbf{if}\;x1 \leq -1.55 \cdot 10^{+71}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(x1 \cdot 6\right) \cdot \left(x1 \cdot \left(-1 - x1 \cdot x1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -3.7 \cdot 10^{-7}:\\
\;\;\;\;x1 + \left(t\_1 \cdot \left(x1 + \left(\left(x1 \cdot x1\right) \cdot -6 + \frac{t\_3}{t\_1} \cdot \left(x1 \cdot \left(-6 + \frac{2 \cdot t\_3}{t\_1}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right) + t\_2\right)\\
\mathbf{elif}\;x1 \leq 5000:\\
\;\;\;\;\frac{3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + 2 \cdot x2\right)\right)}{t\_1} + \left(\left(x1 + x1\right) + 4 \cdot \left(\left(2 \cdot x2 + -3\right) \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(t\_2 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\left(6 + t\_0 \cdot 8\right) - \left(\frac{3}{x1} + \frac{18}{x1 \cdot x1}\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.55000000000000009e71Initial program 11.4%
Simplified29.5%
Taylor expanded in x1 around 0
*-lowering-*.f6429.5%
Simplified29.5%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
if -1.55000000000000009e71 < x1 < -3.70000000000000004e-7Initial program 99.1%
Simplified87.4%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified97.4%
if -3.70000000000000004e-7 < x1 < 5e3Initial program 99.5%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6482.8%
Simplified82.8%
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr99.3%
if 5e3 < x1 Initial program 43.4%
Simplified41.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified43.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6497.5%
Simplified97.5%
Final simplification98.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (+ (* 2.0 x2) (* x1 (+ (* x1 3.0) -1.0))))
(t_2 (/ x2 (* x1 x1))))
(if (<= x1 -1.55e+71)
(+ x1 (- (* x2 -6.0) (* (* x1 6.0) (* x1 (- -1.0 (* x1 x1))))))
(if (<= x1 -7e-8)
(+
x1
(+
(*
t_0
(+
x1
(*
x1
(+
(* x1 -6.0)
(/ (+ (* t_1 (/ 2.0 t_0)) (+ -6.0 (* x1 4.0))) (/ t_0 t_1))))))
(*
(* x1 x1)
(+
9.0
(/ (+ -3.0 (/ (+ (* x2 6.0) (/ -12.0 (/ (* x1 x1) x2))) x1)) x1)))))
(if (<= x1 1500.0)
(+
(/ (* 3.0 (- (* x1 (* x1 3.0)) (+ x1 (* 2.0 x2)))) t_0)
(+ (+ x1 x1) (* 4.0 (* (+ (* 2.0 x2) -3.0) (* x1 x2)))))
(+
x1
(+
(*
(* x1 x1)
(+ 9.0 (/ (- (/ (+ (* t_2 -12.0) (* x2 6.0)) x1) 3.0) x1)))
(*
t_0
(*
(* x1 x1)
(- (+ 6.0 (* t_2 8.0)) (+ (/ 3.0 x1) (/ 18.0 (* x1 x1)))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double t_2 = x2 / (x1 * x1);
double tmp;
if (x1 <= -1.55e+71) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= -7e-8) {
tmp = x1 + ((t_0 * (x1 + (x1 * ((x1 * -6.0) + (((t_1 * (2.0 / t_0)) + (-6.0 + (x1 * 4.0))) / (t_0 / t_1)))))) + ((x1 * x1) * (9.0 + ((-3.0 + (((x2 * 6.0) + (-12.0 / ((x1 * x1) / x2))) / x1)) / x1))));
} else if (x1 <= 1500.0) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + (((x1 * x1) * (9.0 + (((((t_2 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_2 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = (2.0d0 * x2) + (x1 * ((x1 * 3.0d0) + (-1.0d0)))
t_2 = x2 / (x1 * x1)
if (x1 <= (-1.55d+71)) then
tmp = x1 + ((x2 * (-6.0d0)) - ((x1 * 6.0d0) * (x1 * ((-1.0d0) - (x1 * x1)))))
else if (x1 <= (-7d-8)) then
tmp = x1 + ((t_0 * (x1 + (x1 * ((x1 * (-6.0d0)) + (((t_1 * (2.0d0 / t_0)) + ((-6.0d0) + (x1 * 4.0d0))) / (t_0 / t_1)))))) + ((x1 * x1) * (9.0d0 + (((-3.0d0) + (((x2 * 6.0d0) + ((-12.0d0) / ((x1 * x1) / x2))) / x1)) / x1))))
else if (x1 <= 1500.0d0) then
tmp = ((3.0d0 * ((x1 * (x1 * 3.0d0)) - (x1 + (2.0d0 * x2)))) / t_0) + ((x1 + x1) + (4.0d0 * (((2.0d0 * x2) + (-3.0d0)) * (x1 * x2))))
else
tmp = x1 + (((x1 * x1) * (9.0d0 + (((((t_2 * (-12.0d0)) + (x2 * 6.0d0)) / x1) - 3.0d0) / x1))) + (t_0 * ((x1 * x1) * ((6.0d0 + (t_2 * 8.0d0)) - ((3.0d0 / x1) + (18.0d0 / (x1 * 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 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double t_2 = x2 / (x1 * x1);
double tmp;
if (x1 <= -1.55e+71) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= -7e-8) {
tmp = x1 + ((t_0 * (x1 + (x1 * ((x1 * -6.0) + (((t_1 * (2.0 / t_0)) + (-6.0 + (x1 * 4.0))) / (t_0 / t_1)))))) + ((x1 * x1) * (9.0 + ((-3.0 + (((x2 * 6.0) + (-12.0 / ((x1 * x1) / x2))) / x1)) / x1))));
} else if (x1 <= 1500.0) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + (((x1 * x1) * (9.0 + (((((t_2 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_2 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1)))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)) t_2 = x2 / (x1 * x1) tmp = 0 if x1 <= -1.55e+71: tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))) elif x1 <= -7e-8: tmp = x1 + ((t_0 * (x1 + (x1 * ((x1 * -6.0) + (((t_1 * (2.0 / t_0)) + (-6.0 + (x1 * 4.0))) / (t_0 / t_1)))))) + ((x1 * x1) * (9.0 + ((-3.0 + (((x2 * 6.0) + (-12.0 / ((x1 * x1) / x2))) / x1)) / x1)))) elif x1 <= 1500.0: tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))) else: tmp = x1 + (((x1 * x1) * (9.0 + (((((t_2 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_2 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1))))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(Float64(2.0 * x2) + Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))) t_2 = Float64(x2 / Float64(x1 * x1)) tmp = 0.0 if (x1 <= -1.55e+71) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * 6.0) * Float64(x1 * Float64(-1.0 - Float64(x1 * x1)))))); elseif (x1 <= -7e-8) tmp = Float64(x1 + Float64(Float64(t_0 * Float64(x1 + Float64(x1 * Float64(Float64(x1 * -6.0) + Float64(Float64(Float64(t_1 * Float64(2.0 / t_0)) + Float64(-6.0 + Float64(x1 * 4.0))) / Float64(t_0 / t_1)))))) + Float64(Float64(x1 * x1) * Float64(9.0 + Float64(Float64(-3.0 + Float64(Float64(Float64(x2 * 6.0) + Float64(-12.0 / Float64(Float64(x1 * x1) / x2))) / x1)) / x1))))); elseif (x1 <= 1500.0) tmp = Float64(Float64(Float64(3.0 * Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x1 + Float64(2.0 * x2)))) / t_0) + Float64(Float64(x1 + x1) + Float64(4.0 * Float64(Float64(Float64(2.0 * x2) + -3.0) * Float64(x1 * x2))))); else tmp = Float64(x1 + Float64(Float64(Float64(x1 * x1) * Float64(9.0 + Float64(Float64(Float64(Float64(Float64(t_2 * -12.0) + Float64(x2 * 6.0)) / x1) - 3.0) / x1))) + Float64(t_0 * Float64(Float64(x1 * x1) * Float64(Float64(6.0 + Float64(t_2 * 8.0)) - Float64(Float64(3.0 / x1) + Float64(18.0 / Float64(x1 * x1)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)); t_2 = x2 / (x1 * x1); tmp = 0.0; if (x1 <= -1.55e+71) tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))); elseif (x1 <= -7e-8) tmp = x1 + ((t_0 * (x1 + (x1 * ((x1 * -6.0) + (((t_1 * (2.0 / t_0)) + (-6.0 + (x1 * 4.0))) / (t_0 / t_1)))))) + ((x1 * x1) * (9.0 + ((-3.0 + (((x2 * 6.0) + (-12.0 / ((x1 * x1) / x2))) / x1)) / x1)))); elseif (x1 <= 1500.0) tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))); else tmp = x1 + (((x1 * x1) * (9.0 + (((((t_2 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_2 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * 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[(N[(2.0 * x2), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x2 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.55e+71], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * 6.0), $MachinePrecision] * N[(x1 * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -7e-8], N[(x1 + N[(N[(t$95$0 * N[(x1 + N[(x1 * N[(N[(x1 * -6.0), $MachinePrecision] + N[(N[(N[(t$95$1 * N[(2.0 / t$95$0), $MachinePrecision]), $MachinePrecision] + N[(-6.0 + N[(x1 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(9.0 + N[(N[(-3.0 + N[(N[(N[(x2 * 6.0), $MachinePrecision] + N[(-12.0 / N[(N[(x1 * x1), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1500.0], N[(N[(N[(3.0 * N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] + N[(N[(x1 + x1), $MachinePrecision] + N[(4.0 * N[(N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision] * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * N[(9.0 + N[(N[(N[(N[(N[(t$95$2 * -12.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(6.0 + N[(t$95$2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 / x1), $MachinePrecision] + N[(18.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 2 \cdot x2 + x1 \cdot \left(x1 \cdot 3 + -1\right)\\
t_2 := \frac{x2}{x1 \cdot x1}\\
\mathbf{if}\;x1 \leq -1.55 \cdot 10^{+71}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(x1 \cdot 6\right) \cdot \left(x1 \cdot \left(-1 - x1 \cdot x1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -7 \cdot 10^{-8}:\\
\;\;\;\;x1 + \left(t\_0 \cdot \left(x1 + x1 \cdot \left(x1 \cdot -6 + \frac{t\_1 \cdot \frac{2}{t\_0} + \left(-6 + x1 \cdot 4\right)}{\frac{t\_0}{t\_1}}\right)\right) + \left(x1 \cdot x1\right) \cdot \left(9 + \frac{-3 + \frac{x2 \cdot 6 + \frac{-12}{\frac{x1 \cdot x1}{x2}}}{x1}}{x1}\right)\right)\\
\mathbf{elif}\;x1 \leq 1500:\\
\;\;\;\;\frac{3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + 2 \cdot x2\right)\right)}{t\_0} + \left(\left(x1 + x1\right) + 4 \cdot \left(\left(2 \cdot x2 + -3\right) \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot \left(9 + \frac{\frac{t\_2 \cdot -12 + x2 \cdot 6}{x1} - 3}{x1}\right) + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\left(6 + t\_2 \cdot 8\right) - \left(\frac{3}{x1} + \frac{18}{x1 \cdot x1}\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.55000000000000009e71Initial program 11.4%
Simplified29.5%
Taylor expanded in x1 around 0
*-lowering-*.f6429.5%
Simplified29.5%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
if -1.55000000000000009e71 < x1 < -7.00000000000000048e-8Initial program 99.1%
Simplified87.4%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified97.4%
Applied egg-rr97.2%
if -7.00000000000000048e-8 < x1 < 1500Initial program 99.5%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6482.8%
Simplified82.8%
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr99.3%
if 1500 < x1 Initial program 43.4%
Simplified41.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified43.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6497.5%
Simplified97.5%
Final simplification98.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (/ x2 (* x1 x1)))
(t_2 (+ (* 2.0 x2) (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -1.55e+71)
(+ x1 (- (* x2 -6.0) (* (* x1 6.0) (* x1 (- -1.0 (* x1 x1))))))
(if (<= x1 -1.1e-8)
(+
x1
(+
(*
t_0
(+
x1
(+
(* (* x1 x1) -6.0)
(*
(/ t_2 t_0)
(+ (* x1 (+ -6.0 (/ (* 2.0 t_2) t_0))) (* (* x1 x1) 4.0))))))
(* (* x1 x1) (- 9.0 (/ (+ 3.0 (/ (* x2 -6.0) x1)) x1)))))
(if (<= x1 3.7)
(+
(/ (* 3.0 (- (* x1 (* x1 3.0)) (+ x1 (* 2.0 x2)))) t_0)
(+ (+ x1 x1) (* 4.0 (* (+ (* 2.0 x2) -3.0) (* x1 x2)))))
(+
x1
(+
(*
(* x1 x1)
(+ 9.0 (/ (- (/ (+ (* t_1 -12.0) (* x2 6.0)) x1) 3.0) x1)))
(*
t_0
(*
(* x1 x1)
(- (+ 6.0 (* t_1 8.0)) (+ (/ 3.0 x1) (/ 18.0 (* x1 x1)))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x2 / (x1 * x1);
double t_2 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double tmp;
if (x1 <= -1.55e+71) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= -1.1e-8) {
tmp = x1 + ((t_0 * (x1 + (((x1 * x1) * -6.0) + ((t_2 / t_0) * ((x1 * (-6.0 + ((2.0 * t_2) / t_0))) + ((x1 * x1) * 4.0)))))) + ((x1 * x1) * (9.0 - ((3.0 + ((x2 * -6.0) / x1)) / x1))));
} else if (x1 <= 3.7) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + (((x1 * x1) * (9.0 + (((((t_1 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_1 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x2 / (x1 * x1)
t_2 = (2.0d0 * x2) + (x1 * ((x1 * 3.0d0) + (-1.0d0)))
if (x1 <= (-1.55d+71)) then
tmp = x1 + ((x2 * (-6.0d0)) - ((x1 * 6.0d0) * (x1 * ((-1.0d0) - (x1 * x1)))))
else if (x1 <= (-1.1d-8)) then
tmp = x1 + ((t_0 * (x1 + (((x1 * x1) * (-6.0d0)) + ((t_2 / t_0) * ((x1 * ((-6.0d0) + ((2.0d0 * t_2) / t_0))) + ((x1 * x1) * 4.0d0)))))) + ((x1 * x1) * (9.0d0 - ((3.0d0 + ((x2 * (-6.0d0)) / x1)) / x1))))
else if (x1 <= 3.7d0) then
tmp = ((3.0d0 * ((x1 * (x1 * 3.0d0)) - (x1 + (2.0d0 * x2)))) / t_0) + ((x1 + x1) + (4.0d0 * (((2.0d0 * x2) + (-3.0d0)) * (x1 * x2))))
else
tmp = x1 + (((x1 * x1) * (9.0d0 + (((((t_1 * (-12.0d0)) + (x2 * 6.0d0)) / x1) - 3.0d0) / x1))) + (t_0 * ((x1 * x1) * ((6.0d0 + (t_1 * 8.0d0)) - ((3.0d0 / x1) + (18.0d0 / (x1 * 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 = x2 / (x1 * x1);
double t_2 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double tmp;
if (x1 <= -1.55e+71) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= -1.1e-8) {
tmp = x1 + ((t_0 * (x1 + (((x1 * x1) * -6.0) + ((t_2 / t_0) * ((x1 * (-6.0 + ((2.0 * t_2) / t_0))) + ((x1 * x1) * 4.0)))))) + ((x1 * x1) * (9.0 - ((3.0 + ((x2 * -6.0) / x1)) / x1))));
} else if (x1 <= 3.7) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + (((x1 * x1) * (9.0 + (((((t_1 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_1 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1)))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x2 / (x1 * x1) t_2 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)) tmp = 0 if x1 <= -1.55e+71: tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))) elif x1 <= -1.1e-8: tmp = x1 + ((t_0 * (x1 + (((x1 * x1) * -6.0) + ((t_2 / t_0) * ((x1 * (-6.0 + ((2.0 * t_2) / t_0))) + ((x1 * x1) * 4.0)))))) + ((x1 * x1) * (9.0 - ((3.0 + ((x2 * -6.0) / x1)) / x1)))) elif x1 <= 3.7: tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))) else: tmp = x1 + (((x1 * x1) * (9.0 + (((((t_1 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_1 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1))))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x2 / Float64(x1 * x1)) t_2 = Float64(Float64(2.0 * x2) + Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))) tmp = 0.0 if (x1 <= -1.55e+71) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * 6.0) * Float64(x1 * Float64(-1.0 - Float64(x1 * x1)))))); elseif (x1 <= -1.1e-8) tmp = Float64(x1 + Float64(Float64(t_0 * Float64(x1 + Float64(Float64(Float64(x1 * x1) * -6.0) + Float64(Float64(t_2 / t_0) * Float64(Float64(x1 * Float64(-6.0 + Float64(Float64(2.0 * t_2) / t_0))) + Float64(Float64(x1 * x1) * 4.0)))))) + Float64(Float64(x1 * x1) * Float64(9.0 - Float64(Float64(3.0 + Float64(Float64(x2 * -6.0) / x1)) / x1))))); elseif (x1 <= 3.7) tmp = Float64(Float64(Float64(3.0 * Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x1 + Float64(2.0 * x2)))) / t_0) + Float64(Float64(x1 + x1) + Float64(4.0 * Float64(Float64(Float64(2.0 * x2) + -3.0) * Float64(x1 * x2))))); else tmp = Float64(x1 + Float64(Float64(Float64(x1 * x1) * Float64(9.0 + Float64(Float64(Float64(Float64(Float64(t_1 * -12.0) + Float64(x2 * 6.0)) / x1) - 3.0) / x1))) + Float64(t_0 * Float64(Float64(x1 * x1) * Float64(Float64(6.0 + Float64(t_1 * 8.0)) - Float64(Float64(3.0 / x1) + Float64(18.0 / Float64(x1 * x1)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x2 / (x1 * x1); t_2 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)); tmp = 0.0; if (x1 <= -1.55e+71) tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))); elseif (x1 <= -1.1e-8) tmp = x1 + ((t_0 * (x1 + (((x1 * x1) * -6.0) + ((t_2 / t_0) * ((x1 * (-6.0 + ((2.0 * t_2) / t_0))) + ((x1 * x1) * 4.0)))))) + ((x1 * x1) * (9.0 - ((3.0 + ((x2 * -6.0) / x1)) / x1)))); elseif (x1 <= 3.7) tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))); else tmp = x1 + (((x1 * x1) * (9.0 + (((((t_1 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_1 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * 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[(x2 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * x2), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.55e+71], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * 6.0), $MachinePrecision] * N[(x1 * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.1e-8], N[(x1 + N[(N[(t$95$0 * N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * -6.0), $MachinePrecision] + N[(N[(t$95$2 / t$95$0), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(N[(2.0 * t$95$2), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(9.0 - N[(N[(3.0 + N[(N[(x2 * -6.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.7], N[(N[(N[(3.0 * N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] + N[(N[(x1 + x1), $MachinePrecision] + N[(4.0 * N[(N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision] * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * N[(9.0 + N[(N[(N[(N[(N[(t$95$1 * -12.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(6.0 + N[(t$95$1 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 / x1), $MachinePrecision] + N[(18.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := \frac{x2}{x1 \cdot x1}\\
t_2 := 2 \cdot x2 + x1 \cdot \left(x1 \cdot 3 + -1\right)\\
\mathbf{if}\;x1 \leq -1.55 \cdot 10^{+71}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(x1 \cdot 6\right) \cdot \left(x1 \cdot \left(-1 - x1 \cdot x1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.1 \cdot 10^{-8}:\\
\;\;\;\;x1 + \left(t\_0 \cdot \left(x1 + \left(\left(x1 \cdot x1\right) \cdot -6 + \frac{t\_2}{t\_0} \cdot \left(x1 \cdot \left(-6 + \frac{2 \cdot t\_2}{t\_0}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right) + \left(x1 \cdot x1\right) \cdot \left(9 - \frac{3 + \frac{x2 \cdot -6}{x1}}{x1}\right)\right)\\
\mathbf{elif}\;x1 \leq 3.7:\\
\;\;\;\;\frac{3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + 2 \cdot x2\right)\right)}{t\_0} + \left(\left(x1 + x1\right) + 4 \cdot \left(\left(2 \cdot x2 + -3\right) \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot \left(9 + \frac{\frac{t\_1 \cdot -12 + x2 \cdot 6}{x1} - 3}{x1}\right) + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\left(6 + t\_1 \cdot 8\right) - \left(\frac{3}{x1} + \frac{18}{x1 \cdot x1}\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.55000000000000009e71Initial program 11.4%
Simplified29.5%
Taylor expanded in x1 around 0
*-lowering-*.f6429.5%
Simplified29.5%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
if -1.55000000000000009e71 < x1 < -1.0999999999999999e-8Initial program 99.1%
Simplified87.4%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6496.7%
Simplified96.7%
if -1.0999999999999999e-8 < x1 < 3.7000000000000002Initial program 99.5%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6482.8%
Simplified82.8%
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr99.3%
if 3.7000000000000002 < x1 Initial program 43.4%
Simplified41.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified43.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6497.5%
Simplified97.5%
Final simplification98.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (/ t_0 (+ (* 2.0 x2) (* x1 (+ (* x1 3.0) -1.0)))))
(t_2 (/ x2 (* x1 x1))))
(if (<= x1 -1.55e+71)
(+ x1 (- (* x2 -6.0) (* (* x1 6.0) (* x1 (- -1.0 (* x1 x1))))))
(if (<= x1 -8e-9)
(+
x1
(+
(*
t_0
(+
x1
(+
(* x1 (* x1 -6.0))
(/ (* x1 (+ (+ -6.0 (/ 2.0 t_1)) (* x1 4.0))) t_1))))
(* (* x1 x1) (- 9.0 (/ (+ 3.0 (/ (* x2 -6.0) x1)) x1)))))
(if (<= x1 45.0)
(+
(/ (* 3.0 (- (* x1 (* x1 3.0)) (+ x1 (* 2.0 x2)))) t_0)
(+ (+ x1 x1) (* 4.0 (* (+ (* 2.0 x2) -3.0) (* x1 x2)))))
(+
x1
(+
(*
(* x1 x1)
(+ 9.0 (/ (- (/ (+ (* t_2 -12.0) (* x2 6.0)) x1) 3.0) x1)))
(*
t_0
(*
(* x1 x1)
(- (+ 6.0 (* t_2 8.0)) (+ (/ 3.0 x1) (/ 18.0 (* x1 x1)))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = t_0 / ((2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)));
double t_2 = x2 / (x1 * x1);
double tmp;
if (x1 <= -1.55e+71) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= -8e-9) {
tmp = x1 + ((t_0 * (x1 + ((x1 * (x1 * -6.0)) + ((x1 * ((-6.0 + (2.0 / t_1)) + (x1 * 4.0))) / t_1)))) + ((x1 * x1) * (9.0 - ((3.0 + ((x2 * -6.0) / x1)) / x1))));
} else if (x1 <= 45.0) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + (((x1 * x1) * (9.0 + (((((t_2 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_2 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = t_0 / ((2.0d0 * x2) + (x1 * ((x1 * 3.0d0) + (-1.0d0))))
t_2 = x2 / (x1 * x1)
if (x1 <= (-1.55d+71)) then
tmp = x1 + ((x2 * (-6.0d0)) - ((x1 * 6.0d0) * (x1 * ((-1.0d0) - (x1 * x1)))))
else if (x1 <= (-8d-9)) then
tmp = x1 + ((t_0 * (x1 + ((x1 * (x1 * (-6.0d0))) + ((x1 * (((-6.0d0) + (2.0d0 / t_1)) + (x1 * 4.0d0))) / t_1)))) + ((x1 * x1) * (9.0d0 - ((3.0d0 + ((x2 * (-6.0d0)) / x1)) / x1))))
else if (x1 <= 45.0d0) then
tmp = ((3.0d0 * ((x1 * (x1 * 3.0d0)) - (x1 + (2.0d0 * x2)))) / t_0) + ((x1 + x1) + (4.0d0 * (((2.0d0 * x2) + (-3.0d0)) * (x1 * x2))))
else
tmp = x1 + (((x1 * x1) * (9.0d0 + (((((t_2 * (-12.0d0)) + (x2 * 6.0d0)) / x1) - 3.0d0) / x1))) + (t_0 * ((x1 * x1) * ((6.0d0 + (t_2 * 8.0d0)) - ((3.0d0 / x1) + (18.0d0 / (x1 * 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 = t_0 / ((2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)));
double t_2 = x2 / (x1 * x1);
double tmp;
if (x1 <= -1.55e+71) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= -8e-9) {
tmp = x1 + ((t_0 * (x1 + ((x1 * (x1 * -6.0)) + ((x1 * ((-6.0 + (2.0 / t_1)) + (x1 * 4.0))) / t_1)))) + ((x1 * x1) * (9.0 - ((3.0 + ((x2 * -6.0) / x1)) / x1))));
} else if (x1 <= 45.0) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + (((x1 * x1) * (9.0 + (((((t_2 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_2 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1)))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = t_0 / ((2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0))) t_2 = x2 / (x1 * x1) tmp = 0 if x1 <= -1.55e+71: tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))) elif x1 <= -8e-9: tmp = x1 + ((t_0 * (x1 + ((x1 * (x1 * -6.0)) + ((x1 * ((-6.0 + (2.0 / t_1)) + (x1 * 4.0))) / t_1)))) + ((x1 * x1) * (9.0 - ((3.0 + ((x2 * -6.0) / x1)) / x1)))) elif x1 <= 45.0: tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))) else: tmp = x1 + (((x1 * x1) * (9.0 + (((((t_2 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_2 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1))))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(t_0 / Float64(Float64(2.0 * x2) + Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0)))) t_2 = Float64(x2 / Float64(x1 * x1)) tmp = 0.0 if (x1 <= -1.55e+71) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * 6.0) * Float64(x1 * Float64(-1.0 - Float64(x1 * x1)))))); elseif (x1 <= -8e-9) tmp = Float64(x1 + Float64(Float64(t_0 * Float64(x1 + Float64(Float64(x1 * Float64(x1 * -6.0)) + Float64(Float64(x1 * Float64(Float64(-6.0 + Float64(2.0 / t_1)) + Float64(x1 * 4.0))) / t_1)))) + Float64(Float64(x1 * x1) * Float64(9.0 - Float64(Float64(3.0 + Float64(Float64(x2 * -6.0) / x1)) / x1))))); elseif (x1 <= 45.0) tmp = Float64(Float64(Float64(3.0 * Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x1 + Float64(2.0 * x2)))) / t_0) + Float64(Float64(x1 + x1) + Float64(4.0 * Float64(Float64(Float64(2.0 * x2) + -3.0) * Float64(x1 * x2))))); else tmp = Float64(x1 + Float64(Float64(Float64(x1 * x1) * Float64(9.0 + Float64(Float64(Float64(Float64(Float64(t_2 * -12.0) + Float64(x2 * 6.0)) / x1) - 3.0) / x1))) + Float64(t_0 * Float64(Float64(x1 * x1) * Float64(Float64(6.0 + Float64(t_2 * 8.0)) - Float64(Float64(3.0 / x1) + Float64(18.0 / Float64(x1 * x1)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = t_0 / ((2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0))); t_2 = x2 / (x1 * x1); tmp = 0.0; if (x1 <= -1.55e+71) tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))); elseif (x1 <= -8e-9) tmp = x1 + ((t_0 * (x1 + ((x1 * (x1 * -6.0)) + ((x1 * ((-6.0 + (2.0 / t_1)) + (x1 * 4.0))) / t_1)))) + ((x1 * x1) * (9.0 - ((3.0 + ((x2 * -6.0) / x1)) / x1)))); elseif (x1 <= 45.0) tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))); else tmp = x1 + (((x1 * x1) * (9.0 + (((((t_2 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_2 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * 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[(t$95$0 / N[(N[(2.0 * x2), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x2 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.55e+71], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * 6.0), $MachinePrecision] * N[(x1 * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -8e-9], N[(x1 + N[(N[(t$95$0 * N[(x1 + N[(N[(x1 * N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(N[(-6.0 + N[(2.0 / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x1 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(9.0 - N[(N[(3.0 + N[(N[(x2 * -6.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 45.0], N[(N[(N[(3.0 * N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] + N[(N[(x1 + x1), $MachinePrecision] + N[(4.0 * N[(N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision] * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * N[(9.0 + N[(N[(N[(N[(N[(t$95$2 * -12.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(6.0 + N[(t$95$2 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 / x1), $MachinePrecision] + N[(18.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := \frac{t\_0}{2 \cdot x2 + x1 \cdot \left(x1 \cdot 3 + -1\right)}\\
t_2 := \frac{x2}{x1 \cdot x1}\\
\mathbf{if}\;x1 \leq -1.55 \cdot 10^{+71}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(x1 \cdot 6\right) \cdot \left(x1 \cdot \left(-1 - x1 \cdot x1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -8 \cdot 10^{-9}:\\
\;\;\;\;x1 + \left(t\_0 \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{x1 \cdot \left(\left(-6 + \frac{2}{t\_1}\right) + x1 \cdot 4\right)}{t\_1}\right)\right) + \left(x1 \cdot x1\right) \cdot \left(9 - \frac{3 + \frac{x2 \cdot -6}{x1}}{x1}\right)\right)\\
\mathbf{elif}\;x1 \leq 45:\\
\;\;\;\;\frac{3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + 2 \cdot x2\right)\right)}{t\_0} + \left(\left(x1 + x1\right) + 4 \cdot \left(\left(2 \cdot x2 + -3\right) \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot \left(9 + \frac{\frac{t\_2 \cdot -12 + x2 \cdot 6}{x1} - 3}{x1}\right) + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\left(6 + t\_2 \cdot 8\right) - \left(\frac{3}{x1} + \frac{18}{x1 \cdot x1}\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.55000000000000009e71Initial program 11.4%
Simplified29.5%
Taylor expanded in x1 around 0
*-lowering-*.f6429.5%
Simplified29.5%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
if -1.55000000000000009e71 < x1 < -8.0000000000000005e-9Initial program 99.1%
Simplified87.4%
Applied egg-rr87.5%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6496.6%
Simplified96.6%
if -8.0000000000000005e-9 < x1 < 45Initial program 99.5%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6482.8%
Simplified82.8%
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr99.3%
if 45 < x1 Initial program 43.4%
Simplified41.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified43.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6497.5%
Simplified97.5%
Final simplification98.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (/ x2 (* x1 x1)))
(t_2 (+ (* 2.0 x2) (* x1 (+ (* x1 3.0) -1.0)))))
(if (<= x1 -1.55e+71)
(+ x1 (- (* x2 -6.0) (* (* x1 6.0) (* x1 (- -1.0 (* x1 x1))))))
(if (<= x1 -1.1e-8)
(+
x1
(+
(*
t_0
(+
x1
(+
(* (* x1 x1) -6.0)
(*
(/ t_2 t_0)
(+ (* x1 (+ -6.0 (/ (* 2.0 t_2) t_0))) (* (* x1 x1) 4.0))))))
(* (* x1 x1) (+ 9.0 (/ -3.0 x1)))))
(if (<= x1 320.0)
(+
(/ (* 3.0 (- (* x1 (* x1 3.0)) (+ x1 (* 2.0 x2)))) t_0)
(+ (+ x1 x1) (* 4.0 (* (+ (* 2.0 x2) -3.0) (* x1 x2)))))
(+
x1
(+
(*
(* x1 x1)
(+ 9.0 (/ (- (/ (+ (* t_1 -12.0) (* x2 6.0)) x1) 3.0) x1)))
(*
t_0
(*
(* x1 x1)
(- (+ 6.0 (* t_1 8.0)) (+ (/ 3.0 x1) (/ 18.0 (* x1 x1)))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x2 / (x1 * x1);
double t_2 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double tmp;
if (x1 <= -1.55e+71) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= -1.1e-8) {
tmp = x1 + ((t_0 * (x1 + (((x1 * x1) * -6.0) + ((t_2 / t_0) * ((x1 * (-6.0 + ((2.0 * t_2) / t_0))) + ((x1 * x1) * 4.0)))))) + ((x1 * x1) * (9.0 + (-3.0 / x1))));
} else if (x1 <= 320.0) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + (((x1 * x1) * (9.0 + (((((t_1 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_1 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x2 / (x1 * x1)
t_2 = (2.0d0 * x2) + (x1 * ((x1 * 3.0d0) + (-1.0d0)))
if (x1 <= (-1.55d+71)) then
tmp = x1 + ((x2 * (-6.0d0)) - ((x1 * 6.0d0) * (x1 * ((-1.0d0) - (x1 * x1)))))
else if (x1 <= (-1.1d-8)) then
tmp = x1 + ((t_0 * (x1 + (((x1 * x1) * (-6.0d0)) + ((t_2 / t_0) * ((x1 * ((-6.0d0) + ((2.0d0 * t_2) / t_0))) + ((x1 * x1) * 4.0d0)))))) + ((x1 * x1) * (9.0d0 + ((-3.0d0) / x1))))
else if (x1 <= 320.0d0) then
tmp = ((3.0d0 * ((x1 * (x1 * 3.0d0)) - (x1 + (2.0d0 * x2)))) / t_0) + ((x1 + x1) + (4.0d0 * (((2.0d0 * x2) + (-3.0d0)) * (x1 * x2))))
else
tmp = x1 + (((x1 * x1) * (9.0d0 + (((((t_1 * (-12.0d0)) + (x2 * 6.0d0)) / x1) - 3.0d0) / x1))) + (t_0 * ((x1 * x1) * ((6.0d0 + (t_1 * 8.0d0)) - ((3.0d0 / x1) + (18.0d0 / (x1 * 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 = x2 / (x1 * x1);
double t_2 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double tmp;
if (x1 <= -1.55e+71) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= -1.1e-8) {
tmp = x1 + ((t_0 * (x1 + (((x1 * x1) * -6.0) + ((t_2 / t_0) * ((x1 * (-6.0 + ((2.0 * t_2) / t_0))) + ((x1 * x1) * 4.0)))))) + ((x1 * x1) * (9.0 + (-3.0 / x1))));
} else if (x1 <= 320.0) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + (((x1 * x1) * (9.0 + (((((t_1 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_1 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1)))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x2 / (x1 * x1) t_2 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)) tmp = 0 if x1 <= -1.55e+71: tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))) elif x1 <= -1.1e-8: tmp = x1 + ((t_0 * (x1 + (((x1 * x1) * -6.0) + ((t_2 / t_0) * ((x1 * (-6.0 + ((2.0 * t_2) / t_0))) + ((x1 * x1) * 4.0)))))) + ((x1 * x1) * (9.0 + (-3.0 / x1)))) elif x1 <= 320.0: tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))) else: tmp = x1 + (((x1 * x1) * (9.0 + (((((t_1 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_1 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1))))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x2 / Float64(x1 * x1)) t_2 = Float64(Float64(2.0 * x2) + Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))) tmp = 0.0 if (x1 <= -1.55e+71) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * 6.0) * Float64(x1 * Float64(-1.0 - Float64(x1 * x1)))))); elseif (x1 <= -1.1e-8) tmp = Float64(x1 + Float64(Float64(t_0 * Float64(x1 + Float64(Float64(Float64(x1 * x1) * -6.0) + Float64(Float64(t_2 / t_0) * Float64(Float64(x1 * Float64(-6.0 + Float64(Float64(2.0 * t_2) / t_0))) + Float64(Float64(x1 * x1) * 4.0)))))) + Float64(Float64(x1 * x1) * Float64(9.0 + Float64(-3.0 / x1))))); elseif (x1 <= 320.0) tmp = Float64(Float64(Float64(3.0 * Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x1 + Float64(2.0 * x2)))) / t_0) + Float64(Float64(x1 + x1) + Float64(4.0 * Float64(Float64(Float64(2.0 * x2) + -3.0) * Float64(x1 * x2))))); else tmp = Float64(x1 + Float64(Float64(Float64(x1 * x1) * Float64(9.0 + Float64(Float64(Float64(Float64(Float64(t_1 * -12.0) + Float64(x2 * 6.0)) / x1) - 3.0) / x1))) + Float64(t_0 * Float64(Float64(x1 * x1) * Float64(Float64(6.0 + Float64(t_1 * 8.0)) - Float64(Float64(3.0 / x1) + Float64(18.0 / Float64(x1 * x1)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x2 / (x1 * x1); t_2 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)); tmp = 0.0; if (x1 <= -1.55e+71) tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))); elseif (x1 <= -1.1e-8) tmp = x1 + ((t_0 * (x1 + (((x1 * x1) * -6.0) + ((t_2 / t_0) * ((x1 * (-6.0 + ((2.0 * t_2) / t_0))) + ((x1 * x1) * 4.0)))))) + ((x1 * x1) * (9.0 + (-3.0 / x1)))); elseif (x1 <= 320.0) tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))); else tmp = x1 + (((x1 * x1) * (9.0 + (((((t_1 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_0 * ((x1 * x1) * ((6.0 + (t_1 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * 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[(x2 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * x2), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.55e+71], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * 6.0), $MachinePrecision] * N[(x1 * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.1e-8], N[(x1 + N[(N[(t$95$0 * N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * -6.0), $MachinePrecision] + N[(N[(t$95$2 / t$95$0), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(N[(2.0 * t$95$2), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(9.0 + N[(-3.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 320.0], N[(N[(N[(3.0 * N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] + N[(N[(x1 + x1), $MachinePrecision] + N[(4.0 * N[(N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision] * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * N[(9.0 + N[(N[(N[(N[(N[(t$95$1 * -12.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(6.0 + N[(t$95$1 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 / x1), $MachinePrecision] + N[(18.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := \frac{x2}{x1 \cdot x1}\\
t_2 := 2 \cdot x2 + x1 \cdot \left(x1 \cdot 3 + -1\right)\\
\mathbf{if}\;x1 \leq -1.55 \cdot 10^{+71}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(x1 \cdot 6\right) \cdot \left(x1 \cdot \left(-1 - x1 \cdot x1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -1.1 \cdot 10^{-8}:\\
\;\;\;\;x1 + \left(t\_0 \cdot \left(x1 + \left(\left(x1 \cdot x1\right) \cdot -6 + \frac{t\_2}{t\_0} \cdot \left(x1 \cdot \left(-6 + \frac{2 \cdot t\_2}{t\_0}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right) + \left(x1 \cdot x1\right) \cdot \left(9 + \frac{-3}{x1}\right)\right)\\
\mathbf{elif}\;x1 \leq 320:\\
\;\;\;\;\frac{3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + 2 \cdot x2\right)\right)}{t\_0} + \left(\left(x1 + x1\right) + 4 \cdot \left(\left(2 \cdot x2 + -3\right) \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot \left(9 + \frac{\frac{t\_1 \cdot -12 + x2 \cdot 6}{x1} - 3}{x1}\right) + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\left(6 + t\_1 \cdot 8\right) - \left(\frac{3}{x1} + \frac{18}{x1 \cdot x1}\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.55000000000000009e71Initial program 11.4%
Simplified29.5%
Taylor expanded in x1 around 0
*-lowering-*.f6429.5%
Simplified29.5%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
if -1.55000000000000009e71 < x1 < -1.0999999999999999e-8Initial program 99.1%
Simplified87.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6496.0%
Simplified96.0%
if -1.0999999999999999e-8 < x1 < 320Initial program 99.5%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6482.8%
Simplified82.8%
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr99.3%
if 320 < x1 Initial program 43.4%
Simplified41.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified43.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6497.5%
Simplified97.5%
Final simplification98.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ x2 (* x1 x1))) (t_1 (+ (* x1 x1) 1.0)))
(if (<= x1 -340000.0)
(+
x1
(+
(* x2 -6.0)
(*
t_1
(* (* x1 x1) (+ 6.0 (/ (- (/ (+ (* x2 8.0) -18.0) x1) 3.0) x1))))))
(if (<= x1 11.5)
(+
(/ (* 3.0 (- (* x1 (* x1 3.0)) (+ x1 (* 2.0 x2)))) t_1)
(+ (+ x1 x1) (* 4.0 (* (+ (* 2.0 x2) -3.0) (* x1 x2)))))
(+
x1
(+
(*
(* x1 x1)
(+ 9.0 (/ (- (/ (+ (* t_0 -12.0) (* x2 6.0)) x1) 3.0) x1)))
(*
t_1
(*
(* x1 x1)
(- (+ 6.0 (* t_0 8.0)) (+ (/ 3.0 x1) (/ 18.0 (* x1 x1))))))))))))
double code(double x1, double x2) {
double t_0 = x2 / (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -340000.0) {
tmp = x1 + ((x2 * -6.0) + (t_1 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
} else if (x1 <= 11.5) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_1) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + (((x1 * x1) * (9.0 + (((((t_0 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_1 * ((x1 * x1) * ((6.0 + (t_0 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * 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) :: tmp
t_0 = x2 / (x1 * x1)
t_1 = (x1 * x1) + 1.0d0
if (x1 <= (-340000.0d0)) then
tmp = x1 + ((x2 * (-6.0d0)) + (t_1 * ((x1 * x1) * (6.0d0 + (((((x2 * 8.0d0) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
else if (x1 <= 11.5d0) then
tmp = ((3.0d0 * ((x1 * (x1 * 3.0d0)) - (x1 + (2.0d0 * x2)))) / t_1) + ((x1 + x1) + (4.0d0 * (((2.0d0 * x2) + (-3.0d0)) * (x1 * x2))))
else
tmp = x1 + (((x1 * x1) * (9.0d0 + (((((t_0 * (-12.0d0)) + (x2 * 6.0d0)) / x1) - 3.0d0) / x1))) + (t_1 * ((x1 * x1) * ((6.0d0 + (t_0 * 8.0d0)) - ((3.0d0 / x1) + (18.0d0 / (x1 * x1)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x2 / (x1 * x1);
double t_1 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -340000.0) {
tmp = x1 + ((x2 * -6.0) + (t_1 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
} else if (x1 <= 11.5) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_1) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + (((x1 * x1) * (9.0 + (((((t_0 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_1 * ((x1 * x1) * ((6.0 + (t_0 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1)))))));
}
return tmp;
}
def code(x1, x2): t_0 = x2 / (x1 * x1) t_1 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -340000.0: tmp = x1 + ((x2 * -6.0) + (t_1 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))) elif x1 <= 11.5: tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_1) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))) else: tmp = x1 + (((x1 * x1) * (9.0 + (((((t_0 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_1 * ((x1 * x1) * ((6.0 + (t_0 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1))))))) return tmp
function code(x1, x2) t_0 = Float64(x2 / Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -340000.0) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(t_1 * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))))); elseif (x1 <= 11.5) tmp = Float64(Float64(Float64(3.0 * Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x1 + Float64(2.0 * x2)))) / t_1) + Float64(Float64(x1 + x1) + Float64(4.0 * Float64(Float64(Float64(2.0 * x2) + -3.0) * Float64(x1 * x2))))); else tmp = Float64(x1 + Float64(Float64(Float64(x1 * x1) * Float64(9.0 + Float64(Float64(Float64(Float64(Float64(t_0 * -12.0) + Float64(x2 * 6.0)) / x1) - 3.0) / x1))) + Float64(t_1 * Float64(Float64(x1 * x1) * Float64(Float64(6.0 + Float64(t_0 * 8.0)) - Float64(Float64(3.0 / x1) + Float64(18.0 / Float64(x1 * x1)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x2 / (x1 * x1); t_1 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -340000.0) tmp = x1 + ((x2 * -6.0) + (t_1 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))); elseif (x1 <= 11.5) tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_1) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))); else tmp = x1 + (((x1 * x1) * (9.0 + (((((t_0 * -12.0) + (x2 * 6.0)) / x1) - 3.0) / x1))) + (t_1 * ((x1 * x1) * ((6.0 + (t_0 * 8.0)) - ((3.0 / x1) + (18.0 / (x1 * x1))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x2 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -340000.0], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$1 * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 11.5], N[(N[(N[(3.0 * N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(x1 + x1), $MachinePrecision] + N[(4.0 * N[(N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision] * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * N[(9.0 + N[(N[(N[(N[(N[(t$95$0 * -12.0), $MachinePrecision] + N[(x2 * 6.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(6.0 + N[(t$95$0 * 8.0), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 / x1), $MachinePrecision] + N[(18.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x2}{x1 \cdot x1}\\
t_1 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -340000:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{x2 \cdot 8 + -18}{x1} - 3}{x1}\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 11.5:\\
\;\;\;\;\frac{3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + 2 \cdot x2\right)\right)}{t\_1} + \left(\left(x1 + x1\right) + 4 \cdot \left(\left(2 \cdot x2 + -3\right) \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(\left(x1 \cdot x1\right) \cdot \left(9 + \frac{\frac{t\_0 \cdot -12 + x2 \cdot 6}{x1} - 3}{x1}\right) + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\left(6 + t\_0 \cdot 8\right) - \left(\frac{3}{x1} + \frac{18}{x1 \cdot x1}\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -3.4e5Initial program 26.8%
Simplified39.1%
Taylor expanded in x1 around 0
*-lowering-*.f6441.8%
Simplified41.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval95.0%
Simplified95.0%
if -3.4e5 < x1 < 11.5Initial program 99.4%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.7%
Simplified81.7%
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr97.6%
if 11.5 < x1 Initial program 43.4%
Simplified41.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified43.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6497.5%
Simplified97.5%
Final simplification96.8%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -210000000.0)
(+
x1
(+
(* x2 -6.0)
(*
(+ (* x1 x1) 1.0)
(* (* x1 x1) (+ 6.0 (/ (- (/ (+ (* x2 8.0) -18.0) x1) 3.0) x1))))))
(if (<= x1 -2.7e-163)
(+
(* x2 -6.0)
(*
x1
(+
(* (* 2.0 x2) (+ -6.0 (* x2 4.0)))
(+ -1.0 (* x1 (+ (* x2 (+ 12.0 (* x1 24.0))) (+ 9.0 (* x1 -19.0))))))))
(if (<= x1 3.3e-208)
(* x2 (+ -6.0 (* (* x1 x2) (+ 8.0 (* (* x1 x1) -8.0)))))
(if (<= x1 150000.0)
(+
(* x2 -6.0)
(*
x1
(-
(* (+ (* 2.0 x2) -3.0) (* x2 4.0))
(- 1.0 (* x1 (* 3.0 (+ x1 (+ 3.0 (* 2.0 x2)))))))))
(+
x1
(+
(* x2 -6.0)
(*
(- -1.0 (* x1 x1))
(*
(* x1 x1)
(-
(+ (/ 3.0 x1) (/ 18.0 (* x1 x1)))
(+ 6.0 (/ (* x2 8.0) (* x1 x1)))))))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -210000000.0) {
tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
} else if (x1 <= -2.7e-163) {
tmp = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (x1 * ((x2 * (12.0 + (x1 * 24.0))) + (9.0 + (x1 * -19.0)))))));
} else if (x1 <= 3.3e-208) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 150000.0) {
tmp = (x2 * -6.0) + (x1 * ((((2.0 * x2) + -3.0) * (x2 * 4.0)) - (1.0 - (x1 * (3.0 * (x1 + (3.0 + (2.0 * x2))))))));
} else {
tmp = x1 + ((x2 * -6.0) + ((-1.0 - (x1 * x1)) * ((x1 * x1) * (((3.0 / x1) + (18.0 / (x1 * x1))) - (6.0 + ((x2 * 8.0) / (x1 * x1)))))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-210000000.0d0)) then
tmp = x1 + ((x2 * (-6.0d0)) + (((x1 * x1) + 1.0d0) * ((x1 * x1) * (6.0d0 + (((((x2 * 8.0d0) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
else if (x1 <= (-2.7d-163)) then
tmp = (x2 * (-6.0d0)) + (x1 * (((2.0d0 * x2) * ((-6.0d0) + (x2 * 4.0d0))) + ((-1.0d0) + (x1 * ((x2 * (12.0d0 + (x1 * 24.0d0))) + (9.0d0 + (x1 * (-19.0d0))))))))
else if (x1 <= 3.3d-208) then
tmp = x2 * ((-6.0d0) + ((x1 * x2) * (8.0d0 + ((x1 * x1) * (-8.0d0)))))
else if (x1 <= 150000.0d0) then
tmp = (x2 * (-6.0d0)) + (x1 * ((((2.0d0 * x2) + (-3.0d0)) * (x2 * 4.0d0)) - (1.0d0 - (x1 * (3.0d0 * (x1 + (3.0d0 + (2.0d0 * x2))))))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (((-1.0d0) - (x1 * x1)) * ((x1 * x1) * (((3.0d0 / x1) + (18.0d0 / (x1 * x1))) - (6.0d0 + ((x2 * 8.0d0) / (x1 * x1)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -210000000.0) {
tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
} else if (x1 <= -2.7e-163) {
tmp = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (x1 * ((x2 * (12.0 + (x1 * 24.0))) + (9.0 + (x1 * -19.0)))))));
} else if (x1 <= 3.3e-208) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 150000.0) {
tmp = (x2 * -6.0) + (x1 * ((((2.0 * x2) + -3.0) * (x2 * 4.0)) - (1.0 - (x1 * (3.0 * (x1 + (3.0 + (2.0 * x2))))))));
} else {
tmp = x1 + ((x2 * -6.0) + ((-1.0 - (x1 * x1)) * ((x1 * x1) * (((3.0 / x1) + (18.0 / (x1 * x1))) - (6.0 + ((x2 * 8.0) / (x1 * x1)))))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -210000000.0: tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))) elif x1 <= -2.7e-163: tmp = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (x1 * ((x2 * (12.0 + (x1 * 24.0))) + (9.0 + (x1 * -19.0))))))) elif x1 <= 3.3e-208: tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))) elif x1 <= 150000.0: tmp = (x2 * -6.0) + (x1 * ((((2.0 * x2) + -3.0) * (x2 * 4.0)) - (1.0 - (x1 * (3.0 * (x1 + (3.0 + (2.0 * x2)))))))) else: tmp = x1 + ((x2 * -6.0) + ((-1.0 - (x1 * x1)) * ((x1 * x1) * (((3.0 / x1) + (18.0 / (x1 * x1))) - (6.0 + ((x2 * 8.0) / (x1 * x1))))))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -210000000.0) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))))); elseif (x1 <= -2.7e-163) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(2.0 * x2) * Float64(-6.0 + Float64(x2 * 4.0))) + Float64(-1.0 + Float64(x1 * Float64(Float64(x2 * Float64(12.0 + Float64(x1 * 24.0))) + Float64(9.0 + Float64(x1 * -19.0)))))))); elseif (x1 <= 3.3e-208) tmp = Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * x2) * Float64(8.0 + Float64(Float64(x1 * x1) * -8.0))))); elseif (x1 <= 150000.0) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(Float64(2.0 * x2) + -3.0) * Float64(x2 * 4.0)) - Float64(1.0 - Float64(x1 * Float64(3.0 * Float64(x1 + Float64(3.0 + Float64(2.0 * x2))))))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(-1.0 - Float64(x1 * x1)) * Float64(Float64(x1 * x1) * Float64(Float64(Float64(3.0 / x1) + Float64(18.0 / Float64(x1 * x1))) - Float64(6.0 + Float64(Float64(x2 * 8.0) / Float64(x1 * x1)))))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -210000000.0) tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))); elseif (x1 <= -2.7e-163) tmp = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (x1 * ((x2 * (12.0 + (x1 * 24.0))) + (9.0 + (x1 * -19.0))))))); elseif (x1 <= 3.3e-208) tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))); elseif (x1 <= 150000.0) tmp = (x2 * -6.0) + (x1 * ((((2.0 * x2) + -3.0) * (x2 * 4.0)) - (1.0 - (x1 * (3.0 * (x1 + (3.0 + (2.0 * x2)))))))); else tmp = x1 + ((x2 * -6.0) + ((-1.0 - (x1 * x1)) * ((x1 * x1) * (((3.0 / x1) + (18.0 / (x1 * x1))) - (6.0 + ((x2 * 8.0) / (x1 * x1))))))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -210000000.0], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -2.7e-163], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(2.0 * x2), $MachinePrecision] * N[(-6.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 + N[(x1 * N[(N[(x2 * N[(12.0 + N[(x1 * 24.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.3e-208], N[(x2 * N[(-6.0 + N[(N[(x1 * x2), $MachinePrecision] * N[(8.0 + N[(N[(x1 * x1), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 150000.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision] * N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision] - N[(1.0 - N[(x1 * N[(3.0 * N[(x1 + N[(3.0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(3.0 / x1), $MachinePrecision] + N[(18.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(6.0 + N[(N[(x2 * 8.0), $MachinePrecision] / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -210000000:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{x2 \cdot 8 + -18}{x1} - 3}{x1}\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -2.7 \cdot 10^{-163}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(\left(2 \cdot x2\right) \cdot \left(-6 + x2 \cdot 4\right) + \left(-1 + x1 \cdot \left(x2 \cdot \left(12 + x1 \cdot 24\right) + \left(9 + x1 \cdot -19\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 3.3 \cdot 10^{-208}:\\
\;\;\;\;x2 \cdot \left(-6 + \left(x1 \cdot x2\right) \cdot \left(8 + \left(x1 \cdot x1\right) \cdot -8\right)\right)\\
\mathbf{elif}\;x1 \leq 150000:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(\left(2 \cdot x2 + -3\right) \cdot \left(x2 \cdot 4\right) - \left(1 - x1 \cdot \left(3 \cdot \left(x1 + \left(3 + 2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(-1 - x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\left(\frac{3}{x1} + \frac{18}{x1 \cdot x1}\right) - \left(6 + \frac{x2 \cdot 8}{x1 \cdot x1}\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -2.1e8Initial program 26.8%
Simplified39.1%
Taylor expanded in x1 around 0
*-lowering-*.f6441.8%
Simplified41.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval95.0%
Simplified95.0%
if -2.1e8 < x1 < -2.70000000000000015e-163Initial program 99.3%
Simplified99.2%
Taylor expanded in x1 around 0
Simplified78.4%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.6%
Simplified88.6%
if -2.70000000000000015e-163 < x1 < 3.30000000000000006e-208Initial program 99.8%
Simplified99.8%
Taylor expanded in x1 around 0
Simplified61.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.3%
Simplified70.3%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6497.7%
Simplified97.7%
if 3.30000000000000006e-208 < x1 < 1.5e5Initial program 99.2%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
Simplified89.5%
if 1.5e5 < x1 Initial program 43.4%
Simplified41.8%
Taylor expanded in x1 around 0
*-lowering-*.f6443.4%
Simplified43.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6497.5%
Simplified97.5%
Final simplification94.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+
(* x2 -6.0)
(*
(+ (* x1 x1) 1.0)
(*
(* x1 x1)
(+ 6.0 (/ (- (/ (+ (* x2 8.0) -18.0) x1) 3.0) x1))))))))
(if (<= x1 -1720000.0)
t_0
(if (<= x1 -6.4e-164)
(+
(* x2 -6.0)
(*
x1
(+
(* (* 2.0 x2) (+ -6.0 (* x2 4.0)))
(+
-1.0
(* x1 (+ (* x2 (+ 12.0 (* x1 24.0))) (+ 9.0 (* x1 -19.0))))))))
(if (<= x1 2.85e-210)
(* x2 (+ -6.0 (* (* x1 x2) (+ 8.0 (* (* x1 x1) -8.0)))))
(if (<= x1 170000.0)
(+
(* x2 -6.0)
(*
x1
(-
(* (+ (* 2.0 x2) -3.0) (* x2 4.0))
(- 1.0 (* x1 (* 3.0 (+ x1 (+ 3.0 (* 2.0 x2)))))))))
t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
double tmp;
if (x1 <= -1720000.0) {
tmp = t_0;
} else if (x1 <= -6.4e-164) {
tmp = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (x1 * ((x2 * (12.0 + (x1 * 24.0))) + (9.0 + (x1 * -19.0)))))));
} else if (x1 <= 2.85e-210) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 170000.0) {
tmp = (x2 * -6.0) + (x1 * ((((2.0 * x2) + -3.0) * (x2 * 4.0)) - (1.0 - (x1 * (3.0 * (x1 + (3.0 + (2.0 * x2))))))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (((x1 * x1) + 1.0d0) * ((x1 * x1) * (6.0d0 + (((((x2 * 8.0d0) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
if (x1 <= (-1720000.0d0)) then
tmp = t_0
else if (x1 <= (-6.4d-164)) then
tmp = (x2 * (-6.0d0)) + (x1 * (((2.0d0 * x2) * ((-6.0d0) + (x2 * 4.0d0))) + ((-1.0d0) + (x1 * ((x2 * (12.0d0 + (x1 * 24.0d0))) + (9.0d0 + (x1 * (-19.0d0))))))))
else if (x1 <= 2.85d-210) then
tmp = x2 * ((-6.0d0) + ((x1 * x2) * (8.0d0 + ((x1 * x1) * (-8.0d0)))))
else if (x1 <= 170000.0d0) then
tmp = (x2 * (-6.0d0)) + (x1 * ((((2.0d0 * x2) + (-3.0d0)) * (x2 * 4.0d0)) - (1.0d0 - (x1 * (3.0d0 * (x1 + (3.0d0 + (2.0d0 * x2))))))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
double tmp;
if (x1 <= -1720000.0) {
tmp = t_0;
} else if (x1 <= -6.4e-164) {
tmp = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (x1 * ((x2 * (12.0 + (x1 * 24.0))) + (9.0 + (x1 * -19.0)))))));
} else if (x1 <= 2.85e-210) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 170000.0) {
tmp = (x2 * -6.0) + (x1 * ((((2.0 * x2) + -3.0) * (x2 * 4.0)) - (1.0 - (x1 * (3.0 * (x1 + (3.0 + (2.0 * x2))))))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))) tmp = 0 if x1 <= -1720000.0: tmp = t_0 elif x1 <= -6.4e-164: tmp = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (x1 * ((x2 * (12.0 + (x1 * 24.0))) + (9.0 + (x1 * -19.0))))))) elif x1 <= 2.85e-210: tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))) elif x1 <= 170000.0: tmp = (x2 * -6.0) + (x1 * ((((2.0 * x2) + -3.0) * (x2 * 4.0)) - (1.0 - (x1 * (3.0 * (x1 + (3.0 + (2.0 * x2)))))))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))))) tmp = 0.0 if (x1 <= -1720000.0) tmp = t_0; elseif (x1 <= -6.4e-164) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(2.0 * x2) * Float64(-6.0 + Float64(x2 * 4.0))) + Float64(-1.0 + Float64(x1 * Float64(Float64(x2 * Float64(12.0 + Float64(x1 * 24.0))) + Float64(9.0 + Float64(x1 * -19.0)))))))); elseif (x1 <= 2.85e-210) tmp = Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * x2) * Float64(8.0 + Float64(Float64(x1 * x1) * -8.0))))); elseif (x1 <= 170000.0) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(Float64(2.0 * x2) + -3.0) * Float64(x2 * 4.0)) - Float64(1.0 - Float64(x1 * Float64(3.0 * Float64(x1 + Float64(3.0 + Float64(2.0 * x2))))))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))); tmp = 0.0; if (x1 <= -1720000.0) tmp = t_0; elseif (x1 <= -6.4e-164) tmp = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (x1 * ((x2 * (12.0 + (x1 * 24.0))) + (9.0 + (x1 * -19.0))))))); elseif (x1 <= 2.85e-210) tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))); elseif (x1 <= 170000.0) tmp = (x2 * -6.0) + (x1 * ((((2.0 * x2) + -3.0) * (x2 * 4.0)) - (1.0 - (x1 * (3.0 * (x1 + (3.0 + (2.0 * x2)))))))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1720000.0], t$95$0, If[LessEqual[x1, -6.4e-164], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(2.0 * x2), $MachinePrecision] * N[(-6.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 + N[(x1 * N[(N[(x2 * N[(12.0 + N[(x1 * 24.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 + N[(x1 * -19.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.85e-210], N[(x2 * N[(-6.0 + N[(N[(x1 * x2), $MachinePrecision] * N[(8.0 + N[(N[(x1 * x1), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 170000.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision] * N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision] - N[(1.0 - N[(x1 * N[(3.0 * N[(x1 + N[(3.0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{x2 \cdot 8 + -18}{x1} - 3}{x1}\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1720000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -6.4 \cdot 10^{-164}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(\left(2 \cdot x2\right) \cdot \left(-6 + x2 \cdot 4\right) + \left(-1 + x1 \cdot \left(x2 \cdot \left(12 + x1 \cdot 24\right) + \left(9 + x1 \cdot -19\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 2.85 \cdot 10^{-210}:\\
\;\;\;\;x2 \cdot \left(-6 + \left(x1 \cdot x2\right) \cdot \left(8 + \left(x1 \cdot x1\right) \cdot -8\right)\right)\\
\mathbf{elif}\;x1 \leq 170000:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(\left(2 \cdot x2 + -3\right) \cdot \left(x2 \cdot 4\right) - \left(1 - x1 \cdot \left(3 \cdot \left(x1 + \left(3 + 2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.72e6 or 1.7e5 < x1 Initial program 34.4%
Simplified40.3%
Taylor expanded in x1 around 0
*-lowering-*.f6442.5%
Simplified42.5%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval96.1%
Simplified96.1%
if -1.72e6 < x1 < -6.4000000000000001e-164Initial program 99.3%
Simplified99.2%
Taylor expanded in x1 around 0
Simplified78.4%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.6%
Simplified88.6%
if -6.4000000000000001e-164 < x1 < 2.84999999999999985e-210Initial program 99.8%
Simplified99.8%
Taylor expanded in x1 around 0
Simplified61.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.3%
Simplified70.3%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6497.7%
Simplified97.7%
if 2.84999999999999985e-210 < x1 < 1.7e5Initial program 99.2%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
Simplified89.5%
Final simplification94.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+
(* x2 -6.0)
(*
(+ (* x1 x1) 1.0)
(*
(* x1 x1)
(+ 6.0 (/ (- (/ (+ (* x2 8.0) -18.0) x1) 3.0) x1))))))))
(if (<= x1 -340000.0)
t_0
(if (<= x1 -2.2e-163)
(+
(* x2 -6.0)
(*
x1
(+
(* (* 2.0 x2) (+ -6.0 (* x2 4.0)))
(+ -1.0 (* 3.0 (* x1 (+ 3.0 (* x2 4.0))))))))
(if (<= x1 1.7e-210)
(* x2 (+ -6.0 (* (* x1 x2) (+ 8.0 (* (* x1 x1) -8.0)))))
(if (<= x1 4800.0)
(+
(* x2 -6.0)
(*
x1
(-
(* (+ (* 2.0 x2) -3.0) (* x2 4.0))
(- 1.0 (* x1 (* 3.0 (+ x1 (+ 3.0 (* 2.0 x2)))))))))
t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
double tmp;
if (x1 <= -340000.0) {
tmp = t_0;
} else if (x1 <= -2.2e-163) {
tmp = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (3.0 * (x1 * (3.0 + (x2 * 4.0)))))));
} else if (x1 <= 1.7e-210) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 4800.0) {
tmp = (x2 * -6.0) + (x1 * ((((2.0 * x2) + -3.0) * (x2 * 4.0)) - (1.0 - (x1 * (3.0 * (x1 + (3.0 + (2.0 * x2))))))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) + (((x1 * x1) + 1.0d0) * ((x1 * x1) * (6.0d0 + (((((x2 * 8.0d0) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
if (x1 <= (-340000.0d0)) then
tmp = t_0
else if (x1 <= (-2.2d-163)) then
tmp = (x2 * (-6.0d0)) + (x1 * (((2.0d0 * x2) * ((-6.0d0) + (x2 * 4.0d0))) + ((-1.0d0) + (3.0d0 * (x1 * (3.0d0 + (x2 * 4.0d0)))))))
else if (x1 <= 1.7d-210) then
tmp = x2 * ((-6.0d0) + ((x1 * x2) * (8.0d0 + ((x1 * x1) * (-8.0d0)))))
else if (x1 <= 4800.0d0) then
tmp = (x2 * (-6.0d0)) + (x1 * ((((2.0d0 * x2) + (-3.0d0)) * (x2 * 4.0d0)) - (1.0d0 - (x1 * (3.0d0 * (x1 + (3.0d0 + (2.0d0 * x2))))))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
double tmp;
if (x1 <= -340000.0) {
tmp = t_0;
} else if (x1 <= -2.2e-163) {
tmp = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (3.0 * (x1 * (3.0 + (x2 * 4.0)))))));
} else if (x1 <= 1.7e-210) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 4800.0) {
tmp = (x2 * -6.0) + (x1 * ((((2.0 * x2) + -3.0) * (x2 * 4.0)) - (1.0 - (x1 * (3.0 * (x1 + (3.0 + (2.0 * x2))))))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))) tmp = 0 if x1 <= -340000.0: tmp = t_0 elif x1 <= -2.2e-163: tmp = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (3.0 * (x1 * (3.0 + (x2 * 4.0))))))) elif x1 <= 1.7e-210: tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))) elif x1 <= 4800.0: tmp = (x2 * -6.0) + (x1 * ((((2.0 * x2) + -3.0) * (x2 * 4.0)) - (1.0 - (x1 * (3.0 * (x1 + (3.0 + (2.0 * x2)))))))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))))) tmp = 0.0 if (x1 <= -340000.0) tmp = t_0; elseif (x1 <= -2.2e-163) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(2.0 * x2) * Float64(-6.0 + Float64(x2 * 4.0))) + Float64(-1.0 + Float64(3.0 * Float64(x1 * Float64(3.0 + Float64(x2 * 4.0)))))))); elseif (x1 <= 1.7e-210) tmp = Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * x2) * Float64(8.0 + Float64(Float64(x1 * x1) * -8.0))))); elseif (x1 <= 4800.0) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(Float64(2.0 * x2) + -3.0) * Float64(x2 * 4.0)) - Float64(1.0 - Float64(x1 * Float64(3.0 * Float64(x1 + Float64(3.0 + Float64(2.0 * x2))))))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))); tmp = 0.0; if (x1 <= -340000.0) tmp = t_0; elseif (x1 <= -2.2e-163) tmp = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (3.0 * (x1 * (3.0 + (x2 * 4.0))))))); elseif (x1 <= 1.7e-210) tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))); elseif (x1 <= 4800.0) tmp = (x2 * -6.0) + (x1 * ((((2.0 * x2) + -3.0) * (x2 * 4.0)) - (1.0 - (x1 * (3.0 * (x1 + (3.0 + (2.0 * x2)))))))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -340000.0], t$95$0, If[LessEqual[x1, -2.2e-163], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(2.0 * x2), $MachinePrecision] * N[(-6.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 + N[(3.0 * N[(x1 * N[(3.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.7e-210], N[(x2 * N[(-6.0 + N[(N[(x1 * x2), $MachinePrecision] * N[(8.0 + N[(N[(x1 * x1), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4800.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision] * N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision] - N[(1.0 - N[(x1 * N[(3.0 * N[(x1 + N[(3.0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{x2 \cdot 8 + -18}{x1} - 3}{x1}\right)\right)\right)\\
\mathbf{if}\;x1 \leq -340000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -2.2 \cdot 10^{-163}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(\left(2 \cdot x2\right) \cdot \left(-6 + x2 \cdot 4\right) + \left(-1 + 3 \cdot \left(x1 \cdot \left(3 + x2 \cdot 4\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 1.7 \cdot 10^{-210}:\\
\;\;\;\;x2 \cdot \left(-6 + \left(x1 \cdot x2\right) \cdot \left(8 + \left(x1 \cdot x1\right) \cdot -8\right)\right)\\
\mathbf{elif}\;x1 \leq 4800:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(\left(2 \cdot x2 + -3\right) \cdot \left(x2 \cdot 4\right) - \left(1 - x1 \cdot \left(3 \cdot \left(x1 + \left(3 + 2 \cdot x2\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -3.4e5 or 4800 < x1 Initial program 34.4%
Simplified40.3%
Taylor expanded in x1 around 0
*-lowering-*.f6442.5%
Simplified42.5%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval96.1%
Simplified96.1%
if -3.4e5 < x1 < -2.20000000000000011e-163Initial program 99.3%
Simplified99.2%
Taylor expanded in x1 around 0
Simplified78.4%
Taylor expanded in x1 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6487.7%
Simplified87.7%
if -2.20000000000000011e-163 < x1 < 1.69999999999999987e-210Initial program 99.8%
Simplified99.8%
Taylor expanded in x1 around 0
Simplified61.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.3%
Simplified70.3%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6497.7%
Simplified97.7%
if 1.69999999999999987e-210 < x1 < 4800Initial program 99.2%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.9%
Simplified88.9%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
Simplified89.5%
Final simplification94.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(+
(* x2 -6.0)
(*
(+ (* x1 x1) 1.0)
(*
(* x1 x1)
(+ 6.0 (/ (- (/ (+ (* x2 8.0) -18.0) x1) 3.0) x1)))))))
(t_1
(+
(* x2 -6.0)
(*
x1
(+
(* (* 2.0 x2) (+ -6.0 (* x2 4.0)))
(+ -1.0 (* 3.0 (* x1 (+ 3.0 (* x2 4.0))))))))))
(if (<= x1 -340000.0)
t_0
(if (<= x1 -4.9e-163)
t_1
(if (<= x1 2.2e-211)
(* x2 (+ -6.0 (* (* x1 x2) (+ 8.0 (* (* x1 x1) -8.0)))))
(if (<= x1 140000.0) t_1 t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
double t_1 = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (3.0 * (x1 * (3.0 + (x2 * 4.0)))))));
double tmp;
if (x1 <= -340000.0) {
tmp = t_0;
} else if (x1 <= -4.9e-163) {
tmp = t_1;
} else if (x1 <= 2.2e-211) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 140000.0) {
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 + ((x2 * (-6.0d0)) + (((x1 * x1) + 1.0d0) * ((x1 * x1) * (6.0d0 + (((((x2 * 8.0d0) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
t_1 = (x2 * (-6.0d0)) + (x1 * (((2.0d0 * x2) * ((-6.0d0) + (x2 * 4.0d0))) + ((-1.0d0) + (3.0d0 * (x1 * (3.0d0 + (x2 * 4.0d0)))))))
if (x1 <= (-340000.0d0)) then
tmp = t_0
else if (x1 <= (-4.9d-163)) then
tmp = t_1
else if (x1 <= 2.2d-211) then
tmp = x2 * ((-6.0d0) + ((x1 * x2) * (8.0d0 + ((x1 * x1) * (-8.0d0)))))
else if (x1 <= 140000.0d0) 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 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
double t_1 = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (3.0 * (x1 * (3.0 + (x2 * 4.0)))))));
double tmp;
if (x1 <= -340000.0) {
tmp = t_0;
} else if (x1 <= -4.9e-163) {
tmp = t_1;
} else if (x1 <= 2.2e-211) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 140000.0) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))) t_1 = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (3.0 * (x1 * (3.0 + (x2 * 4.0))))))) tmp = 0 if x1 <= -340000.0: tmp = t_0 elif x1 <= -4.9e-163: tmp = t_1 elif x1 <= 2.2e-211: tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))) elif x1 <= 140000.0: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))))) t_1 = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(2.0 * x2) * Float64(-6.0 + Float64(x2 * 4.0))) + Float64(-1.0 + Float64(3.0 * Float64(x1 * Float64(3.0 + Float64(x2 * 4.0)))))))) tmp = 0.0 if (x1 <= -340000.0) tmp = t_0; elseif (x1 <= -4.9e-163) tmp = t_1; elseif (x1 <= 2.2e-211) tmp = Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * x2) * Float64(8.0 + Float64(Float64(x1 * x1) * -8.0))))); elseif (x1 <= 140000.0) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))); t_1 = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (3.0 * (x1 * (3.0 + (x2 * 4.0))))))); tmp = 0.0; if (x1 <= -340000.0) tmp = t_0; elseif (x1 <= -4.9e-163) tmp = t_1; elseif (x1 <= 2.2e-211) tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))); elseif (x1 <= 140000.0) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(2.0 * x2), $MachinePrecision] * N[(-6.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 + N[(3.0 * N[(x1 * N[(3.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -340000.0], t$95$0, If[LessEqual[x1, -4.9e-163], t$95$1, If[LessEqual[x1, 2.2e-211], N[(x2 * N[(-6.0 + N[(N[(x1 * x2), $MachinePrecision] * N[(8.0 + N[(N[(x1 * x1), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 140000.0], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{x2 \cdot 8 + -18}{x1} - 3}{x1}\right)\right)\right)\\
t_1 := x2 \cdot -6 + x1 \cdot \left(\left(2 \cdot x2\right) \cdot \left(-6 + x2 \cdot 4\right) + \left(-1 + 3 \cdot \left(x1 \cdot \left(3 + x2 \cdot 4\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -340000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -4.9 \cdot 10^{-163}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 2.2 \cdot 10^{-211}:\\
\;\;\;\;x2 \cdot \left(-6 + \left(x1 \cdot x2\right) \cdot \left(8 + \left(x1 \cdot x1\right) \cdot -8\right)\right)\\
\mathbf{elif}\;x1 \leq 140000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -3.4e5 or 1.4e5 < x1 Initial program 34.4%
Simplified40.3%
Taylor expanded in x1 around 0
*-lowering-*.f6442.5%
Simplified42.5%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval96.1%
Simplified96.1%
if -3.4e5 < x1 < -4.9000000000000003e-163 or 2.19999999999999998e-211 < x1 < 1.4e5Initial program 99.2%
Simplified99.2%
Taylor expanded in x1 around 0
Simplified74.7%
Taylor expanded in x1 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.7%
Simplified88.7%
if -4.9000000000000003e-163 < x1 < 2.19999999999999998e-211Initial program 99.8%
Simplified99.8%
Taylor expanded in x1 around 0
Simplified61.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.3%
Simplified70.3%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6497.7%
Simplified97.7%
Final simplification94.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(*
(* (* x1 x1) (* x1 x1))
(+ 6.0 (/ (- (/ (+ -12.0 (* x2 8.0)) x1) 3.0) x1))))
(t_1
(+
(* x2 -6.0)
(*
x1
(+
(* (* 2.0 x2) (+ -6.0 (* x2 4.0)))
(+ -1.0 (* 3.0 (* x1 (+ 3.0 (* x2 4.0))))))))))
(if (<= x1 -490000.0)
t_0
(if (<= x1 -4.3e-164)
t_1
(if (<= x1 1.52e-211)
(* x2 (+ -6.0 (* (* x1 x2) (+ 8.0 (* (* x1 x1) -8.0)))))
(if (<= x1 280.0) t_1 t_0))))))
double code(double x1, double x2) {
double t_0 = ((x1 * x1) * (x1 * x1)) * (6.0 + ((((-12.0 + (x2 * 8.0)) / x1) - 3.0) / x1));
double t_1 = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (3.0 * (x1 * (3.0 + (x2 * 4.0)))))));
double tmp;
if (x1 <= -490000.0) {
tmp = t_0;
} else if (x1 <= -4.3e-164) {
tmp = t_1;
} else if (x1 <= 1.52e-211) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 280.0) {
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) * (x1 * x1)) * (6.0d0 + (((((-12.0d0) + (x2 * 8.0d0)) / x1) - 3.0d0) / x1))
t_1 = (x2 * (-6.0d0)) + (x1 * (((2.0d0 * x2) * ((-6.0d0) + (x2 * 4.0d0))) + ((-1.0d0) + (3.0d0 * (x1 * (3.0d0 + (x2 * 4.0d0)))))))
if (x1 <= (-490000.0d0)) then
tmp = t_0
else if (x1 <= (-4.3d-164)) then
tmp = t_1
else if (x1 <= 1.52d-211) then
tmp = x2 * ((-6.0d0) + ((x1 * x2) * (8.0d0 + ((x1 * x1) * (-8.0d0)))))
else if (x1 <= 280.0d0) 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) * (x1 * x1)) * (6.0 + ((((-12.0 + (x2 * 8.0)) / x1) - 3.0) / x1));
double t_1 = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (3.0 * (x1 * (3.0 + (x2 * 4.0)))))));
double tmp;
if (x1 <= -490000.0) {
tmp = t_0;
} else if (x1 <= -4.3e-164) {
tmp = t_1;
} else if (x1 <= 1.52e-211) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 280.0) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = ((x1 * x1) * (x1 * x1)) * (6.0 + ((((-12.0 + (x2 * 8.0)) / x1) - 3.0) / x1)) t_1 = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (3.0 * (x1 * (3.0 + (x2 * 4.0))))))) tmp = 0 if x1 <= -490000.0: tmp = t_0 elif x1 <= -4.3e-164: tmp = t_1 elif x1 <= 1.52e-211: tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))) elif x1 <= 280.0: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(Float64(x1 * x1) * Float64(x1 * x1)) * Float64(6.0 + Float64(Float64(Float64(Float64(-12.0 + Float64(x2 * 8.0)) / x1) - 3.0) / x1))) t_1 = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(Float64(Float64(2.0 * x2) * Float64(-6.0 + Float64(x2 * 4.0))) + Float64(-1.0 + Float64(3.0 * Float64(x1 * Float64(3.0 + Float64(x2 * 4.0)))))))) tmp = 0.0 if (x1 <= -490000.0) tmp = t_0; elseif (x1 <= -4.3e-164) tmp = t_1; elseif (x1 <= 1.52e-211) tmp = Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * x2) * Float64(8.0 + Float64(Float64(x1 * x1) * -8.0))))); elseif (x1 <= 280.0) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = ((x1 * x1) * (x1 * x1)) * (6.0 + ((((-12.0 + (x2 * 8.0)) / x1) - 3.0) / x1)); t_1 = (x2 * -6.0) + (x1 * (((2.0 * x2) * (-6.0 + (x2 * 4.0))) + (-1.0 + (3.0 * (x1 * (3.0 + (x2 * 4.0))))))); tmp = 0.0; if (x1 <= -490000.0) tmp = t_0; elseif (x1 <= -4.3e-164) tmp = t_1; elseif (x1 <= 1.52e-211) tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))); elseif (x1 <= 280.0) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(-12.0 + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(N[(N[(2.0 * x2), $MachinePrecision] * N[(-6.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 + N[(3.0 * N[(x1 * N[(3.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -490000.0], t$95$0, If[LessEqual[x1, -4.3e-164], t$95$1, If[LessEqual[x1, 1.52e-211], N[(x2 * N[(-6.0 + N[(N[(x1 * x2), $MachinePrecision] * N[(8.0 + N[(N[(x1 * x1), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 280.0], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(6 + \frac{\frac{-12 + x2 \cdot 8}{x1} - 3}{x1}\right)\\
t_1 := x2 \cdot -6 + x1 \cdot \left(\left(2 \cdot x2\right) \cdot \left(-6 + x2 \cdot 4\right) + \left(-1 + 3 \cdot \left(x1 \cdot \left(3 + x2 \cdot 4\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -490000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -4.3 \cdot 10^{-164}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 1.52 \cdot 10^{-211}:\\
\;\;\;\;x2 \cdot \left(-6 + \left(x1 \cdot x2\right) \cdot \left(8 + \left(x1 \cdot x1\right) \cdot -8\right)\right)\\
\mathbf{elif}\;x1 \leq 280:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.9e5 or 280 < x1 Initial program 34.4%
Simplified40.3%
Taylor expanded in x1 around 0
*-lowering-*.f6442.5%
Simplified42.5%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6442.4%
Applied egg-rr42.4%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified96.1%
if -4.9e5 < x1 < -4.2999999999999998e-164 or 1.52000000000000009e-211 < x1 < 280Initial program 99.2%
Simplified99.2%
Taylor expanded in x1 around 0
Simplified74.7%
Taylor expanded in x1 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.7%
Simplified88.7%
if -4.2999999999999998e-164 < x1 < 1.52000000000000009e-211Initial program 99.8%
Simplified99.8%
Taylor expanded in x1 around 0
Simplified61.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.3%
Simplified70.3%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6497.7%
Simplified97.7%
Final simplification94.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0)))
(if (<= x1 -7500000.0)
(+
x1
(+
(* x2 -6.0)
(*
t_0
(* (* x1 x1) (+ 6.0 (/ (- (/ (+ (* x2 8.0) -18.0) x1) 3.0) x1))))))
(if (<= x1 16000.0)
(+
(/ (* 3.0 (- (* x1 (* x1 3.0)) (+ x1 (* 2.0 x2)))) t_0)
(+ (+ x1 x1) (* 4.0 (* (+ (* 2.0 x2) -3.0) (* x1 x2)))))
(+
x1
(+
(* x2 -6.0)
(*
(- -1.0 (* x1 x1))
(*
(* x1 x1)
(-
(+ (/ 3.0 x1) (/ 18.0 (* x1 x1)))
(+ 6.0 (/ (* x2 8.0) (* x1 x1))))))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -7500000.0) {
tmp = x1 + ((x2 * -6.0) + (t_0 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
} else if (x1 <= 16000.0) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + ((x2 * -6.0) + ((-1.0 - (x1 * x1)) * ((x1 * x1) * (((3.0 / x1) + (18.0 / (x1 * x1))) - (6.0 + ((x2 * 8.0) / (x1 * 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) :: tmp
t_0 = (x1 * x1) + 1.0d0
if (x1 <= (-7500000.0d0)) then
tmp = x1 + ((x2 * (-6.0d0)) + (t_0 * ((x1 * x1) * (6.0d0 + (((((x2 * 8.0d0) + (-18.0d0)) / x1) - 3.0d0) / x1)))))
else if (x1 <= 16000.0d0) then
tmp = ((3.0d0 * ((x1 * (x1 * 3.0d0)) - (x1 + (2.0d0 * x2)))) / t_0) + ((x1 + x1) + (4.0d0 * (((2.0d0 * x2) + (-3.0d0)) * (x1 * x2))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (((-1.0d0) - (x1 * x1)) * ((x1 * x1) * (((3.0d0 / x1) + (18.0d0 / (x1 * x1))) - (6.0d0 + ((x2 * 8.0d0) / (x1 * x1)))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -7500000.0) {
tmp = x1 + ((x2 * -6.0) + (t_0 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))));
} else if (x1 <= 16000.0) {
tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2))));
} else {
tmp = x1 + ((x2 * -6.0) + ((-1.0 - (x1 * x1)) * ((x1 * x1) * (((3.0 / x1) + (18.0 / (x1 * x1))) - (6.0 + ((x2 * 8.0) / (x1 * x1)))))));
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -7500000.0: tmp = x1 + ((x2 * -6.0) + (t_0 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))) elif x1 <= 16000.0: tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))) else: tmp = x1 + ((x2 * -6.0) + ((-1.0 - (x1 * x1)) * ((x1 * x1) * (((3.0 / x1) + (18.0 / (x1 * x1))) - (6.0 + ((x2 * 8.0) / (x1 * x1))))))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -7500000.0) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(t_0 * Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(Float64(Float64(x2 * 8.0) + -18.0) / x1) - 3.0) / x1)))))); elseif (x1 <= 16000.0) tmp = Float64(Float64(Float64(3.0 * Float64(Float64(x1 * Float64(x1 * 3.0)) - Float64(x1 + Float64(2.0 * x2)))) / t_0) + Float64(Float64(x1 + x1) + Float64(4.0 * Float64(Float64(Float64(2.0 * x2) + -3.0) * Float64(x1 * x2))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(-1.0 - Float64(x1 * x1)) * Float64(Float64(x1 * x1) * Float64(Float64(Float64(3.0 / x1) + Float64(18.0 / Float64(x1 * x1))) - Float64(6.0 + Float64(Float64(x2 * 8.0) / Float64(x1 * x1)))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -7500000.0) tmp = x1 + ((x2 * -6.0) + (t_0 * ((x1 * x1) * (6.0 + (((((x2 * 8.0) + -18.0) / x1) - 3.0) / x1))))); elseif (x1 <= 16000.0) tmp = ((3.0 * ((x1 * (x1 * 3.0)) - (x1 + (2.0 * x2)))) / t_0) + ((x1 + x1) + (4.0 * (((2.0 * x2) + -3.0) * (x1 * x2)))); else tmp = x1 + ((x2 * -6.0) + ((-1.0 - (x1 * x1)) * ((x1 * x1) * (((3.0 / x1) + (18.0 / (x1 * x1))) - (6.0 + ((x2 * 8.0) / (x1 * x1))))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -7500000.0], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(N[(x2 * 8.0), $MachinePrecision] + -18.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 16000.0], N[(N[(N[(3.0 * N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] - N[(x1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] + N[(N[(x1 + x1), $MachinePrecision] + N[(4.0 * N[(N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision] * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(N[(3.0 / x1), $MachinePrecision] + N[(18.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(6.0 + N[(N[(x2 * 8.0), $MachinePrecision] / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -7500000:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{x2 \cdot 8 + -18}{x1} - 3}{x1}\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 16000:\\
\;\;\;\;\frac{3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right) - \left(x1 + 2 \cdot x2\right)\right)}{t\_0} + \left(\left(x1 + x1\right) + 4 \cdot \left(\left(2 \cdot x2 + -3\right) \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(-1 - x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\left(\frac{3}{x1} + \frac{18}{x1 \cdot x1}\right) - \left(6 + \frac{x2 \cdot 8}{x1 \cdot x1}\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -7.5e6Initial program 26.8%
Simplified39.1%
Taylor expanded in x1 around 0
*-lowering-*.f6441.8%
Simplified41.8%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval95.0%
Simplified95.0%
if -7.5e6 < x1 < 16000Initial program 99.4%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.7%
Simplified81.7%
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr97.6%
if 16000 < x1 Initial program 43.4%
Simplified41.8%
Taylor expanded in x1 around 0
*-lowering-*.f6443.4%
Simplified43.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6497.5%
Simplified97.5%
Final simplification96.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(*
(* (* x1 x1) (* x1 x1))
(+ 6.0 (/ (- (/ (+ -12.0 (* x2 8.0)) x1) 3.0) x1))))
(t_1
(+ (* x2 -6.0) (* x1 (+ -1.0 (* (* 2.0 x2) (+ -6.0 (* x2 4.0))))))))
(if (<= x1 -340000.0)
t_0
(if (<= x1 -7.2e-162)
t_1
(if (<= x1 3.3e-211)
(* x2 (+ -6.0 (* (* x1 x2) (+ 8.0 (* (* x1 x1) -8.0)))))
(if (<= x1 30000.0) t_1 t_0))))))
double code(double x1, double x2) {
double t_0 = ((x1 * x1) * (x1 * x1)) * (6.0 + ((((-12.0 + (x2 * 8.0)) / x1) - 3.0) / x1));
double t_1 = (x2 * -6.0) + (x1 * (-1.0 + ((2.0 * x2) * (-6.0 + (x2 * 4.0)))));
double tmp;
if (x1 <= -340000.0) {
tmp = t_0;
} else if (x1 <= -7.2e-162) {
tmp = t_1;
} else if (x1 <= 3.3e-211) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 30000.0) {
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) * (x1 * x1)) * (6.0d0 + (((((-12.0d0) + (x2 * 8.0d0)) / x1) - 3.0d0) / x1))
t_1 = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + ((2.0d0 * x2) * ((-6.0d0) + (x2 * 4.0d0)))))
if (x1 <= (-340000.0d0)) then
tmp = t_0
else if (x1 <= (-7.2d-162)) then
tmp = t_1
else if (x1 <= 3.3d-211) then
tmp = x2 * ((-6.0d0) + ((x1 * x2) * (8.0d0 + ((x1 * x1) * (-8.0d0)))))
else if (x1 <= 30000.0d0) 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) * (x1 * x1)) * (6.0 + ((((-12.0 + (x2 * 8.0)) / x1) - 3.0) / x1));
double t_1 = (x2 * -6.0) + (x1 * (-1.0 + ((2.0 * x2) * (-6.0 + (x2 * 4.0)))));
double tmp;
if (x1 <= -340000.0) {
tmp = t_0;
} else if (x1 <= -7.2e-162) {
tmp = t_1;
} else if (x1 <= 3.3e-211) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 30000.0) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = ((x1 * x1) * (x1 * x1)) * (6.0 + ((((-12.0 + (x2 * 8.0)) / x1) - 3.0) / x1)) t_1 = (x2 * -6.0) + (x1 * (-1.0 + ((2.0 * x2) * (-6.0 + (x2 * 4.0))))) tmp = 0 if x1 <= -340000.0: tmp = t_0 elif x1 <= -7.2e-162: tmp = t_1 elif x1 <= 3.3e-211: tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))) elif x1 <= 30000.0: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(Float64(x1 * x1) * Float64(x1 * x1)) * Float64(6.0 + Float64(Float64(Float64(Float64(-12.0 + Float64(x2 * 8.0)) / x1) - 3.0) / x1))) t_1 = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(Float64(2.0 * x2) * Float64(-6.0 + Float64(x2 * 4.0)))))) tmp = 0.0 if (x1 <= -340000.0) tmp = t_0; elseif (x1 <= -7.2e-162) tmp = t_1; elseif (x1 <= 3.3e-211) tmp = Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * x2) * Float64(8.0 + Float64(Float64(x1 * x1) * -8.0))))); elseif (x1 <= 30000.0) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = ((x1 * x1) * (x1 * x1)) * (6.0 + ((((-12.0 + (x2 * 8.0)) / x1) - 3.0) / x1)); t_1 = (x2 * -6.0) + (x1 * (-1.0 + ((2.0 * x2) * (-6.0 + (x2 * 4.0))))); tmp = 0.0; if (x1 <= -340000.0) tmp = t_0; elseif (x1 <= -7.2e-162) tmp = t_1; elseif (x1 <= 3.3e-211) tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))); elseif (x1 <= 30000.0) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(-12.0 + N[(x2 * 8.0), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(N[(2.0 * x2), $MachinePrecision] * N[(-6.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -340000.0], t$95$0, If[LessEqual[x1, -7.2e-162], t$95$1, If[LessEqual[x1, 3.3e-211], N[(x2 * N[(-6.0 + N[(N[(x1 * x2), $MachinePrecision] * N[(8.0 + N[(N[(x1 * x1), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 30000.0], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(6 + \frac{\frac{-12 + x2 \cdot 8}{x1} - 3}{x1}\right)\\
t_1 := x2 \cdot -6 + x1 \cdot \left(-1 + \left(2 \cdot x2\right) \cdot \left(-6 + x2 \cdot 4\right)\right)\\
\mathbf{if}\;x1 \leq -340000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -7.2 \cdot 10^{-162}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 3.3 \cdot 10^{-211}:\\
\;\;\;\;x2 \cdot \left(-6 + \left(x1 \cdot x2\right) \cdot \left(8 + \left(x1 \cdot x1\right) \cdot -8\right)\right)\\
\mathbf{elif}\;x1 \leq 30000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -3.4e5 or 3e4 < x1 Initial program 34.4%
Simplified40.3%
Taylor expanded in x1 around 0
*-lowering-*.f6442.5%
Simplified42.5%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6442.4%
Applied egg-rr42.4%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified96.1%
if -3.4e5 < x1 < -7.1999999999999996e-162 or 3.3000000000000002e-211 < x1 < 3e4Initial program 99.2%
Simplified99.2%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6487.9%
Simplified87.9%
if -7.1999999999999996e-162 < x1 < 3.3000000000000002e-211Initial program 99.8%
Simplified99.8%
Taylor expanded in x1 around 0
Simplified61.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.3%
Simplified70.3%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6497.7%
Simplified97.7%
Final simplification94.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+ (* x2 -6.0) (* x1 (+ -1.0 (* (* 2.0 x2) (+ -6.0 (* x2 4.0))))))))
(if (<= x1 -550000.0)
(+ x1 (- (* x2 -6.0) (* (* x1 6.0) (* x1 (- -1.0 (* x1 x1))))))
(if (<= x1 -4.3e-164)
t_0
(if (<= x1 1.52e-208)
(* x2 (+ -6.0 (* (* x1 x2) (+ 8.0 (* (* x1 x1) -8.0)))))
(if (<= x1 2000000.0)
t_0
(+ x1 (+ (* x2 -6.0) (* (+ (* x1 x1) 1.0) (* x1 (* x1 6.0)))))))))))
double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * (-1.0 + ((2.0 * x2) * (-6.0 + (x2 * 4.0)))));
double tmp;
if (x1 <= -550000.0) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= -4.3e-164) {
tmp = t_0;
} else if (x1 <= 1.52e-208) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 2000000.0) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * (x1 * (x1 * 6.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + ((2.0d0 * x2) * ((-6.0d0) + (x2 * 4.0d0)))))
if (x1 <= (-550000.0d0)) then
tmp = x1 + ((x2 * (-6.0d0)) - ((x1 * 6.0d0) * (x1 * ((-1.0d0) - (x1 * x1)))))
else if (x1 <= (-4.3d-164)) then
tmp = t_0
else if (x1 <= 1.52d-208) then
tmp = x2 * ((-6.0d0) + ((x1 * x2) * (8.0d0 + ((x1 * x1) * (-8.0d0)))))
else if (x1 <= 2000000.0d0) then
tmp = t_0
else
tmp = x1 + ((x2 * (-6.0d0)) + (((x1 * x1) + 1.0d0) * (x1 * (x1 * 6.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * -6.0) + (x1 * (-1.0 + ((2.0 * x2) * (-6.0 + (x2 * 4.0)))));
double tmp;
if (x1 <= -550000.0) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= -4.3e-164) {
tmp = t_0;
} else if (x1 <= 1.52e-208) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else if (x1 <= 2000000.0) {
tmp = t_0;
} else {
tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * (x1 * (x1 * 6.0))));
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * -6.0) + (x1 * (-1.0 + ((2.0 * x2) * (-6.0 + (x2 * 4.0))))) tmp = 0 if x1 <= -550000.0: tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))) elif x1 <= -4.3e-164: tmp = t_0 elif x1 <= 1.52e-208: tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))) elif x1 <= 2000000.0: tmp = t_0 else: tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * (x1 * (x1 * 6.0)))) return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(Float64(2.0 * x2) * Float64(-6.0 + Float64(x2 * 4.0)))))) tmp = 0.0 if (x1 <= -550000.0) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * 6.0) * Float64(x1 * Float64(-1.0 - Float64(x1 * x1)))))); elseif (x1 <= -4.3e-164) tmp = t_0; elseif (x1 <= 1.52e-208) tmp = Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * x2) * Float64(8.0 + Float64(Float64(x1 * x1) * -8.0))))); elseif (x1 <= 2000000.0) tmp = t_0; else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(x1 * Float64(x1 * 6.0))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * -6.0) + (x1 * (-1.0 + ((2.0 * x2) * (-6.0 + (x2 * 4.0))))); tmp = 0.0; if (x1 <= -550000.0) tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))); elseif (x1 <= -4.3e-164) tmp = t_0; elseif (x1 <= 1.52e-208) tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))); elseif (x1 <= 2000000.0) tmp = t_0; else tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * (x1 * (x1 * 6.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(N[(2.0 * x2), $MachinePrecision] * N[(-6.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -550000.0], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * 6.0), $MachinePrecision] * N[(x1 * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -4.3e-164], t$95$0, If[LessEqual[x1, 1.52e-208], N[(x2 * N[(-6.0 + N[(N[(x1 * x2), $MachinePrecision] * N[(8.0 + N[(N[(x1 * x1), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2000000.0], t$95$0, N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x2 \cdot -6 + x1 \cdot \left(-1 + \left(2 \cdot x2\right) \cdot \left(-6 + x2 \cdot 4\right)\right)\\
\mathbf{if}\;x1 \leq -550000:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(x1 \cdot 6\right) \cdot \left(x1 \cdot \left(-1 - x1 \cdot x1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq -4.3 \cdot 10^{-164}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.52 \cdot 10^{-208}:\\
\;\;\;\;x2 \cdot \left(-6 + \left(x1 \cdot x2\right) \cdot \left(8 + \left(x1 \cdot x1\right) \cdot -8\right)\right)\\
\mathbf{elif}\;x1 \leq 2000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 \cdot x1 + 1\right) \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -5.5e5Initial program 26.8%
Simplified39.1%
Taylor expanded in x1 around 0
*-lowering-*.f6441.8%
Simplified41.8%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.5%
Simplified93.5%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6493.5%
Applied egg-rr93.5%
if -5.5e5 < x1 < -4.2999999999999998e-164 or 1.52e-208 < x1 < 2e6Initial program 99.2%
Simplified99.2%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6487.9%
Simplified87.9%
if -4.2999999999999998e-164 < x1 < 1.52e-208Initial program 99.8%
Simplified99.8%
Taylor expanded in x1 around 0
Simplified61.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.3%
Simplified70.3%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6497.7%
Simplified97.7%
if 2e6 < x1 Initial program 43.4%
Simplified41.8%
Taylor expanded in x1 around 0
*-lowering-*.f6443.4%
Simplified43.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.2%
Simplified93.2%
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6493.2%
Applied egg-rr93.2%
Final simplification92.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 6.0 (* (* x1 x1) (* x1 x1)))) (t_1 (* 8.0 (* x1 (* x2 x2)))))
(if (<= x1 -108000000000.0)
t_0
(if (<= x1 -1.05e-69)
t_1
(if (<= x1 5.8e-86) (* x2 -6.0) (if (<= x1 205000.0) t_1 t_0))))))
double code(double x1, double x2) {
double t_0 = 6.0 * ((x1 * x1) * (x1 * x1));
double t_1 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -108000000000.0) {
tmp = t_0;
} else if (x1 <= -1.05e-69) {
tmp = t_1;
} else if (x1 <= 5.8e-86) {
tmp = x2 * -6.0;
} else if (x1 <= 205000.0) {
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 = 6.0d0 * ((x1 * x1) * (x1 * x1))
t_1 = 8.0d0 * (x1 * (x2 * x2))
if (x1 <= (-108000000000.0d0)) then
tmp = t_0
else if (x1 <= (-1.05d-69)) then
tmp = t_1
else if (x1 <= 5.8d-86) then
tmp = x2 * (-6.0d0)
else if (x1 <= 205000.0d0) 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 = 6.0 * ((x1 * x1) * (x1 * x1));
double t_1 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -108000000000.0) {
tmp = t_0;
} else if (x1 <= -1.05e-69) {
tmp = t_1;
} else if (x1 <= 5.8e-86) {
tmp = x2 * -6.0;
} else if (x1 <= 205000.0) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = 6.0 * ((x1 * x1) * (x1 * x1)) t_1 = 8.0 * (x1 * (x2 * x2)) tmp = 0 if x1 <= -108000000000.0: tmp = t_0 elif x1 <= -1.05e-69: tmp = t_1 elif x1 <= 5.8e-86: tmp = x2 * -6.0 elif x1 <= 205000.0: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))) t_1 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (x1 <= -108000000000.0) tmp = t_0; elseif (x1 <= -1.05e-69) tmp = t_1; elseif (x1 <= 5.8e-86) tmp = Float64(x2 * -6.0); elseif (x1 <= 205000.0) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = 6.0 * ((x1 * x1) * (x1 * x1)); t_1 = 8.0 * (x1 * (x2 * x2)); tmp = 0.0; if (x1 <= -108000000000.0) tmp = t_0; elseif (x1 <= -1.05e-69) tmp = t_1; elseif (x1 <= 5.8e-86) tmp = x2 * -6.0; elseif (x1 <= 205000.0) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -108000000000.0], t$95$0, If[LessEqual[x1, -1.05e-69], t$95$1, If[LessEqual[x1, 5.8e-86], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 205000.0], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
t_1 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -108000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.05 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 5.8 \cdot 10^{-86}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 205000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.08e11 or 205000 < x1 Initial program 34.4%
Simplified40.3%
Taylor expanded in x1 around 0
*-lowering-*.f6442.5%
Simplified42.5%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.4%
Simplified93.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.2%
Simplified93.2%
if -1.08e11 < x1 < -1.05e-69 or 5.7999999999999998e-86 < x1 < 205000Initial program 99.3%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6490.6%
Simplified90.6%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6460.4%
Simplified60.4%
if -1.05e-69 < x1 < 5.7999999999999998e-86Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
*-lowering-*.f6463.5%
Simplified63.5%
Final simplification79.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* x1 x1) 9.0)) (t_1 (* 8.0 (* x1 (* x2 x2)))))
(if (<= x1 -2.3e+68)
t_0
(if (<= x1 -9.6e-76)
t_1
(if (<= x1 1.45e-82) (* x2 -6.0) (if (<= x1 4.5e+153) t_1 t_0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double t_1 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -2.3e+68) {
tmp = t_0;
} else if (x1 <= -9.6e-76) {
tmp = t_1;
} else if (x1 <= 1.45e-82) {
tmp = x2 * -6.0;
} else if (x1 <= 4.5e+153) {
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) * 9.0d0
t_1 = 8.0d0 * (x1 * (x2 * x2))
if (x1 <= (-2.3d+68)) then
tmp = t_0
else if (x1 <= (-9.6d-76)) then
tmp = t_1
else if (x1 <= 1.45d-82) then
tmp = x2 * (-6.0d0)
else if (x1 <= 4.5d+153) 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) * 9.0;
double t_1 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -2.3e+68) {
tmp = t_0;
} else if (x1 <= -9.6e-76) {
tmp = t_1;
} else if (x1 <= 1.45e-82) {
tmp = x2 * -6.0;
} else if (x1 <= 4.5e+153) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) * 9.0 t_1 = 8.0 * (x1 * (x2 * x2)) tmp = 0 if x1 <= -2.3e+68: tmp = t_0 elif x1 <= -9.6e-76: tmp = t_1 elif x1 <= 1.45e-82: tmp = x2 * -6.0 elif x1 <= 4.5e+153: tmp = t_1 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) * 9.0) t_1 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (x1 <= -2.3e+68) tmp = t_0; elseif (x1 <= -9.6e-76) tmp = t_1; elseif (x1 <= 1.45e-82) tmp = Float64(x2 * -6.0); elseif (x1 <= 4.5e+153) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) * 9.0; t_1 = 8.0 * (x1 * (x2 * x2)); tmp = 0.0; if (x1 <= -2.3e+68) tmp = t_0; elseif (x1 <= -9.6e-76) tmp = t_1; elseif (x1 <= 1.45e-82) tmp = x2 * -6.0; elseif (x1 <= 4.5e+153) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]}, Block[{t$95$1 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -2.3e+68], t$95$0, If[LessEqual[x1, -9.6e-76], t$95$1, If[LessEqual[x1, 1.45e-82], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[x1, 4.5e+153], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x1 \cdot x1\right) \cdot 9\\
t_1 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -2.3 \cdot 10^{+68}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -9.6 \cdot 10^{-76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 1.45 \cdot 10^{-82}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -2.3e68 or 4.5000000000000001e153 < x1 Initial program 8.2%
Simplified19.6%
Taylor expanded in x1 around 0
Simplified50.1%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified57.3%
Taylor expanded in x1 around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6475.6%
Simplified75.6%
Taylor expanded in x2 around 0
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6481.7%
Simplified81.7%
if -2.3e68 < x1 < -9.60000000000000053e-76 or 1.44999999999999989e-82 < x1 < 4.5000000000000001e153Initial program 99.4%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6455.8%
Simplified55.8%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6443.2%
Simplified43.2%
if -9.60000000000000053e-76 < x1 < 1.44999999999999989e-82Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
*-lowering-*.f6463.5%
Simplified63.5%
Final simplification65.2%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -0.6)
(+ x1 (- (* x2 -6.0) (* (* x1 6.0) (* x1 (- -1.0 (* x1 x1))))))
(if (<= x1 520000000000.0)
(* x2 (+ -6.0 (* (* x1 x2) (+ 8.0 (* (* x1 x1) -8.0)))))
(+ x1 (+ (* x2 -6.0) (* (+ (* x1 x1) 1.0) (* x1 (* x1 6.0))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -0.6) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= 520000000000.0) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * (x1 * (x1 * 6.0))));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-0.6d0)) then
tmp = x1 + ((x2 * (-6.0d0)) - ((x1 * 6.0d0) * (x1 * ((-1.0d0) - (x1 * x1)))))
else if (x1 <= 520000000000.0d0) then
tmp = x2 * ((-6.0d0) + ((x1 * x2) * (8.0d0 + ((x1 * x1) * (-8.0d0)))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (((x1 * x1) + 1.0d0) * (x1 * (x1 * 6.0d0))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -0.6) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= 520000000000.0) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * (x1 * (x1 * 6.0))));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -0.6: tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))) elif x1 <= 520000000000.0: tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))) else: tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * (x1 * (x1 * 6.0)))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -0.6) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * 6.0) * Float64(x1 * Float64(-1.0 - Float64(x1 * x1)))))); elseif (x1 <= 520000000000.0) tmp = Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * x2) * Float64(8.0 + Float64(Float64(x1 * x1) * -8.0))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(x1 * Float64(x1 * 6.0))))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -0.6) tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))); elseif (x1 <= 520000000000.0) tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))); else tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * (x1 * (x1 * 6.0)))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -0.6], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * 6.0), $MachinePrecision] * N[(x1 * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 520000000000.0], N[(x2 * N[(-6.0 + N[(N[(x1 * x2), $MachinePrecision] * N[(8.0 + N[(N[(x1 * x1), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -0.6:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(x1 \cdot 6\right) \cdot \left(x1 \cdot \left(-1 - x1 \cdot x1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 520000000000:\\
\;\;\;\;x2 \cdot \left(-6 + \left(x1 \cdot x2\right) \cdot \left(8 + \left(x1 \cdot x1\right) \cdot -8\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 \cdot x1 + 1\right) \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -0.599999999999999978Initial program 29.7%
Simplified41.4%
Taylor expanded in x1 around 0
*-lowering-*.f6442.2%
Simplified42.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.2%
Simplified90.2%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6490.2%
Applied egg-rr90.2%
if -0.599999999999999978 < x1 < 5.2e11Initial program 99.5%
Simplified99.4%
Taylor expanded in x1 around 0
Simplified70.2%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.6%
Simplified62.6%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.7%
Simplified78.7%
if 5.2e11 < x1 Initial program 42.4%
Simplified40.8%
Taylor expanded in x1 around 0
*-lowering-*.f6442.4%
Simplified42.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.7%
Simplified94.7%
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6494.7%
Applied egg-rr94.7%
Final simplification86.0%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -0.6)
(+ x1 (- (* x2 -6.0) (* (* x1 6.0) (* x1 (- -1.0 (* x1 x1))))))
(if (<= x1 520000000000.0)
(* x2 (+ -6.0 (* (* x1 x2) (+ 8.0 (* (* x1 x1) -8.0)))))
(+ x1 (+ (* x2 -6.0) (* (+ (* x1 x1) 1.0) (* (* x1 x1) 6.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -0.6) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= 520000000000.0) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * 6.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-0.6d0)) then
tmp = x1 + ((x2 * (-6.0d0)) - ((x1 * 6.0d0) * (x1 * ((-1.0d0) - (x1 * x1)))))
else if (x1 <= 520000000000.0d0) then
tmp = x2 * ((-6.0d0) + ((x1 * x2) * (8.0d0 + ((x1 * x1) * (-8.0d0)))))
else
tmp = x1 + ((x2 * (-6.0d0)) + (((x1 * x1) + 1.0d0) * ((x1 * x1) * 6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -0.6) {
tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
} else if (x1 <= 520000000000.0) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else {
tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * 6.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -0.6: tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))) elif x1 <= 520000000000.0: tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))) else: tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * 6.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -0.6) tmp = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * 6.0) * Float64(x1 * Float64(-1.0 - Float64(x1 * x1)))))); elseif (x1 <= 520000000000.0) tmp = Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * x2) * Float64(8.0 + Float64(Float64(x1 * x1) * -8.0))))); else tmp = Float64(x1 + Float64(Float64(x2 * -6.0) + Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(Float64(x1 * x1) * 6.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -0.6) tmp = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))); elseif (x1 <= 520000000000.0) tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))); else tmp = x1 + ((x2 * -6.0) + (((x1 * x1) + 1.0) * ((x1 * x1) * 6.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -0.6], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * 6.0), $MachinePrecision] * N[(x1 * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 520000000000.0], N[(x2 * N[(-6.0 + N[(N[(x1 * x2), $MachinePrecision] * N[(8.0 + N[(N[(x1 * x1), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] + N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -0.6:\\
\;\;\;\;x1 + \left(x2 \cdot -6 - \left(x1 \cdot 6\right) \cdot \left(x1 \cdot \left(-1 - x1 \cdot x1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 520000000000:\\
\;\;\;\;x2 \cdot \left(-6 + \left(x1 \cdot x2\right) \cdot \left(8 + \left(x1 \cdot x1\right) \cdot -8\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x2 \cdot -6 + \left(x1 \cdot x1 + 1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\right)\\
\end{array}
\end{array}
if x1 < -0.599999999999999978Initial program 29.7%
Simplified41.4%
Taylor expanded in x1 around 0
*-lowering-*.f6442.2%
Simplified42.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6490.2%
Simplified90.2%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6490.2%
Applied egg-rr90.2%
if -0.599999999999999978 < x1 < 5.2e11Initial program 99.5%
Simplified99.4%
Taylor expanded in x1 around 0
Simplified70.2%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.6%
Simplified62.6%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.7%
Simplified78.7%
if 5.2e11 < x1 Initial program 42.4%
Simplified40.8%
Taylor expanded in x1 around 0
*-lowering-*.f6442.4%
Simplified42.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.7%
Simplified94.7%
Final simplification86.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (- (* x2 -6.0) (* (* x1 6.0) (* x1 (- -1.0 (* x1 x1))))))))
(if (<= x1 -0.6)
t_0
(if (<= x1 520000000000.0)
(* x2 (+ -6.0 (* (* x1 x2) (+ 8.0 (* (* x1 x1) -8.0)))))
t_0))))
double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
double tmp;
if (x1 <= -0.6) {
tmp = t_0;
} else if (x1 <= 520000000000.0) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + ((x2 * (-6.0d0)) - ((x1 * 6.0d0) * (x1 * ((-1.0d0) - (x1 * x1)))))
if (x1 <= (-0.6d0)) then
tmp = t_0
else if (x1 <= 520000000000.0d0) then
tmp = x2 * ((-6.0d0) + ((x1 * x2) * (8.0d0 + ((x1 * x1) * (-8.0d0)))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1)))));
double tmp;
if (x1 <= -0.6) {
tmp = t_0;
} else if (x1 <= 520000000000.0) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))) tmp = 0 if x1 <= -0.6: tmp = t_0 elif x1 <= 520000000000.0: tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x2 * -6.0) - Float64(Float64(x1 * 6.0) * Float64(x1 * Float64(-1.0 - Float64(x1 * x1)))))) tmp = 0.0 if (x1 <= -0.6) tmp = t_0; elseif (x1 <= 520000000000.0) tmp = Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * x2) * Float64(8.0 + Float64(Float64(x1 * x1) * -8.0))))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x2 * -6.0) - ((x1 * 6.0) * (x1 * (-1.0 - (x1 * x1))))); tmp = 0.0; if (x1 <= -0.6) tmp = t_0; elseif (x1 <= 520000000000.0) tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x2 * -6.0), $MachinePrecision] - N[(N[(x1 * 6.0), $MachinePrecision] * N[(x1 * N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -0.6], t$95$0, If[LessEqual[x1, 520000000000.0], N[(x2 * N[(-6.0 + N[(N[(x1 * x2), $MachinePrecision] * N[(8.0 + N[(N[(x1 * x1), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x2 \cdot -6 - \left(x1 \cdot 6\right) \cdot \left(x1 \cdot \left(-1 - x1 \cdot x1\right)\right)\right)\\
\mathbf{if}\;x1 \leq -0.6:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 520000000000:\\
\;\;\;\;x2 \cdot \left(-6 + \left(x1 \cdot x2\right) \cdot \left(8 + \left(x1 \cdot x1\right) \cdot -8\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -0.599999999999999978 or 5.2e11 < x1 Initial program 35.3%
Simplified41.1%
Taylor expanded in x1 around 0
*-lowering-*.f6442.3%
Simplified42.3%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.2%
Simplified92.2%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6492.2%
Applied egg-rr92.2%
if -0.599999999999999978 < x1 < 5.2e11Initial program 99.5%
Simplified99.4%
Taylor expanded in x1 around 0
Simplified70.2%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.6%
Simplified62.6%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.7%
Simplified78.7%
Final simplification86.0%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.4e-5)
(* (* (* x1 x1) (* x1 x1)) (+ 6.0 (/ 15.0 (* x1 x1))))
(if (<= x1 520000000000.0)
(* x2 (+ -6.0 (* (* x1 x2) (+ 8.0 (* (* x1 x1) -8.0)))))
(+ x1 (* (* x1 x1) (+ 6.0 (* (* x1 x1) 6.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.4e-5) {
tmp = ((x1 * x1) * (x1 * x1)) * (6.0 + (15.0 / (x1 * x1)));
} else if (x1 <= 520000000000.0) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else {
tmp = x1 + ((x1 * x1) * (6.0 + ((x1 * x1) * 6.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.4d-5)) then
tmp = ((x1 * x1) * (x1 * x1)) * (6.0d0 + (15.0d0 / (x1 * x1)))
else if (x1 <= 520000000000.0d0) then
tmp = x2 * ((-6.0d0) + ((x1 * x2) * (8.0d0 + ((x1 * x1) * (-8.0d0)))))
else
tmp = x1 + ((x1 * x1) * (6.0d0 + ((x1 * x1) * 6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.4e-5) {
tmp = ((x1 * x1) * (x1 * x1)) * (6.0 + (15.0 / (x1 * x1)));
} else if (x1 <= 520000000000.0) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else {
tmp = x1 + ((x1 * x1) * (6.0 + ((x1 * x1) * 6.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.4e-5: tmp = ((x1 * x1) * (x1 * x1)) * (6.0 + (15.0 / (x1 * x1))) elif x1 <= 520000000000.0: tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))) else: tmp = x1 + ((x1 * x1) * (6.0 + ((x1 * x1) * 6.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.4e-5) tmp = Float64(Float64(Float64(x1 * x1) * Float64(x1 * x1)) * Float64(6.0 + Float64(15.0 / Float64(x1 * x1)))); elseif (x1 <= 520000000000.0) tmp = Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * x2) * Float64(8.0 + Float64(Float64(x1 * x1) * -8.0))))); else tmp = Float64(x1 + Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(x1 * x1) * 6.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.4e-5) tmp = ((x1 * x1) * (x1 * x1)) * (6.0 + (15.0 / (x1 * x1))); elseif (x1 <= 520000000000.0) tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))); else tmp = x1 + ((x1 * x1) * (6.0 + ((x1 * x1) * 6.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.4e-5], N[(N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(6.0 + N[(15.0 / N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 520000000000.0], N[(x2 * N[(-6.0 + N[(N[(x1 * x2), $MachinePrecision] * N[(8.0 + N[(N[(x1 * x1), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.4 \cdot 10^{-5}:\\
\;\;\;\;\left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right) \cdot \left(6 + \frac{15}{x1 \cdot x1}\right)\\
\mathbf{elif}\;x1 \leq 520000000000:\\
\;\;\;\;x2 \cdot \left(-6 + \left(x1 \cdot x2\right) \cdot \left(8 + \left(x1 \cdot x1\right) \cdot -8\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot \left(6 + \left(x1 \cdot x1\right) \cdot 6\right)\\
\end{array}
\end{array}
if x1 < -1.39999999999999998e-5Initial program 30.5%
Simplified42.1%
Taylor expanded in x1 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified44.3%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.4%
Simplified89.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6489.0%
Simplified89.0%
if -1.39999999999999998e-5 < x1 < 5.2e11Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
Simplified70.0%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6463.1%
Simplified63.1%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6479.3%
Simplified79.3%
if 5.2e11 < x1 Initial program 42.4%
Simplified40.8%
Taylor expanded in x1 around 0
*-lowering-*.f6442.4%
Simplified42.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.7%
Simplified94.7%
Taylor expanded in x2 around 0
distribute-lft-inN/A
*-rgt-identityN/A
pow-sqrN/A
metadata-evalN/A
distribute-rgt-inN/A
metadata-evalN/A
pow-sqrN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.6%
Simplified94.6%
Final simplification85.9%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.4e-5)
(* 6.0 (* (* x1 x1) (* x1 x1)))
(if (<= x1 520000000000.0)
(* x2 (+ -6.0 (* (* x1 x2) (+ 8.0 (* (* x1 x1) -8.0)))))
(+ x1 (* (* x1 x1) (+ 6.0 (* (* x1 x1) 6.0)))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.4e-5) {
tmp = 6.0 * ((x1 * x1) * (x1 * x1));
} else if (x1 <= 520000000000.0) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else {
tmp = x1 + ((x1 * x1) * (6.0 + ((x1 * x1) * 6.0)));
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if (x1 <= (-1.4d-5)) then
tmp = 6.0d0 * ((x1 * x1) * (x1 * x1))
else if (x1 <= 520000000000.0d0) then
tmp = x2 * ((-6.0d0) + ((x1 * x2) * (8.0d0 + ((x1 * x1) * (-8.0d0)))))
else
tmp = x1 + ((x1 * x1) * (6.0d0 + ((x1 * x1) * 6.0d0)))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if (x1 <= -1.4e-5) {
tmp = 6.0 * ((x1 * x1) * (x1 * x1));
} else if (x1 <= 520000000000.0) {
tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0))));
} else {
tmp = x1 + ((x1 * x1) * (6.0 + ((x1 * x1) * 6.0)));
}
return tmp;
}
def code(x1, x2): tmp = 0 if x1 <= -1.4e-5: tmp = 6.0 * ((x1 * x1) * (x1 * x1)) elif x1 <= 520000000000.0: tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))) else: tmp = x1 + ((x1 * x1) * (6.0 + ((x1 * x1) * 6.0))) return tmp
function code(x1, x2) tmp = 0.0 if (x1 <= -1.4e-5) tmp = Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))); elseif (x1 <= 520000000000.0) tmp = Float64(x2 * Float64(-6.0 + Float64(Float64(x1 * x2) * Float64(8.0 + Float64(Float64(x1 * x1) * -8.0))))); else tmp = Float64(x1 + Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(x1 * x1) * 6.0)))); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if (x1 <= -1.4e-5) tmp = 6.0 * ((x1 * x1) * (x1 * x1)); elseif (x1 <= 520000000000.0) tmp = x2 * (-6.0 + ((x1 * x2) * (8.0 + ((x1 * x1) * -8.0)))); else tmp = x1 + ((x1 * x1) * (6.0 + ((x1 * x1) * 6.0))); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[x1, -1.4e-5], N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 520000000000.0], N[(x2 * N[(-6.0 + N[(N[(x1 * x2), $MachinePrecision] * N[(8.0 + N[(N[(x1 * x1), $MachinePrecision] * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.4 \cdot 10^{-5}:\\
\;\;\;\;6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{elif}\;x1 \leq 520000000000:\\
\;\;\;\;x2 \cdot \left(-6 + \left(x1 \cdot x2\right) \cdot \left(8 + \left(x1 \cdot x1\right) \cdot -8\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot \left(6 + \left(x1 \cdot x1\right) \cdot 6\right)\\
\end{array}
\end{array}
if x1 < -1.39999999999999998e-5Initial program 30.5%
Simplified42.1%
Taylor expanded in x1 around 0
*-lowering-*.f6441.7%
Simplified41.7%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.1%
Simplified89.1%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.9%
Simplified88.9%
if -1.39999999999999998e-5 < x1 < 5.2e11Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
Simplified70.0%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6463.1%
Simplified63.1%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6479.3%
Simplified79.3%
if 5.2e11 < x1 Initial program 42.4%
Simplified40.8%
Taylor expanded in x1 around 0
*-lowering-*.f6442.4%
Simplified42.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.7%
Simplified94.7%
Taylor expanded in x2 around 0
distribute-lft-inN/A
*-rgt-identityN/A
pow-sqrN/A
metadata-evalN/A
distribute-rgt-inN/A
metadata-evalN/A
pow-sqrN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6494.6%
Simplified94.6%
Final simplification85.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ x1 (* (* x1 x1) (+ 6.0 (* (* x1 x1) 6.0))))))
(if (<= x1 -6200000.0)
t_0
(if (<= x1 520.0) (+ (* x2 -6.0) (* x1 (* 8.0 (* x2 x2)))) t_0))))
double code(double x1, double x2) {
double t_0 = x1 + ((x1 * x1) * (6.0 + ((x1 * x1) * 6.0)));
double tmp;
if (x1 <= -6200000.0) {
tmp = t_0;
} else if (x1 <= 520.0) {
tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = x1 + ((x1 * x1) * (6.0d0 + ((x1 * x1) * 6.0d0)))
if (x1 <= (-6200000.0d0)) then
tmp = t_0
else if (x1 <= 520.0d0) then
tmp = (x2 * (-6.0d0)) + (x1 * (8.0d0 * (x2 * x2)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 + ((x1 * x1) * (6.0 + ((x1 * x1) * 6.0)));
double tmp;
if (x1 <= -6200000.0) {
tmp = t_0;
} else if (x1 <= 520.0) {
tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 + ((x1 * x1) * (6.0 + ((x1 * x1) * 6.0))) tmp = 0 if x1 <= -6200000.0: tmp = t_0 elif x1 <= 520.0: tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 + Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(x1 * x1) * 6.0)))) tmp = 0.0 if (x1 <= -6200000.0) tmp = t_0; elseif (x1 <= 520.0) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(8.0 * Float64(x2 * x2)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 + ((x1 * x1) * (6.0 + ((x1 * x1) * 6.0))); tmp = 0.0; if (x1 <= -6200000.0) tmp = t_0; elseif (x1 <= 520.0) tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6200000.0], t$95$0, If[LessEqual[x1, 520.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \left(x1 \cdot x1\right) \cdot \left(6 + \left(x1 \cdot x1\right) \cdot 6\right)\\
\mathbf{if}\;x1 \leq -6200000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 520:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(8 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -6.2e6 or 520 < x1 Initial program 34.4%
Simplified40.3%
Taylor expanded in x1 around 0
*-lowering-*.f6442.5%
Simplified42.5%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.4%
Simplified93.4%
Taylor expanded in x2 around 0
distribute-lft-inN/A
*-rgt-identityN/A
pow-sqrN/A
metadata-evalN/A
distribute-rgt-inN/A
metadata-evalN/A
pow-sqrN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.2%
Simplified93.2%
if -6.2e6 < x1 < 520Initial program 99.4%
Simplified99.4%
Taylor expanded in x1 around 0
Simplified69.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.6%
Simplified61.6%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.2%
Simplified62.2%
Final simplification78.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* 6.0 (* (* x1 x1) (* x1 x1)))))
(if (<= x1 -175000000.0)
t_0
(if (<= x1 45000.0) (+ (* x2 -6.0) (* x1 (* 8.0 (* x2 x2)))) t_0))))
double code(double x1, double x2) {
double t_0 = 6.0 * ((x1 * x1) * (x1 * x1));
double tmp;
if (x1 <= -175000000.0) {
tmp = t_0;
} else if (x1 <= 45000.0) {
tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = 6.0d0 * ((x1 * x1) * (x1 * x1))
if (x1 <= (-175000000.0d0)) then
tmp = t_0
else if (x1 <= 45000.0d0) then
tmp = (x2 * (-6.0d0)) + (x1 * (8.0d0 * (x2 * x2)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = 6.0 * ((x1 * x1) * (x1 * x1));
double tmp;
if (x1 <= -175000000.0) {
tmp = t_0;
} else if (x1 <= 45000.0) {
tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = 6.0 * ((x1 * x1) * (x1 * x1)) tmp = 0 if x1 <= -175000000.0: tmp = t_0 elif x1 <= 45000.0: tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(6.0 * Float64(Float64(x1 * x1) * Float64(x1 * x1))) tmp = 0.0 if (x1 <= -175000000.0) tmp = t_0; elseif (x1 <= 45000.0) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(8.0 * Float64(x2 * x2)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = 6.0 * ((x1 * x1) * (x1 * x1)); tmp = 0.0; if (x1 <= -175000000.0) tmp = t_0; elseif (x1 <= 45000.0) tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(6.0 * N[(N[(x1 * x1), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -175000000.0], t$95$0, If[LessEqual[x1, 45000.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 6 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)\\
\mathbf{if}\;x1 \leq -175000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 45000:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(8 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.75e8 or 45000 < x1 Initial program 34.4%
Simplified40.3%
Taylor expanded in x1 around 0
*-lowering-*.f6442.5%
Simplified42.5%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.4%
Simplified93.4%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6493.2%
Simplified93.2%
if -1.75e8 < x1 < 45000Initial program 99.4%
Simplified99.4%
Taylor expanded in x1 around 0
Simplified69.1%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.6%
Simplified61.6%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.2%
Simplified62.2%
Final simplification78.7%
(FPCore (x1 x2) :precision binary64 (let* ((t_0 (* (* x1 x1) 9.0))) (if (<= x1 -1.05e-33) t_0 (if (<= x1 1.15e-61) (* x2 -6.0) t_0))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double tmp;
if (x1 <= -1.05e-33) {
tmp = t_0;
} else if (x1 <= 1.15e-61) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: tmp
t_0 = (x1 * x1) * 9.0d0
if (x1 <= (-1.05d-33)) then
tmp = t_0
else if (x1 <= 1.15d-61) then
tmp = x2 * (-6.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double tmp;
if (x1 <= -1.05e-33) {
tmp = t_0;
} else if (x1 <= 1.15e-61) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) * 9.0 tmp = 0 if x1 <= -1.05e-33: tmp = t_0 elif x1 <= 1.15e-61: tmp = x2 * -6.0 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) * 9.0) tmp = 0.0 if (x1 <= -1.05e-33) tmp = t_0; elseif (x1 <= 1.15e-61) tmp = Float64(x2 * -6.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) * 9.0; tmp = 0.0; if (x1 <= -1.05e-33) tmp = t_0; elseif (x1 <= 1.15e-61) tmp = x2 * -6.0; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]}, If[LessEqual[x1, -1.05e-33], t$95$0, If[LessEqual[x1, 1.15e-61], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x1 \cdot x1\right) \cdot 9\\
\mathbf{if}\;x1 \leq -1.05 \cdot 10^{-33}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 1.15 \cdot 10^{-61}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.05e-33 or 1.14999999999999996e-61 < x1 Initial program 43.4%
Simplified48.5%
Taylor expanded in x1 around 0
Simplified39.6%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified36.1%
Taylor expanded in x1 around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6453.0%
Simplified53.0%
Taylor expanded in x2 around 0
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6452.2%
Simplified52.2%
if -1.05e-33 < x1 < 1.14999999999999996e-61Initial program 99.5%
Simplified99.5%
Taylor expanded in x1 around 0
*-lowering-*.f6460.7%
Simplified60.7%
Final simplification55.5%
(FPCore (x1 x2) :precision binary64 (* x2 -6.0))
double code(double x1, double x2) {
return x2 * -6.0;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = x2 * (-6.0d0)
end function
public static double code(double x1, double x2) {
return x2 * -6.0;
}
def code(x1, x2): return x2 * -6.0
function code(x1, x2) return Float64(x2 * -6.0) end
function tmp = code(x1, x2) tmp = x2 * -6.0; end
code[x1_, x2_] := N[(x2 * -6.0), $MachinePrecision]
\begin{array}{l}
\\
x2 \cdot -6
\end{array}
Initial program 64.9%
Simplified68.0%
Taylor expanded in x1 around 0
*-lowering-*.f6424.5%
Simplified24.5%
Final simplification24.5%
(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 64.9%
Simplified68.0%
Taylor expanded in x1 around 0
*-lowering-*.f6424.8%
Simplified24.8%
Taylor expanded in x1 around inf
Simplified3.2%
herbie shell --seed 2024150
(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))))))