
(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 19 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
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(-
(+ (* b c) (* t (- (* z (* 18.0 (* x y))) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* x (- (* 18.0 (* t (* y z))) (* 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 * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (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 tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (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 * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= math.inf: tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = x * ((18.0 * (t * (y * z))) - (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 (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(z * Float64(18.0 * Float64(x * y))) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - 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 * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Inf)
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = x * ((18.0 * (t * (y * z))) - (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[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $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], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(z * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 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.9%
Simplified95.9%
pow195.9%
associate-*r*97.6%
*-commutative97.6%
*-commutative97.6%
Applied egg-rr97.6%
unpow197.6%
*-commutative97.6%
*-commutative97.6%
associate-*r*97.5%
Simplified97.5%
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%
Simplified20.0%
Taylor expanded in x around inf 70.0%
Final simplification95.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
(let* ((t_1 (+ (* j (* k -27.0)) (* a (* t -4.0))))
(t_2 (* (* j 27.0) k))
(t_3 (- (* b c) (* x (* 4.0 i)))))
(if (<= t_2 -4e+188)
t_1
(if (<= t_2 2e-146)
t_3
(if (<= t_2 1e-95)
t_1
(if (<= t_2 1e-13) t_3 (* k (+ (* 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 t_1 = (j * (k * -27.0)) + (a * (t * -4.0));
double t_2 = (j * 27.0) * k;
double t_3 = (b * c) - (x * (4.0 * i));
double tmp;
if (t_2 <= -4e+188) {
tmp = t_1;
} else if (t_2 <= 2e-146) {
tmp = t_3;
} else if (t_2 <= 1e-95) {
tmp = t_1;
} else if (t_2 <= 1e-13) {
tmp = t_3;
} else {
tmp = k * ((b * (c / 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
t_2 = (j * 27.0d0) * k
t_3 = (b * c) - (x * (4.0d0 * i))
if (t_2 <= (-4d+188)) then
tmp = t_1
else if (t_2 <= 2d-146) then
tmp = t_3
else if (t_2 <= 1d-95) then
tmp = t_1
else if (t_2 <= 1d-13) then
tmp = t_3
else
tmp = k * ((b * (c / 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 t_1 = (j * (k * -27.0)) + (a * (t * -4.0));
double t_2 = (j * 27.0) * k;
double t_3 = (b * c) - (x * (4.0 * i));
double tmp;
if (t_2 <= -4e+188) {
tmp = t_1;
} else if (t_2 <= 2e-146) {
tmp = t_3;
} else if (t_2 <= 1e-95) {
tmp = t_1;
} else if (t_2 <= 1e-13) {
tmp = t_3;
} else {
tmp = k * ((b * (c / 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): t_1 = (j * (k * -27.0)) + (a * (t * -4.0)) t_2 = (j * 27.0) * k t_3 = (b * c) - (x * (4.0 * i)) tmp = 0 if t_2 <= -4e+188: tmp = t_1 elif t_2 <= 2e-146: tmp = t_3 elif t_2 <= 1e-95: tmp = t_1 elif t_2 <= 1e-13: tmp = t_3 else: tmp = k * ((b * (c / 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) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0))) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))) tmp = 0.0 if (t_2 <= -4e+188) tmp = t_1; elseif (t_2 <= 2e-146) tmp = t_3; elseif (t_2 <= 1e-95) tmp = t_1; elseif (t_2 <= 1e-13) tmp = t_3; else tmp = Float64(k * Float64(Float64(b * Float64(c / 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)
t_1 = (j * (k * -27.0)) + (a * (t * -4.0));
t_2 = (j * 27.0) * k;
t_3 = (b * c) - (x * (4.0 * i));
tmp = 0.0;
if (t_2 <= -4e+188)
tmp = t_1;
elseif (t_2 <= 2e-146)
tmp = t_3;
elseif (t_2 <= 1e-95)
tmp = t_1;
elseif (t_2 <= 1e-13)
tmp = t_3;
else
tmp = k * ((b * (c / 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_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+188], t$95$1, If[LessEqual[t$95$2, 2e-146], t$95$3, If[LessEqual[t$95$2, 1e-95], t$95$1, If[LessEqual[t$95$2, 1e-13], t$95$3, N[(k * N[(N[(b * N[(c / k), $MachinePrecision]), $MachinePrecision] + N[(j * -27.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}
t_1 := j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-146}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 10^{-95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-13}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(b \cdot \frac{c}{k} + j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.0000000000000001e188 or 2.00000000000000005e-146 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999989e-96Initial program 87.2%
Simplified87.5%
Taylor expanded in a around inf 79.7%
metadata-eval79.7%
distribute-lft-neg-in79.7%
*-commutative79.7%
associate-*l*79.7%
*-commutative79.7%
distribute-rgt-neg-in79.7%
distribute-lft-neg-in79.7%
metadata-eval79.7%
Simplified79.7%
if -4.0000000000000001e188 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000005e-146 or 9.99999999999999989e-96 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e-13Initial program 92.3%
Simplified93.6%
Taylor expanded in t around 0 62.5%
Taylor expanded in i around inf 59.4%
associate-*r*59.4%
*-commutative59.4%
Simplified59.4%
if 1e-13 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 87.0%
Simplified82.2%
Taylor expanded in t around 0 66.0%
Taylor expanded in i around 0 59.7%
associate-*r*61.4%
*-commutative61.4%
associate-*r*59.7%
Simplified59.7%
Taylor expanded in k around inf 61.3%
cancel-sign-sub-inv61.3%
metadata-eval61.3%
associate-/l*61.3%
*-commutative61.3%
Simplified61.3%
Final simplification63.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 (* j (* k -27.0))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -4e+188)
(+ t_1 (* a (* t -4.0)))
(if (<= t_2 2e-174)
(- (* b c) (* x (* 4.0 i)))
(if (<= t_2 5e+101)
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
(+ t_1 (* 18.0 (* z (* y (* x t))))))))))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 = (j * 27.0) * k;
double tmp;
if (t_2 <= -4e+188) {
tmp = t_1 + (a * (t * -4.0));
} else if (t_2 <= 2e-174) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t_2 <= 5e+101) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else {
tmp = t_1 + (18.0 * (z * (y * (x * t))));
}
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 = (j * 27.0d0) * k
if (t_2 <= (-4d+188)) then
tmp = t_1 + (a * (t * (-4.0d0)))
else if (t_2 <= 2d-174) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (t_2 <= 5d+101) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else
tmp = t_1 + (18.0d0 * (z * (y * (x * t))))
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 = (j * 27.0) * k;
double tmp;
if (t_2 <= -4e+188) {
tmp = t_1 + (a * (t * -4.0));
} else if (t_2 <= 2e-174) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t_2 <= 5e+101) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else {
tmp = t_1 + (18.0 * (z * (y * (x * t))));
}
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 = (j * 27.0) * k tmp = 0 if t_2 <= -4e+188: tmp = t_1 + (a * (t * -4.0)) elif t_2 <= 2e-174: tmp = (b * c) - (x * (4.0 * i)) elif t_2 <= 5e+101: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) else: tmp = t_1 + (18.0 * (z * (y * (x * t)))) 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(j * 27.0) * k) tmp = 0.0 if (t_2 <= -4e+188) tmp = Float64(t_1 + Float64(a * Float64(t * -4.0))); elseif (t_2 <= 2e-174) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (t_2 <= 5e+101) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); else tmp = Float64(t_1 + Float64(18.0 * Float64(z * Float64(y * Float64(x * t))))); 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 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -4e+188)
tmp = t_1 + (a * (t * -4.0));
elseif (t_2 <= 2e-174)
tmp = (b * c) - (x * (4.0 * i));
elseif (t_2 <= 5e+101)
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
else
tmp = t_1 + (18.0 * (z * (y * (x * t))));
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[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+188], N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e-174], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+101], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $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(k \cdot -27\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+188}:\\
\;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-174}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+101}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.0000000000000001e188Initial program 87.9%
Simplified91.1%
Taylor expanded in a around inf 78.8%
metadata-eval78.8%
distribute-lft-neg-in78.8%
*-commutative78.8%
associate-*l*78.8%
*-commutative78.8%
distribute-rgt-neg-in78.8%
distribute-lft-neg-in78.8%
metadata-eval78.8%
Simplified78.8%
if -4.0000000000000001e188 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e-174Initial program 93.3%
Simplified93.3%
Taylor expanded in t around 0 62.4%
Taylor expanded in i around inf 58.8%
associate-*r*58.8%
*-commutative58.8%
Simplified58.8%
if 2e-174 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999989e101Initial program 90.1%
pow190.1%
associate-*r*90.0%
*-commutative90.0%
associate-*r*90.1%
*-commutative90.1%
*-commutative90.1%
Applied egg-rr90.1%
unpow190.1%
associate-*r*92.6%
*-commutative92.6%
*-commutative92.6%
associate-*r*92.6%
Simplified92.6%
Taylor expanded in x around inf 54.7%
cancel-sign-sub-inv54.7%
associate-*r*59.6%
metadata-eval59.6%
Simplified59.6%
if 4.99999999999999989e101 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 83.4%
Simplified77.2%
Taylor expanded in y around inf 64.9%
pow164.9%
*-commutative64.9%
Applied egg-rr64.9%
unpow164.9%
associate-*r*66.8%
*-commutative66.8%
associate-*r*75.1%
Simplified75.1%
Final simplification64.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 (* 18.0 (* x (* y z))))
(t_2
(- (- (- (* b c) (* 4.0 (* t a))) (* (* x 4.0) i)) (* (* j 27.0) k)))
(t_3 (+ (* t (+ t_1 (* a -4.0))) (* j (* k -27.0)))))
(if (<= t -4.1e+158)
t_3
(if (<= t -1.3e+74)
t_2
(if (<= t -1.45e-31)
(- (* t (- t_1 (* a 4.0))) (* 27.0 (* j k)))
(if (<= t 5.2e+163) t_2 t_3))))))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 = 18.0 * (x * (y * z));
double t_2 = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double t_3 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
double tmp;
if (t <= -4.1e+158) {
tmp = t_3;
} else if (t <= -1.3e+74) {
tmp = t_2;
} else if (t <= -1.45e-31) {
tmp = (t * (t_1 - (a * 4.0))) - (27.0 * (j * k));
} else if (t <= 5.2e+163) {
tmp = t_2;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
t_2 = (((b * c) - (4.0d0 * (t * a))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
t_3 = (t * (t_1 + (a * (-4.0d0)))) + (j * (k * (-27.0d0)))
if (t <= (-4.1d+158)) then
tmp = t_3
else if (t <= (-1.3d+74)) then
tmp = t_2
else if (t <= (-1.45d-31)) then
tmp = (t * (t_1 - (a * 4.0d0))) - (27.0d0 * (j * k))
else if (t <= 5.2d+163) then
tmp = t_2
else
tmp = t_3
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 = 18.0 * (x * (y * z));
double t_2 = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double t_3 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
double tmp;
if (t <= -4.1e+158) {
tmp = t_3;
} else if (t <= -1.3e+74) {
tmp = t_2;
} else if (t <= -1.45e-31) {
tmp = (t * (t_1 - (a * 4.0))) - (27.0 * (j * k));
} else if (t <= 5.2e+163) {
tmp = t_2;
} else {
tmp = t_3;
}
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 = 18.0 * (x * (y * z)) t_2 = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k) t_3 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0)) tmp = 0 if t <= -4.1e+158: tmp = t_3 elif t <= -1.3e+74: tmp = t_2 elif t <= -1.45e-31: tmp = (t * (t_1 - (a * 4.0))) - (27.0 * (j * k)) elif t <= 5.2e+163: tmp = t_2 else: tmp = t_3 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(18.0 * Float64(x * Float64(y * z))) t_2 = Float64(Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) t_3 = Float64(Float64(t * Float64(t_1 + Float64(a * -4.0))) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (t <= -4.1e+158) tmp = t_3; elseif (t <= -1.3e+74) tmp = t_2; elseif (t <= -1.45e-31) tmp = Float64(Float64(t * Float64(t_1 - Float64(a * 4.0))) - Float64(27.0 * Float64(j * k))); elseif (t <= 5.2e+163) tmp = t_2; else tmp = t_3; 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 = 18.0 * (x * (y * z));
t_2 = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
t_3 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
tmp = 0.0;
if (t <= -4.1e+158)
tmp = t_3;
elseif (t <= -1.3e+74)
tmp = t_2;
elseif (t <= -1.45e-31)
tmp = (t * (t_1 - (a * 4.0))) - (27.0 * (j * k));
elseif (t <= 5.2e+163)
tmp = t_2;
else
tmp = t_3;
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[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t * N[(t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.1e+158], t$95$3, If[LessEqual[t, -1.3e+74], t$95$2, If[LessEqual[t, -1.45e-31], N[(N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+163], t$95$2, t$95$3]]]]]]]
\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 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := \left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
t_3 := t \cdot \left(t\_1 + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -4.1 \cdot 10^{+158}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-31}:\\
\;\;\;\;t \cdot \left(t\_1 - a \cdot 4\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+163}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -4.10000000000000004e158 or 5.2000000000000003e163 < t Initial program 81.8%
Simplified87.4%
Taylor expanded in t around inf 91.3%
if -4.10000000000000004e158 < t < -1.3e74 or -1.45e-31 < t < 5.2000000000000003e163Initial program 93.1%
Taylor expanded in x around 0 91.4%
if -1.3e74 < t < -1.45e-31Initial program 89.8%
Simplified89.9%
Taylor expanded in i around 0 87.9%
Taylor expanded in b around 0 84.8%
Final simplification90.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 (* x i))))
(if (<= c -6.6e-127)
(* b c)
(if (<= c -7.8e-221)
(* 18.0 (* z (* y (* x t))))
(if (<= c -7.2e-282)
t_1
(if (<= c 6.2e-197)
(* k (* j -27.0))
(if (<= c 2.2e-99)
(* (* 18.0 t) (* z (* x y)))
(if (<= c 1.3e+15)
t_1
(if (<= c 7.5e+136) (* j (* k -27.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 t_1 = -4.0 * (x * i);
double tmp;
if (c <= -6.6e-127) {
tmp = b * c;
} else if (c <= -7.8e-221) {
tmp = 18.0 * (z * (y * (x * t)));
} else if (c <= -7.2e-282) {
tmp = t_1;
} else if (c <= 6.2e-197) {
tmp = k * (j * -27.0);
} else if (c <= 2.2e-99) {
tmp = (18.0 * t) * (z * (x * y));
} else if (c <= 1.3e+15) {
tmp = t_1;
} else if (c <= 7.5e+136) {
tmp = j * (k * -27.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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
if (c <= (-6.6d-127)) then
tmp = b * c
else if (c <= (-7.8d-221)) then
tmp = 18.0d0 * (z * (y * (x * t)))
else if (c <= (-7.2d-282)) then
tmp = t_1
else if (c <= 6.2d-197) then
tmp = k * (j * (-27.0d0))
else if (c <= 2.2d-99) then
tmp = (18.0d0 * t) * (z * (x * y))
else if (c <= 1.3d+15) then
tmp = t_1
else if (c <= 7.5d+136) then
tmp = j * (k * (-27.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 t_1 = -4.0 * (x * i);
double tmp;
if (c <= -6.6e-127) {
tmp = b * c;
} else if (c <= -7.8e-221) {
tmp = 18.0 * (z * (y * (x * t)));
} else if (c <= -7.2e-282) {
tmp = t_1;
} else if (c <= 6.2e-197) {
tmp = k * (j * -27.0);
} else if (c <= 2.2e-99) {
tmp = (18.0 * t) * (z * (x * y));
} else if (c <= 1.3e+15) {
tmp = t_1;
} else if (c <= 7.5e+136) {
tmp = j * (k * -27.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): t_1 = -4.0 * (x * i) tmp = 0 if c <= -6.6e-127: tmp = b * c elif c <= -7.8e-221: tmp = 18.0 * (z * (y * (x * t))) elif c <= -7.2e-282: tmp = t_1 elif c <= 6.2e-197: tmp = k * (j * -27.0) elif c <= 2.2e-99: tmp = (18.0 * t) * (z * (x * y)) elif c <= 1.3e+15: tmp = t_1 elif c <= 7.5e+136: tmp = j * (k * -27.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) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (c <= -6.6e-127) tmp = Float64(b * c); elseif (c <= -7.8e-221) tmp = Float64(18.0 * Float64(z * Float64(y * Float64(x * t)))); elseif (c <= -7.2e-282) tmp = t_1; elseif (c <= 6.2e-197) tmp = Float64(k * Float64(j * -27.0)); elseif (c <= 2.2e-99) tmp = Float64(Float64(18.0 * t) * Float64(z * Float64(x * y))); elseif (c <= 1.3e+15) tmp = t_1; elseif (c <= 7.5e+136) tmp = Float64(j * Float64(k * -27.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)
t_1 = -4.0 * (x * i);
tmp = 0.0;
if (c <= -6.6e-127)
tmp = b * c;
elseif (c <= -7.8e-221)
tmp = 18.0 * (z * (y * (x * t)));
elseif (c <= -7.2e-282)
tmp = t_1;
elseif (c <= 6.2e-197)
tmp = k * (j * -27.0);
elseif (c <= 2.2e-99)
tmp = (18.0 * t) * (z * (x * y));
elseif (c <= 1.3e+15)
tmp = t_1;
elseif (c <= 7.5e+136)
tmp = j * (k * -27.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_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.6e-127], N[(b * c), $MachinePrecision], If[LessEqual[c, -7.8e-221], N[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -7.2e-282], t$95$1, If[LessEqual[c, 6.2e-197], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.2e-99], N[(N[(18.0 * t), $MachinePrecision] * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.3e+15], t$95$1, If[LessEqual[c, 7.5e+136], N[(j * N[(k * -27.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}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;c \leq -6.6 \cdot 10^{-127}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq -7.8 \cdot 10^{-221}:\\
\;\;\;\;18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{elif}\;c \leq -7.2 \cdot 10^{-282}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 6.2 \cdot 10^{-197}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;c \leq 2.2 \cdot 10^{-99}:\\
\;\;\;\;\left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\
\mathbf{elif}\;c \leq 1.3 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 7.5 \cdot 10^{+136}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -6.59999999999999961e-127 or 7.5000000000000002e136 < c Initial program 92.6%
Simplified89.3%
pow189.3%
associate-*r*91.8%
*-commutative91.8%
*-commutative91.8%
Applied egg-rr91.8%
unpow191.8%
*-commutative91.8%
*-commutative91.8%
associate-*r*91.8%
Simplified91.8%
Taylor expanded in b around inf 37.1%
if -6.59999999999999961e-127 < c < -7.7999999999999997e-221Initial program 82.7%
pow182.7%
associate-*r*78.7%
*-commutative78.7%
associate-*r*82.7%
*-commutative82.7%
*-commutative82.7%
Applied egg-rr82.7%
unpow182.7%
associate-*r*79.0%
*-commutative79.0%
*-commutative79.0%
associate-*r*79.0%
Simplified79.0%
Taylor expanded in x around inf 45.8%
cancel-sign-sub-inv45.8%
associate-*r*50.0%
metadata-eval50.0%
Simplified50.0%
Taylor expanded in t around inf 36.3%
associate-*r*36.5%
associate-*r*40.3%
Simplified40.3%
if -7.7999999999999997e-221 < c < -7.1999999999999995e-282 or 2.20000000000000004e-99 < c < 1.3e15Initial program 89.1%
Simplified94.7%
pow194.7%
associate-*r*92.0%
*-commutative92.0%
*-commutative92.0%
Applied egg-rr92.0%
unpow192.0%
*-commutative92.0%
*-commutative92.0%
associate-*r*92.0%
Simplified92.0%
Taylor expanded in i around inf 31.9%
*-commutative31.9%
Simplified31.9%
if -7.1999999999999995e-282 < c < 6.20000000000000057e-197Initial program 96.1%
Simplified96.2%
Taylor expanded in j around inf 37.2%
associate-*r*37.2%
Simplified37.2%
if 6.20000000000000057e-197 < c < 2.20000000000000004e-99Initial program 86.9%
pow186.9%
associate-*r*86.9%
*-commutative86.9%
associate-*r*86.9%
*-commutative86.9%
*-commutative86.9%
Applied egg-rr86.9%
unpow186.9%
associate-*r*86.9%
*-commutative86.9%
*-commutative86.9%
associate-*r*86.9%
Simplified86.9%
Taylor expanded in x around inf 58.2%
cancel-sign-sub-inv58.2%
associate-*r*58.2%
metadata-eval58.2%
Simplified58.2%
Taylor expanded in t around inf 48.6%
associate-*r*48.6%
associate-*r*48.6%
Simplified48.6%
if 1.3e15 < c < 7.5000000000000002e136Initial program 85.3%
Simplified85.4%
pow185.4%
associate-*r*89.0%
*-commutative89.0%
*-commutative89.0%
Applied egg-rr89.0%
unpow189.0%
*-commutative89.0%
*-commutative89.0%
associate-*r*89.0%
Simplified89.0%
Taylor expanded in j around inf 27.5%
*-commutative27.5%
associate-*r*27.5%
Simplified27.5%
Final simplification36.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 (* 18.0 (* z (* y (* x t))))) (t_2 (* -4.0 (* x i))))
(if (<= c -8.2e-127)
(* b c)
(if (<= c -6.2e-221)
t_1
(if (<= c -4.5e-283)
t_2
(if (<= c 3.6e-197)
(* k (* j -27.0))
(if (<= c 2.7e-99)
t_1
(if (<= c 2.25e+15)
t_2
(if (<= c 8e+136) (* j (* k -27.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 t_1 = 18.0 * (z * (y * (x * t)));
double t_2 = -4.0 * (x * i);
double tmp;
if (c <= -8.2e-127) {
tmp = b * c;
} else if (c <= -6.2e-221) {
tmp = t_1;
} else if (c <= -4.5e-283) {
tmp = t_2;
} else if (c <= 3.6e-197) {
tmp = k * (j * -27.0);
} else if (c <= 2.7e-99) {
tmp = t_1;
} else if (c <= 2.25e+15) {
tmp = t_2;
} else if (c <= 8e+136) {
tmp = j * (k * -27.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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 18.0d0 * (z * (y * (x * t)))
t_2 = (-4.0d0) * (x * i)
if (c <= (-8.2d-127)) then
tmp = b * c
else if (c <= (-6.2d-221)) then
tmp = t_1
else if (c <= (-4.5d-283)) then
tmp = t_2
else if (c <= 3.6d-197) then
tmp = k * (j * (-27.0d0))
else if (c <= 2.7d-99) then
tmp = t_1
else if (c <= 2.25d+15) then
tmp = t_2
else if (c <= 8d+136) then
tmp = j * (k * (-27.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 t_1 = 18.0 * (z * (y * (x * t)));
double t_2 = -4.0 * (x * i);
double tmp;
if (c <= -8.2e-127) {
tmp = b * c;
} else if (c <= -6.2e-221) {
tmp = t_1;
} else if (c <= -4.5e-283) {
tmp = t_2;
} else if (c <= 3.6e-197) {
tmp = k * (j * -27.0);
} else if (c <= 2.7e-99) {
tmp = t_1;
} else if (c <= 2.25e+15) {
tmp = t_2;
} else if (c <= 8e+136) {
tmp = j * (k * -27.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): t_1 = 18.0 * (z * (y * (x * t))) t_2 = -4.0 * (x * i) tmp = 0 if c <= -8.2e-127: tmp = b * c elif c <= -6.2e-221: tmp = t_1 elif c <= -4.5e-283: tmp = t_2 elif c <= 3.6e-197: tmp = k * (j * -27.0) elif c <= 2.7e-99: tmp = t_1 elif c <= 2.25e+15: tmp = t_2 elif c <= 8e+136: tmp = j * (k * -27.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) t_1 = Float64(18.0 * Float64(z * Float64(y * Float64(x * t)))) t_2 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (c <= -8.2e-127) tmp = Float64(b * c); elseif (c <= -6.2e-221) tmp = t_1; elseif (c <= -4.5e-283) tmp = t_2; elseif (c <= 3.6e-197) tmp = Float64(k * Float64(j * -27.0)); elseif (c <= 2.7e-99) tmp = t_1; elseif (c <= 2.25e+15) tmp = t_2; elseif (c <= 8e+136) tmp = Float64(j * Float64(k * -27.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)
t_1 = 18.0 * (z * (y * (x * t)));
t_2 = -4.0 * (x * i);
tmp = 0.0;
if (c <= -8.2e-127)
tmp = b * c;
elseif (c <= -6.2e-221)
tmp = t_1;
elseif (c <= -4.5e-283)
tmp = t_2;
elseif (c <= 3.6e-197)
tmp = k * (j * -27.0);
elseif (c <= 2.7e-99)
tmp = t_1;
elseif (c <= 2.25e+15)
tmp = t_2;
elseif (c <= 8e+136)
tmp = j * (k * -27.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_] := Block[{t$95$1 = N[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.2e-127], N[(b * c), $MachinePrecision], If[LessEqual[c, -6.2e-221], t$95$1, If[LessEqual[c, -4.5e-283], t$95$2, If[LessEqual[c, 3.6e-197], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.7e-99], t$95$1, If[LessEqual[c, 2.25e+15], t$95$2, If[LessEqual[c, 8e+136], N[(j * N[(k * -27.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}
t_1 := 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\
t_2 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;c \leq -8.2 \cdot 10^{-127}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq -6.2 \cdot 10^{-221}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -4.5 \cdot 10^{-283}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 3.6 \cdot 10^{-197}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;c \leq 2.7 \cdot 10^{-99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2.25 \cdot 10^{+15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 8 \cdot 10^{+136}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -8.199999999999999e-127 or 8.00000000000000047e136 < c Initial program 92.6%
Simplified89.3%
pow189.3%
associate-*r*91.8%
*-commutative91.8%
*-commutative91.8%
Applied egg-rr91.8%
unpow191.8%
*-commutative91.8%
*-commutative91.8%
associate-*r*91.8%
Simplified91.8%
Taylor expanded in b around inf 37.1%
if -8.199999999999999e-127 < c < -6.1999999999999998e-221 or 3.5999999999999998e-197 < c < 2.7e-99Initial program 84.8%
pow184.8%
associate-*r*82.8%
*-commutative82.8%
associate-*r*84.8%
*-commutative84.8%
*-commutative84.8%
Applied egg-rr84.8%
unpow184.8%
associate-*r*82.9%
*-commutative82.9%
*-commutative82.9%
associate-*r*82.9%
Simplified82.9%
Taylor expanded in x around inf 52.0%
cancel-sign-sub-inv52.0%
associate-*r*54.1%
metadata-eval54.1%
Simplified54.1%
Taylor expanded in t around inf 42.5%
associate-*r*42.5%
associate-*r*44.5%
Simplified44.5%
if -6.1999999999999998e-221 < c < -4.4999999999999997e-283 or 2.7e-99 < c < 2.25e15Initial program 89.1%
Simplified94.7%
pow194.7%
associate-*r*92.0%
*-commutative92.0%
*-commutative92.0%
Applied egg-rr92.0%
unpow192.0%
*-commutative92.0%
*-commutative92.0%
associate-*r*92.0%
Simplified92.0%
Taylor expanded in i around inf 31.9%
*-commutative31.9%
Simplified31.9%
if -4.4999999999999997e-283 < c < 3.5999999999999998e-197Initial program 96.1%
Simplified96.2%
Taylor expanded in j around inf 37.2%
associate-*r*37.2%
Simplified37.2%
if 2.25e15 < c < 8.00000000000000047e136Initial program 85.3%
Simplified85.4%
pow185.4%
associate-*r*89.0%
*-commutative89.0%
*-commutative89.0%
Applied egg-rr89.0%
unpow189.0%
*-commutative89.0%
*-commutative89.0%
associate-*r*89.0%
Simplified89.0%
Taylor expanded in j around inf 27.5%
*-commutative27.5%
associate-*r*27.5%
Simplified27.5%
Final simplification36.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)))
(if (<= t_1 -4e+188)
(+ (* j (* k -27.0)) (* a (* t -4.0)))
(if (<= t_1 2e-174)
(- (* b c) (* x (* 4.0 i)))
(if (<= t_1 2e+156)
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
(* k (+ (* 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 t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -4e+188) {
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
} else if (t_1 <= 2e-174) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t_1 <= 2e+156) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else {
tmp = k * ((b * (c / 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) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-4d+188)) then
tmp = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
else if (t_1 <= 2d-174) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (t_1 <= 2d+156) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else
tmp = k * ((b * (c / 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 t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -4e+188) {
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
} else if (t_1 <= 2e-174) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t_1 <= 2e+156) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else {
tmp = k * ((b * (c / 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): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -4e+188: tmp = (j * (k * -27.0)) + (a * (t * -4.0)) elif t_1 <= 2e-174: tmp = (b * c) - (x * (4.0 * i)) elif t_1 <= 2e+156: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) else: tmp = k * ((b * (c / 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) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -4e+188) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0))); elseif (t_1 <= 2e-174) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (t_1 <= 2e+156) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); else tmp = Float64(k * Float64(Float64(b * Float64(c / 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)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -4e+188)
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
elseif (t_1 <= 2e-174)
tmp = (b * c) - (x * (4.0 * i));
elseif (t_1 <= 2e+156)
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
else
tmp = k * ((b * (c / 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_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+188], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-174], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+156], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(N[(b * N[(c / k), $MachinePrecision]), $MachinePrecision] + N[(j * -27.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}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+188}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-174}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+156}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(b \cdot \frac{c}{k} + j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.0000000000000001e188Initial program 87.9%
Simplified91.1%
Taylor expanded in a around inf 78.8%
metadata-eval78.8%
distribute-lft-neg-in78.8%
*-commutative78.8%
associate-*l*78.8%
*-commutative78.8%
distribute-rgt-neg-in78.8%
distribute-lft-neg-in78.8%
metadata-eval78.8%
Simplified78.8%
if -4.0000000000000001e188 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e-174Initial program 93.3%
Simplified93.3%
Taylor expanded in t around 0 62.4%
Taylor expanded in i around inf 58.8%
associate-*r*58.8%
*-commutative58.8%
Simplified58.8%
if 2e-174 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e156Initial program 89.4%
pow189.4%
associate-*r*89.4%
*-commutative89.4%
associate-*r*89.4%
*-commutative89.4%
*-commutative89.4%
Applied egg-rr89.4%
unpow189.4%
associate-*r*91.6%
*-commutative91.6%
*-commutative91.6%
associate-*r*91.6%
Simplified91.6%
Taylor expanded in x around inf 55.2%
cancel-sign-sub-inv55.2%
associate-*r*59.4%
metadata-eval59.4%
Simplified59.4%
if 2e156 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 82.9%
Simplified75.8%
Taylor expanded in t around 0 73.4%
Taylor expanded in i around 0 71.1%
associate-*r*73.6%
*-commutative73.6%
associate-*r*71.1%
Simplified71.1%
Taylor expanded in k around inf 71.1%
cancel-sign-sub-inv71.1%
metadata-eval71.1%
associate-/l*71.1%
*-commutative71.1%
Simplified71.1%
Final simplification63.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 (or (<= t -1.95e+155)
(not (or (<= t -3.8e+74) (and (not (<= t -7e-32)) (<= t 2e+162)))))
(+ (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))) (* j (* k -27.0)))
(- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x 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 ((t <= -1.95e+155) || !((t <= -3.8e+74) || (!(t <= -7e-32) && (t <= 2e+162)))) {
tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0));
} else {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * 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 ((t <= (-1.95d+155)) .or. (.not. (t <= (-3.8d+74)) .or. (.not. (t <= (-7d-32))) .and. (t <= 2d+162))) then
tmp = (t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))) + (j * (k * (-27.0d0)))
else
tmp = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * 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 ((t <= -1.95e+155) || !((t <= -3.8e+74) || (!(t <= -7e-32) && (t <= 2e+162)))) {
tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0));
} else {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * 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 (t <= -1.95e+155) or not ((t <= -3.8e+74) or (not (t <= -7e-32) and (t <= 2e+162))): tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0)) else: tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * 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 ((t <= -1.95e+155) || !((t <= -3.8e+74) || (!(t <= -7e-32) && (t <= 2e+162)))) tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * 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 ((t <= -1.95e+155) || ~(((t <= -3.8e+74) || (~((t <= -7e-32)) && (t <= 2e+162)))))
tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0));
else
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * 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[Or[LessEqual[t, -1.95e+155], N[Not[Or[LessEqual[t, -3.8e+74], And[N[Not[LessEqual[t, -7e-32]], $MachinePrecision], LessEqual[t, 2e+162]]]], $MachinePrecision]], N[(N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * 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])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.95 \cdot 10^{+155} \lor \neg \left(t \leq -3.8 \cdot 10^{+74} \lor \neg \left(t \leq -7 \cdot 10^{-32}\right) \land t \leq 2 \cdot 10^{+162}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if t < -1.9499999999999999e155 or -3.7999999999999998e74 < t < -6.9999999999999997e-32 or 1.9999999999999999e162 < t Initial program 84.6%
Simplified88.3%
Taylor expanded in t around inf 89.0%
if -1.9499999999999999e155 < t < -3.7999999999999998e74 or -6.9999999999999997e-32 < t < 1.9999999999999999e162Initial program 93.1%
Simplified90.8%
Taylor expanded in t around 0 82.3%
Final simplification84.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
(let* ((t_1 (* 18.0 (* x (* y z))))
(t_2 (* 27.0 (* j k)))
(t_3 (- (* b c) (+ t_2 (* 4.0 (* x i)))))
(t_4 (+ (* t (+ t_1 (* a -4.0))) (* j (* k -27.0)))))
(if (<= t -2.3e+155)
t_4
(if (<= t -1.7e+74)
t_3
(if (<= t -4.4e-32)
(- (* t (- t_1 (* a 4.0))) t_2)
(if (<= t 2e+162) t_3 t_4))))))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 = 18.0 * (x * (y * z));
double t_2 = 27.0 * (j * k);
double t_3 = (b * c) - (t_2 + (4.0 * (x * i)));
double t_4 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
double tmp;
if (t <= -2.3e+155) {
tmp = t_4;
} else if (t <= -1.7e+74) {
tmp = t_3;
} else if (t <= -4.4e-32) {
tmp = (t * (t_1 - (a * 4.0))) - t_2;
} else if (t <= 2e+162) {
tmp = t_3;
} else {
tmp = t_4;
}
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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
t_2 = 27.0d0 * (j * k)
t_3 = (b * c) - (t_2 + (4.0d0 * (x * i)))
t_4 = (t * (t_1 + (a * (-4.0d0)))) + (j * (k * (-27.0d0)))
if (t <= (-2.3d+155)) then
tmp = t_4
else if (t <= (-1.7d+74)) then
tmp = t_3
else if (t <= (-4.4d-32)) then
tmp = (t * (t_1 - (a * 4.0d0))) - t_2
else if (t <= 2d+162) then
tmp = t_3
else
tmp = t_4
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 = 18.0 * (x * (y * z));
double t_2 = 27.0 * (j * k);
double t_3 = (b * c) - (t_2 + (4.0 * (x * i)));
double t_4 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
double tmp;
if (t <= -2.3e+155) {
tmp = t_4;
} else if (t <= -1.7e+74) {
tmp = t_3;
} else if (t <= -4.4e-32) {
tmp = (t * (t_1 - (a * 4.0))) - t_2;
} else if (t <= 2e+162) {
tmp = t_3;
} else {
tmp = t_4;
}
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 = 18.0 * (x * (y * z)) t_2 = 27.0 * (j * k) t_3 = (b * c) - (t_2 + (4.0 * (x * i))) t_4 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0)) tmp = 0 if t <= -2.3e+155: tmp = t_4 elif t <= -1.7e+74: tmp = t_3 elif t <= -4.4e-32: tmp = (t * (t_1 - (a * 4.0))) - t_2 elif t <= 2e+162: tmp = t_3 else: tmp = t_4 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(18.0 * Float64(x * Float64(y * z))) t_2 = Float64(27.0 * Float64(j * k)) t_3 = Float64(Float64(b * c) - Float64(t_2 + Float64(4.0 * Float64(x * i)))) t_4 = Float64(Float64(t * Float64(t_1 + Float64(a * -4.0))) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (t <= -2.3e+155) tmp = t_4; elseif (t <= -1.7e+74) tmp = t_3; elseif (t <= -4.4e-32) tmp = Float64(Float64(t * Float64(t_1 - Float64(a * 4.0))) - t_2); elseif (t <= 2e+162) tmp = t_3; else tmp = t_4; 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 = 18.0 * (x * (y * z));
t_2 = 27.0 * (j * k);
t_3 = (b * c) - (t_2 + (4.0 * (x * i)));
t_4 = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
tmp = 0.0;
if (t <= -2.3e+155)
tmp = t_4;
elseif (t <= -1.7e+74)
tmp = t_3;
elseif (t <= -4.4e-32)
tmp = (t * (t_1 - (a * 4.0))) - t_2;
elseif (t <= 2e+162)
tmp = t_3;
else
tmp = t_4;
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[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(t$95$2 + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t * N[(t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.3e+155], t$95$4, If[LessEqual[t, -1.7e+74], t$95$3, If[LessEqual[t, -4.4e-32], N[(N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, 2e+162], t$95$3, t$95$4]]]]]]]]
\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 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := 27 \cdot \left(j \cdot k\right)\\
t_3 := b \cdot c - \left(t\_2 + 4 \cdot \left(x \cdot i\right)\right)\\
t_4 := t \cdot \left(t\_1 + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+155}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{+74}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-32}:\\
\;\;\;\;t \cdot \left(t\_1 - a \cdot 4\right) - t\_2\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+162}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if t < -2.29999999999999998e155 or 1.9999999999999999e162 < t Initial program 81.8%
Simplified87.4%
Taylor expanded in t around inf 91.3%
if -2.29999999999999998e155 < t < -1.7e74 or -4.4e-32 < t < 1.9999999999999999e162Initial program 93.1%
Simplified90.8%
Taylor expanded in t around 0 82.3%
if -1.7e74 < t < -4.4e-32Initial program 89.8%
Simplified89.9%
Taylor expanded in i around 0 87.9%
Taylor expanded in b around 0 84.8%
Final simplification84.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 (<= (* b c) -2e+210)
(- (+ (* b c) (* (* t a) -4.0)) (* 27.0 (* j k)))
(if (<= (* b c) 2e+66)
(- (* -4.0 (+ (* t a) (* x i))) (* (* j 27.0) k))
(if (<= (* b c) 1e+278)
(+ (* j (* k -27.0)) (* 18.0 (* z (* y (* x t)))))
(- (* 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 tmp;
if ((b * c) <= -2e+210) {
tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
} else if ((b * c) <= 2e+66) {
tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
} else if ((b * c) <= 1e+278) {
tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))));
} else {
tmp = (b * c) - (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 ((b * c) <= (-2d+210)) then
tmp = ((b * c) + ((t * a) * (-4.0d0))) - (27.0d0 * (j * k))
else if ((b * c) <= 2d+66) then
tmp = ((-4.0d0) * ((t * a) + (x * i))) - ((j * 27.0d0) * k)
else if ((b * c) <= 1d+278) then
tmp = (j * (k * (-27.0d0))) + (18.0d0 * (z * (y * (x * t))))
else
tmp = (b * c) - (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 ((b * c) <= -2e+210) {
tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
} else if ((b * c) <= 2e+66) {
tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
} else if ((b * c) <= 1e+278) {
tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))));
} else {
tmp = (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): tmp = 0 if (b * c) <= -2e+210: tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k)) elif (b * c) <= 2e+66: tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k) elif (b * c) <= 1e+278: tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t)))) else: tmp = (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) tmp = 0.0 if (Float64(b * c) <= -2e+210) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - Float64(27.0 * Float64(j * k))); elseif (Float64(b * c) <= 2e+66) tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) - Float64(Float64(j * 27.0) * k)); elseif (Float64(b * c) <= 1e+278) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(18.0 * Float64(z * Float64(y * Float64(x * t))))); else tmp = Float64(Float64(b * c) - 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 ((b * c) <= -2e+210)
tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
elseif ((b * c) <= 2e+66)
tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
elseif ((b * c) <= 1e+278)
tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))));
else
tmp = (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_] := If[LessEqual[N[(b * c), $MachinePrecision], -2e+210], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+66], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+278], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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}\;b \cdot c \leq -2 \cdot 10^{+210}:\\
\;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+66}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;b \cdot c \leq 10^{+278}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.99999999999999985e210Initial program 82.7%
Simplified79.3%
Taylor expanded in x around 0 79.6%
if -1.99999999999999985e210 < (*.f64 b c) < 1.99999999999999989e66Initial program 92.1%
Taylor expanded in x around 0 82.5%
Taylor expanded in b around 0 77.3%
mul-1-neg77.3%
distribute-lft-out77.3%
distribute-lft-neg-in77.3%
metadata-eval77.3%
Simplified77.3%
if 1.99999999999999989e66 < (*.f64 b c) < 9.99999999999999964e277Initial program 86.7%
Simplified90.1%
Taylor expanded in y around inf 60.2%
pow160.2%
*-commutative60.2%
Applied egg-rr60.2%
unpow160.2%
associate-*r*60.3%
*-commutative60.3%
associate-*r*66.5%
Simplified66.5%
if 9.99999999999999964e277 < (*.f64 b c) Initial program 90.5%
Simplified85.7%
Taylor expanded in t around 0 100.0%
Taylor expanded in i around inf 100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification78.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
(if (<= (* b c) -5e+199)
(- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))
(if (<= (* b c) 2e+66)
(- (* -4.0 (+ (* t a) (* x i))) (* (* j 27.0) k))
(if (<= (* b c) 1e+278)
(+ (* j (* k -27.0)) (* 18.0 (* z (* y (* x t)))))
(- (* 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 tmp;
if ((b * c) <= -5e+199) {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else if ((b * c) <= 2e+66) {
tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
} else if ((b * c) <= 1e+278) {
tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))));
} else {
tmp = (b * c) - (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 ((b * c) <= (-5d+199)) then
tmp = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
else if ((b * c) <= 2d+66) then
tmp = ((-4.0d0) * ((t * a) + (x * i))) - ((j * 27.0d0) * k)
else if ((b * c) <= 1d+278) then
tmp = (j * (k * (-27.0d0))) + (18.0d0 * (z * (y * (x * t))))
else
tmp = (b * c) - (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 ((b * c) <= -5e+199) {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else if ((b * c) <= 2e+66) {
tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
} else if ((b * c) <= 1e+278) {
tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))));
} else {
tmp = (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): tmp = 0 if (b * c) <= -5e+199: tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i))) elif (b * c) <= 2e+66: tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k) elif (b * c) <= 1e+278: tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t)))) else: tmp = (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) tmp = 0.0 if (Float64(b * c) <= -5e+199) tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); elseif (Float64(b * c) <= 2e+66) tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) - Float64(Float64(j * 27.0) * k)); elseif (Float64(b * c) <= 1e+278) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(18.0 * Float64(z * Float64(y * Float64(x * t))))); else tmp = Float64(Float64(b * c) - 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 ((b * c) <= -5e+199)
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
elseif ((b * c) <= 2e+66)
tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
elseif ((b * c) <= 1e+278)
tmp = (j * (k * -27.0)) + (18.0 * (z * (y * (x * t))));
else
tmp = (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_] := If[LessEqual[N[(b * c), $MachinePrecision], -5e+199], N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+66], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+278], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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}\;b \cdot c \leq -5 \cdot 10^{+199}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+66}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;b \cdot c \leq 10^{+278}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4.9999999999999998e199Initial program 83.3%
Simplified80.0%
Taylor expanded in t around 0 76.8%
if -4.9999999999999998e199 < (*.f64 b c) < 1.99999999999999989e66Initial program 92.0%
Taylor expanded in x around 0 82.4%
Taylor expanded in b around 0 77.2%
mul-1-neg77.2%
distribute-lft-out77.2%
distribute-lft-neg-in77.2%
metadata-eval77.2%
Simplified77.2%
if 1.99999999999999989e66 < (*.f64 b c) < 9.99999999999999964e277Initial program 86.7%
Simplified90.1%
Taylor expanded in y around inf 60.2%
pow160.2%
*-commutative60.2%
Applied egg-rr60.2%
unpow160.2%
associate-*r*60.3%
*-commutative60.3%
associate-*r*66.5%
Simplified66.5%
if 9.99999999999999964e277 < (*.f64 b c) Initial program 90.5%
Simplified85.7%
Taylor expanded in t around 0 100.0%
Taylor expanded in i around inf 100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification77.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 (* j (* k -27.0))))
(if (<= (* b c) -2e+210)
(+ (* b c) t_1)
(if (<= (* b c) 2e+66)
(- (* -4.0 (+ (* t a) (* x i))) (* (* j 27.0) k))
(if (<= (* b c) 1e+278)
(+ t_1 (* 18.0 (* z (* y (* x t)))))
(- (* 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 = j * (k * -27.0);
double tmp;
if ((b * c) <= -2e+210) {
tmp = (b * c) + t_1;
} else if ((b * c) <= 2e+66) {
tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
} else if ((b * c) <= 1e+278) {
tmp = t_1 + (18.0 * (z * (y * (x * t))));
} else {
tmp = (b * c) - (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) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if ((b * c) <= (-2d+210)) then
tmp = (b * c) + t_1
else if ((b * c) <= 2d+66) then
tmp = ((-4.0d0) * ((t * a) + (x * i))) - ((j * 27.0d0) * k)
else if ((b * c) <= 1d+278) then
tmp = t_1 + (18.0d0 * (z * (y * (x * t))))
else
tmp = (b * c) - (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 t_1 = j * (k * -27.0);
double tmp;
if ((b * c) <= -2e+210) {
tmp = (b * c) + t_1;
} else if ((b * c) <= 2e+66) {
tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
} else if ((b * c) <= 1e+278) {
tmp = t_1 + (18.0 * (z * (y * (x * t))));
} else {
tmp = (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 = j * (k * -27.0) tmp = 0 if (b * c) <= -2e+210: tmp = (b * c) + t_1 elif (b * c) <= 2e+66: tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k) elif (b * c) <= 1e+278: tmp = t_1 + (18.0 * (z * (y * (x * t)))) else: tmp = (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(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -2e+210) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= 2e+66) tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) - Float64(Float64(j * 27.0) * k)); elseif (Float64(b * c) <= 1e+278) tmp = Float64(t_1 + Float64(18.0 * Float64(z * Float64(y * Float64(x * t))))); else tmp = Float64(Float64(b * c) - 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)
t_1 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -2e+210)
tmp = (b * c) + t_1;
elseif ((b * c) <= 2e+66)
tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
elseif ((b * c) <= 1e+278)
tmp = t_1 + (18.0 * (z * (y * (x * t))));
else
tmp = (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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+210], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+66], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+278], N[(t$95$1 + N[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+210}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+66}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;b \cdot c \leq 10^{+278}:\\
\;\;\;\;t\_1 + 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.99999999999999985e210Initial program 82.7%
Simplified79.3%
Taylor expanded in b around inf 72.9%
if -1.99999999999999985e210 < (*.f64 b c) < 1.99999999999999989e66Initial program 92.1%
Taylor expanded in x around 0 82.5%
Taylor expanded in b around 0 77.3%
mul-1-neg77.3%
distribute-lft-out77.3%
distribute-lft-neg-in77.3%
metadata-eval77.3%
Simplified77.3%
if 1.99999999999999989e66 < (*.f64 b c) < 9.99999999999999964e277Initial program 86.7%
Simplified90.1%
Taylor expanded in y around inf 60.2%
pow160.2%
*-commutative60.2%
Applied egg-rr60.2%
unpow160.2%
associate-*r*60.3%
*-commutative60.3%
associate-*r*66.5%
Simplified66.5%
if 9.99999999999999964e277 < (*.f64 b c) Initial program 90.5%
Simplified85.7%
Taylor expanded in t around 0 100.0%
Taylor expanded in i around inf 100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Final simplification77.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
(let* ((t_1 (* 18.0 (* x (* y z)))))
(if (<= t -6.2e-34)
(- (+ (* b c) (* t (- t_1 (* a 4.0)))) (* 27.0 (* j k)))
(if (<= t 3.4e+162)
(- (- (- (* b c) (* 4.0 (* t a))) (* (* x 4.0) i)) (* (* j 27.0) k))
(+ (* t (+ t_1 (* a -4.0))) (* 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 t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -6.2e-34) {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
} else if (t <= 3.4e+162) {
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = (t * (t_1 + (a * -4.0))) + (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) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
if (t <= (-6.2d-34)) then
tmp = ((b * c) + (t * (t_1 - (a * 4.0d0)))) - (27.0d0 * (j * k))
else if (t <= 3.4d+162) then
tmp = (((b * c) - (4.0d0 * (t * a))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
else
tmp = (t * (t_1 + (a * (-4.0d0)))) + (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 t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -6.2e-34) {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
} else if (t <= 3.4e+162) {
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = (t * (t_1 + (a * -4.0))) + (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): t_1 = 18.0 * (x * (y * z)) tmp = 0 if t <= -6.2e-34: tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k)) elif t <= 3.4e+162: tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k) else: tmp = (t * (t_1 + (a * -4.0))) + (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) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) tmp = 0.0 if (t <= -6.2e-34) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) - Float64(27.0 * Float64(j * k))); elseif (t <= 3.4e+162) tmp = Float64(Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(t * Float64(t_1 + Float64(a * -4.0))) + Float64(j * Float64(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)
t_1 = 18.0 * (x * (y * z));
tmp = 0.0;
if (t <= -6.2e-34)
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
elseif (t <= 3.4e+162)
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
else
tmp = (t * (t_1 + (a * -4.0))) + (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_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e-34], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e+162], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.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}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{-34}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+162}:\\
\;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(t\_1 + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if t < -6.1999999999999996e-34Initial program 88.6%
Simplified90.1%
Taylor expanded in i around 0 86.6%
if -6.1999999999999996e-34 < t < 3.40000000000000003e162Initial program 92.3%
Taylor expanded in x around 0 91.1%
if 3.40000000000000003e162 < t Initial program 83.3%
Simplified90.3%
Taylor expanded in t around inf 90.6%
Final simplification89.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 (* -4.0 (* x i))))
(if (<= j -1.1e+81)
(* j (* k -27.0))
(if (<= j -1.7e-25)
t_1
(if (<= j -6.8e-146)
(* b c)
(if (<= j 5e-80) t_1 (* (* 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 t_1 = -4.0 * (x * i);
double tmp;
if (j <= -1.1e+81) {
tmp = j * (k * -27.0);
} else if (j <= -1.7e-25) {
tmp = t_1;
} else if (j <= -6.8e-146) {
tmp = b * c;
} else if (j <= 5e-80) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
if (j <= (-1.1d+81)) then
tmp = j * (k * (-27.0d0))
else if (j <= (-1.7d-25)) then
tmp = t_1
else if (j <= (-6.8d-146)) then
tmp = b * c
else if (j <= 5d-80) then
tmp = t_1
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 t_1 = -4.0 * (x * i);
double tmp;
if (j <= -1.1e+81) {
tmp = j * (k * -27.0);
} else if (j <= -1.7e-25) {
tmp = t_1;
} else if (j <= -6.8e-146) {
tmp = b * c;
} else if (j <= 5e-80) {
tmp = t_1;
} 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): t_1 = -4.0 * (x * i) tmp = 0 if j <= -1.1e+81: tmp = j * (k * -27.0) elif j <= -1.7e-25: tmp = t_1 elif j <= -6.8e-146: tmp = b * c elif j <= 5e-80: tmp = t_1 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) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (j <= -1.1e+81) tmp = Float64(j * Float64(k * -27.0)); elseif (j <= -1.7e-25) tmp = t_1; elseif (j <= -6.8e-146) tmp = Float64(b * c); elseif (j <= 5e-80) tmp = t_1; 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)
t_1 = -4.0 * (x * i);
tmp = 0.0;
if (j <= -1.1e+81)
tmp = j * (k * -27.0);
elseif (j <= -1.7e-25)
tmp = t_1;
elseif (j <= -6.8e-146)
tmp = b * c;
elseif (j <= 5e-80)
tmp = t_1;
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_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.1e+81], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.7e-25], t$95$1, If[LessEqual[j, -6.8e-146], N[(b * c), $MachinePrecision], If[LessEqual[j, 5e-80], t$95$1, 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}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;j \leq -1.1 \cdot 10^{+81}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;j \leq -1.7 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -6.8 \cdot 10^{-146}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;j \leq 5 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if j < -1.09999999999999993e81Initial program 92.3%
Simplified94.2%
pow194.2%
associate-*r*92.4%
*-commutative92.4%
*-commutative92.4%
Applied egg-rr92.4%
unpow192.4%
*-commutative92.4%
*-commutative92.4%
associate-*r*92.4%
Simplified92.4%
Taylor expanded in j around inf 46.5%
*-commutative46.5%
associate-*r*46.6%
Simplified46.6%
if -1.09999999999999993e81 < j < -1.70000000000000001e-25 or -6.8000000000000001e-146 < j < 5e-80Initial program 88.9%
Simplified87.1%
pow187.1%
associate-*r*91.0%
*-commutative91.0%
*-commutative91.0%
Applied egg-rr91.0%
unpow191.0%
*-commutative91.0%
*-commutative91.0%
associate-*r*91.0%
Simplified91.0%
Taylor expanded in i around inf 32.1%
*-commutative32.1%
Simplified32.1%
if -1.70000000000000001e-25 < j < -6.8000000000000001e-146Initial program 93.3%
Simplified93.3%
pow193.3%
associate-*r*93.3%
*-commutative93.3%
*-commutative93.3%
Applied egg-rr93.3%
unpow193.3%
*-commutative93.3%
*-commutative93.3%
associate-*r*93.3%
Simplified93.3%
Taylor expanded in b around inf 33.6%
if 5e-80 < j Initial program 89.5%
Simplified89.7%
Taylor expanded in j around inf 31.7%
Final simplification35.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 (* -4.0 (* x i))) (t_2 (* (* j k) -27.0)))
(if (<= j -1.7e+81)
t_2
(if (<= j -1.42e-24)
t_1
(if (<= j -1.85e-156) (* b c) (if (<= j 2.35e-80) 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 * (x * i);
double t_2 = (j * k) * -27.0;
double tmp;
if (j <= -1.7e+81) {
tmp = t_2;
} else if (j <= -1.42e-24) {
tmp = t_1;
} else if (j <= -1.85e-156) {
tmp = b * c;
} else if (j <= 2.35e-80) {
tmp = 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 = (-4.0d0) * (x * i)
t_2 = (j * k) * (-27.0d0)
if (j <= (-1.7d+81)) then
tmp = t_2
else if (j <= (-1.42d-24)) then
tmp = t_1
else if (j <= (-1.85d-156)) then
tmp = b * c
else if (j <= 2.35d-80) then
tmp = 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 = -4.0 * (x * i);
double t_2 = (j * k) * -27.0;
double tmp;
if (j <= -1.7e+81) {
tmp = t_2;
} else if (j <= -1.42e-24) {
tmp = t_1;
} else if (j <= -1.85e-156) {
tmp = b * c;
} else if (j <= 2.35e-80) {
tmp = 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 = -4.0 * (x * i) t_2 = (j * k) * -27.0 tmp = 0 if j <= -1.7e+81: tmp = t_2 elif j <= -1.42e-24: tmp = t_1 elif j <= -1.85e-156: tmp = b * c elif j <= 2.35e-80: tmp = 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(-4.0 * Float64(x * i)) t_2 = Float64(Float64(j * k) * -27.0) tmp = 0.0 if (j <= -1.7e+81) tmp = t_2; elseif (j <= -1.42e-24) tmp = t_1; elseif (j <= -1.85e-156) tmp = Float64(b * c); elseif (j <= 2.35e-80) tmp = 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 = -4.0 * (x * i);
t_2 = (j * k) * -27.0;
tmp = 0.0;
if (j <= -1.7e+81)
tmp = t_2;
elseif (j <= -1.42e-24)
tmp = t_1;
elseif (j <= -1.85e-156)
tmp = b * c;
elseif (j <= 2.35e-80)
tmp = 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[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]}, If[LessEqual[j, -1.7e+81], t$95$2, If[LessEqual[j, -1.42e-24], t$95$1, If[LessEqual[j, -1.85e-156], N[(b * c), $MachinePrecision], If[LessEqual[j, 2.35e-80], t$95$1, 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 := -4 \cdot \left(x \cdot i\right)\\
t_2 := \left(j \cdot k\right) \cdot -27\\
\mathbf{if}\;j \leq -1.7 \cdot 10^{+81}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq -1.42 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -1.85 \cdot 10^{-156}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;j \leq 2.35 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if j < -1.70000000000000001e81 or 2.34999999999999986e-80 < j Initial program 90.6%
Simplified91.5%
Taylor expanded in j around inf 37.7%
if -1.70000000000000001e81 < j < -1.42e-24 or -1.85e-156 < j < 2.34999999999999986e-80Initial program 88.8%
Simplified87.9%
pow187.9%
associate-*r*90.9%
*-commutative90.9%
*-commutative90.9%
Applied egg-rr90.9%
unpow190.9%
*-commutative90.9%
*-commutative90.9%
associate-*r*90.9%
Simplified90.9%
Taylor expanded in i around inf 32.4%
*-commutative32.4%
Simplified32.4%
if -1.42e-24 < j < -1.85e-156Initial program 93.5%
Simplified90.1%
pow190.1%
associate-*r*93.5%
*-commutative93.5%
*-commutative93.5%
Applied egg-rr93.5%
unpow193.5%
*-commutative93.5%
*-commutative93.5%
associate-*r*93.5%
Simplified93.5%
Taylor expanded in b around inf 35.9%
Final simplification35.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
(let* ((t_1 (* 18.0 (* z (* y (* x t))))))
(if (<= x -1.6e+104)
t_1
(if (<= x -1.42e+45)
(* -4.0 (* x i))
(if (<= x 6.9e+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 = 18.0 * (z * (y * (x * t)));
double tmp;
if (x <= -1.6e+104) {
tmp = t_1;
} else if (x <= -1.42e+45) {
tmp = -4.0 * (x * i);
} else if (x <= 6.9e+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 = 18.0d0 * (z * (y * (x * t)))
if (x <= (-1.6d+104)) then
tmp = t_1
else if (x <= (-1.42d+45)) then
tmp = (-4.0d0) * (x * i)
else if (x <= 6.9d+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 = 18.0 * (z * (y * (x * t)));
double tmp;
if (x <= -1.6e+104) {
tmp = t_1;
} else if (x <= -1.42e+45) {
tmp = -4.0 * (x * i);
} else if (x <= 6.9e+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 = 18.0 * (z * (y * (x * t))) tmp = 0 if x <= -1.6e+104: tmp = t_1 elif x <= -1.42e+45: tmp = -4.0 * (x * i) elif x <= 6.9e+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(18.0 * Float64(z * Float64(y * Float64(x * t)))) tmp = 0.0 if (x <= -1.6e+104) tmp = t_1; elseif (x <= -1.42e+45) tmp = Float64(-4.0 * Float64(x * i)); elseif (x <= 6.9e+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 = 18.0 * (z * (y * (x * t)));
tmp = 0.0;
if (x <= -1.6e+104)
tmp = t_1;
elseif (x <= -1.42e+45)
tmp = -4.0 * (x * i);
elseif (x <= 6.9e+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[(18.0 * N[(z * N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.6e+104], t$95$1, If[LessEqual[x, -1.42e+45], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.9e+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 := 18 \cdot \left(z \cdot \left(y \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.42 \cdot 10^{+45}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq 6.9 \cdot 10^{+46}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.6e104 or 6.90000000000000018e46 < x Initial program 84.1%
pow184.1%
associate-*r*85.2%
*-commutative85.2%
associate-*r*84.1%
*-commutative84.1%
*-commutative84.1%
Applied egg-rr84.1%
unpow184.1%
associate-*r*83.0%
*-commutative83.0%
*-commutative83.0%
associate-*r*83.0%
Simplified83.0%
Taylor expanded in x around inf 68.5%
cancel-sign-sub-inv68.5%
associate-*r*67.4%
metadata-eval67.4%
Simplified67.4%
Taylor expanded in t around inf 44.9%
associate-*r*45.8%
associate-*r*49.3%
Simplified49.3%
if -1.6e104 < x < -1.42e45Initial program 93.9%
Simplified99.9%
pow199.9%
associate-*r*93.9%
*-commutative93.9%
*-commutative93.9%
Applied egg-rr93.9%
unpow193.9%
*-commutative93.9%
*-commutative93.9%
associate-*r*93.9%
Simplified93.9%
Taylor expanded in i around inf 58.8%
*-commutative58.8%
Simplified58.8%
if -1.42e45 < x < 6.90000000000000018e46Initial program 93.4%
Simplified90.4%
Taylor expanded in b around inf 54.6%
Final simplification53.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 (or (<= j -3.6e+57) (not (<= j 1.55e-79))) (+ (* b c) (* j (* k -27.0))) (- (* 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 tmp;
if ((j <= -3.6e+57) || !(j <= 1.55e-79)) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = (b * c) - (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 ((j <= (-3.6d+57)) .or. (.not. (j <= 1.55d-79))) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = (b * c) - (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 ((j <= -3.6e+57) || !(j <= 1.55e-79)) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = (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): tmp = 0 if (j <= -3.6e+57) or not (j <= 1.55e-79): tmp = (b * c) + (j * (k * -27.0)) else: tmp = (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) tmp = 0.0 if ((j <= -3.6e+57) || !(j <= 1.55e-79)) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(b * c) - 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 ((j <= -3.6e+57) || ~((j <= 1.55e-79)))
tmp = (b * c) + (j * (k * -27.0));
else
tmp = (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_] := If[Or[LessEqual[j, -3.6e+57], N[Not[LessEqual[j, 1.55e-79]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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}\;j \leq -3.6 \cdot 10^{+57} \lor \neg \left(j \leq 1.55 \cdot 10^{-79}\right):\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\end{array}
\end{array}
if j < -3.6000000000000002e57 or 1.55e-79 < j Initial program 89.8%
Simplified90.6%
Taylor expanded in b around inf 56.9%
if -3.6000000000000002e57 < j < 1.55e-79Initial program 90.8%
Simplified89.3%
Taylor expanded in t around 0 55.5%
Taylor expanded in i around inf 48.9%
associate-*r*48.9%
*-commutative48.9%
Simplified48.9%
Final simplification53.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 (if (or (<= (* b c) -5.8e+199) (not (<= (* b c) 1.06e+37))) (* 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) <= -5.8e+199) || !((b * c) <= 1.06e+37)) {
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) <= (-5.8d+199)) .or. (.not. ((b * c) <= 1.06d+37))) 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) <= -5.8e+199) || !((b * c) <= 1.06e+37)) {
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) <= -5.8e+199) or not ((b * c) <= 1.06e+37): 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) <= -5.8e+199) || !(Float64(b * c) <= 1.06e+37)) 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) <= -5.8e+199) || ~(((b * c) <= 1.06e+37)))
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], -5.8e+199], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.06e+37]], $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 -5.8 \cdot 10^{+199} \lor \neg \left(b \cdot c \leq 1.06 \cdot 10^{+37}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -5.7999999999999998e199 or 1.06e37 < (*.f64 b c) Initial program 86.9%
Simplified85.7%
pow185.7%
associate-*r*88.1%
*-commutative88.1%
*-commutative88.1%
Applied egg-rr88.1%
unpow188.1%
*-commutative88.1%
*-commutative88.1%
associate-*r*88.1%
Simplified88.1%
Taylor expanded in b around inf 55.8%
if -5.7999999999999998e199 < (*.f64 b c) < 1.06e37Initial program 91.9%
Simplified92.0%
Taylor expanded in j around inf 30.4%
Final simplification38.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 (* 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 90.3%
Simplified90.0%
pow190.0%
associate-*r*91.5%
*-commutative91.5%
*-commutative91.5%
Applied egg-rr91.5%
unpow191.5%
*-commutative91.5%
*-commutative91.5%
associate-*r*91.5%
Simplified91.5%
Taylor expanded in b around inf 22.3%
(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 2024090
(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
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))