
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (- -1.0 (* x1 x1)))
(t_4 (/ t_2 t_3))
(t_5 (/ t_2 t_0))
(t_6 (* x1 (+ (* x1 3.0) -1.0)))
(t_7 (+ (* 2.0 x2) t_6)))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_3
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_4)))
(* (* (* x1 2.0) t_5) (+ 3.0 t_4))))
(* t_1 t_5))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))
INFINITY)
(fma
3.0
(/ (+ (* x2 -2.0) t_6) t_0)
(+
(*
t_0
(+
(* (* x1 x1) -6.0)
(/ (* x1 (- (* x1 4.0) (- (/ t_7 (/ t_3 2.0)) -6.0))) (/ t_0 t_7))))
(* x1 (+ 2.0 (* x1 (- x1 (/ t_7 (/ t_3 3.0))))))))
(* 6.0 (pow x1 4.0)))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = -1.0 - (x1 * x1);
double t_4 = t_2 / t_3;
double t_5 = t_2 / t_0;
double t_6 = x1 * ((x1 * 3.0) + -1.0);
double t_7 = (2.0 * x2) + t_6;
double tmp;
if ((x1 + ((x1 + (((t_3 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * t_5) * (3.0 + t_4)))) + (t_1 * t_5)) + (x1 * (x1 * x1)))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)))) <= ((double) INFINITY)) {
tmp = fma(3.0, (((x2 * -2.0) + t_6) / t_0), ((t_0 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_7 / (t_3 / 2.0)) - -6.0))) / (t_0 / t_7)))) + (x1 * (2.0 + (x1 * (x1 - (t_7 / (t_3 / 3.0))))))));
} else {
tmp = 6.0 * pow(x1, 4.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(-1.0 - Float64(x1 * x1)) t_4 = Float64(t_2 / t_3) t_5 = Float64(t_2 / t_0) t_6 = Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0)) t_7 = Float64(Float64(2.0 * x2) + t_6) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_3 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4))) + Float64(Float64(Float64(x1 * 2.0) * t_5) * Float64(3.0 + t_4)))) + Float64(t_1 * t_5)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) <= Inf) tmp = fma(3.0, Float64(Float64(Float64(x2 * -2.0) + t_6) / t_0), Float64(Float64(t_0 * Float64(Float64(Float64(x1 * x1) * -6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 4.0) - Float64(Float64(t_7 / Float64(t_3 / 2.0)) - -6.0))) / Float64(t_0 / t_7)))) + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(x1 - Float64(t_7 / Float64(t_3 / 3.0)))))))); else tmp = Float64(6.0 * (x1 ^ 4.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(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[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 / t$95$0), $MachinePrecision]}, Block[{t$95$6 = N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(2.0 * x2), $MachinePrecision] + t$95$6), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$3 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$5), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$5), $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], Infinity], N[(3.0 * N[(N[(N[(x2 * -2.0), $MachinePrecision] + t$95$6), $MachinePrecision] / t$95$0), $MachinePrecision] + N[(N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * -6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 4.0), $MachinePrecision] - N[(N[(t$95$7 / N[(t$95$3 / 2.0), $MachinePrecision]), $MachinePrecision] - -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 / t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(2.0 + N[(x1 * N[(x1 - N[(t$95$7 / N[(t$95$3 / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := -1 - x1 \cdot x1\\
t_4 := \frac{t\_2}{t\_3}\\
t_5 := \frac{t\_2}{t\_0}\\
t_6 := x1 \cdot \left(x1 \cdot 3 + -1\right)\\
t_7 := 2 \cdot x2 + t\_6\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_3 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right) + \left(\left(x1 \cdot 2\right) \cdot t\_5\right) \cdot \left(3 + t\_4\right)\right) + t\_1 \cdot t\_5\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(3, \frac{x2 \cdot -2 + t\_6}{t\_0}, t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot -6 + \frac{x1 \cdot \left(x1 \cdot 4 - \left(\frac{t\_7}{\frac{t\_3}{2}} - -6\right)\right)}{\frac{t\_0}{t\_7}}\right) + x1 \cdot \left(2 + x1 \cdot \left(x1 - \frac{t\_7}{\frac{t\_3}{3}}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.2%
Simplified99.4%
Applied egg-rr99.5%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f64100.0%
Simplified100.0%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 3.0)))
(t_1 (- (+ t_0 (* 2.0 x2)) x1))
(t_2 (+ (* x1 x1) 1.0))
(t_3 (/ t_1 t_2))
(t_4 (* x1 (+ (* x1 3.0) -1.0)))
(t_5 (- -1.0 (* x1 x1)))
(t_6 (/ t_1 t_5))
(t_7 (+ (* 2.0 x2) t_4)))
(if (<=
(+
x1
(+
(+
x1
(+
(+
(*
t_5
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_6)))
(* (* (* x1 2.0) t_3) (+ 3.0 t_6))))
(* t_0 t_3))
(* x1 (* x1 x1))))
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))
INFINITY)
(+
(/ (* 3.0 (+ (* x2 -2.0) t_4)) t_2)
(+
(*
t_2
(+
(* x1 (* x1 -6.0))
(*
(/ t_7 t_2)
(+ (* x1 (+ -6.0 (* t_7 (/ 2.0 t_2)))) (* (* x1 x1) 4.0)))))
(* x1 (+ 2.0 (* x1 (+ x1 (* t_7 (/ 3.0 t_2))))))))
(* 6.0 (pow x1 4.0)))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = t_1 / t_2;
double t_4 = x1 * ((x1 * 3.0) + -1.0);
double t_5 = -1.0 - (x1 * x1);
double t_6 = t_1 / t_5;
double t_7 = (2.0 * x2) + t_4;
double tmp;
if ((x1 + ((x1 + (((t_5 * (((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * t_3) * (3.0 + t_6)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
tmp = ((3.0 * ((x2 * -2.0) + t_4)) / t_2) + ((t_2 * ((x1 * (x1 * -6.0)) + ((t_7 / t_2) * ((x1 * (-6.0 + (t_7 * (2.0 / t_2)))) + ((x1 * x1) * 4.0))))) + (x1 * (2.0 + (x1 * (x1 + (t_7 * (3.0 / t_2)))))));
} else {
tmp = 6.0 * pow(x1, 4.0);
}
return tmp;
}
public static double code(double x1, double x2) {
double t_0 = x1 * (x1 * 3.0);
double t_1 = (t_0 + (2.0 * x2)) - x1;
double t_2 = (x1 * x1) + 1.0;
double t_3 = t_1 / t_2;
double t_4 = x1 * ((x1 * 3.0) + -1.0);
double t_5 = -1.0 - (x1 * x1);
double t_6 = t_1 / t_5;
double t_7 = (2.0 * x2) + t_4;
double tmp;
if ((x1 + ((x1 + (((t_5 * (((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * t_3) * (3.0 + t_6)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)))) <= Double.POSITIVE_INFINITY) {
tmp = ((3.0 * ((x2 * -2.0) + t_4)) / t_2) + ((t_2 * ((x1 * (x1 * -6.0)) + ((t_7 / t_2) * ((x1 * (-6.0 + (t_7 * (2.0 / t_2)))) + ((x1 * x1) * 4.0))))) + (x1 * (2.0 + (x1 * (x1 + (t_7 * (3.0 / t_2)))))));
} else {
tmp = 6.0 * Math.pow(x1, 4.0);
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (x1 * 3.0) t_1 = (t_0 + (2.0 * x2)) - x1 t_2 = (x1 * x1) + 1.0 t_3 = t_1 / t_2 t_4 = x1 * ((x1 * 3.0) + -1.0) t_5 = -1.0 - (x1 * x1) t_6 = t_1 / t_5 t_7 = (2.0 * x2) + t_4 tmp = 0 if (x1 + ((x1 + (((t_5 * (((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * t_3) * (3.0 + t_6)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)))) <= math.inf: tmp = ((3.0 * ((x2 * -2.0) + t_4)) / t_2) + ((t_2 * ((x1 * (x1 * -6.0)) + ((t_7 / t_2) * ((x1 * (-6.0 + (t_7 * (2.0 / t_2)))) + ((x1 * x1) * 4.0))))) + (x1 * (2.0 + (x1 * (x1 + (t_7 * (3.0 / t_2))))))) else: tmp = 6.0 * math.pow(x1, 4.0) return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * 3.0)) t_1 = Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) t_2 = Float64(Float64(x1 * x1) + 1.0) t_3 = Float64(t_1 / t_2) t_4 = Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0)) t_5 = Float64(-1.0 - Float64(x1 * x1)) t_6 = Float64(t_1 / t_5) t_7 = Float64(Float64(2.0 * x2) + t_4) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(Float64(t_5 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_6))) + Float64(Float64(Float64(x1 * 2.0) * t_3) * Float64(3.0 + t_6)))) + Float64(t_0 * t_3)) + Float64(x1 * Float64(x1 * x1)))) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = Float64(Float64(Float64(3.0 * Float64(Float64(x2 * -2.0) + t_4)) / t_2) + Float64(Float64(t_2 * Float64(Float64(x1 * Float64(x1 * -6.0)) + Float64(Float64(t_7 / t_2) * Float64(Float64(x1 * Float64(-6.0 + Float64(t_7 * Float64(2.0 / t_2)))) + Float64(Float64(x1 * x1) * 4.0))))) + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(x1 + Float64(t_7 * Float64(3.0 / t_2)))))))); else tmp = Float64(6.0 * (x1 ^ 4.0)); end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (x1 * 3.0); t_1 = (t_0 + (2.0 * x2)) - x1; t_2 = (x1 * x1) + 1.0; t_3 = t_1 / t_2; t_4 = x1 * ((x1 * 3.0) + -1.0); t_5 = -1.0 - (x1 * x1); t_6 = t_1 / t_5; t_7 = (2.0 * x2) + t_4; tmp = 0.0; if ((x1 + ((x1 + (((t_5 * (((x1 * x1) * (6.0 + (4.0 * t_6))) + (((x1 * 2.0) * t_3) * (3.0 + t_6)))) + (t_0 * t_3)) + (x1 * (x1 * x1)))) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)))) <= Inf) tmp = ((3.0 * ((x2 * -2.0) + t_4)) / t_2) + ((t_2 * ((x1 * (x1 * -6.0)) + ((t_7 / t_2) * ((x1 * (-6.0 + (t_7 * (2.0 / t_2)))) + ((x1 * x1) * 4.0))))) + (x1 * (2.0 + (x1 * (x1 + (t_7 * (3.0 / t_2))))))); else tmp = 6.0 * (x1 ^ 4.0); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$1 / t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(N[(2.0 * x2), $MachinePrecision] + t$95$4), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(N[(t$95$5 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(3.0 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(3.0 * N[(N[(x2 * -2.0), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(N[(t$95$2 * N[(N[(x1 * N[(x1 * -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$7 / t$95$2), $MachinePrecision] * N[(N[(x1 * N[(-6.0 + N[(t$95$7 * N[(2.0 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(2.0 + N[(x1 * N[(x1 + N[(t$95$7 * N[(3.0 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot 3\right)\\
t_1 := \left(t\_0 + 2 \cdot x2\right) - x1\\
t_2 := x1 \cdot x1 + 1\\
t_3 := \frac{t\_1}{t\_2}\\
t_4 := x1 \cdot \left(x1 \cdot 3 + -1\right)\\
t_5 := -1 - x1 \cdot x1\\
t_6 := \frac{t\_1}{t\_5}\\
t_7 := 2 \cdot x2 + t\_4\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(\left(t\_5 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_6\right) + \left(\left(x1 \cdot 2\right) \cdot t\_3\right) \cdot \left(3 + t\_6\right)\right) + t\_0 \cdot t\_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;\frac{3 \cdot \left(x2 \cdot -2 + t\_4\right)}{t\_2} + \left(t\_2 \cdot \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{t\_7}{t\_2} \cdot \left(x1 \cdot \left(-6 + t\_7 \cdot \frac{2}{t\_2}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right) + x1 \cdot \left(2 + x1 \cdot \left(x1 + t\_7 \cdot \frac{3}{t\_2}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\end{array}
\end{array}
if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0Initial program 99.2%
Simplified99.4%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f64100.0%
Simplified100.0%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (+ (* x1 3.0) -1.0))
(t_2 (+ (* 2.0 x2) (* x1 t_1)))
(t_3 (* 6.0 (pow x1 4.0)))
(t_4 (- -1.0 (* x1 x1))))
(if (<= x1 -3.35e+112)
t_3
(if (<= x1 5.2e+38)
(+
(+
(*
t_0
(+
(* (* x1 x1) -6.0)
(/ (* x1 (- (* x1 4.0) (- (/ t_2 (/ t_4 2.0)) -6.0))) (/ t_0 t_2))))
(* x1 (+ 2.0 (* x1 (- x1 (/ t_2 (/ t_4 3.0)))))))
(/ (+ (* (* x1 3.0) t_1) (* x2 -6.0)) t_0))
t_3))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = (x1 * 3.0) + -1.0;
double t_2 = (2.0 * x2) + (x1 * t_1);
double t_3 = 6.0 * pow(x1, 4.0);
double t_4 = -1.0 - (x1 * x1);
double tmp;
if (x1 <= -3.35e+112) {
tmp = t_3;
} else if (x1 <= 5.2e+38) {
tmp = ((t_0 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_2 / (t_4 / 2.0)) - -6.0))) / (t_0 / t_2)))) + (x1 * (2.0 + (x1 * (x1 - (t_2 / (t_4 / 3.0))))))) + ((((x1 * 3.0) * t_1) + (x2 * -6.0)) / t_0);
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = (x1 * 3.0d0) + (-1.0d0)
t_2 = (2.0d0 * x2) + (x1 * t_1)
t_3 = 6.0d0 * (x1 ** 4.0d0)
t_4 = (-1.0d0) - (x1 * x1)
if (x1 <= (-3.35d+112)) then
tmp = t_3
else if (x1 <= 5.2d+38) then
tmp = ((t_0 * (((x1 * x1) * (-6.0d0)) + ((x1 * ((x1 * 4.0d0) - ((t_2 / (t_4 / 2.0d0)) - (-6.0d0)))) / (t_0 / t_2)))) + (x1 * (2.0d0 + (x1 * (x1 - (t_2 / (t_4 / 3.0d0))))))) + ((((x1 * 3.0d0) * t_1) + (x2 * (-6.0d0))) / t_0)
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = (x1 * 3.0) + -1.0;
double t_2 = (2.0 * x2) + (x1 * t_1);
double t_3 = 6.0 * Math.pow(x1, 4.0);
double t_4 = -1.0 - (x1 * x1);
double tmp;
if (x1 <= -3.35e+112) {
tmp = t_3;
} else if (x1 <= 5.2e+38) {
tmp = ((t_0 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_2 / (t_4 / 2.0)) - -6.0))) / (t_0 / t_2)))) + (x1 * (2.0 + (x1 * (x1 - (t_2 / (t_4 / 3.0))))))) + ((((x1 * 3.0) * t_1) + (x2 * -6.0)) / t_0);
} else {
tmp = t_3;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = (x1 * 3.0) + -1.0 t_2 = (2.0 * x2) + (x1 * t_1) t_3 = 6.0 * math.pow(x1, 4.0) t_4 = -1.0 - (x1 * x1) tmp = 0 if x1 <= -3.35e+112: tmp = t_3 elif x1 <= 5.2e+38: tmp = ((t_0 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_2 / (t_4 / 2.0)) - -6.0))) / (t_0 / t_2)))) + (x1 * (2.0 + (x1 * (x1 - (t_2 / (t_4 / 3.0))))))) + ((((x1 * 3.0) * t_1) + (x2 * -6.0)) / t_0) else: tmp = t_3 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(Float64(x1 * 3.0) + -1.0) t_2 = Float64(Float64(2.0 * x2) + Float64(x1 * t_1)) t_3 = Float64(6.0 * (x1 ^ 4.0)) t_4 = Float64(-1.0 - Float64(x1 * x1)) tmp = 0.0 if (x1 <= -3.35e+112) tmp = t_3; elseif (x1 <= 5.2e+38) tmp = Float64(Float64(Float64(t_0 * Float64(Float64(Float64(x1 * x1) * -6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 4.0) - Float64(Float64(t_2 / Float64(t_4 / 2.0)) - -6.0))) / Float64(t_0 / t_2)))) + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(x1 - Float64(t_2 / Float64(t_4 / 3.0))))))) + Float64(Float64(Float64(Float64(x1 * 3.0) * t_1) + Float64(x2 * -6.0)) / t_0)); else tmp = t_3; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = (x1 * 3.0) + -1.0; t_2 = (2.0 * x2) + (x1 * t_1); t_3 = 6.0 * (x1 ^ 4.0); t_4 = -1.0 - (x1 * x1); tmp = 0.0; if (x1 <= -3.35e+112) tmp = t_3; elseif (x1 <= 5.2e+38) tmp = ((t_0 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_2 / (t_4 / 2.0)) - -6.0))) / (t_0 / t_2)))) + (x1 * (2.0 + (x1 * (x1 - (t_2 / (t_4 / 3.0))))))) + ((((x1 * 3.0) * t_1) + (x2 * -6.0)) / t_0); else tmp = t_3; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * x2), $MachinePrecision] + N[(x1 * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.35e+112], t$95$3, If[LessEqual[x1, 5.2e+38], N[(N[(N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * -6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 4.0), $MachinePrecision] - N[(N[(t$95$2 / N[(t$95$4 / 2.0), $MachinePrecision]), $MachinePrecision] - -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(2.0 + N[(x1 * N[(x1 - N[(t$95$2 / N[(t$95$4 / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot 3 + -1\\
t_2 := 2 \cdot x2 + x1 \cdot t\_1\\
t_3 := 6 \cdot {x1}^{4}\\
t_4 := -1 - x1 \cdot x1\\
\mathbf{if}\;x1 \leq -3.35 \cdot 10^{+112}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 5.2 \cdot 10^{+38}:\\
\;\;\;\;\left(t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot -6 + \frac{x1 \cdot \left(x1 \cdot 4 - \left(\frac{t\_2}{\frac{t\_4}{2}} - -6\right)\right)}{\frac{t\_0}{t\_2}}\right) + x1 \cdot \left(2 + x1 \cdot \left(x1 - \frac{t\_2}{\frac{t\_4}{3}}\right)\right)\right) + \frac{\left(x1 \cdot 3\right) \cdot t\_1 + x2 \cdot -6}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x1 < -3.3499999999999999e112 or 5.1999999999999998e38 < x1 Initial program 26.9%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f64100.0%
Simplified100.0%
if -3.3499999999999999e112 < x1 < 5.1999999999999998e38Initial program 99.2%
Simplified99.3%
Applied egg-rr99.3%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* 2.0 x2) (* x1 (+ (* x1 3.0) -1.0))))
(t_1 (* 6.0 (pow x1 4.0)))
(t_2 (+ (* x1 x1) 1.0)))
(if (<= x1 -3.35e+112)
t_1
(if (<= x1 5.2e+38)
(+
(+ (* x2 -6.0) (* x1 -3.0))
(+
(*
t_2
(+
(* (* x1 x1) -6.0)
(/
(* x1 (- (* x1 4.0) (- (/ t_0 (/ (- -1.0 (* x1 x1)) 2.0)) -6.0)))
(/ t_2 t_0))))
(* x1 (+ 2.0 (* x1 (+ x1 9.0))))))
t_1))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double t_1 = 6.0 * pow(x1, 4.0);
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -3.35e+112) {
tmp = t_1;
} else if (x1 <= 5.2e+38) {
tmp = ((x2 * -6.0) + (x1 * -3.0)) + ((t_2 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_0 / ((-1.0 - (x1 * x1)) / 2.0)) - -6.0))) / (t_2 / t_0)))) + (x1 * (2.0 + (x1 * (x1 + 9.0)))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (2.0d0 * x2) + (x1 * ((x1 * 3.0d0) + (-1.0d0)))
t_1 = 6.0d0 * (x1 ** 4.0d0)
t_2 = (x1 * x1) + 1.0d0
if (x1 <= (-3.35d+112)) then
tmp = t_1
else if (x1 <= 5.2d+38) then
tmp = ((x2 * (-6.0d0)) + (x1 * (-3.0d0))) + ((t_2 * (((x1 * x1) * (-6.0d0)) + ((x1 * ((x1 * 4.0d0) - ((t_0 / (((-1.0d0) - (x1 * x1)) / 2.0d0)) - (-6.0d0)))) / (t_2 / t_0)))) + (x1 * (2.0d0 + (x1 * (x1 + 9.0d0)))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double t_1 = 6.0 * Math.pow(x1, 4.0);
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -3.35e+112) {
tmp = t_1;
} else if (x1 <= 5.2e+38) {
tmp = ((x2 * -6.0) + (x1 * -3.0)) + ((t_2 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_0 / ((-1.0 - (x1 * x1)) / 2.0)) - -6.0))) / (t_2 / t_0)))) + (x1 * (2.0 + (x1 * (x1 + 9.0)))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)) t_1 = 6.0 * math.pow(x1, 4.0) t_2 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -3.35e+112: tmp = t_1 elif x1 <= 5.2e+38: tmp = ((x2 * -6.0) + (x1 * -3.0)) + ((t_2 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_0 / ((-1.0 - (x1 * x1)) / 2.0)) - -6.0))) / (t_2 / t_0)))) + (x1 * (2.0 + (x1 * (x1 + 9.0))))) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) + Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))) t_1 = Float64(6.0 * (x1 ^ 4.0)) t_2 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -3.35e+112) tmp = t_1; elseif (x1 <= 5.2e+38) tmp = Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)) + Float64(Float64(t_2 * Float64(Float64(Float64(x1 * x1) * -6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 4.0) - Float64(Float64(t_0 / Float64(Float64(-1.0 - Float64(x1 * x1)) / 2.0)) - -6.0))) / Float64(t_2 / t_0)))) + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(x1 + 9.0)))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)); t_1 = 6.0 * (x1 ^ 4.0); t_2 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -3.35e+112) tmp = t_1; elseif (x1 <= 5.2e+38) tmp = ((x2 * -6.0) + (x1 * -3.0)) + ((t_2 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_0 / ((-1.0 - (x1 * x1)) / 2.0)) - -6.0))) / (t_2 / t_0)))) + (x1 * (2.0 + (x1 * (x1 + 9.0))))); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -3.35e+112], t$95$1, If[LessEqual[x1, 5.2e+38], N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * -6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 4.0), $MachinePrecision] - N[(N[(t$95$0 / N[(N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision] - -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(2.0 + N[(x1 * N[(x1 + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 + x1 \cdot \left(x1 \cdot 3 + -1\right)\\
t_1 := 6 \cdot {x1}^{4}\\
t_2 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -3.35 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 5.2 \cdot 10^{+38}:\\
\;\;\;\;\left(x2 \cdot -6 + x1 \cdot -3\right) + \left(t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot -6 + \frac{x1 \cdot \left(x1 \cdot 4 - \left(\frac{t\_0}{\frac{-1 - x1 \cdot x1}{2}} - -6\right)\right)}{\frac{t\_2}{t\_0}}\right) + x1 \cdot \left(2 + x1 \cdot \left(x1 + 9\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -3.3499999999999999e112 or 5.1999999999999998e38 < x1 Initial program 26.9%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
pow-lowering-pow.f64100.0%
Simplified100.0%
if -3.3499999999999999e112 < x1 < 5.1999999999999998e38Initial program 99.2%
Simplified99.3%
Applied egg-rr99.3%
Taylor expanded in x1 around inf
Simplified96.4%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6499.3%
Simplified99.3%
Final simplification99.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (+ -1.0 (* x1 9.0))))
(t_2 (+ (* 2.0 x2) (* x1 (+ (* x1 3.0) -1.0))))
(t_3
(+
9.0
(+
(*
t_0
(+
(* (* x1 x1) -6.0)
(/
(* x1 (- (* x1 4.0) (- (/ t_2 (/ (- -1.0 (* x1 x1)) 2.0)) -6.0)))
(/ t_0 t_2))))
(* x1 (+ 2.0 (* x1 (+ x1 9.0))))))))
(if (<= x1 -4.4e+116)
t_1
(if (<= x1 -0.058)
t_3
(if (<= x1 1.8e-5)
(+
(* x2 -6.0)
(+ t_1 (* x2 (+ (* x1 (+ (* x1 12.0) -12.0)) (* 8.0 (* x1 x2))))))
(if (<= x1 5e+153) t_3 t_1))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (-1.0 + (x1 * 9.0));
double t_2 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double t_3 = 9.0 + ((t_0 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_2 / ((-1.0 - (x1 * x1)) / 2.0)) - -6.0))) / (t_0 / t_2)))) + (x1 * (2.0 + (x1 * (x1 + 9.0)))));
double tmp;
if (x1 <= -4.4e+116) {
tmp = t_1;
} else if (x1 <= -0.058) {
tmp = t_3;
} else if (x1 <= 1.8e-5) {
tmp = (x2 * -6.0) + (t_1 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 5e+153) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * ((-1.0d0) + (x1 * 9.0d0))
t_2 = (2.0d0 * x2) + (x1 * ((x1 * 3.0d0) + (-1.0d0)))
t_3 = 9.0d0 + ((t_0 * (((x1 * x1) * (-6.0d0)) + ((x1 * ((x1 * 4.0d0) - ((t_2 / (((-1.0d0) - (x1 * x1)) / 2.0d0)) - (-6.0d0)))) / (t_0 / t_2)))) + (x1 * (2.0d0 + (x1 * (x1 + 9.0d0)))))
if (x1 <= (-4.4d+116)) then
tmp = t_1
else if (x1 <= (-0.058d0)) then
tmp = t_3
else if (x1 <= 1.8d-5) then
tmp = (x2 * (-6.0d0)) + (t_1 + (x2 * ((x1 * ((x1 * 12.0d0) + (-12.0d0))) + (8.0d0 * (x1 * x2)))))
else if (x1 <= 5d+153) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (-1.0 + (x1 * 9.0));
double t_2 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double t_3 = 9.0 + ((t_0 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_2 / ((-1.0 - (x1 * x1)) / 2.0)) - -6.0))) / (t_0 / t_2)))) + (x1 * (2.0 + (x1 * (x1 + 9.0)))));
double tmp;
if (x1 <= -4.4e+116) {
tmp = t_1;
} else if (x1 <= -0.058) {
tmp = t_3;
} else if (x1 <= 1.8e-5) {
tmp = (x2 * -6.0) + (t_1 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 5e+153) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (-1.0 + (x1 * 9.0)) t_2 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)) t_3 = 9.0 + ((t_0 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_2 / ((-1.0 - (x1 * x1)) / 2.0)) - -6.0))) / (t_0 / t_2)))) + (x1 * (2.0 + (x1 * (x1 + 9.0))))) tmp = 0 if x1 <= -4.4e+116: tmp = t_1 elif x1 <= -0.058: tmp = t_3 elif x1 <= 1.8e-5: tmp = (x2 * -6.0) + (t_1 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))) elif x1 <= 5e+153: tmp = t_3 else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) t_2 = Float64(Float64(2.0 * x2) + Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))) t_3 = Float64(9.0 + Float64(Float64(t_0 * Float64(Float64(Float64(x1 * x1) * -6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 4.0) - Float64(Float64(t_2 / Float64(Float64(-1.0 - Float64(x1 * x1)) / 2.0)) - -6.0))) / Float64(t_0 / t_2)))) + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(x1 + 9.0)))))) tmp = 0.0 if (x1 <= -4.4e+116) tmp = t_1; elseif (x1 <= -0.058) tmp = t_3; elseif (x1 <= 1.8e-5) tmp = Float64(Float64(x2 * -6.0) + Float64(t_1 + Float64(x2 * Float64(Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)) + Float64(8.0 * Float64(x1 * x2)))))); elseif (x1 <= 5e+153) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (-1.0 + (x1 * 9.0)); t_2 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)); t_3 = 9.0 + ((t_0 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_2 / ((-1.0 - (x1 * x1)) / 2.0)) - -6.0))) / (t_0 / t_2)))) + (x1 * (2.0 + (x1 * (x1 + 9.0))))); tmp = 0.0; if (x1 <= -4.4e+116) tmp = t_1; elseif (x1 <= -0.058) tmp = t_3; elseif (x1 <= 1.8e-5) tmp = (x2 * -6.0) + (t_1 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))); elseif (x1 <= 5e+153) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $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]}, Block[{t$95$3 = N[(9.0 + N[(N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * -6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 4.0), $MachinePrecision] - N[(N[(t$95$2 / N[(N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision] - -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(2.0 + N[(x1 * N[(x1 + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.4e+116], t$95$1, If[LessEqual[x1, -0.058], t$95$3, If[LessEqual[x1, 1.8e-5], N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$1 + N[(x2 * N[(N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+153], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
t_2 := 2 \cdot x2 + x1 \cdot \left(x1 \cdot 3 + -1\right)\\
t_3 := 9 + \left(t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot -6 + \frac{x1 \cdot \left(x1 \cdot 4 - \left(\frac{t\_2}{\frac{-1 - x1 \cdot x1}{2}} - -6\right)\right)}{\frac{t\_0}{t\_2}}\right) + x1 \cdot \left(2 + x1 \cdot \left(x1 + 9\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.4 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -0.058:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x1 \leq 1.8 \cdot 10^{-5}:\\
\;\;\;\;x2 \cdot -6 + \left(t\_1 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 12 + -12\right) + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.4e116 or 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
Simplified71.2%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6494.2%
Simplified94.2%
if -4.4e116 < x1 < -0.0580000000000000029 or 1.80000000000000005e-5 < x1 < 5.00000000000000018e153Initial program 99.2%
Simplified99.4%
Applied egg-rr99.2%
Taylor expanded in x1 around inf
Simplified96.8%
Taylor expanded in x1 around inf
Simplified96.8%
if -0.0580000000000000029 < x1 < 1.80000000000000005e-5Initial program 99.2%
Simplified99.3%
Taylor expanded in x1 around 0
Simplified87.6%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6498.6%
Simplified98.6%
Final simplification97.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* 2.0 x2) (* x1 (+ (* x1 3.0) -1.0))))
(t_1 (* x1 (+ -1.0 (* x1 9.0))))
(t_2 (+ (* x1 x1) 1.0)))
(if (<= x1 -1.2e+120)
t_1
(if (<= x1 5e+153)
(+
(+ (* x2 -6.0) (* x1 -3.0))
(+
(*
t_2
(+
(* (* x1 x1) -6.0)
(/
(* x1 (- (* x1 4.0) (- (/ t_0 (/ (- -1.0 (* x1 x1)) 2.0)) -6.0)))
(/ t_2 t_0))))
(* x1 (+ 2.0 (* x1 (+ x1 9.0))))))
t_1))))
double code(double x1, double x2) {
double t_0 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double t_1 = x1 * (-1.0 + (x1 * 9.0));
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -1.2e+120) {
tmp = t_1;
} else if (x1 <= 5e+153) {
tmp = ((x2 * -6.0) + (x1 * -3.0)) + ((t_2 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_0 / ((-1.0 - (x1 * x1)) / 2.0)) - -6.0))) / (t_2 / t_0)))) + (x1 * (2.0 + (x1 * (x1 + 9.0)))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (2.0d0 * x2) + (x1 * ((x1 * 3.0d0) + (-1.0d0)))
t_1 = x1 * ((-1.0d0) + (x1 * 9.0d0))
t_2 = (x1 * x1) + 1.0d0
if (x1 <= (-1.2d+120)) then
tmp = t_1
else if (x1 <= 5d+153) then
tmp = ((x2 * (-6.0d0)) + (x1 * (-3.0d0))) + ((t_2 * (((x1 * x1) * (-6.0d0)) + ((x1 * ((x1 * 4.0d0) - ((t_0 / (((-1.0d0) - (x1 * x1)) / 2.0d0)) - (-6.0d0)))) / (t_2 / t_0)))) + (x1 * (2.0d0 + (x1 * (x1 + 9.0d0)))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0));
double t_1 = x1 * (-1.0 + (x1 * 9.0));
double t_2 = (x1 * x1) + 1.0;
double tmp;
if (x1 <= -1.2e+120) {
tmp = t_1;
} else if (x1 <= 5e+153) {
tmp = ((x2 * -6.0) + (x1 * -3.0)) + ((t_2 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_0 / ((-1.0 - (x1 * x1)) / 2.0)) - -6.0))) / (t_2 / t_0)))) + (x1 * (2.0 + (x1 * (x1 + 9.0)))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)) t_1 = x1 * (-1.0 + (x1 * 9.0)) t_2 = (x1 * x1) + 1.0 tmp = 0 if x1 <= -1.2e+120: tmp = t_1 elif x1 <= 5e+153: tmp = ((x2 * -6.0) + (x1 * -3.0)) + ((t_2 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_0 / ((-1.0 - (x1 * x1)) / 2.0)) - -6.0))) / (t_2 / t_0)))) + (x1 * (2.0 + (x1 * (x1 + 9.0))))) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(2.0 * x2) + Float64(x1 * Float64(Float64(x1 * 3.0) + -1.0))) t_1 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) t_2 = Float64(Float64(x1 * x1) + 1.0) tmp = 0.0 if (x1 <= -1.2e+120) tmp = t_1; elseif (x1 <= 5e+153) tmp = Float64(Float64(Float64(x2 * -6.0) + Float64(x1 * -3.0)) + Float64(Float64(t_2 * Float64(Float64(Float64(x1 * x1) * -6.0) + Float64(Float64(x1 * Float64(Float64(x1 * 4.0) - Float64(Float64(t_0 / Float64(Float64(-1.0 - Float64(x1 * x1)) / 2.0)) - -6.0))) / Float64(t_2 / t_0)))) + Float64(x1 * Float64(2.0 + Float64(x1 * Float64(x1 + 9.0)))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (2.0 * x2) + (x1 * ((x1 * 3.0) + -1.0)); t_1 = x1 * (-1.0 + (x1 * 9.0)); t_2 = (x1 * x1) + 1.0; tmp = 0.0; if (x1 <= -1.2e+120) tmp = t_1; elseif (x1 <= 5e+153) tmp = ((x2 * -6.0) + (x1 * -3.0)) + ((t_2 * (((x1 * x1) * -6.0) + ((x1 * ((x1 * 4.0) - ((t_0 / ((-1.0 - (x1 * x1)) / 2.0)) - -6.0))) / (t_2 / t_0)))) + (x1 * (2.0 + (x1 * (x1 + 9.0))))); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x1, -1.2e+120], t$95$1, If[LessEqual[x1, 5e+153], N[(N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * -3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(N[(N[(x1 * x1), $MachinePrecision] * -6.0), $MachinePrecision] + N[(N[(x1 * N[(N[(x1 * 4.0), $MachinePrecision] - N[(N[(t$95$0 / N[(N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision] - -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(2.0 + N[(x1 * N[(x1 + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot x2 + x1 \cdot \left(x1 \cdot 3 + -1\right)\\
t_1 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
t_2 := x1 \cdot x1 + 1\\
\mathbf{if}\;x1 \leq -1.2 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;\left(x2 \cdot -6 + x1 \cdot -3\right) + \left(t\_2 \cdot \left(\left(x1 \cdot x1\right) \cdot -6 + \frac{x1 \cdot \left(x1 \cdot 4 - \left(\frac{t\_0}{\frac{-1 - x1 \cdot x1}{2}} - -6\right)\right)}{\frac{t\_2}{t\_0}}\right) + x1 \cdot \left(2 + x1 \cdot \left(x1 + 9\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -1.2e120 or 5.00000000000000018e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
Simplified71.2%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6494.2%
Simplified94.2%
if -1.2e120 < x1 < 5.00000000000000018e153Initial program 99.2%
Simplified99.4%
Applied egg-rr99.3%
Taylor expanded in x1 around inf
Simplified96.8%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6499.3%
Simplified99.3%
Final simplification98.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* x1 9.0))))
(t_1 (+ (* x1 x1) 1.0))
(t_2
(+
(/ (+ (* (* x1 3.0) (+ (* x1 3.0) -1.0)) (* x2 -6.0)) t_1)
(+
(* x1 (+ 2.0 (* x1 (+ x1 9.0))))
(*
t_1
(*
(* x1 x1)
(- 6.0 (/ (+ 4.0 (+ (/ (* x2 -8.0) x1) (/ 18.0 x1))) x1))))))))
(if (<= x1 -1.5e+117)
t_0
(if (<= x1 -1100000.0)
t_2
(if (<= x1 8600000000000.0)
(+
(* x2 -6.0)
(+ t_0 (* x2 (+ (* x1 (+ (* x1 12.0) -12.0)) (* 8.0 (* x1 x2))))))
(if (<= x1 1e+150) t_2 t_0))))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((((x1 * 3.0) * ((x1 * 3.0) + -1.0)) + (x2 * -6.0)) / t_1) + ((x1 * (2.0 + (x1 * (x1 + 9.0)))) + (t_1 * ((x1 * x1) * (6.0 - ((4.0 + (((x2 * -8.0) / x1) + (18.0 / x1))) / x1)))));
double tmp;
if (x1 <= -1.5e+117) {
tmp = t_0;
} else if (x1 <= -1100000.0) {
tmp = t_2;
} else if (x1 <= 8600000000000.0) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 1e+150) {
tmp = t_2;
} 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) :: tmp
t_0 = x1 * ((-1.0d0) + (x1 * 9.0d0))
t_1 = (x1 * x1) + 1.0d0
t_2 = ((((x1 * 3.0d0) * ((x1 * 3.0d0) + (-1.0d0))) + (x2 * (-6.0d0))) / t_1) + ((x1 * (2.0d0 + (x1 * (x1 + 9.0d0)))) + (t_1 * ((x1 * x1) * (6.0d0 - ((4.0d0 + (((x2 * (-8.0d0)) / x1) + (18.0d0 / x1))) / x1)))))
if (x1 <= (-1.5d+117)) then
tmp = t_0
else if (x1 <= (-1100000.0d0)) then
tmp = t_2
else if (x1 <= 8600000000000.0d0) then
tmp = (x2 * (-6.0d0)) + (t_0 + (x2 * ((x1 * ((x1 * 12.0d0) + (-12.0d0))) + (8.0d0 * (x1 * x2)))))
else if (x1 <= 1d+150) then
tmp = t_2
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((((x1 * 3.0) * ((x1 * 3.0) + -1.0)) + (x2 * -6.0)) / t_1) + ((x1 * (2.0 + (x1 * (x1 + 9.0)))) + (t_1 * ((x1 * x1) * (6.0 - ((4.0 + (((x2 * -8.0) / x1) + (18.0 / x1))) / x1)))));
double tmp;
if (x1 <= -1.5e+117) {
tmp = t_0;
} else if (x1 <= -1100000.0) {
tmp = t_2;
} else if (x1 <= 8600000000000.0) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 1e+150) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (x1 * 9.0)) t_1 = (x1 * x1) + 1.0 t_2 = ((((x1 * 3.0) * ((x1 * 3.0) + -1.0)) + (x2 * -6.0)) / t_1) + ((x1 * (2.0 + (x1 * (x1 + 9.0)))) + (t_1 * ((x1 * x1) * (6.0 - ((4.0 + (((x2 * -8.0) / x1) + (18.0 / x1))) / x1))))) tmp = 0 if x1 <= -1.5e+117: tmp = t_0 elif x1 <= -1100000.0: tmp = t_2 elif x1 <= 8600000000000.0: tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))) elif x1 <= 1e+150: tmp = t_2 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(Float64(Float64(x1 * 3.0) * Float64(Float64(x1 * 3.0) + -1.0)) + Float64(x2 * -6.0)) / t_1) + Float64(Float64(x1 * Float64(2.0 + Float64(x1 * Float64(x1 + 9.0)))) + Float64(t_1 * Float64(Float64(x1 * x1) * Float64(6.0 - Float64(Float64(4.0 + Float64(Float64(Float64(x2 * -8.0) / x1) + Float64(18.0 / x1))) / x1)))))) tmp = 0.0 if (x1 <= -1.5e+117) tmp = t_0; elseif (x1 <= -1100000.0) tmp = t_2; elseif (x1 <= 8600000000000.0) tmp = Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)) + Float64(8.0 * Float64(x1 * x2)))))); elseif (x1 <= 1e+150) tmp = t_2; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (x1 * 9.0)); t_1 = (x1 * x1) + 1.0; t_2 = ((((x1 * 3.0) * ((x1 * 3.0) + -1.0)) + (x2 * -6.0)) / t_1) + ((x1 * (2.0 + (x1 * (x1 + 9.0)))) + (t_1 * ((x1 * x1) * (6.0 - ((4.0 + (((x2 * -8.0) / x1) + (18.0 / x1))) / x1))))); tmp = 0.0; if (x1 <= -1.5e+117) tmp = t_0; elseif (x1 <= -1100000.0) tmp = t_2; elseif (x1 <= 8600000000000.0) tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))); elseif (x1 <= 1e+150) tmp = t_2; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(x1 * N[(2.0 + N[(x1 * N[(x1 + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 - N[(N[(4.0 + N[(N[(N[(x2 * -8.0), $MachinePrecision] / x1), $MachinePrecision] + N[(18.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.5e+117], t$95$0, If[LessEqual[x1, -1100000.0], t$95$2, If[LessEqual[x1, 8600000000000.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+150], t$95$2, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(x1 \cdot 3\right) \cdot \left(x1 \cdot 3 + -1\right) + x2 \cdot -6}{t\_1} + \left(x1 \cdot \left(2 + x1 \cdot \left(x1 + 9\right)\right) + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 - \frac{4 + \left(\frac{x2 \cdot -8}{x1} + \frac{18}{x1}\right)}{x1}\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+117}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1100000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq 8600000000000:\\
\;\;\;\;x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 12 + -12\right) + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{+150}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.5e117 or 9.99999999999999981e149 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
Simplified71.2%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6494.2%
Simplified94.2%
if -1.5e117 < x1 < -1.1e6 or 8.6e12 < x1 < 9.99999999999999981e149Initial program 99.2%
Simplified99.5%
Applied egg-rr99.3%
Taylor expanded in x1 around inf
Simplified99.3%
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
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6494.7%
Simplified94.7%
if -1.1e6 < x1 < 8.6e12Initial program 99.2%
Simplified99.3%
Taylor expanded in x1 around 0
Simplified85.1%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.4%
Simplified95.4%
Final simplification95.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* x1 9.0))))
(t_1 (+ (* x1 x1) 1.0))
(t_2
(-
(/ (+ (* (* x1 3.0) (+ (* x1 3.0) -1.0)) (* x2 -6.0)) t_1)
(-
(* t_1 (* (* x1 x1) (- (/ 4.0 x1) 6.0)))
(* x1 (+ 2.0 (* x1 (+ x1 9.0))))))))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -5.7e+102)
(*
x2
(+
(* x1 (+ -12.0 (* x1 16.0)))
(- -6.0 (/ (* x1 (- 1.0 (* x1 9.0))) x2))))
(if (<= x1 -1100000.0)
t_2
(if (<= x1 8600000000000.0)
(+
(* x2 -6.0)
(+ t_0 (* x2 (+ (* x1 (+ (* x1 12.0) -12.0)) (* 8.0 (* x1 x2))))))
(if (<= x1 1e+150) t_2 t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((((x1 * 3.0) * ((x1 * 3.0) + -1.0)) + (x2 * -6.0)) / t_1) - ((t_1 * ((x1 * x1) * ((4.0 / x1) - 6.0))) - (x1 * (2.0 + (x1 * (x1 + 9.0)))));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -5.7e+102) {
tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2)));
} else if (x1 <= -1100000.0) {
tmp = t_2;
} else if (x1 <= 8600000000000.0) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 1e+150) {
tmp = t_2;
} 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) :: tmp
t_0 = x1 * ((-1.0d0) + (x1 * 9.0d0))
t_1 = (x1 * x1) + 1.0d0
t_2 = ((((x1 * 3.0d0) * ((x1 * 3.0d0) + (-1.0d0))) + (x2 * (-6.0d0))) / t_1) - ((t_1 * ((x1 * x1) * ((4.0d0 / x1) - 6.0d0))) - (x1 * (2.0d0 + (x1 * (x1 + 9.0d0)))))
if (x1 <= (-4.5d+153)) then
tmp = t_0
else if (x1 <= (-5.7d+102)) then
tmp = x2 * ((x1 * ((-12.0d0) + (x1 * 16.0d0))) + ((-6.0d0) - ((x1 * (1.0d0 - (x1 * 9.0d0))) / x2)))
else if (x1 <= (-1100000.0d0)) then
tmp = t_2
else if (x1 <= 8600000000000.0d0) then
tmp = (x2 * (-6.0d0)) + (t_0 + (x2 * ((x1 * ((x1 * 12.0d0) + (-12.0d0))) + (8.0d0 * (x1 * x2)))))
else if (x1 <= 1d+150) then
tmp = t_2
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((((x1 * 3.0) * ((x1 * 3.0) + -1.0)) + (x2 * -6.0)) / t_1) - ((t_1 * ((x1 * x1) * ((4.0 / x1) - 6.0))) - (x1 * (2.0 + (x1 * (x1 + 9.0)))));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -5.7e+102) {
tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2)));
} else if (x1 <= -1100000.0) {
tmp = t_2;
} else if (x1 <= 8600000000000.0) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 1e+150) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (x1 * 9.0)) t_1 = (x1 * x1) + 1.0 t_2 = ((((x1 * 3.0) * ((x1 * 3.0) + -1.0)) + (x2 * -6.0)) / t_1) - ((t_1 * ((x1 * x1) * ((4.0 / x1) - 6.0))) - (x1 * (2.0 + (x1 * (x1 + 9.0))))) tmp = 0 if x1 <= -4.5e+153: tmp = t_0 elif x1 <= -5.7e+102: tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2))) elif x1 <= -1100000.0: tmp = t_2 elif x1 <= 8600000000000.0: tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))) elif x1 <= 1e+150: tmp = t_2 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(Float64(Float64(x1 * 3.0) * Float64(Float64(x1 * 3.0) + -1.0)) + Float64(x2 * -6.0)) / t_1) - Float64(Float64(t_1 * Float64(Float64(x1 * x1) * Float64(Float64(4.0 / x1) - 6.0))) - Float64(x1 * Float64(2.0 + Float64(x1 * Float64(x1 + 9.0)))))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -5.7e+102) tmp = Float64(x2 * Float64(Float64(x1 * Float64(-12.0 + Float64(x1 * 16.0))) + Float64(-6.0 - Float64(Float64(x1 * Float64(1.0 - Float64(x1 * 9.0))) / x2)))); elseif (x1 <= -1100000.0) tmp = t_2; elseif (x1 <= 8600000000000.0) tmp = Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)) + Float64(8.0 * Float64(x1 * x2)))))); elseif (x1 <= 1e+150) tmp = t_2; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (x1 * 9.0)); t_1 = (x1 * x1) + 1.0; t_2 = ((((x1 * 3.0) * ((x1 * 3.0) + -1.0)) + (x2 * -6.0)) / t_1) - ((t_1 * ((x1 * x1) * ((4.0 / x1) - 6.0))) - (x1 * (2.0 + (x1 * (x1 + 9.0))))); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -5.7e+102) tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2))); elseif (x1 <= -1100000.0) tmp = t_2; elseif (x1 <= 8600000000000.0) tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))); elseif (x1 <= 1e+150) tmp = t_2; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] - N[(N[(t$95$1 * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 / x1), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x1 * N[(2.0 + N[(x1 * N[(x1 + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$0, If[LessEqual[x1, -5.7e+102], N[(x2 * N[(N[(x1 * N[(-12.0 + N[(x1 * 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-6.0 - N[(N[(x1 * N[(1.0 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1100000.0], t$95$2, If[LessEqual[x1, 8600000000000.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+150], t$95$2, t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(x1 \cdot 3\right) \cdot \left(x1 \cdot 3 + -1\right) + x2 \cdot -6}{t\_1} - \left(t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{4}{x1} - 6\right)\right) - x1 \cdot \left(2 + x1 \cdot \left(x1 + 9\right)\right)\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -5.7 \cdot 10^{+102}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot \left(-12 + x1 \cdot 16\right) + \left(-6 - \frac{x1 \cdot \left(1 - x1 \cdot 9\right)}{x2}\right)\right)\\
\mathbf{elif}\;x1 \leq -1100000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq 8600000000000:\\
\;\;\;\;x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 12 + -12\right) + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{+150}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 9.99999999999999981e149 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
Simplified74.1%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
if -4.5000000000000001e153 < x1 < -5.6999999999999999e102Initial program 20.0%
Simplified20.0%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6420.0%
Simplified20.0%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified63.2%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
if -5.6999999999999999e102 < x1 < -1.1e6 or 8.6e12 < x1 < 9.99999999999999981e149Initial program 99.2%
Simplified99.5%
Applied egg-rr99.2%
Taylor expanded in x1 around inf
Simplified99.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6488.3%
Simplified88.3%
if -1.1e6 < x1 < 8.6e12Initial program 99.2%
Simplified99.3%
Taylor expanded in x1 around 0
Simplified85.1%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.4%
Simplified95.4%
Final simplification95.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* x1 9.0))))
(t_1 (+ (* x1 x1) 1.0))
(t_2
(+
(/ (+ (* (* x1 3.0) (+ (* x1 3.0) -1.0)) (* x2 -6.0)) t_1)
(+ (* x1 (+ 2.0 (* x1 (+ x1 9.0)))) (* t_1 (* (* x1 x1) 6.0))))))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -5.7e+102)
(*
x2
(+
(* x1 (+ -12.0 (* x1 16.0)))
(- -6.0 (/ (* x1 (- 1.0 (* x1 9.0))) x2))))
(if (<= x1 -1100000.0)
t_2
(if (<= x1 14000000000000.0)
(+
(* x2 -6.0)
(+ t_0 (* x2 (+ (* x1 (+ (* x1 12.0) -12.0)) (* 8.0 (* x1 x2))))))
(if (<= x1 1e+150) t_2 t_0)))))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((((x1 * 3.0) * ((x1 * 3.0) + -1.0)) + (x2 * -6.0)) / t_1) + ((x1 * (2.0 + (x1 * (x1 + 9.0)))) + (t_1 * ((x1 * x1) * 6.0)));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -5.7e+102) {
tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2)));
} else if (x1 <= -1100000.0) {
tmp = t_2;
} else if (x1 <= 14000000000000.0) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 1e+150) {
tmp = t_2;
} 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) :: tmp
t_0 = x1 * ((-1.0d0) + (x1 * 9.0d0))
t_1 = (x1 * x1) + 1.0d0
t_2 = ((((x1 * 3.0d0) * ((x1 * 3.0d0) + (-1.0d0))) + (x2 * (-6.0d0))) / t_1) + ((x1 * (2.0d0 + (x1 * (x1 + 9.0d0)))) + (t_1 * ((x1 * x1) * 6.0d0)))
if (x1 <= (-4.5d+153)) then
tmp = t_0
else if (x1 <= (-5.7d+102)) then
tmp = x2 * ((x1 * ((-12.0d0) + (x1 * 16.0d0))) + ((-6.0d0) - ((x1 * (1.0d0 - (x1 * 9.0d0))) / x2)))
else if (x1 <= (-1100000.0d0)) then
tmp = t_2
else if (x1 <= 14000000000000.0d0) then
tmp = (x2 * (-6.0d0)) + (t_0 + (x2 * ((x1 * ((x1 * 12.0d0) + (-12.0d0))) + (8.0d0 * (x1 * x2)))))
else if (x1 <= 1d+150) then
tmp = t_2
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((((x1 * 3.0) * ((x1 * 3.0) + -1.0)) + (x2 * -6.0)) / t_1) + ((x1 * (2.0 + (x1 * (x1 + 9.0)))) + (t_1 * ((x1 * x1) * 6.0)));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -5.7e+102) {
tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2)));
} else if (x1 <= -1100000.0) {
tmp = t_2;
} else if (x1 <= 14000000000000.0) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 1e+150) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (x1 * 9.0)) t_1 = (x1 * x1) + 1.0 t_2 = ((((x1 * 3.0) * ((x1 * 3.0) + -1.0)) + (x2 * -6.0)) / t_1) + ((x1 * (2.0 + (x1 * (x1 + 9.0)))) + (t_1 * ((x1 * x1) * 6.0))) tmp = 0 if x1 <= -4.5e+153: tmp = t_0 elif x1 <= -5.7e+102: tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2))) elif x1 <= -1100000.0: tmp = t_2 elif x1 <= 14000000000000.0: tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))) elif x1 <= 1e+150: tmp = t_2 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(Float64(Float64(x1 * 3.0) * Float64(Float64(x1 * 3.0) + -1.0)) + Float64(x2 * -6.0)) / t_1) + Float64(Float64(x1 * Float64(2.0 + Float64(x1 * Float64(x1 + 9.0)))) + Float64(t_1 * Float64(Float64(x1 * x1) * 6.0)))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -5.7e+102) tmp = Float64(x2 * Float64(Float64(x1 * Float64(-12.0 + Float64(x1 * 16.0))) + Float64(-6.0 - Float64(Float64(x1 * Float64(1.0 - Float64(x1 * 9.0))) / x2)))); elseif (x1 <= -1100000.0) tmp = t_2; elseif (x1 <= 14000000000000.0) tmp = Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)) + Float64(8.0 * Float64(x1 * x2)))))); elseif (x1 <= 1e+150) tmp = t_2; else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (x1 * 9.0)); t_1 = (x1 * x1) + 1.0; t_2 = ((((x1 * 3.0) * ((x1 * 3.0) + -1.0)) + (x2 * -6.0)) / t_1) + ((x1 * (2.0 + (x1 * (x1 + 9.0)))) + (t_1 * ((x1 * x1) * 6.0))); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -5.7e+102) tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2))); elseif (x1 <= -1100000.0) tmp = t_2; elseif (x1 <= 14000000000000.0) tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))); elseif (x1 <= 1e+150) tmp = t_2; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x1 * 3.0), $MachinePrecision] * N[(N[(x1 * 3.0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(x1 * N[(2.0 + N[(x1 * N[(x1 + 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$0, If[LessEqual[x1, -5.7e+102], N[(x2 * N[(N[(x1 * N[(-12.0 + N[(x1 * 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-6.0 - N[(N[(x1 * N[(1.0 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1100000.0], t$95$2, If[LessEqual[x1, 14000000000000.0], N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1e+150], t$95$2, t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(x1 \cdot 3\right) \cdot \left(x1 \cdot 3 + -1\right) + x2 \cdot -6}{t\_1} + \left(x1 \cdot \left(2 + x1 \cdot \left(x1 + 9\right)\right) + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot 6\right)\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -5.7 \cdot 10^{+102}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot \left(-12 + x1 \cdot 16\right) + \left(-6 - \frac{x1 \cdot \left(1 - x1 \cdot 9\right)}{x2}\right)\right)\\
\mathbf{elif}\;x1 \leq -1100000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x1 \leq 14000000000000:\\
\;\;\;\;x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 12 + -12\right) + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 10^{+150}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 9.99999999999999981e149 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
Simplified74.1%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
if -4.5000000000000001e153 < x1 < -5.6999999999999999e102Initial program 20.0%
Simplified20.0%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6420.0%
Simplified20.0%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified63.2%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
if -5.6999999999999999e102 < x1 < -1.1e6 or 1.4e13 < x1 < 9.99999999999999981e149Initial program 99.2%
Simplified99.5%
Applied egg-rr99.2%
Taylor expanded in x1 around inf
Simplified99.2%
Taylor expanded in x1 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6486.4%
Simplified86.4%
if -1.1e6 < x1 < 1.4e13Initial program 99.2%
Simplified99.3%
Taylor expanded in x1 around 0
Simplified85.1%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.4%
Simplified95.4%
Final simplification94.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (+ -1.0 (* x1 9.0))))
(t_2 (+ (* x1 x1) (* (* x2 x2) -36.0))))
(if (<= x1 -4.5e+153)
t_1
(if (<= x1 -1.15e+85)
(*
x2
(+
(/ (* (* x1 x1) 6.0) t_0)
(+
(* x1 (+ -12.0 (* x1 (+ 4.0 (* x1 (+ (* x1 4.0) 12.0))))))
(/ -6.0 t_0))))
(if (<= x1 7.1e+106)
(+
(* x2 -6.0)
(+ t_1 (* x2 (+ (* x1 (+ (* x1 12.0) -12.0)) (* 8.0 (* x1 x2))))))
(if (<= x1 4.5e+153)
(/ -1.0 (/ t_2 (* t_2 (- (* x2 6.0) x1))))
t_1))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (-1.0 + (x1 * 9.0));
double t_2 = (x1 * x1) + ((x2 * x2) * -36.0);
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -1.15e+85) {
tmp = x2 * ((((x1 * x1) * 6.0) / t_0) + ((x1 * (-12.0 + (x1 * (4.0 + (x1 * ((x1 * 4.0) + 12.0)))))) + (-6.0 / t_0)));
} else if (x1 <= 7.1e+106) {
tmp = (x2 * -6.0) + (t_1 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 4.5e+153) {
tmp = -1.0 / (t_2 / (t_2 * ((x2 * 6.0) - x1)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * ((-1.0d0) + (x1 * 9.0d0))
t_2 = (x1 * x1) + ((x2 * x2) * (-36.0d0))
if (x1 <= (-4.5d+153)) then
tmp = t_1
else if (x1 <= (-1.15d+85)) then
tmp = x2 * ((((x1 * x1) * 6.0d0) / t_0) + ((x1 * ((-12.0d0) + (x1 * (4.0d0 + (x1 * ((x1 * 4.0d0) + 12.0d0)))))) + ((-6.0d0) / t_0)))
else if (x1 <= 7.1d+106) then
tmp = (x2 * (-6.0d0)) + (t_1 + (x2 * ((x1 * ((x1 * 12.0d0) + (-12.0d0))) + (8.0d0 * (x1 * x2)))))
else if (x1 <= 4.5d+153) then
tmp = (-1.0d0) / (t_2 / (t_2 * ((x2 * 6.0d0) - x1)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (-1.0 + (x1 * 9.0));
double t_2 = (x1 * x1) + ((x2 * x2) * -36.0);
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -1.15e+85) {
tmp = x2 * ((((x1 * x1) * 6.0) / t_0) + ((x1 * (-12.0 + (x1 * (4.0 + (x1 * ((x1 * 4.0) + 12.0)))))) + (-6.0 / t_0)));
} else if (x1 <= 7.1e+106) {
tmp = (x2 * -6.0) + (t_1 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 4.5e+153) {
tmp = -1.0 / (t_2 / (t_2 * ((x2 * 6.0) - x1)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (-1.0 + (x1 * 9.0)) t_2 = (x1 * x1) + ((x2 * x2) * -36.0) tmp = 0 if x1 <= -4.5e+153: tmp = t_1 elif x1 <= -1.15e+85: tmp = x2 * ((((x1 * x1) * 6.0) / t_0) + ((x1 * (-12.0 + (x1 * (4.0 + (x1 * ((x1 * 4.0) + 12.0)))))) + (-6.0 / t_0))) elif x1 <= 7.1e+106: tmp = (x2 * -6.0) + (t_1 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))) elif x1 <= 4.5e+153: tmp = -1.0 / (t_2 / (t_2 * ((x2 * 6.0) - x1))) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) t_2 = Float64(Float64(x1 * x1) + Float64(Float64(x2 * x2) * -36.0)) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -1.15e+85) tmp = Float64(x2 * Float64(Float64(Float64(Float64(x1 * x1) * 6.0) / t_0) + Float64(Float64(x1 * Float64(-12.0 + Float64(x1 * Float64(4.0 + Float64(x1 * Float64(Float64(x1 * 4.0) + 12.0)))))) + Float64(-6.0 / t_0)))); elseif (x1 <= 7.1e+106) tmp = Float64(Float64(x2 * -6.0) + Float64(t_1 + Float64(x2 * Float64(Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)) + Float64(8.0 * Float64(x1 * x2)))))); elseif (x1 <= 4.5e+153) tmp = Float64(-1.0 / Float64(t_2 / Float64(t_2 * Float64(Float64(x2 * 6.0) - x1)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (-1.0 + (x1 * 9.0)); t_2 = (x1 * x1) + ((x2 * x2) * -36.0); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -1.15e+85) tmp = x2 * ((((x1 * x1) * 6.0) / t_0) + ((x1 * (-12.0 + (x1 * (4.0 + (x1 * ((x1 * 4.0) + 12.0)))))) + (-6.0 / t_0))); elseif (x1 <= 7.1e+106) tmp = (x2 * -6.0) + (t_1 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))); elseif (x1 <= 4.5e+153) tmp = -1.0 / (t_2 / (t_2 * ((x2 * 6.0) - x1))); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + N[(N[(x2 * x2), $MachinePrecision] * -36.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$1, If[LessEqual[x1, -1.15e+85], N[(x2 * N[(N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] / t$95$0), $MachinePrecision] + N[(N[(x1 * N[(-12.0 + N[(x1 * N[(4.0 + N[(x1 * N[(N[(x1 * 4.0), $MachinePrecision] + 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-6.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.1e+106], N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$1 + N[(x2 * N[(N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(-1.0 / N[(t$95$2 / N[(t$95$2 * N[(N[(x2 * 6.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
t_2 := x1 \cdot x1 + \left(x2 \cdot x2\right) \cdot -36\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -1.15 \cdot 10^{+85}:\\
\;\;\;\;x2 \cdot \left(\frac{\left(x1 \cdot x1\right) \cdot 6}{t\_0} + \left(x1 \cdot \left(-12 + x1 \cdot \left(4 + x1 \cdot \left(x1 \cdot 4 + 12\right)\right)\right) + \frac{-6}{t\_0}\right)\right)\\
\mathbf{elif}\;x1 \leq 7.1 \cdot 10^{+106}:\\
\;\;\;\;x2 \cdot -6 + \left(t\_1 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 12 + -12\right) + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{-1}{\frac{t\_2}{t\_2 \cdot \left(x2 \cdot 6 - x1\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 4.5000000000000001e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
Simplified74.1%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
if -4.5000000000000001e153 < x1 < -1.1499999999999999e85Initial program 63.6%
Simplified63.6%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6463.6%
Simplified63.6%
Taylor expanded in x1 around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified18.2%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified72.7%
if -1.1499999999999999e85 < x1 < 7.1000000000000003e106Initial program 99.1%
Simplified99.3%
Taylor expanded in x1 around 0
Simplified74.8%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6483.4%
Simplified83.4%
if 7.1000000000000003e106 < x1 < 4.5000000000000001e153Initial program 100.0%
Taylor expanded in x1 around 0
*-lowering-*.f644.6%
Simplified4.6%
flip-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
metadata-evalN/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
swap-sqrN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6423.5%
Applied egg-rr23.5%
flip-+N/A
associate-/l/N/A
swap-sqrN/A
metadata-evalN/A
*-commutativeN/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
Applied egg-rr80.0%
Final simplification86.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* x1 9.0))))
(t_1 (+ (* x1 x1) (* (* x2 x2) -36.0))))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -4.4e+72)
(* (* x2 x2) (* (* x1 x1) (+ (/ 12.0 x2) (/ 9.0 (* x2 x2)))))
(if (<= x1 7.1e+106)
(+
(* x2 -6.0)
(+ t_0 (* x2 (+ (* x1 (+ (* x1 12.0) -12.0)) (* 8.0 (* x1 x2))))))
(if (<= x1 4.5e+153)
(/ -1.0 (/ t_1 (* t_1 (- (* x2 6.0) x1))))
t_0))))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double t_1 = (x1 * x1) + ((x2 * x2) * -36.0);
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -4.4e+72) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 7.1e+106) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 4.5e+153) {
tmp = -1.0 / (t_1 / (t_1 * ((x2 * 6.0) - x1)));
} 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 * ((-1.0d0) + (x1 * 9.0d0))
t_1 = (x1 * x1) + ((x2 * x2) * (-36.0d0))
if (x1 <= (-4.5d+153)) then
tmp = t_0
else if (x1 <= (-4.4d+72)) then
tmp = (x2 * x2) * ((x1 * x1) * ((12.0d0 / x2) + (9.0d0 / (x2 * x2))))
else if (x1 <= 7.1d+106) then
tmp = (x2 * (-6.0d0)) + (t_0 + (x2 * ((x1 * ((x1 * 12.0d0) + (-12.0d0))) + (8.0d0 * (x1 * x2)))))
else if (x1 <= 4.5d+153) then
tmp = (-1.0d0) / (t_1 / (t_1 * ((x2 * 6.0d0) - x1)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double t_1 = (x1 * x1) + ((x2 * x2) * -36.0);
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -4.4e+72) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 7.1e+106) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 4.5e+153) {
tmp = -1.0 / (t_1 / (t_1 * ((x2 * 6.0) - x1)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (x1 * 9.0)) t_1 = (x1 * x1) + ((x2 * x2) * -36.0) tmp = 0 if x1 <= -4.5e+153: tmp = t_0 elif x1 <= -4.4e+72: tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))) elif x1 <= 7.1e+106: tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))) elif x1 <= 4.5e+153: tmp = -1.0 / (t_1 / (t_1 * ((x2 * 6.0) - x1))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) t_1 = Float64(Float64(x1 * x1) + Float64(Float64(x2 * x2) * -36.0)) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -4.4e+72) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 * x1) * Float64(Float64(12.0 / x2) + Float64(9.0 / Float64(x2 * x2))))); elseif (x1 <= 7.1e+106) tmp = Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)) + Float64(8.0 * Float64(x1 * x2)))))); elseif (x1 <= 4.5e+153) tmp = Float64(-1.0 / Float64(t_1 / Float64(t_1 * Float64(Float64(x2 * 6.0) - x1)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (x1 * 9.0)); t_1 = (x1 * x1) + ((x2 * x2) * -36.0); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -4.4e+72) tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))); elseif (x1 <= 7.1e+106) tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))); elseif (x1 <= 4.5e+153) tmp = -1.0 / (t_1 / (t_1 * ((x2 * 6.0) - x1))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + N[(N[(x2 * x2), $MachinePrecision] * -36.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$0, If[LessEqual[x1, -4.4e+72], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(12.0 / x2), $MachinePrecision] + N[(9.0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7.1e+106], N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(-1.0 / N[(t$95$1 / N[(t$95$1 * N[(N[(x2 * 6.0), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
t_1 := x1 \cdot x1 + \left(x2 \cdot x2\right) \cdot -36\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -4.4 \cdot 10^{+72}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{12}{x2} + \frac{9}{x2 \cdot x2}\right)\right)\\
\mathbf{elif}\;x1 \leq 7.1 \cdot 10^{+106}:\\
\;\;\;\;x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 12 + -12\right) + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{-1}{\frac{t\_1}{t\_1 \cdot \left(x2 \cdot 6 - x1\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 4.5000000000000001e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
Simplified74.1%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
if -4.5000000000000001e153 < x1 < -4.4e72Initial program 69.1%
Simplified69.2%
Taylor expanded in x1 around 0
Simplified19.1%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified47.0%
Taylor expanded in x1 around inf
+-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6454.7%
Simplified54.7%
if -4.4e72 < x1 < 7.1000000000000003e106Initial program 99.1%
Simplified99.3%
Taylor expanded in x1 around 0
Simplified75.7%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6484.3%
Simplified84.3%
if 7.1000000000000003e106 < x1 < 4.5000000000000001e153Initial program 100.0%
Taylor expanded in x1 around 0
*-lowering-*.f644.6%
Simplified4.6%
flip-+N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
metadata-evalN/A
associate-*r*N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
swap-sqrN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f6423.5%
Applied egg-rr23.5%
flip-+N/A
associate-/l/N/A
swap-sqrN/A
metadata-evalN/A
*-commutativeN/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
Applied egg-rr80.0%
Final simplification86.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* x1 9.0)))))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -5e+71)
(* (* x2 x2) (* (* x1 x1) (+ (/ 12.0 x2) (/ 9.0 (* x2 x2)))))
(if (<= x1 5e+48)
(+
(* x2 -6.0)
(+ t_0 (* x2 (+ (* x1 (+ (* x1 12.0) -12.0)) (* 8.0 (* x1 x2))))))
(if (<= x1 4.5e+153)
(*
x2
(+
(* x1 (+ -12.0 (* x1 16.0)))
(- -6.0 (/ (* x1 (- 1.0 (* x1 9.0))) x2))))
t_0))))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -5e+71) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 5e+48) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 4.5e+153) {
tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.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 * ((-1.0d0) + (x1 * 9.0d0))
if (x1 <= (-4.5d+153)) then
tmp = t_0
else if (x1 <= (-5d+71)) then
tmp = (x2 * x2) * ((x1 * x1) * ((12.0d0 / x2) + (9.0d0 / (x2 * x2))))
else if (x1 <= 5d+48) then
tmp = (x2 * (-6.0d0)) + (t_0 + (x2 * ((x1 * ((x1 * 12.0d0) + (-12.0d0))) + (8.0d0 * (x1 * x2)))))
else if (x1 <= 4.5d+153) then
tmp = x2 * ((x1 * ((-12.0d0) + (x1 * 16.0d0))) + ((-6.0d0) - ((x1 * (1.0d0 - (x1 * 9.0d0))) / x2)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -5e+71) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 5e+48) {
tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2)))));
} else if (x1 <= 4.5e+153) {
tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (x1 * 9.0)) tmp = 0 if x1 <= -4.5e+153: tmp = t_0 elif x1 <= -5e+71: tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))) elif x1 <= 5e+48: tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))) elif x1 <= 4.5e+153: tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -5e+71) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 * x1) * Float64(Float64(12.0 / x2) + Float64(9.0 / Float64(x2 * x2))))); elseif (x1 <= 5e+48) tmp = Float64(Float64(x2 * -6.0) + Float64(t_0 + Float64(x2 * Float64(Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)) + Float64(8.0 * Float64(x1 * x2)))))); elseif (x1 <= 4.5e+153) tmp = Float64(x2 * Float64(Float64(x1 * Float64(-12.0 + Float64(x1 * 16.0))) + Float64(-6.0 - Float64(Float64(x1 * Float64(1.0 - Float64(x1 * 9.0))) / x2)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (x1 * 9.0)); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -5e+71) tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))); elseif (x1 <= 5e+48) tmp = (x2 * -6.0) + (t_0 + (x2 * ((x1 * ((x1 * 12.0) + -12.0)) + (8.0 * (x1 * x2))))); elseif (x1 <= 4.5e+153) tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$0, If[LessEqual[x1, -5e+71], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(12.0 / x2), $MachinePrecision] + N[(9.0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+48], N[(N[(x2 * -6.0), $MachinePrecision] + N[(t$95$0 + N[(x2 * N[(N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x2 * N[(N[(x1 * N[(-12.0 + N[(x1 * 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-6.0 - N[(N[(x1 * N[(1.0 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -5 \cdot 10^{+71}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{12}{x2} + \frac{9}{x2 \cdot x2}\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+48}:\\
\;\;\;\;x2 \cdot -6 + \left(t\_0 + x2 \cdot \left(x1 \cdot \left(x1 \cdot 12 + -12\right) + 8 \cdot \left(x1 \cdot x2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot \left(-12 + x1 \cdot 16\right) + \left(-6 - \frac{x1 \cdot \left(1 - x1 \cdot 9\right)}{x2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 4.5000000000000001e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
Simplified74.1%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
if -4.5000000000000001e153 < x1 < -4.99999999999999972e71Initial program 69.1%
Simplified69.2%
Taylor expanded in x1 around 0
Simplified19.1%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified47.0%
Taylor expanded in x1 around inf
+-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6454.7%
Simplified54.7%
if -4.99999999999999972e71 < x1 < 4.99999999999999973e48Initial program 99.1%
Simplified99.3%
Taylor expanded in x1 around 0
Simplified77.8%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.9%
Simplified86.9%
if 4.99999999999999973e48 < x1 < 4.5000000000000001e153Initial program 99.6%
Simplified99.7%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.7%
Simplified99.7%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified20.3%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6459.1%
Simplified59.1%
Final simplification86.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* x1 9.0)))))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -4.9e+72)
(* (* x2 x2) (* (* x1 x1) (+ (/ 12.0 x2) (/ 9.0 (* x2 x2)))))
(if (<= x1 5e+48)
(+
t_0
(* x2 (+ (* 8.0 (* x1 x2)) (+ -6.0 (* x1 (+ (* x1 12.0) -12.0))))))
(if (<= x1 4.5e+153)
(*
x2
(+
(* x1 (+ -12.0 (* x1 16.0)))
(- -6.0 (/ (* x1 (- 1.0 (* x1 9.0))) x2))))
t_0))))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -4.9e+72) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 5e+48) {
tmp = t_0 + (x2 * ((8.0 * (x1 * x2)) + (-6.0 + (x1 * ((x1 * 12.0) + -12.0)))));
} else if (x1 <= 4.5e+153) {
tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.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 * ((-1.0d0) + (x1 * 9.0d0))
if (x1 <= (-4.5d+153)) then
tmp = t_0
else if (x1 <= (-4.9d+72)) then
tmp = (x2 * x2) * ((x1 * x1) * ((12.0d0 / x2) + (9.0d0 / (x2 * x2))))
else if (x1 <= 5d+48) then
tmp = t_0 + (x2 * ((8.0d0 * (x1 * x2)) + ((-6.0d0) + (x1 * ((x1 * 12.0d0) + (-12.0d0))))))
else if (x1 <= 4.5d+153) then
tmp = x2 * ((x1 * ((-12.0d0) + (x1 * 16.0d0))) + ((-6.0d0) - ((x1 * (1.0d0 - (x1 * 9.0d0))) / x2)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -4.9e+72) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 5e+48) {
tmp = t_0 + (x2 * ((8.0 * (x1 * x2)) + (-6.0 + (x1 * ((x1 * 12.0) + -12.0)))));
} else if (x1 <= 4.5e+153) {
tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (x1 * 9.0)) tmp = 0 if x1 <= -4.5e+153: tmp = t_0 elif x1 <= -4.9e+72: tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))) elif x1 <= 5e+48: tmp = t_0 + (x2 * ((8.0 * (x1 * x2)) + (-6.0 + (x1 * ((x1 * 12.0) + -12.0))))) elif x1 <= 4.5e+153: tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -4.9e+72) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 * x1) * Float64(Float64(12.0 / x2) + Float64(9.0 / Float64(x2 * x2))))); elseif (x1 <= 5e+48) tmp = Float64(t_0 + Float64(x2 * Float64(Float64(8.0 * Float64(x1 * x2)) + Float64(-6.0 + Float64(x1 * Float64(Float64(x1 * 12.0) + -12.0)))))); elseif (x1 <= 4.5e+153) tmp = Float64(x2 * Float64(Float64(x1 * Float64(-12.0 + Float64(x1 * 16.0))) + Float64(-6.0 - Float64(Float64(x1 * Float64(1.0 - Float64(x1 * 9.0))) / x2)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (x1 * 9.0)); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -4.9e+72) tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))); elseif (x1 <= 5e+48) tmp = t_0 + (x2 * ((8.0 * (x1 * x2)) + (-6.0 + (x1 * ((x1 * 12.0) + -12.0))))); elseif (x1 <= 4.5e+153) tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$0, If[LessEqual[x1, -4.9e+72], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(12.0 / x2), $MachinePrecision] + N[(9.0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+48], N[(t$95$0 + N[(x2 * N[(N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(-6.0 + N[(x1 * N[(N[(x1 * 12.0), $MachinePrecision] + -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x2 * N[(N[(x1 * N[(-12.0 + N[(x1 * 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-6.0 - N[(N[(x1 * N[(1.0 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -4.9 \cdot 10^{+72}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{12}{x2} + \frac{9}{x2 \cdot x2}\right)\right)\\
\mathbf{elif}\;x1 \leq 5 \cdot 10^{+48}:\\
\;\;\;\;t\_0 + x2 \cdot \left(8 \cdot \left(x1 \cdot x2\right) + \left(-6 + x1 \cdot \left(x1 \cdot 12 + -12\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot \left(-12 + x1 \cdot 16\right) + \left(-6 - \frac{x1 \cdot \left(1 - x1 \cdot 9\right)}{x2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 4.5000000000000001e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
Simplified74.1%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
if -4.5000000000000001e153 < x1 < -4.90000000000000006e72Initial program 69.1%
Simplified69.2%
Taylor expanded in x1 around 0
Simplified19.1%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified47.0%
Taylor expanded in x1 around inf
+-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6454.7%
Simplified54.7%
if -4.90000000000000006e72 < x1 < 4.99999999999999973e48Initial program 99.1%
Simplified99.3%
Taylor expanded in x1 around 0
Simplified77.8%
Taylor expanded in x2 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified86.9%
if 4.99999999999999973e48 < x1 < 4.5000000000000001e153Initial program 99.6%
Simplified99.7%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.7%
Simplified99.7%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified20.3%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6459.1%
Simplified59.1%
Final simplification86.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* x1 9.0)))))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -1.9e+71)
(* (* x2 x2) (* (* x1 x1) (+ (/ 12.0 x2) (/ 9.0 (* x2 x2)))))
(if (<= x1 1.65e+15)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* (* x2 4.0) (+ (* 2.0 x2) -3.0)))))
(if (<= x1 4.5e+153)
(*
x2
(+
(* x1 (+ -12.0 (* x1 16.0)))
(- -6.0 (/ (* x1 (- 1.0 (* x1 9.0))) x2))))
t_0))))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -1.9e+71) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 1.65e+15) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0))));
} else if (x1 <= 4.5e+153) {
tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.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 * ((-1.0d0) + (x1 * 9.0d0))
if (x1 <= (-4.5d+153)) then
tmp = t_0
else if (x1 <= (-1.9d+71)) then
tmp = (x2 * x2) * ((x1 * x1) * ((12.0d0 / x2) + (9.0d0 / (x2 * x2))))
else if (x1 <= 1.65d+15) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + ((x2 * 4.0d0) * ((2.0d0 * x2) + (-3.0d0)))))
else if (x1 <= 4.5d+153) then
tmp = x2 * ((x1 * ((-12.0d0) + (x1 * 16.0d0))) + ((-6.0d0) - ((x1 * (1.0d0 - (x1 * 9.0d0))) / x2)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -1.9e+71) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 1.65e+15) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0))));
} else if (x1 <= 4.5e+153) {
tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (x1 * 9.0)) tmp = 0 if x1 <= -4.5e+153: tmp = t_0 elif x1 <= -1.9e+71: tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))) elif x1 <= 1.65e+15: tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0)))) elif x1 <= 4.5e+153: tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -1.9e+71) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 * x1) * Float64(Float64(12.0 / x2) + Float64(9.0 / Float64(x2 * x2))))); elseif (x1 <= 1.65e+15) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(Float64(x2 * 4.0) * Float64(Float64(2.0 * x2) + -3.0))))); elseif (x1 <= 4.5e+153) tmp = Float64(x2 * Float64(Float64(x1 * Float64(-12.0 + Float64(x1 * 16.0))) + Float64(-6.0 - Float64(Float64(x1 * Float64(1.0 - Float64(x1 * 9.0))) / x2)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (x1 * 9.0)); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -1.9e+71) tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))); elseif (x1 <= 1.65e+15) tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0)))); elseif (x1 <= 4.5e+153) tmp = x2 * ((x1 * (-12.0 + (x1 * 16.0))) + (-6.0 - ((x1 * (1.0 - (x1 * 9.0))) / x2))); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$0, If[LessEqual[x1, -1.9e+71], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(12.0 / x2), $MachinePrecision] + N[(9.0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.65e+15], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(N[(x2 * 4.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4.5e+153], N[(x2 * N[(N[(x1 * N[(-12.0 + N[(x1 * 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-6.0 - N[(N[(x1 * N[(1.0 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.9 \cdot 10^{+71}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{12}{x2} + \frac{9}{x2 \cdot x2}\right)\right)\\
\mathbf{elif}\;x1 \leq 1.65 \cdot 10^{+15}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(x2 \cdot 4\right) \cdot \left(2 \cdot x2 + -3\right)\right)\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;x2 \cdot \left(x1 \cdot \left(-12 + x1 \cdot 16\right) + \left(-6 - \frac{x1 \cdot \left(1 - x1 \cdot 9\right)}{x2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 4.5000000000000001e153 < x1 Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
Simplified74.1%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
if -4.5000000000000001e153 < x1 < -1.9e71Initial program 69.1%
Simplified69.2%
Taylor expanded in x1 around 0
Simplified19.1%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified47.0%
Taylor expanded in x1 around inf
+-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6454.7%
Simplified54.7%
if -1.9e71 < x1 < 1.65e15Initial 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
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6479.5%
Simplified79.5%
if 1.65e15 < x1 < 4.5000000000000001e153Initial program 99.2%
Simplified99.5%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6496.2%
Simplified96.2%
Taylor expanded in x1 around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified16.7%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6445.0%
Simplified45.0%
Final simplification79.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ -1.0 (* x1 9.0))) (t_1 (* x1 t_0)))
(if (<= x1 -4.5e+153)
t_1
(if (<= x1 -195.0)
(* (* x2 x2) (* (* x1 x1) (+ (/ 12.0 x2) (/ 9.0 (* x2 x2)))))
(if (<= x1 1.32e-9)
(- (* x2 -6.0) (* x1 (- 1.0 (* x2 -12.0))))
(if (<= x1 6.2e+94)
(+ x1 (/ (* 8.0 (* x1 (* x2 x2))) (+ (* x1 x1) 1.0)))
(if (<= x1 8.5e+149)
(* (* x2 x2) (* (/ x1 x2) (/ t_0 x2)))
t_1)))))))
double code(double x1, double x2) {
double t_0 = -1.0 + (x1 * 9.0);
double t_1 = x1 * t_0;
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -195.0) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 1.32e-9) {
tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0)));
} else if (x1 <= 6.2e+94) {
tmp = x1 + ((8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0));
} else if (x1 <= 8.5e+149) {
tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-1.0d0) + (x1 * 9.0d0)
t_1 = x1 * t_0
if (x1 <= (-4.5d+153)) then
tmp = t_1
else if (x1 <= (-195.0d0)) then
tmp = (x2 * x2) * ((x1 * x1) * ((12.0d0 / x2) + (9.0d0 / (x2 * x2))))
else if (x1 <= 1.32d-9) then
tmp = (x2 * (-6.0d0)) - (x1 * (1.0d0 - (x2 * (-12.0d0))))
else if (x1 <= 6.2d+94) then
tmp = x1 + ((8.0d0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0d0))
else if (x1 <= 8.5d+149) then
tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = -1.0 + (x1 * 9.0);
double t_1 = x1 * t_0;
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -195.0) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 1.32e-9) {
tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0)));
} else if (x1 <= 6.2e+94) {
tmp = x1 + ((8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0));
} else if (x1 <= 8.5e+149) {
tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 + (x1 * 9.0) t_1 = x1 * t_0 tmp = 0 if x1 <= -4.5e+153: tmp = t_1 elif x1 <= -195.0: tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))) elif x1 <= 1.32e-9: tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0))) elif x1 <= 6.2e+94: tmp = x1 + ((8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0)) elif x1 <= 8.5e+149: tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2)) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(-1.0 + Float64(x1 * 9.0)) t_1 = Float64(x1 * t_0) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -195.0) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 * x1) * Float64(Float64(12.0 / x2) + Float64(9.0 / Float64(x2 * x2))))); elseif (x1 <= 1.32e-9) tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(1.0 - Float64(x2 * -12.0)))); elseif (x1 <= 6.2e+94) tmp = Float64(x1 + Float64(Float64(8.0 * Float64(x1 * Float64(x2 * x2))) / Float64(Float64(x1 * x1) + 1.0))); elseif (x1 <= 8.5e+149) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 / x2) * Float64(t_0 / x2))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 + (x1 * 9.0); t_1 = x1 * t_0; tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -195.0) tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))); elseif (x1 <= 1.32e-9) tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0))); elseif (x1 <= 6.2e+94) tmp = x1 + ((8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0)); elseif (x1 <= 8.5e+149) tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2)); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * t$95$0), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$1, If[LessEqual[x1, -195.0], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(12.0 / x2), $MachinePrecision] + N[(9.0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.32e-9], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(1.0 - N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.2e+94], N[(x1 + N[(N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.5e+149], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 / x2), $MachinePrecision] * N[(t$95$0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 + x1 \cdot 9\\
t_1 := x1 \cdot t\_0\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -195:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{12}{x2} + \frac{9}{x2 \cdot x2}\right)\right)\\
\mathbf{elif}\;x1 \leq 1.32 \cdot 10^{-9}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(1 - x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq 6.2 \cdot 10^{+94}:\\
\;\;\;\;x1 + \frac{8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)}{x1 \cdot x1 + 1}\\
\mathbf{elif}\;x1 \leq 8.5 \cdot 10^{+149}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(\frac{x1}{x2} \cdot \frac{t\_0}{x2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 8.49999999999999956e149 < x1 Initial program 1.7%
Simplified1.7%
Taylor expanded in x1 around 0
Simplified73.1%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.5%
Simplified98.5%
if -4.5000000000000001e153 < x1 < -195Initial program 84.0%
Simplified84.2%
Taylor expanded in x1 around 0
Simplified27.2%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified40.9%
Taylor expanded in x1 around inf
+-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6441.7%
Simplified41.7%
if -195 < x1 < 1.32e-9Initial program 99.2%
Simplified99.3%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6479.9%
Simplified79.9%
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-*.f6477.1%
Simplified77.1%
if 1.32e-9 < x1 < 6.19999999999999983e94Initial program 98.5%
Taylor expanded in x2 around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6434.0%
Simplified34.0%
if 6.19999999999999983e94 < x1 < 8.49999999999999956e149Initial program 100.0%
Simplified100.0%
Taylor expanded in x1 around 0
Simplified29.4%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified75.0%
Taylor expanded in x2 around 0
unpow2N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6467.8%
Simplified67.8%
Final simplification74.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* x1 9.0)))))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -2.3e+72)
(* (* x2 x2) (* (* x1 x1) (+ (/ 12.0 x2) (/ 9.0 (* x2 x2)))))
(if (<= x1 6.5e-11)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* (* x2 4.0) (+ (* 2.0 x2) -3.0)))))
(if (<= x1 8.5e+149)
(* (* x2 x2) (- (* x1 8.0) (/ (/ (* x1 (- 1.0 (* x1 9.0))) x2) x2)))
t_0))))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -2.3e+72) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 6.5e-11) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0))));
} else if (x1 <= 8.5e+149) {
tmp = (x2 * x2) * ((x1 * 8.0) - (((x1 * (1.0 - (x1 * 9.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 * ((-1.0d0) + (x1 * 9.0d0))
if (x1 <= (-4.5d+153)) then
tmp = t_0
else if (x1 <= (-2.3d+72)) then
tmp = (x2 * x2) * ((x1 * x1) * ((12.0d0 / x2) + (9.0d0 / (x2 * x2))))
else if (x1 <= 6.5d-11) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + ((x2 * 4.0d0) * ((2.0d0 * x2) + (-3.0d0)))))
else if (x1 <= 8.5d+149) then
tmp = (x2 * x2) * ((x1 * 8.0d0) - (((x1 * (1.0d0 - (x1 * 9.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 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -2.3e+72) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 6.5e-11) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0))));
} else if (x1 <= 8.5e+149) {
tmp = (x2 * x2) * ((x1 * 8.0) - (((x1 * (1.0 - (x1 * 9.0))) / x2) / x2));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (x1 * 9.0)) tmp = 0 if x1 <= -4.5e+153: tmp = t_0 elif x1 <= -2.3e+72: tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))) elif x1 <= 6.5e-11: tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0)))) elif x1 <= 8.5e+149: tmp = (x2 * x2) * ((x1 * 8.0) - (((x1 * (1.0 - (x1 * 9.0))) / x2) / x2)) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -2.3e+72) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 * x1) * Float64(Float64(12.0 / x2) + Float64(9.0 / Float64(x2 * x2))))); elseif (x1 <= 6.5e-11) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(Float64(x2 * 4.0) * Float64(Float64(2.0 * x2) + -3.0))))); elseif (x1 <= 8.5e+149) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 * 8.0) - Float64(Float64(Float64(x1 * Float64(1.0 - Float64(x1 * 9.0))) / x2) / x2))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (x1 * 9.0)); tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -2.3e+72) tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))); elseif (x1 <= 6.5e-11) tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0)))); elseif (x1 <= 8.5e+149) tmp = (x2 * x2) * ((x1 * 8.0) - (((x1 * (1.0 - (x1 * 9.0))) / x2) / x2)); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$0, If[LessEqual[x1, -2.3e+72], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(12.0 / x2), $MachinePrecision] + N[(9.0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 6.5e-11], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(N[(x2 * 4.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.5e+149], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 * 8.0), $MachinePrecision] - N[(N[(N[(x1 * N[(1.0 - N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x2), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -2.3 \cdot 10^{+72}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{12}{x2} + \frac{9}{x2 \cdot x2}\right)\right)\\
\mathbf{elif}\;x1 \leq 6.5 \cdot 10^{-11}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(x2 \cdot 4\right) \cdot \left(2 \cdot x2 + -3\right)\right)\\
\mathbf{elif}\;x1 \leq 8.5 \cdot 10^{+149}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8 - \frac{\frac{x1 \cdot \left(1 - x1 \cdot 9\right)}{x2}}{x2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 8.49999999999999956e149 < x1 Initial program 1.7%
Simplified1.7%
Taylor expanded in x1 around 0
Simplified73.1%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.5%
Simplified98.5%
if -4.5000000000000001e153 < x1 < -2.3e72Initial program 69.1%
Simplified69.2%
Taylor expanded in x1 around 0
Simplified19.1%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified47.0%
Taylor expanded in x1 around inf
+-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6454.7%
Simplified54.7%
if -2.3e72 < x1 < 6.49999999999999953e-11Initial 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
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.2%
Simplified81.2%
if 6.49999999999999953e-11 < x1 < 8.49999999999999956e149Initial program 99.1%
Simplified99.3%
Taylor expanded in x1 around 0
Simplified30.1%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified44.1%
Taylor expanded in x2 around 0
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6441.9%
Simplified41.9%
Final simplification78.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ -1.0 (* x1 9.0))) (t_1 (* x1 t_0)))
(if (<= x1 -4.5e+153)
t_1
(if (<= x1 -6.2e+70)
(* (* x2 x2) (* (* x1 x1) (+ (/ 12.0 x2) (/ 9.0 (* x2 x2)))))
(if (<= x1 3.5e+85)
(+ (* x2 -6.0) (* x1 (+ -1.0 (* (* x2 4.0) (+ (* 2.0 x2) -3.0)))))
(if (<= x1 8.5e+149) (* (* x2 x2) (* (/ x1 x2) (/ t_0 x2))) t_1))))))
double code(double x1, double x2) {
double t_0 = -1.0 + (x1 * 9.0);
double t_1 = x1 * t_0;
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -6.2e+70) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 3.5e+85) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0))));
} else if (x1 <= 8.5e+149) {
tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-1.0d0) + (x1 * 9.0d0)
t_1 = x1 * t_0
if (x1 <= (-4.5d+153)) then
tmp = t_1
else if (x1 <= (-6.2d+70)) then
tmp = (x2 * x2) * ((x1 * x1) * ((12.0d0 / x2) + (9.0d0 / (x2 * x2))))
else if (x1 <= 3.5d+85) then
tmp = (x2 * (-6.0d0)) + (x1 * ((-1.0d0) + ((x2 * 4.0d0) * ((2.0d0 * x2) + (-3.0d0)))))
else if (x1 <= 8.5d+149) then
tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = -1.0 + (x1 * 9.0);
double t_1 = x1 * t_0;
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_1;
} else if (x1 <= -6.2e+70) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else if (x1 <= 3.5e+85) {
tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0))));
} else if (x1 <= 8.5e+149) {
tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 + (x1 * 9.0) t_1 = x1 * t_0 tmp = 0 if x1 <= -4.5e+153: tmp = t_1 elif x1 <= -6.2e+70: tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))) elif x1 <= 3.5e+85: tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0)))) elif x1 <= 8.5e+149: tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2)) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(-1.0 + Float64(x1 * 9.0)) t_1 = Float64(x1 * t_0) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -6.2e+70) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 * x1) * Float64(Float64(12.0 / x2) + Float64(9.0 / Float64(x2 * x2))))); elseif (x1 <= 3.5e+85) tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(-1.0 + Float64(Float64(x2 * 4.0) * Float64(Float64(2.0 * x2) + -3.0))))); elseif (x1 <= 8.5e+149) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 / x2) * Float64(t_0 / x2))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 + (x1 * 9.0); t_1 = x1 * t_0; tmp = 0.0; if (x1 <= -4.5e+153) tmp = t_1; elseif (x1 <= -6.2e+70) tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))); elseif (x1 <= 3.5e+85) tmp = (x2 * -6.0) + (x1 * (-1.0 + ((x2 * 4.0) * ((2.0 * x2) + -3.0)))); elseif (x1 <= 8.5e+149) tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2)); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * t$95$0), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$1, If[LessEqual[x1, -6.2e+70], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(12.0 / x2), $MachinePrecision] + N[(9.0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.5e+85], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(-1.0 + N[(N[(x2 * 4.0), $MachinePrecision] * N[(N[(2.0 * x2), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.5e+149], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 / x2), $MachinePrecision] * N[(t$95$0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 + x1 \cdot 9\\
t_1 := x1 \cdot t\_0\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq -6.2 \cdot 10^{+70}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{12}{x2} + \frac{9}{x2 \cdot x2}\right)\right)\\
\mathbf{elif}\;x1 \leq 3.5 \cdot 10^{+85}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(-1 + \left(x2 \cdot 4\right) \cdot \left(2 \cdot x2 + -3\right)\right)\\
\mathbf{elif}\;x1 \leq 8.5 \cdot 10^{+149}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(\frac{x1}{x2} \cdot \frac{t\_0}{x2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153 or 8.49999999999999956e149 < x1 Initial program 1.7%
Simplified1.7%
Taylor expanded in x1 around 0
Simplified73.1%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.5%
Simplified98.5%
if -4.5000000000000001e153 < x1 < -6.2000000000000006e70Initial program 69.1%
Simplified69.2%
Taylor expanded in x1 around 0
Simplified19.1%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified47.0%
Taylor expanded in x1 around inf
+-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6454.7%
Simplified54.7%
if -6.2000000000000006e70 < x1 < 3.50000000000000005e85Initial program 99.1%
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-*.f6474.3%
Simplified74.3%
if 3.50000000000000005e85 < x1 < 8.49999999999999956e149Initial program 100.0%
Simplified100.0%
Taylor expanded in x1 around 0
Simplified29.4%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified75.0%
Taylor expanded in x2 around 0
unpow2N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6467.8%
Simplified67.8%
Final simplification78.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ -1.0 (* x1 9.0))) (t_1 (* x1 t_0)))
(if (<= x1 -7.2e+127)
t_1
(if (<= x1 1.2e-6)
(- (* x2 -6.0) (* x1 (- 1.0 (* x2 -12.0))))
(if (<= x1 1.18e+88)
(+ x1 (/ (* 8.0 (* x1 (* x2 x2))) (+ (* x1 x1) 1.0)))
(if (<= x1 8.5e+149) (* (* x2 x2) (* (/ x1 x2) (/ t_0 x2))) t_1))))))
double code(double x1, double x2) {
double t_0 = -1.0 + (x1 * 9.0);
double t_1 = x1 * t_0;
double tmp;
if (x1 <= -7.2e+127) {
tmp = t_1;
} else if (x1 <= 1.2e-6) {
tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0)));
} else if (x1 <= 1.18e+88) {
tmp = x1 + ((8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0));
} else if (x1 <= 8.5e+149) {
tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-1.0d0) + (x1 * 9.0d0)
t_1 = x1 * t_0
if (x1 <= (-7.2d+127)) then
tmp = t_1
else if (x1 <= 1.2d-6) then
tmp = (x2 * (-6.0d0)) - (x1 * (1.0d0 - (x2 * (-12.0d0))))
else if (x1 <= 1.18d+88) then
tmp = x1 + ((8.0d0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0d0))
else if (x1 <= 8.5d+149) then
tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = -1.0 + (x1 * 9.0);
double t_1 = x1 * t_0;
double tmp;
if (x1 <= -7.2e+127) {
tmp = t_1;
} else if (x1 <= 1.2e-6) {
tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0)));
} else if (x1 <= 1.18e+88) {
tmp = x1 + ((8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0));
} else if (x1 <= 8.5e+149) {
tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 + (x1 * 9.0) t_1 = x1 * t_0 tmp = 0 if x1 <= -7.2e+127: tmp = t_1 elif x1 <= 1.2e-6: tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0))) elif x1 <= 1.18e+88: tmp = x1 + ((8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0)) elif x1 <= 8.5e+149: tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2)) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(-1.0 + Float64(x1 * 9.0)) t_1 = Float64(x1 * t_0) tmp = 0.0 if (x1 <= -7.2e+127) tmp = t_1; elseif (x1 <= 1.2e-6) tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(1.0 - Float64(x2 * -12.0)))); elseif (x1 <= 1.18e+88) tmp = Float64(x1 + Float64(Float64(8.0 * Float64(x1 * Float64(x2 * x2))) / Float64(Float64(x1 * x1) + 1.0))); elseif (x1 <= 8.5e+149) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 / x2) * Float64(t_0 / x2))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 + (x1 * 9.0); t_1 = x1 * t_0; tmp = 0.0; if (x1 <= -7.2e+127) tmp = t_1; elseif (x1 <= 1.2e-6) tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0))); elseif (x1 <= 1.18e+88) tmp = x1 + ((8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0)); elseif (x1 <= 8.5e+149) tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2)); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * t$95$0), $MachinePrecision]}, If[LessEqual[x1, -7.2e+127], t$95$1, If[LessEqual[x1, 1.2e-6], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(1.0 - N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.18e+88], N[(x1 + N[(N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.5e+149], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 / x2), $MachinePrecision] * N[(t$95$0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 + x1 \cdot 9\\
t_1 := x1 \cdot t\_0\\
\mathbf{if}\;x1 \leq -7.2 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 1.2 \cdot 10^{-6}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(1 - x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq 1.18 \cdot 10^{+88}:\\
\;\;\;\;x1 + \frac{8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)}{x1 \cdot x1 + 1}\\
\mathbf{elif}\;x1 \leq 8.5 \cdot 10^{+149}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(\frac{x1}{x2} \cdot \frac{t\_0}{x2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -7.19999999999999958e127 or 8.49999999999999956e149 < x1 Initial program 1.6%
Simplified1.6%
Taylor expanded in x1 around 0
Simplified71.4%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6494.3%
Simplified94.3%
if -7.19999999999999958e127 < x1 < 1.1999999999999999e-6Initial program 98.6%
Simplified98.7%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6480.6%
Simplified80.6%
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-*.f6468.6%
Simplified68.6%
if 1.1999999999999999e-6 < x1 < 1.1799999999999999e88Initial program 98.5%
Taylor expanded in x2 around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6434.0%
Simplified34.0%
if 1.1799999999999999e88 < x1 < 8.49999999999999956e149Initial program 100.0%
Simplified100.0%
Taylor expanded in x1 around 0
Simplified29.4%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified75.0%
Taylor expanded in x2 around 0
unpow2N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6467.8%
Simplified67.8%
Final simplification71.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ -1.0 (* x1 9.0))) (t_1 (* x1 t_0)))
(if (<= x1 -1.9e+133)
t_1
(if (<= x1 4.5e-8)
(- (* x2 -6.0) (* x1 (- 1.0 (* x2 -12.0))))
(if (<= x1 3.9e+84)
(/ (* 8.0 (* x1 (* x2 x2))) (+ (* x1 x1) 1.0))
(if (<= x1 8.5e+149) (* (* x2 x2) (* (/ x1 x2) (/ t_0 x2))) t_1))))))
double code(double x1, double x2) {
double t_0 = -1.0 + (x1 * 9.0);
double t_1 = x1 * t_0;
double tmp;
if (x1 <= -1.9e+133) {
tmp = t_1;
} else if (x1 <= 4.5e-8) {
tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0)));
} else if (x1 <= 3.9e+84) {
tmp = (8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0);
} else if (x1 <= 8.5e+149) {
tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (-1.0d0) + (x1 * 9.0d0)
t_1 = x1 * t_0
if (x1 <= (-1.9d+133)) then
tmp = t_1
else if (x1 <= 4.5d-8) then
tmp = (x2 * (-6.0d0)) - (x1 * (1.0d0 - (x2 * (-12.0d0))))
else if (x1 <= 3.9d+84) then
tmp = (8.0d0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0d0)
else if (x1 <= 8.5d+149) then
tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = -1.0 + (x1 * 9.0);
double t_1 = x1 * t_0;
double tmp;
if (x1 <= -1.9e+133) {
tmp = t_1;
} else if (x1 <= 4.5e-8) {
tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0)));
} else if (x1 <= 3.9e+84) {
tmp = (8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0);
} else if (x1 <= 8.5e+149) {
tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2));
} else {
tmp = t_1;
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 + (x1 * 9.0) t_1 = x1 * t_0 tmp = 0 if x1 <= -1.9e+133: tmp = t_1 elif x1 <= 4.5e-8: tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0))) elif x1 <= 3.9e+84: tmp = (8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0) elif x1 <= 8.5e+149: tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2)) else: tmp = t_1 return tmp
function code(x1, x2) t_0 = Float64(-1.0 + Float64(x1 * 9.0)) t_1 = Float64(x1 * t_0) tmp = 0.0 if (x1 <= -1.9e+133) tmp = t_1; elseif (x1 <= 4.5e-8) tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(1.0 - Float64(x2 * -12.0)))); elseif (x1 <= 3.9e+84) tmp = Float64(Float64(8.0 * Float64(x1 * Float64(x2 * x2))) / Float64(Float64(x1 * x1) + 1.0)); elseif (x1 <= 8.5e+149) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 / x2) * Float64(t_0 / x2))); else tmp = t_1; end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 + (x1 * 9.0); t_1 = x1 * t_0; tmp = 0.0; if (x1 <= -1.9e+133) tmp = t_1; elseif (x1 <= 4.5e-8) tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0))); elseif (x1 <= 3.9e+84) tmp = (8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0); elseif (x1 <= 8.5e+149) tmp = (x2 * x2) * ((x1 / x2) * (t_0 / x2)); else tmp = t_1; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * t$95$0), $MachinePrecision]}, If[LessEqual[x1, -1.9e+133], t$95$1, If[LessEqual[x1, 4.5e-8], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(1.0 - N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3.9e+84], N[(N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.5e+149], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 / x2), $MachinePrecision] * N[(t$95$0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 + x1 \cdot 9\\
t_1 := x1 \cdot t\_0\\
\mathbf{if}\;x1 \leq -1.9 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x1 \leq 4.5 \cdot 10^{-8}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(1 - x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq 3.9 \cdot 10^{+84}:\\
\;\;\;\;\frac{8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)}{x1 \cdot x1 + 1}\\
\mathbf{elif}\;x1 \leq 8.5 \cdot 10^{+149}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(\frac{x1}{x2} \cdot \frac{t\_0}{x2}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x1 < -1.9000000000000001e133 or 8.49999999999999956e149 < x1 Initial program 1.6%
Simplified1.6%
Taylor expanded in x1 around 0
Simplified71.4%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6494.3%
Simplified94.3%
if -1.9000000000000001e133 < x1 < 4.49999999999999993e-8Initial program 98.6%
Simplified98.7%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6480.6%
Simplified80.6%
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-*.f6468.6%
Simplified68.6%
if 4.49999999999999993e-8 < x1 < 3.90000000000000016e84Initial program 98.5%
Taylor expanded in x2 around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6432.3%
Simplified32.3%
if 3.90000000000000016e84 < x1 < 8.49999999999999956e149Initial program 100.0%
Simplified100.0%
Taylor expanded in x1 around 0
Simplified29.4%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified75.0%
Taylor expanded in x2 around 0
unpow2N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6467.8%
Simplified67.8%
Final simplification71.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ -1.0 (* x1 9.0))))
(if (<= x1 -4.5e+153)
(* x1 t_0)
(if (<= x1 -2.9e+71)
(* (* x2 x2) (* (* x1 x1) (+ (/ 12.0 x2) (/ 9.0 (* x2 x2)))))
(+ (* x2 -6.0) (* x1 (+ t_0 (* 2.0 (* x2 (+ -6.0 (* x2 4.0)))))))))))
double code(double x1, double x2) {
double t_0 = -1.0 + (x1 * 9.0);
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 * t_0;
} else if (x1 <= -2.9e+71) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else {
tmp = (x2 * -6.0) + (x1 * (t_0 + (2.0 * (x2 * (-6.0 + (x2 * 4.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 = (-1.0d0) + (x1 * 9.0d0)
if (x1 <= (-4.5d+153)) then
tmp = x1 * t_0
else if (x1 <= (-2.9d+71)) then
tmp = (x2 * x2) * ((x1 * x1) * ((12.0d0 / x2) + (9.0d0 / (x2 * x2))))
else
tmp = (x2 * (-6.0d0)) + (x1 * (t_0 + (2.0d0 * (x2 * ((-6.0d0) + (x2 * 4.0d0))))))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = -1.0 + (x1 * 9.0);
double tmp;
if (x1 <= -4.5e+153) {
tmp = x1 * t_0;
} else if (x1 <= -2.9e+71) {
tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2))));
} else {
tmp = (x2 * -6.0) + (x1 * (t_0 + (2.0 * (x2 * (-6.0 + (x2 * 4.0))))));
}
return tmp;
}
def code(x1, x2): t_0 = -1.0 + (x1 * 9.0) tmp = 0 if x1 <= -4.5e+153: tmp = x1 * t_0 elif x1 <= -2.9e+71: tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))) else: tmp = (x2 * -6.0) + (x1 * (t_0 + (2.0 * (x2 * (-6.0 + (x2 * 4.0)))))) return tmp
function code(x1, x2) t_0 = Float64(-1.0 + Float64(x1 * 9.0)) tmp = 0.0 if (x1 <= -4.5e+153) tmp = Float64(x1 * t_0); elseif (x1 <= -2.9e+71) tmp = Float64(Float64(x2 * x2) * Float64(Float64(x1 * x1) * Float64(Float64(12.0 / x2) + Float64(9.0 / Float64(x2 * x2))))); else tmp = Float64(Float64(x2 * -6.0) + Float64(x1 * Float64(t_0 + Float64(2.0 * Float64(x2 * Float64(-6.0 + Float64(x2 * 4.0))))))); end return tmp end
function tmp_2 = code(x1, x2) t_0 = -1.0 + (x1 * 9.0); tmp = 0.0; if (x1 <= -4.5e+153) tmp = x1 * t_0; elseif (x1 <= -2.9e+71) tmp = (x2 * x2) * ((x1 * x1) * ((12.0 / x2) + (9.0 / (x2 * x2)))); else tmp = (x2 * -6.0) + (x1 * (t_0 + (2.0 * (x2 * (-6.0 + (x2 * 4.0)))))); end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], N[(x1 * t$95$0), $MachinePrecision], If[LessEqual[x1, -2.9e+71], N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(N[(12.0 / x2), $MachinePrecision] + N[(9.0 / N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x2 * -6.0), $MachinePrecision] + N[(x1 * N[(t$95$0 + N[(2.0 * N[(x2 * N[(-6.0 + N[(x2 * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 + x1 \cdot 9\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;x1 \cdot t\_0\\
\mathbf{elif}\;x1 \leq -2.9 \cdot 10^{+71}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{12}{x2} + \frac{9}{x2 \cdot x2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6 + x1 \cdot \left(t\_0 + 2 \cdot \left(x2 \cdot \left(-6 + x2 \cdot 4\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Simplified0.0%
Taylor expanded in x1 around 0
Simplified62.5%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
if -4.5000000000000001e153 < x1 < -2.90000000000000007e71Initial program 69.1%
Simplified69.2%
Taylor expanded in x1 around 0
Simplified19.1%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified47.0%
Taylor expanded in x1 around inf
+-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6454.7%
Simplified54.7%
if -2.90000000000000007e71 < x1 Initial program 87.0%
Simplified87.1%
Taylor expanded in x1 around 0
Simplified74.4%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6476.0%
Simplified76.0%
Final simplification77.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* x1 9.0)))))
(if (<= x1 -1e+132)
t_0
(if (<= x1 6.2e-8)
(- (* x2 -6.0) (* x1 (- 1.0 (* x2 -12.0))))
(if (<= x1 1.4e+149)
(/ (* 8.0 (* x1 (* x2 x2))) (+ (* x1 x1) 1.0))
t_0)))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -1e+132) {
tmp = t_0;
} else if (x1 <= 6.2e-8) {
tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0)));
} else if (x1 <= 1.4e+149) {
tmp = (8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.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 * ((-1.0d0) + (x1 * 9.0d0))
if (x1 <= (-1d+132)) then
tmp = t_0
else if (x1 <= 6.2d-8) then
tmp = (x2 * (-6.0d0)) - (x1 * (1.0d0 - (x2 * (-12.0d0))))
else if (x1 <= 1.4d+149) then
tmp = (8.0d0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -1e+132) {
tmp = t_0;
} else if (x1 <= 6.2e-8) {
tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0)));
} else if (x1 <= 1.4e+149) {
tmp = (8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (x1 * 9.0)) tmp = 0 if x1 <= -1e+132: tmp = t_0 elif x1 <= 6.2e-8: tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0))) elif x1 <= 1.4e+149: tmp = (8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) tmp = 0.0 if (x1 <= -1e+132) tmp = t_0; elseif (x1 <= 6.2e-8) tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(1.0 - Float64(x2 * -12.0)))); elseif (x1 <= 1.4e+149) tmp = Float64(Float64(8.0 * Float64(x1 * Float64(x2 * x2))) / Float64(Float64(x1 * x1) + 1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (x1 * 9.0)); tmp = 0.0; if (x1 <= -1e+132) tmp = t_0; elseif (x1 <= 6.2e-8) tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0))); elseif (x1 <= 1.4e+149) tmp = (8.0 * (x1 * (x2 * x2))) / ((x1 * x1) + 1.0); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+132], t$95$0, If[LessEqual[x1, 6.2e-8], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(1.0 - N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4e+149], N[(N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{if}\;x1 \leq -1 \cdot 10^{+132}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 6.2 \cdot 10^{-8}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(1 - x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+149}:\\
\;\;\;\;\frac{8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)}{x1 \cdot x1 + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -9.99999999999999991e131 or 1.4e149 < x1 Initial program 3.2%
Simplified3.2%
Taylor expanded in x1 around 0
Simplified70.5%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6493.0%
Simplified93.0%
if -9.99999999999999991e131 < x1 < 6.2e-8Initial program 98.6%
Simplified98.7%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6480.6%
Simplified80.6%
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-*.f6468.6%
Simplified68.6%
if 6.2e-8 < x1 < 1.4e149Initial program 99.0%
Taylor expanded in x2 around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6431.1%
Simplified31.1%
Final simplification69.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (+ -1.0 (* x1 9.0)))))
(if (<= x1 -6.5e+128)
t_0
(if (<= x1 3.7e-9)
(- (* x2 -6.0) (* x1 (- 1.0 (* x2 -12.0))))
(if (<= x1 1.4e+149) (+ (* x2 -6.0) (* x1 (* 8.0 (* x2 x2)))) t_0)))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -6.5e+128) {
tmp = t_0;
} else if (x1 <= 3.7e-9) {
tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0)));
} else if (x1 <= 1.4e+149) {
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 * ((-1.0d0) + (x1 * 9.0d0))
if (x1 <= (-6.5d+128)) then
tmp = t_0
else if (x1 <= 3.7d-9) then
tmp = (x2 * (-6.0d0)) - (x1 * (1.0d0 - (x2 * (-12.0d0))))
else if (x1 <= 1.4d+149) 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 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -6.5e+128) {
tmp = t_0;
} else if (x1 <= 3.7e-9) {
tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0)));
} else if (x1 <= 1.4e+149) {
tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (x1 * 9.0)) tmp = 0 if x1 <= -6.5e+128: tmp = t_0 elif x1 <= 3.7e-9: tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0))) elif x1 <= 1.4e+149: tmp = (x2 * -6.0) + (x1 * (8.0 * (x2 * x2))) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) tmp = 0.0 if (x1 <= -6.5e+128) tmp = t_0; elseif (x1 <= 3.7e-9) tmp = Float64(Float64(x2 * -6.0) - Float64(x1 * Float64(1.0 - Float64(x2 * -12.0)))); elseif (x1 <= 1.4e+149) 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 * (-1.0 + (x1 * 9.0)); tmp = 0.0; if (x1 <= -6.5e+128) tmp = t_0; elseif (x1 <= 3.7e-9) tmp = (x2 * -6.0) - (x1 * (1.0 - (x2 * -12.0))); elseif (x1 <= 1.4e+149) 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[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.5e+128], t$95$0, If[LessEqual[x1, 3.7e-9], N[(N[(x2 * -6.0), $MachinePrecision] - N[(x1 * N[(1.0 - N[(x2 * -12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.4e+149], 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 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{if}\;x1 \leq -6.5 \cdot 10^{+128}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 3.7 \cdot 10^{-9}:\\
\;\;\;\;x2 \cdot -6 - x1 \cdot \left(1 - x2 \cdot -12\right)\\
\mathbf{elif}\;x1 \leq 1.4 \cdot 10^{+149}:\\
\;\;\;\;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.5000000000000003e128 or 1.4e149 < x1 Initial program 3.2%
Simplified3.2%
Taylor expanded in x1 around 0
Simplified70.5%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6493.0%
Simplified93.0%
if -6.5000000000000003e128 < x1 < 3.7e-9Initial program 98.6%
Simplified98.7%
Taylor expanded in x2 around 0
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6480.6%
Simplified80.6%
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-*.f6468.6%
Simplified68.6%
if 3.7e-9 < x1 < 1.4e149Initial program 99.0%
Simplified99.3%
Taylor expanded in x1 around 0
Simplified28.5%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6427.0%
Simplified27.0%
Final simplification69.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* x2 x2) (- (* x1 8.0) (/ 6.0 x2)))))
(if (<= x2 -8e-86)
t_0
(if (<= x2 7.8e-44) (* x1 (+ -1.0 (* x1 9.0))) t_0))))
double code(double x1, double x2) {
double t_0 = (x2 * x2) * ((x1 * 8.0) - (6.0 / x2));
double tmp;
if (x2 <= -8e-86) {
tmp = t_0;
} else if (x2 <= 7.8e-44) {
tmp = x1 * (-1.0 + (x1 * 9.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 = (x2 * x2) * ((x1 * 8.0d0) - (6.0d0 / x2))
if (x2 <= (-8d-86)) then
tmp = t_0
else if (x2 <= 7.8d-44) then
tmp = x1 * ((-1.0d0) + (x1 * 9.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x2 * x2) * ((x1 * 8.0) - (6.0 / x2));
double tmp;
if (x2 <= -8e-86) {
tmp = t_0;
} else if (x2 <= 7.8e-44) {
tmp = x1 * (-1.0 + (x1 * 9.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = (x2 * x2) * ((x1 * 8.0) - (6.0 / x2)) tmp = 0 if x2 <= -8e-86: tmp = t_0 elif x2 <= 7.8e-44: tmp = x1 * (-1.0 + (x1 * 9.0)) else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x2 * x2) * Float64(Float64(x1 * 8.0) - Float64(6.0 / x2))) tmp = 0.0 if (x2 <= -8e-86) tmp = t_0; elseif (x2 <= 7.8e-44) tmp = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x2 * x2) * ((x1 * 8.0) - (6.0 / x2)); tmp = 0.0; if (x2 <= -8e-86) tmp = t_0; elseif (x2 <= 7.8e-44) tmp = x1 * (-1.0 + (x1 * 9.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x2 * x2), $MachinePrecision] * N[(N[(x1 * 8.0), $MachinePrecision] - N[(6.0 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -8e-86], t$95$0, If[LessEqual[x2, 7.8e-44], N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8 - \frac{6}{x2}\right)\\
\mathbf{if}\;x2 \leq -8 \cdot 10^{-86}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x2 \leq 7.8 \cdot 10^{-44}:\\
\;\;\;\;x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x2 < -8.00000000000000068e-86 or 7.8000000000000004e-44 < x2 Initial program 75.2%
Simplified75.3%
Taylor expanded in x1 around 0
Simplified64.8%
Taylor expanded in x2 around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified66.9%
Taylor expanded in x1 around 0
/-lowering-/.f6458.4%
Simplified58.4%
if -8.00000000000000068e-86 < x2 < 7.8000000000000004e-44Initial program 75.1%
Simplified75.3%
Taylor expanded in x1 around 0
Simplified76.4%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6465.7%
Simplified65.7%
Final simplification61.8%
(FPCore (x1 x2) :precision binary64 (let* ((t_0 (* x1 (+ -1.0 (* x1 9.0))))) (if (<= x1 -1.12e-69) t_0 (if (<= x1 4.2e-163) (* x2 -6.0) t_0))))
double code(double x1, double x2) {
double t_0 = x1 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -1.12e-69) {
tmp = t_0;
} else if (x1 <= 4.2e-163) {
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 * ((-1.0d0) + (x1 * 9.0d0))
if (x1 <= (-1.12d-69)) then
tmp = t_0
else if (x1 <= 4.2d-163) 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 * (-1.0 + (x1 * 9.0));
double tmp;
if (x1 <= -1.12e-69) {
tmp = t_0;
} else if (x1 <= 4.2e-163) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = x1 * (-1.0 + (x1 * 9.0)) tmp = 0 if x1 <= -1.12e-69: tmp = t_0 elif x1 <= 4.2e-163: tmp = x2 * -6.0 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(x1 * Float64(-1.0 + Float64(x1 * 9.0))) tmp = 0.0 if (x1 <= -1.12e-69) tmp = t_0; elseif (x1 <= 4.2e-163) tmp = Float64(x2 * -6.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = x1 * (-1.0 + (x1 * 9.0)); tmp = 0.0; if (x1 <= -1.12e-69) tmp = t_0; elseif (x1 <= 4.2e-163) tmp = x2 * -6.0; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(-1.0 + N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.12e-69], t$95$0, If[LessEqual[x1, 4.2e-163], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(-1 + x1 \cdot 9\right)\\
\mathbf{if}\;x1 \leq -1.12 \cdot 10^{-69}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 4.2 \cdot 10^{-163}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.12e-69 or 4.19999999999999996e-163 < x1 Initial program 64.1%
Simplified64.3%
Taylor expanded in x1 around 0
Simplified63.2%
Taylor expanded in x2 around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6456.0%
Simplified56.0%
if -1.12e-69 < x1 < 4.19999999999999996e-163Initial program 99.5%
Taylor expanded in x1 around 0
*-lowering-*.f6468.8%
Simplified68.8%
Final simplification60.0%
(FPCore (x1 x2) :precision binary64 (let* ((t_0 (* 8.0 (* x1 (* x2 x2))))) (if (<= x1 -3.3e-87) t_0 (if (<= x1 6.42e-89) (* x2 -6.0) t_0))))
double code(double x1, double x2) {
double t_0 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -3.3e-87) {
tmp = t_0;
} else if (x1 <= 6.42e-89) {
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 = 8.0d0 * (x1 * (x2 * x2))
if (x1 <= (-3.3d-87)) then
tmp = t_0
else if (x1 <= 6.42d-89) 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 = 8.0 * (x1 * (x2 * x2));
double tmp;
if (x1 <= -3.3e-87) {
tmp = t_0;
} else if (x1 <= 6.42e-89) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x1, x2): t_0 = 8.0 * (x1 * (x2 * x2)) tmp = 0 if x1 <= -3.3e-87: tmp = t_0 elif x1 <= 6.42e-89: tmp = x2 * -6.0 else: tmp = t_0 return tmp
function code(x1, x2) t_0 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) tmp = 0.0 if (x1 <= -3.3e-87) tmp = t_0; elseif (x1 <= 6.42e-89) tmp = Float64(x2 * -6.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x1, x2) t_0 = 8.0 * (x1 * (x2 * x2)); tmp = 0.0; if (x1 <= -3.3e-87) tmp = t_0; elseif (x1 <= 6.42e-89) tmp = x2 * -6.0; else tmp = t_0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -3.3e-87], t$95$0, If[LessEqual[x1, 6.42e-89], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{if}\;x1 \leq -3.3 \cdot 10^{-87}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 6.42 \cdot 10^{-89}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -3.3e-87 or 6.42000000000000004e-89 < x1 Initial program 61.2%
Simplified61.3%
Taylor expanded in x1 around 0
Simplified61.7%
Taylor expanded in x2 around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6422.7%
Simplified22.7%
if -3.3e-87 < x1 < 6.42000000000000004e-89Initial program 99.3%
Taylor expanded in x1 around 0
*-lowering-*.f6459.8%
Simplified59.8%
Final simplification36.3%
(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 75.2%
Taylor expanded in x1 around 0
*-lowering-*.f6425.0%
Simplified25.0%
Final simplification25.0%
(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 75.2%
Taylor expanded in x1 around 0
*-lowering-*.f6424.9%
Simplified24.9%
Taylor expanded in x1 around inf
Simplified3.1%
herbie shell --seed 2024156
(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))))))