
(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 33 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* 3.0 x1) x1))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
(+
x1
(+
(+
(+
(+
(*
(+
(* (* (* 2.0 x1) t_2) (- t_2 3.0))
(* (* x1 x1) (- (* 4.0 t_2) 6.0)))
t_1)
(* t_0 t_2))
(* (* x1 x1) x1))
x1)
(* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = (3.0d0 * x1) * x1
t_1 = (x1 * x1) + 1.0d0
t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
double t_0 = (3.0 * x1) * x1;
double t_1 = (x1 * x1) + 1.0;
double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2): t_0 = (3.0 * x1) * x1 t_1 = (x1 * x1) + 1.0 t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1 return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2) t_0 = Float64(Float64(3.0 * x1) * x1) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1) return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) end
function tmp = code(x1, x2) t_0 = (3.0 * x1) * x1; t_1 = (x1 * x1) + 1.0; t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1; tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1))); end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}
\end{array}
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma 2.0 x2 (fma x1 (* x1 3.0) (- x1))))
(t_1 (/ t_0 (fma x1 x1 1.0))))
(if (<= x1 -1.5e+55)
(* 6.0 (pow x1 4.0))
(if (<= x1 1.25e+44)
(+
x1
(fma
(- (* x2 -2.0) x1)
3.0
(fma
(fma x1 x1 1.0)
(fma
x1
(* x1 (fma t_1 4.0 -6.0))
(/ (* (+ -3.0 t_1) (* (* x1 2.0) t_0)) (fma x1 x1 1.0)))
(fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1)))))
(*
(pow x1 4.0)
(+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) 9.0) x1) 3.0) x1)))))))
double code(double x1, double x2) {
double t_0 = fma(2.0, x2, fma(x1, (x1 * 3.0), -x1));
double t_1 = t_0 / fma(x1, x1, 1.0);
double tmp;
if (x1 <= -1.5e+55) {
tmp = 6.0 * pow(x1, 4.0);
} else if (x1 <= 1.25e+44) {
tmp = x1 + fma(((x2 * -2.0) - x1), 3.0, fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_1, 4.0, -6.0)), (((-3.0 + t_1) * ((x1 * 2.0) * t_0)) / fma(x1, x1, 1.0))), fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1))));
} else {
tmp = pow(x1, 4.0) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1));
}
return tmp;
}
function code(x1, x2) t_0 = fma(2.0, x2, fma(x1, Float64(x1 * 3.0), Float64(-x1))) t_1 = Float64(t_0 / fma(x1, x1, 1.0)) tmp = 0.0 if (x1 <= -1.5e+55) tmp = Float64(6.0 * (x1 ^ 4.0)); elseif (x1 <= 1.25e+44) tmp = Float64(x1 + fma(Float64(Float64(x2 * -2.0) - x1), 3.0, fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_1, 4.0, -6.0)), Float64(Float64(Float64(-3.0 + t_1) * Float64(Float64(x1 * 2.0) * t_0)) / fma(x1, x1, 1.0))), fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1))))); else tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(2.0 * x2 + N[(x1 * N[(x1 * 3.0), $MachinePrecision] + (-x1)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.5e+55], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 1.25e+44], N[(x1 + N[(N[(N[(x2 * -2.0), $MachinePrecision] - x1), $MachinePrecision] * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$1 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(-3.0 + t$95$1), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\\
t_1 := \frac{t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+55}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\mathbf{elif}\;x1 \leq 1.25 \cdot 10^{+44}:\\
\;\;\;\;x1 + \mathsf{fma}\left(x2 \cdot -2 - x1, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_1, 4, -6\right), \frac{\left(-3 + t\_1\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_0\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\
\end{array}
\end{array}
if x1 < -1.50000000000000008e55Initial program 9.6%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.5
Applied rewrites0.5%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64100.0
Applied rewrites100.0%
if -1.50000000000000008e55 < x1 < 1.2499999999999999e44Initial program 99.2%
Applied rewrites99.6%
Taylor expanded in x1 around inf
Applied rewrites36.8%
Taylor expanded in x1 around inf
Applied rewrites36.7%
Taylor expanded in x1 around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6499.7
Applied rewrites99.7%
if 1.2499999999999999e44 < x1 Initial program 37.6%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.4
Applied rewrites5.4%
Taylor expanded in x1 around -inf
lower-*.f64N/A
lower-pow.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites99.9%
Final simplification99.8%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 8.0 (* x1 (* x2 x2))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (/ t_3 (- -1.0 (* x1 x1))))
(t_5
(+
x1
(+
(+
x1
(-
(* x1 (* x1 x1))
(+
(* t_2 t_4)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_4)))
(* (* (* x1 2.0) (/ t_3 t_0)) (+ 3.0 t_4)))))))
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))))))
(if (<= t_5 -2e+292)
t_1
(if (<= t_5 -0.001)
(* x2 -6.0)
(if (<= t_5 0.0004)
(fma (* x1 9.0) x1 (- x1))
(if (<= t_5 5e+143)
(+ x1 (* x2 -6.0))
(if (<= t_5 INFINITY) t_1 (+ x1 (* (* x1 x1) 9.0)))))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 8.0 * (x1 * (x2 * x2));
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / (-1.0 - (x1 * x1));
double t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_2 * t_4) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * (t_3 / t_0)) * (3.0 + t_4))))))) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_5 <= -2e+292) {
tmp = t_1;
} else if (t_5 <= -0.001) {
tmp = x2 * -6.0;
} else if (t_5 <= 0.0004) {
tmp = fma((x1 * 9.0), x1, -x1);
} else if (t_5 <= 5e+143) {
tmp = x1 + (x2 * -6.0);
} else if (t_5 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x1 + ((x1 * x1) * 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / Float64(-1.0 - Float64(x1 * x1))) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_2 * t_4) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_3 / t_0)) * Float64(3.0 + t_4))))))) + Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_5 <= -2e+292) tmp = t_1; elseif (t_5 <= -0.001) tmp = Float64(x2 * -6.0); elseif (t_5 <= 0.0004) tmp = fma(Float64(x1 * 9.0), x1, Float64(-x1)); elseif (t_5 <= 5e+143) tmp = Float64(x1 + Float64(x2 * -6.0)); elseif (t_5 <= Inf) tmp = t_1; else tmp = Float64(x1 + Float64(Float64(x1 * x1) * 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$2 * t$95$4), $MachinePrecision] + N[(t$95$0 * 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] * N[(t$95$3 / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -2e+292], t$95$1, If[LessEqual[t$95$5, -0.001], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$5, 0.0004], N[(N[(x1 * 9.0), $MachinePrecision] * x1 + (-x1)), $MachinePrecision], If[LessEqual[t$95$5, 5e+143], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], t$95$1, N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{-1 - x1 \cdot x1}\\
t_5 := x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_2 \cdot t\_4 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_3}{t\_0}\right) \cdot \left(3 + t\_4\right)\right)\right)\right)\right) + 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_5 \leq -2 \cdot 10^{+292}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_5 \leq -0.001:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;t\_5 \leq 0.0004:\\
\;\;\;\;\mathsf{fma}\left(x1 \cdot 9, x1, -x1\right)\\
\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+143}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\
\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)))))) < -2e292 or 5.00000000000000012e143 < (+.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.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.7
Applied rewrites5.7%
Taylor expanded in x1 around 0
Applied rewrites52.9%
Taylor expanded in x2 around inf
Applied rewrites52.1%
if -2e292 < (+.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)))))) < -1e-3Initial program 99.7%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6467.2
Applied rewrites67.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6467.2
Applied rewrites67.2%
if -1e-3 < (+.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)))))) < 4.00000000000000019e-4Initial program 98.6%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6425.0
Applied rewrites25.0%
Taylor expanded in x1 around 0
Applied rewrites97.2%
Taylor expanded in x2 around 0
Applied rewrites69.1%
Applied rewrites69.2%
if 4.00000000000000019e-4 < (+.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)))))) < 5.00000000000000012e143Initial program 99.5%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6446.3
Applied rewrites46.3%
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 0
Applied rewrites69.8%
Taylor expanded in x1 around inf
Applied rewrites73.2%
Taylor expanded in x2 around 0
Applied rewrites80.5%
Final simplification67.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (fma x2 (* 8.0 (* x1 x2)) (* x1 (fma x1 9.0 -1.0))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (/ t_3 (- -1.0 (* x1 x1))))
(t_5
(+
x1
(+
(+
x1
(-
(* x1 (* x1 x1))
(+
(* t_2 t_4)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_4)))
(* (* (* x1 2.0) (/ t_3 t_0)) (+ 3.0 t_4)))))))
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))))))
(if (<= t_5 -1e+256)
t_1
(if (<= t_5 5e+143)
(fma x1 (fma x1 9.0 -1.0) (* x2 -6.0))
(if (<= t_5 INFINITY) t_1 (+ x1 (* (* x1 x1) 9.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = fma(x2, (8.0 * (x1 * x2)), (x1 * fma(x1, 9.0, -1.0)));
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / (-1.0 - (x1 * x1));
double t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_2 * t_4) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * (t_3 / t_0)) * (3.0 + t_4))))))) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_5 <= -1e+256) {
tmp = t_1;
} else if (t_5 <= 5e+143) {
tmp = fma(x1, fma(x1, 9.0, -1.0), (x2 * -6.0));
} else if (t_5 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x1 + ((x1 * x1) * 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = fma(x2, Float64(8.0 * Float64(x1 * x2)), Float64(x1 * fma(x1, 9.0, -1.0))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / Float64(-1.0 - Float64(x1 * x1))) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_2 * t_4) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_3 / t_0)) * Float64(3.0 + t_4))))))) + Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_5 <= -1e+256) tmp = t_1; elseif (t_5 <= 5e+143) tmp = fma(x1, fma(x1, 9.0, -1.0), Float64(x2 * -6.0)); elseif (t_5 <= Inf) tmp = t_1; else tmp = Float64(x1 + Float64(Float64(x1 * x1) * 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x2 * N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$2 * t$95$4), $MachinePrecision] + N[(t$95$0 * 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] * N[(t$95$3 / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -1e+256], t$95$1, If[LessEqual[t$95$5, 5e+143], N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], t$95$1, N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := \mathsf{fma}\left(x2, 8 \cdot \left(x1 \cdot x2\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{-1 - x1 \cdot x1}\\
t_5 := x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_2 \cdot t\_4 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_3}{t\_0}\right) \cdot \left(3 + t\_4\right)\right)\right)\right)\right) + 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_5 \leq -1 \cdot 10^{+256}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 9, -1\right), x2 \cdot -6\right)\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\
\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)))))) < -1e256 or 5.00000000000000012e143 < (+.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.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f647.9
Applied rewrites7.9%
Taylor expanded in x1 around 0
Applied rewrites49.3%
Taylor expanded in x2 around 0
Applied rewrites62.6%
Taylor expanded in x2 around inf
Applied rewrites57.7%
if -1e256 < (+.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)))))) < 5.00000000000000012e143Initial program 99.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6441.6
Applied rewrites41.6%
Taylor expanded in x1 around 0
Applied rewrites80.2%
Taylor expanded in x2 around 0
Applied rewrites83.1%
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 0
Applied rewrites69.8%
Taylor expanded in x1 around inf
Applied rewrites73.2%
Taylor expanded in x2 around 0
Applied rewrites80.5%
Final simplification76.0%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 (- -1.0 (* x1 x1))))
(t_4
(+
x1
(+
(+
x1
(-
(* x1 (* x1 x1))
(+
(* t_1 t_3)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_3)))
(* (* (* x1 2.0) (/ t_2 t_0)) (+ 3.0 t_3)))))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))))
(if (<= t_4 -2e+292)
(* 8.0 (* x1 (* x2 x2)))
(if (<= t_4 2e+41)
(fma x1 (fma x1 9.0 -1.0) (* x2 -6.0))
(if (<= t_4 INFINITY)
(+ x1 (fma x1 (* 8.0 (* x2 x2)) (* x2 -6.0)))
(+ x1 (* (* x1 x1) 9.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / (-1.0 - (x1 * x1));
double t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_1 * t_3) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_3))))))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_4 <= -2e+292) {
tmp = 8.0 * (x1 * (x2 * x2));
} else if (t_4 <= 2e+41) {
tmp = fma(x1, fma(x1, 9.0, -1.0), (x2 * -6.0));
} else if (t_4 <= ((double) INFINITY)) {
tmp = x1 + fma(x1, (8.0 * (x2 * x2)), (x2 * -6.0));
} else {
tmp = x1 + ((x1 * x1) * 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / Float64(-1.0 - Float64(x1 * x1))) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_1 * t_3) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_3))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_2 / t_0)) * Float64(3.0 + t_3))))))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_4 <= -2e+292) tmp = Float64(8.0 * Float64(x1 * Float64(x2 * x2))); elseif (t_4 <= 2e+41) tmp = fma(x1, fma(x1, 9.0, -1.0), Float64(x2 * -6.0)); elseif (t_4 <= Inf) tmp = Float64(x1 + fma(x1, Float64(8.0 * Float64(x2 * x2)), Float64(x2 * -6.0))); else tmp = Float64(x1 + Float64(Float64(x1 * x1) * 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$1 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -2e+292], N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+41], N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(x1 + N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{-1 - x1 \cdot x1}\\
t_4 := x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_1 \cdot t\_3 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_3\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_2}{t\_0}\right) \cdot \left(3 + t\_3\right)\right)\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_4 \leq -2 \cdot 10^{+292}:\\
\;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 9, -1\right), x2 \cdot -6\right)\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(x1, 8 \cdot \left(x2 \cdot x2\right), x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\
\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)))))) < -2e292Initial program 100.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.0
Applied rewrites5.0%
Taylor expanded in x1 around 0
Applied rewrites82.7%
Taylor expanded in x2 around inf
Applied rewrites82.7%
if -2e292 < (+.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)))))) < 2.00000000000000001e41Initial program 99.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6440.3
Applied rewrites40.3%
Taylor expanded in x1 around 0
Applied rewrites78.9%
Taylor expanded in x2 around 0
Applied rewrites84.5%
if 2.00000000000000001e41 < (+.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.7%
Taylor expanded in x1 around 0
Applied rewrites48.9%
Taylor expanded in x2 around inf
Applied rewrites48.1%
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 0
Applied rewrites69.8%
Taylor expanded in x1 around inf
Applied rewrites73.2%
Taylor expanded in x2 around 0
Applied rewrites80.5%
Final simplification74.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 (- -1.0 (* x1 x1))))
(t_4
(+
x1
(+
(+
x1
(-
(* x1 (* x1 x1))
(+
(* t_1 t_3)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_3)))
(* (* (* x1 2.0) (/ t_2 t_0)) (+ 3.0 t_3)))))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))))
(if (<= t_4 -2e+292)
(* 8.0 (* x1 (* x2 x2)))
(if (<= t_4 2e+41)
(fma x1 (fma x1 9.0 -1.0) (* x2 -6.0))
(if (<= t_4 INFINITY)
(fma x1 (* 8.0 (* x2 x2)) (* x2 -6.0))
(+ x1 (* (* x1 x1) 9.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / (-1.0 - (x1 * x1));
double t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_1 * t_3) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_3))))))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_4 <= -2e+292) {
tmp = 8.0 * (x1 * (x2 * x2));
} else if (t_4 <= 2e+41) {
tmp = fma(x1, fma(x1, 9.0, -1.0), (x2 * -6.0));
} else if (t_4 <= ((double) INFINITY)) {
tmp = fma(x1, (8.0 * (x2 * x2)), (x2 * -6.0));
} else {
tmp = x1 + ((x1 * x1) * 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / Float64(-1.0 - Float64(x1 * x1))) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_1 * t_3) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_3))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_2 / t_0)) * Float64(3.0 + t_3))))))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_4 <= -2e+292) tmp = Float64(8.0 * Float64(x1 * Float64(x2 * x2))); elseif (t_4 <= 2e+41) tmp = fma(x1, fma(x1, 9.0, -1.0), Float64(x2 * -6.0)); elseif (t_4 <= Inf) tmp = fma(x1, Float64(8.0 * Float64(x2 * x2)), Float64(x2 * -6.0)); else tmp = Float64(x1 + Float64(Float64(x1 * x1) * 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$1 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -2e+292], N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+41], N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(x1 * N[(8.0 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{-1 - x1 \cdot x1}\\
t_4 := x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_1 \cdot t\_3 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_3\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_2}{t\_0}\right) \cdot \left(3 + t\_3\right)\right)\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_4 \leq -2 \cdot 10^{+292}:\\
\;\;\;\;8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 9, -1\right), x2 \cdot -6\right)\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(x1, 8 \cdot \left(x2 \cdot x2\right), x2 \cdot -6\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\
\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)))))) < -2e292Initial program 100.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.0
Applied rewrites5.0%
Taylor expanded in x1 around 0
Applied rewrites82.7%
Taylor expanded in x2 around inf
Applied rewrites82.7%
if -2e292 < (+.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)))))) < 2.00000000000000001e41Initial program 99.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6440.3
Applied rewrites40.3%
Taylor expanded in x1 around 0
Applied rewrites78.9%
Taylor expanded in x2 around 0
Applied rewrites84.5%
if 2.00000000000000001e41 < (+.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.7%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6414.6
Applied rewrites14.6%
Taylor expanded in x1 around 0
Applied rewrites48.9%
Taylor expanded in x2 around inf
Applied rewrites47.8%
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 0
Applied rewrites69.8%
Taylor expanded in x1 around inf
Applied rewrites73.2%
Taylor expanded in x2 around 0
Applied rewrites80.5%
Final simplification74.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 8.0 (* x1 (* x2 x2))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (/ t_3 (- -1.0 (* x1 x1))))
(t_5
(+
x1
(+
(+
x1
(-
(* x1 (* x1 x1))
(+
(* t_2 t_4)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_4)))
(* (* (* x1 2.0) (/ t_3 t_0)) (+ 3.0 t_4)))))))
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))))))
(if (<= t_5 -2e+292)
t_1
(if (<= t_5 5e+143)
(fma x1 (fma x1 9.0 -1.0) (* x2 -6.0))
(if (<= t_5 INFINITY) (+ x1 t_1) (+ x1 (* (* x1 x1) 9.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 8.0 * (x1 * (x2 * x2));
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / (-1.0 - (x1 * x1));
double t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_2 * t_4) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * (t_3 / t_0)) * (3.0 + t_4))))))) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_5 <= -2e+292) {
tmp = t_1;
} else if (t_5 <= 5e+143) {
tmp = fma(x1, fma(x1, 9.0, -1.0), (x2 * -6.0));
} else if (t_5 <= ((double) INFINITY)) {
tmp = x1 + t_1;
} else {
tmp = x1 + ((x1 * x1) * 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / Float64(-1.0 - Float64(x1 * x1))) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_2 * t_4) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_3 / t_0)) * Float64(3.0 + t_4))))))) + Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_5 <= -2e+292) tmp = t_1; elseif (t_5 <= 5e+143) tmp = fma(x1, fma(x1, 9.0, -1.0), Float64(x2 * -6.0)); elseif (t_5 <= Inf) tmp = Float64(x1 + t_1); else tmp = Float64(x1 + Float64(Float64(x1 * x1) * 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$2 * t$95$4), $MachinePrecision] + N[(t$95$0 * 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] * N[(t$95$3 / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -2e+292], t$95$1, If[LessEqual[t$95$5, 5e+143], N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(x1 + t$95$1), $MachinePrecision], N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{-1 - x1 \cdot x1}\\
t_5 := x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_2 \cdot t\_4 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_3}{t\_0}\right) \cdot \left(3 + t\_4\right)\right)\right)\right)\right) + 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_5 \leq -2 \cdot 10^{+292}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 9, -1\right), x2 \cdot -6\right)\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;x1 + t\_1\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\
\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)))))) < -2e292Initial program 100.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.0
Applied rewrites5.0%
Taylor expanded in x1 around 0
Applied rewrites82.7%
Taylor expanded in x2 around inf
Applied rewrites82.7%
if -2e292 < (+.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)))))) < 5.00000000000000012e143Initial program 99.1%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6440.6
Applied rewrites40.6%
Taylor expanded in x1 around 0
Applied rewrites76.4%
Taylor expanded in x2 around 0
Applied rewrites79.5%
if 5.00000000000000012e143 < (+.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.7%
Taylor expanded in x1 around 0
Applied rewrites45.6%
Taylor expanded in x2 around inf
Applied rewrites45.1%
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 0
Applied rewrites69.8%
Taylor expanded in x1 around inf
Applied rewrites73.2%
Taylor expanded in x2 around 0
Applied rewrites80.5%
Final simplification73.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 8.0 (* x1 (* x2 x2))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (/ t_3 (- -1.0 (* x1 x1))))
(t_5
(+
x1
(+
(+
x1
(-
(* x1 (* x1 x1))
(+
(* t_2 t_4)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_4)))
(* (* (* x1 2.0) (/ t_3 t_0)) (+ 3.0 t_4)))))))
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))))))
(if (<= t_5 -2e+292)
t_1
(if (<= t_5 5e+143)
(fma x1 (fma x1 9.0 -1.0) (* x2 -6.0))
(if (<= t_5 INFINITY) t_1 (+ x1 (* (* x1 x1) 9.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 8.0 * (x1 * (x2 * x2));
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / (-1.0 - (x1 * x1));
double t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_2 * t_4) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * (t_3 / t_0)) * (3.0 + t_4))))))) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_5 <= -2e+292) {
tmp = t_1;
} else if (t_5 <= 5e+143) {
tmp = fma(x1, fma(x1, 9.0, -1.0), (x2 * -6.0));
} else if (t_5 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x1 + ((x1 * x1) * 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / Float64(-1.0 - Float64(x1 * x1))) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_2 * t_4) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_3 / t_0)) * Float64(3.0 + t_4))))))) + Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_5 <= -2e+292) tmp = t_1; elseif (t_5 <= 5e+143) tmp = fma(x1, fma(x1, 9.0, -1.0), Float64(x2 * -6.0)); elseif (t_5 <= Inf) tmp = t_1; else tmp = Float64(x1 + Float64(Float64(x1 * x1) * 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$2 * t$95$4), $MachinePrecision] + N[(t$95$0 * 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] * N[(t$95$3 / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -2e+292], t$95$1, If[LessEqual[t$95$5, 5e+143], N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], t$95$1, N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{-1 - x1 \cdot x1}\\
t_5 := x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_2 \cdot t\_4 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_3}{t\_0}\right) \cdot \left(3 + t\_4\right)\right)\right)\right)\right) + 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_5 \leq -2 \cdot 10^{+292}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{fma}\left(x1, \mathsf{fma}\left(x1, 9, -1\right), x2 \cdot -6\right)\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\
\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)))))) < -2e292 or 5.00000000000000012e143 < (+.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.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.7
Applied rewrites5.7%
Taylor expanded in x1 around 0
Applied rewrites52.9%
Taylor expanded in x2 around inf
Applied rewrites52.1%
if -2e292 < (+.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)))))) < 5.00000000000000012e143Initial program 99.1%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6440.6
Applied rewrites40.6%
Taylor expanded in x1 around 0
Applied rewrites76.4%
Taylor expanded in x2 around 0
Applied rewrites79.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 0
Applied rewrites69.8%
Taylor expanded in x1 around inf
Applied rewrites73.2%
Taylor expanded in x2 around 0
Applied rewrites80.5%
Final simplification73.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* 8.0 (* x1 (* x2 x2))))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (/ t_3 (- -1.0 (* x1 x1))))
(t_5
(+
x1
(+
(+
x1
(-
(* x1 (* x1 x1))
(+
(* t_2 t_4)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_4)))
(* (* (* x1 2.0) (/ t_3 t_0)) (+ 3.0 t_4)))))))
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_0))))))
(if (<= t_5 -2e+292)
t_1
(if (<= t_5 5e+143)
(fma x2 -6.0 (* x1 (fma x1 9.0 -1.0)))
(if (<= t_5 INFINITY) t_1 (+ x1 (* (* x1 x1) 9.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = 8.0 * (x1 * (x2 * x2));
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / (-1.0 - (x1 * x1));
double t_5 = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_2 * t_4) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * (t_3 / t_0)) * (3.0 + t_4))))))) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_5 <= -2e+292) {
tmp = t_1;
} else if (t_5 <= 5e+143) {
tmp = fma(x2, -6.0, (x1 * fma(x1, 9.0, -1.0)));
} else if (t_5 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x1 + ((x1 * x1) * 9.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(8.0 * Float64(x1 * Float64(x2 * x2))) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / Float64(-1.0 - Float64(x1 * x1))) t_5 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_2 * t_4) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_3 / t_0)) * Float64(3.0 + t_4))))))) + Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_5 <= -2e+292) tmp = t_1; elseif (t_5 <= 5e+143) tmp = fma(x2, -6.0, Float64(x1 * fma(x1, 9.0, -1.0))); elseif (t_5 <= Inf) tmp = t_1; else tmp = Float64(x1 + Float64(Float64(x1 * x1) * 9.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$2 * t$95$4), $MachinePrecision] + N[(t$95$0 * 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] * N[(t$95$3 / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -2e+292], t$95$1, If[LessEqual[t$95$5, 5e+143], N[(x2 * -6.0 + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], t$95$1, N[(x1 + N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{-1 - x1 \cdot x1}\\
t_5 := x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_2 \cdot t\_4 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_3}{t\_0}\right) \cdot \left(3 + t\_4\right)\right)\right)\right)\right) + 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_5 \leq -2 \cdot 10^{+292}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+143}:\\
\;\;\;\;\mathsf{fma}\left(x2, -6, x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x1 + \left(x1 \cdot x1\right) \cdot 9\\
\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)))))) < -2e292 or 5.00000000000000012e143 < (+.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.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.7
Applied rewrites5.7%
Taylor expanded in x1 around 0
Applied rewrites52.9%
Taylor expanded in x2 around inf
Applied rewrites52.1%
if -2e292 < (+.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)))))) < 5.00000000000000012e143Initial program 99.1%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6440.6
Applied rewrites40.6%
Taylor expanded in x1 around 0
Applied rewrites76.4%
Taylor expanded in x2 around 0
Applied rewrites88.5%
Taylor expanded in x1 around 0
Applied rewrites79.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 0
Applied rewrites69.8%
Taylor expanded in x1 around inf
Applied rewrites73.2%
Taylor expanded in x2 around 0
Applied rewrites80.5%
Final simplification73.9%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (+ (* x1 x1) 1.0))
(t_1 (* x1 (* x1 3.0)))
(t_2 (- (+ t_1 (* 2.0 x2)) x1))
(t_3 (/ t_2 (- -1.0 (* x1 x1))))
(t_4
(+
x1
(+
(+
x1
(-
(* x1 (* x1 x1))
(+
(* t_1 t_3)
(*
t_0
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_3)))
(* (* (* x1 2.0) (/ t_2 t_0)) (+ 3.0 t_3)))))))
(* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_0))))))
(if (<= t_4 -0.001)
(* x2 -6.0)
(if (<= t_4 0.0004)
(- x1)
(if (<= t_4 5e+256) (+ x1 (* x2 -6.0)) (* (* x1 x1) 9.0))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / (-1.0 - (x1 * x1));
double t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_1 * t_3) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_3))))))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_4 <= -0.001) {
tmp = x2 * -6.0;
} else if (t_4 <= 0.0004) {
tmp = -x1;
} else if (t_4 <= 5e+256) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = (x1 * x1) * 9.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = (x1 * x1) + 1.0d0
t_1 = x1 * (x1 * 3.0d0)
t_2 = (t_1 + (2.0d0 * x2)) - x1
t_3 = t_2 / ((-1.0d0) - (x1 * x1))
t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_1 * t_3) + (t_0 * (((x1 * x1) * (6.0d0 + (4.0d0 * t_3))) + (((x1 * 2.0d0) * (t_2 / t_0)) * (3.0d0 + t_3))))))) + (3.0d0 * (((t_1 - (2.0d0 * x2)) - x1) / t_0)))
if (t_4 <= (-0.001d0)) then
tmp = x2 * (-6.0d0)
else if (t_4 <= 0.0004d0) then
tmp = -x1
else if (t_4 <= 5d+256) then
tmp = x1 + (x2 * (-6.0d0))
else
tmp = (x1 * x1) * 9.0d0
end if
code = tmp
end function
public static double code(double x1, double x2) {
double t_0 = (x1 * x1) + 1.0;
double t_1 = x1 * (x1 * 3.0);
double t_2 = (t_1 + (2.0 * x2)) - x1;
double t_3 = t_2 / (-1.0 - (x1 * x1));
double t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_1 * t_3) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_3))))))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0)));
double tmp;
if (t_4 <= -0.001) {
tmp = x2 * -6.0;
} else if (t_4 <= 0.0004) {
tmp = -x1;
} else if (t_4 <= 5e+256) {
tmp = x1 + (x2 * -6.0);
} else {
tmp = (x1 * x1) * 9.0;
}
return tmp;
}
def code(x1, x2): t_0 = (x1 * x1) + 1.0 t_1 = x1 * (x1 * 3.0) t_2 = (t_1 + (2.0 * x2)) - x1 t_3 = t_2 / (-1.0 - (x1 * x1)) t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_1 * t_3) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_3))))))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))) tmp = 0 if t_4 <= -0.001: tmp = x2 * -6.0 elif t_4 <= 0.0004: tmp = -x1 elif t_4 <= 5e+256: tmp = x1 + (x2 * -6.0) else: tmp = (x1 * x1) * 9.0 return tmp
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) + 1.0) t_1 = Float64(x1 * Float64(x1 * 3.0)) t_2 = Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) t_3 = Float64(t_2 / Float64(-1.0 - Float64(x1 * x1))) t_4 = Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_1 * t_3) + Float64(t_0 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_3))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_2 / t_0)) * Float64(3.0 + t_3))))))) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_0)))) tmp = 0.0 if (t_4 <= -0.001) tmp = Float64(x2 * -6.0); elseif (t_4 <= 0.0004) tmp = Float64(-x1); elseif (t_4 <= 5e+256) tmp = Float64(x1 + Float64(x2 * -6.0)); else tmp = Float64(Float64(x1 * x1) * 9.0); end return tmp end
function tmp_2 = code(x1, x2) t_0 = (x1 * x1) + 1.0; t_1 = x1 * (x1 * 3.0); t_2 = (t_1 + (2.0 * x2)) - x1; t_3 = t_2 / (-1.0 - (x1 * x1)); t_4 = x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_1 * t_3) + (t_0 * (((x1 * x1) * (6.0 + (4.0 * t_3))) + (((x1 * 2.0) * (t_2 / t_0)) * (3.0 + t_3))))))) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_0))); tmp = 0.0; if (t_4 <= -0.001) tmp = x2 * -6.0; elseif (t_4 <= 0.0004) tmp = -x1; elseif (t_4 <= 5e+256) tmp = x1 + (x2 * -6.0); else tmp = (x1 * x1) * 9.0; end tmp_2 = tmp; end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$1 * t$95$3), $MachinePrecision] + N[(t$95$0 * N[(N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -0.001], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[t$95$4, 0.0004], (-x1), If[LessEqual[t$95$4, 5e+256], N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot x1 + 1\\
t_1 := x1 \cdot \left(x1 \cdot 3\right)\\
t_2 := \left(t\_1 + 2 \cdot x2\right) - x1\\
t_3 := \frac{t\_2}{-1 - x1 \cdot x1}\\
t_4 := x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_1 \cdot t\_3 + t\_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_3\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_2}{t\_0}\right) \cdot \left(3 + t\_3\right)\right)\right)\right)\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_0}\right)\\
\mathbf{if}\;t\_4 \leq -0.001:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;t\_4 \leq 0.0004:\\
\;\;\;\;-x1\\
\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+256}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;\left(x1 \cdot x1\right) \cdot 9\\
\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)))))) < -1e-3Initial program 99.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6450.5
Applied rewrites50.5%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6450.5
Applied rewrites50.5%
if -1e-3 < (+.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)))))) < 4.00000000000000019e-4Initial program 98.6%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6425.0
Applied rewrites25.0%
Taylor expanded in x1 around 0
Applied rewrites97.2%
Taylor expanded in x2 around 0
Applied rewrites69.1%
Taylor expanded in x1 around 0
Applied rewrites64.5%
if 4.00000000000000019e-4 < (+.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)))))) < 5.00000000000000015e256Initial program 99.4%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6432.7
Applied rewrites32.7%
if 5.00000000000000015e256 < (+.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 25.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f642.8
Applied rewrites2.8%
Taylor expanded in x1 around 0
Applied rewrites66.5%
Taylor expanded in x2 around 0
Applied rewrites60.8%
Taylor expanded in x1 around inf
Applied rewrites60.9%
Final simplification56.1%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (/ (fma x1 (fma 3.0 x1 -1.0) (* 2.0 x2)) (fma x1 x1 1.0)))
(t_1 (+ (* x1 x1) 1.0))
(t_2 (* x1 (* x1 3.0)))
(t_3 (- (+ t_2 (* 2.0 x2)) x1))
(t_4 (/ t_3 (- -1.0 (* x1 x1)))))
(if (<=
(+
x1
(+
(+
x1
(-
(* x1 (* x1 x1))
(+
(* t_2 t_4)
(*
t_1
(+
(* (* x1 x1) (+ 6.0 (* 4.0 t_4)))
(* (* (* x1 2.0) (/ t_3 t_1)) (+ 3.0 t_4)))))))
(* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_1))))
INFINITY)
(+
x1
(fma
(/ (- (fma 3.0 (* x1 x1) (* x2 -2.0)) x1) (fma x1 x1 1.0))
3.0
(fma
(fma x1 (* x1 (fma 4.0 t_0 -6.0)) (* (* (* x1 2.0) t_0) (+ t_0 -3.0)))
(fma x1 x1 1.0)
(fma x1 (fma t_0 (* x1 3.0) (* x1 x1)) x1))))
(* 6.0 (pow x1 4.0)))))
double code(double x1, double x2) {
double t_0 = fma(x1, fma(3.0, x1, -1.0), (2.0 * x2)) / fma(x1, x1, 1.0);
double t_1 = (x1 * x1) + 1.0;
double t_2 = x1 * (x1 * 3.0);
double t_3 = (t_2 + (2.0 * x2)) - x1;
double t_4 = t_3 / (-1.0 - (x1 * x1));
double tmp;
if ((x1 + ((x1 + ((x1 * (x1 * x1)) - ((t_2 * t_4) + (t_1 * (((x1 * x1) * (6.0 + (4.0 * t_4))) + (((x1 * 2.0) * (t_3 / t_1)) * (3.0 + t_4))))))) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_1)))) <= ((double) INFINITY)) {
tmp = x1 + fma(((fma(3.0, (x1 * x1), (x2 * -2.0)) - x1) / fma(x1, x1, 1.0)), 3.0, fma(fma(x1, (x1 * fma(4.0, t_0, -6.0)), (((x1 * 2.0) * t_0) * (t_0 + -3.0))), fma(x1, x1, 1.0), fma(x1, fma(t_0, (x1 * 3.0), (x1 * x1)), x1)));
} else {
tmp = 6.0 * pow(x1, 4.0);
}
return tmp;
}
function code(x1, x2) t_0 = Float64(fma(x1, fma(3.0, x1, -1.0), Float64(2.0 * x2)) / fma(x1, x1, 1.0)) t_1 = Float64(Float64(x1 * x1) + 1.0) t_2 = Float64(x1 * Float64(x1 * 3.0)) t_3 = Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) t_4 = Float64(t_3 / Float64(-1.0 - Float64(x1 * x1))) tmp = 0.0 if (Float64(x1 + Float64(Float64(x1 + Float64(Float64(x1 * Float64(x1 * x1)) - Float64(Float64(t_2 * t_4) + Float64(t_1 * Float64(Float64(Float64(x1 * x1) * Float64(6.0 + Float64(4.0 * t_4))) + Float64(Float64(Float64(x1 * 2.0) * Float64(t_3 / t_1)) * Float64(3.0 + t_4))))))) + Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_1)))) <= Inf) tmp = Float64(x1 + fma(Float64(Float64(fma(3.0, Float64(x1 * x1), Float64(x2 * -2.0)) - x1) / fma(x1, x1, 1.0)), 3.0, fma(fma(x1, Float64(x1 * fma(4.0, t_0, -6.0)), Float64(Float64(Float64(x1 * 2.0) * t_0) * Float64(t_0 + -3.0))), fma(x1, x1, 1.0), fma(x1, fma(t_0, Float64(x1 * 3.0), Float64(x1 * x1)), x1)))); else tmp = Float64(6.0 * (x1 ^ 4.0)); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * N[(3.0 * x1 + -1.0), $MachinePrecision] + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(x1 + N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$2 * t$95$4), $MachinePrecision] + N[(t$95$1 * 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] * N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision] * N[(3.0 + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(x1 + N[(N[(N[(N[(3.0 * N[(x1 * x1), $MachinePrecision] + N[(x2 * -2.0), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 3.0 + N[(N[(x1 * N[(x1 * N[(4.0 * t$95$0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(t$95$0 + -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x1 * x1 + 1.0), $MachinePrecision] + N[(x1 * N[(t$95$0 * N[(x1 * 3.0), $MachinePrecision] + N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x1, \mathsf{fma}\left(3, x1, -1\right), 2 \cdot x2\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot \left(x1 \cdot 3\right)\\
t_3 := \left(t\_2 + 2 \cdot x2\right) - x1\\
t_4 := \frac{t\_3}{-1 - x1 \cdot x1}\\
\mathbf{if}\;x1 + \left(\left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) - \left(t\_2 \cdot t\_4 + t\_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(6 + 4 \cdot t\_4\right) + \left(\left(x1 \cdot 2\right) \cdot \frac{t\_3}{t\_1}\right) \cdot \left(3 + t\_4\right)\right)\right)\right)\right) + 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\
\;\;\;\;x1 + \mathsf{fma}\left(\frac{\mathsf{fma}\left(3, x1 \cdot x1, x2 \cdot -2\right) - x1}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(4, t\_0, -6\right), \left(\left(x1 \cdot 2\right) \cdot t\_0\right) \cdot \left(t\_0 + -3\right)\right), \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, \mathsf{fma}\left(t\_0, x1 \cdot 3, x1 \cdot x1\right), x1\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.3%
Applied rewrites95.4%
Applied rewrites99.6%
if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f642.7
Applied rewrites2.7%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64100.0
Applied rewrites100.0%
Final simplification99.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma 2.0 x2 (fma x1 (* x1 3.0) (- x1)))))
(if (<= x1 -1.5e+55)
(* 6.0 (pow x1 4.0))
(if (<= x1 -0.00125)
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(fma
x1
(*
x1
(fma
(/ (fma (* x1 x1) 3.0 (- (* 2.0 x2) x1)) (fma x1 x1 1.0))
4.0
-6.0))
(/
(* (+ -3.0 (/ t_0 (fma x1 x1 1.0))) (* (* x1 2.0) t_0))
(fma x1 x1 1.0)))
(fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1)))))
(if (<= x1 650.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
(*
(pow x1 4.0)
(+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) 9.0) x1) 3.0) x1))))))))
double code(double x1, double x2) {
double t_0 = fma(2.0, x2, fma(x1, (x1 * 3.0), -x1));
double tmp;
if (x1 <= -1.5e+55) {
tmp = 6.0 * pow(x1, 4.0);
} else if (x1 <= -0.00125) {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma((fma((x1 * x1), 3.0, ((2.0 * x2) - x1)) / fma(x1, x1, 1.0)), 4.0, -6.0)), (((-3.0 + (t_0 / fma(x1, x1, 1.0))) * ((x1 * 2.0) * t_0)) / fma(x1, x1, 1.0))), fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1))));
} else if (x1 <= 650.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = pow(x1, 4.0) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1));
}
return tmp;
}
function code(x1, x2) t_0 = fma(2.0, x2, fma(x1, Float64(x1 * 3.0), Float64(-x1))) tmp = 0.0 if (x1 <= -1.5e+55) tmp = Float64(6.0 * (x1 ^ 4.0)); elseif (x1 <= -0.00125) tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(Float64(fma(Float64(x1 * x1), 3.0, Float64(Float64(2.0 * x2) - x1)) / fma(x1, x1, 1.0)), 4.0, -6.0)), Float64(Float64(Float64(-3.0 + Float64(t_0 / fma(x1, x1, 1.0))) * Float64(Float64(x1 * 2.0) * t_0)) / fma(x1, x1, 1.0))), fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1))))); elseif (x1 <= 650.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(2.0 * x2 + N[(x1 * N[(x1 * 3.0), $MachinePrecision] + (-x1)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.5e+55], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.00125], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(N[(N[(N[(x1 * x1), $MachinePrecision] * 3.0 + N[(N[(2.0 * x2), $MachinePrecision] - x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(-3.0 + N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 650.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\\
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+55}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\mathbf{elif}\;x1 \leq -0.00125:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(\frac{\mathsf{fma}\left(x1 \cdot x1, 3, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), \frac{\left(-3 + \frac{t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_0\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 650:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\
\end{array}
\end{array}
if x1 < -1.50000000000000008e55Initial program 9.6%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.5
Applied rewrites0.5%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64100.0
Applied rewrites100.0%
if -1.50000000000000008e55 < x1 < -0.00125000000000000003Initial program 99.4%
Applied rewrites99.4%
Taylor expanded in x1 around inf
Applied rewrites95.1%
Taylor expanded in x1 around inf
Applied rewrites94.7%
lift-fma.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
lift-neg.f64N/A
associate-+r+N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-neg.f64N/A
sub-negN/A
associate--l+N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
Applied rewrites94.8%
if -0.00125000000000000003 < x1 < 650Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6438.3
Applied rewrites38.3%
Taylor expanded in x1 around 0
Applied rewrites83.8%
Taylor expanded in x2 around 0
Applied rewrites97.9%
Taylor expanded in x1 around 0
Applied rewrites97.9%
if 650 < x1 Initial program 42.9%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.3
Applied rewrites5.3%
Taylor expanded in x1 around -inf
lower-*.f64N/A
lower-pow.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites95.1%
Final simplification97.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma 2.0 x2 (fma x1 (* x1 3.0) (- x1))))
(t_1 (/ t_0 (fma x1 x1 1.0))))
(if (<= x1 -1.5e+55)
(* 6.0 (pow x1 4.0))
(if (<= x1 -0.00125)
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(fma
x1
(* x1 (fma t_1 4.0 -6.0))
(/ (* (+ -3.0 t_1) (* (* x1 2.0) t_0)) (fma x1 x1 1.0)))
(fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1)))))
(if (<= x1 650.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
(*
(pow x1 4.0)
(+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) 9.0) x1) 3.0) x1))))))))
double code(double x1, double x2) {
double t_0 = fma(2.0, x2, fma(x1, (x1 * 3.0), -x1));
double t_1 = t_0 / fma(x1, x1, 1.0);
double tmp;
if (x1 <= -1.5e+55) {
tmp = 6.0 * pow(x1, 4.0);
} else if (x1 <= -0.00125) {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_1, 4.0, -6.0)), (((-3.0 + t_1) * ((x1 * 2.0) * t_0)) / fma(x1, x1, 1.0))), fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1))));
} else if (x1 <= 650.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = pow(x1, 4.0) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1));
}
return tmp;
}
function code(x1, x2) t_0 = fma(2.0, x2, fma(x1, Float64(x1 * 3.0), Float64(-x1))) t_1 = Float64(t_0 / fma(x1, x1, 1.0)) tmp = 0.0 if (x1 <= -1.5e+55) tmp = Float64(6.0 * (x1 ^ 4.0)); elseif (x1 <= -0.00125) tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_1, 4.0, -6.0)), Float64(Float64(Float64(-3.0 + t_1) * Float64(Float64(x1 * 2.0) * t_0)) / fma(x1, x1, 1.0))), fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1))))); elseif (x1 <= 650.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(2.0 * x2 + N[(x1 * N[(x1 * 3.0), $MachinePrecision] + (-x1)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.5e+55], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.00125], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$1 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(-3.0 + t$95$1), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 650.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\\
t_1 := \frac{t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+55}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\mathbf{elif}\;x1 \leq -0.00125:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_1, 4, -6\right), \frac{\left(-3 + t\_1\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_0\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 650:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\
\end{array}
\end{array}
if x1 < -1.50000000000000008e55Initial program 9.6%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.5
Applied rewrites0.5%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64100.0
Applied rewrites100.0%
if -1.50000000000000008e55 < x1 < -0.00125000000000000003Initial program 99.4%
Applied rewrites99.4%
Taylor expanded in x1 around inf
Applied rewrites95.1%
Taylor expanded in x1 around inf
Applied rewrites94.7%
if -0.00125000000000000003 < x1 < 650Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6438.3
Applied rewrites38.3%
Taylor expanded in x1 around 0
Applied rewrites83.8%
Taylor expanded in x2 around 0
Applied rewrites97.9%
Taylor expanded in x1 around 0
Applied rewrites97.9%
if 650 < x1 Initial program 42.9%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.3
Applied rewrites5.3%
Taylor expanded in x1 around -inf
lower-*.f64N/A
lower-pow.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites95.1%
Final simplification97.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma 2.0 x2 (fma x1 (* x1 3.0) (- x1)))))
(if (<= x1 -1.5e+55)
(* 6.0 (pow x1 4.0))
(if (<= x1 -0.95)
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(fma
x1
(* x1 (fma (/ t_0 (fma x1 x1 1.0)) 4.0 -6.0))
(/
(* (* (* x1 2.0) t_0) (/ (+ -1.0 (/ (fma x2 2.0 -3.0) x1)) x1))
(fma x1 x1 1.0)))
(fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1)))))
(if (<= x1 650.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
(*
(pow x1 4.0)
(+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) 9.0) x1) 3.0) x1))))))))
double code(double x1, double x2) {
double t_0 = fma(2.0, x2, fma(x1, (x1 * 3.0), -x1));
double tmp;
if (x1 <= -1.5e+55) {
tmp = 6.0 * pow(x1, 4.0);
} else if (x1 <= -0.95) {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma((t_0 / fma(x1, x1, 1.0)), 4.0, -6.0)), ((((x1 * 2.0) * t_0) * ((-1.0 + (fma(x2, 2.0, -3.0) / x1)) / x1)) / fma(x1, x1, 1.0))), fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1))));
} else if (x1 <= 650.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = pow(x1, 4.0) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1));
}
return tmp;
}
function code(x1, x2) t_0 = fma(2.0, x2, fma(x1, Float64(x1 * 3.0), Float64(-x1))) tmp = 0.0 if (x1 <= -1.5e+55) tmp = Float64(6.0 * (x1 ^ 4.0)); elseif (x1 <= -0.95) tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(Float64(t_0 / fma(x1, x1, 1.0)), 4.0, -6.0)), Float64(Float64(Float64(Float64(x1 * 2.0) * t_0) * Float64(Float64(-1.0 + Float64(fma(x2, 2.0, -3.0) / x1)) / x1)) / fma(x1, x1, 1.0))), fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1))))); elseif (x1 <= 650.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(2.0 * x2 + N[(x1 * N[(x1 * 3.0), $MachinePrecision] + (-x1)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.5e+55], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.95], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(x1 * 2.0), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(N[(-1.0 + N[(N[(x2 * 2.0 + -3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 650.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\\
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+55}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\mathbf{elif}\;x1 \leq -0.95:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(\frac{t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), \frac{\left(\left(x1 \cdot 2\right) \cdot t\_0\right) \cdot \frac{-1 + \frac{\mathsf{fma}\left(x2, 2, -3\right)}{x1}}{x1}}{\mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 650:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\
\end{array}
\end{array}
if x1 < -1.50000000000000008e55Initial program 9.6%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.5
Applied rewrites0.5%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64100.0
Applied rewrites100.0%
if -1.50000000000000008e55 < x1 < -0.94999999999999996Initial program 99.4%
Applied rewrites99.4%
Taylor expanded in x1 around inf
Applied rewrites95.1%
Taylor expanded in x1 around inf
Applied rewrites94.7%
Taylor expanded in x1 around -inf
Applied rewrites94.6%
if -0.94999999999999996 < x1 < 650Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6438.3
Applied rewrites38.3%
Taylor expanded in x1 around 0
Applied rewrites83.8%
Taylor expanded in x2 around 0
Applied rewrites97.9%
Taylor expanded in x1 around 0
Applied rewrites97.9%
if 650 < x1 Initial program 42.9%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.3
Applied rewrites5.3%
Taylor expanded in x1 around -inf
lower-*.f64N/A
lower-pow.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites95.1%
Final simplification97.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma 2.0 x2 (fma x1 (* x1 3.0) (- x1))))
(t_1 (/ t_0 (fma x1 x1 1.0))))
(if (<= x1 -1.5e+55)
(* 6.0 (pow x1 4.0))
(if (<= x1 -0.00125)
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(fma
x1
(* x1 (fma t_1 4.0 -6.0))
(/ (* (+ -3.0 t_1) (* (* x1 2.0) t_0)) (fma x1 x1 1.0)))
(* x1 (* x1 x1)))))
(if (<= x1 650.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
(*
(pow x1 4.0)
(+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) 9.0) x1) 3.0) x1))))))))
double code(double x1, double x2) {
double t_0 = fma(2.0, x2, fma(x1, (x1 * 3.0), -x1));
double t_1 = t_0 / fma(x1, x1, 1.0);
double tmp;
if (x1 <= -1.5e+55) {
tmp = 6.0 * pow(x1, 4.0);
} else if (x1 <= -0.00125) {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma(t_1, 4.0, -6.0)), (((-3.0 + t_1) * ((x1 * 2.0) * t_0)) / fma(x1, x1, 1.0))), (x1 * (x1 * x1))));
} else if (x1 <= 650.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = pow(x1, 4.0) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1));
}
return tmp;
}
function code(x1, x2) t_0 = fma(2.0, x2, fma(x1, Float64(x1 * 3.0), Float64(-x1))) t_1 = Float64(t_0 / fma(x1, x1, 1.0)) tmp = 0.0 if (x1 <= -1.5e+55) tmp = Float64(6.0 * (x1 ^ 4.0)); elseif (x1 <= -0.00125) tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(t_1, 4.0, -6.0)), Float64(Float64(Float64(-3.0 + t_1) * Float64(Float64(x1 * 2.0) * t_0)) / fma(x1, x1, 1.0))), Float64(x1 * Float64(x1 * x1))))); elseif (x1 <= 650.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(2.0 * x2 + N[(x1 * N[(x1 * 3.0), $MachinePrecision] + (-x1)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.5e+55], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.00125], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(t$95$1 * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(-3.0 + t$95$1), $MachinePrecision] * N[(N[(x1 * 2.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 650.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)\\
t_1 := \frac{t\_0}{\mathsf{fma}\left(x1, x1, 1\right)}\\
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+55}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\mathbf{elif}\;x1 \leq -0.00125:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(t\_1, 4, -6\right), \frac{\left(-3 + t\_1\right) \cdot \left(\left(x1 \cdot 2\right) \cdot t\_0\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right), x1 \cdot \left(x1 \cdot x1\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 650:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\
\end{array}
\end{array}
if x1 < -1.50000000000000008e55Initial program 9.6%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.5
Applied rewrites0.5%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64100.0
Applied rewrites100.0%
if -1.50000000000000008e55 < x1 < -0.00125000000000000003Initial program 99.4%
Applied rewrites99.4%
Taylor expanded in x1 around inf
Applied rewrites95.1%
Taylor expanded in x1 around inf
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6494.0
Applied rewrites94.0%
if -0.00125000000000000003 < x1 < 650Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6438.3
Applied rewrites38.3%
Taylor expanded in x1 around 0
Applied rewrites83.8%
Taylor expanded in x2 around 0
Applied rewrites97.9%
Taylor expanded in x1 around 0
Applied rewrites97.9%
if 650 < x1 Initial program 42.9%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.3
Applied rewrites5.3%
Taylor expanded in x1 around -inf
lower-*.f64N/A
lower-pow.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites95.1%
Final simplification97.6%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(*
(pow x1 4.0)
(+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) 9.0) x1) 3.0) x1)))))
(if (<= x1 -6.5e+46)
t_0
(if (<= x1 -0.0013)
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(fma
x1
(*
x1
(fma
(/ (fma 2.0 x2 (fma x1 (* x1 3.0) (- x1))) (fma x1 x1 1.0))
4.0
-6.0))
(/ (* 8.0 (* x1 (* x2 x2))) (* (fma x1 x1 1.0) (fma x1 x1 1.0))))
(fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1)))))
(if (<= x1 650.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
t_0)))))
double code(double x1, double x2) {
double t_0 = pow(x1, 4.0) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1));
double tmp;
if (x1 <= -6.5e+46) {
tmp = t_0;
} else if (x1 <= -0.0013) {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma((fma(2.0, x2, fma(x1, (x1 * 3.0), -x1)) / fma(x1, x1, 1.0)), 4.0, -6.0)), ((8.0 * (x1 * (x2 * x2))) / (fma(x1, x1, 1.0) * fma(x1, x1, 1.0)))), fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1))));
} else if (x1 <= 650.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), 9.0) / x1) - 3.0) / x1))) tmp = 0.0 if (x1 <= -6.5e+46) tmp = t_0; elseif (x1 <= -0.0013) tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(Float64(fma(2.0, x2, fma(x1, Float64(x1 * 3.0), Float64(-x1))) / fma(x1, x1, 1.0)), 4.0, -6.0)), Float64(Float64(8.0 * Float64(x1 * Float64(x2 * x2))) / Float64(fma(x1, x1, 1.0) * fma(x1, x1, 1.0)))), fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1))))); elseif (x1 <= 650.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + 9.0), $MachinePrecision] / x1), $MachinePrecision] - 3.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -6.5e+46], t$95$0, If[LessEqual[x1, -0.0013], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(N[(N[(2.0 * x2 + N[(x1 * N[(x1 * 3.0), $MachinePrecision] + (-x1)), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 650.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x1}^{4} \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), 9\right)}{x1} - 3}{x1}\right)\\
\mathbf{if}\;x1 \leq -6.5 \cdot 10^{+46}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -0.0013:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), \frac{8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right) \cdot \mathsf{fma}\left(x1, x1, 1\right)}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 650:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -6.50000000000000008e46 or 650 < x1 Initial program 26.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f642.8
Applied rewrites2.8%
Taylor expanded in x1 around -inf
lower-*.f64N/A
lower-pow.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites97.5%
if -6.50000000000000008e46 < x1 < -0.0012999999999999999Initial program 99.4%
Applied rewrites99.3%
Taylor expanded in x1 around inf
Applied rewrites94.7%
Taylor expanded in x1 around inf
Applied rewrites94.3%
Taylor expanded in x2 around inf
associate-*r/N/A
associate-*r*N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6494.2
Applied rewrites94.2%
if -0.0012999999999999999 < x1 < 650Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6438.3
Applied rewrites38.3%
Taylor expanded in x1 around 0
Applied rewrites83.8%
Taylor expanded in x2 around 0
Applied rewrites97.9%
Taylor expanded in x1 around 0
Applied rewrites97.9%
Final simplification97.5%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1))))
(if (<= x1 -1.5e+55)
(* 6.0 (pow x1 4.0))
(if (<= x1 -0.0013)
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(fma
x1
(*
x1
(fma
(/ (fma 2.0 x2 (fma x1 (* x1 3.0) (- x1))) (fma x1 x1 1.0))
4.0
-6.0))
(/ (* 8.0 (* x1 (* x2 x2))) (* (fma x1 x1 1.0) (fma x1 x1 1.0))))
t_0)))
(if (<= x1 650.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(*
(* x1 x1)
(+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) -6.0) x1) 4.0) x1)))
t_0))))))))
double code(double x1, double x2) {
double t_0 = fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1));
double tmp;
if (x1 <= -1.5e+55) {
tmp = 6.0 * pow(x1, 4.0);
} else if (x1 <= -0.0013) {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), fma(x1, (x1 * fma((fma(2.0, x2, fma(x1, (x1 * 3.0), -x1)) / fma(x1, x1, 1.0)), 4.0, -6.0)), ((8.0 * (x1 * (x2 * x2))) / (fma(x1, x1, 1.0) * fma(x1, x1, 1.0)))), t_0));
} else if (x1 <= 650.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), ((x1 * x1) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), -6.0) / x1) - 4.0) / x1))), t_0));
}
return tmp;
}
function code(x1, x2) t_0 = fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1)) tmp = 0.0 if (x1 <= -1.5e+55) tmp = Float64(6.0 * (x1 ^ 4.0)); elseif (x1 <= -0.0013) tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), fma(x1, Float64(x1 * fma(Float64(fma(2.0, x2, fma(x1, Float64(x1 * 3.0), Float64(-x1))) / fma(x1, x1, 1.0)), 4.0, -6.0)), Float64(Float64(8.0 * Float64(x1 * Float64(x2 * x2))) / Float64(fma(x1, x1, 1.0) * fma(x1, x1, 1.0)))), t_0))); elseif (x1 <= 650.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), -6.0) / x1) - 4.0) / x1))), t_0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.5e+55], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -0.0013], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * N[(N[(N[(2.0 * x2 + N[(x1 * N[(x1 * 3.0), $MachinePrecision] + (-x1)), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 4.0 + -6.0), $MachinePrecision]), $MachinePrecision] + N[(N[(8.0 * N[(x1 * N[(x2 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 650.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + -6.0), $MachinePrecision] / x1), $MachinePrecision] - 4.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\\
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+55}:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\mathbf{elif}\;x1 \leq -0.0013:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(x1, x1 \cdot \mathsf{fma}\left(\frac{\mathsf{fma}\left(2, x2, \mathsf{fma}\left(x1, x1 \cdot 3, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 4, -6\right), \frac{8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right) \cdot \mathsf{fma}\left(x1, x1, 1\right)}\right), t\_0\right)\right)\\
\mathbf{elif}\;x1 \leq 650:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), -6\right)}{x1} - 4}{x1}\right), t\_0\right)\right)\\
\end{array}
\end{array}
if x1 < -1.50000000000000008e55Initial program 9.6%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.5
Applied rewrites0.5%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f64100.0
Applied rewrites100.0%
if -1.50000000000000008e55 < x1 < -0.0012999999999999999Initial program 99.4%
Applied rewrites99.4%
Taylor expanded in x1 around inf
Applied rewrites95.1%
Taylor expanded in x1 around inf
Applied rewrites94.7%
Taylor expanded in x2 around inf
associate-*r/N/A
associate-*r*N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f6488.0
Applied rewrites88.0%
if -0.0012999999999999999 < x1 < 650Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6438.3
Applied rewrites38.3%
Taylor expanded in x1 around 0
Applied rewrites83.8%
Taylor expanded in x2 around 0
Applied rewrites97.9%
Taylor expanded in x1 around 0
Applied rewrites97.9%
if 650 < x1 Initial program 42.9%
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around -inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites95.1%
Final simplification97.2%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -4.5e+153)
(* (* x1 x1) 9.0)
(if (<= x1 -10500000000.0)
(+
x1
(fma
(/ (- (* 3.0 (* x1 x1)) (fma x2 2.0 x1)) (fma x1 x1 1.0))
3.0
(+
x1
(fma
(* (* x1 x1) 6.0)
(fma x1 x1 1.0)
(* (* x1 x1) (fma x2 6.0 (* x1 -2.0)))))))
(if (<= x1 650.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(*
(* x1 x1)
(+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) -6.0) x1) 4.0) x1)))
(fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1)))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -4.5e+153) {
tmp = (x1 * x1) * 9.0;
} else if (x1 <= -10500000000.0) {
tmp = x1 + fma((((3.0 * (x1 * x1)) - fma(x2, 2.0, x1)) / fma(x1, x1, 1.0)), 3.0, (x1 + fma(((x1 * x1) * 6.0), fma(x1, x1, 1.0), ((x1 * x1) * fma(x2, 6.0, (x1 * -2.0))))));
} else if (x1 <= 650.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), ((x1 * x1) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), -6.0) / x1) - 4.0) / x1))), fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1))));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -4.5e+153) tmp = Float64(Float64(x1 * x1) * 9.0); elseif (x1 <= -10500000000.0) tmp = Float64(x1 + fma(Float64(Float64(Float64(3.0 * Float64(x1 * x1)) - fma(x2, 2.0, x1)) / fma(x1, x1, 1.0)), 3.0, Float64(x1 + fma(Float64(Float64(x1 * x1) * 6.0), fma(x1, x1, 1.0), Float64(Float64(x1 * x1) * fma(x2, 6.0, Float64(x1 * -2.0))))))); elseif (x1 <= 650.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), -6.0) / x1) - 4.0) / x1))), fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1))))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -4.5e+153], N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision], If[LessEqual[x1, -10500000000.0], N[(x1 + N[(N[(N[(N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(x2 * 2.0 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 3.0 + N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] * N[(x1 * x1 + 1.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(x2 * 6.0 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 650.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + -6.0), $MachinePrecision] / x1), $MachinePrecision] - 4.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;\left(x1 \cdot x1\right) \cdot 9\\
\mathbf{elif}\;x1 \leq -10500000000:\\
\;\;\;\;x1 + \mathsf{fma}\left(\frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(x2, 2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1 + \mathsf{fma}\left(\left(x1 \cdot x1\right) \cdot 6, \mathsf{fma}\left(x1, x1, 1\right), \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x2, 6, x1 \cdot -2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 650:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), -6\right)}{x1} - 4}{x1}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.4
Applied rewrites0.4%
Taylor expanded in x1 around 0
Applied rewrites70.3%
Taylor expanded in x2 around 0
Applied rewrites100.0%
Taylor expanded in x1 around inf
Applied rewrites100.0%
if -4.5000000000000001e153 < x1 < -1.05e10Initial program 45.4%
Taylor expanded in x1 around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6430.1
Applied rewrites30.1%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6430.8
Applied rewrites30.8%
Applied rewrites30.7%
Taylor expanded in x1 around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6482.1
Applied rewrites82.1%
if -1.05e10 < x1 < 650Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
Taylor expanded in x1 around 0
Applied rewrites83.0%
Taylor expanded in x2 around 0
Applied rewrites96.6%
Taylor expanded in x1 around 0
Applied rewrites96.6%
if 650 < x1 Initial program 42.9%
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around -inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites95.1%
Final simplification94.8%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -13000000000.0)
(* 6.0 (pow x1 4.0))
(if (<= x1 650.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(*
(* x1 x1)
(+ 6.0 (/ (- (/ (fma 4.0 (fma x2 2.0 -3.0) -6.0) x1) 4.0) x1)))
(fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -13000000000.0) {
tmp = 6.0 * pow(x1, 4.0);
} else if (x1 <= 650.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), ((x1 * x1) * (6.0 + (((fma(4.0, fma(x2, 2.0, -3.0), -6.0) / x1) - 4.0) / x1))), fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1))));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -13000000000.0) tmp = Float64(6.0 * (x1 ^ 4.0)); elseif (x1 <= 650.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), Float64(Float64(x1 * x1) * Float64(6.0 + Float64(Float64(Float64(fma(4.0, fma(x2, 2.0, -3.0), -6.0) / x1) - 4.0) / x1))), fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1))))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -13000000000.0], N[(6.0 * N[Power[x1, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 650.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(N[(N[(N[(4.0 * N[(x2 * 2.0 + -3.0), $MachinePrecision] + -6.0), $MachinePrecision] / x1), $MachinePrecision] - 4.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -13000000000:\\
\;\;\;\;6 \cdot {x1}^{4}\\
\mathbf{elif}\;x1 \leq 650:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \left(x1 \cdot x1\right) \cdot \left(6 + \frac{\frac{\mathsf{fma}\left(4, \mathsf{fma}\left(x2, 2, -3\right), -6\right)}{x1} - 4}{x1}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.3e10Initial program 22.1%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.9
Applied rewrites0.9%
Taylor expanded in x1 around inf
lower-*.f64N/A
lower-pow.f6492.4
Applied rewrites92.4%
if -1.3e10 < x1 < 650Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
Taylor expanded in x1 around 0
Applied rewrites83.0%
Taylor expanded in x2 around 0
Applied rewrites96.6%
Taylor expanded in x1 around 0
Applied rewrites96.6%
if 650 < x1 Initial program 42.9%
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around -inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites95.1%
Final simplification95.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -4.5e+153)
(* (* x1 x1) 9.0)
(if (<= x1 -10500000000.0)
(+
x1
(fma
(/ (- (* 3.0 (* x1 x1)) (fma x2 2.0 x1)) (fma x1 x1 1.0))
3.0
(+
x1
(fma
(* (* x1 x1) 6.0)
(fma x1 x1 1.0)
(* (* x1 x1) (fma x2 6.0 (* x1 -2.0)))))))
(if (<= x1 46000.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(* (* x1 x1) (+ 6.0 (/ -4.0 x1)))
(fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1)))))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -4.5e+153) {
tmp = (x1 * x1) * 9.0;
} else if (x1 <= -10500000000.0) {
tmp = x1 + fma((((3.0 * (x1 * x1)) - fma(x2, 2.0, x1)) / fma(x1, x1, 1.0)), 3.0, (x1 + fma(((x1 * x1) * 6.0), fma(x1, x1, 1.0), ((x1 * x1) * fma(x2, 6.0, (x1 * -2.0))))));
} else if (x1 <= 46000.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), ((x1 * x1) * (6.0 + (-4.0 / x1))), fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1))));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -4.5e+153) tmp = Float64(Float64(x1 * x1) * 9.0); elseif (x1 <= -10500000000.0) tmp = Float64(x1 + fma(Float64(Float64(Float64(3.0 * Float64(x1 * x1)) - fma(x2, 2.0, x1)) / fma(x1, x1, 1.0)), 3.0, Float64(x1 + fma(Float64(Float64(x1 * x1) * 6.0), fma(x1, x1, 1.0), Float64(Float64(x1 * x1) * fma(x2, 6.0, Float64(x1 * -2.0))))))); elseif (x1 <= 46000.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), Float64(Float64(x1 * x1) * Float64(6.0 + Float64(-4.0 / x1))), fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1))))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -4.5e+153], N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision], If[LessEqual[x1, -10500000000.0], N[(x1 + N[(N[(N[(N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(x2 * 2.0 + x1), $MachinePrecision]), $MachinePrecision] / N[(x1 * x1 + 1.0), $MachinePrecision]), $MachinePrecision] * 3.0 + N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] * N[(x1 * x1 + 1.0), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(x2 * 6.0 + N[(x1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 46000.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(-4.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;\left(x1 \cdot x1\right) \cdot 9\\
\mathbf{elif}\;x1 \leq -10500000000:\\
\;\;\;\;x1 + \mathsf{fma}\left(\frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(x2, 2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, 3, x1 + \mathsf{fma}\left(\left(x1 \cdot x1\right) \cdot 6, \mathsf{fma}\left(x1, x1, 1\right), \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(x2, 6, x1 \cdot -2\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 46000:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \left(x1 \cdot x1\right) \cdot \left(6 + \frac{-4}{x1}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.4
Applied rewrites0.4%
Taylor expanded in x1 around 0
Applied rewrites70.3%
Taylor expanded in x2 around 0
Applied rewrites100.0%
Taylor expanded in x1 around inf
Applied rewrites100.0%
if -4.5000000000000001e153 < x1 < -1.05e10Initial program 45.4%
Taylor expanded in x1 around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6430.1
Applied rewrites30.1%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6430.8
Applied rewrites30.8%
Applied rewrites30.7%
Taylor expanded in x1 around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6482.1
Applied rewrites82.1%
if -1.05e10 < x1 < 46000Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
Taylor expanded in x1 around 0
Applied rewrites83.0%
Taylor expanded in x2 around 0
Applied rewrites96.6%
Taylor expanded in x1 around 0
Applied rewrites96.6%
if 46000 < x1 Initial program 42.9%
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6493.2
Applied rewrites93.2%
Final simplification94.3%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1))))
(if (<= x1 -1.5e+153)
(* x1 (* x1 9.0))
(if (<= x1 -5.5e+102)
(* x1 (/ (fma t_0 729.0 -1.0) (fma (* x1 x1) 81.0 (+ (* x1 9.0) 1.0))))
(if (<= x1 -13000000000.0)
(+
x1
(+
(+
x1
(+
t_0
(+
(* (+ (* x1 x1) 1.0) (* x1 (* x1 6.0)))
(* (* x1 (* x1 3.0)) (* 2.0 x2)))))
(* 3.0 3.0)))
(if (<= x1 46000.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(* (* x1 x1) (+ 6.0 (/ -4.0 x1)))
(fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double tmp;
if (x1 <= -1.5e+153) {
tmp = x1 * (x1 * 9.0);
} else if (x1 <= -5.5e+102) {
tmp = x1 * (fma(t_0, 729.0, -1.0) / fma((x1 * x1), 81.0, ((x1 * 9.0) + 1.0)));
} else if (x1 <= -13000000000.0) {
tmp = x1 + ((x1 + (t_0 + ((((x1 * x1) + 1.0) * (x1 * (x1 * 6.0))) + ((x1 * (x1 * 3.0)) * (2.0 * x2))))) + (3.0 * 3.0));
} else if (x1 <= 46000.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), ((x1 * x1) * (6.0 + (-4.0 / x1))), fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if (x1 <= -1.5e+153) tmp = Float64(x1 * Float64(x1 * 9.0)); elseif (x1 <= -5.5e+102) tmp = Float64(x1 * Float64(fma(t_0, 729.0, -1.0) / fma(Float64(x1 * x1), 81.0, Float64(Float64(x1 * 9.0) + 1.0)))); elseif (x1 <= -13000000000.0) tmp = Float64(x1 + Float64(Float64(x1 + Float64(t_0 + Float64(Float64(Float64(Float64(x1 * x1) + 1.0) * Float64(x1 * Float64(x1 * 6.0))) + Float64(Float64(x1 * Float64(x1 * 3.0)) * Float64(2.0 * x2))))) + Float64(3.0 * 3.0))); elseif (x1 <= 46000.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), Float64(Float64(x1 * x1) * Float64(6.0 + Float64(-4.0 / x1))), fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.5e+153], N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.5e+102], N[(x1 * N[(N[(t$95$0 * 729.0 + -1.0), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] * 81.0 + N[(N[(x1 * 9.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -13000000000.0], N[(x1 + N[(N[(x1 + N[(t$95$0 + N[(N[(N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x1 * N[(x1 * 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * N[(x1 * 3.0), $MachinePrecision]), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(3.0 * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 46000.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(-4.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+153}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9\right)\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \frac{\mathsf{fma}\left(t\_0, 729, -1\right)}{\mathsf{fma}\left(x1 \cdot x1, 81, x1 \cdot 9 + 1\right)}\\
\mathbf{elif}\;x1 \leq -13000000000:\\
\;\;\;\;x1 + \left(\left(x1 + \left(t\_0 + \left(\left(x1 \cdot x1 + 1\right) \cdot \left(x1 \cdot \left(x1 \cdot 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \left(2 \cdot x2\right)\right)\right)\right) + 3 \cdot 3\right)\\
\mathbf{elif}\;x1 \leq 46000:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \left(x1 \cdot x1\right) \cdot \left(6 + \frac{-4}{x1}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.50000000000000009e153Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.4
Applied rewrites0.4%
Taylor expanded in x1 around 0
Applied rewrites69.1%
Taylor expanded in x2 around 0
Applied rewrites98.1%
Taylor expanded in x1 around inf
Applied rewrites98.1%
if -1.50000000000000009e153 < x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.6
Applied rewrites0.6%
Taylor expanded in x1 around 0
Applied rewrites21.4%
Taylor expanded in x2 around 0
Applied rewrites7.7%
Applied rewrites100.0%
if -5.49999999999999981e102 < x1 < -1.3e10Initial program 99.3%
Taylor expanded in x1 around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6465.9
Applied rewrites65.9%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6467.3
Applied rewrites67.3%
Taylor expanded in x1 around inf
Applied rewrites67.3%
if -1.3e10 < x1 < 46000Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
Taylor expanded in x1 around 0
Applied rewrites83.0%
Taylor expanded in x2 around 0
Applied rewrites96.6%
Taylor expanded in x1 around 0
Applied rewrites96.6%
if 46000 < x1 Initial program 42.9%
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6493.2
Applied rewrites93.2%
Final simplification94.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1))))
(if (<= x1 -1.5e+153)
(* x1 (* x1 9.0))
(if (<= x1 -5.5e+102)
(* x1 (/ (fma t_0 729.0 -1.0) (fma (* x1 x1) 81.0 (+ (* x1 9.0) 1.0))))
(if (<= x1 -13000000000.0)
(+
x1
(fma
3.0
3.0
(+
x1
(fma
(* (* x1 x1) 6.0)
(fma x1 x1 1.0)
(fma (* 3.0 (* x1 x1)) (* 2.0 x2) t_0)))))
(if (<= x1 46000.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(* (* x1 x1) (+ 6.0 (/ -4.0 x1)))
(fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double tmp;
if (x1 <= -1.5e+153) {
tmp = x1 * (x1 * 9.0);
} else if (x1 <= -5.5e+102) {
tmp = x1 * (fma(t_0, 729.0, -1.0) / fma((x1 * x1), 81.0, ((x1 * 9.0) + 1.0)));
} else if (x1 <= -13000000000.0) {
tmp = x1 + fma(3.0, 3.0, (x1 + fma(((x1 * x1) * 6.0), fma(x1, x1, 1.0), fma((3.0 * (x1 * x1)), (2.0 * x2), t_0))));
} else if (x1 <= 46000.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), ((x1 * x1) * (6.0 + (-4.0 / x1))), fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) tmp = 0.0 if (x1 <= -1.5e+153) tmp = Float64(x1 * Float64(x1 * 9.0)); elseif (x1 <= -5.5e+102) tmp = Float64(x1 * Float64(fma(t_0, 729.0, -1.0) / fma(Float64(x1 * x1), 81.0, Float64(Float64(x1 * 9.0) + 1.0)))); elseif (x1 <= -13000000000.0) tmp = Float64(x1 + fma(3.0, 3.0, Float64(x1 + fma(Float64(Float64(x1 * x1) * 6.0), fma(x1, x1, 1.0), fma(Float64(3.0 * Float64(x1 * x1)), Float64(2.0 * x2), t_0))))); elseif (x1 <= 46000.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), Float64(Float64(x1 * x1) * Float64(6.0 + Float64(-4.0 / x1))), fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.5e+153], N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.5e+102], N[(x1 * N[(N[(t$95$0 * 729.0 + -1.0), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] * 81.0 + N[(N[(x1 * 9.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -13000000000.0], N[(x1 + N[(3.0 * 3.0 + N[(x1 + N[(N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] * N[(x1 * x1 + 1.0), $MachinePrecision] + N[(N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 46000.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * N[(6.0 + N[(-4.0 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+153}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9\right)\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \frac{\mathsf{fma}\left(t\_0, 729, -1\right)}{\mathsf{fma}\left(x1 \cdot x1, 81, x1 \cdot 9 + 1\right)}\\
\mathbf{elif}\;x1 \leq -13000000000:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, x1 + \mathsf{fma}\left(\left(x1 \cdot x1\right) \cdot 6, \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(3 \cdot \left(x1 \cdot x1\right), 2 \cdot x2, t\_0\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 46000:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \left(x1 \cdot x1\right) \cdot \left(6 + \frac{-4}{x1}\right), \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.50000000000000009e153Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.4
Applied rewrites0.4%
Taylor expanded in x1 around 0
Applied rewrites69.1%
Taylor expanded in x2 around 0
Applied rewrites98.1%
Taylor expanded in x1 around inf
Applied rewrites98.1%
if -1.50000000000000009e153 < x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.6
Applied rewrites0.6%
Taylor expanded in x1 around 0
Applied rewrites21.4%
Taylor expanded in x2 around 0
Applied rewrites7.7%
Applied rewrites100.0%
if -5.49999999999999981e102 < x1 < -1.3e10Initial program 99.3%
Taylor expanded in x1 around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6465.9
Applied rewrites65.9%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6467.3
Applied rewrites67.3%
Applied rewrites67.1%
Taylor expanded in x1 around inf
Applied rewrites67.1%
if -1.3e10 < x1 < 46000Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
Taylor expanded in x1 around 0
Applied rewrites83.0%
Taylor expanded in x2 around 0
Applied rewrites96.6%
Taylor expanded in x1 around 0
Applied rewrites96.6%
if 46000 < x1 Initial program 42.9%
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6493.2
Applied rewrites93.2%
Final simplification94.4%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* x1 (* x1 x1))) (t_1 (* (* x1 x1) 6.0)))
(if (<= x1 -1.5e+153)
(* x1 (* x1 9.0))
(if (<= x1 -5.5e+102)
(* x1 (/ (fma t_0 729.0 -1.0) (fma (* x1 x1) 81.0 (+ (* x1 9.0) 1.0))))
(if (<= x1 -13000000000.0)
(+
x1
(fma
3.0
3.0
(+
x1
(fma t_1 (fma x1 x1 1.0) (fma (* 3.0 (* x1 x1)) (* 2.0 x2) t_0)))))
(if (<= x1 18000000.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
t_1
(fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1)))))))))))
double code(double x1, double x2) {
double t_0 = x1 * (x1 * x1);
double t_1 = (x1 * x1) * 6.0;
double tmp;
if (x1 <= -1.5e+153) {
tmp = x1 * (x1 * 9.0);
} else if (x1 <= -5.5e+102) {
tmp = x1 * (fma(t_0, 729.0, -1.0) / fma((x1 * x1), 81.0, ((x1 * 9.0) + 1.0)));
} else if (x1 <= -13000000000.0) {
tmp = x1 + fma(3.0, 3.0, (x1 + fma(t_1, fma(x1, x1, 1.0), fma((3.0 * (x1 * x1)), (2.0 * x2), t_0))));
} else if (x1 <= 18000000.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), t_1, fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1))));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * Float64(x1 * x1)) t_1 = Float64(Float64(x1 * x1) * 6.0) tmp = 0.0 if (x1 <= -1.5e+153) tmp = Float64(x1 * Float64(x1 * 9.0)); elseif (x1 <= -5.5e+102) tmp = Float64(x1 * Float64(fma(t_0, 729.0, -1.0) / fma(Float64(x1 * x1), 81.0, Float64(Float64(x1 * 9.0) + 1.0)))); elseif (x1 <= -13000000000.0) tmp = Float64(x1 + fma(3.0, 3.0, Float64(x1 + fma(t_1, fma(x1, x1, 1.0), fma(Float64(3.0 * Float64(x1 * x1)), Float64(2.0 * x2), t_0))))); elseif (x1 <= 18000000.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), t_1, fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1))))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision]}, If[LessEqual[x1, -1.5e+153], N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.5e+102], N[(x1 * N[(N[(t$95$0 * 729.0 + -1.0), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] * 81.0 + N[(N[(x1 * 9.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -13000000000.0], N[(x1 + N[(3.0 * 3.0 + N[(x1 + N[(t$95$1 * N[(x1 * x1 + 1.0), $MachinePrecision] + N[(N[(3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * N[(2.0 * x2), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 18000000.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * t$95$1 + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \left(x1 \cdot x1\right)\\
t_1 := \left(x1 \cdot x1\right) \cdot 6\\
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+153}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9\right)\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \frac{\mathsf{fma}\left(t\_0, 729, -1\right)}{\mathsf{fma}\left(x1 \cdot x1, 81, x1 \cdot 9 + 1\right)}\\
\mathbf{elif}\;x1 \leq -13000000000:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, x1 + \mathsf{fma}\left(t\_1, \mathsf{fma}\left(x1, x1, 1\right), \mathsf{fma}\left(3 \cdot \left(x1 \cdot x1\right), 2 \cdot x2, t\_0\right)\right)\right)\\
\mathbf{elif}\;x1 \leq 18000000:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), t\_1, \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\end{array}
\end{array}
if x1 < -1.50000000000000009e153Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.4
Applied rewrites0.4%
Taylor expanded in x1 around 0
Applied rewrites69.1%
Taylor expanded in x2 around 0
Applied rewrites98.1%
Taylor expanded in x1 around inf
Applied rewrites98.1%
if -1.50000000000000009e153 < x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.6
Applied rewrites0.6%
Taylor expanded in x1 around 0
Applied rewrites21.4%
Taylor expanded in x2 around 0
Applied rewrites7.7%
Applied rewrites100.0%
if -5.49999999999999981e102 < x1 < -1.3e10Initial program 99.3%
Taylor expanded in x1 around inf
*-commutativeN/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6465.9
Applied rewrites65.9%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6467.3
Applied rewrites67.3%
Applied rewrites67.1%
Taylor expanded in x1 around inf
Applied rewrites67.1%
if -1.3e10 < x1 < 1.8e7Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
Taylor expanded in x1 around 0
Applied rewrites83.0%
Taylor expanded in x2 around 0
Applied rewrites96.6%
Taylor expanded in x1 around 0
Applied rewrites96.6%
if 1.8e7 < x1 Initial program 42.9%
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around inf
Applied rewrites32.5%
Taylor expanded in x1 around inf
lower-*.f64N/A
unpow2N/A
lower-*.f6492.1
Applied rewrites92.1%
Final simplification94.2%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0
(+
x1
(fma
3.0
3.0
(fma
(fma x1 x1 1.0)
(* (* x1 x1) 6.0)
(fma x1 (* (* x1 3.0) 3.0) (fma x1 (* x1 x1) x1)))))))
(if (<= x1 -1.5e+153)
(* x1 (* x1 9.0))
(if (<= x1 -5.5e+102)
(*
x1
(/
(fma (* x1 (* x1 x1)) 729.0 -1.0)
(fma (* x1 x1) 81.0 (+ (* x1 9.0) 1.0))))
(if (<= x1 -13000000000.0)
t_0
(if (<= x1 18000000.0)
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))
t_0))))))
double code(double x1, double x2) {
double t_0 = x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), ((x1 * x1) * 6.0), fma(x1, ((x1 * 3.0) * 3.0), fma(x1, (x1 * x1), x1))));
double tmp;
if (x1 <= -1.5e+153) {
tmp = x1 * (x1 * 9.0);
} else if (x1 <= -5.5e+102) {
tmp = x1 * (fma((x1 * (x1 * x1)), 729.0, -1.0) / fma((x1 * x1), 81.0, ((x1 * 9.0) + 1.0)));
} else if (x1 <= -13000000000.0) {
tmp = t_0;
} else if (x1 <= 18000000.0) {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 + fma(3.0, 3.0, fma(fma(x1, x1, 1.0), Float64(Float64(x1 * x1) * 6.0), fma(x1, Float64(Float64(x1 * 3.0) * 3.0), fma(x1, Float64(x1 * x1), x1))))) tmp = 0.0 if (x1 <= -1.5e+153) tmp = Float64(x1 * Float64(x1 * 9.0)); elseif (x1 <= -5.5e+102) tmp = Float64(x1 * Float64(fma(Float64(x1 * Float64(x1 * x1)), 729.0, -1.0) / fma(Float64(x1 * x1), 81.0, Float64(Float64(x1 * 9.0) + 1.0)))); elseif (x1 <= -13000000000.0) tmp = t_0; elseif (x1 <= 18000000.0) tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(3.0 * 3.0 + N[(N[(x1 * x1 + 1.0), $MachinePrecision] * N[(N[(x1 * x1), $MachinePrecision] * 6.0), $MachinePrecision] + N[(x1 * N[(N[(x1 * 3.0), $MachinePrecision] * 3.0), $MachinePrecision] + N[(x1 * N[(x1 * x1), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.5e+153], N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.5e+102], N[(x1 * N[(N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * 729.0 + -1.0), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] * 81.0 + N[(N[(x1 * 9.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -13000000000.0], t$95$0, If[LessEqual[x1, 18000000.0], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 + \mathsf{fma}\left(3, 3, \mathsf{fma}\left(\mathsf{fma}\left(x1, x1, 1\right), \left(x1 \cdot x1\right) \cdot 6, \mathsf{fma}\left(x1, \left(x1 \cdot 3\right) \cdot 3, \mathsf{fma}\left(x1, x1 \cdot x1, x1\right)\right)\right)\right)\\
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+153}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9\right)\\
\mathbf{elif}\;x1 \leq -5.5 \cdot 10^{+102}:\\
\;\;\;\;x1 \cdot \frac{\mathsf{fma}\left(x1 \cdot \left(x1 \cdot x1\right), 729, -1\right)}{\mathsf{fma}\left(x1 \cdot x1, 81, x1 \cdot 9 + 1\right)}\\
\mathbf{elif}\;x1 \leq -13000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 18000000:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.50000000000000009e153Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.4
Applied rewrites0.4%
Taylor expanded in x1 around 0
Applied rewrites69.1%
Taylor expanded in x2 around 0
Applied rewrites98.1%
Taylor expanded in x1 around inf
Applied rewrites98.1%
if -1.50000000000000009e153 < x1 < -5.49999999999999981e102Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.6
Applied rewrites0.6%
Taylor expanded in x1 around 0
Applied rewrites21.4%
Taylor expanded in x2 around 0
Applied rewrites7.7%
Applied rewrites100.0%
if -5.49999999999999981e102 < x1 < -1.3e10 or 1.8e7 < x1 Initial program 55.1%
Applied rewrites45.6%
Taylor expanded in x1 around inf
Applied rewrites45.6%
Taylor expanded in x1 around inf
Applied rewrites45.6%
Taylor expanded in x1 around inf
lower-*.f64N/A
unpow2N/A
lower-*.f6486.4
Applied rewrites86.4%
if -1.3e10 < x1 < 1.8e7Initial program 99.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6437.2
Applied rewrites37.2%
Taylor expanded in x1 around 0
Applied rewrites83.0%
Taylor expanded in x2 around 0
Applied rewrites96.6%
Taylor expanded in x1 around 0
Applied rewrites96.6%
Final simplification94.1%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -1.5e+153)
(* x1 (* x1 9.0))
(if (<= x1 -1.5e+55)
(*
x1
(/
(fma (* x1 (* x1 x1)) 729.0 -1.0)
(fma (* x1 x1) 81.0 (+ (* x1 9.0) 1.0))))
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.5e+153) {
tmp = x1 * (x1 * 9.0);
} else if (x1 <= -1.5e+55) {
tmp = x1 * (fma((x1 * (x1 * x1)), 729.0, -1.0) / fma((x1 * x1), 81.0, ((x1 * 9.0) + 1.0)));
} else {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -1.5e+153) tmp = Float64(x1 * Float64(x1 * 9.0)); elseif (x1 <= -1.5e+55) tmp = Float64(x1 * Float64(fma(Float64(x1 * Float64(x1 * x1)), 729.0, -1.0) / fma(Float64(x1 * x1), 81.0, Float64(Float64(x1 * 9.0) + 1.0)))); else tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -1.5e+153], N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.5e+55], N[(x1 * N[(N[(N[(x1 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * 729.0 + -1.0), $MachinePrecision] / N[(N[(x1 * x1), $MachinePrecision] * 81.0 + N[(N[(x1 * 9.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.5 \cdot 10^{+153}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9\right)\\
\mathbf{elif}\;x1 \leq -1.5 \cdot 10^{+55}:\\
\;\;\;\;x1 \cdot \frac{\mathsf{fma}\left(x1 \cdot \left(x1 \cdot x1\right), 729, -1\right)}{\mathsf{fma}\left(x1 \cdot x1, 81, x1 \cdot 9 + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\end{array}
\end{array}
if x1 < -1.50000000000000009e153Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.4
Applied rewrites0.4%
Taylor expanded in x1 around 0
Applied rewrites69.1%
Taylor expanded in x2 around 0
Applied rewrites98.1%
Taylor expanded in x1 around inf
Applied rewrites98.1%
if -1.50000000000000009e153 < x1 < -1.50000000000000008e55Initial program 24.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.7
Applied rewrites0.7%
Taylor expanded in x1 around 0
Applied rewrites16.9%
Taylor expanded in x2 around 0
Applied rewrites7.1%
Applied rewrites80.3%
if -1.50000000000000008e55 < x1 Initial program 82.4%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6425.9
Applied rewrites25.9%
Taylor expanded in x1 around 0
Applied rewrites75.4%
Taylor expanded in x2 around 0
Applied rewrites82.2%
Taylor expanded in x1 around 0
Applied rewrites84.8%
Final simplification86.3%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -4.5e+153)
(* (* x1 x1) 9.0)
(if (<= x1 -1.1e+55)
(+ x1 (* x2 (fma 12.0 (* x1 x1) (* 9.0 (/ (* x1 x1) x2)))))
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -4.5e+153) {
tmp = (x1 * x1) * 9.0;
} else if (x1 <= -1.1e+55) {
tmp = x1 + (x2 * fma(12.0, (x1 * x1), (9.0 * ((x1 * x1) / x2))));
} else {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -4.5e+153) tmp = Float64(Float64(x1 * x1) * 9.0); elseif (x1 <= -1.1e+55) tmp = Float64(x1 + Float64(x2 * fma(12.0, Float64(x1 * x1), Float64(9.0 * Float64(Float64(x1 * x1) / x2))))); else tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -4.5e+153], N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision], If[LessEqual[x1, -1.1e+55], N[(x1 + N[(x2 * N[(12.0 * N[(x1 * x1), $MachinePrecision] + N[(9.0 * N[(N[(x1 * x1), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;\left(x1 \cdot x1\right) \cdot 9\\
\mathbf{elif}\;x1 \leq -1.1 \cdot 10^{+55}:\\
\;\;\;\;x1 + x2 \cdot \mathsf{fma}\left(12, x1 \cdot x1, 9 \cdot \frac{x1 \cdot x1}{x2}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.4
Applied rewrites0.4%
Taylor expanded in x1 around 0
Applied rewrites70.3%
Taylor expanded in x2 around 0
Applied rewrites100.0%
Taylor expanded in x1 around inf
Applied rewrites100.0%
if -4.5000000000000001e153 < x1 < -1.10000000000000005e55Initial program 26.7%
Taylor expanded in x1 around 0
Applied rewrites16.9%
Taylor expanded in x1 around inf
Applied rewrites28.9%
Taylor expanded in x2 around inf
Applied rewrites74.6%
if -1.10000000000000005e55 < x1 Initial program 82.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6426.1
Applied rewrites26.1%
Taylor expanded in x1 around 0
Applied rewrites75.7%
Taylor expanded in x2 around 0
Applied rewrites82.5%
Taylor expanded in x1 around 0
Applied rewrites85.2%
Final simplification86.2%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -3.3e+153)
(* x1 (* x1 9.0))
(if (<= x1 -1.25e+110)
(* (* x2 x2) (fma 8.0 x1 (/ (fma x1 (fma 12.0 x1 -12.0) -6.0) x2)))
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -3.3e+153) {
tmp = x1 * (x1 * 9.0);
} else if (x1 <= -1.25e+110) {
tmp = (x2 * x2) * fma(8.0, x1, (fma(x1, fma(12.0, x1, -12.0), -6.0) / x2));
} else {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -3.3e+153) tmp = Float64(x1 * Float64(x1 * 9.0)); elseif (x1 <= -1.25e+110) tmp = Float64(Float64(x2 * x2) * fma(8.0, x1, Float64(fma(x1, fma(12.0, x1, -12.0), -6.0) / x2))); else tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -3.3e+153], N[(x1 * N[(x1 * 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.25e+110], N[(N[(x2 * x2), $MachinePrecision] * N[(8.0 * x1 + N[(N[(x1 * N[(12.0 * x1 + -12.0), $MachinePrecision] + -6.0), $MachinePrecision] / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -3.3 \cdot 10^{+153}:\\
\;\;\;\;x1 \cdot \left(x1 \cdot 9\right)\\
\mathbf{elif}\;x1 \leq -1.25 \cdot 10^{+110}:\\
\;\;\;\;\left(x2 \cdot x2\right) \cdot \mathsf{fma}\left(8, x1, \frac{\mathsf{fma}\left(x1, \mathsf{fma}\left(12, x1, -12\right), -6\right)}{x2}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\end{array}
\end{array}
if x1 < -3.29999999999999994e153Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.4
Applied rewrites0.4%
Taylor expanded in x1 around 0
Applied rewrites69.1%
Taylor expanded in x2 around 0
Applied rewrites98.1%
Taylor expanded in x1 around inf
Applied rewrites98.1%
if -3.29999999999999994e153 < x1 < -1.24999999999999995e110Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.6
Applied rewrites0.6%
Taylor expanded in x1 around 0
Applied rewrites23.3%
Taylor expanded in x2 around 0
Applied rewrites7.9%
Taylor expanded in x2 around inf
Applied rewrites43.8%
if -1.24999999999999995e110 < x1 Initial program 82.1%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6424.9
Applied rewrites24.9%
Taylor expanded in x1 around 0
Applied rewrites72.6%
Taylor expanded in x2 around 0
Applied rewrites79.1%
Taylor expanded in x1 around 0
Applied rewrites81.6%
Final simplification81.7%
(FPCore (x1 x2)
:precision binary64
(let* ((t_0 (* (* x1 x1) 9.0)))
(if (<= x1 -4.5e+153)
t_0
(if (<= x1 -1.1e+55)
(+ x1 (fma 12.0 (* x2 (* x1 x1)) t_0))
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0)))))))
double code(double x1, double x2) {
double t_0 = (x1 * x1) * 9.0;
double tmp;
if (x1 <= -4.5e+153) {
tmp = t_0;
} else if (x1 <= -1.1e+55) {
tmp = x1 + fma(12.0, (x2 * (x1 * x1)), t_0);
} else {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
}
return tmp;
}
function code(x1, x2) t_0 = Float64(Float64(x1 * x1) * 9.0) tmp = 0.0 if (x1 <= -4.5e+153) tmp = t_0; elseif (x1 <= -1.1e+55) tmp = Float64(x1 + fma(12.0, Float64(x2 * Float64(x1 * x1)), t_0)); else tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision]}, If[LessEqual[x1, -4.5e+153], t$95$0, If[LessEqual[x1, -1.1e+55], N[(x1 + N[(12.0 * N[(x2 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(x1 \cdot x1\right) \cdot 9\\
\mathbf{if}\;x1 \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq -1.1 \cdot 10^{+55}:\\
\;\;\;\;x1 + \mathsf{fma}\left(12, x2 \cdot \left(x1 \cdot x1\right), t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\end{array}
\end{array}
if x1 < -4.5000000000000001e153Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.4
Applied rewrites0.4%
Taylor expanded in x1 around 0
Applied rewrites70.3%
Taylor expanded in x2 around 0
Applied rewrites100.0%
Taylor expanded in x1 around inf
Applied rewrites100.0%
if -4.5000000000000001e153 < x1 < -1.10000000000000005e55Initial program 26.7%
Taylor expanded in x1 around 0
Applied rewrites16.9%
Taylor expanded in x1 around inf
Applied rewrites28.9%
Taylor expanded in x2 around 0
Applied rewrites28.9%
if -1.10000000000000005e55 < x1 Initial program 82.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6426.1
Applied rewrites26.1%
Taylor expanded in x1 around 0
Applied rewrites75.7%
Taylor expanded in x2 around 0
Applied rewrites82.5%
Taylor expanded in x1 around 0
Applied rewrites85.2%
Final simplification81.6%
(FPCore (x1 x2)
:precision binary64
(if (<= x1 -9e+146)
(* (* x1 x1) 9.0)
(if (<= x1 -1.1e+55)
(* (* x1 x1) (fma 12.0 x2 9.0))
(fma x2 (fma (fma x2 8.0 -12.0) x1 -6.0) (* x1 (fma x1 9.0 -1.0))))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -9e+146) {
tmp = (x1 * x1) * 9.0;
} else if (x1 <= -1.1e+55) {
tmp = (x1 * x1) * fma(12.0, x2, 9.0);
} else {
tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), (x1 * fma(x1, 9.0, -1.0)));
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -9e+146) tmp = Float64(Float64(x1 * x1) * 9.0); elseif (x1 <= -1.1e+55) tmp = Float64(Float64(x1 * x1) * fma(12.0, x2, 9.0)); else tmp = fma(x2, fma(fma(x2, 8.0, -12.0), x1, -6.0), Float64(x1 * fma(x1, 9.0, -1.0))); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -9e+146], N[(N[(x1 * x1), $MachinePrecision] * 9.0), $MachinePrecision], If[LessEqual[x1, -1.1e+55], N[(N[(x1 * x1), $MachinePrecision] * N[(12.0 * x2 + 9.0), $MachinePrecision]), $MachinePrecision], N[(x2 * N[(N[(x2 * 8.0 + -12.0), $MachinePrecision] * x1 + -6.0), $MachinePrecision] + N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -9 \cdot 10^{+146}:\\
\;\;\;\;\left(x1 \cdot x1\right) \cdot 9\\
\mathbf{elif}\;x1 \leq -1.1 \cdot 10^{+55}:\\
\;\;\;\;\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(12, x2, 9\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x2, \mathsf{fma}\left(\mathsf{fma}\left(x2, 8, -12\right), x1, -6\right), x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\right)\\
\end{array}
\end{array}
if x1 < -9.00000000000000051e146Initial program 0.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.4
Applied rewrites0.4%
Taylor expanded in x1 around 0
Applied rewrites66.2%
Taylor expanded in x2 around 0
Applied rewrites93.7%
Taylor expanded in x1 around inf
Applied rewrites93.7%
if -9.00000000000000051e146 < x1 < -1.10000000000000005e55Initial program 30.2%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f640.7
Applied rewrites0.7%
Taylor expanded in x1 around 0
Applied rewrites17.1%
Taylor expanded in x2 around 0
Applied rewrites17.1%
Taylor expanded in x1 around inf
Applied rewrites30.6%
if -1.10000000000000005e55 < x1 Initial program 82.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6426.1
Applied rewrites26.1%
Taylor expanded in x1 around 0
Applied rewrites75.7%
Taylor expanded in x2 around 0
Applied rewrites82.5%
Taylor expanded in x1 around 0
Applied rewrites85.2%
Final simplification81.6%
(FPCore (x1 x2) :precision binary64 (if (<= (* 2.0 x2) -5e-129) (* x2 -6.0) (if (<= (* 2.0 x2) 5e-34) (- x1) (+ x1 (* x2 -6.0)))))
double code(double x1, double x2) {
double tmp;
if ((2.0 * x2) <= -5e-129) {
tmp = x2 * -6.0;
} else if ((2.0 * x2) <= 5e-34) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((2.0d0 * x2) <= (-5d-129)) then
tmp = x2 * (-6.0d0)
else if ((2.0d0 * x2) <= 5d-34) then
tmp = -x1
else
tmp = x1 + (x2 * (-6.0d0))
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((2.0 * x2) <= -5e-129) {
tmp = x2 * -6.0;
} else if ((2.0 * x2) <= 5e-34) {
tmp = -x1;
} else {
tmp = x1 + (x2 * -6.0);
}
return tmp;
}
def code(x1, x2): tmp = 0 if (2.0 * x2) <= -5e-129: tmp = x2 * -6.0 elif (2.0 * x2) <= 5e-34: tmp = -x1 else: tmp = x1 + (x2 * -6.0) return tmp
function code(x1, x2) tmp = 0.0 if (Float64(2.0 * x2) <= -5e-129) tmp = Float64(x2 * -6.0); elseif (Float64(2.0 * x2) <= 5e-34) tmp = Float64(-x1); else tmp = Float64(x1 + Float64(x2 * -6.0)); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((2.0 * x2) <= -5e-129) tmp = x2 * -6.0; elseif ((2.0 * x2) <= 5e-34) tmp = -x1; else tmp = x1 + (x2 * -6.0); end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[N[(2.0 * x2), $MachinePrecision], -5e-129], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[N[(2.0 * x2), $MachinePrecision], 5e-34], (-x1), N[(x1 + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-129}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;2 \cdot x2 \leq 5 \cdot 10^{-34}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x1 + x2 \cdot -6\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) x2) < -5.00000000000000027e-129Initial program 71.7%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6424.5
Applied rewrites24.5%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6425.1
Applied rewrites25.1%
if -5.00000000000000027e-129 < (*.f64 #s(literal 2 binary64) x2) < 5.0000000000000003e-34Initial program 58.7%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f648.3
Applied rewrites8.3%
Taylor expanded in x1 around 0
Applied rewrites74.3%
Taylor expanded in x2 around 0
Applied rewrites65.9%
Taylor expanded in x1 around 0
Applied rewrites34.3%
if 5.0000000000000003e-34 < (*.f64 #s(literal 2 binary64) x2) Initial program 66.5%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6431.3
Applied rewrites31.3%
(FPCore (x1 x2) :precision binary64 (if (<= (* 2.0 x2) -5e-129) (* x2 -6.0) (if (<= (* 2.0 x2) 5e-34) (- x1) (* x2 -6.0))))
double code(double x1, double x2) {
double tmp;
if ((2.0 * x2) <= -5e-129) {
tmp = x2 * -6.0;
} else if ((2.0 * x2) <= 5e-34) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
real(8) :: tmp
if ((2.0d0 * x2) <= (-5d-129)) then
tmp = x2 * (-6.0d0)
else if ((2.0d0 * x2) <= 5d-34) then
tmp = -x1
else
tmp = x2 * (-6.0d0)
end if
code = tmp
end function
public static double code(double x1, double x2) {
double tmp;
if ((2.0 * x2) <= -5e-129) {
tmp = x2 * -6.0;
} else if ((2.0 * x2) <= 5e-34) {
tmp = -x1;
} else {
tmp = x2 * -6.0;
}
return tmp;
}
def code(x1, x2): tmp = 0 if (2.0 * x2) <= -5e-129: tmp = x2 * -6.0 elif (2.0 * x2) <= 5e-34: tmp = -x1 else: tmp = x2 * -6.0 return tmp
function code(x1, x2) tmp = 0.0 if (Float64(2.0 * x2) <= -5e-129) tmp = Float64(x2 * -6.0); elseif (Float64(2.0 * x2) <= 5e-34) tmp = Float64(-x1); else tmp = Float64(x2 * -6.0); end return tmp end
function tmp_2 = code(x1, x2) tmp = 0.0; if ((2.0 * x2) <= -5e-129) tmp = x2 * -6.0; elseif ((2.0 * x2) <= 5e-34) tmp = -x1; else tmp = x2 * -6.0; end tmp_2 = tmp; end
code[x1_, x2_] := If[LessEqual[N[(2.0 * x2), $MachinePrecision], -5e-129], N[(x2 * -6.0), $MachinePrecision], If[LessEqual[N[(2.0 * x2), $MachinePrecision], 5e-34], (-x1), N[(x2 * -6.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot x2 \leq -5 \cdot 10^{-129}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{elif}\;2 \cdot x2 \leq 5 \cdot 10^{-34}:\\
\;\;\;\;-x1\\
\mathbf{else}:\\
\;\;\;\;x2 \cdot -6\\
\end{array}
\end{array}
if (*.f64 #s(literal 2 binary64) x2) < -5.00000000000000027e-129 or 5.0000000000000003e-34 < (*.f64 #s(literal 2 binary64) x2) Initial program 69.1%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6427.9
Applied rewrites27.9%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6427.8
Applied rewrites27.8%
if -5.00000000000000027e-129 < (*.f64 #s(literal 2 binary64) x2) < 5.0000000000000003e-34Initial program 58.7%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f648.3
Applied rewrites8.3%
Taylor expanded in x1 around 0
Applied rewrites74.3%
Taylor expanded in x2 around 0
Applied rewrites65.9%
Taylor expanded in x1 around 0
Applied rewrites34.3%
(FPCore (x1 x2) :precision binary64 (if (<= x1 -1.7e-157) (* x1 (fma x1 9.0 -1.0)) (if (<= x1 8.8e-139) (* x2 -6.0) (fma (* x1 9.0) x1 (- x1)))))
double code(double x1, double x2) {
double tmp;
if (x1 <= -1.7e-157) {
tmp = x1 * fma(x1, 9.0, -1.0);
} else if (x1 <= 8.8e-139) {
tmp = x2 * -6.0;
} else {
tmp = fma((x1 * 9.0), x1, -x1);
}
return tmp;
}
function code(x1, x2) tmp = 0.0 if (x1 <= -1.7e-157) tmp = Float64(x1 * fma(x1, 9.0, -1.0)); elseif (x1 <= 8.8e-139) tmp = Float64(x2 * -6.0); else tmp = fma(Float64(x1 * 9.0), x1, Float64(-x1)); end return tmp end
code[x1_, x2_] := If[LessEqual[x1, -1.7e-157], N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 8.8e-139], N[(x2 * -6.0), $MachinePrecision], N[(N[(x1 * 9.0), $MachinePrecision] * x1 + (-x1)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x1 \leq -1.7 \cdot 10^{-157}:\\
\;\;\;\;x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\
\mathbf{elif}\;x1 \leq 8.8 \cdot 10^{-139}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x1 \cdot 9, x1, -x1\right)\\
\end{array}
\end{array}
if x1 < -1.69999999999999989e-157Initial program 47.3%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f645.8
Applied rewrites5.8%
Taylor expanded in x1 around 0
Applied rewrites60.4%
Taylor expanded in x2 around 0
Applied rewrites52.5%
if -1.69999999999999989e-157 < x1 < 8.80000000000000041e-139Initial program 99.5%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6465.8
Applied rewrites65.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6466.1
Applied rewrites66.1%
if 8.80000000000000041e-139 < x1 Initial program 64.0%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f648.2
Applied rewrites8.2%
Taylor expanded in x1 around 0
Applied rewrites76.8%
Taylor expanded in x2 around 0
Applied rewrites54.6%
Applied rewrites54.7%
(FPCore (x1 x2) :precision binary64 (let* ((t_0 (* x1 (fma x1 9.0 -1.0)))) (if (<= x1 -1.7e-157) t_0 (if (<= x1 8.8e-139) (* x2 -6.0) t_0))))
double code(double x1, double x2) {
double t_0 = x1 * fma(x1, 9.0, -1.0);
double tmp;
if (x1 <= -1.7e-157) {
tmp = t_0;
} else if (x1 <= 8.8e-139) {
tmp = x2 * -6.0;
} else {
tmp = t_0;
}
return tmp;
}
function code(x1, x2) t_0 = Float64(x1 * fma(x1, 9.0, -1.0)) tmp = 0.0 if (x1 <= -1.7e-157) tmp = t_0; elseif (x1 <= 8.8e-139) tmp = Float64(x2 * -6.0); else tmp = t_0; end return tmp end
code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(x1 * 9.0 + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.7e-157], t$95$0, If[LessEqual[x1, 8.8e-139], N[(x2 * -6.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x1 \cdot \mathsf{fma}\left(x1, 9, -1\right)\\
\mathbf{if}\;x1 \leq -1.7 \cdot 10^{-157}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x1 \leq 8.8 \cdot 10^{-139}:\\
\;\;\;\;x2 \cdot -6\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x1 < -1.69999999999999989e-157 or 8.80000000000000041e-139 < x1 Initial program 55.1%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f646.9
Applied rewrites6.9%
Taylor expanded in x1 around 0
Applied rewrites68.0%
Taylor expanded in x2 around 0
Applied rewrites53.5%
if -1.69999999999999989e-157 < x1 < 8.80000000000000041e-139Initial program 99.5%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6465.8
Applied rewrites65.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6466.1
Applied rewrites66.1%
(FPCore (x1 x2) :precision binary64 (- x1))
double code(double x1, double x2) {
return -x1;
}
real(8) function code(x1, x2)
real(8), intent (in) :: x1
real(8), intent (in) :: x2
code = -x1
end function
public static double code(double x1, double x2) {
return -x1;
}
def code(x1, x2): return -x1
function code(x1, x2) return Float64(-x1) end
function tmp = code(x1, x2) tmp = -x1; end
code[x1_, x2_] := (-x1)
\begin{array}{l}
\\
-x1
\end{array}
Initial program 64.8%
Taylor expanded in x1 around 0
*-commutativeN/A
lower-*.f6419.8
Applied rewrites19.8%
Taylor expanded in x1 around 0
Applied rewrites69.0%
Taylor expanded in x2 around 0
Applied rewrites45.4%
Taylor expanded in x1 around 0
Applied rewrites17.0%
herbie shell --seed 2024233
(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))))))