
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (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 = (((x * y) + (z * t)) + (a * b)) + (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 (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i): return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\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 (+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((x * y) + (z * t)) + (a * b)) + (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 = (((x * y) + (z * t)) + (a * b)) + (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 (((x * y) + (z * t)) + (a * b)) + (c * i);
}
def code(x, y, z, t, a, b, c, i): return (((x * y) + (z * t)) + (a * b)) + (c * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(x * y) + Float64(z * t)) + Float64(a * b)) + Float64(c * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((x * y) + (z * t)) + (a * b)) + (c * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + z \cdot t\right) + a \cdot b\right) + c \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (if (<= (+ (+ (* a b) (+ (* x y) (* z t))) (* c i)) INFINITY) (+ (fma z t (* a b)) (+ (* x y) (* c i))) (fma t z (* a b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((a * b) + ((x * y) + (z * t))) + (c * i)) <= ((double) INFINITY)) {
tmp = fma(z, t, (a * b)) + ((x * y) + (c * i));
} else {
tmp = fma(t, z, (a * b));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))) + Float64(c * i)) <= Inf) tmp = Float64(fma(z, t, Float64(a * b)) + Float64(Float64(x * y) + Float64(c * i))); else tmp = fma(t, z, Float64(a * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(z * t + N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * z + N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right) + c \cdot i \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(z, t, a \cdot b\right) + \left(x \cdot y + c \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, z, a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) < +inf.0Initial program 100.0%
+-commutative100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
fma-def100.0%
Simplified100.0%
fma-udef100.0%
fma-udef100.0%
+-commutative100.0%
fma-def100.0%
associate-+l+100.0%
fma-udef100.0%
associate-+r+100.0%
Applied egg-rr100.0%
if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) Initial program 0.0%
Taylor expanded in x around 0 31.3%
+-commutative31.3%
*-commutative31.3%
fma-def50.0%
Applied egg-rr50.0%
Taylor expanded in c around 0 50.4%
fma-def56.6%
Simplified56.6%
Taylor expanded in a around 0 50.4%
+-commutative50.4%
fma-def69.1%
Simplified69.1%
Final simplification98.1%
(FPCore (x y z t a b c i) :precision binary64 (fma c i (fma x y (fma z t (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(c, i, fma(x, y, fma(z, t, (a * b))));
}
function code(x, y, z, t, a, b, c, i) return fma(c, i, fma(x, y, fma(z, t, Float64(a * b)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(c * i + N[(x * y + N[(z * t + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(c, i, \mathsf{fma}\left(x, y, \mathsf{fma}\left(z, t, a \cdot b\right)\right)\right)
\end{array}
Initial program 93.7%
+-commutative93.7%
fma-def95.3%
associate-+l+95.3%
fma-def96.9%
fma-def98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (+ (* a b) (+ (* x y) (* z t))) (* c i)))) (if (<= t_1 INFINITY) t_1 (fma a b (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a * b) + ((x * y) + (z * t))) + (c * i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(a, b, (z * t));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))) + Float64(c * i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(a, b, Float64(z * t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(a * b + N[(z * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right) + c \cdot i\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, b, z \cdot t\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) Initial program 0.0%
Taylor expanded in x around 0 31.3%
+-commutative31.3%
*-commutative31.3%
fma-def50.0%
Applied egg-rr50.0%
Taylor expanded in c around 0 50.4%
fma-def56.6%
Simplified56.6%
Final simplification97.3%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (+ (* a b) (+ (* x y) (* z t))) (* c i)))) (if (<= t_1 INFINITY) t_1 (fma c i (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a * b) + ((x * y) + (z * t))) + (c * i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(c, i, (a * b));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))) + Float64(c * i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(c, i, Float64(a * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(c * i + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right) + c \cdot i\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c, i, a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) Initial program 0.0%
+-commutative0.0%
fma-def25.0%
+-commutative25.0%
fma-def31.3%
fma-def43.8%
Simplified43.8%
fma-udef37.5%
fma-def25.0%
associate-+r+25.0%
Applied egg-rr25.0%
Taylor expanded in a around inf 62.8%
Final simplification97.7%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (+ (* a b) (+ (* x y) (* z t))) (* c i)))) (if (<= t_1 INFINITY) t_1 (fma t z (* a b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a * b) + ((x * y) + (z * t))) + (c * i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(t, z, (a * b));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))) + Float64(c * i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(t, z, Float64(a * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * z + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right) + c \cdot i\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, z, a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) Initial program 0.0%
Taylor expanded in x around 0 31.3%
+-commutative31.3%
*-commutative31.3%
fma-def50.0%
Applied egg-rr50.0%
Taylor expanded in c around 0 50.4%
fma-def56.6%
Simplified56.6%
Taylor expanded in a around 0 50.4%
+-commutative50.4%
fma-def69.1%
Simplified69.1%
Final simplification98.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* z t))) (t_2 (+ (* a b) (* x y))))
(if (<= (* c i) -2.8e+181)
(* c i)
(if (<= (* c i) -2e+56)
t_1
(if (<= (* c i) -7.2e+14)
t_2
(if (<= (* c i) -1.45e-98)
t_1
(if (<= (* c i) -1.6e-253)
t_2
(if (<= (* c i) 4.9e+66) t_1 (+ (* a b) (* c i))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a * b) + (z * t);
double t_2 = (a * b) + (x * y);
double tmp;
if ((c * i) <= -2.8e+181) {
tmp = c * i;
} else if ((c * i) <= -2e+56) {
tmp = t_1;
} else if ((c * i) <= -7.2e+14) {
tmp = t_2;
} else if ((c * i) <= -1.45e-98) {
tmp = t_1;
} else if ((c * i) <= -1.6e-253) {
tmp = t_2;
} else if ((c * i) <= 4.9e+66) {
tmp = t_1;
} else {
tmp = (a * b) + (c * i);
}
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 = (a * b) + (z * t)
t_2 = (a * b) + (x * y)
if ((c * i) <= (-2.8d+181)) then
tmp = c * i
else if ((c * i) <= (-2d+56)) then
tmp = t_1
else if ((c * i) <= (-7.2d+14)) then
tmp = t_2
else if ((c * i) <= (-1.45d-98)) then
tmp = t_1
else if ((c * i) <= (-1.6d-253)) then
tmp = t_2
else if ((c * i) <= 4.9d+66) then
tmp = t_1
else
tmp = (a * b) + (c * i)
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 = (a * b) + (z * t);
double t_2 = (a * b) + (x * y);
double tmp;
if ((c * i) <= -2.8e+181) {
tmp = c * i;
} else if ((c * i) <= -2e+56) {
tmp = t_1;
} else if ((c * i) <= -7.2e+14) {
tmp = t_2;
} else if ((c * i) <= -1.45e-98) {
tmp = t_1;
} else if ((c * i) <= -1.6e-253) {
tmp = t_2;
} else if ((c * i) <= 4.9e+66) {
tmp = t_1;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (z * t) t_2 = (a * b) + (x * y) tmp = 0 if (c * i) <= -2.8e+181: tmp = c * i elif (c * i) <= -2e+56: tmp = t_1 elif (c * i) <= -7.2e+14: tmp = t_2 elif (c * i) <= -1.45e-98: tmp = t_1 elif (c * i) <= -1.6e-253: tmp = t_2 elif (c * i) <= 4.9e+66: tmp = t_1 else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(z * t)) t_2 = Float64(Float64(a * b) + Float64(x * y)) tmp = 0.0 if (Float64(c * i) <= -2.8e+181) tmp = Float64(c * i); elseif (Float64(c * i) <= -2e+56) tmp = t_1; elseif (Float64(c * i) <= -7.2e+14) tmp = t_2; elseif (Float64(c * i) <= -1.45e-98) tmp = t_1; elseif (Float64(c * i) <= -1.6e-253) tmp = t_2; elseif (Float64(c * i) <= 4.9e+66) tmp = t_1; else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a * b) + (z * t); t_2 = (a * b) + (x * y); tmp = 0.0; if ((c * i) <= -2.8e+181) tmp = c * i; elseif ((c * i) <= -2e+56) tmp = t_1; elseif ((c * i) <= -7.2e+14) tmp = t_2; elseif ((c * i) <= -1.45e-98) tmp = t_1; elseif ((c * i) <= -1.6e-253) tmp = t_2; elseif ((c * i) <= 4.9e+66) tmp = t_1; else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -2.8e+181], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -2e+56], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], -7.2e+14], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], -1.45e-98], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], -1.6e-253], t$95$2, If[LessEqual[N[(c * i), $MachinePrecision], 4.9e+66], t$95$1, N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + z \cdot t\\
t_2 := a \cdot b + x \cdot y\\
\mathbf{if}\;c \cdot i \leq -2.8 \cdot 10^{+181}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -2 \cdot 10^{+56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \cdot i \leq -7.2 \cdot 10^{+14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \cdot i \leq -1.45 \cdot 10^{-98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \cdot i \leq -1.6 \cdot 10^{-253}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \cdot i \leq 4.9 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -2.79999999999999984e181Initial program 85.7%
Taylor expanded in c around inf 69.3%
if -2.79999999999999984e181 < (*.f64 c i) < -2.00000000000000018e56 or -7.2e14 < (*.f64 c i) < -1.45e-98 or -1.5999999999999999e-253 < (*.f64 c i) < 4.89999999999999975e66Initial program 96.4%
Taylor expanded in x around 0 75.7%
+-commutative75.7%
*-commutative75.7%
fma-def77.9%
Applied egg-rr77.9%
Taylor expanded in c around 0 72.5%
if -2.00000000000000018e56 < (*.f64 c i) < -7.2e14 or -1.45e-98 < (*.f64 c i) < -1.5999999999999999e-253Initial program 95.5%
Taylor expanded in z around 0 84.6%
Taylor expanded in c around 0 82.4%
if 4.89999999999999975e66 < (*.f64 c i) Initial program 88.2%
Taylor expanded in a around inf 77.3%
Final simplification74.9%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (+ (* a b) (+ (* x y) (* z t))) (* c i)))) (if (<= t_1 INFINITY) t_1 (* a b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a * b) + ((x * y) + (z * t))) + (c * i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = a * b;
}
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) + ((x * y) + (z * t))) + (c * i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((a * b) + ((x * y) + (z * t))) + (c * i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = a * b return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))) + Float64(c * i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((a * b) + ((x * y) + (z * t))) + (c * i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(a * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right) + c \cdot i\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (+.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 a b)) (*.f64 c i)) Initial program 0.0%
Taylor expanded in x around 0 31.3%
+-commutative31.3%
*-commutative31.3%
fma-def50.0%
Applied egg-rr50.0%
Taylor expanded in a around inf 50.8%
Final simplification96.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -1.08e+247)
(* c i)
(if (<= (* c i) -2.55e-53)
(* z t)
(if (<= (* c i) -9.2e-222)
(* a b)
(if (<= (* c i) 4.4e-282)
(* z t)
(if (<= (* c i) 2.45e-231)
(* a b)
(if (<= (* c i) 3.6e+71) (* z t) (* c i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -1.08e+247) {
tmp = c * i;
} else if ((c * i) <= -2.55e-53) {
tmp = z * t;
} else if ((c * i) <= -9.2e-222) {
tmp = a * b;
} else if ((c * i) <= 4.4e-282) {
tmp = z * t;
} else if ((c * i) <= 2.45e-231) {
tmp = a * b;
} else if ((c * i) <= 3.6e+71) {
tmp = z * t;
} else {
tmp = c * i;
}
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 * i) <= (-1.08d+247)) then
tmp = c * i
else if ((c * i) <= (-2.55d-53)) then
tmp = z * t
else if ((c * i) <= (-9.2d-222)) then
tmp = a * b
else if ((c * i) <= 4.4d-282) then
tmp = z * t
else if ((c * i) <= 2.45d-231) then
tmp = a * b
else if ((c * i) <= 3.6d+71) then
tmp = z * t
else
tmp = c * i
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 * i) <= -1.08e+247) {
tmp = c * i;
} else if ((c * i) <= -2.55e-53) {
tmp = z * t;
} else if ((c * i) <= -9.2e-222) {
tmp = a * b;
} else if ((c * i) <= 4.4e-282) {
tmp = z * t;
} else if ((c * i) <= 2.45e-231) {
tmp = a * b;
} else if ((c * i) <= 3.6e+71) {
tmp = z * t;
} else {
tmp = c * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -1.08e+247: tmp = c * i elif (c * i) <= -2.55e-53: tmp = z * t elif (c * i) <= -9.2e-222: tmp = a * b elif (c * i) <= 4.4e-282: tmp = z * t elif (c * i) <= 2.45e-231: tmp = a * b elif (c * i) <= 3.6e+71: tmp = z * t else: tmp = c * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -1.08e+247) tmp = Float64(c * i); elseif (Float64(c * i) <= -2.55e-53) tmp = Float64(z * t); elseif (Float64(c * i) <= -9.2e-222) tmp = Float64(a * b); elseif (Float64(c * i) <= 4.4e-282) tmp = Float64(z * t); elseif (Float64(c * i) <= 2.45e-231) tmp = Float64(a * b); elseif (Float64(c * i) <= 3.6e+71) tmp = Float64(z * t); else tmp = Float64(c * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c * i) <= -1.08e+247) tmp = c * i; elseif ((c * i) <= -2.55e-53) tmp = z * t; elseif ((c * i) <= -9.2e-222) tmp = a * b; elseif ((c * i) <= 4.4e-282) tmp = z * t; elseif ((c * i) <= 2.45e-231) tmp = a * b; elseif ((c * i) <= 3.6e+71) tmp = z * t; else tmp = c * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -1.08e+247], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -2.55e-53], N[(z * t), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -9.2e-222], N[(a * b), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 4.4e-282], N[(z * t), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 2.45e-231], N[(a * b), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 3.6e+71], N[(z * t), $MachinePrecision], N[(c * i), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1.08 \cdot 10^{+247}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -2.55 \cdot 10^{-53}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;c \cdot i \leq -9.2 \cdot 10^{-222}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;c \cdot i \leq 4.4 \cdot 10^{-282}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 2.45 \cdot 10^{-231}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;c \cdot i \leq 3.6 \cdot 10^{+71}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -1.08e247 or 3.6e71 < (*.f64 c i) Initial program 87.5%
Taylor expanded in c around inf 72.2%
if -1.08e247 < (*.f64 c i) < -2.55000000000000022e-53 or -9.2000000000000005e-222 < (*.f64 c i) < 4.39999999999999962e-282 or 2.45000000000000002e-231 < (*.f64 c i) < 3.6e71Initial program 95.9%
Taylor expanded in x around 0 70.4%
+-commutative70.4%
*-commutative70.4%
fma-def72.5%
Applied egg-rr72.5%
Taylor expanded in z around inf 44.8%
if -2.55000000000000022e-53 < (*.f64 c i) < -9.2000000000000005e-222 or 4.39999999999999962e-282 < (*.f64 c i) < 2.45000000000000002e-231Initial program 95.6%
Taylor expanded in x around 0 69.7%
+-commutative69.7%
*-commutative69.7%
fma-def69.7%
Applied egg-rr69.7%
Taylor expanded in a around inf 57.0%
Final simplification53.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* x y))))
(if (<= (* x y) -2.1e+191)
t_1
(if (<= (* x y) -1.6e+146)
(+ (* c i) (* z t))
(if (<= (* x y) -2.1e+81)
(+ (* x y) (* z t))
(if (<= (* x y) 1.55e+175) (+ (* c i) (+ (* a b) (* 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 = (a * b) + (x * y);
double tmp;
if ((x * y) <= -2.1e+191) {
tmp = t_1;
} else if ((x * y) <= -1.6e+146) {
tmp = (c * i) + (z * t);
} else if ((x * y) <= -2.1e+81) {
tmp = (x * y) + (z * t);
} else if ((x * y) <= 1.55e+175) {
tmp = (c * i) + ((a * b) + (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 = (a * b) + (x * y)
if ((x * y) <= (-2.1d+191)) then
tmp = t_1
else if ((x * y) <= (-1.6d+146)) then
tmp = (c * i) + (z * t)
else if ((x * y) <= (-2.1d+81)) then
tmp = (x * y) + (z * t)
else if ((x * y) <= 1.55d+175) then
tmp = (c * i) + ((a * b) + (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 = (a * b) + (x * y);
double tmp;
if ((x * y) <= -2.1e+191) {
tmp = t_1;
} else if ((x * y) <= -1.6e+146) {
tmp = (c * i) + (z * t);
} else if ((x * y) <= -2.1e+81) {
tmp = (x * y) + (z * t);
} else if ((x * y) <= 1.55e+175) {
tmp = (c * i) + ((a * b) + (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (x * y) tmp = 0 if (x * y) <= -2.1e+191: tmp = t_1 elif (x * y) <= -1.6e+146: tmp = (c * i) + (z * t) elif (x * y) <= -2.1e+81: tmp = (x * y) + (z * t) elif (x * y) <= 1.55e+175: tmp = (c * i) + ((a * b) + (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(x * y)) tmp = 0.0 if (Float64(x * y) <= -2.1e+191) tmp = t_1; elseif (Float64(x * y) <= -1.6e+146) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (Float64(x * y) <= -2.1e+81) tmp = Float64(Float64(x * y) + Float64(z * t)); elseif (Float64(x * y) <= 1.55e+175) tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + 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 = (a * b) + (x * y); tmp = 0.0; if ((x * y) <= -2.1e+191) tmp = t_1; elseif ((x * y) <= -1.6e+146) tmp = (c * i) + (z * t); elseif ((x * y) <= -2.1e+81) tmp = (x * y) + (z * t); elseif ((x * y) <= 1.55e+175) tmp = (c * i) + ((a * b) + (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[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2.1e+191], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1.6e+146], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2.1e+81], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1.55e+175], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + x \cdot y\\
\mathbf{if}\;x \cdot y \leq -2.1 \cdot 10^{+191}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -1.6 \cdot 10^{+146}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;x \cdot y \leq -2.1 \cdot 10^{+81}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\mathbf{elif}\;x \cdot y \leq 1.55 \cdot 10^{+175}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 x y) < -2.1000000000000001e191 or 1.54999999999999992e175 < (*.f64 x y) Initial program 83.8%
Taylor expanded in z around 0 80.3%
Taylor expanded in c around 0 78.9%
if -2.1000000000000001e191 < (*.f64 x y) < -1.6e146Initial program 90.9%
Taylor expanded in z around inf 77.6%
if -1.6e146 < (*.f64 x y) < -2.0999999999999999e81Initial program 87.5%
Taylor expanded in a around 0 87.5%
*-commutative87.5%
fma-def87.5%
Applied egg-rr87.5%
Taylor expanded in c around 0 87.5%
if -2.0999999999999999e81 < (*.f64 x y) < 1.54999999999999992e175Initial program 98.2%
Taylor expanded in x around 0 89.2%
Final simplification85.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t))))
(if (<= (* c i) -3.3e+103)
t_1
(if (<= (* c i) -2.7e-218)
(+ (* a b) (* x y))
(if (<= (* c i) 0.0)
(+ (* x y) (* z t))
(if (<= (* c i) 1.8e+71) (+ (* a b) (* 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) + (z * t);
double tmp;
if ((c * i) <= -3.3e+103) {
tmp = t_1;
} else if ((c * i) <= -2.7e-218) {
tmp = (a * b) + (x * y);
} else if ((c * i) <= 0.0) {
tmp = (x * y) + (z * t);
} else if ((c * i) <= 1.8e+71) {
tmp = (a * b) + (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 = (c * i) + (z * t)
if ((c * i) <= (-3.3d+103)) then
tmp = t_1
else if ((c * i) <= (-2.7d-218)) then
tmp = (a * b) + (x * y)
else if ((c * i) <= 0.0d0) then
tmp = (x * y) + (z * t)
else if ((c * i) <= 1.8d+71) then
tmp = (a * b) + (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 = (c * i) + (z * t);
double tmp;
if ((c * i) <= -3.3e+103) {
tmp = t_1;
} else if ((c * i) <= -2.7e-218) {
tmp = (a * b) + (x * y);
} else if ((c * i) <= 0.0) {
tmp = (x * y) + (z * t);
} else if ((c * i) <= 1.8e+71) {
tmp = (a * b) + (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (z * t) tmp = 0 if (c * i) <= -3.3e+103: tmp = t_1 elif (c * i) <= -2.7e-218: tmp = (a * b) + (x * y) elif (c * i) <= 0.0: tmp = (x * y) + (z * t) elif (c * i) <= 1.8e+71: tmp = (a * b) + (z * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) + Float64(z * t)) tmp = 0.0 if (Float64(c * i) <= -3.3e+103) tmp = t_1; elseif (Float64(c * i) <= -2.7e-218) tmp = Float64(Float64(a * b) + Float64(x * y)); elseif (Float64(c * i) <= 0.0) tmp = Float64(Float64(x * y) + Float64(z * t)); elseif (Float64(c * i) <= 1.8e+71) tmp = Float64(Float64(a * b) + 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 = (c * i) + (z * t); tmp = 0.0; if ((c * i) <= -3.3e+103) tmp = t_1; elseif ((c * i) <= -2.7e-218) tmp = (a * b) + (x * y); elseif ((c * i) <= 0.0) tmp = (x * y) + (z * t); elseif ((c * i) <= 1.8e+71) tmp = (a * b) + (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[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -3.3e+103], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], -2.7e-218], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 0.0], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.8e+71], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
\mathbf{if}\;c \cdot i \leq -3.3 \cdot 10^{+103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \cdot i \leq -2.7 \cdot 10^{-218}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 0:\\
\;\;\;\;x \cdot y + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 1.8 \cdot 10^{+71}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 c i) < -3.30000000000000009e103 or 1.8e71 < (*.f64 c i) Initial program 88.9%
Taylor expanded in z around inf 78.7%
if -3.30000000000000009e103 < (*.f64 c i) < -2.7e-218Initial program 95.8%
Taylor expanded in z around 0 74.9%
Taylor expanded in c around 0 72.3%
if -2.7e-218 < (*.f64 c i) < 0.0Initial program 94.8%
Taylor expanded in a around 0 80.1%
*-commutative80.1%
fma-def80.1%
Applied egg-rr80.1%
Taylor expanded in c around 0 80.1%
if 0.0 < (*.f64 c i) < 1.8e71Initial program 96.8%
Taylor expanded in x around 0 76.1%
+-commutative76.1%
*-commutative76.1%
fma-def77.7%
Applied egg-rr77.7%
Taylor expanded in c around 0 74.0%
Final simplification75.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -2e+66)
(* z t)
(if (<= z -2.2e+38)
(* c i)
(if (<= z -1.25e+35)
(* z t)
(if (<= z -7.5e-114)
(* x y)
(if (<= z -2.6e-192)
(* c i)
(if (<= z -1.25e-263)
(* x y)
(if (<= z 3.6e-300)
(* c i)
(if (<= z 3e-194)
(* x y)
(if (<= z 3.9e-10) (* a b) (* z t)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2e+66) {
tmp = z * t;
} else if (z <= -2.2e+38) {
tmp = c * i;
} else if (z <= -1.25e+35) {
tmp = z * t;
} else if (z <= -7.5e-114) {
tmp = x * y;
} else if (z <= -2.6e-192) {
tmp = c * i;
} else if (z <= -1.25e-263) {
tmp = x * y;
} else if (z <= 3.6e-300) {
tmp = c * i;
} else if (z <= 3e-194) {
tmp = x * y;
} else if (z <= 3.9e-10) {
tmp = a * b;
} else {
tmp = 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 (z <= (-2d+66)) then
tmp = z * t
else if (z <= (-2.2d+38)) then
tmp = c * i
else if (z <= (-1.25d+35)) then
tmp = z * t
else if (z <= (-7.5d-114)) then
tmp = x * y
else if (z <= (-2.6d-192)) then
tmp = c * i
else if (z <= (-1.25d-263)) then
tmp = x * y
else if (z <= 3.6d-300) then
tmp = c * i
else if (z <= 3d-194) then
tmp = x * y
else if (z <= 3.9d-10) then
tmp = a * b
else
tmp = 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 (z <= -2e+66) {
tmp = z * t;
} else if (z <= -2.2e+38) {
tmp = c * i;
} else if (z <= -1.25e+35) {
tmp = z * t;
} else if (z <= -7.5e-114) {
tmp = x * y;
} else if (z <= -2.6e-192) {
tmp = c * i;
} else if (z <= -1.25e-263) {
tmp = x * y;
} else if (z <= 3.6e-300) {
tmp = c * i;
} else if (z <= 3e-194) {
tmp = x * y;
} else if (z <= 3.9e-10) {
tmp = a * b;
} else {
tmp = z * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2e+66: tmp = z * t elif z <= -2.2e+38: tmp = c * i elif z <= -1.25e+35: tmp = z * t elif z <= -7.5e-114: tmp = x * y elif z <= -2.6e-192: tmp = c * i elif z <= -1.25e-263: tmp = x * y elif z <= 3.6e-300: tmp = c * i elif z <= 3e-194: tmp = x * y elif z <= 3.9e-10: tmp = a * b else: tmp = z * t return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2e+66) tmp = Float64(z * t); elseif (z <= -2.2e+38) tmp = Float64(c * i); elseif (z <= -1.25e+35) tmp = Float64(z * t); elseif (z <= -7.5e-114) tmp = Float64(x * y); elseif (z <= -2.6e-192) tmp = Float64(c * i); elseif (z <= -1.25e-263) tmp = Float64(x * y); elseif (z <= 3.6e-300) tmp = Float64(c * i); elseif (z <= 3e-194) tmp = Float64(x * y); elseif (z <= 3.9e-10) tmp = Float64(a * b); else tmp = Float64(z * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2e+66) tmp = z * t; elseif (z <= -2.2e+38) tmp = c * i; elseif (z <= -1.25e+35) tmp = z * t; elseif (z <= -7.5e-114) tmp = x * y; elseif (z <= -2.6e-192) tmp = c * i; elseif (z <= -1.25e-263) tmp = x * y; elseif (z <= 3.6e-300) tmp = c * i; elseif (z <= 3e-194) tmp = x * y; elseif (z <= 3.9e-10) tmp = a * b; else tmp = z * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2e+66], N[(z * t), $MachinePrecision], If[LessEqual[z, -2.2e+38], N[(c * i), $MachinePrecision], If[LessEqual[z, -1.25e+35], N[(z * t), $MachinePrecision], If[LessEqual[z, -7.5e-114], N[(x * y), $MachinePrecision], If[LessEqual[z, -2.6e-192], N[(c * i), $MachinePrecision], If[LessEqual[z, -1.25e-263], N[(x * y), $MachinePrecision], If[LessEqual[z, 3.6e-300], N[(c * i), $MachinePrecision], If[LessEqual[z, 3e-194], N[(x * y), $MachinePrecision], If[LessEqual[z, 3.9e-10], N[(a * b), $MachinePrecision], N[(z * t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+66}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{+38}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{+35}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-114}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-192}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-263}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-300}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-194}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-10}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\\
\end{array}
\end{array}
if z < -1.99999999999999989e66 or -2.20000000000000006e38 < z < -1.25000000000000005e35 or 3.9e-10 < z Initial program 89.1%
Taylor expanded in x around 0 80.2%
+-commutative80.2%
*-commutative80.2%
fma-def82.5%
Applied egg-rr82.5%
Taylor expanded in z around inf 56.5%
if -1.99999999999999989e66 < z < -2.20000000000000006e38 or -7.5000000000000002e-114 < z < -2.6000000000000002e-192 or -1.25000000000000002e-263 < z < 3.60000000000000016e-300Initial program 96.6%
Taylor expanded in c around inf 64.5%
if -1.25000000000000005e35 < z < -7.5000000000000002e-114 or -2.6000000000000002e-192 < z < -1.25000000000000002e-263 or 3.60000000000000016e-300 < z < 3e-194Initial program 100.0%
Taylor expanded in z around 0 92.0%
Taylor expanded in x around inf 44.0%
if 3e-194 < z < 3.9e-10Initial program 97.0%
Taylor expanded in x around 0 76.8%
+-commutative76.8%
*-commutative76.8%
fma-def76.8%
Applied egg-rr76.8%
Taylor expanded in a around inf 52.2%
Final simplification53.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (* z t))))
(if (<= (* c i) -1e+103)
t_1
(if (<= (* c i) -4e-254)
(+ (* a b) (* x y))
(if (<= (* c i) 5.6e+68) (+ (* a b) (* 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) + (z * t);
double tmp;
if ((c * i) <= -1e+103) {
tmp = t_1;
} else if ((c * i) <= -4e-254) {
tmp = (a * b) + (x * y);
} else if ((c * i) <= 5.6e+68) {
tmp = (a * b) + (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 = (c * i) + (z * t)
if ((c * i) <= (-1d+103)) then
tmp = t_1
else if ((c * i) <= (-4d-254)) then
tmp = (a * b) + (x * y)
else if ((c * i) <= 5.6d+68) then
tmp = (a * b) + (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 = (c * i) + (z * t);
double tmp;
if ((c * i) <= -1e+103) {
tmp = t_1;
} else if ((c * i) <= -4e-254) {
tmp = (a * b) + (x * y);
} else if ((c * i) <= 5.6e+68) {
tmp = (a * b) + (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + (z * t) tmp = 0 if (c * i) <= -1e+103: tmp = t_1 elif (c * i) <= -4e-254: tmp = (a * b) + (x * y) elif (c * i) <= 5.6e+68: tmp = (a * b) + (z * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) + Float64(z * t)) tmp = 0.0 if (Float64(c * i) <= -1e+103) tmp = t_1; elseif (Float64(c * i) <= -4e-254) tmp = Float64(Float64(a * b) + Float64(x * y)); elseif (Float64(c * i) <= 5.6e+68) tmp = Float64(Float64(a * b) + 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 = (c * i) + (z * t); tmp = 0.0; if ((c * i) <= -1e+103) tmp = t_1; elseif ((c * i) <= -4e-254) tmp = (a * b) + (x * y); elseif ((c * i) <= 5.6e+68) tmp = (a * b) + (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[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(c * i), $MachinePrecision], -1e+103], t$95$1, If[LessEqual[N[(c * i), $MachinePrecision], -4e-254], N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 5.6e+68], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot i + z \cdot t\\
\mathbf{if}\;c \cdot i \leq -1 \cdot 10^{+103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \cdot i \leq -4 \cdot 10^{-254}:\\
\;\;\;\;a \cdot b + x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 5.6 \cdot 10^{+68}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 c i) < -1e103 or 5.6e68 < (*.f64 c i) Initial program 88.9%
Taylor expanded in z around inf 78.7%
if -1e103 < (*.f64 c i) < -3.9999999999999996e-254Initial program 96.2%
Taylor expanded in z around 0 73.2%
Taylor expanded in c around 0 70.8%
if -3.9999999999999996e-254 < (*.f64 c i) < 5.6e68Initial program 95.8%
Taylor expanded in x around 0 72.4%
+-commutative72.4%
*-commutative72.4%
fma-def75.5%
Applied egg-rr75.5%
Taylor expanded in c around 0 71.0%
Final simplification73.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -6.5e+77) (not (<= (* x y) 4.8e+175))) (+ (* c i) (+ (* a b) (* x y))) (+ (* c i) (+ (* a b) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -6.5e+77) || !((x * y) <= 4.8e+175)) {
tmp = (c * i) + ((a * b) + (x * y));
} else {
tmp = (c * i) + ((a * b) + (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 (((x * y) <= (-6.5d+77)) .or. (.not. ((x * y) <= 4.8d+175))) then
tmp = (c * i) + ((a * b) + (x * y))
else
tmp = (c * i) + ((a * b) + (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 (((x * y) <= -6.5e+77) || !((x * y) <= 4.8e+175)) {
tmp = (c * i) + ((a * b) + (x * y));
} else {
tmp = (c * i) + ((a * b) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -6.5e+77) or not ((x * y) <= 4.8e+175): tmp = (c * i) + ((a * b) + (x * y)) else: tmp = (c * i) + ((a * b) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -6.5e+77) || !(Float64(x * y) <= 4.8e+175)) tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(x * y))); else tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -6.5e+77) || ~(((x * y) <= 4.8e+175))) tmp = (c * i) + ((a * b) + (x * y)); else tmp = (c * i) + ((a * b) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -6.5e+77], N[Not[LessEqual[N[(x * y), $MachinePrecision], 4.8e+175]], $MachinePrecision]], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -6.5 \cdot 10^{+77} \lor \neg \left(x \cdot y \leq 4.8 \cdot 10^{+175}\right):\\
\;\;\;\;c \cdot i + \left(a \cdot b + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -6.5e77 or 4.8e175 < (*.f64 x y) Initial program 85.4%
Taylor expanded in z around 0 77.8%
if -6.5e77 < (*.f64 x y) < 4.8e175Initial program 98.2%
Taylor expanded in x around 0 89.7%
Final simplification85.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* x y) -6.2e+29) (not (<= (* x y) 3200000000000.0))) (+ (* c i) (+ (* x y) (* z t))) (+ (* c i) (+ (* a b) (* z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((x * y) <= -6.2e+29) || !((x * y) <= 3200000000000.0)) {
tmp = (c * i) + ((x * y) + (z * t));
} else {
tmp = (c * i) + ((a * b) + (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 (((x * y) <= (-6.2d+29)) .or. (.not. ((x * y) <= 3200000000000.0d0))) then
tmp = (c * i) + ((x * y) + (z * t))
else
tmp = (c * i) + ((a * b) + (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 (((x * y) <= -6.2e+29) || !((x * y) <= 3200000000000.0)) {
tmp = (c * i) + ((x * y) + (z * t));
} else {
tmp = (c * i) + ((a * b) + (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((x * y) <= -6.2e+29) or not ((x * y) <= 3200000000000.0): tmp = (c * i) + ((x * y) + (z * t)) else: tmp = (c * i) + ((a * b) + (z * t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(x * y) <= -6.2e+29) || !(Float64(x * y) <= 3200000000000.0)) tmp = Float64(Float64(c * i) + Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((x * y) <= -6.2e+29) || ~(((x * y) <= 3200000000000.0))) tmp = (c * i) + ((x * y) + (z * t)); else tmp = (c * i) + ((a * b) + (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -6.2e+29], N[Not[LessEqual[N[(x * y), $MachinePrecision], 3200000000000.0]], $MachinePrecision]], N[(N[(c * i), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -6.2 \cdot 10^{+29} \lor \neg \left(x \cdot y \leq 3200000000000\right):\\
\;\;\;\;c \cdot i + \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot i + \left(a \cdot b + z \cdot t\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -6.1999999999999998e29 or 3.2e12 < (*.f64 x y) Initial program 89.4%
Taylor expanded in a around 0 79.2%
if -6.1999999999999998e29 < (*.f64 x y) < 3.2e12Initial program 98.4%
Taylor expanded in x around 0 95.3%
Final simplification87.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (* c i))))
(if (<= t -2.4e-77)
(* z t)
(if (<= t 4.1e-10)
t_1
(if (<= t 6e+24) (* x y) (if (<= t 1.3e+218) t_1 (* z 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 * i);
double tmp;
if (t <= -2.4e-77) {
tmp = z * t;
} else if (t <= 4.1e-10) {
tmp = t_1;
} else if (t <= 6e+24) {
tmp = x * y;
} else if (t <= 1.3e+218) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = (a * b) + (c * i)
if (t <= (-2.4d-77)) then
tmp = z * t
else if (t <= 4.1d-10) then
tmp = t_1
else if (t <= 6d+24) then
tmp = x * y
else if (t <= 1.3d+218) then
tmp = t_1
else
tmp = 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 t_1 = (a * b) + (c * i);
double tmp;
if (t <= -2.4e-77) {
tmp = z * t;
} else if (t <= 4.1e-10) {
tmp = t_1;
} else if (t <= 6e+24) {
tmp = x * y;
} else if (t <= 1.3e+218) {
tmp = t_1;
} else {
tmp = z * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + (c * i) tmp = 0 if t <= -2.4e-77: tmp = z * t elif t <= 4.1e-10: tmp = t_1 elif t <= 6e+24: tmp = x * y elif t <= 1.3e+218: tmp = t_1 else: tmp = z * t return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(c * i)) tmp = 0.0 if (t <= -2.4e-77) tmp = Float64(z * t); elseif (t <= 4.1e-10) tmp = t_1; elseif (t <= 6e+24) tmp = Float64(x * y); elseif (t <= 1.3e+218) tmp = t_1; else tmp = Float64(z * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a * b) + (c * i); tmp = 0.0; if (t <= -2.4e-77) tmp = z * t; elseif (t <= 4.1e-10) tmp = t_1; elseif (t <= 6e+24) tmp = x * y; elseif (t <= 1.3e+218) tmp = t_1; else tmp = z * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e-77], N[(z * t), $MachinePrecision], If[LessEqual[t, 4.1e-10], t$95$1, If[LessEqual[t, 6e+24], N[(x * y), $MachinePrecision], If[LessEqual[t, 1.3e+218], t$95$1, N[(z * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b + c \cdot i\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{-77}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+24}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+218}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\\
\end{array}
\end{array}
if t < -2.3999999999999999e-77 or 1.30000000000000001e218 < t Initial program 92.1%
Taylor expanded in x around 0 80.3%
+-commutative80.3%
*-commutative80.3%
fma-def82.3%
Applied egg-rr82.3%
Taylor expanded in z around inf 52.6%
if -2.3999999999999999e-77 < t < 4.0999999999999998e-10 or 5.9999999999999999e24 < t < 1.30000000000000001e218Initial program 94.5%
Taylor expanded in a around inf 56.1%
if 4.0999999999999998e-10 < t < 5.9999999999999999e24Initial program 100.0%
Taylor expanded in z around 0 57.2%
Taylor expanded in x around inf 46.5%
Final simplification54.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* c i) -4.8e+185) (* c i) (if (<= (* c i) 1.05e+67) (+ (* a b) (* z t)) (+ (* a b) (* c i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((c * i) <= -4.8e+185) {
tmp = c * i;
} else if ((c * i) <= 1.05e+67) {
tmp = (a * b) + (z * t);
} else {
tmp = (a * b) + (c * i);
}
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 * i) <= (-4.8d+185)) then
tmp = c * i
else if ((c * i) <= 1.05d+67) then
tmp = (a * b) + (z * t)
else
tmp = (a * b) + (c * i)
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 * i) <= -4.8e+185) {
tmp = c * i;
} else if ((c * i) <= 1.05e+67) {
tmp = (a * b) + (z * t);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -4.8e+185: tmp = c * i elif (c * i) <= 1.05e+67: tmp = (a * b) + (z * t) else: tmp = (a * b) + (c * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -4.8e+185) tmp = Float64(c * i); elseif (Float64(c * i) <= 1.05e+67) tmp = Float64(Float64(a * b) + Float64(z * t)); else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((c * i) <= -4.8e+185) tmp = c * i; elseif ((c * i) <= 1.05e+67) tmp = (a * b) + (z * t); else tmp = (a * b) + (c * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -4.8e+185], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.05e+67], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -4.8 \cdot 10^{+185}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq 1.05 \cdot 10^{+67}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -4.79999999999999978e185Initial program 85.7%
Taylor expanded in c around inf 69.3%
if -4.79999999999999978e185 < (*.f64 c i) < 1.0500000000000001e67Initial program 96.2%
Taylor expanded in x around 0 70.3%
+-commutative70.3%
*-commutative70.3%
fma-def72.0%
Applied egg-rr72.0%
Taylor expanded in c around 0 67.4%
if 1.0500000000000001e67 < (*.f64 c i) Initial program 88.2%
Taylor expanded in a around inf 77.3%
Final simplification69.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -2.5e+103) (not (<= (* c i) 3.8e+67))) (* c i) (* a b)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((c * i) <= -2.5e+103) || !((c * i) <= 3.8e+67)) {
tmp = c * i;
} else {
tmp = a * b;
}
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 * i) <= (-2.5d+103)) .or. (.not. ((c * i) <= 3.8d+67))) then
tmp = c * i
else
tmp = a * b
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 * i) <= -2.5e+103) || !((c * i) <= 3.8e+67)) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -2.5e+103) or not ((c * i) <= 3.8e+67): tmp = c * i else: tmp = a * b return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(c * i) <= -2.5e+103) || !(Float64(c * i) <= 3.8e+67)) tmp = Float64(c * i); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((c * i) <= -2.5e+103) || ~(((c * i) <= 3.8e+67))) tmp = c * i; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -2.5e+103], N[Not[LessEqual[N[(c * i), $MachinePrecision], 3.8e+67]], $MachinePrecision]], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -2.5 \cdot 10^{+103} \lor \neg \left(c \cdot i \leq 3.8 \cdot 10^{+67}\right):\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 c i) < -2.5e103 or 3.8000000000000002e67 < (*.f64 c i) Initial program 88.9%
Taylor expanded in c around inf 63.1%
if -2.5e103 < (*.f64 c i) < 3.8000000000000002e67Initial program 96.0%
Taylor expanded in x around 0 70.5%
+-commutative70.5%
*-commutative70.5%
fma-def72.2%
Applied egg-rr72.2%
Taylor expanded in a around inf 37.0%
Final simplification45.2%
(FPCore (x y z t a b c i) :precision binary64 (* a b))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a * b;
}
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 = a * b
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a * b;
}
def code(x, y, z, t, a, b, c, i): return a * b
function code(x, y, z, t, a, b, c, i) return Float64(a * b) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a * b; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a * b), $MachinePrecision]
\begin{array}{l}
\\
a \cdot b
\end{array}
Initial program 93.7%
Taylor expanded in x around 0 74.2%
+-commutative74.2%
*-commutative74.2%
fma-def75.3%
Applied egg-rr75.3%
Taylor expanded in a around inf 28.7%
Final simplification28.7%
herbie shell --seed 2023322
(FPCore (x y z t a b c i)
:name "Linear.V4:$cdot from linear-1.19.1.3, C"
:precision binary64
(+ (+ (+ (* x y) (* z t)) (* a b)) (* c i)))