
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(- (* b c) (- (* t (* a 4.0)) (* (* (* (* x 18.0) y) z) t)))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (- (/ (* b c) x) (* 4.0 i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * (((b * c) / x) - (4.0 * i));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * (((b * c) / x) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * (((b * c) / x) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(t * Float64(a * 4.0)) - Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(Float64(b * c) / x) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * (((b * c) / x) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(N[(b * c), $MachinePrecision] / x), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(b \cdot c - \left(t \cdot \left(a \cdot 4\right) - \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{b \cdot c}{x} - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 97.1%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified16.0%
Taylor expanded in t around 0 36.5%
Taylor expanded in j around 0 45.0%
Taylor expanded in x around inf 52.6%
Final simplification92.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* j (* 27.0 k)) (* x (* 4.0 i))))
(t_2 (* 18.0 (* x (* y z)))))
(if (<= t -2.5e-63)
(- (* t (- (+ t_2 (/ (* b c) t)) (* a 4.0))) t_1)
(if (<= t 1.85e+216)
(- (+ (* b c) (- (* x (* (* 18.0 y) (* z t))) (* a (* t 4.0)))) t_1)
(+ (* b c) (* t (- t_2 (* a 4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (27.0 * k)) + (x * (4.0 * i));
double t_2 = 18.0 * (x * (y * z));
double tmp;
if (t <= -2.5e-63) {
tmp = (t * ((t_2 + ((b * c) / t)) - (a * 4.0))) - t_1;
} else if (t <= 1.85e+216) {
tmp = ((b * c) + ((x * ((18.0 * y) * (z * t))) - (a * (t * 4.0)))) - t_1;
} else {
tmp = (b * c) + (t * (t_2 - (a * 4.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * (27.0d0 * k)) + (x * (4.0d0 * i))
t_2 = 18.0d0 * (x * (y * z))
if (t <= (-2.5d-63)) then
tmp = (t * ((t_2 + ((b * c) / t)) - (a * 4.0d0))) - t_1
else if (t <= 1.85d+216) then
tmp = ((b * c) + ((x * ((18.0d0 * y) * (z * t))) - (a * (t * 4.0d0)))) - t_1
else
tmp = (b * c) + (t * (t_2 - (a * 4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (27.0 * k)) + (x * (4.0 * i));
double t_2 = 18.0 * (x * (y * z));
double tmp;
if (t <= -2.5e-63) {
tmp = (t * ((t_2 + ((b * c) / t)) - (a * 4.0))) - t_1;
} else if (t <= 1.85e+216) {
tmp = ((b * c) + ((x * ((18.0 * y) * (z * t))) - (a * (t * 4.0)))) - t_1;
} else {
tmp = (b * c) + (t * (t_2 - (a * 4.0)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (27.0 * k)) + (x * (4.0 * i)) t_2 = 18.0 * (x * (y * z)) tmp = 0 if t <= -2.5e-63: tmp = (t * ((t_2 + ((b * c) / t)) - (a * 4.0))) - t_1 elif t <= 1.85e+216: tmp = ((b * c) + ((x * ((18.0 * y) * (z * t))) - (a * (t * 4.0)))) - t_1 else: tmp = (b * c) + (t * (t_2 - (a * 4.0))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(27.0 * k)) + Float64(x * Float64(4.0 * i))) t_2 = Float64(18.0 * Float64(x * Float64(y * z))) tmp = 0.0 if (t <= -2.5e-63) tmp = Float64(Float64(t * Float64(Float64(t_2 + Float64(Float64(b * c) / t)) - Float64(a * 4.0))) - t_1); elseif (t <= 1.85e+216) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(x * Float64(Float64(18.0 * y) * Float64(z * t))) - Float64(a * Float64(t * 4.0)))) - t_1); else tmp = Float64(Float64(b * c) + Float64(t * Float64(t_2 - Float64(a * 4.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (27.0 * k)) + (x * (4.0 * i));
t_2 = 18.0 * (x * (y * z));
tmp = 0.0;
if (t <= -2.5e-63)
tmp = (t * ((t_2 + ((b * c) / t)) - (a * 4.0))) - t_1;
elseif (t <= 1.85e+216)
tmp = ((b * c) + ((x * ((18.0 * y) * (z * t))) - (a * (t * 4.0)))) - t_1;
else
tmp = (b * c) + (t * (t_2 - (a * 4.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision] + N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.5e-63], N[(N[(t * N[(N[(t$95$2 + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 1.85e+216], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(x * N[(N[(18.0 * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$2 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(27 \cdot k\right) + x \cdot \left(4 \cdot i\right)\\
t_2 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{-63}:\\
\;\;\;\;t \cdot \left(\left(t\_2 + \frac{b \cdot c}{t}\right) - a \cdot 4\right) - t\_1\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+216}:\\
\;\;\;\;\left(b \cdot c + \left(x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right)\right) - a \cdot \left(t \cdot 4\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t \cdot \left(t\_2 - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -2.5000000000000001e-63Initial program 89.3%
Simplified91.6%
Taylor expanded in t around inf 92.8%
if -2.5000000000000001e-63 < t < 1.8499999999999999e216Initial program 87.3%
Simplified82.8%
associate-*r*87.3%
distribute-rgt-out--86.6%
associate-+l-86.6%
associate-*l*86.9%
fmm-def88.2%
associate-*l*88.2%
*-commutative88.2%
Applied egg-rr88.2%
fmm-undef86.9%
*-commutative86.9%
associate-*r*86.9%
*-commutative86.9%
*-commutative86.9%
*-commutative86.9%
associate-*l*86.9%
*-commutative86.9%
*-commutative86.9%
Simplified86.9%
associate--r-86.9%
associate-*l*90.3%
Applied egg-rr90.3%
if 1.8499999999999999e216 < t Initial program 82.2%
Simplified88.1%
Taylor expanded in i around 0 94.0%
Taylor expanded in j around 0 99.9%
Final simplification91.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -2.1e+150)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= x 1.85e+34)
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 27.0 (* j k)))
(-
(+ (* (* z t) (* x (* 18.0 y))) (- (* b c) (* a (* t 4.0))))
(* x (* 4.0 i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.1e+150) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= 1.85e+34) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k));
} else {
tmp = (((z * t) * (x * (18.0 * y))) + ((b * c) - (a * (t * 4.0)))) - (x * (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-2.1d+150)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (x <= 1.85d+34) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (27.0d0 * (j * k))
else
tmp = (((z * t) * (x * (18.0d0 * y))) + ((b * c) - (a * (t * 4.0d0)))) - (x * (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.1e+150) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= 1.85e+34) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k));
} else {
tmp = (((z * t) * (x * (18.0 * y))) + ((b * c) - (a * (t * 4.0)))) - (x * (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -2.1e+150: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif x <= 1.85e+34: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k)) else: tmp = (((z * t) * (x * (18.0 * y))) + ((b * c) - (a * (t * 4.0)))) - (x * (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -2.1e+150) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (x <= 1.85e+34) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(Float64(Float64(Float64(z * t) * Float64(x * Float64(18.0 * y))) + Float64(Float64(b * c) - Float64(a * Float64(t * 4.0)))) - Float64(x * Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -2.1e+150)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (x <= 1.85e+34)
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k));
else
tmp = (((z * t) * (x * (18.0 * y))) + ((b * c) - (a * (t * 4.0)))) - (x * (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -2.1e+150], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+34], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(z * t), $MachinePrecision] * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(a * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+150}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+34}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(z \cdot t\right) \cdot \left(x \cdot \left(18 \cdot y\right)\right) + \left(b \cdot c - a \cdot \left(t \cdot 4\right)\right)\right) - x \cdot \left(4 \cdot i\right)\\
\end{array}
\end{array}
if x < -2.09999999999999998e150Initial program 70.5%
Simplified73.5%
Taylor expanded in x around inf 80.0%
if -2.09999999999999998e150 < x < 1.85000000000000004e34Initial program 95.3%
Simplified90.0%
Taylor expanded in i around 0 84.9%
if 1.85000000000000004e34 < x Initial program 75.0%
Simplified82.0%
associate-*r*75.0%
distribute-rgt-out--75.0%
associate-+l-75.0%
associate-*l*74.6%
fmm-def76.5%
associate-*l*76.4%
*-commutative76.4%
Applied egg-rr76.4%
fmm-undef74.6%
*-commutative74.6%
associate-*r*74.6%
*-commutative74.6%
*-commutative74.6%
*-commutative74.6%
associate-*l*74.6%
*-commutative74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in x around inf 76.4%
associate-*r*76.4%
*-commutative76.4%
Simplified76.4%
Final simplification82.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -2e+129)
(* b c)
(if (<= (* b c) -5e-217)
(* 18.0 (* x (* y (* z t))))
(if (<= (* b c) 5e-243)
(* k (* j -27.0))
(if (<= (* b c) 5e+118) (* t (* a -4.0)) (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -2e+129) {
tmp = b * c;
} else if ((b * c) <= -5e-217) {
tmp = 18.0 * (x * (y * (z * t)));
} else if ((b * c) <= 5e-243) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 5e+118) {
tmp = t * (a * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-2d+129)) then
tmp = b * c
else if ((b * c) <= (-5d-217)) then
tmp = 18.0d0 * (x * (y * (z * t)))
else if ((b * c) <= 5d-243) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 5d+118) then
tmp = t * (a * (-4.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -2e+129) {
tmp = b * c;
} else if ((b * c) <= -5e-217) {
tmp = 18.0 * (x * (y * (z * t)));
} else if ((b * c) <= 5e-243) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 5e+118) {
tmp = t * (a * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -2e+129: tmp = b * c elif (b * c) <= -5e-217: tmp = 18.0 * (x * (y * (z * t))) elif (b * c) <= 5e-243: tmp = k * (j * -27.0) elif (b * c) <= 5e+118: tmp = t * (a * -4.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -2e+129) tmp = Float64(b * c); elseif (Float64(b * c) <= -5e-217) tmp = Float64(18.0 * Float64(x * Float64(y * Float64(z * t)))); elseif (Float64(b * c) <= 5e-243) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 5e+118) tmp = Float64(t * Float64(a * -4.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -2e+129)
tmp = b * c;
elseif ((b * c) <= -5e-217)
tmp = 18.0 * (x * (y * (z * t)));
elseif ((b * c) <= 5e-243)
tmp = k * (j * -27.0);
elseif ((b * c) <= 5e+118)
tmp = t * (a * -4.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -2e+129], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-217], N[(18.0 * N[(x * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e-243], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+118], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+129}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-217}:\\
\;\;\;\;18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-243}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+118}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2e129 or 4.99999999999999972e118 < (*.f64 b c) Initial program 85.1%
Simplified82.4%
associate-*r*86.4%
distribute-rgt-out--85.1%
associate-+l-85.1%
associate-*l*79.7%
fmm-def83.7%
associate-*l*83.7%
*-commutative83.7%
Applied egg-rr83.7%
fmm-undef79.7%
*-commutative79.7%
associate-*r*79.7%
*-commutative79.7%
*-commutative79.7%
*-commutative79.7%
associate-*l*79.7%
*-commutative79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in b around inf 65.9%
if -2e129 < (*.f64 b c) < -5.0000000000000002e-217Initial program 88.2%
Simplified86.9%
associate-*r*89.7%
distribute-rgt-out--88.2%
associate-+l-88.2%
associate-*l*83.6%
fmm-def83.6%
associate-*l*82.2%
*-commutative82.2%
Applied egg-rr82.2%
fmm-undef82.2%
*-commutative82.2%
associate-*r*82.2%
*-commutative82.2%
*-commutative82.2%
*-commutative82.2%
associate-*l*82.2%
*-commutative82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in t around inf 55.0%
Taylor expanded in x around inf 34.6%
Taylor expanded in t around 0 34.6%
associate-*r*35.9%
*-commutative35.9%
associate-*r*34.6%
associate-*l*34.6%
associate-*l*34.5%
*-commutative34.5%
Simplified34.5%
if -5.0000000000000002e-217 < (*.f64 b c) < 5e-243Initial program 87.5%
Simplified82.0%
Taylor expanded in j around inf 42.2%
associate-*r*42.2%
*-commutative42.2%
Simplified42.2%
if 5e-243 < (*.f64 b c) < 4.99999999999999972e118Initial program 90.2%
Simplified93.3%
associate-*r*91.8%
distribute-rgt-out--90.1%
associate-+l-90.1%
associate-*l*86.9%
fmm-def86.9%
associate-*l*86.9%
*-commutative86.9%
Applied egg-rr86.9%
fmm-undef86.9%
*-commutative86.9%
associate-*r*86.9%
*-commutative86.9%
*-commutative86.9%
*-commutative86.9%
associate-*l*86.9%
*-commutative86.9%
*-commutative86.9%
Simplified86.9%
associate--r-86.9%
associate-*l*90.2%
Applied egg-rr90.2%
Taylor expanded in a around inf 39.3%
*-commutative39.3%
*-commutative39.3%
associate-*r*39.3%
*-commutative39.3%
Simplified39.3%
Final simplification46.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= x -5.4e+147) (not (<= x 3.5e+101)))
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 27.0 (* j k)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -5.4e+147) || !(x <= 3.5e+101)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-5.4d+147)) .or. (.not. (x <= 3.5d+101))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -5.4e+147) || !(x <= 3.5e+101)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -5.4e+147) or not (x <= 3.5e+101): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -5.4e+147) || !(x <= 3.5e+101)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -5.4e+147) || ~((x <= 3.5e+101)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -5.4e+147], N[Not[LessEqual[x, 3.5e+101]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+147} \lor \neg \left(x \leq 3.5 \cdot 10^{+101}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if x < -5.39999999999999995e147 or 3.50000000000000023e101 < x Initial program 70.0%
Simplified76.5%
Taylor expanded in x around inf 79.4%
if -5.39999999999999995e147 < x < 3.50000000000000023e101Initial program 95.0%
Simplified90.2%
Taylor expanded in i around 0 84.3%
Final simplification82.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (- (- (* b c) (* t (- (* a 4.0) (* (* x 18.0) (* y z))))) (+ (* j (* 27.0 k)) (* x (* 4.0 i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - ((j * (27.0 * k)) + (x * (4.0 * i)));
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
code = ((b * c) - (t * ((a * 4.0d0) - ((x * 18.0d0) * (y * z))))) - ((j * (27.0d0 * k)) + (x * (4.0d0 * i)))
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - ((j * (27.0 * k)) + (x * (4.0 * i)));
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - ((j * (27.0 * k)) + (x * (4.0 * i)))
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(Float64(x * 18.0) * Float64(y * z))))) - Float64(Float64(j * Float64(27.0 * k)) + Float64(x * Float64(4.0 * i)))) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - ((j * (27.0 * k)) + (x * (4.0 * i)));
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision] + N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\left(b \cdot c - t \cdot \left(a \cdot 4 - \left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)\right) - \left(j \cdot \left(27 \cdot k\right) + x \cdot \left(4 \cdot i\right)\right)
\end{array}
Initial program 87.6%
Simplified86.1%
Final simplification86.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -5.5e+84)
t_1
(if (<= x 1.6e-41)
(+ (* b c) (* j (* k -27.0)))
(if (<= x 4.5e+102) (* t (+ (* 18.0 (* z (* x y))) (* a -4.0))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -5.5e+84) {
tmp = t_1;
} else if (x <= 1.6e-41) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 4.5e+102) {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-5.5d+84)) then
tmp = t_1
else if (x <= 1.6d-41) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (x <= 4.5d+102) then
tmp = t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -5.5e+84) {
tmp = t_1;
} else if (x <= 1.6e-41) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 4.5e+102) {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -5.5e+84: tmp = t_1 elif x <= 1.6e-41: tmp = (b * c) + (j * (k * -27.0)) elif x <= 4.5e+102: tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -5.5e+84) tmp = t_1; elseif (x <= 1.6e-41) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (x <= 4.5e+102) tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -5.5e+84)
tmp = t_1;
elseif (x <= 1.6e-41)
tmp = (b * c) + (j * (k * -27.0));
elseif (x <= 4.5e+102)
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.5e+84], t$95$1, If[LessEqual[x, 1.6e-41], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+102], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-41}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+102}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.5000000000000004e84 or 4.50000000000000021e102 < x Initial program 72.9%
Simplified78.5%
Taylor expanded in x around inf 76.7%
if -5.5000000000000004e84 < x < 1.60000000000000006e-41Initial program 95.8%
Simplified90.2%
Taylor expanded in b around inf 63.5%
if 1.60000000000000006e-41 < x < 4.50000000000000021e102Initial program 93.0%
Simplified93.0%
associate-*r*93.0%
distribute-rgt-out--93.0%
associate-+l-93.0%
associate-*l*92.7%
fmm-def92.7%
associate-*l*92.8%
*-commutative92.8%
Applied egg-rr92.8%
fmm-undef92.8%
*-commutative92.8%
associate-*r*92.8%
*-commutative92.8%
*-commutative92.8%
*-commutative92.8%
associate-*l*92.8%
*-commutative92.8%
*-commutative92.8%
Simplified92.8%
Taylor expanded in t around inf 59.1%
cancel-sign-sub-inv59.1%
associate-*r*59.1%
metadata-eval59.1%
Simplified59.1%
Final simplification67.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -2.7e+95)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t 4.7e-150)
(+ (* b c) (* j (* k -27.0)))
(if (<= t 0.000185)
(- (* b c) (* 4.0 (* x i)))
(* t (+ (* 18.0 (* z (* x y))) (* a -4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -2.7e+95) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 4.7e-150) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 0.000185) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-2.7d+95)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= 4.7d-150) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (t <= 0.000185d0) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -2.7e+95) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 4.7e-150) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 0.000185) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -2.7e+95: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= 4.7e-150: tmp = (b * c) + (j * (k * -27.0)) elif t <= 0.000185: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -2.7e+95) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= 4.7e-150) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (t <= 0.000185) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -2.7e+95)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= 4.7e-150)
tmp = (b * c) + (j * (k * -27.0));
elseif (t <= 0.000185)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -2.7e+95], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.7e-150], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.000185], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{+95}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{-150}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 0.000185:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\
\end{array}
\end{array}
if t < -2.7e95Initial program 87.1%
Simplified91.4%
associate-*r*91.3%
distribute-rgt-out--87.1%
associate-+l-87.1%
associate-*l*74.5%
fmm-def74.5%
associate-*l*74.5%
*-commutative74.5%
Applied egg-rr74.5%
fmm-undef74.5%
*-commutative74.5%
associate-*r*74.5%
*-commutative74.5%
*-commutative74.5%
*-commutative74.5%
associate-*l*74.5%
*-commutative74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in t around inf 74.3%
if -2.7e95 < t < 4.6999999999999999e-150Initial program 84.8%
Simplified83.2%
Taylor expanded in b around inf 56.3%
if 4.6999999999999999e-150 < t < 1.85e-4Initial program 100.0%
Simplified88.5%
Taylor expanded in t around 0 77.7%
Taylor expanded in j around 0 66.1%
if 1.85e-4 < t Initial program 86.4%
Simplified88.0%
associate-*r*88.0%
distribute-rgt-out--86.3%
associate-+l-86.3%
associate-*l*78.0%
fmm-def79.7%
associate-*l*79.7%
*-commutative79.7%
Applied egg-rr79.7%
fmm-undef78.0%
*-commutative78.0%
associate-*r*78.0%
*-commutative78.0%
*-commutative78.0%
*-commutative78.0%
associate-*l*78.0%
*-commutative78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in t around inf 66.7%
cancel-sign-sub-inv66.7%
associate-*r*66.7%
metadata-eval66.7%
Simplified66.7%
Final simplification63.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (+ (* 18.0 (* z (* x y))) (* a -4.0)))))
(if (<= t -0.76)
t_1
(if (<= t 2.05e-150)
(+ (* b c) (* j (* k -27.0)))
(if (<= t 0.000195) (- (* b c) (* 4.0 (* x i))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (z * (x * y))) + (a * -4.0));
double tmp;
if (t <= -0.76) {
tmp = t_1;
} else if (t <= 2.05e-150) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 0.000195) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))
if (t <= (-0.76d0)) then
tmp = t_1
else if (t <= 2.05d-150) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (t <= 0.000195d0) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (z * (x * y))) + (a * -4.0));
double tmp;
if (t <= -0.76) {
tmp = t_1;
} else if (t <= 2.05e-150) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 0.000195) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (z * (x * y))) + (a * -4.0)) tmp = 0 if t <= -0.76: tmp = t_1 elif t <= 2.05e-150: tmp = (b * c) + (j * (k * -27.0)) elif t <= 0.000195: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))) tmp = 0.0 if (t <= -0.76) tmp = t_1; elseif (t <= 2.05e-150) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (t <= 0.000195) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (z * (x * y))) + (a * -4.0));
tmp = 0.0;
if (t <= -0.76)
tmp = t_1;
elseif (t <= 2.05e-150)
tmp = (b * c) + (j * (k * -27.0));
elseif (t <= 0.000195)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -0.76], t$95$1, If[LessEqual[t, 2.05e-150], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.000195], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -0.76:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-150}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 0.000195:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -0.76000000000000001 or 1.94999999999999996e-4 < t Initial program 86.2%
Simplified89.4%
associate-*r*88.6%
distribute-rgt-out--86.2%
associate-+l-86.2%
associate-*l*76.7%
fmm-def78.3%
associate-*l*78.3%
*-commutative78.3%
Applied egg-rr78.3%
fmm-undef76.7%
*-commutative76.7%
associate-*r*76.7%
*-commutative76.7%
*-commutative76.7%
*-commutative76.7%
associate-*l*76.7%
*-commutative76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in t around inf 65.2%
cancel-sign-sub-inv65.2%
associate-*r*64.2%
metadata-eval64.2%
Simplified64.2%
if -0.76000000000000001 < t < 2.0499999999999999e-150Initial program 85.1%
Simplified81.1%
Taylor expanded in b around inf 59.3%
if 2.0499999999999999e-150 < t < 1.94999999999999996e-4Initial program 100.0%
Simplified88.5%
Taylor expanded in t around 0 77.7%
Taylor expanded in j around 0 66.1%
Final simplification62.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* t a))) (t_2 (* j (* k -27.0))))
(if (<= a -5.4e+50)
(+ (* b c) t_1)
(if (<= a -8.5e-77)
(+ t_2 (* -4.0 (* x i)))
(if (<= a 4.4e-38) (+ (* b c) t_2) (+ t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = j * (k * -27.0);
double tmp;
if (a <= -5.4e+50) {
tmp = (b * c) + t_1;
} else if (a <= -8.5e-77) {
tmp = t_2 + (-4.0 * (x * i));
} else if (a <= 4.4e-38) {
tmp = (b * c) + t_2;
} else {
tmp = t_1 + t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (t * a)
t_2 = j * (k * (-27.0d0))
if (a <= (-5.4d+50)) then
tmp = (b * c) + t_1
else if (a <= (-8.5d-77)) then
tmp = t_2 + ((-4.0d0) * (x * i))
else if (a <= 4.4d-38) then
tmp = (b * c) + t_2
else
tmp = t_1 + t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = j * (k * -27.0);
double tmp;
if (a <= -5.4e+50) {
tmp = (b * c) + t_1;
} else if (a <= -8.5e-77) {
tmp = t_2 + (-4.0 * (x * i));
} else if (a <= 4.4e-38) {
tmp = (b * c) + t_2;
} else {
tmp = t_1 + t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (t * a) t_2 = j * (k * -27.0) tmp = 0 if a <= -5.4e+50: tmp = (b * c) + t_1 elif a <= -8.5e-77: tmp = t_2 + (-4.0 * (x * i)) elif a <= 4.4e-38: tmp = (b * c) + t_2 else: tmp = t_1 + t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (a <= -5.4e+50) tmp = Float64(Float64(b * c) + t_1); elseif (a <= -8.5e-77) tmp = Float64(t_2 + Float64(-4.0 * Float64(x * i))); elseif (a <= 4.4e-38) tmp = Float64(Float64(b * c) + t_2); else tmp = Float64(t_1 + t_2); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (t * a);
t_2 = j * (k * -27.0);
tmp = 0.0;
if (a <= -5.4e+50)
tmp = (b * c) + t_1;
elseif (a <= -8.5e-77)
tmp = t_2 + (-4.0 * (x * i));
elseif (a <= 4.4e-38)
tmp = (b * c) + t_2;
else
tmp = t_1 + t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.4e+50], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[a, -8.5e-77], N[(t$95$2 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.4e-38], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], N[(t$95$1 + t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;a \leq -5.4 \cdot 10^{+50}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;a \leq -8.5 \cdot 10^{-77}:\\
\;\;\;\;t\_2 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{-38}:\\
\;\;\;\;b \cdot c + t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 + t\_2\\
\end{array}
\end{array}
if a < -5.4e50Initial program 81.6%
Simplified79.7%
Taylor expanded in t around inf 74.0%
Taylor expanded in x around 0 70.5%
Taylor expanded in j around 0 70.7%
Taylor expanded in t around 0 76.5%
if -5.4e50 < a < -8.4999999999999998e-77Initial program 90.4%
Simplified90.3%
Taylor expanded in i around inf 81.4%
if -8.4999999999999998e-77 < a < 4.40000000000000015e-38Initial program 90.9%
Simplified88.3%
Taylor expanded in b around inf 53.2%
if 4.40000000000000015e-38 < a Initial program 85.5%
Simplified87.1%
Taylor expanded in a around inf 56.9%
*-commutative56.9%
Simplified56.9%
Final simplification61.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -4e+92)
(* b c)
(if (<= (* b c) 5e-243)
(* k (* j -27.0))
(if (<= (* b c) 5e+118) (* t (* a -4.0)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -4e+92) {
tmp = b * c;
} else if ((b * c) <= 5e-243) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 5e+118) {
tmp = t * (a * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-4d+92)) then
tmp = b * c
else if ((b * c) <= 5d-243) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 5d+118) then
tmp = t * (a * (-4.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -4e+92) {
tmp = b * c;
} else if ((b * c) <= 5e-243) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 5e+118) {
tmp = t * (a * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -4e+92: tmp = b * c elif (b * c) <= 5e-243: tmp = k * (j * -27.0) elif (b * c) <= 5e+118: tmp = t * (a * -4.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -4e+92) tmp = Float64(b * c); elseif (Float64(b * c) <= 5e-243) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 5e+118) tmp = Float64(t * Float64(a * -4.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -4e+92)
tmp = b * c;
elseif ((b * c) <= 5e-243)
tmp = k * (j * -27.0);
elseif ((b * c) <= 5e+118)
tmp = t * (a * -4.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -4e+92], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e-243], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+118], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4 \cdot 10^{+92}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-243}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+118}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -4.0000000000000002e92 or 4.99999999999999972e118 < (*.f64 b c) Initial program 85.6%
Simplified83.2%
associate-*r*86.8%
distribute-rgt-out--85.5%
associate-+l-85.5%
associate-*l*80.7%
fmm-def84.3%
associate-*l*84.3%
*-commutative84.3%
Applied egg-rr84.3%
fmm-undef80.7%
*-commutative80.7%
associate-*r*80.7%
*-commutative80.7%
*-commutative80.7%
*-commutative80.7%
associate-*l*80.7%
*-commutative80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in b around inf 60.2%
if -4.0000000000000002e92 < (*.f64 b c) < 5e-243Initial program 87.7%
Simplified84.3%
Taylor expanded in j around inf 33.0%
associate-*r*33.0%
*-commutative33.0%
Simplified33.0%
if 5e-243 < (*.f64 b c) < 4.99999999999999972e118Initial program 90.2%
Simplified93.3%
associate-*r*91.8%
distribute-rgt-out--90.1%
associate-+l-90.1%
associate-*l*86.9%
fmm-def86.9%
associate-*l*86.9%
*-commutative86.9%
Applied egg-rr86.9%
fmm-undef86.9%
*-commutative86.9%
associate-*r*86.9%
*-commutative86.9%
*-commutative86.9%
*-commutative86.9%
associate-*l*86.9%
*-commutative86.9%
*-commutative86.9%
Simplified86.9%
associate--r-86.9%
associate-*l*90.2%
Applied egg-rr90.2%
Taylor expanded in a around inf 39.3%
*-commutative39.3%
*-commutative39.3%
associate-*r*39.3%
*-commutative39.3%
Simplified39.3%
Final simplification43.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -2.7e+85) (not (<= x 1.4e+59))) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -2.7e+85) || !(x <= 1.4e+59)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-2.7d+85)) .or. (.not. (x <= 1.4d+59))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -2.7e+85) || !(x <= 1.4e+59)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -2.7e+85) or not (x <= 1.4e+59): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -2.7e+85) || !(x <= 1.4e+59)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -2.7e+85) || ~((x <= 1.4e+59)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -2.7e+85], N[Not[LessEqual[x, 1.4e+59]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+85} \lor \neg \left(x \leq 1.4 \cdot 10^{+59}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if x < -2.69999999999999983e85 or 1.3999999999999999e59 < x Initial program 75.2%
Simplified80.3%
Taylor expanded in x around inf 74.6%
if -2.69999999999999983e85 < x < 1.3999999999999999e59Initial program 95.1%
Simplified89.6%
Taylor expanded in x around 0 81.0%
Final simplification78.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -7.6e+96)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t 2.7e+48)
(- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
(* t (+ (* 18.0 (* z (* x y))) (* a -4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -7.6e+96) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 2.7e+48) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-7.6d+96)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= 2.7d+48) then
tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
else
tmp = t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -7.6e+96) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= 2.7e+48) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -7.6e+96: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= 2.7e+48: tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) else: tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -7.6e+96) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= 2.7e+48) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -7.6e+96)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= 2.7e+48)
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
else
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -7.6e+96], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+48], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.6 \cdot 10^{+96}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+48}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\
\end{array}
\end{array}
if t < -7.6000000000000003e96Initial program 87.1%
Simplified91.4%
associate-*r*91.3%
distribute-rgt-out--87.1%
associate-+l-87.1%
associate-*l*74.5%
fmm-def74.5%
associate-*l*74.5%
*-commutative74.5%
Applied egg-rr74.5%
fmm-undef74.5%
*-commutative74.5%
associate-*r*74.5%
*-commutative74.5%
*-commutative74.5%
*-commutative74.5%
associate-*l*74.5%
*-commutative74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in t around inf 74.3%
if -7.6000000000000003e96 < t < 2.70000000000000004e48Initial program 88.5%
Simplified84.3%
Taylor expanded in t around 0 74.2%
if 2.70000000000000004e48 < t Initial program 85.0%
Simplified87.2%
associate-*r*87.2%
distribute-rgt-out--85.0%
associate-+l-85.0%
associate-*l*74.6%
fmm-def76.7%
associate-*l*76.7%
*-commutative76.7%
Applied egg-rr76.7%
fmm-undef74.6%
*-commutative74.6%
associate-*r*74.6%
*-commutative74.6%
*-commutative74.6%
*-commutative74.6%
associate-*l*74.6%
*-commutative74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in t around inf 72.6%
cancel-sign-sub-inv72.6%
associate-*r*72.6%
metadata-eval72.6%
Simplified72.6%
Final simplification73.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ (* b c) (* -4.0 (* t a)))))
(if (<= a -1.12e+51)
t_2
(if (<= a -1.5e-77)
(+ t_1 (* -4.0 (* x i)))
(if (<= a 1.85e+46) (+ (* b c) t_1) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + (-4.0 * (t * a));
double tmp;
if (a <= -1.12e+51) {
tmp = t_2;
} else if (a <= -1.5e-77) {
tmp = t_1 + (-4.0 * (x * i));
} else if (a <= 1.85e+46) {
tmp = (b * c) + t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (b * c) + ((-4.0d0) * (t * a))
if (a <= (-1.12d+51)) then
tmp = t_2
else if (a <= (-1.5d-77)) then
tmp = t_1 + ((-4.0d0) * (x * i))
else if (a <= 1.85d+46) then
tmp = (b * c) + t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + (-4.0 * (t * a));
double tmp;
if (a <= -1.12e+51) {
tmp = t_2;
} else if (a <= -1.5e-77) {
tmp = t_1 + (-4.0 * (x * i));
} else if (a <= 1.85e+46) {
tmp = (b * c) + t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) + (-4.0 * (t * a)) tmp = 0 if a <= -1.12e+51: tmp = t_2 elif a <= -1.5e-77: tmp = t_1 + (-4.0 * (x * i)) elif a <= 1.85e+46: tmp = (b * c) + t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (a <= -1.12e+51) tmp = t_2; elseif (a <= -1.5e-77) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); elseif (a <= 1.85e+46) tmp = Float64(Float64(b * c) + t_1); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (a <= -1.12e+51)
tmp = t_2;
elseif (a <= -1.5e-77)
tmp = t_1 + (-4.0 * (x * i));
elseif (a <= 1.85e+46)
tmp = (b * c) + t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.12e+51], t$95$2, If[LessEqual[a, -1.5e-77], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.85e+46], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;a \leq -1.12 \cdot 10^{+51}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.5 \cdot 10^{-77}:\\
\;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{+46}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.11999999999999992e51 or 1.84999999999999995e46 < a Initial program 83.3%
Simplified82.5%
Taylor expanded in t around inf 78.0%
Taylor expanded in x around 0 68.8%
Taylor expanded in j around 0 60.2%
Taylor expanded in t around 0 65.7%
if -1.11999999999999992e51 < a < -1.50000000000000008e-77Initial program 90.4%
Simplified90.3%
Taylor expanded in i around inf 81.4%
if -1.50000000000000008e-77 < a < 1.84999999999999995e46Initial program 90.5%
Simplified88.9%
Taylor expanded in b around inf 52.2%
Final simplification60.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))))
(if (<= a -3e+52)
t_1
(if (<= a -1.6e-186)
(- (* b c) (* 4.0 (* x i)))
(if (<= a 2.5e+46) (+ (* b c) (* j (* k -27.0))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (a <= -3e+52) {
tmp = t_1;
} else if (a <= -1.6e-186) {
tmp = (b * c) - (4.0 * (x * i));
} else if (a <= 2.5e+46) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + ((-4.0d0) * (t * a))
if (a <= (-3d+52)) then
tmp = t_1
else if (a <= (-1.6d-186)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (a <= 2.5d+46) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (a <= -3e+52) {
tmp = t_1;
} else if (a <= -1.6e-186) {
tmp = (b * c) - (4.0 * (x * i));
} else if (a <= 2.5e+46) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) tmp = 0 if a <= -3e+52: tmp = t_1 elif a <= -1.6e-186: tmp = (b * c) - (4.0 * (x * i)) elif a <= 2.5e+46: tmp = (b * c) + (j * (k * -27.0)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (a <= -3e+52) tmp = t_1; elseif (a <= -1.6e-186) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (a <= 2.5e+46) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (a <= -3e+52)
tmp = t_1;
elseif (a <= -1.6e-186)
tmp = (b * c) - (4.0 * (x * i));
elseif (a <= 2.5e+46)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3e+52], t$95$1, If[LessEqual[a, -1.6e-186], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.5e+46], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;a \leq -3 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.6 \cdot 10^{-186}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+46}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3e52 or 2.5000000000000001e46 < a Initial program 83.2%
Simplified82.3%
Taylor expanded in t around inf 77.8%
Taylor expanded in x around 0 68.5%
Taylor expanded in j around 0 59.8%
Taylor expanded in t around 0 65.4%
if -3e52 < a < -1.6e-186Initial program 90.2%
Simplified85.3%
Taylor expanded in t around 0 75.4%
Taylor expanded in j around 0 58.5%
if -1.6e-186 < a < 2.5000000000000001e46Initial program 90.6%
Simplified89.7%
Taylor expanded in b around inf 54.1%
Final simplification59.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))))
(if (<= a -5.1e+37)
t_1
(if (<= a -1.02e-5)
(* x (* i -4.0))
(if (<= a 5.2e+46) (+ (* b c) (* j (* k -27.0))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (a <= -5.1e+37) {
tmp = t_1;
} else if (a <= -1.02e-5) {
tmp = x * (i * -4.0);
} else if (a <= 5.2e+46) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + ((-4.0d0) * (t * a))
if (a <= (-5.1d+37)) then
tmp = t_1
else if (a <= (-1.02d-5)) then
tmp = x * (i * (-4.0d0))
else if (a <= 5.2d+46) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (a <= -5.1e+37) {
tmp = t_1;
} else if (a <= -1.02e-5) {
tmp = x * (i * -4.0);
} else if (a <= 5.2e+46) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) tmp = 0 if a <= -5.1e+37: tmp = t_1 elif a <= -1.02e-5: tmp = x * (i * -4.0) elif a <= 5.2e+46: tmp = (b * c) + (j * (k * -27.0)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (a <= -5.1e+37) tmp = t_1; elseif (a <= -1.02e-5) tmp = Float64(x * Float64(i * -4.0)); elseif (a <= 5.2e+46) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (a <= -5.1e+37)
tmp = t_1;
elseif (a <= -1.02e-5)
tmp = x * (i * -4.0);
elseif (a <= 5.2e+46)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.1e+37], t$95$1, If[LessEqual[a, -1.02e-5], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.2e+46], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;a \leq -5.1 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.02 \cdot 10^{-5}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{+46}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.10000000000000032e37 or 5.20000000000000027e46 < a Initial program 83.7%
Simplified82.8%
Taylor expanded in t around inf 78.4%
Taylor expanded in x around 0 69.4%
Taylor expanded in j around 0 59.1%
Taylor expanded in t around 0 64.5%
if -5.10000000000000032e37 < a < -1.0200000000000001e-5Initial program 81.8%
Simplified81.8%
associate-*r*81.8%
distribute-rgt-out--81.8%
associate-+l-81.8%
associate-*l*72.7%
fmm-def72.7%
associate-*l*72.7%
*-commutative72.7%
Applied egg-rr72.7%
fmm-undef72.7%
*-commutative72.7%
associate-*r*72.7%
*-commutative72.7%
*-commutative72.7%
*-commutative72.7%
associate-*l*72.7%
*-commutative72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in i around inf 90.9%
associate-*r*90.9%
metadata-eval90.9%
distribute-lft-neg-in90.9%
distribute-lft-neg-in90.9%
*-commutative90.9%
distribute-rgt-neg-in90.9%
distribute-lft-neg-in90.9%
metadata-eval90.9%
Simplified90.9%
if -1.0200000000000001e-5 < a < 5.20000000000000027e46Initial program 91.0%
Simplified89.5%
Taylor expanded in b around inf 52.2%
Final simplification58.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j -27.0))))
(if (<= k -6.2e+22)
t_1
(if (<= k -5.1e-140)
(* (* (* (* x 18.0) y) z) t)
(if (<= k 8.2e+248) (+ (* b c) (* -4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double tmp;
if (k <= -6.2e+22) {
tmp = t_1;
} else if (k <= -5.1e-140) {
tmp = (((x * 18.0) * y) * z) * t;
} else if (k <= 8.2e+248) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
if (k <= (-6.2d+22)) then
tmp = t_1
else if (k <= (-5.1d-140)) then
tmp = (((x * 18.0d0) * y) * z) * t
else if (k <= 8.2d+248) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double tmp;
if (k <= -6.2e+22) {
tmp = t_1;
} else if (k <= -5.1e-140) {
tmp = (((x * 18.0) * y) * z) * t;
} else if (k <= 8.2e+248) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if k <= -6.2e+22: tmp = t_1 elif k <= -5.1e-140: tmp = (((x * 18.0) * y) * z) * t elif k <= 8.2e+248: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (k <= -6.2e+22) tmp = t_1; elseif (k <= -5.1e-140) tmp = Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t); elseif (k <= 8.2e+248) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if (k <= -6.2e+22)
tmp = t_1;
elseif (k <= -5.1e-140)
tmp = (((x * 18.0) * y) * z) * t;
elseif (k <= 8.2e+248)
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -6.2e+22], t$95$1, If[LessEqual[k, -5.1e-140], N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[k, 8.2e+248], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;k \leq -6.2 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq -5.1 \cdot 10^{-140}:\\
\;\;\;\;\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\\
\mathbf{elif}\;k \leq 8.2 \cdot 10^{+248}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if k < -6.2000000000000004e22 or 8.19999999999999995e248 < k Initial program 85.4%
Simplified84.2%
Taylor expanded in j around inf 53.1%
associate-*r*53.1%
*-commutative53.1%
Simplified53.1%
if -6.2000000000000004e22 < k < -5.1000000000000004e-140Initial program 84.8%
Simplified88.4%
associate-*r*84.8%
distribute-rgt-out--84.8%
associate-+l-84.8%
associate-*l*77.0%
fmm-def77.0%
associate-*l*77.0%
*-commutative77.0%
Applied egg-rr77.0%
fmm-undef77.0%
*-commutative77.0%
associate-*r*77.0%
*-commutative77.0%
*-commutative77.0%
*-commutative77.0%
associate-*l*77.0%
*-commutative77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in t around inf 63.3%
Taylor expanded in x around inf 43.8%
associate-*r*43.8%
associate-*r*39.8%
Simplified39.8%
if -5.1000000000000004e-140 < k < 8.19999999999999995e248Initial program 89.1%
Simplified87.9%
Taylor expanded in t around inf 83.7%
Taylor expanded in x around 0 55.1%
Taylor expanded in j around 0 48.3%
Taylor expanded in t around 0 53.2%
Final simplification51.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -3.5e+92) (not (<= (* b c) 4e+194))) (* b c) (* k (* j -27.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -3.5e+92) || !((b * c) <= 4e+194)) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-3.5d+92)) .or. (.not. ((b * c) <= 4d+194))) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -3.5e+92) || !((b * c) <= 4e+194)) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -3.5e+92) or not ((b * c) <= 4e+194): tmp = b * c else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -3.5e+92) || !(Float64(b * c) <= 4e+194)) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -3.5e+92) || ~(((b * c) <= 4e+194)))
tmp = b * c;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -3.5e+92], N[Not[LessEqual[N[(b * c), $MachinePrecision], 4e+194]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -3.5 \cdot 10^{+92} \lor \neg \left(b \cdot c \leq 4 \cdot 10^{+194}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -3.49999999999999986e92 or 3.99999999999999978e194 < (*.f64 b c) Initial program 83.1%
Simplified80.3%
associate-*r*84.5%
distribute-rgt-out--83.1%
associate-+l-83.1%
associate-*l*77.5%
fmm-def81.7%
associate-*l*81.7%
*-commutative81.7%
Applied egg-rr81.7%
fmm-undef77.5%
*-commutative77.5%
associate-*r*77.5%
*-commutative77.5%
*-commutative77.5%
*-commutative77.5%
associate-*l*77.5%
*-commutative77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in b around inf 66.0%
if -3.49999999999999986e92 < (*.f64 b c) < 3.99999999999999978e194Initial program 89.3%
Simplified88.3%
Taylor expanded in j around inf 29.4%
associate-*r*29.4%
*-commutative29.4%
Simplified29.4%
Final simplification39.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.9e+92) (not (<= (* b c) 4.6e+194))) (* b c) (* (* j k) -27.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.9e+92) || !((b * c) <= 4.6e+194)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.9d+92)) .or. (.not. ((b * c) <= 4.6d+194))) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.9e+92) || !((b * c) <= 4.6e+194)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.9e+92) or not ((b * c) <= 4.6e+194): tmp = b * c else: tmp = (j * k) * -27.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.9e+92) || !(Float64(b * c) <= 4.6e+194)) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.9e+92) || ~(((b * c) <= 4.6e+194)))
tmp = b * c;
else
tmp = (j * k) * -27.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.9e+92], N[Not[LessEqual[N[(b * c), $MachinePrecision], 4.6e+194]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.9 \cdot 10^{+92} \lor \neg \left(b \cdot c \leq 4.6 \cdot 10^{+194}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -1.9e92 or 4.6000000000000001e194 < (*.f64 b c) Initial program 83.1%
Simplified80.3%
associate-*r*84.5%
distribute-rgt-out--83.1%
associate-+l-83.1%
associate-*l*77.5%
fmm-def81.7%
associate-*l*81.7%
*-commutative81.7%
Applied egg-rr81.7%
fmm-undef77.5%
*-commutative77.5%
associate-*r*77.5%
*-commutative77.5%
*-commutative77.5%
*-commutative77.5%
associate-*l*77.5%
*-commutative77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in b around inf 66.0%
if -1.9e92 < (*.f64 b c) < 4.6000000000000001e194Initial program 89.3%
Simplified88.3%
Taylor expanded in j around inf 29.4%
Final simplification39.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 87.6%
Simplified86.1%
associate-*r*88.4%
distribute-rgt-out--87.2%
associate-+l-87.2%
associate-*l*83.6%
fmm-def84.7%
associate-*l*84.4%
*-commutative84.4%
Applied egg-rr84.4%
fmm-undef83.2%
*-commutative83.2%
associate-*r*83.2%
*-commutative83.2%
*-commutative83.2%
*-commutative83.2%
associate-*l*83.2%
*-commutative83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in b around inf 23.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
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 j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024180
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))