
(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 17 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}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= (+ (* c i) (+ (* a b) (+ (* x y) (* z t)))) INFINITY) (fma c i (fma a b (fma x y (* z t)))) (* x (+ (+ y (* a (/ b x))) (+ (* c (/ i x)) (* t (/ z x)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && 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) + ((a * b) + ((x * y) + (z * t)))) <= ((double) INFINITY)) {
tmp = fma(c, i, fma(a, b, fma(x, y, (z * t))));
} else {
tmp = x * ((y + (a * (b / x))) + ((c * (i / x)) + (t * (z / x))));
}
return tmp;
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t)))) <= Inf) tmp = fma(c, i, fma(a, b, fma(x, y, Float64(z * t)))); else tmp = Float64(x * Float64(Float64(y + Float64(a * Float64(b / x))) + Float64(Float64(c * Float64(i / x)) + Float64(t * Float64(z / x))))); end return tmp end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(c * i + N[(a * b + N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y + N[(a * N[(b / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(c * N[(i / x), $MachinePrecision]), $MachinePrecision] + N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i + \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(c, i, \mathsf{fma}\left(a, b, \mathsf{fma}\left(x, y, z \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(y + a \cdot \frac{b}{x}\right) + \left(c \cdot \frac{i}{x} + t \cdot \frac{z}{x}\right)\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-define100.0%
+-commutative100.0%
fma-define100.0%
fma-define100.0%
Simplified100.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-define0.0%
+-commutative0.0%
fma-define14.3%
fma-define14.3%
Simplified14.3%
Taylor expanded in x around inf 57.1%
associate-+r+57.1%
associate-/l*85.7%
associate-/l*85.7%
associate-/l*85.7%
Simplified85.7%
Final simplification99.6%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* c i) (+ (* a b) (+ (* x y) (* z t))))))
(if (<= t_1 INFINITY)
t_1
(* x (+ (+ y (* a (/ b x))) (+ (* c (/ i x)) (* t (/ z x))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
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) + ((x * y) + (z * t)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((y + (a * (b / x))) + ((c * (i / x)) + (t * (z / x))));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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) + ((x * y) + (z * t)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((y + (a * (b / x))) + ((c * (i / x)) + (t * (z / x))));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + ((a * b) + ((x * y) + (z * t))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((y + (a * (b / x))) + ((c * (i / x)) + (t * (z / x)))) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(y + Float64(a * Float64(b / x))) + Float64(Float64(c * Float64(i / x)) + Float64(t * Float64(z / x))))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = (c * i) + ((a * b) + ((x * y) + (z * t)));
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((y + (a * (b / x))) + ((c * (i / x)) + (t * (z / x))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(y + N[(a * N[(b / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(c * N[(i / x), $MachinePrecision]), $MachinePrecision] + N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := c \cdot i + \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(y + a \cdot \frac{b}{x}\right) + \left(c \cdot \frac{i}{x} + t \cdot \frac{z}{x}\right)\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-define0.0%
+-commutative0.0%
fma-define14.3%
fma-define14.3%
Simplified14.3%
Taylor expanded in x around inf 57.1%
associate-+r+57.1%
associate-/l*85.7%
associate-/l*85.7%
associate-/l*85.7%
Simplified85.7%
Final simplification99.6%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -2.6e+238)
(* c i)
(if (<= (* c i) -4.3e-184)
(* z t)
(if (<= (* c i) 4.6e-296)
(* a b)
(if (<= (* c i) 4.4e-65)
(* x y)
(if (<= (* c i) 1.5e+64) (* a b) (* c i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && 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) <= -2.6e+238) {
tmp = c * i;
} else if ((c * i) <= -4.3e-184) {
tmp = z * t;
} else if ((c * i) <= 4.6e-296) {
tmp = a * b;
} else if ((c * i) <= 4.4e-65) {
tmp = x * y;
} else if ((c * i) <= 1.5e+64) {
tmp = a * b;
} else {
tmp = c * i;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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.6d+238)) then
tmp = c * i
else if ((c * i) <= (-4.3d-184)) then
tmp = z * t
else if ((c * i) <= 4.6d-296) then
tmp = a * b
else if ((c * i) <= 4.4d-65) then
tmp = x * y
else if ((c * i) <= 1.5d+64) then
tmp = a * b
else
tmp = c * i
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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.6e+238) {
tmp = c * i;
} else if ((c * i) <= -4.3e-184) {
tmp = z * t;
} else if ((c * i) <= 4.6e-296) {
tmp = a * b;
} else if ((c * i) <= 4.4e-65) {
tmp = x * y;
} else if ((c * i) <= 1.5e+64) {
tmp = a * b;
} else {
tmp = c * i;
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -2.6e+238: tmp = c * i elif (c * i) <= -4.3e-184: tmp = z * t elif (c * i) <= 4.6e-296: tmp = a * b elif (c * i) <= 4.4e-65: tmp = x * y elif (c * i) <= 1.5e+64: tmp = a * b else: tmp = c * i return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -2.6e+238) tmp = Float64(c * i); elseif (Float64(c * i) <= -4.3e-184) tmp = Float64(z * t); elseif (Float64(c * i) <= 4.6e-296) tmp = Float64(a * b); elseif (Float64(c * i) <= 4.4e-65) tmp = Float64(x * y); elseif (Float64(c * i) <= 1.5e+64) tmp = Float64(a * b); else tmp = Float64(c * i); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((c * i) <= -2.6e+238)
tmp = c * i;
elseif ((c * i) <= -4.3e-184)
tmp = z * t;
elseif ((c * i) <= 4.6e-296)
tmp = a * b;
elseif ((c * i) <= 4.4e-65)
tmp = x * y;
elseif ((c * i) <= 1.5e+64)
tmp = a * b;
else
tmp = c * i;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -2.6e+238], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -4.3e-184], N[(z * t), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 4.6e-296], N[(a * b), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 4.4e-65], N[(x * y), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.5e+64], N[(a * b), $MachinePrecision], N[(c * i), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -2.6 \cdot 10^{+238}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -4.3 \cdot 10^{-184}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 4.6 \cdot 10^{-296}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;c \cdot i \leq 4.4 \cdot 10^{-65}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;c \cdot i \leq 1.5 \cdot 10^{+64}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -2.6e238 or 1.5000000000000001e64 < (*.f64 c i) Initial program 94.5%
+-commutative94.5%
fma-define94.5%
+-commutative94.5%
fma-define94.5%
fma-define94.5%
Simplified94.5%
Taylor expanded in c around inf 71.4%
if -2.6e238 < (*.f64 c i) < -4.30000000000000007e-184Initial program 100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in a around 0 84.2%
Taylor expanded in t around inf 44.0%
if -4.30000000000000007e-184 < (*.f64 c i) < 4.60000000000000008e-296 or 4.40000000000000042e-65 < (*.f64 c i) < 1.5000000000000001e64Initial program 98.6%
+-commutative98.6%
fma-define98.6%
+-commutative98.6%
fma-define98.6%
fma-define98.6%
Simplified98.6%
Taylor expanded in a around inf 54.3%
if 4.60000000000000008e-296 < (*.f64 c i) < 4.40000000000000042e-65Initial program 93.0%
+-commutative93.0%
fma-define93.0%
+-commutative93.0%
fma-define96.5%
fma-define96.5%
Simplified96.5%
Taylor expanded in x around inf 49.2%
Final simplification55.3%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -1.9e+161)
(+ (* c i) (* z t))
(if (<= (* c i) -2.4e+145)
(+ (* a b) (* c i))
(if (<= (* c i) -1e-192)
(+ (* x y) (* z t))
(if (<= (* c i) 5e+64) (+ (* x y) (* a b)) (+ (* x y) (* c i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && 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.9e+161) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= -2.4e+145) {
tmp = (a * b) + (c * i);
} else if ((c * i) <= -1e-192) {
tmp = (x * y) + (z * t);
} else if ((c * i) <= 5e+64) {
tmp = (x * y) + (a * b);
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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.9d+161)) then
tmp = (c * i) + (z * t)
else if ((c * i) <= (-2.4d+145)) then
tmp = (a * b) + (c * i)
else if ((c * i) <= (-1d-192)) then
tmp = (x * y) + (z * t)
else if ((c * i) <= 5d+64) then
tmp = (x * y) + (a * b)
else
tmp = (x * y) + (c * i)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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.9e+161) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= -2.4e+145) {
tmp = (a * b) + (c * i);
} else if ((c * i) <= -1e-192) {
tmp = (x * y) + (z * t);
} else if ((c * i) <= 5e+64) {
tmp = (x * y) + (a * b);
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -1.9e+161: tmp = (c * i) + (z * t) elif (c * i) <= -2.4e+145: tmp = (a * b) + (c * i) elif (c * i) <= -1e-192: tmp = (x * y) + (z * t) elif (c * i) <= 5e+64: tmp = (x * y) + (a * b) else: tmp = (x * y) + (c * i) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -1.9e+161) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (Float64(c * i) <= -2.4e+145) tmp = Float64(Float64(a * b) + Float64(c * i)); elseif (Float64(c * i) <= -1e-192) tmp = Float64(Float64(x * y) + Float64(z * t)); elseif (Float64(c * i) <= 5e+64) tmp = Float64(Float64(x * y) + Float64(a * b)); else tmp = Float64(Float64(x * y) + Float64(c * i)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((c * i) <= -1.9e+161)
tmp = (c * i) + (z * t);
elseif ((c * i) <= -2.4e+145)
tmp = (a * b) + (c * i);
elseif ((c * i) <= -1e-192)
tmp = (x * y) + (z * t);
elseif ((c * i) <= 5e+64)
tmp = (x * y) + (a * b);
else
tmp = (x * y) + (c * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -1.9e+161], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -2.4e+145], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -1e-192], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 5e+64], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1.9 \cdot 10^{+161}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq -2.4 \cdot 10^{+145}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -1 \cdot 10^{-192}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 5 \cdot 10^{+64}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -1.9000000000000001e161Initial program 93.9%
+-commutative93.9%
fma-define93.9%
+-commutative93.9%
fma-define93.9%
fma-define93.9%
Simplified93.9%
Taylor expanded in a around 0 97.0%
Taylor expanded in x around 0 94.2%
if -1.9000000000000001e161 < (*.f64 c i) < -2.39999999999999992e145Initial program 100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in z around inf 63.8%
associate-+r+63.8%
associate-/l*63.8%
associate-/l*63.8%
associate-/l*63.8%
Simplified63.8%
Taylor expanded in z around 0 100.0%
Taylor expanded in c around inf 88.1%
if -2.39999999999999992e145 < (*.f64 c i) < -1.0000000000000001e-192Initial program 98.5%
+-commutative98.5%
fma-define98.5%
+-commutative98.5%
fma-define98.5%
fma-define98.5%
Simplified98.5%
Taylor expanded in c around 0 86.5%
Taylor expanded in a around 0 74.9%
if -1.0000000000000001e-192 < (*.f64 c i) < 5e64Initial program 98.0%
+-commutative98.0%
fma-define98.0%
+-commutative98.0%
fma-define99.0%
fma-define99.0%
Simplified99.0%
Taylor expanded in c around 0 95.1%
Taylor expanded in t around 0 72.3%
if 5e64 < (*.f64 c i) Initial program 95.7%
+-commutative95.7%
fma-define95.7%
+-commutative95.7%
fma-define95.7%
fma-define95.7%
Simplified95.7%
Taylor expanded in a around 0 83.9%
Taylor expanded in t around 0 75.6%
Final simplification76.9%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (+ (* c i) (+ (* a b) (+ (* x y) (* z t)))))) (if (<= t_1 INFINITY) t_1 (* x (+ y (/ (* c i) x))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
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) + ((x * y) + (z * t)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * (y + ((c * i) / x));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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) + ((x * y) + (z * t)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * (y + ((c * i) / x));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): t_1 = (c * i) + ((a * b) + ((x * y) + (z * t))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * (y + ((c * i) / x)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(c * i) + Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(y + Float64(Float64(c * i) / x))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = (c * i) + ((a * b) + ((x * y) + (z * t)));
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * (y + ((c * i) / x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * i), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(y + N[(N[(c * i), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := c \cdot i + \left(a \cdot b + \left(x \cdot y + z \cdot t\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y + \frac{c \cdot i}{x}\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-define0.0%
+-commutative0.0%
fma-define14.3%
fma-define14.3%
Simplified14.3%
Taylor expanded in x around inf 57.1%
associate-+r+57.1%
associate-/l*85.7%
associate-/l*85.7%
associate-/l*85.7%
Simplified85.7%
Taylor expanded in a around 0 57.1%
Taylor expanded in c around inf 71.4%
Final simplification99.2%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* a b) (+ (* x y) (* c i)))))
(if (<= (* x y) -10000000.0)
t_1
(if (<= (* x y) 4e+69)
(+ (* a b) (+ (* c i) (* z t)))
(if (<= (* x y) 5e+125) t_1 (+ (* x y) (* z t)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && 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) + ((x * y) + (c * i));
double tmp;
if ((x * y) <= -10000000.0) {
tmp = t_1;
} else if ((x * y) <= 4e+69) {
tmp = (a * b) + ((c * i) + (z * t));
} else if ((x * y) <= 5e+125) {
tmp = t_1;
} else {
tmp = (x * y) + (z * t);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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) + (c * i))
if ((x * y) <= (-10000000.0d0)) then
tmp = t_1
else if ((x * y) <= 4d+69) then
tmp = (a * b) + ((c * i) + (z * t))
else if ((x * y) <= 5d+125) then
tmp = t_1
else
tmp = (x * y) + (z * t)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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) + (c * i));
double tmp;
if ((x * y) <= -10000000.0) {
tmp = t_1;
} else if ((x * y) <= 4e+69) {
tmp = (a * b) + ((c * i) + (z * t));
} else if ((x * y) <= 5e+125) {
tmp = t_1;
} else {
tmp = (x * y) + (z * t);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): t_1 = (a * b) + ((x * y) + (c * i)) tmp = 0 if (x * y) <= -10000000.0: tmp = t_1 elif (x * y) <= 4e+69: tmp = (a * b) + ((c * i) + (z * t)) elif (x * y) <= 5e+125: tmp = t_1 else: tmp = (x * y) + (z * t) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(c * i))) tmp = 0.0 if (Float64(x * y) <= -10000000.0) tmp = t_1; elseif (Float64(x * y) <= 4e+69) tmp = Float64(Float64(a * b) + Float64(Float64(c * i) + Float64(z * t))); elseif (Float64(x * y) <= 5e+125) tmp = t_1; else tmp = Float64(Float64(x * y) + Float64(z * t)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = (a * b) + ((x * y) + (c * i));
tmp = 0.0;
if ((x * y) <= -10000000.0)
tmp = t_1;
elseif ((x * y) <= 4e+69)
tmp = (a * b) + ((c * i) + (z * t));
elseif ((x * y) <= 5e+125)
tmp = t_1;
else
tmp = (x * y) + (z * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -10000000.0], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4e+69], N[(N[(a * b), $MachinePrecision] + N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+125], t$95$1, N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := a \cdot b + \left(x \cdot y + c \cdot i\right)\\
\mathbf{if}\;x \cdot y \leq -10000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+69}:\\
\;\;\;\;a \cdot b + \left(c \cdot i + z \cdot t\right)\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\end{array}
\end{array}
if (*.f64 x y) < -1e7 or 4.0000000000000003e69 < (*.f64 x y) < 4.99999999999999962e125Initial program 96.1%
+-commutative96.1%
fma-define96.1%
+-commutative96.1%
fma-define97.4%
fma-define97.4%
Simplified97.4%
Taylor expanded in z around inf 78.2%
associate-+r+78.2%
associate-/l*75.6%
associate-/l*72.9%
associate-/l*63.8%
Simplified63.8%
Taylor expanded in z around 0 83.3%
if -1e7 < (*.f64 x y) < 4.0000000000000003e69Initial program 100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in x around 0 95.0%
if 4.99999999999999962e125 < (*.f64 x y) Initial program 89.4%
+-commutative89.4%
fma-define89.4%
+-commutative89.4%
fma-define89.4%
fma-define89.4%
Simplified89.4%
Taylor expanded in c around 0 87.2%
Taylor expanded in a around 0 87.2%
Final simplification90.4%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -5.8e+228)
(* c i)
(if (<= (* c i) -1.1e-192)
(+ (* a b) (* z t))
(if (<= (* c i) 1.22e+76) (+ (* x y) (* a b)) (+ (* a b) (* c i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && 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) <= -5.8e+228) {
tmp = c * i;
} else if ((c * i) <= -1.1e-192) {
tmp = (a * b) + (z * t);
} else if ((c * i) <= 1.22e+76) {
tmp = (x * y) + (a * b);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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) <= (-5.8d+228)) then
tmp = c * i
else if ((c * i) <= (-1.1d-192)) then
tmp = (a * b) + (z * t)
else if ((c * i) <= 1.22d+76) then
tmp = (x * y) + (a * b)
else
tmp = (a * b) + (c * i)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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) <= -5.8e+228) {
tmp = c * i;
} else if ((c * i) <= -1.1e-192) {
tmp = (a * b) + (z * t);
} else if ((c * i) <= 1.22e+76) {
tmp = (x * y) + (a * b);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -5.8e+228: tmp = c * i elif (c * i) <= -1.1e-192: tmp = (a * b) + (z * t) elif (c * i) <= 1.22e+76: tmp = (x * y) + (a * b) else: tmp = (a * b) + (c * i) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -5.8e+228) tmp = Float64(c * i); elseif (Float64(c * i) <= -1.1e-192) tmp = Float64(Float64(a * b) + Float64(z * t)); elseif (Float64(c * i) <= 1.22e+76) tmp = Float64(Float64(x * y) + Float64(a * b)); else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((c * i) <= -5.8e+228)
tmp = c * i;
elseif ((c * i) <= -1.1e-192)
tmp = (a * b) + (z * t);
elseif ((c * i) <= 1.22e+76)
tmp = (x * y) + (a * b);
else
tmp = (a * b) + (c * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -5.8e+228], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -1.1e-192], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.22e+76], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -5.8 \cdot 10^{+228}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -1.1 \cdot 10^{-192}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 1.22 \cdot 10^{+76}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -5.80000000000000003e228Initial program 92.3%
+-commutative92.3%
fma-define92.3%
+-commutative92.3%
fma-define92.3%
fma-define92.3%
Simplified92.3%
Taylor expanded in c around inf 93.0%
if -5.80000000000000003e228 < (*.f64 c i) < -1.10000000000000003e-192Initial program 98.8%
+-commutative98.8%
fma-define98.8%
+-commutative98.8%
fma-define98.8%
fma-define98.8%
Simplified98.8%
Taylor expanded in c around 0 86.6%
Taylor expanded in t around inf 60.3%
if -1.10000000000000003e-192 < (*.f64 c i) < 1.22000000000000002e76Initial program 98.0%
+-commutative98.0%
fma-define98.0%
+-commutative98.0%
fma-define99.0%
fma-define99.0%
Simplified99.0%
Taylor expanded in c around 0 95.2%
Taylor expanded in t around 0 72.9%
if 1.22000000000000002e76 < (*.f64 c i) Initial program 95.5%
+-commutative95.5%
fma-define95.5%
+-commutative95.5%
fma-define95.5%
fma-define95.5%
Simplified95.5%
Taylor expanded in z around inf 80.8%
associate-+r+80.8%
associate-/l*80.7%
associate-/l*78.4%
associate-/l*71.8%
Simplified71.8%
Taylor expanded in z around 0 87.0%
Taylor expanded in c around inf 74.5%
Final simplification71.2%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x y) (* z t))))
(if (<= (* c i) -0.0155)
(+ (* c i) t_1)
(if (<= (* c i) 1.65e+92)
(+ (* a b) t_1)
(+ (* a b) (+ (* x y) (* c i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
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 * i) <= -0.0155) {
tmp = (c * i) + t_1;
} else if ((c * i) <= 1.65e+92) {
tmp = (a * b) + t_1;
} else {
tmp = (a * b) + ((x * y) + (c * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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 * i) <= (-0.0155d0)) then
tmp = (c * i) + t_1
else if ((c * i) <= 1.65d+92) then
tmp = (a * b) + t_1
else
tmp = (a * b) + ((x * y) + (c * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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 * i) <= -0.0155) {
tmp = (c * i) + t_1;
} else if ((c * i) <= 1.65e+92) {
tmp = (a * b) + t_1;
} else {
tmp = (a * b) + ((x * y) + (c * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): t_1 = (x * y) + (z * t) tmp = 0 if (c * i) <= -0.0155: tmp = (c * i) + t_1 elif (c * i) <= 1.65e+92: tmp = (a * b) + t_1 else: tmp = (a * b) + ((x * y) + (c * i)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * y) + Float64(z * t)) tmp = 0.0 if (Float64(c * i) <= -0.0155) tmp = Float64(Float64(c * i) + t_1); elseif (Float64(c * i) <= 1.65e+92) tmp = Float64(Float64(a * b) + t_1); else tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(c * i))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = (x * y) + (z * t);
tmp = 0.0;
if ((c * i) <= -0.0155)
tmp = (c * i) + t_1;
elseif ((c * i) <= 1.65e+92)
tmp = (a * b) + t_1;
else
tmp = (a * b) + ((x * y) + (c * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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[N[(c * i), $MachinePrecision], -0.0155], N[(N[(c * i), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.65e+92], N[(N[(a * b), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := x \cdot y + z \cdot t\\
\mathbf{if}\;c \cdot i \leq -0.0155:\\
\;\;\;\;c \cdot i + t\_1\\
\mathbf{elif}\;c \cdot i \leq 1.65 \cdot 10^{+92}:\\
\;\;\;\;a \cdot b + t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + c \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 c i) < -0.0155Initial program 97.2%
+-commutative97.2%
fma-define97.2%
+-commutative97.2%
fma-define97.2%
fma-define97.2%
Simplified97.2%
Taylor expanded in a around 0 89.0%
if -0.0155 < (*.f64 c i) < 1.64999999999999987e92Initial program 97.9%
+-commutative97.9%
fma-define97.9%
+-commutative97.9%
fma-define98.6%
fma-define98.6%
Simplified98.6%
Taylor expanded in c around 0 95.1%
if 1.64999999999999987e92 < (*.f64 c i) Initial program 95.3%
+-commutative95.3%
fma-define95.3%
+-commutative95.3%
fma-define95.3%
fma-define95.3%
Simplified95.3%
Taylor expanded in z around inf 79.9%
associate-+r+79.9%
associate-/l*79.8%
associate-/l*77.4%
associate-/l*70.5%
Simplified70.5%
Taylor expanded in z around 0 88.7%
Final simplification92.3%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -2.5e+224)
(+ (* c i) (* z t))
(if (<= (* c i) 1.3e+93)
(+ (* a b) (+ (* x y) (* z t)))
(+ (* a b) (+ (* x y) (* c i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && 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) <= -2.5e+224) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 1.3e+93) {
tmp = (a * b) + ((x * y) + (z * t));
} else {
tmp = (a * b) + ((x * y) + (c * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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+224)) then
tmp = (c * i) + (z * t)
else if ((c * i) <= 1.3d+93) then
tmp = (a * b) + ((x * y) + (z * t))
else
tmp = (a * b) + ((x * y) + (c * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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+224) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 1.3e+93) {
tmp = (a * b) + ((x * y) + (z * t));
} else {
tmp = (a * b) + ((x * y) + (c * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -2.5e+224: tmp = (c * i) + (z * t) elif (c * i) <= 1.3e+93: tmp = (a * b) + ((x * y) + (z * t)) else: tmp = (a * b) + ((x * y) + (c * i)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -2.5e+224) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (Float64(c * i) <= 1.3e+93) tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(z * t))); else tmp = Float64(Float64(a * b) + Float64(Float64(x * y) + Float64(c * i))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((c * i) <= -2.5e+224)
tmp = (c * i) + (z * t);
elseif ((c * i) <= 1.3e+93)
tmp = (a * b) + ((x * y) + (z * t));
else
tmp = (a * b) + ((x * y) + (c * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -2.5e+224], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.3e+93], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -2.5 \cdot 10^{+224}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 1.3 \cdot 10^{+93}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + \left(x \cdot y + c \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 c i) < -2.49999999999999982e224Initial program 92.3%
+-commutative92.3%
fma-define92.3%
+-commutative92.3%
fma-define92.3%
fma-define92.3%
Simplified92.3%
Taylor expanded in a around 0 96.2%
Taylor expanded in x around 0 96.5%
if -2.49999999999999982e224 < (*.f64 c i) < 1.3e93Initial program 98.4%
+-commutative98.4%
fma-define98.4%
+-commutative98.4%
fma-define98.9%
fma-define98.9%
Simplified98.9%
Taylor expanded in c around 0 91.0%
if 1.3e93 < (*.f64 c i) Initial program 95.3%
+-commutative95.3%
fma-define95.3%
+-commutative95.3%
fma-define95.3%
fma-define95.3%
Simplified95.3%
Taylor expanded in z around inf 79.9%
associate-+r+79.9%
associate-/l*79.8%
associate-/l*77.4%
associate-/l*70.5%
Simplified70.5%
Taylor expanded in z around 0 88.7%
Final simplification91.1%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* x y) -1e+220)
(* x (+ y (/ (* c i) x)))
(if (<= (* x y) 2e+104)
(+ (* a b) (+ (* c i) (* z t)))
(+ (* x y) (* z t)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x * y) <= -1e+220) {
tmp = x * (y + ((c * i) / x));
} else if ((x * y) <= 2e+104) {
tmp = (a * b) + ((c * i) + (z * t));
} else {
tmp = (x * y) + (z * t);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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) <= (-1d+220)) then
tmp = x * (y + ((c * i) / x))
else if ((x * y) <= 2d+104) then
tmp = (a * b) + ((c * i) + (z * t))
else
tmp = (x * y) + (z * t)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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) <= -1e+220) {
tmp = x * (y + ((c * i) / x));
} else if ((x * y) <= 2e+104) {
tmp = (a * b) + ((c * i) + (z * t));
} else {
tmp = (x * y) + (z * t);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (x * y) <= -1e+220: tmp = x * (y + ((c * i) / x)) elif (x * y) <= 2e+104: tmp = (a * b) + ((c * i) + (z * t)) else: tmp = (x * y) + (z * t) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(x * y) <= -1e+220) tmp = Float64(x * Float64(y + Float64(Float64(c * i) / x))); elseif (Float64(x * y) <= 2e+104) tmp = Float64(Float64(a * b) + Float64(Float64(c * i) + Float64(z * t))); else tmp = Float64(Float64(x * y) + Float64(z * t)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((x * y) <= -1e+220)
tmp = x * (y + ((c * i) / x));
elseif ((x * y) <= 2e+104)
tmp = (a * b) + ((c * i) + (z * t));
else
tmp = (x * y) + (z * t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(x * y), $MachinePrecision], -1e+220], N[(x * N[(y + N[(N[(c * i), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+104], N[(N[(a * b), $MachinePrecision] + N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+220}:\\
\;\;\;\;x \cdot \left(y + \frac{c \cdot i}{x}\right)\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+104}:\\
\;\;\;\;a \cdot b + \left(c \cdot i + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + z \cdot t\\
\end{array}
\end{array}
if (*.f64 x y) < -1e220Initial program 84.2%
+-commutative84.2%
fma-define84.2%
+-commutative84.2%
fma-define89.5%
fma-define89.5%
Simplified89.5%
Taylor expanded in x around inf 89.5%
associate-+r+89.5%
associate-/l*100.0%
associate-/l*100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in c around inf 94.7%
if -1e220 < (*.f64 x y) < 2e104Initial program 100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in x around 0 87.2%
if 2e104 < (*.f64 x y) Initial program 90.6%
+-commutative90.6%
fma-define90.6%
+-commutative90.6%
fma-define90.6%
fma-define90.6%
Simplified90.6%
Taylor expanded in c around 0 86.4%
Taylor expanded in a around 0 84.1%
Final simplification87.3%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (* c i) -2.6e+238)
(* c i)
(if (<= (* c i) -1.95e-181)
(* z t)
(if (<= (* c i) 1.35e+70) (* a b) (* c i)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && 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) <= -2.6e+238) {
tmp = c * i;
} else if ((c * i) <= -1.95e-181) {
tmp = z * t;
} else if ((c * i) <= 1.35e+70) {
tmp = a * b;
} else {
tmp = c * i;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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.6d+238)) then
tmp = c * i
else if ((c * i) <= (-1.95d-181)) then
tmp = z * t
else if ((c * i) <= 1.35d+70) then
tmp = a * b
else
tmp = c * i
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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.6e+238) {
tmp = c * i;
} else if ((c * i) <= -1.95e-181) {
tmp = z * t;
} else if ((c * i) <= 1.35e+70) {
tmp = a * b;
} else {
tmp = c * i;
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -2.6e+238: tmp = c * i elif (c * i) <= -1.95e-181: tmp = z * t elif (c * i) <= 1.35e+70: tmp = a * b else: tmp = c * i return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -2.6e+238) tmp = Float64(c * i); elseif (Float64(c * i) <= -1.95e-181) tmp = Float64(z * t); elseif (Float64(c * i) <= 1.35e+70) tmp = Float64(a * b); else tmp = Float64(c * i); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((c * i) <= -2.6e+238)
tmp = c * i;
elseif ((c * i) <= -1.95e-181)
tmp = z * t;
elseif ((c * i) <= 1.35e+70)
tmp = a * b;
else
tmp = c * i;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -2.6e+238], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], -1.95e-181], N[(z * t), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 1.35e+70], N[(a * b), $MachinePrecision], N[(c * i), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -2.6 \cdot 10^{+238}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq -1.95 \cdot 10^{-181}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 1.35 \cdot 10^{+70}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -2.6e238 or 1.35e70 < (*.f64 c i) Initial program 94.5%
+-commutative94.5%
fma-define94.5%
+-commutative94.5%
fma-define94.5%
fma-define94.5%
Simplified94.5%
Taylor expanded in c around inf 71.4%
if -2.6e238 < (*.f64 c i) < -1.95e-181Initial program 100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in a around 0 84.2%
Taylor expanded in t around inf 44.0%
if -1.95e-181 < (*.f64 c i) < 1.35e70Initial program 97.0%
+-commutative97.0%
fma-define97.0%
+-commutative97.0%
fma-define98.0%
fma-define98.0%
Simplified98.0%
Taylor expanded in a around inf 44.4%
Final simplification52.0%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= (* c i) -4.3e+14) (+ (* c i) (* z t)) (if (<= (* c i) 4e+69) (+ (* x y) (* a b)) (+ (* x y) (* c i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && 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.3e+14) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 4e+69) {
tmp = (x * y) + (a * b);
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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.3d+14)) then
tmp = (c * i) + (z * t)
else if ((c * i) <= 4d+69) then
tmp = (x * y) + (a * b)
else
tmp = (x * y) + (c * i)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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.3e+14) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 4e+69) {
tmp = (x * y) + (a * b);
} else {
tmp = (x * y) + (c * i);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -4.3e+14: tmp = (c * i) + (z * t) elif (c * i) <= 4e+69: tmp = (x * y) + (a * b) else: tmp = (x * y) + (c * i) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -4.3e+14) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (Float64(c * i) <= 4e+69) tmp = Float64(Float64(x * y) + Float64(a * b)); else tmp = Float64(Float64(x * y) + Float64(c * i)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((c * i) <= -4.3e+14)
tmp = (c * i) + (z * t);
elseif ((c * i) <= 4e+69)
tmp = (x * y) + (a * b);
else
tmp = (x * y) + (c * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -4.3e+14], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 4e+69], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -4.3 \cdot 10^{+14}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 4 \cdot 10^{+69}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -4.3e14Initial program 96.9%
+-commutative96.9%
fma-define96.9%
+-commutative96.9%
fma-define96.9%
fma-define96.9%
Simplified96.9%
Taylor expanded in a around 0 89.4%
Taylor expanded in x around 0 76.8%
if -4.3e14 < (*.f64 c i) < 4.0000000000000003e69Initial program 97.9%
+-commutative97.9%
fma-define97.9%
+-commutative97.9%
fma-define98.6%
fma-define98.6%
Simplified98.6%
Taylor expanded in c around 0 94.5%
Taylor expanded in t around 0 67.7%
if 4.0000000000000003e69 < (*.f64 c i) Initial program 95.7%
+-commutative95.7%
fma-define95.7%
+-commutative95.7%
fma-define95.7%
fma-define95.7%
Simplified95.7%
Taylor expanded in a around 0 83.9%
Taylor expanded in t around 0 75.6%
Final simplification71.5%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= (* c i) -3.8e+14) (+ (* c i) (* z t)) (if (<= (* c i) 7.2e+75) (+ (* x y) (* a b)) (+ (* a b) (* c i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && 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) <= -3.8e+14) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 7.2e+75) {
tmp = (x * y) + (a * b);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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) <= (-3.8d+14)) then
tmp = (c * i) + (z * t)
else if ((c * i) <= 7.2d+75) then
tmp = (x * y) + (a * b)
else
tmp = (a * b) + (c * i)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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) <= -3.8e+14) {
tmp = (c * i) + (z * t);
} else if ((c * i) <= 7.2e+75) {
tmp = (x * y) + (a * b);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -3.8e+14: tmp = (c * i) + (z * t) elif (c * i) <= 7.2e+75: tmp = (x * y) + (a * b) else: tmp = (a * b) + (c * i) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -3.8e+14) tmp = Float64(Float64(c * i) + Float64(z * t)); elseif (Float64(c * i) <= 7.2e+75) tmp = Float64(Float64(x * y) + Float64(a * b)); else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((c * i) <= -3.8e+14)
tmp = (c * i) + (z * t);
elseif ((c * i) <= 7.2e+75)
tmp = (x * y) + (a * b);
else
tmp = (a * b) + (c * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -3.8e+14], N[(N[(c * i), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 7.2e+75], N[(N[(x * y), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -3.8 \cdot 10^{+14}:\\
\;\;\;\;c \cdot i + z \cdot t\\
\mathbf{elif}\;c \cdot i \leq 7.2 \cdot 10^{+75}:\\
\;\;\;\;x \cdot y + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -3.8e14Initial program 96.9%
+-commutative96.9%
fma-define96.9%
+-commutative96.9%
fma-define96.9%
fma-define96.9%
Simplified96.9%
Taylor expanded in a around 0 89.4%
Taylor expanded in x around 0 76.8%
if -3.8e14 < (*.f64 c i) < 7.2e75Initial program 97.9%
+-commutative97.9%
fma-define97.9%
+-commutative97.9%
fma-define98.6%
fma-define98.6%
Simplified98.6%
Taylor expanded in c around 0 94.5%
Taylor expanded in t around 0 68.1%
if 7.2e75 < (*.f64 c i) Initial program 95.5%
+-commutative95.5%
fma-define95.5%
+-commutative95.5%
fma-define95.5%
fma-define95.5%
Simplified95.5%
Taylor expanded in z around inf 80.8%
associate-+r+80.8%
associate-/l*80.7%
associate-/l*78.4%
associate-/l*71.8%
Simplified71.8%
Taylor expanded in z around 0 87.0%
Taylor expanded in c around inf 74.5%
Final simplification71.5%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= (* c i) -1.45e+233) (* c i) (if (<= (* c i) 2.6e+94) (+ (* a b) (* z t)) (+ (* a b) (* c i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && 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.45e+233) {
tmp = c * i;
} else if ((c * i) <= 2.6e+94) {
tmp = (a * b) + (z * t);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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.45d+233)) then
tmp = c * i
else if ((c * i) <= 2.6d+94) then
tmp = (a * b) + (z * t)
else
tmp = (a * b) + (c * i)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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.45e+233) {
tmp = c * i;
} else if ((c * i) <= 2.6e+94) {
tmp = (a * b) + (z * t);
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (c * i) <= -1.45e+233: tmp = c * i elif (c * i) <= 2.6e+94: tmp = (a * b) + (z * t) else: tmp = (a * b) + (c * i) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(c * i) <= -1.45e+233) tmp = Float64(c * i); elseif (Float64(c * i) <= 2.6e+94) tmp = Float64(Float64(a * b) + Float64(z * t)); else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((c * i) <= -1.45e+233)
tmp = c * i;
elseif ((c * i) <= 2.6e+94)
tmp = (a * b) + (z * t);
else
tmp = (a * b) + (c * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(c * i), $MachinePrecision], -1.45e+233], N[(c * i), $MachinePrecision], If[LessEqual[N[(c * i), $MachinePrecision], 2.6e+94], N[(N[(a * b), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -1.45 \cdot 10^{+233}:\\
\;\;\;\;c \cdot i\\
\mathbf{elif}\;c \cdot i \leq 2.6 \cdot 10^{+94}:\\
\;\;\;\;a \cdot b + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if (*.f64 c i) < -1.45000000000000006e233Initial program 92.3%
+-commutative92.3%
fma-define92.3%
+-commutative92.3%
fma-define92.3%
fma-define92.3%
Simplified92.3%
Taylor expanded in c around inf 93.0%
if -1.45000000000000006e233 < (*.f64 c i) < 2.5999999999999999e94Initial program 98.4%
+-commutative98.4%
fma-define98.4%
+-commutative98.4%
fma-define98.9%
fma-define98.9%
Simplified98.9%
Taylor expanded in c around 0 91.0%
Taylor expanded in t around inf 64.3%
if 2.5999999999999999e94 < (*.f64 c i) Initial program 95.3%
+-commutative95.3%
fma-define95.3%
+-commutative95.3%
fma-define95.3%
fma-define95.3%
Simplified95.3%
Taylor expanded in z around inf 79.9%
associate-+r+79.9%
associate-/l*79.8%
associate-/l*77.4%
associate-/l*70.5%
Simplified70.5%
Taylor expanded in z around 0 88.7%
Taylor expanded in c around inf 75.5%
Final simplification69.1%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= z -1.9e+137) (not (<= z 12.5))) (* z t) (+ (* a b) (* c i))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z <= -1.9e+137) || !(z <= 12.5)) {
tmp = z * t;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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 <= (-1.9d+137)) .or. (.not. (z <= 12.5d0))) then
tmp = z * t
else
tmp = (a * b) + (c * i)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z <= -1.9e+137) || !(z <= 12.5)) {
tmp = z * t;
} else {
tmp = (a * b) + (c * i);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (z <= -1.9e+137) or not (z <= 12.5): tmp = z * t else: tmp = (a * b) + (c * i) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((z <= -1.9e+137) || !(z <= 12.5)) tmp = Float64(z * t); else tmp = Float64(Float64(a * b) + Float64(c * i)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((z <= -1.9e+137) || ~((z <= 12.5)))
tmp = z * t;
else
tmp = (a * b) + (c * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[z, -1.9e+137], N[Not[LessEqual[z, 12.5]], $MachinePrecision]], N[(z * t), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(c * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+137} \lor \neg \left(z \leq 12.5\right):\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + c \cdot i\\
\end{array}
\end{array}
if z < -1.89999999999999981e137 or 12.5 < z Initial program 99.0%
+-commutative99.0%
fma-define99.0%
+-commutative99.0%
fma-define99.0%
fma-define99.0%
Simplified99.0%
Taylor expanded in a around 0 87.5%
Taylor expanded in t around inf 57.5%
if -1.89999999999999981e137 < z < 12.5Initial program 96.1%
+-commutative96.1%
fma-define96.1%
+-commutative96.1%
fma-define96.8%
fma-define96.8%
Simplified96.8%
Taylor expanded in z around inf 70.3%
associate-+r+70.3%
associate-/l*65.3%
associate-/l*62.6%
associate-/l*56.2%
Simplified56.2%
Taylor expanded in z around 0 88.4%
Taylor expanded in c around inf 64.0%
Final simplification61.5%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= (* c i) -3.6e-17) (not (<= (* c i) 4.2e+68))) (* c i) (* a b)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && 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) <= -3.6e-17) || !((c * i) <= 4.2e+68)) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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) <= (-3.6d-17)) .or. (.not. ((c * i) <= 4.2d+68))) then
tmp = c * i
else
tmp = a * b
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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) <= -3.6e-17) || !((c * i) <= 4.2e+68)) {
tmp = c * i;
} else {
tmp = a * b;
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if ((c * i) <= -3.6e-17) or not ((c * i) <= 4.2e+68): tmp = c * i else: tmp = a * b return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(c * i) <= -3.6e-17) || !(Float64(c * i) <= 4.2e+68)) tmp = Float64(c * i); else tmp = Float64(a * b); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (((c * i) <= -3.6e-17) || ~(((c * i) <= 4.2e+68)))
tmp = c * i;
else
tmp = a * b;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(c * i), $MachinePrecision], -3.6e-17], N[Not[LessEqual[N[(c * i), $MachinePrecision], 4.2e+68]], $MachinePrecision]], N[(c * i), $MachinePrecision], N[(a * b), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;c \cdot i \leq -3.6 \cdot 10^{-17} \lor \neg \left(c \cdot i \leq 4.2 \cdot 10^{+68}\right):\\
\;\;\;\;c \cdot i\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 c i) < -3.59999999999999995e-17 or 4.20000000000000002e68 < (*.f64 c i) Initial program 96.7%
+-commutative96.7%
fma-define96.7%
+-commutative96.7%
fma-define96.7%
fma-define96.7%
Simplified96.7%
Taylor expanded in c around inf 50.5%
if -3.59999999999999995e-17 < (*.f64 c i) < 4.20000000000000002e68Initial program 97.7%
+-commutative97.7%
fma-define97.7%
+-commutative97.7%
fma-define98.5%
fma-define98.5%
Simplified98.5%
Taylor expanded in a around inf 39.1%
Final simplification44.6%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (* a b))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a * b;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
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
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a * b;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): return a * b
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return Float64(a * b) end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = a * b;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a * b), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
a \cdot b
\end{array}
Initial program 97.2%
+-commutative97.2%
fma-define97.2%
+-commutative97.2%
fma-define97.6%
fma-define97.6%
Simplified97.6%
Taylor expanded in a around inf 27.2%
herbie shell --seed 2024145
(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)))