
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))))
(if (<= (- (+ (* x y) (* z t)) (* i (* c t_1))) INFINITY)
(* 2.0 (- (fma x y (* z t)) (* (* c i) t_1)))
(*
2.0
(*
(cbrt (fma x y (fma z t (* (fma b c a) (* c (- i))))))
(pow (- (cbrt (* c (* i t_1)))) 2.0))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double tmp;
if ((((x * y) + (z * t)) - (i * (c * t_1))) <= ((double) INFINITY)) {
tmp = 2.0 * (fma(x, y, (z * t)) - ((c * i) * t_1));
} else {
tmp = 2.0 * (cbrt(fma(x, y, fma(z, t, (fma(b, c, a) * (c * -i))))) * pow(-cbrt((c * (i * t_1))), 2.0));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) tmp = 0.0 if (Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(c * t_1))) <= Inf) tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(c * i) * t_1))); else tmp = Float64(2.0 * Float64(cbrt(fma(x, y, fma(z, t, Float64(fma(b, c, a) * Float64(c * Float64(-i)))))) * (Float64(-cbrt(Float64(c * Float64(i * t_1)))) ^ 2.0))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * i), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[(x * y + N[(z * t + N[(N[(b * c + a), $MachinePrecision] * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[(-N[Power[N[(c * N[(i * t$95$1), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
\mathbf{if}\;\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot t\_1\right) \leq \infty:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(c \cdot i\right) \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt[3]{\mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, \mathsf{fma}\left(b, c, a\right) \cdot \left(c \cdot \left(-i\right)\right)\right)\right)} \cdot {\left(-\sqrt[3]{c \cdot \left(i \cdot t\_1\right)}\right)}^{2}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) < +inf.0Initial program 94.8%
fma-define94.8%
associate-*l*98.0%
Simplified98.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) Initial program 0.0%
Applied egg-rr66.7%
Taylor expanded in i around -inf 66.7%
Final simplification96.1%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (cbrt (fma x y (fma z t (* (fma b c a) (* c (- i)))))))) (* 2.0 (* t_1 (pow t_1 2.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = cbrt(fma(x, y, fma(z, t, (fma(b, c, a) * (c * -i)))));
return 2.0 * (t_1 * pow(t_1, 2.0));
}
function code(x, y, z, t, a, b, c, i) t_1 = cbrt(fma(x, y, fma(z, t, Float64(fma(b, c, a) * Float64(c * Float64(-i)))))) return Float64(2.0 * Float64(t_1 * (t_1 ^ 2.0))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Power[N[(x * y + N[(z * t + N[(N[(b * c + a), $MachinePrecision] * N[(c * (-i)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, N[(2.0 * N[(t$95$1 * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt[3]{\mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, \mathsf{fma}\left(b, c, a\right) \cdot \left(c \cdot \left(-i\right)\right)\right)\right)}\\
2 \cdot \left(t\_1 \cdot {t\_1}^{2}\right)
\end{array}
\end{array}
Initial program 89.3%
Applied egg-rr95.2%
Final simplification95.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))))
(if (<= (- (+ (* x y) (* z t)) (* i (* c t_1))) INFINITY)
(* 2.0 (- (fma x y (* z t)) (* (* c i) t_1)))
(* 2.0 (* t (+ z (* x (/ y t))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double tmp;
if ((((x * y) + (z * t)) - (i * (c * t_1))) <= ((double) INFINITY)) {
tmp = 2.0 * (fma(x, y, (z * t)) - ((c * i) * t_1));
} else {
tmp = 2.0 * (t * (z + (x * (y / t))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) tmp = 0.0 if (Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(c * t_1))) <= Inf) tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(c * i) * t_1))); else tmp = Float64(2.0 * Float64(t * Float64(z + Float64(x * Float64(y / t))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * i), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t * N[(z + N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
\mathbf{if}\;\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot t\_1\right) \leq \infty:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(c \cdot i\right) \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t \cdot \left(z + x \cdot \frac{y}{t}\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) < +inf.0Initial program 94.8%
fma-define94.8%
associate-*l*98.0%
Simplified98.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) Initial program 0.0%
Taylor expanded in c around 0 20.0%
Taylor expanded in t around inf 40.0%
associate-/l*60.0%
Simplified60.0%
Final simplification95.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* i (* c t_1))) (t_3 (* c (* i t_1))))
(if (<= t_2 (- INFINITY))
(* 2.0 (- (* z t) t_3))
(if (<= t_2 1e+307) (* 2.0 (- (+ (* x y) (* z t)) t_2)) (* t_3 -2.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = i * (c * t_1);
double t_3 = c * (i * t_1);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = 2.0 * ((z * t) - t_3);
} else if (t_2 <= 1e+307) {
tmp = 2.0 * (((x * y) + (z * t)) - t_2);
} else {
tmp = t_3 * -2.0;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = i * (c * t_1);
double t_3 = c * (i * t_1);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = 2.0 * ((z * t) - t_3);
} else if (t_2 <= 1e+307) {
tmp = 2.0 * (((x * y) + (z * t)) - t_2);
} else {
tmp = t_3 * -2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = i * (c * t_1) t_3 = c * (i * t_1) tmp = 0 if t_2 <= -math.inf: tmp = 2.0 * ((z * t) - t_3) elif t_2 <= 1e+307: tmp = 2.0 * (((x * y) + (z * t)) - t_2) else: tmp = t_3 * -2.0 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(i * Float64(c * t_1)) t_3 = Float64(c * Float64(i * t_1)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(2.0 * Float64(Float64(z * t) - t_3)); elseif (t_2 <= 1e+307) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - t_2)); else tmp = Float64(t_3 * -2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = i * (c * t_1); t_3 = c * (i * t_1); tmp = 0.0; if (t_2 <= -Inf) tmp = 2.0 * ((z * t) - t_3); elseif (t_2 <= 1e+307) tmp = 2.0 * (((x * y) + (z * t)) - t_2); else tmp = t_3 * -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c * N[(i * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * -2.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := i \cdot \left(c \cdot t\_1\right)\\
t_3 := c \cdot \left(i \cdot t\_1\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_3\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot -2\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0Initial program 81.0%
Taylor expanded in x around 0 95.8%
if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.99999999999999986e306Initial program 96.6%
if 9.99999999999999986e306 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 75.9%
Taylor expanded in i around inf 90.7%
Taylor expanded in i around 0 90.7%
Final simplification95.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* x y) (* z t))))
(t_2 (* (* c (* i (+ a (* b c)))) -2.0)))
(if (<= c -4.2e-69)
t_2
(if (<= c 8.6e-154)
t_1
(if (<= c 2.65e-66)
(* 2.0 (- (* z t) (* a (* c i))))
(if (<= c 2.1e+27)
(* 2.0 (* y (+ x (* t (/ z y)))))
(if (or (<= c 1.75e+75) (not (<= c 2.3e+102))) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double t_2 = (c * (i * (a + (b * c)))) * -2.0;
double tmp;
if (c <= -4.2e-69) {
tmp = t_2;
} else if (c <= 8.6e-154) {
tmp = t_1;
} else if (c <= 2.65e-66) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 2.1e+27) {
tmp = 2.0 * (y * (x + (t * (z / y))));
} else if ((c <= 1.75e+75) || !(c <= 2.3e+102)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) + (z * t))
t_2 = (c * (i * (a + (b * c)))) * (-2.0d0)
if (c <= (-4.2d-69)) then
tmp = t_2
else if (c <= 8.6d-154) then
tmp = t_1
else if (c <= 2.65d-66) then
tmp = 2.0d0 * ((z * t) - (a * (c * i)))
else if (c <= 2.1d+27) then
tmp = 2.0d0 * (y * (x + (t * (z / y))))
else if ((c <= 1.75d+75) .or. (.not. (c <= 2.3d+102))) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double t_2 = (c * (i * (a + (b * c)))) * -2.0;
double tmp;
if (c <= -4.2e-69) {
tmp = t_2;
} else if (c <= 8.6e-154) {
tmp = t_1;
} else if (c <= 2.65e-66) {
tmp = 2.0 * ((z * t) - (a * (c * i)));
} else if (c <= 2.1e+27) {
tmp = 2.0 * (y * (x + (t * (z / y))));
} else if ((c <= 1.75e+75) || !(c <= 2.3e+102)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) + (z * t)) t_2 = (c * (i * (a + (b * c)))) * -2.0 tmp = 0 if c <= -4.2e-69: tmp = t_2 elif c <= 8.6e-154: tmp = t_1 elif c <= 2.65e-66: tmp = 2.0 * ((z * t) - (a * (c * i))) elif c <= 2.1e+27: tmp = 2.0 * (y * (x + (t * (z / y)))) elif (c <= 1.75e+75) or not (c <= 2.3e+102): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))) t_2 = Float64(Float64(c * Float64(i * Float64(a + Float64(b * c)))) * -2.0) tmp = 0.0 if (c <= -4.2e-69) tmp = t_2; elseif (c <= 8.6e-154) tmp = t_1; elseif (c <= 2.65e-66) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(a * Float64(c * i)))); elseif (c <= 2.1e+27) tmp = Float64(2.0 * Float64(y * Float64(x + Float64(t * Float64(z / y))))); elseif ((c <= 1.75e+75) || !(c <= 2.3e+102)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) + (z * t)); t_2 = (c * (i * (a + (b * c)))) * -2.0; tmp = 0.0; if (c <= -4.2e-69) tmp = t_2; elseif (c <= 8.6e-154) tmp = t_1; elseif (c <= 2.65e-66) tmp = 2.0 * ((z * t) - (a * (c * i))); elseif (c <= 2.1e+27) tmp = 2.0 * (y * (x + (t * (z / y)))); elseif ((c <= 1.75e+75) || ~((c <= 2.3e+102))) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -4.2e-69], t$95$2, If[LessEqual[c, 8.6e-154], t$95$1, If[LessEqual[c, 2.65e-66], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.1e+27], N[(2.0 * N[(y * N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, 1.75e+75], N[Not[LessEqual[c, 2.3e+102]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
t_2 := \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -4.2 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 8.6 \cdot 10^{-154}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2.65 \cdot 10^{-66}:\\
\;\;\;\;2 \cdot \left(z \cdot t - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 2.1 \cdot 10^{+27}:\\
\;\;\;\;2 \cdot \left(y \cdot \left(x + t \cdot \frac{z}{y}\right)\right)\\
\mathbf{elif}\;c \leq 1.75 \cdot 10^{+75} \lor \neg \left(c \leq 2.3 \cdot 10^{+102}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -4.1999999999999999e-69 or 2.09999999999999995e27 < c < 1.7499999999999999e75 or 2.2999999999999999e102 < c Initial program 84.2%
Taylor expanded in i around inf 77.3%
Taylor expanded in i around 0 77.3%
if -4.1999999999999999e-69 < c < 8.59999999999999983e-154 or 1.7499999999999999e75 < c < 2.2999999999999999e102Initial program 95.1%
Taylor expanded in c around 0 91.0%
if 8.59999999999999983e-154 < c < 2.6500000000000002e-66Initial program 89.3%
Taylor expanded in a around inf 85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in x around 0 81.0%
if 2.6500000000000002e-66 < c < 2.09999999999999995e27Initial program 99.8%
Taylor expanded in c around 0 71.1%
Taylor expanded in y around inf 71.1%
associate-/l*71.1%
Simplified71.1%
Final simplification81.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (+ (* x y) (* z t))))
(t_2 (* (* c (* i (+ a (* b c)))) -2.0)))
(if (<= c -4e-69)
t_2
(if (<= c 8e-154)
t_1
(if (<= c 1.78e-68)
(* 2.0 (- (* z t) (* i (* c a))))
(if (<= c 2.5e+27)
(* 2.0 (* y (+ x (* t (/ z y)))))
(if (or (<= c 2.05e+76) (not (<= c 2.6e+102))) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double t_2 = (c * (i * (a + (b * c)))) * -2.0;
double tmp;
if (c <= -4e-69) {
tmp = t_2;
} else if (c <= 8e-154) {
tmp = t_1;
} else if (c <= 1.78e-68) {
tmp = 2.0 * ((z * t) - (i * (c * a)));
} else if (c <= 2.5e+27) {
tmp = 2.0 * (y * (x + (t * (z / y))));
} else if ((c <= 2.05e+76) || !(c <= 2.6e+102)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * ((x * y) + (z * t))
t_2 = (c * (i * (a + (b * c)))) * (-2.0d0)
if (c <= (-4d-69)) then
tmp = t_2
else if (c <= 8d-154) then
tmp = t_1
else if (c <= 1.78d-68) then
tmp = 2.0d0 * ((z * t) - (i * (c * a)))
else if (c <= 2.5d+27) then
tmp = 2.0d0 * (y * (x + (t * (z / y))))
else if ((c <= 2.05d+76) .or. (.not. (c <= 2.6d+102))) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((x * y) + (z * t));
double t_2 = (c * (i * (a + (b * c)))) * -2.0;
double tmp;
if (c <= -4e-69) {
tmp = t_2;
} else if (c <= 8e-154) {
tmp = t_1;
} else if (c <= 1.78e-68) {
tmp = 2.0 * ((z * t) - (i * (c * a)));
} else if (c <= 2.5e+27) {
tmp = 2.0 * (y * (x + (t * (z / y))));
} else if ((c <= 2.05e+76) || !(c <= 2.6e+102)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((x * y) + (z * t)) t_2 = (c * (i * (a + (b * c)))) * -2.0 tmp = 0 if c <= -4e-69: tmp = t_2 elif c <= 8e-154: tmp = t_1 elif c <= 1.78e-68: tmp = 2.0 * ((z * t) - (i * (c * a))) elif c <= 2.5e+27: tmp = 2.0 * (y * (x + (t * (z / y)))) elif (c <= 2.05e+76) or not (c <= 2.6e+102): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))) t_2 = Float64(Float64(c * Float64(i * Float64(a + Float64(b * c)))) * -2.0) tmp = 0.0 if (c <= -4e-69) tmp = t_2; elseif (c <= 8e-154) tmp = t_1; elseif (c <= 1.78e-68) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(c * a)))); elseif (c <= 2.5e+27) tmp = Float64(2.0 * Float64(y * Float64(x + Float64(t * Float64(z / y))))); elseif ((c <= 2.05e+76) || !(c <= 2.6e+102)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((x * y) + (z * t)); t_2 = (c * (i * (a + (b * c)))) * -2.0; tmp = 0.0; if (c <= -4e-69) tmp = t_2; elseif (c <= 8e-154) tmp = t_1; elseif (c <= 1.78e-68) tmp = 2.0 * ((z * t) - (i * (c * a))); elseif (c <= 2.5e+27) tmp = 2.0 * (y * (x + (t * (z / y)))); elseif ((c <= 2.05e+76) || ~((c <= 2.6e+102))) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -4e-69], t$95$2, If[LessEqual[c, 8e-154], t$95$1, If[LessEqual[c, 1.78e-68], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.5e+27], N[(2.0 * N[(y * N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[c, 2.05e+76], N[Not[LessEqual[c, 2.6e+102]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
t_2 := \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -4 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 8 \cdot 10^{-154}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.78 \cdot 10^{-68}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot a\right)\right)\\
\mathbf{elif}\;c \leq 2.5 \cdot 10^{+27}:\\
\;\;\;\;2 \cdot \left(y \cdot \left(x + t \cdot \frac{z}{y}\right)\right)\\
\mathbf{elif}\;c \leq 2.05 \cdot 10^{+76} \lor \neg \left(c \leq 2.6 \cdot 10^{+102}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -3.9999999999999999e-69 or 2.4999999999999999e27 < c < 2.0499999999999999e76 or 2.60000000000000006e102 < c Initial program 84.2%
Taylor expanded in i around inf 77.3%
Taylor expanded in i around 0 77.3%
if -3.9999999999999999e-69 < c < 7.9999999999999998e-154 or 2.0499999999999999e76 < c < 2.60000000000000006e102Initial program 95.1%
Taylor expanded in c around 0 91.0%
if 7.9999999999999998e-154 < c < 1.7799999999999999e-68Initial program 89.3%
Taylor expanded in a around inf 85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in y around inf 71.9%
associate--l+71.9%
div-sub71.9%
Simplified71.9%
Taylor expanded in y around 0 81.0%
associate-*r*86.0%
*-commutative86.0%
*-commutative86.0%
Simplified86.0%
if 1.7799999999999999e-68 < c < 2.4999999999999999e27Initial program 99.8%
Taylor expanded in c around 0 71.1%
Taylor expanded in y around inf 71.1%
associate-/l*71.1%
Simplified71.1%
Final simplification81.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (+ (* x y) (* z t))))
(if (<= (- t_2 (* i (* c t_1))) INFINITY)
(* 2.0 (- t_2 (* (* c i) t_1)))
(* 2.0 (* t (+ z (* x (/ y t))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - (i * (c * t_1))) <= ((double) INFINITY)) {
tmp = 2.0 * (t_2 - ((c * i) * t_1));
} else {
tmp = 2.0 * (t * (z + (x * (y / t))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = (x * y) + (z * t);
double tmp;
if ((t_2 - (i * (c * t_1))) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 * (t_2 - ((c * i) * t_1));
} else {
tmp = 2.0 * (t * (z + (x * (y / t))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (b * c) t_2 = (x * y) + (z * t) tmp = 0 if (t_2 - (i * (c * t_1))) <= math.inf: tmp = 2.0 * (t_2 - ((c * i) * t_1)) else: tmp = 2.0 * (t * (z + (x * (y / t)))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (Float64(t_2 - Float64(i * Float64(c * t_1))) <= Inf) tmp = Float64(2.0 * Float64(t_2 - Float64(Float64(c * i) * t_1))); else tmp = Float64(2.0 * Float64(t * Float64(z + Float64(x * Float64(y / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (b * c); t_2 = (x * y) + (z * t); tmp = 0.0; if ((t_2 - (i * (c * t_1))) <= Inf) tmp = 2.0 * (t_2 - ((c * i) * t_1)); else tmp = 2.0 * (t * (z + (x * (y / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$2 - N[(i * N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(t$95$2 - N[(N[(c * i), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t * N[(z + N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := x \cdot y + z \cdot t\\
\mathbf{if}\;t\_2 - i \cdot \left(c \cdot t\_1\right) \leq \infty:\\
\;\;\;\;2 \cdot \left(t\_2 - \left(c \cdot i\right) \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t \cdot \left(z + x \cdot \frac{y}{t}\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) < +inf.0Initial program 94.8%
fma-define94.8%
associate-*l*98.0%
Simplified98.0%
fma-define98.0%
+-commutative98.0%
Applied egg-rr98.0%
if +inf.0 < (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)) Initial program 0.0%
Taylor expanded in c around 0 20.0%
Taylor expanded in t around inf 40.0%
associate-/l*60.0%
Simplified60.0%
Final simplification95.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* i (+ a (* b c))))) (t_2 (* 2.0 (- (* x y) t_1))))
(if (<= c -2.1e-9)
t_2
(if (<= c 0.054)
(* 2.0 (- (+ (* x y) (* z t)) (* i (* c a))))
(if (<= c 1.32e+115)
t_2
(if (<= c 1.55e+197)
(* 2.0 (- (* z t) (* c (+ (* a i) (* b (* c i))))))
(* t_1 -2.0)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * (i * (a + (b * c)));
double t_2 = 2.0 * ((x * y) - t_1);
double tmp;
if (c <= -2.1e-9) {
tmp = t_2;
} else if (c <= 0.054) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
} else if (c <= 1.32e+115) {
tmp = t_2;
} else if (c <= 1.55e+197) {
tmp = 2.0 * ((z * t) - (c * ((a * i) + (b * (c * i)))));
} else {
tmp = t_1 * -2.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = c * (i * (a + (b * c)))
t_2 = 2.0d0 * ((x * y) - t_1)
if (c <= (-2.1d-9)) then
tmp = t_2
else if (c <= 0.054d0) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (i * (c * a)))
else if (c <= 1.32d+115) then
tmp = t_2
else if (c <= 1.55d+197) then
tmp = 2.0d0 * ((z * t) - (c * ((a * i) + (b * (c * i)))))
else
tmp = t_1 * (-2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * (i * (a + (b * c)));
double t_2 = 2.0 * ((x * y) - t_1);
double tmp;
if (c <= -2.1e-9) {
tmp = t_2;
} else if (c <= 0.054) {
tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a)));
} else if (c <= 1.32e+115) {
tmp = t_2;
} else if (c <= 1.55e+197) {
tmp = 2.0 * ((z * t) - (c * ((a * i) + (b * (c * i)))));
} else {
tmp = t_1 * -2.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * (i * (a + (b * c))) t_2 = 2.0 * ((x * y) - t_1) tmp = 0 if c <= -2.1e-9: tmp = t_2 elif c <= 0.054: tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a))) elif c <= 1.32e+115: tmp = t_2 elif c <= 1.55e+197: tmp = 2.0 * ((z * t) - (c * ((a * i) + (b * (c * i))))) else: tmp = t_1 * -2.0 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(i * Float64(a + Float64(b * c)))) t_2 = Float64(2.0 * Float64(Float64(x * y) - t_1)) tmp = 0.0 if (c <= -2.1e-9) tmp = t_2; elseif (c <= 0.054) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(i * Float64(c * a)))); elseif (c <= 1.32e+115) tmp = t_2; elseif (c <= 1.55e+197) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(Float64(a * i) + Float64(b * Float64(c * i)))))); else tmp = Float64(t_1 * -2.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * (i * (a + (b * c))); t_2 = 2.0 * ((x * y) - t_1); tmp = 0.0; if (c <= -2.1e-9) tmp = t_2; elseif (c <= 0.054) tmp = 2.0 * (((x * y) + (z * t)) - (i * (c * a))); elseif (c <= 1.32e+115) tmp = t_2; elseif (c <= 1.55e+197) tmp = 2.0 * ((z * t) - (c * ((a * i) + (b * (c * i))))); else tmp = t_1 * -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.1e-9], t$95$2, If[LessEqual[c, 0.054], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.32e+115], t$95$2, If[LessEqual[c, 1.55e+197], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(N[(a * i), $MachinePrecision] + N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * -2.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\\
t_2 := 2 \cdot \left(x \cdot y - t\_1\right)\\
\mathbf{if}\;c \leq -2.1 \cdot 10^{-9}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 0.054:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(c \cdot a\right)\right)\\
\mathbf{elif}\;c \leq 1.32 \cdot 10^{+115}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 1.55 \cdot 10^{+197}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot -2\\
\end{array}
\end{array}
if c < -2.10000000000000019e-9 or 0.0539999999999999994 < c < 1.32e115Initial program 86.3%
Taylor expanded in z around 0 88.1%
if -2.10000000000000019e-9 < c < 0.0539999999999999994Initial program 96.6%
Taylor expanded in a around inf 94.1%
*-commutative94.1%
Simplified94.1%
if 1.32e115 < c < 1.55e197Initial program 58.5%
Taylor expanded in c around 0 93.7%
Taylor expanded in x around 0 85.2%
if 1.55e197 < c Initial program 85.1%
Taylor expanded in i around inf 95.3%
Taylor expanded in i around 0 95.3%
Final simplification91.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* z t) (* c (* i (+ a (* b c))))))))
(if (<= c -1.48e-106)
t_1
(if (<= c 7.2e-154)
(* 2.0 (+ (* x y) (* z t)))
(if (<= c 5.6e-99)
(* 2.0 (- (* z t) (* i (* c a))))
(if (<= c 1.4e-13) (* 2.0 (- (* x y) (* a (* c i)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((z * t) - (c * (i * (a + (b * c)))));
double tmp;
if (c <= -1.48e-106) {
tmp = t_1;
} else if (c <= 7.2e-154) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 5.6e-99) {
tmp = 2.0 * ((z * t) - (i * (c * a)));
} else if (c <= 1.4e-13) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * ((z * t) - (c * (i * (a + (b * c)))))
if (c <= (-1.48d-106)) then
tmp = t_1
else if (c <= 7.2d-154) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if (c <= 5.6d-99) then
tmp = 2.0d0 * ((z * t) - (i * (c * a)))
else if (c <= 1.4d-13) then
tmp = 2.0d0 * ((x * y) - (a * (c * i)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((z * t) - (c * (i * (a + (b * c)))));
double tmp;
if (c <= -1.48e-106) {
tmp = t_1;
} else if (c <= 7.2e-154) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 5.6e-99) {
tmp = 2.0 * ((z * t) - (i * (c * a)));
} else if (c <= 1.4e-13) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * ((z * t) - (c * (i * (a + (b * c))))) tmp = 0 if c <= -1.48e-106: tmp = t_1 elif c <= 7.2e-154: tmp = 2.0 * ((x * y) + (z * t)) elif c <= 5.6e-99: tmp = 2.0 * ((z * t) - (i * (c * a))) elif c <= 1.4e-13: tmp = 2.0 * ((x * y) - (a * (c * i))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(z * t) - Float64(c * Float64(i * Float64(a + Float64(b * c)))))) tmp = 0.0 if (c <= -1.48e-106) tmp = t_1; elseif (c <= 7.2e-154) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif (c <= 5.6e-99) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(c * a)))); elseif (c <= 1.4e-13) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * ((z * t) - (c * (i * (a + (b * c))))); tmp = 0.0; if (c <= -1.48e-106) tmp = t_1; elseif (c <= 7.2e-154) tmp = 2.0 * ((x * y) + (z * t)); elseif (c <= 5.6e-99) tmp = 2.0 * ((z * t) - (i * (c * a))); elseif (c <= 1.4e-13) tmp = 2.0 * ((x * y) - (a * (c * i))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.48e-106], t$95$1, If[LessEqual[c, 7.2e-154], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.6e-99], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.4e-13], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\
\mathbf{if}\;c \leq -1.48 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 7.2 \cdot 10^{-154}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;c \leq 5.6 \cdot 10^{-99}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot a\right)\right)\\
\mathbf{elif}\;c \leq 1.4 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.4800000000000001e-106 or 1.4000000000000001e-13 < c Initial program 84.2%
Taylor expanded in x around 0 80.0%
if -1.4800000000000001e-106 < c < 7.2000000000000006e-154Initial program 98.5%
Taylor expanded in c around 0 92.0%
if 7.2000000000000006e-154 < c < 5.6000000000000001e-99Initial program 85.6%
Taylor expanded in a around inf 81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y around inf 67.9%
associate--l+67.9%
div-sub67.9%
Simplified67.9%
Taylor expanded in y around 0 81.4%
associate-*r*88.1%
*-commutative88.1%
*-commutative88.1%
Simplified88.1%
if 5.6000000000000001e-99 < c < 1.4000000000000001e-13Initial program 99.8%
Taylor expanded in a around inf 92.8%
*-commutative92.8%
Simplified92.8%
Taylor expanded in z around 0 89.1%
Final simplification84.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* i (+ a (* b c)))))
(t_2 (* 2.0 (- (* x y) t_1)))
(t_3 (+ (* x y) (* z t))))
(if (<= c -4.7e-11)
t_2
(if (<= c 0.16)
(* 2.0 (- t_3 (* i (* c a))))
(if (<= c 2.4e+80)
t_2
(if (<= c 2.3e+102) (* 2.0 t_3) (* 2.0 (- (* z t) t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * (i * (a + (b * c)));
double t_2 = 2.0 * ((x * y) - t_1);
double t_3 = (x * y) + (z * t);
double tmp;
if (c <= -4.7e-11) {
tmp = t_2;
} else if (c <= 0.16) {
tmp = 2.0 * (t_3 - (i * (c * a)));
} else if (c <= 2.4e+80) {
tmp = t_2;
} else if (c <= 2.3e+102) {
tmp = 2.0 * t_3;
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c * (i * (a + (b * c)))
t_2 = 2.0d0 * ((x * y) - t_1)
t_3 = (x * y) + (z * t)
if (c <= (-4.7d-11)) then
tmp = t_2
else if (c <= 0.16d0) then
tmp = 2.0d0 * (t_3 - (i * (c * a)))
else if (c <= 2.4d+80) then
tmp = t_2
else if (c <= 2.3d+102) then
tmp = 2.0d0 * t_3
else
tmp = 2.0d0 * ((z * t) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * (i * (a + (b * c)));
double t_2 = 2.0 * ((x * y) - t_1);
double t_3 = (x * y) + (z * t);
double tmp;
if (c <= -4.7e-11) {
tmp = t_2;
} else if (c <= 0.16) {
tmp = 2.0 * (t_3 - (i * (c * a)));
} else if (c <= 2.4e+80) {
tmp = t_2;
} else if (c <= 2.3e+102) {
tmp = 2.0 * t_3;
} else {
tmp = 2.0 * ((z * t) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * (i * (a + (b * c))) t_2 = 2.0 * ((x * y) - t_1) t_3 = (x * y) + (z * t) tmp = 0 if c <= -4.7e-11: tmp = t_2 elif c <= 0.16: tmp = 2.0 * (t_3 - (i * (c * a))) elif c <= 2.4e+80: tmp = t_2 elif c <= 2.3e+102: tmp = 2.0 * t_3 else: tmp = 2.0 * ((z * t) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(i * Float64(a + Float64(b * c)))) t_2 = Float64(2.0 * Float64(Float64(x * y) - t_1)) t_3 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (c <= -4.7e-11) tmp = t_2; elseif (c <= 0.16) tmp = Float64(2.0 * Float64(t_3 - Float64(i * Float64(c * a)))); elseif (c <= 2.4e+80) tmp = t_2; elseif (c <= 2.3e+102) tmp = Float64(2.0 * t_3); else tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * (i * (a + (b * c))); t_2 = 2.0 * ((x * y) - t_1); t_3 = (x * y) + (z * t); tmp = 0.0; if (c <= -4.7e-11) tmp = t_2; elseif (c <= 0.16) tmp = 2.0 * (t_3 - (i * (c * a))); elseif (c <= 2.4e+80) tmp = t_2; elseif (c <= 2.3e+102) tmp = 2.0 * t_3; else tmp = 2.0 * ((z * t) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.7e-11], t$95$2, If[LessEqual[c, 0.16], N[(2.0 * N[(t$95$3 - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.4e+80], t$95$2, If[LessEqual[c, 2.3e+102], N[(2.0 * t$95$3), $MachinePrecision], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\\
t_2 := 2 \cdot \left(x \cdot y - t\_1\right)\\
t_3 := x \cdot y + z \cdot t\\
\mathbf{if}\;c \leq -4.7 \cdot 10^{-11}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 0.16:\\
\;\;\;\;2 \cdot \left(t\_3 - i \cdot \left(c \cdot a\right)\right)\\
\mathbf{elif}\;c \leq 2.4 \cdot 10^{+80}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 2.3 \cdot 10^{+102}:\\
\;\;\;\;2 \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\end{array}
\end{array}
if c < -4.69999999999999993e-11 or 0.160000000000000003 < c < 2.39999999999999979e80Initial program 87.1%
Taylor expanded in z around 0 90.3%
if -4.69999999999999993e-11 < c < 0.160000000000000003Initial program 96.6%
Taylor expanded in a around inf 94.1%
*-commutative94.1%
Simplified94.1%
if 2.39999999999999979e80 < c < 2.2999999999999999e102Initial program 66.7%
Taylor expanded in c around 0 100.0%
if 2.2999999999999999e102 < c Initial program 77.3%
Taylor expanded in x around 0 82.1%
Final simplification90.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= c -4.2e-69)
(not (or (<= c 2e+27) (and (not (<= c 1.25e+80)) (<= c 3.4e+102)))))
(* (* c (* i (+ a (* b c)))) -2.0)
(* 2.0 (+ (* x y) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -4.2e-69) || !((c <= 2e+27) || (!(c <= 1.25e+80) && (c <= 3.4e+102)))) {
tmp = (c * (i * (a + (b * c)))) * -2.0;
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((c <= (-4.2d-69)) .or. (.not. (c <= 2d+27) .or. (.not. (c <= 1.25d+80)) .and. (c <= 3.4d+102))) then
tmp = (c * (i * (a + (b * c)))) * (-2.0d0)
else
tmp = 2.0d0 * ((x * y) + (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c <= -4.2e-69) || !((c <= 2e+27) || (!(c <= 1.25e+80) && (c <= 3.4e+102)))) {
tmp = (c * (i * (a + (b * c)))) * -2.0;
} else {
tmp = 2.0 * ((x * y) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c <= -4.2e-69) or not ((c <= 2e+27) or (not (c <= 1.25e+80) and (c <= 3.4e+102))): tmp = (c * (i * (a + (b * c)))) * -2.0 else: tmp = 2.0 * ((x * y) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((c <= -4.2e-69) || !((c <= 2e+27) || (!(c <= 1.25e+80) && (c <= 3.4e+102)))) tmp = Float64(Float64(c * Float64(i * Float64(a + Float64(b * c)))) * -2.0); else tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c <= -4.2e-69) || ~(((c <= 2e+27) || (~((c <= 1.25e+80)) && (c <= 3.4e+102))))) tmp = (c * (i * (a + (b * c)))) * -2.0; else tmp = 2.0 * ((x * y) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[c, -4.2e-69], N[Not[Or[LessEqual[c, 2e+27], And[N[Not[LessEqual[c, 1.25e+80]], $MachinePrecision], LessEqual[c, 3.4e+102]]]], $MachinePrecision]], N[(N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.2 \cdot 10^{-69} \lor \neg \left(c \leq 2 \cdot 10^{+27} \lor \neg \left(c \leq 1.25 \cdot 10^{+80}\right) \land c \leq 3.4 \cdot 10^{+102}\right):\\
\;\;\;\;\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\end{array}
if c < -4.1999999999999999e-69 or 2e27 < c < 1.2499999999999999e80 or 3.4e102 < c Initial program 84.2%
Taylor expanded in i around inf 77.3%
Taylor expanded in i around 0 77.3%
if -4.1999999999999999e-69 < c < 2e27 or 1.2499999999999999e80 < c < 3.4e102Initial program 94.9%
Taylor expanded in c around 0 79.9%
Final simplification78.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* c (* i (+ a (* b c)))) -2.0)))
(if (<= c -5.8e-70)
t_1
(if (<= c 8.6e-154)
(* 2.0 (+ (* x y) (* z t)))
(if (<= c 7.1e-99)
(* 2.0 (- (* z t) (* i (* c a))))
(if (<= c 3.9e+93) (* 2.0 (- (* x y) (* a (* c i)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * (i * (a + (b * c)))) * -2.0;
double tmp;
if (c <= -5.8e-70) {
tmp = t_1;
} else if (c <= 8.6e-154) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 7.1e-99) {
tmp = 2.0 * ((z * t) - (i * (c * a)));
} else if (c <= 3.9e+93) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (c * (i * (a + (b * c)))) * (-2.0d0)
if (c <= (-5.8d-70)) then
tmp = t_1
else if (c <= 8.6d-154) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if (c <= 7.1d-99) then
tmp = 2.0d0 * ((z * t) - (i * (c * a)))
else if (c <= 3.9d+93) then
tmp = 2.0d0 * ((x * y) - (a * (c * i)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (c * (i * (a + (b * c)))) * -2.0;
double tmp;
if (c <= -5.8e-70) {
tmp = t_1;
} else if (c <= 8.6e-154) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 7.1e-99) {
tmp = 2.0 * ((z * t) - (i * (c * a)));
} else if (c <= 3.9e+93) {
tmp = 2.0 * ((x * y) - (a * (c * i)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * (i * (a + (b * c)))) * -2.0 tmp = 0 if c <= -5.8e-70: tmp = t_1 elif c <= 8.6e-154: tmp = 2.0 * ((x * y) + (z * t)) elif c <= 7.1e-99: tmp = 2.0 * ((z * t) - (i * (c * a))) elif c <= 3.9e+93: tmp = 2.0 * ((x * y) - (a * (c * i))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * Float64(i * Float64(a + Float64(b * c)))) * -2.0) tmp = 0.0 if (c <= -5.8e-70) tmp = t_1; elseif (c <= 8.6e-154) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif (c <= 7.1e-99) tmp = Float64(2.0 * Float64(Float64(z * t) - Float64(i * Float64(c * a)))); elseif (c <= 3.9e+93) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(a * Float64(c * i)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (c * (i * (a + (b * c)))) * -2.0; tmp = 0.0; if (c <= -5.8e-70) tmp = t_1; elseif (c <= 8.6e-154) tmp = 2.0 * ((x * y) + (z * t)); elseif (c <= 7.1e-99) tmp = 2.0 * ((z * t) - (i * (c * a))); elseif (c <= 3.9e+93) tmp = 2.0 * ((x * y) - (a * (c * i))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, If[LessEqual[c, -5.8e-70], t$95$1, If[LessEqual[c, 8.6e-154], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 7.1e-99], N[(2.0 * N[(N[(z * t), $MachinePrecision] - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.9e+93], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot -2\\
\mathbf{if}\;c \leq -5.8 \cdot 10^{-70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 8.6 \cdot 10^{-154}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;c \leq 7.1 \cdot 10^{-99}:\\
\;\;\;\;2 \cdot \left(z \cdot t - i \cdot \left(c \cdot a\right)\right)\\
\mathbf{elif}\;c \leq 3.9 \cdot 10^{+93}:\\
\;\;\;\;2 \cdot \left(x \cdot y - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -5.79999999999999943e-70 or 3.9000000000000002e93 < c Initial program 82.8%
Taylor expanded in i around inf 76.9%
Taylor expanded in i around 0 76.9%
if -5.79999999999999943e-70 < c < 8.59999999999999983e-154Initial program 97.3%
Taylor expanded in c around 0 90.3%
if 8.59999999999999983e-154 < c < 7.09999999999999994e-99Initial program 85.6%
Taylor expanded in a around inf 81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y around inf 67.9%
associate--l+67.9%
div-sub67.9%
Simplified67.9%
Taylor expanded in y around 0 81.4%
associate-*r*88.1%
*-commutative88.1%
*-commutative88.1%
Simplified88.1%
if 7.09999999999999994e-99 < c < 3.9000000000000002e93Initial program 94.9%
Taylor expanded in a around inf 80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in z around 0 71.4%
Final simplification80.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* z t))))
(if (<= c -6.8e-8)
(* 2.0 (- (* x y) (* c (* i (+ a (* b c))))))
(if (<= c 3.4e-44)
(* 2.0 (- t_1 (* i (* c a))))
(* 2.0 (- t_1 (* (* c i) (* b c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if (c <= -6.8e-8) {
tmp = 2.0 * ((x * y) - (c * (i * (a + (b * c)))));
} else if (c <= 3.4e-44) {
tmp = 2.0 * (t_1 - (i * (c * a)));
} else {
tmp = 2.0 * (t_1 - ((c * i) * (b * c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) + (z * t)
if (c <= (-6.8d-8)) then
tmp = 2.0d0 * ((x * y) - (c * (i * (a + (b * c)))))
else if (c <= 3.4d-44) then
tmp = 2.0d0 * (t_1 - (i * (c * a)))
else
tmp = 2.0d0 * (t_1 - ((c * i) * (b * c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * y) + (z * t);
double tmp;
if (c <= -6.8e-8) {
tmp = 2.0 * ((x * y) - (c * (i * (a + (b * c)))));
} else if (c <= 3.4e-44) {
tmp = 2.0 * (t_1 - (i * (c * a)));
} else {
tmp = 2.0 * (t_1 - ((c * i) * (b * c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (z * t) tmp = 0 if c <= -6.8e-8: tmp = 2.0 * ((x * y) - (c * (i * (a + (b * c))))) elif c <= 3.4e-44: tmp = 2.0 * (t_1 - (i * (c * a))) else: tmp = 2.0 * (t_1 - ((c * i) * (b * c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (c <= -6.8e-8) tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(i * Float64(a + Float64(b * c)))))); elseif (c <= 3.4e-44) tmp = Float64(2.0 * Float64(t_1 - Float64(i * Float64(c * a)))); else tmp = Float64(2.0 * Float64(t_1 - Float64(Float64(c * i) * Float64(b * c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x * y) + (z * t); tmp = 0.0; if (c <= -6.8e-8) tmp = 2.0 * ((x * y) - (c * (i * (a + (b * c))))); elseif (c <= 3.4e-44) tmp = 2.0 * (t_1 - (i * (c * a))); else tmp = 2.0 * (t_1 - ((c * i) * (b * c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.8e-8], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.4e-44], N[(2.0 * N[(t$95$1 - N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 - N[(N[(c * i), $MachinePrecision] * N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;c \leq -6.8 \cdot 10^{-8}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\
\mathbf{elif}\;c \leq 3.4 \cdot 10^{-44}:\\
\;\;\;\;2 \cdot \left(t\_1 - i \cdot \left(c \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t\_1 - \left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\
\end{array}
\end{array}
if c < -6.8e-8Initial program 84.3%
Taylor expanded in z around 0 88.2%
if -6.8e-8 < c < 3.40000000000000016e-44Initial program 96.3%
Taylor expanded in a around inf 94.6%
*-commutative94.6%
Simplified94.6%
if 3.40000000000000016e-44 < c Initial program 83.5%
fma-define83.5%
associate-*l*88.5%
Simplified88.5%
fma-define88.5%
+-commutative88.5%
Applied egg-rr88.5%
Taylor expanded in a around 0 83.0%
Final simplification89.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (* x y))))
(if (<= (* x y) -1.16e+85)
t_1
(if (<= (* x y) -4e-312)
(* -2.0 (* a (* c i)))
(if (<= (* x y) 0.0086) (* 2.0 (* z t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (x * y);
double tmp;
if ((x * y) <= -1.16e+85) {
tmp = t_1;
} else if ((x * y) <= -4e-312) {
tmp = -2.0 * (a * (c * i));
} else if ((x * y) <= 0.0086) {
tmp = 2.0 * (z * t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (x * y)
if ((x * y) <= (-1.16d+85)) then
tmp = t_1
else if ((x * y) <= (-4d-312)) then
tmp = (-2.0d0) * (a * (c * i))
else if ((x * y) <= 0.0086d0) then
tmp = 2.0d0 * (z * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * (x * y);
double tmp;
if ((x * y) <= -1.16e+85) {
tmp = t_1;
} else if ((x * y) <= -4e-312) {
tmp = -2.0 * (a * (c * i));
} else if ((x * y) <= 0.0086) {
tmp = 2.0 * (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 2.0 * (x * y) tmp = 0 if (x * y) <= -1.16e+85: tmp = t_1 elif (x * y) <= -4e-312: tmp = -2.0 * (a * (c * i)) elif (x * y) <= 0.0086: tmp = 2.0 * (z * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -1.16e+85) tmp = t_1; elseif (Float64(x * y) <= -4e-312) tmp = Float64(-2.0 * Float64(a * Float64(c * i))); elseif (Float64(x * y) <= 0.0086) tmp = Float64(2.0 * Float64(z * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 2.0 * (x * y); tmp = 0.0; if ((x * y) <= -1.16e+85) tmp = t_1; elseif ((x * y) <= -4e-312) tmp = -2.0 * (a * (c * i)); elseif ((x * y) <= 0.0086) tmp = 2.0 * (z * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1.16e+85], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -4e-312], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 0.0086], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;x \cdot y \leq -1.16 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-312}:\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 0.0086:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -1.15999999999999995e85 or 0.0086 < (*.f64 x y) Initial program 86.6%
Taylor expanded in x around inf 49.4%
if -1.15999999999999995e85 < (*.f64 x y) < -3.9999999999988e-312Initial program 90.9%
Taylor expanded in a around inf 40.4%
mul-1-neg40.4%
Simplified40.4%
Taylor expanded in a around 0 40.4%
if -3.9999999999988e-312 < (*.f64 x y) < 0.0086Initial program 92.2%
Taylor expanded in z around inf 44.3%
Final simplification45.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* c (* i (+ a (* b c))))))
(if (or (<= t -8.6e-267) (not (<= t 3.75e+115)))
(* 2.0 (- (* z t) t_1))
(* 2.0 (- (* x y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * (i * (a + (b * c)));
double tmp;
if ((t <= -8.6e-267) || !(t <= 3.75e+115)) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = c * (i * (a + (b * c)))
if ((t <= (-8.6d-267)) .or. (.not. (t <= 3.75d+115))) then
tmp = 2.0d0 * ((z * t) - t_1)
else
tmp = 2.0d0 * ((x * y) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c * (i * (a + (b * c)));
double tmp;
if ((t <= -8.6e-267) || !(t <= 3.75e+115)) {
tmp = 2.0 * ((z * t) - t_1);
} else {
tmp = 2.0 * ((x * y) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c * (i * (a + (b * c))) tmp = 0 if (t <= -8.6e-267) or not (t <= 3.75e+115): tmp = 2.0 * ((z * t) - t_1) else: tmp = 2.0 * ((x * y) - t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c * Float64(i * Float64(a + Float64(b * c)))) tmp = 0.0 if ((t <= -8.6e-267) || !(t <= 3.75e+115)) tmp = Float64(2.0 * Float64(Float64(z * t) - t_1)); else tmp = Float64(2.0 * Float64(Float64(x * y) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c * (i * (a + (b * c))); tmp = 0.0; if ((t <= -8.6e-267) || ~((t <= 3.75e+115))) tmp = 2.0 * ((z * t) - t_1); else tmp = 2.0 * ((x * y) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c * N[(i * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -8.6e-267], N[Not[LessEqual[t, 3.75e+115]], $MachinePrecision]], N[(2.0 * N[(N[(z * t), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{-267} \lor \neg \left(t \leq 3.75 \cdot 10^{+115}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t\_1\right)\\
\end{array}
\end{array}
if t < -8.5999999999999992e-267 or 3.7499999999999998e115 < t Initial program 88.2%
Taylor expanded in x around 0 77.4%
if -8.5999999999999992e-267 < t < 3.7499999999999998e115Initial program 91.2%
Taylor expanded in z around 0 81.3%
Final simplification78.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* a (* c i)))))
(if (<= c -1.25e+108)
t_1
(if (<= c 8e+178)
(* 2.0 (+ (* x y) (* z t)))
(if (<= c 1.35e+281) t_1 (* 2.0 (* i (* c a))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -2.0 * (a * (c * i));
double tmp;
if (c <= -1.25e+108) {
tmp = t_1;
} else if (c <= 8e+178) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 1.35e+281) {
tmp = t_1;
} else {
tmp = 2.0 * (i * (c * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (-2.0d0) * (a * (c * i))
if (c <= (-1.25d+108)) then
tmp = t_1
else if (c <= 8d+178) then
tmp = 2.0d0 * ((x * y) + (z * t))
else if (c <= 1.35d+281) then
tmp = t_1
else
tmp = 2.0d0 * (i * (c * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -2.0 * (a * (c * i));
double tmp;
if (c <= -1.25e+108) {
tmp = t_1;
} else if (c <= 8e+178) {
tmp = 2.0 * ((x * y) + (z * t));
} else if (c <= 1.35e+281) {
tmp = t_1;
} else {
tmp = 2.0 * (i * (c * a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -2.0 * (a * (c * i)) tmp = 0 if c <= -1.25e+108: tmp = t_1 elif c <= 8e+178: tmp = 2.0 * ((x * y) + (z * t)) elif c <= 1.35e+281: tmp = t_1 else: tmp = 2.0 * (i * (c * a)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(-2.0 * Float64(a * Float64(c * i))) tmp = 0.0 if (c <= -1.25e+108) tmp = t_1; elseif (c <= 8e+178) tmp = Float64(2.0 * Float64(Float64(x * y) + Float64(z * t))); elseif (c <= 1.35e+281) tmp = t_1; else tmp = Float64(2.0 * Float64(i * Float64(c * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = -2.0 * (a * (c * i)); tmp = 0.0; if (c <= -1.25e+108) tmp = t_1; elseif (c <= 8e+178) tmp = 2.0 * ((x * y) + (z * t)); elseif (c <= 1.35e+281) tmp = t_1; else tmp = 2.0 * (i * (c * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.25e+108], t$95$1, If[LessEqual[c, 8e+178], N[(2.0 * N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.35e+281], t$95$1, N[(2.0 * N[(i * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{if}\;c \leq -1.25 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 8 \cdot 10^{+178}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{+281}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(i \cdot \left(c \cdot a\right)\right)\\
\end{array}
\end{array}
if c < -1.24999999999999998e108 or 8.0000000000000004e178 < c < 1.35000000000000004e281Initial program 83.2%
Taylor expanded in a around inf 46.5%
mul-1-neg46.5%
Simplified46.5%
Taylor expanded in a around 0 46.5%
if -1.24999999999999998e108 < c < 8.0000000000000004e178Initial program 92.5%
Taylor expanded in c around 0 64.9%
if 1.35000000000000004e281 < c Initial program 62.5%
Taylor expanded in a around inf 13.0%
mul-1-neg13.0%
Simplified13.0%
add-sqr-sqrt0.4%
sqrt-unprod26.4%
sqr-neg26.4%
sqrt-unprod26.0%
add-sqr-sqrt51.1%
pow151.1%
Applied egg-rr51.1%
unpow151.1%
*-commutative51.1%
associate-*r*63.1%
*-commutative63.1%
Simplified63.1%
Final simplification60.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= t -1.12e-285) (not (<= t 1.35e+131))) (* 2.0 (* z t)) (* 2.0 (* x y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((t <= -1.12e-285) || !(t <= 1.35e+131)) {
tmp = 2.0 * (z * t);
} else {
tmp = 2.0 * (x * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((t <= (-1.12d-285)) .or. (.not. (t <= 1.35d+131))) then
tmp = 2.0d0 * (z * t)
else
tmp = 2.0d0 * (x * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((t <= -1.12e-285) || !(t <= 1.35e+131)) {
tmp = 2.0 * (z * t);
} else {
tmp = 2.0 * (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (t <= -1.12e-285) or not (t <= 1.35e+131): tmp = 2.0 * (z * t) else: tmp = 2.0 * (x * y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((t <= -1.12e-285) || !(t <= 1.35e+131)) tmp = Float64(2.0 * Float64(z * t)); else tmp = Float64(2.0 * Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((t <= -1.12e-285) || ~((t <= 1.35e+131))) tmp = 2.0 * (z * t); else tmp = 2.0 * (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[t, -1.12e-285], N[Not[LessEqual[t, 1.35e+131]], $MachinePrecision]], N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.12 \cdot 10^{-285} \lor \neg \left(t \leq 1.35 \cdot 10^{+131}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\end{array}
\end{array}
if t < -1.12e-285 or 1.35000000000000002e131 < t Initial program 88.3%
Taylor expanded in z around inf 37.6%
if -1.12e-285 < t < 1.35000000000000002e131Initial program 91.1%
Taylor expanded in x around inf 39.9%
Final simplification38.4%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (* z t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (z * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (z * t);
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (z * t)
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(z * t)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (z * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(z \cdot t\right)
\end{array}
Initial program 89.3%
Taylor expanded in z around inf 29.2%
Final simplification29.2%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i)))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(a + Float64(b * c)) * Float64(c * i)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - ((a + (b * c)) * (c * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
\end{array}
herbie shell --seed 2024115
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
:alt
(* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))