
(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 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* x 4.0) i))
(t_2 (* (* j 27.0) k))
(t_3 (* t (* a 4.0)))
(t_4 (- (- (+ (- (* (* z (* (* x 18.0) y)) t) t_3) (* b c)) t_1) t_2)))
(if (<= t_4 4e+208)
t_4
(if (<= t_4 INFINITY)
(- (- (+ (* b c) (- (* y (* (* x 18.0) (* z t))) t_3)) t_1) t_2)
(* x (- (* 18.0 (* y (* z t))) (* 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 = (x * 4.0) * i;
double t_2 = (j * 27.0) * k;
double t_3 = t * (a * 4.0);
double t_4 = (((((z * ((x * 18.0) * y)) * t) - t_3) + (b * c)) - t_1) - t_2;
double tmp;
if (t_4 <= 4e+208) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - t_3)) - t_1) - t_2;
} else {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * 4.0) * i;
double t_2 = (j * 27.0) * k;
double t_3 = t * (a * 4.0);
double t_4 = (((((z * ((x * 18.0) * y)) * t) - t_3) + (b * c)) - t_1) - t_2;
double tmp;
if (t_4 <= 4e+208) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - t_3)) - t_1) - t_2;
} else {
tmp = x * ((18.0 * (y * (z * t))) - (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 = (x * 4.0) * i t_2 = (j * 27.0) * k t_3 = t * (a * 4.0) t_4 = (((((z * ((x * 18.0) * y)) * t) - t_3) + (b * c)) - t_1) - t_2 tmp = 0 if t_4 <= 4e+208: tmp = t_4 elif t_4 <= math.inf: tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - t_3)) - t_1) - t_2 else: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * 4.0) * i) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(t * Float64(a * 4.0)) t_4 = Float64(Float64(Float64(Float64(Float64(Float64(z * Float64(Float64(x * 18.0) * y)) * t) - t_3) + Float64(b * c)) - t_1) - t_2) tmp = 0.0 if (t_4 <= 4e+208) tmp = t_4; elseif (t_4 <= Inf) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(z * t))) - t_3)) - t_1) - t_2); else tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - 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 = (x * 4.0) * i;
t_2 = (j * 27.0) * k;
t_3 = t * (a * 4.0);
t_4 = (((((z * ((x * 18.0) * y)) * t) - t_3) + (b * c)) - t_1) - t_2;
tmp = 0.0;
if (t_4 <= 4e+208)
tmp = t_4;
elseif (t_4 <= Inf)
tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - t_3)) - t_1) - t_2;
else
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(N[(N[(z * N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - t$95$3), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, 4e+208], t$95$4, If[LessEqual[t$95$4, Infinity], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $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}
t_1 := \left(x \cdot 4\right) \cdot i\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := t \cdot \left(a \cdot 4\right)\\
t_4 := \left(\left(\left(\left(z \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right) \cdot t - t\_3\right) + b \cdot c\right) - t\_1\right) - t\_2\\
\mathbf{if}\;t\_4 \leq 4 \cdot 10^{+208}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\left(\left(b \cdot c + \left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(z \cdot t\right)\right) - t\_3\right)\right) - t\_1\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\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)) < 3.9999999999999999e208Initial program 98.5%
if 3.9999999999999999e208 < (-.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 83.7%
pow183.7%
associate-*l*90.3%
*-commutative90.3%
Applied egg-rr90.3%
unpow190.3%
associate-*l*98.4%
*-commutative98.4%
Simplified98.4%
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%
Simplified25.8%
Taylor expanded in x around inf 64.6%
pow164.6%
Applied egg-rr64.6%
unpow164.6%
*-commutative64.6%
associate-*r*67.8%
Simplified67.8%
Final simplification94.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 (* 27.0 (* j k)))
(t_2 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))
(if (<= t -3.7e+37)
t_2
(if (<= t -0.125)
(+ (* (* j k) -27.0) (* 18.0 (* t (* y (* x z)))))
(if (<= t 4.6e-137)
(- (* b c) (+ t_1 (* 4.0 (* x i))))
(if (<= t 4.5e-87)
t_2
(if (<= t 8.2e-61)
(- (* b c) (* (* x 4.0) i))
(if (<= t 4e+73) (- (+ (* b c) (* -4.0 (* t a))) 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 = 27.0 * (j * k);
double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (t <= -3.7e+37) {
tmp = t_2;
} else if (t <= -0.125) {
tmp = ((j * k) * -27.0) + (18.0 * (t * (y * (x * z))));
} else if (t <= 4.6e-137) {
tmp = (b * c) - (t_1 + (4.0 * (x * i)));
} else if (t <= 4.5e-87) {
tmp = t_2;
} else if (t <= 8.2e-61) {
tmp = (b * c) - ((x * 4.0) * i);
} else if (t <= 4e+73) {
tmp = ((b * c) + (-4.0 * (t * a))) - 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 = 27.0d0 * (j * k)
t_2 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
if (t <= (-3.7d+37)) then
tmp = t_2
else if (t <= (-0.125d0)) then
tmp = ((j * k) * (-27.0d0)) + (18.0d0 * (t * (y * (x * z))))
else if (t <= 4.6d-137) then
tmp = (b * c) - (t_1 + (4.0d0 * (x * i)))
else if (t <= 4.5d-87) then
tmp = t_2
else if (t <= 8.2d-61) then
tmp = (b * c) - ((x * 4.0d0) * i)
else if (t <= 4d+73) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - 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 = 27.0 * (j * k);
double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (t <= -3.7e+37) {
tmp = t_2;
} else if (t <= -0.125) {
tmp = ((j * k) * -27.0) + (18.0 * (t * (y * (x * z))));
} else if (t <= 4.6e-137) {
tmp = (b * c) - (t_1 + (4.0 * (x * i)));
} else if (t <= 4.5e-87) {
tmp = t_2;
} else if (t <= 8.2e-61) {
tmp = (b * c) - ((x * 4.0) * i);
} else if (t <= 4e+73) {
tmp = ((b * c) + (-4.0 * (t * a))) - 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 = 27.0 * (j * k) t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) tmp = 0 if t <= -3.7e+37: tmp = t_2 elif t <= -0.125: tmp = ((j * k) * -27.0) + (18.0 * (t * (y * (x * z)))) elif t <= 4.6e-137: tmp = (b * c) - (t_1 + (4.0 * (x * i))) elif t <= 4.5e-87: tmp = t_2 elif t <= 8.2e-61: tmp = (b * c) - ((x * 4.0) * i) elif t <= 4e+73: tmp = ((b * c) + (-4.0 * (t * a))) - 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(27.0 * Float64(j * k)) t_2 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) tmp = 0.0 if (t <= -3.7e+37) tmp = t_2; elseif (t <= -0.125) tmp = Float64(Float64(Float64(j * k) * -27.0) + Float64(18.0 * Float64(t * Float64(y * Float64(x * z))))); elseif (t <= 4.6e-137) tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(4.0 * Float64(x * i)))); elseif (t <= 4.5e-87) tmp = t_2; elseif (t <= 8.2e-61) tmp = Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i)); elseif (t <= 4e+73) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - 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 = 27.0 * (j * k);
t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
tmp = 0.0;
if (t <= -3.7e+37)
tmp = t_2;
elseif (t <= -0.125)
tmp = ((j * k) * -27.0) + (18.0 * (t * (y * (x * z))));
elseif (t <= 4.6e-137)
tmp = (b * c) - (t_1 + (4.0 * (x * i)));
elseif (t <= 4.5e-87)
tmp = t_2;
elseif (t <= 8.2e-61)
tmp = (b * c) - ((x * 4.0) * i);
elseif (t <= 4e+73)
tmp = ((b * c) + (-4.0 * (t * a))) - 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[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+37], t$95$2, If[LessEqual[t, -0.125], N[(N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision] + N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e-137], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-87], t$95$2, If[LessEqual[t, 8.2e-61], N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+73], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+37}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -0.125:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27 + 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-137}:\\
\;\;\;\;b \cdot c - \left(t\_1 + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-87}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-61}:\\
\;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+73}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.6999999999999999e37 or 4.60000000000000016e-137 < t < 4.49999999999999958e-87 or 3.99999999999999993e73 < t Initial program 80.9%
Simplified85.6%
Taylor expanded in i around 0 84.3%
Taylor expanded in j around 0 82.0%
if -3.6999999999999999e37 < t < -0.125Initial program 92.3%
Simplified92.3%
Taylor expanded in t around inf 92.3%
Taylor expanded in a around 0 85.7%
pow185.7%
Applied egg-rr85.7%
unpow185.7%
*-commutative85.7%
associate-*r*85.7%
Simplified85.7%
if -0.125 < t < 4.60000000000000016e-137Initial program 79.3%
Simplified78.5%
Taylor expanded in t around 0 83.3%
if 4.49999999999999958e-87 < t < 8.19999999999999998e-61Initial program 100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in i around inf 100.0%
associate-*r*100.0%
*-commutative100.0%
associate-*r*100.0%
Simplified100.0%
if 8.19999999999999998e-61 < t < 3.99999999999999993e73Initial program 95.8%
Simplified92.1%
Taylor expanded in x around 0 80.6%
Final simplification82.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* t (* a -4.0)))))
(if (<= (* b c) -2.2e+71)
(+ (* b c) t_1)
(if (<= (* b c) -3.8e-31)
(* y (* x (* t (* 18.0 z))))
(if (<= (* b c) -1.5e-276)
t_2
(if (<= (* b c) 5.6e-224)
(+ t_1 (* -4.0 (* x i)))
(if (<= (* b c) 1.9e+160) t_2 (- (* 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 t_2 = t_1 + (t * (a * -4.0));
double tmp;
if ((b * c) <= -2.2e+71) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -3.8e-31) {
tmp = y * (x * (t * (18.0 * z)));
} else if ((b * c) <= -1.5e-276) {
tmp = t_2;
} else if ((b * c) <= 5.6e-224) {
tmp = t_1 + (-4.0 * (x * i));
} else if ((b * c) <= 1.9e+160) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + (t * (a * (-4.0d0)))
if ((b * c) <= (-2.2d+71)) then
tmp = (b * c) + t_1
else if ((b * c) <= (-3.8d-31)) then
tmp = y * (x * (t * (18.0d0 * z)))
else if ((b * c) <= (-1.5d-276)) then
tmp = t_2
else if ((b * c) <= 5.6d-224) then
tmp = t_1 + ((-4.0d0) * (x * i))
else if ((b * c) <= 1.9d+160) then
tmp = t_2
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 t_2 = t_1 + (t * (a * -4.0));
double tmp;
if ((b * c) <= -2.2e+71) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -3.8e-31) {
tmp = y * (x * (t * (18.0 * z)));
} else if ((b * c) <= -1.5e-276) {
tmp = t_2;
} else if ((b * c) <= 5.6e-224) {
tmp = t_1 + (-4.0 * (x * i));
} else if ((b * c) <= 1.9e+160) {
tmp = t_2;
} 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) t_2 = t_1 + (t * (a * -4.0)) tmp = 0 if (b * c) <= -2.2e+71: tmp = (b * c) + t_1 elif (b * c) <= -3.8e-31: tmp = y * (x * (t * (18.0 * z))) elif (b * c) <= -1.5e-276: tmp = t_2 elif (b * c) <= 5.6e-224: tmp = t_1 + (-4.0 * (x * i)) elif (b * c) <= 1.9e+160: tmp = t_2 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)) t_2 = Float64(t_1 + Float64(t * Float64(a * -4.0))) tmp = 0.0 if (Float64(b * c) <= -2.2e+71) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= -3.8e-31) tmp = Float64(y * Float64(x * Float64(t * Float64(18.0 * z)))); elseif (Float64(b * c) <= -1.5e-276) tmp = t_2; elseif (Float64(b * c) <= 5.6e-224) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); elseif (Float64(b * c) <= 1.9e+160) tmp = t_2; else tmp = Float64(Float64(b * c) - Float64(Float64(x * 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);
t_2 = t_1 + (t * (a * -4.0));
tmp = 0.0;
if ((b * c) <= -2.2e+71)
tmp = (b * c) + t_1;
elseif ((b * c) <= -3.8e-31)
tmp = y * (x * (t * (18.0 * z)));
elseif ((b * c) <= -1.5e-276)
tmp = t_2;
elseif ((b * c) <= 5.6e-224)
tmp = t_1 + (-4.0 * (x * i));
elseif ((b * c) <= 1.9e+160)
tmp = t_2;
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]}, Block[{t$95$2 = N[(t$95$1 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.2e+71], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.8e-31], N[(y * N[(x * N[(t * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.5e-276], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 5.6e-224], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.9e+160], t$95$2, N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $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 := t\_1 + t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -2.2 \cdot 10^{+71}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;b \cdot c \leq -3.8 \cdot 10^{-31}:\\
\;\;\;\;y \cdot \left(x \cdot \left(t \cdot \left(18 \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -1.5 \cdot 10^{-276}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 5.6 \cdot 10^{-224}:\\
\;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 1.9 \cdot 10^{+160}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\
\end{array}
\end{array}
if (*.f64 b c) < -2.19999999999999995e71Initial program 80.0%
Simplified80.2%
Taylor expanded in b around inf 78.7%
if -2.19999999999999995e71 < (*.f64 b c) < -3.8e-31Initial program 80.4%
Simplified80.4%
Taylor expanded in x around inf 61.2%
Taylor expanded in y around inf 60.8%
Taylor expanded in i around 0 58.2%
*-commutative58.2%
*-commutative58.2%
associate-*l*62.2%
*-commutative62.2%
associate-*r*62.2%
*-commutative62.2%
associate-*r*62.2%
*-commutative62.2%
associate-*l*62.1%
Simplified62.1%
if -3.8e-31 < (*.f64 b c) < -1.49999999999999994e-276 or 5.5999999999999995e-224 < (*.f64 b c) < 1.90000000000000006e160Initial program 84.7%
Simplified85.7%
Taylor expanded in a around inf 57.1%
associate-*r*57.1%
*-commutative57.1%
metadata-eval57.1%
distribute-rgt-neg-in57.1%
*-commutative57.1%
distribute-rgt-neg-in57.1%
metadata-eval57.1%
*-commutative57.1%
Simplified57.1%
if -1.49999999999999994e-276 < (*.f64 b c) < 5.5999999999999995e-224Initial program 79.4%
Simplified89.9%
Taylor expanded in i around inf 62.7%
if 1.90000000000000006e160 < (*.f64 b c) Initial program 83.3%
Simplified83.3%
Taylor expanded in t around 0 80.2%
Taylor expanded in i around inf 74.0%
associate-*r*74.0%
*-commutative74.0%
associate-*r*74.0%
Simplified74.0%
Final simplification64.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 (* x (* y z))) (t_2 (* t (+ (* 18.0 t_1) (* a -4.0)))))
(if (<= t -2.4e+38)
t_2
(if (<= t -135000000000.0)
(+ (* (* j k) -27.0) (* 18.0 (* t t_1)))
(if (<= t -2.6)
t_2
(if (<= t 8e-138)
(- (* b c) (* (* j 27.0) k))
(if (<= t 6.6e-25)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(if (<= t 8.8e+17) (+ (* b c) (* j (* k -27.0))) 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 = x * (y * z);
double t_2 = t * ((18.0 * t_1) + (a * -4.0));
double tmp;
if (t <= -2.4e+38) {
tmp = t_2;
} else if (t <= -135000000000.0) {
tmp = ((j * k) * -27.0) + (18.0 * (t * t_1));
} else if (t <= -2.6) {
tmp = t_2;
} else if (t <= 8e-138) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (t <= 6.6e-25) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 8.8e+17) {
tmp = (b * c) + (j * (k * -27.0));
} 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 = x * (y * z)
t_2 = t * ((18.0d0 * t_1) + (a * (-4.0d0)))
if (t <= (-2.4d+38)) then
tmp = t_2
else if (t <= (-135000000000.0d0)) then
tmp = ((j * k) * (-27.0d0)) + (18.0d0 * (t * t_1))
else if (t <= (-2.6d0)) then
tmp = t_2
else if (t <= 8d-138) then
tmp = (b * c) - ((j * 27.0d0) * k)
else if (t <= 6.6d-25) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else if (t <= 8.8d+17) then
tmp = (b * c) + (j * (k * (-27.0d0)))
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 = x * (y * z);
double t_2 = t * ((18.0 * t_1) + (a * -4.0));
double tmp;
if (t <= -2.4e+38) {
tmp = t_2;
} else if (t <= -135000000000.0) {
tmp = ((j * k) * -27.0) + (18.0 * (t * t_1));
} else if (t <= -2.6) {
tmp = t_2;
} else if (t <= 8e-138) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (t <= 6.6e-25) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 8.8e+17) {
tmp = (b * c) + (j * (k * -27.0));
} 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 = x * (y * z) t_2 = t * ((18.0 * t_1) + (a * -4.0)) tmp = 0 if t <= -2.4e+38: tmp = t_2 elif t <= -135000000000.0: tmp = ((j * k) * -27.0) + (18.0 * (t * t_1)) elif t <= -2.6: tmp = t_2 elif t <= 8e-138: tmp = (b * c) - ((j * 27.0) * k) elif t <= 6.6e-25: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) elif t <= 8.8e+17: tmp = (b * c) + (j * (k * -27.0)) 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(x * Float64(y * z)) t_2 = Float64(t * Float64(Float64(18.0 * t_1) + Float64(a * -4.0))) tmp = 0.0 if (t <= -2.4e+38) tmp = t_2; elseif (t <= -135000000000.0) tmp = Float64(Float64(Float64(j * k) * -27.0) + Float64(18.0 * Float64(t * t_1))); elseif (t <= -2.6) tmp = t_2; elseif (t <= 8e-138) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); elseif (t <= 6.6e-25) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); elseif (t <= 8.8e+17) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); 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 = x * (y * z);
t_2 = t * ((18.0 * t_1) + (a * -4.0));
tmp = 0.0;
if (t <= -2.4e+38)
tmp = t_2;
elseif (t <= -135000000000.0)
tmp = ((j * k) * -27.0) + (18.0 * (t * t_1));
elseif (t <= -2.6)
tmp = t_2;
elseif (t <= 8e-138)
tmp = (b * c) - ((j * 27.0) * k);
elseif (t <= 6.6e-25)
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
elseif (t <= 8.8e+17)
tmp = (b * c) + (j * (k * -27.0));
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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * t$95$1), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e+38], t$95$2, If[LessEqual[t, -135000000000.0], N[(N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision] + N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.6], t$95$2, If[LessEqual[t, 8e-138], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.6e-25], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+17], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := t \cdot \left(18 \cdot t\_1 + a \cdot -4\right)\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -135000000000:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27 + 18 \cdot \left(t \cdot t\_1\right)\\
\mathbf{elif}\;t \leq -2.6:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-138}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{-25}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{+17}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.40000000000000017e38 or -1.35e11 < t < -2.60000000000000009 or 8.8e17 < t Initial program 82.0%
Simplified89.3%
Taylor expanded in t around inf 75.8%
Taylor expanded in t around inf 72.8%
if -2.40000000000000017e38 < t < -1.35e11Initial program 90.3%
Simplified90.3%
Taylor expanded in t around inf 90.4%
Taylor expanded in a around 0 90.4%
if -2.60000000000000009 < t < 8.00000000000000054e-138Initial program 80.1%
Simplified79.3%
Taylor expanded in t around 0 83.1%
Taylor expanded in i around 0 66.0%
associate-*r*65.9%
Simplified65.9%
if 8.00000000000000054e-138 < t < 6.5999999999999997e-25Initial program 91.5%
Simplified87.4%
Taylor expanded in x around inf 53.9%
pow153.9%
Applied egg-rr53.9%
unpow153.9%
*-commutative53.9%
associate-*r*57.9%
Simplified57.9%
if 6.5999999999999997e-25 < t < 8.8e17Initial program 83.1%
Simplified68.3%
Taylor expanded in b around inf 99.7%
Final simplification70.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(- (- (+ (* b c) (* -4.0 (* t a))) (* (* x 4.0) i)) (* (* j 27.0) k)))
(t_2 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(t_3 (* 27.0 (* j k))))
(if (<= t -0.0047)
(- t_2 t_3)
(if (<= t 2.2e-196)
t_1
(if (<= t 1.07e-91)
(- (+ (* b c) (* (* x z) (* y (* 18.0 t)))) t_3)
(if (<= t 4.6e+77) 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 = (((b * c) + (-4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double t_3 = 27.0 * (j * k);
double tmp;
if (t <= -0.0047) {
tmp = t_2 - t_3;
} else if (t <= 2.2e-196) {
tmp = t_1;
} else if (t <= 1.07e-91) {
tmp = ((b * c) + ((x * z) * (y * (18.0 * t)))) - t_3;
} else if (t <= 4.6e+77) {
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) :: t_3
real(8) :: tmp
t_1 = (((b * c) + ((-4.0d0) * (t * a))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
t_2 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
t_3 = 27.0d0 * (j * k)
if (t <= (-0.0047d0)) then
tmp = t_2 - t_3
else if (t <= 2.2d-196) then
tmp = t_1
else if (t <= 1.07d-91) then
tmp = ((b * c) + ((x * z) * (y * (18.0d0 * t)))) - t_3
else if (t <= 4.6d+77) 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 = (((b * c) + (-4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double t_3 = 27.0 * (j * k);
double tmp;
if (t <= -0.0047) {
tmp = t_2 - t_3;
} else if (t <= 2.2e-196) {
tmp = t_1;
} else if (t <= 1.07e-91) {
tmp = ((b * c) + ((x * z) * (y * (18.0 * t)))) - t_3;
} else if (t <= 4.6e+77) {
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 = (((b * c) + (-4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k) t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) t_3 = 27.0 * (j * k) tmp = 0 if t <= -0.0047: tmp = t_2 - t_3 elif t <= 2.2e-196: tmp = t_1 elif t <= 1.07e-91: tmp = ((b * c) + ((x * z) * (y * (18.0 * t)))) - t_3 elif t <= 4.6e+77: 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(Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) t_2 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) t_3 = Float64(27.0 * Float64(j * k)) tmp = 0.0 if (t <= -0.0047) tmp = Float64(t_2 - t_3); elseif (t <= 2.2e-196) tmp = t_1; elseif (t <= 1.07e-91) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(x * z) * Float64(y * Float64(18.0 * t)))) - t_3); elseif (t <= 4.6e+77) 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 = (((b * c) + (-4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
t_3 = 27.0 * (j * k);
tmp = 0.0;
if (t <= -0.0047)
tmp = t_2 - t_3;
elseif (t <= 2.2e-196)
tmp = t_1;
elseif (t <= 1.07e-91)
tmp = ((b * c) + ((x * z) * (y * (18.0 * t)))) - t_3;
elseif (t <= 4.6e+77)
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[(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$2 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -0.0047], N[(t$95$2 - t$95$3), $MachinePrecision], If[LessEqual[t, 2.2e-196], t$95$1, If[LessEqual[t, 1.07e-91], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(x * z), $MachinePrecision] * N[(y * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t, 4.6e+77], 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 := \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_2 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_3 := 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t \leq -0.0047:\\
\;\;\;\;t\_2 - t\_3\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.07 \cdot 10^{-91}:\\
\;\;\;\;\left(b \cdot c + \left(x \cdot z\right) \cdot \left(y \cdot \left(18 \cdot t\right)\right)\right) - t\_3\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -0.00470000000000000018Initial program 82.0%
Simplified87.7%
Taylor expanded in i around 0 85.8%
if -0.00470000000000000018 < t < 2.20000000000000015e-196 or 1.07000000000000002e-91 < t < 4.5999999999999999e77Initial program 84.3%
pow184.3%
associate-*l*92.8%
*-commutative92.8%
Applied egg-rr92.8%
unpow192.8%
associate-*l*94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in y around 0 90.7%
*-commutative90.7%
Simplified90.7%
if 2.20000000000000015e-196 < t < 1.07000000000000002e-91Initial program 79.4%
Simplified79.3%
Taylor expanded in i around 0 72.7%
Taylor expanded in x around inf 65.8%
associate-*r*65.8%
*-commutative65.8%
associate-*r*66.0%
associate-*l*79.5%
*-commutative79.5%
associate-*l*79.1%
*-commutative79.1%
Simplified79.1%
if 4.5999999999999999e77 < t Initial program 80.4%
Simplified85.3%
Taylor expanded in i around 0 82.9%
Taylor expanded in j around 0 85.2%
Final simplification87.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 (* 18.0 (* x (* y z)))))
(if (<= t -1.36e+94)
(- (+ (* b c) (* t (- t_1 (* a 4.0)))) (* 27.0 (* j k)))
(if (<= t 1.02e-10)
(-
(-
(+ (* b c) (- (* y (* (* x 18.0) (* z t))) (* t (* a 4.0))))
(* (* x 4.0) i))
(* (* j 27.0) k))
(-
(* t (- (+ t_1 (/ (* b c) t)) (* a 4.0)))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -1.36e+94) {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
} else if (t <= 1.02e-10) {
tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - (t * (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
if (t <= (-1.36d+94)) then
tmp = ((b * c) + (t * (t_1 - (a * 4.0d0)))) - (27.0d0 * (j * k))
else if (t <= 1.02d-10) then
tmp = (((b * c) + ((y * ((x * 18.0d0) * (z * t))) - (t * (a * 4.0d0)))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
else
tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0d0))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -1.36e+94) {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
} else if (t <= 1.02e-10) {
tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - (t * (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) tmp = 0 if t <= -1.36e+94: tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k)) elif t <= 1.02e-10: tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - (t * (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k) else: tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) tmp = 0.0 if (t <= -1.36e+94) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) - Float64(27.0 * Float64(j * k))); elseif (t <= 1.02e-10) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(z * t))) - Float64(t * Float64(a * 4.0)))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(t * Float64(Float64(t_1 + Float64(Float64(b * c) / t)) - Float64(a * 4.0))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
tmp = 0.0;
if (t <= -1.36e+94)
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
elseif (t <= 1.02e-10)
tmp = (((b * c) + ((y * ((x * 18.0) * (z * t))) - (t * (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
else
tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.36e+94], 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, 1.02e-10], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $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[(N[(t$95$1 + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $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 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -1.36 \cdot 10^{+94}:\\
\;\;\;\;\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 1.02 \cdot 10^{-10}:\\
\;\;\;\;\left(\left(b \cdot c + \left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(z \cdot t\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(t\_1 + \frac{b \cdot c}{t}\right) - a \cdot 4\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if t < -1.36e94Initial program 78.6%
Simplified85.2%
Taylor expanded in i around 0 89.5%
if -1.36e94 < t < 1.01999999999999997e-10Initial program 83.0%
pow183.0%
associate-*l*90.4%
*-commutative90.4%
Applied egg-rr90.4%
unpow190.4%
associate-*l*95.4%
*-commutative95.4%
Simplified95.4%
if 1.01999999999999997e-10 < t Initial program 84.5%
Simplified88.4%
Taylor expanded in t around inf 90.3%
Final simplification93.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* x (* y z)))))
(if (<= t -1.28e+98)
(- (+ (* b c) (* t (- t_1 (* a 4.0)))) (* 27.0 (* j k)))
(if (<= t 9e-15)
(-
(-
(+ (* b c) (- (* 18.0 (* y (* x (* z t)))) (* t (* a 4.0))))
(* (* x 4.0) i))
(* (* j 27.0) k))
(-
(* t (- (+ t_1 (/ (* b c) t)) (* a 4.0)))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -1.28e+98) {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
} else if (t <= 9e-15) {
tmp = (((b * c) + ((18.0 * (y * (x * (z * t)))) - (t * (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
if (t <= (-1.28d+98)) then
tmp = ((b * c) + (t * (t_1 - (a * 4.0d0)))) - (27.0d0 * (j * k))
else if (t <= 9d-15) then
tmp = (((b * c) + ((18.0d0 * (y * (x * (z * t)))) - (t * (a * 4.0d0)))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
else
tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0d0))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -1.28e+98) {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
} else if (t <= 9e-15) {
tmp = (((b * c) + ((18.0 * (y * (x * (z * t)))) - (t * (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) tmp = 0 if t <= -1.28e+98: tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k)) elif t <= 9e-15: tmp = (((b * c) + ((18.0 * (y * (x * (z * t)))) - (t * (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k) else: tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) tmp = 0.0 if (t <= -1.28e+98) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) - Float64(27.0 * Float64(j * k))); elseif (t <= 9e-15) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(18.0 * Float64(y * Float64(x * Float64(z * t)))) - Float64(t * Float64(a * 4.0)))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(t * Float64(Float64(t_1 + Float64(Float64(b * c) / t)) - Float64(a * 4.0))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
tmp = 0.0;
if (t <= -1.28e+98)
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
elseif (t <= 9e-15)
tmp = (((b * c) + ((18.0 * (y * (x * (z * t)))) - (t * (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
else
tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.28e+98], 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, 9e-15], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(18.0 * N[(y * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $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[(N[(t$95$1 + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $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 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -1.28 \cdot 10^{+98}:\\
\;\;\;\;\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 9 \cdot 10^{-15}:\\
\;\;\;\;\left(\left(b \cdot c + \left(18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(t\_1 + \frac{b \cdot c}{t}\right) - a \cdot 4\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if t < -1.28000000000000006e98Initial program 78.6%
Simplified85.2%
Taylor expanded in i around 0 89.5%
if -1.28000000000000006e98 < t < 8.9999999999999995e-15Initial program 83.0%
pow183.0%
associate-*l*90.4%
*-commutative90.4%
Applied egg-rr90.4%
unpow190.4%
associate-*l*95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in y around 0 82.4%
associate-*r*86.7%
*-commutative86.7%
associate-*r*93.1%
associate-*r*92.2%
*-commutative92.2%
associate-*r*95.3%
Simplified95.3%
if 8.9999999999999995e-15 < t Initial program 84.5%
Simplified88.4%
Taylor expanded in t around inf 90.3%
Final simplification93.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 (<= t -7.8e+96)
(- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (* 27.0 (* j k)))
(if (<= t 5e-222)
(-
(+ (* b c) (- (* (* z t) (* (* x 18.0) y)) (* t (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(-
(-
(- (* b c) (* t (+ (* a 4.0) (* (* y z) (* x -18.0)))))
(* (* x 4.0) i))
(* (* j 27.0) k)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -7.8e+96) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k));
} else if (t <= 5e-222) {
tmp = ((b * c) + (((z * t) * ((x * 18.0) * y)) - (t * (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-7.8d+96)) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (27.0d0 * (j * k))
else if (t <= 5d-222) then
tmp = ((b * c) + (((z * t) * ((x * 18.0d0) * y)) - (t * (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = (((b * c) - (t * ((a * 4.0d0) + ((y * z) * (x * (-18.0d0)))))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -7.8e+96) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k));
} else if (t <= 5e-222) {
tmp = ((b * c) + (((z * t) * ((x * 18.0) * y)) - (t * (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -7.8e+96: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k)) elif t <= 5e-222: tmp = ((b * c) + (((z * t) * ((x * 18.0) * y)) - (t * (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -7.8e+96) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(27.0 * Float64(j * k))); elseif (t <= 5e-222) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(Float64(z * t) * Float64(Float64(x * 18.0) * y)) - Float64(t * Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) + Float64(Float64(y * z) * Float64(x * -18.0))))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -7.8e+96)
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k));
elseif (t <= 5e-222)
tmp = ((b * c) + (((z * t) * ((x * 18.0) * y)) - (t * (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -7.8e+96], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-222], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(N[(z * t), $MachinePrecision] * N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] - N[(t * 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[(N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] * N[(x * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.8 \cdot 10^{+96}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-222}:\\
\;\;\;\;\left(b \cdot c + \left(\left(z \cdot t\right) \cdot \left(\left(x \cdot 18\right) \cdot y\right) - t \cdot \left(a \cdot 4\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c - t \cdot \left(a \cdot 4 + \left(y \cdot z\right) \cdot \left(x \cdot -18\right)\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -7.8e96Initial program 78.6%
Simplified85.2%
Taylor expanded in i around 0 89.5%
if -7.8e96 < t < 5.00000000000000008e-222Initial program 82.8%
Simplified81.1%
associate-*r*82.8%
distribute-rgt-out--82.8%
associate-*l*92.1%
*-commutative92.1%
*-commutative92.1%
Applied egg-rr92.1%
if 5.00000000000000008e-222 < t Initial program 83.9%
Taylor expanded in t around -inf 86.8%
associate-*r*86.8%
neg-mul-186.8%
cancel-sign-sub-inv86.8%
metadata-eval86.8%
associate-*r*86.8%
*-commutative86.8%
Simplified86.8%
Final simplification89.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 (<= z -5e+119) (not (<= z 7.5e+179)))
(-
(* z (+ (* -4.0 (/ (* t a) z)) (+ (* 18.0 (* t (* x y))) (/ (* b c) z))))
(* 27.0 (* j k)))
(-
(- (- (* b c) (* t (+ (* a 4.0) (* (* y z) (* x -18.0))))) (* (* x 4.0) i))
(* (* j 27.0) k))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((z <= -5e+119) || !(z <= 7.5e+179)) {
tmp = (z * ((-4.0 * ((t * a) / z)) + ((18.0 * (t * (x * y))) + ((b * c) / z)))) - (27.0 * (j * k));
} else {
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((z <= (-5d+119)) .or. (.not. (z <= 7.5d+179))) then
tmp = (z * (((-4.0d0) * ((t * a) / z)) + ((18.0d0 * (t * (x * y))) + ((b * c) / z)))) - (27.0d0 * (j * k))
else
tmp = (((b * c) - (t * ((a * 4.0d0) + ((y * z) * (x * (-18.0d0)))))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((z <= -5e+119) || !(z <= 7.5e+179)) {
tmp = (z * ((-4.0 * ((t * a) / z)) + ((18.0 * (t * (x * y))) + ((b * c) / z)))) - (27.0 * (j * k));
} else {
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (z <= -5e+119) or not (z <= 7.5e+179): tmp = (z * ((-4.0 * ((t * a) / z)) + ((18.0 * (t * (x * y))) + ((b * c) / z)))) - (27.0 * (j * k)) else: tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((z <= -5e+119) || !(z <= 7.5e+179)) tmp = Float64(Float64(z * Float64(Float64(-4.0 * Float64(Float64(t * a) / z)) + Float64(Float64(18.0 * Float64(t * Float64(x * y))) + Float64(Float64(b * c) / z)))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) + Float64(Float64(y * z) * Float64(x * -18.0))))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((z <= -5e+119) || ~((z <= 7.5e+179)))
tmp = (z * ((-4.0 * ((t * a) / z)) + ((18.0 * (t * (x * y))) + ((b * c) / z)))) - (27.0 * (j * k));
else
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[z, -5e+119], N[Not[LessEqual[z, 7.5e+179]], $MachinePrecision]], N[(N[(z * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(N[(18.0 * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] * N[(x * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $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}\;z \leq -5 \cdot 10^{+119} \lor \neg \left(z \leq 7.5 \cdot 10^{+179}\right):\\
\;\;\;\;z \cdot \left(-4 \cdot \frac{t \cdot a}{z} + \left(18 \cdot \left(t \cdot \left(x \cdot y\right)\right) + \frac{b \cdot c}{z}\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c - t \cdot \left(a \cdot 4 + \left(y \cdot z\right) \cdot \left(x \cdot -18\right)\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if z < -4.9999999999999999e119 or 7.50000000000000007e179 < z Initial program 71.2%
Simplified64.4%
Taylor expanded in i around 0 67.6%
Taylor expanded in z around inf 84.3%
if -4.9999999999999999e119 < z < 7.50000000000000007e179Initial program 86.6%
Taylor expanded in t around -inf 91.4%
associate-*r*91.4%
neg-mul-191.4%
cancel-sign-sub-inv91.4%
metadata-eval91.4%
associate-*r*91.4%
*-commutative91.4%
Simplified91.4%
Final simplification89.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 (<= z -1.25e+109) (not (<= z 3.1e+180)))
(-
(* z (+ (* -4.0 (/ (* t a) z)) (+ (* 18.0 (* t (* x y))) (/ (* b c) z))))
(* 27.0 (* j k)))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((z <= -1.25e+109) || !(z <= 3.1e+180)) {
tmp = (z * ((-4.0 * ((t * a) / z)) + ((18.0 * (t * (x * y))) + ((b * c) / z)))) - (27.0 * (j * k));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((z <= (-1.25d+109)) .or. (.not. (z <= 3.1d+180))) then
tmp = (z * (((-4.0d0) * ((t * a) / z)) + ((18.0d0 * (t * (x * y))) + ((b * c) / z)))) - (27.0d0 * (j * k))
else
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((z <= -1.25e+109) || !(z <= 3.1e+180)) {
tmp = (z * ((-4.0 * ((t * a) / z)) + ((18.0 * (t * (x * y))) + ((b * c) / z)))) - (27.0 * (j * k));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (z <= -1.25e+109) or not (z <= 3.1e+180): tmp = (z * ((-4.0 * ((t * a) / z)) + ((18.0 * (t * (x * y))) + ((b * c) / z)))) - (27.0 * (j * k)) else: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((z <= -1.25e+109) || !(z <= 3.1e+180)) tmp = Float64(Float64(z * Float64(Float64(-4.0 * Float64(Float64(t * a) / z)) + Float64(Float64(18.0 * Float64(t * Float64(x * y))) + Float64(Float64(b * c) / z)))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((z <= -1.25e+109) || ~((z <= 3.1e+180)))
tmp = (z * ((-4.0 * ((t * a) / z)) + ((18.0 * (t * (x * y))) + ((b * c) / z)))) - (27.0 * (j * k));
else
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[z, -1.25e+109], N[Not[LessEqual[z, 3.1e+180]], $MachinePrecision]], N[(N[(z * N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(N[(18.0 * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $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]]
\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}\;z \leq -1.25 \cdot 10^{+109} \lor \neg \left(z \leq 3.1 \cdot 10^{+180}\right):\\
\;\;\;\;z \cdot \left(-4 \cdot \frac{t \cdot a}{z} + \left(18 \cdot \left(t \cdot \left(x \cdot y\right)\right) + \frac{b \cdot c}{z}\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if z < -1.25e109 or 3.09999999999999998e180 < z Initial program 71.2%
Simplified64.4%
Taylor expanded in i around 0 67.6%
Taylor expanded in z around inf 84.3%
if -1.25e109 < z < 3.09999999999999998e180Initial program 86.6%
Simplified91.0%
Final simplification89.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 (<= y -7.8e+253)
(- (+ (* b c) (* (* x z) (* y (* 18.0 t)))) (* 27.0 (* j k)))
(if (<= y 7.8e+71)
(-
(+ (* b c) (* t (+ (* z (* 18.0 (* x y))) (* a -4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* z (+ (* 18.0 (* t (* x y))) (* -27.0 (/ (* j k) z)))))))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 (y <= -7.8e+253) {
tmp = ((b * c) + ((x * z) * (y * (18.0 * t)))) - (27.0 * (j * k));
} else if (y <= 7.8e+71) {
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) + (a * -4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = z * ((18.0 * (t * (x * y))) + (-27.0 * ((j * k) / z)));
}
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 (y <= (-7.8d+253)) then
tmp = ((b * c) + ((x * z) * (y * (18.0d0 * t)))) - (27.0d0 * (j * k))
else if (y <= 7.8d+71) then
tmp = ((b * c) + (t * ((z * (18.0d0 * (x * y))) + (a * (-4.0d0))))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = z * ((18.0d0 * (t * (x * y))) + ((-27.0d0) * ((j * k) / z)))
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 (y <= -7.8e+253) {
tmp = ((b * c) + ((x * z) * (y * (18.0 * t)))) - (27.0 * (j * k));
} else if (y <= 7.8e+71) {
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) + (a * -4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = z * ((18.0 * (t * (x * y))) + (-27.0 * ((j * k) / z)));
}
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 y <= -7.8e+253: tmp = ((b * c) + ((x * z) * (y * (18.0 * t)))) - (27.0 * (j * k)) elif y <= 7.8e+71: tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) + (a * -4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = z * ((18.0 * (t * (x * y))) + (-27.0 * ((j * k) / z))) 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 (y <= -7.8e+253) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(x * z) * Float64(y * Float64(18.0 * t)))) - Float64(27.0 * Float64(j * k))); elseif (y <= 7.8e+71) 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(z * Float64(Float64(18.0 * Float64(t * Float64(x * y))) + Float64(-27.0 * Float64(Float64(j * k) / z)))); 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 (y <= -7.8e+253)
tmp = ((b * c) + ((x * z) * (y * (18.0 * t)))) - (27.0 * (j * k));
elseif (y <= 7.8e+71)
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) + (a * -4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = z * ((18.0 * (t * (x * y))) + (-27.0 * ((j * k) / z)));
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[y, -7.8e+253], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(x * z), $MachinePrecision] * N[(y * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.8e+71], 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[(z * N[(N[(18.0 * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(N[(j * k), $MachinePrecision] / z), $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}\;y \leq -7.8 \cdot 10^{+253}:\\
\;\;\;\;\left(b \cdot c + \left(x \cdot z\right) \cdot \left(y \cdot \left(18 \cdot t\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+71}:\\
\;\;\;\;\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}:\\
\;\;\;\;z \cdot \left(18 \cdot \left(t \cdot \left(x \cdot y\right)\right) + -27 \cdot \frac{j \cdot k}{z}\right)\\
\end{array}
\end{array}
if y < -7.8000000000000003e253Initial program 39.2%
Simplified39.2%
Taylor expanded in i around 0 39.2%
Taylor expanded in x around inf 39.2%
associate-*r*39.2%
*-commutative39.2%
associate-*r*39.2%
associate-*l*100.0%
*-commutative100.0%
associate-*l*99.6%
*-commutative99.6%
Simplified99.6%
if -7.8000000000000003e253 < y < 7.8000000000000002e71Initial program 88.0%
Simplified89.7%
associate-*r*89.7%
distribute-rgt-out--88.0%
sub-neg88.0%
associate-*l*84.9%
*-commutative84.9%
*-commutative84.9%
Applied egg-rr84.9%
associate-*r*88.0%
distribute-rgt-neg-in88.0%
*-commutative88.0%
distribute-rgt-neg-in88.0%
metadata-eval88.0%
*-commutative88.0%
distribute-rgt-out89.7%
associate-*r*89.7%
*-commutative89.7%
*-commutative89.7%
Simplified89.7%
if 7.8000000000000002e71 < y Initial program 72.0%
Simplified72.5%
Taylor expanded in t around inf 64.2%
Taylor expanded in a around 0 56.7%
Taylor expanded in z around inf 63.7%
Final simplification83.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) -6e+77)
(* b c)
(if (<= (* b c) -1e-315)
(* y (* x (* t (* 18.0 z))))
(if (<= (* b c) 7.4e-84)
(* j (* k -27.0))
(if (<= (* b c) 1e+169) (* y (* 18.0 (* t (* x z)))) (* b c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -6e+77) {
tmp = b * c;
} else if ((b * c) <= -1e-315) {
tmp = y * (x * (t * (18.0 * z)));
} else if ((b * c) <= 7.4e-84) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 1e+169) {
tmp = y * (18.0 * (t * (x * z)));
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-6d+77)) then
tmp = b * c
else if ((b * c) <= (-1d-315)) then
tmp = y * (x * (t * (18.0d0 * z)))
else if ((b * c) <= 7.4d-84) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= 1d+169) then
tmp = y * (18.0d0 * (t * (x * z)))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -6e+77) {
tmp = b * c;
} else if ((b * c) <= -1e-315) {
tmp = y * (x * (t * (18.0 * z)));
} else if ((b * c) <= 7.4e-84) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 1e+169) {
tmp = y * (18.0 * (t * (x * z)));
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -6e+77: tmp = b * c elif (b * c) <= -1e-315: tmp = y * (x * (t * (18.0 * z))) elif (b * c) <= 7.4e-84: tmp = j * (k * -27.0) elif (b * c) <= 1e+169: tmp = y * (18.0 * (t * (x * z))) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -6e+77) tmp = Float64(b * c); elseif (Float64(b * c) <= -1e-315) tmp = Float64(y * Float64(x * Float64(t * Float64(18.0 * z)))); elseif (Float64(b * c) <= 7.4e-84) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= 1e+169) tmp = Float64(y * Float64(18.0 * Float64(t * Float64(x * z)))); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -6e+77)
tmp = b * c;
elseif ((b * c) <= -1e-315)
tmp = y * (x * (t * (18.0 * z)));
elseif ((b * c) <= 7.4e-84)
tmp = j * (k * -27.0);
elseif ((b * c) <= 1e+169)
tmp = y * (18.0 * (t * (x * z)));
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -6e+77], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1e-315], N[(y * N[(x * N[(t * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7.4e-84], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+169], N[(y * N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -6 \cdot 10^{+77}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-315}:\\
\;\;\;\;y \cdot \left(x \cdot \left(t \cdot \left(18 \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 7.4 \cdot 10^{-84}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{+169}:\\
\;\;\;\;y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -5.9999999999999996e77 or 9.99999999999999934e168 < (*.f64 b c) Initial program 82.3%
pow182.3%
associate-*l*83.5%
*-commutative83.5%
Applied egg-rr83.5%
unpow183.5%
associate-*l*87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in b around inf 66.7%
if -5.9999999999999996e77 < (*.f64 b c) < -9.999999985e-316Initial program 90.3%
Simplified88.8%
Taylor expanded in x around inf 50.7%
Taylor expanded in y around inf 48.9%
Taylor expanded in i around 0 40.1%
*-commutative40.1%
*-commutative40.1%
associate-*l*41.5%
*-commutative41.5%
associate-*r*41.5%
*-commutative41.5%
associate-*r*41.6%
*-commutative41.6%
associate-*l*41.5%
Simplified41.5%
if -9.999999985e-316 < (*.f64 b c) < 7.3999999999999999e-84Initial program 79.6%
Simplified88.2%
Taylor expanded in j around inf 43.9%
*-commutative43.9%
associate-*r*45.5%
*-commutative45.5%
Simplified45.5%
if 7.3999999999999999e-84 < (*.f64 b c) < 9.99999999999999934e168Initial program 77.5%
Simplified79.5%
Taylor expanded in x around inf 46.6%
Taylor expanded in y around inf 52.4%
Taylor expanded in i around 0 43.8%
Final simplification50.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 (* y (* 18.0 (* t (* x z))))))
(if (<= (* b c) -1.34e+79)
(* b c)
(if (<= (* b c) -1e-315)
t_1
(if (<= (* b c) 1.7e-85)
(* j (* k -27.0))
(if (<= (* b c) 1.55e+168) t_1 (* 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 = y * (18.0 * (t * (x * z)));
double tmp;
if ((b * c) <= -1.34e+79) {
tmp = b * c;
} else if ((b * c) <= -1e-315) {
tmp = t_1;
} else if ((b * c) <= 1.7e-85) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 1.55e+168) {
tmp = t_1;
} 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 = y * (18.0d0 * (t * (x * z)))
if ((b * c) <= (-1.34d+79)) then
tmp = b * c
else if ((b * c) <= (-1d-315)) then
tmp = t_1
else if ((b * c) <= 1.7d-85) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= 1.55d+168) then
tmp = t_1
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 = y * (18.0 * (t * (x * z)));
double tmp;
if ((b * c) <= -1.34e+79) {
tmp = b * c;
} else if ((b * c) <= -1e-315) {
tmp = t_1;
} else if ((b * c) <= 1.7e-85) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 1.55e+168) {
tmp = t_1;
} 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 = y * (18.0 * (t * (x * z))) tmp = 0 if (b * c) <= -1.34e+79: tmp = b * c elif (b * c) <= -1e-315: tmp = t_1 elif (b * c) <= 1.7e-85: tmp = j * (k * -27.0) elif (b * c) <= 1.55e+168: tmp = t_1 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(y * Float64(18.0 * Float64(t * Float64(x * z)))) tmp = 0.0 if (Float64(b * c) <= -1.34e+79) tmp = Float64(b * c); elseif (Float64(b * c) <= -1e-315) tmp = t_1; elseif (Float64(b * c) <= 1.7e-85) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= 1.55e+168) tmp = t_1; 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 = y * (18.0 * (t * (x * z)));
tmp = 0.0;
if ((b * c) <= -1.34e+79)
tmp = b * c;
elseif ((b * c) <= -1e-315)
tmp = t_1;
elseif ((b * c) <= 1.7e-85)
tmp = j * (k * -27.0);
elseif ((b * c) <= 1.55e+168)
tmp = t_1;
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[(y * N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.34e+79], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1e-315], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.7e-85], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.55e+168], t$95$1, 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 := y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -1.34 \cdot 10^{+79}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-315}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.7 \cdot 10^{-85}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 1.55 \cdot 10^{+168}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.33999999999999993e79 or 1.54999999999999998e168 < (*.f64 b c) Initial program 82.3%
pow182.3%
associate-*l*83.5%
*-commutative83.5%
Applied egg-rr83.5%
unpow183.5%
associate-*l*87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in b around inf 66.7%
if -1.33999999999999993e79 < (*.f64 b c) < -9.999999985e-316 or 1.7e-85 < (*.f64 b c) < 1.54999999999999998e168Initial program 84.1%
Simplified84.3%
Taylor expanded in x around inf 48.7%
Taylor expanded in y around inf 50.6%
Taylor expanded in i around 0 41.9%
if -9.999999985e-316 < (*.f64 b c) < 1.7e-85Initial program 79.6%
Simplified88.2%
Taylor expanded in j around inf 43.9%
*-commutative43.9%
associate-*r*45.5%
*-commutative45.5%
Simplified45.5%
Final simplification50.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)))) (t_2 (+ (* b c) (* t (- t_1 (* a 4.0))))))
(if (<= t -4.6e+102)
t_2
(if (<= t -2.65)
(+ (* t (+ t_1 (* a -4.0))) (* j (* k -27.0)))
(if (<= t 1.1e+76)
(- (- (+ (* b c) (* -4.0 (* t a))) (* (* x 4.0) i)) (* (* j 27.0) k))
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 = 18.0 * (x * (y * z));
double t_2 = (b * c) + (t * (t_1 - (a * 4.0)));
double tmp;
if (t <= -4.6e+102) {
tmp = t_2;
} else if (t <= -2.65) {
tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
} else if (t <= 1.1e+76) {
tmp = (((b * c) + (-4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} 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 = 18.0d0 * (x * (y * z))
t_2 = (b * c) + (t * (t_1 - (a * 4.0d0)))
if (t <= (-4.6d+102)) then
tmp = t_2
else if (t <= (-2.65d0)) then
tmp = (t * (t_1 + (a * (-4.0d0)))) + (j * (k * (-27.0d0)))
else if (t <= 1.1d+76) then
tmp = (((b * c) + ((-4.0d0) * (t * a))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
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 = 18.0 * (x * (y * z));
double t_2 = (b * c) + (t * (t_1 - (a * 4.0)));
double tmp;
if (t <= -4.6e+102) {
tmp = t_2;
} else if (t <= -2.65) {
tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
} else if (t <= 1.1e+76) {
tmp = (((b * c) + (-4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} 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 = 18.0 * (x * (y * z)) t_2 = (b * c) + (t * (t_1 - (a * 4.0))) tmp = 0 if t <= -4.6e+102: tmp = t_2 elif t <= -2.65: tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0)) elif t <= 1.1e+76: tmp = (((b * c) + (-4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k) 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(18.0 * Float64(x * Float64(y * z))) t_2 = Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) tmp = 0.0 if (t <= -4.6e+102) tmp = t_2; elseif (t <= -2.65) tmp = Float64(Float64(t * Float64(t_1 + Float64(a * -4.0))) + Float64(j * Float64(k * -27.0))); elseif (t <= 1.1e+76) 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 = 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 = 18.0 * (x * (y * z));
t_2 = (b * c) + (t * (t_1 - (a * 4.0)));
tmp = 0.0;
if (t <= -4.6e+102)
tmp = t_2;
elseif (t <= -2.65)
tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
elseif (t <= 1.1e+76)
tmp = (((b * c) + (-4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
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[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.6e+102], t$95$2, If[LessEqual[t, -2.65], 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, 1.1e+76], 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], 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 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{+102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.65:\\
\;\;\;\;t \cdot \left(t\_1 + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+76}:\\
\;\;\;\;\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\_2\\
\end{array}
\end{array}
if t < -4.5999999999999998e102 or 1.1e76 < t Initial program 79.9%
Simplified84.7%
Taylor expanded in i around 0 86.0%
Taylor expanded in j around 0 86.3%
if -4.5999999999999998e102 < t < -2.64999999999999991Initial program 85.9%
Simplified92.8%
Taylor expanded in t around inf 84.8%
if -2.64999999999999991 < t < 1.1e76Initial program 83.3%
pow183.3%
associate-*l*90.8%
*-commutative90.8%
Applied egg-rr90.8%
unpow190.8%
associate-*l*94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in y around 0 85.7%
*-commutative85.7%
Simplified85.7%
Final simplification85.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 (* 18.0 (* x (* y z)))) (t_2 (+ (* b c) (* t (- t_1 (* a 4.0))))))
(if (<= t -1.75e+102)
t_2
(if (<= t -0.032)
(+ (* t (+ t_1 (* a -4.0))) (* j (* k -27.0)))
(if (<= t 4e+73)
(- (* b (+ c (/ (* -4.0 (+ (* t a) (* x i))) b))) (* (* j 27.0) k))
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 = 18.0 * (x * (y * z));
double t_2 = (b * c) + (t * (t_1 - (a * 4.0)));
double tmp;
if (t <= -1.75e+102) {
tmp = t_2;
} else if (t <= -0.032) {
tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
} else if (t <= 4e+73) {
tmp = (b * (c + ((-4.0 * ((t * a) + (x * i))) / b))) - ((j * 27.0) * k);
} 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 = 18.0d0 * (x * (y * z))
t_2 = (b * c) + (t * (t_1 - (a * 4.0d0)))
if (t <= (-1.75d+102)) then
tmp = t_2
else if (t <= (-0.032d0)) then
tmp = (t * (t_1 + (a * (-4.0d0)))) + (j * (k * (-27.0d0)))
else if (t <= 4d+73) then
tmp = (b * (c + (((-4.0d0) * ((t * a) + (x * i))) / b))) - ((j * 27.0d0) * k)
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 = 18.0 * (x * (y * z));
double t_2 = (b * c) + (t * (t_1 - (a * 4.0)));
double tmp;
if (t <= -1.75e+102) {
tmp = t_2;
} else if (t <= -0.032) {
tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
} else if (t <= 4e+73) {
tmp = (b * (c + ((-4.0 * ((t * a) + (x * i))) / b))) - ((j * 27.0) * k);
} 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 = 18.0 * (x * (y * z)) t_2 = (b * c) + (t * (t_1 - (a * 4.0))) tmp = 0 if t <= -1.75e+102: tmp = t_2 elif t <= -0.032: tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0)) elif t <= 4e+73: tmp = (b * (c + ((-4.0 * ((t * a) + (x * i))) / b))) - ((j * 27.0) * k) 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(18.0 * Float64(x * Float64(y * z))) t_2 = Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) tmp = 0.0 if (t <= -1.75e+102) tmp = t_2; elseif (t <= -0.032) tmp = Float64(Float64(t * Float64(t_1 + Float64(a * -4.0))) + Float64(j * Float64(k * -27.0))); elseif (t <= 4e+73) tmp = Float64(Float64(b * Float64(c + Float64(Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) / b))) - Float64(Float64(j * 27.0) * k)); 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 = 18.0 * (x * (y * z));
t_2 = (b * c) + (t * (t_1 - (a * 4.0)));
tmp = 0.0;
if (t <= -1.75e+102)
tmp = t_2;
elseif (t <= -0.032)
tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
elseif (t <= 4e+73)
tmp = (b * (c + ((-4.0 * ((t * a) + (x * i))) / b))) - ((j * 27.0) * k);
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[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.75e+102], t$95$2, If[LessEqual[t, -0.032], 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, 4e+73], N[(N[(b * N[(c + N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{+102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -0.032:\\
\;\;\;\;t \cdot \left(t\_1 + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+73}:\\
\;\;\;\;b \cdot \left(c + \frac{-4 \cdot \left(t \cdot a + x \cdot i\right)}{b}\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.75000000000000005e102 or 3.99999999999999993e73 < t Initial program 79.9%
Simplified84.7%
Taylor expanded in i around 0 86.0%
Taylor expanded in j around 0 86.3%
if -1.75000000000000005e102 < t < -0.032000000000000001Initial program 85.9%
Simplified92.8%
Taylor expanded in t around inf 84.8%
if -0.032000000000000001 < t < 3.99999999999999993e73Initial program 83.3%
pow183.3%
associate-*l*90.8%
*-commutative90.8%
Applied egg-rr90.8%
unpow190.8%
associate-*l*94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in y around 0 85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in b around inf 78.3%
associate--l+78.3%
associate-*r/78.3%
associate-*r/78.3%
div-sub78.3%
Simplified78.3%
Final simplification81.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 (* x (* y z))) (t_2 (* t (+ (* 18.0 t_1) (* a -4.0)))))
(if (<= t -2.5e+37)
t_2
(if (<= t -800000000000.0)
(+ (* (* j k) -27.0) (* 18.0 (* t t_1)))
(if (or (<= t -2.5) (not (<= t 6e+44)))
t_2
(- (* 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 t_1 = x * (y * z);
double t_2 = t * ((18.0 * t_1) + (a * -4.0));
double tmp;
if (t <= -2.5e+37) {
tmp = t_2;
} else if (t <= -800000000000.0) {
tmp = ((j * k) * -27.0) + (18.0 * (t * t_1));
} else if ((t <= -2.5) || !(t <= 6e+44)) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (y * z)
t_2 = t * ((18.0d0 * t_1) + (a * (-4.0d0)))
if (t <= (-2.5d+37)) then
tmp = t_2
else if (t <= (-800000000000.0d0)) then
tmp = ((j * k) * (-27.0d0)) + (18.0d0 * (t * t_1))
else if ((t <= (-2.5d0)) .or. (.not. (t <= 6d+44))) then
tmp = t_2
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 t_1 = x * (y * z);
double t_2 = t * ((18.0 * t_1) + (a * -4.0));
double tmp;
if (t <= -2.5e+37) {
tmp = t_2;
} else if (t <= -800000000000.0) {
tmp = ((j * k) * -27.0) + (18.0 * (t * t_1));
} else if ((t <= -2.5) || !(t <= 6e+44)) {
tmp = t_2;
} 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): t_1 = x * (y * z) t_2 = t * ((18.0 * t_1) + (a * -4.0)) tmp = 0 if t <= -2.5e+37: tmp = t_2 elif t <= -800000000000.0: tmp = ((j * k) * -27.0) + (18.0 * (t * t_1)) elif (t <= -2.5) or not (t <= 6e+44): tmp = t_2 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) t_1 = Float64(x * Float64(y * z)) t_2 = Float64(t * Float64(Float64(18.0 * t_1) + Float64(a * -4.0))) tmp = 0.0 if (t <= -2.5e+37) tmp = t_2; elseif (t <= -800000000000.0) tmp = Float64(Float64(Float64(j * k) * -27.0) + Float64(18.0 * Float64(t * t_1))); elseif ((t <= -2.5) || !(t <= 6e+44)) tmp = t_2; 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)
t_1 = x * (y * z);
t_2 = t * ((18.0 * t_1) + (a * -4.0));
tmp = 0.0;
if (t <= -2.5e+37)
tmp = t_2;
elseif (t <= -800000000000.0)
tmp = ((j * k) * -27.0) + (18.0 * (t * t_1));
elseif ((t <= -2.5) || ~((t <= 6e+44)))
tmp = t_2;
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_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * t$95$1), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.5e+37], t$95$2, If[LessEqual[t, -800000000000.0], N[(N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision] + N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -2.5], N[Not[LessEqual[t, 6e+44]], $MachinePrecision]], t$95$2, 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}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := t \cdot \left(18 \cdot t\_1 + a \cdot -4\right)\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{+37}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -800000000000:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27 + 18 \cdot \left(t \cdot t\_1\right)\\
\mathbf{elif}\;t \leq -2.5 \lor \neg \left(t \leq 6 \cdot 10^{+44}\right):\\
\;\;\;\;t\_2\\
\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 < -2.49999999999999994e37 or -8e11 < t < -2.5 or 5.99999999999999974e44 < t Initial program 81.4%
Simplified88.9%
Taylor expanded in t around inf 76.8%
Taylor expanded in t around inf 73.6%
if -2.49999999999999994e37 < t < -8e11Initial program 90.3%
Simplified90.3%
Taylor expanded in t around inf 90.4%
Taylor expanded in a around 0 90.4%
if -2.5 < t < 5.99999999999999974e44Initial program 82.7%
Simplified80.8%
Taylor expanded in t around 0 77.5%
Final simplification76.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 (* t (+ (* 18.0 (* x (* y z))) (* a -4.0)))))
(if (<= t -0.88)
t_1
(if (<= t 1e-137)
(- (* b c) (* (* j 27.0) k))
(if (<= t 1.15e-24)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(if (<= t 9500000000000.0) (+ (* 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 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
double tmp;
if (t <= -0.88) {
tmp = t_1;
} else if (t <= 1e-137) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (t <= 1.15e-24) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 9500000000000.0) {
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 = t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))
if (t <= (-0.88d0)) then
tmp = t_1
else if (t <= 1d-137) then
tmp = (b * c) - ((j * 27.0d0) * k)
else if (t <= 1.15d-24) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else if (t <= 9500000000000.0d0) 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 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
double tmp;
if (t <= -0.88) {
tmp = t_1;
} else if (t <= 1e-137) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (t <= 1.15e-24) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 9500000000000.0) {
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 = t * ((18.0 * (x * (y * z))) + (a * -4.0)) tmp = 0 if t <= -0.88: tmp = t_1 elif t <= 1e-137: tmp = (b * c) - ((j * 27.0) * k) elif t <= 1.15e-24: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) elif t <= 9500000000000.0: 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(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0))) tmp = 0.0 if (t <= -0.88) tmp = t_1; elseif (t <= 1e-137) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); elseif (t <= 1.15e-24) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); elseif (t <= 9500000000000.0) 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 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
tmp = 0.0;
if (t <= -0.88)
tmp = t_1;
elseif (t <= 1e-137)
tmp = (b * c) - ((j * 27.0) * k);
elseif (t <= 1.15e-24)
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
elseif (t <= 9500000000000.0)
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[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -0.88], t$95$1, If[LessEqual[t, 1e-137], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e-24], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9500000000000.0], 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 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -0.88:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 10^{-137}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-24}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 9500000000000:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -0.880000000000000004 or 9.5e12 < t Initial program 82.8%
Simplified89.4%
Taylor expanded in t around inf 77.1%
Taylor expanded in t around inf 70.5%
if -0.880000000000000004 < t < 9.99999999999999978e-138Initial program 80.1%
Simplified79.3%
Taylor expanded in t around 0 83.1%
Taylor expanded in i around 0 66.0%
associate-*r*65.9%
Simplified65.9%
if 9.99999999999999978e-138 < t < 1.1500000000000001e-24Initial program 91.5%
Simplified87.4%
Taylor expanded in x around inf 53.9%
pow153.9%
Applied egg-rr53.9%
unpow153.9%
*-commutative53.9%
associate-*r*57.9%
Simplified57.9%
if 1.1500000000000001e-24 < t < 9.5e12Initial program 83.1%
Simplified68.3%
Taylor expanded in b around inf 99.7%
Final simplification68.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (+ (* 18.0 (* x (* y z))) (* a -4.0)))))
(if (<= t -0.0046)
t_1
(if (<= t 4.6e-137)
(- (* b c) (* (* j 27.0) k))
(if (<= t 1.72e-90)
(* y (* x (* t (* 18.0 z))))
(if (<= t 5.5e+43) (- (* b c) (* (* x 4.0) i)) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
double tmp;
if (t <= -0.0046) {
tmp = t_1;
} else if (t <= 4.6e-137) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (t <= 1.72e-90) {
tmp = y * (x * (t * (18.0 * z)));
} else if (t <= 5.5e+43) {
tmp = (b * c) - ((x * 4.0) * i);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))
if (t <= (-0.0046d0)) then
tmp = t_1
else if (t <= 4.6d-137) then
tmp = (b * c) - ((j * 27.0d0) * k)
else if (t <= 1.72d-90) then
tmp = y * (x * (t * (18.0d0 * z)))
else if (t <= 5.5d+43) then
tmp = (b * c) - ((x * 4.0d0) * i)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
double tmp;
if (t <= -0.0046) {
tmp = t_1;
} else if (t <= 4.6e-137) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (t <= 1.72e-90) {
tmp = y * (x * (t * (18.0 * z)));
} else if (t <= 5.5e+43) {
tmp = (b * c) - ((x * 4.0) * i);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) + (a * -4.0)) tmp = 0 if t <= -0.0046: tmp = t_1 elif t <= 4.6e-137: tmp = (b * c) - ((j * 27.0) * k) elif t <= 1.72e-90: tmp = y * (x * (t * (18.0 * z))) elif t <= 5.5e+43: tmp = (b * c) - ((x * 4.0) * i) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0))) tmp = 0.0 if (t <= -0.0046) tmp = t_1; elseif (t <= 4.6e-137) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); elseif (t <= 1.72e-90) tmp = Float64(y * Float64(x * Float64(t * Float64(18.0 * z)))); elseif (t <= 5.5e+43) tmp = Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
tmp = 0.0;
if (t <= -0.0046)
tmp = t_1;
elseif (t <= 4.6e-137)
tmp = (b * c) - ((j * 27.0) * k);
elseif (t <= 1.72e-90)
tmp = y * (x * (t * (18.0 * z)));
elseif (t <= 5.5e+43)
tmp = (b * c) - ((x * 4.0) * i);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -0.0046], t$95$1, If[LessEqual[t, 4.6e-137], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.72e-90], N[(y * N[(x * N[(t * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+43], N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -0.0046:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-137}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq 1.72 \cdot 10^{-90}:\\
\;\;\;\;y \cdot \left(x \cdot \left(t \cdot \left(18 \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+43}:\\
\;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -0.0045999999999999999 or 5.49999999999999989e43 < t Initial program 82.2%
Simplified89.0%
Taylor expanded in t around inf 78.0%
Taylor expanded in t around inf 71.2%
if -0.0045999999999999999 < t < 4.60000000000000016e-137Initial program 79.3%
Simplified78.5%
Taylor expanded in t around 0 83.3%
Taylor expanded in i around 0 66.3%
associate-*r*66.2%
Simplified66.2%
if 4.60000000000000016e-137 < t < 1.72e-90Initial program 90.5%
Simplified81.0%
Taylor expanded in x around inf 61.0%
Taylor expanded in y around inf 70.6%
Taylor expanded in i around 0 70.6%
*-commutative70.6%
*-commutative70.6%
associate-*l*70.3%
*-commutative70.3%
associate-*r*70.3%
*-commutative70.3%
associate-*r*70.8%
*-commutative70.8%
associate-*l*70.8%
Simplified70.8%
if 1.72e-90 < t < 5.49999999999999989e43Initial program 95.4%
Simplified91.3%
Taylor expanded in t around 0 74.1%
Taylor expanded in i around inf 60.2%
associate-*r*56.1%
*-commutative56.1%
associate-*r*60.2%
Simplified60.2%
Final simplification68.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* x (* y z)))) (t_2 (+ (* b c) (* t (- t_1 (* a 4.0))))))
(if (<= t -1.5e+102)
t_2
(if (<= t -1.85)
(+ (* t (+ t_1 (* a -4.0))) (* j (* k -27.0)))
(if (<= t 4.4e-137)
(- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))
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 = 18.0 * (x * (y * z));
double t_2 = (b * c) + (t * (t_1 - (a * 4.0)));
double tmp;
if (t <= -1.5e+102) {
tmp = t_2;
} else if (t <= -1.85) {
tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
} else if (t <= 4.4e-137) {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} 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 = 18.0d0 * (x * (y * z))
t_2 = (b * c) + (t * (t_1 - (a * 4.0d0)))
if (t <= (-1.5d+102)) then
tmp = t_2
else if (t <= (-1.85d0)) then
tmp = (t * (t_1 + (a * (-4.0d0)))) + (j * (k * (-27.0d0)))
else if (t <= 4.4d-137) then
tmp = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
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 = 18.0 * (x * (y * z));
double t_2 = (b * c) + (t * (t_1 - (a * 4.0)));
double tmp;
if (t <= -1.5e+102) {
tmp = t_2;
} else if (t <= -1.85) {
tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
} else if (t <= 4.4e-137) {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} 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 = 18.0 * (x * (y * z)) t_2 = (b * c) + (t * (t_1 - (a * 4.0))) tmp = 0 if t <= -1.5e+102: tmp = t_2 elif t <= -1.85: tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0)) elif t <= 4.4e-137: tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i))) 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(18.0 * Float64(x * Float64(y * z))) t_2 = Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) tmp = 0.0 if (t <= -1.5e+102) tmp = t_2; elseif (t <= -1.85) tmp = Float64(Float64(t * Float64(t_1 + Float64(a * -4.0))) + Float64(j * Float64(k * -27.0))); elseif (t <= 4.4e-137) tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); 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 = 18.0 * (x * (y * z));
t_2 = (b * c) + (t * (t_1 - (a * 4.0)));
tmp = 0.0;
if (t <= -1.5e+102)
tmp = t_2;
elseif (t <= -1.85)
tmp = (t * (t_1 + (a * -4.0))) + (j * (k * -27.0));
elseif (t <= 4.4e-137)
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
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[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.5e+102], t$95$2, If[LessEqual[t, -1.85], 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.4e-137], N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{+102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.85:\\
\;\;\;\;t \cdot \left(t\_1 + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-137}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.4999999999999999e102 or 4.4000000000000002e-137 < t Initial program 84.4%
Simplified86.2%
Taylor expanded in i around 0 83.9%
Taylor expanded in j around 0 81.8%
if -1.4999999999999999e102 < t < -1.8500000000000001Initial program 85.9%
Simplified92.8%
Taylor expanded in t around inf 84.8%
if -1.8500000000000001 < t < 4.4000000000000002e-137Initial program 79.3%
Simplified78.5%
Taylor expanded in t around 0 83.3%
Final simplification82.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 (* y (* 18.0 (* t (* x z))))))
(if (<= x -1.1e+155)
t_1
(if (<= x 3.8e+67)
(- (* b c) (* (* j 27.0) k))
(if (or (<= x 1.4e+126) (not (<= x 4e+169)))
t_1
(- (* 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 = y * (18.0 * (t * (x * z)));
double tmp;
if (x <= -1.1e+155) {
tmp = t_1;
} else if (x <= 3.8e+67) {
tmp = (b * c) - ((j * 27.0) * k);
} else if ((x <= 1.4e+126) || !(x <= 4e+169)) {
tmp = t_1;
} 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 = y * (18.0d0 * (t * (x * z)))
if (x <= (-1.1d+155)) then
tmp = t_1
else if (x <= 3.8d+67) then
tmp = (b * c) - ((j * 27.0d0) * k)
else if ((x <= 1.4d+126) .or. (.not. (x <= 4d+169))) then
tmp = t_1
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 = y * (18.0 * (t * (x * z)));
double tmp;
if (x <= -1.1e+155) {
tmp = t_1;
} else if (x <= 3.8e+67) {
tmp = (b * c) - ((j * 27.0) * k);
} else if ((x <= 1.4e+126) || !(x <= 4e+169)) {
tmp = t_1;
} 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 = y * (18.0 * (t * (x * z))) tmp = 0 if x <= -1.1e+155: tmp = t_1 elif x <= 3.8e+67: tmp = (b * c) - ((j * 27.0) * k) elif (x <= 1.4e+126) or not (x <= 4e+169): tmp = t_1 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(y * Float64(18.0 * Float64(t * Float64(x * z)))) tmp = 0.0 if (x <= -1.1e+155) tmp = t_1; elseif (x <= 3.8e+67) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); elseif ((x <= 1.4e+126) || !(x <= 4e+169)) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(Float64(x * 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 = y * (18.0 * (t * (x * z)));
tmp = 0.0;
if (x <= -1.1e+155)
tmp = t_1;
elseif (x <= 3.8e+67)
tmp = (b * c) - ((j * 27.0) * k);
elseif ((x <= 1.4e+126) || ~((x <= 4e+169)))
tmp = t_1;
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[(y * N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.1e+155], t$95$1, If[LessEqual[x, 3.8e+67], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 1.4e+126], N[Not[LessEqual[x, 4e+169]], $MachinePrecision]], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $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 := y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+67}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{+126} \lor \neg \left(x \leq 4 \cdot 10^{+169}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(x \cdot 4\right) \cdot i\\
\end{array}
\end{array}
if x < -1.1000000000000001e155 or 3.8000000000000002e67 < x < 1.40000000000000005e126 or 3.99999999999999974e169 < x Initial program 70.4%
Simplified79.8%
Taylor expanded in x around inf 79.1%
Taylor expanded in y around inf 64.1%
Taylor expanded in i around 0 63.1%
if -1.1000000000000001e155 < x < 3.8000000000000002e67Initial program 88.2%
Simplified85.6%
Taylor expanded in t around 0 62.2%
Taylor expanded in i around 0 56.3%
associate-*r*56.2%
Simplified56.2%
if 1.40000000000000005e126 < x < 3.99999999999999974e169Initial program 76.8%
Simplified84.4%
Taylor expanded in t around 0 77.7%
Taylor expanded in i around inf 67.3%
associate-*r*67.3%
*-commutative67.3%
associate-*r*67.3%
Simplified67.3%
Final simplification58.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -8.5e+154) (not (<= x 6.7e+65))) (* x (- (* 18.0 (* y (* z t))) (* 4.0 i))) (- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -8.5e+154) || !(x <= 6.7e+65)) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-8.5d+154)) .or. (.not. (x <= 6.7d+65))) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -8.5e+154) || !(x <= 6.7e+65)) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -8.5e+154) or not (x <= 6.7e+65): tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) else: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -8.5e+154) || !(x <= 6.7e+65)) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -8.5e+154) || ~((x <= 6.7e+65)))
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
else
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -8.5e+154], N[Not[LessEqual[x, 6.7e+65]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+154} \lor \neg \left(x \leq 6.7 \cdot 10^{+65}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if x < -8.5000000000000002e154 or 6.6999999999999997e65 < x Initial program 72.0%
Simplified80.9%
Taylor expanded in x around inf 75.5%
pow175.5%
Applied egg-rr75.5%
unpow175.5%
*-commutative75.5%
associate-*r*77.7%
Simplified77.7%
if -8.5000000000000002e154 < x < 6.6999999999999997e65Initial program 88.1%
Simplified85.4%
Taylor expanded in x around 0 77.8%
Final simplification77.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 (if (or (<= x -1.9e+155) (not (<= x 3e+67))) (* y (* 18.0 (* t (* x z)))) (- (* b c) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.9e+155) || !(x <= 3e+67)) {
tmp = y * (18.0 * (t * (x * z)));
} else {
tmp = (b * c) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-1.9d+155)) .or. (.not. (x <= 3d+67))) then
tmp = y * (18.0d0 * (t * (x * z)))
else
tmp = (b * c) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.9e+155) || !(x <= 3e+67)) {
tmp = y * (18.0 * (t * (x * z)));
} else {
tmp = (b * c) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -1.9e+155) or not (x <= 3e+67): tmp = y * (18.0 * (t * (x * z))) else: tmp = (b * c) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -1.9e+155) || !(x <= 3e+67)) tmp = Float64(y * Float64(18.0 * Float64(t * Float64(x * z)))); else tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -1.9e+155) || ~((x <= 3e+67)))
tmp = y * (18.0 * (t * (x * z)));
else
tmp = (b * c) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -1.9e+155], N[Not[LessEqual[x, 3e+67]], $MachinePrecision]], N[(y * N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{+155} \lor \neg \left(x \leq 3 \cdot 10^{+67}\right):\\
\;\;\;\;y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if x < -1.9e155 or 3.0000000000000001e67 < x Initial program 71.4%
Simplified80.4%
Taylor expanded in x around inf 76.1%
Taylor expanded in y around inf 60.5%
Taylor expanded in i around 0 56.2%
if -1.9e155 < x < 3.0000000000000001e67Initial program 88.2%
Simplified85.6%
Taylor expanded in t around 0 62.2%
Taylor expanded in i around 0 56.3%
associate-*r*56.2%
Simplified56.2%
Final simplification56.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 (<= x -8.6e+154) (not (<= x 1.36e+66))) (* y (* 18.0 (* t (* x z)))) (+ (* 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 ((x <= -8.6e+154) || !(x <= 1.36e+66)) {
tmp = y * (18.0 * (t * (x * z)));
} else {
tmp = (b * c) + (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 ((x <= (-8.6d+154)) .or. (.not. (x <= 1.36d+66))) then
tmp = y * (18.0d0 * (t * (x * z)))
else
tmp = (b * c) + (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 ((x <= -8.6e+154) || !(x <= 1.36e+66)) {
tmp = y * (18.0 * (t * (x * z)));
} else {
tmp = (b * c) + (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 (x <= -8.6e+154) or not (x <= 1.36e+66): tmp = y * (18.0 * (t * (x * z))) else: tmp = (b * c) + (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 ((x <= -8.6e+154) || !(x <= 1.36e+66)) tmp = Float64(y * Float64(18.0 * Float64(t * Float64(x * z)))); else tmp = Float64(Float64(b * c) + 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)
tmp = 0.0;
if ((x <= -8.6e+154) || ~((x <= 1.36e+66)))
tmp = y * (18.0 * (t * (x * z)));
else
tmp = (b * c) + (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[x, -8.6e+154], N[Not[LessEqual[x, 1.36e+66]], $MachinePrecision]], N[(y * N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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}
\mathbf{if}\;x \leq -8.6 \cdot 10^{+154} \lor \neg \left(x \leq 1.36 \cdot 10^{+66}\right):\\
\;\;\;\;y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if x < -8.5999999999999995e154 or 1.36e66 < x Initial program 71.4%
Simplified80.4%
Taylor expanded in x around inf 76.1%
Taylor expanded in y around inf 60.5%
Taylor expanded in i around 0 56.2%
if -8.5999999999999995e154 < x < 1.36e66Initial program 88.2%
Simplified86.1%
Taylor expanded in b around inf 56.3%
Final simplification56.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) -7.5e+85) (not (<= (* b c) 7.8e+160))) (* 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) <= -7.5e+85) || !((b * c) <= 7.8e+160)) {
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) <= (-7.5d+85)) .or. (.not. ((b * c) <= 7.8d+160))) 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) <= -7.5e+85) || !((b * c) <= 7.8e+160)) {
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) <= -7.5e+85) or not ((b * c) <= 7.8e+160): 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) <= -7.5e+85) || !(Float64(b * c) <= 7.8e+160)) 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) <= -7.5e+85) || ~(((b * c) <= 7.8e+160)))
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], -7.5e+85], N[Not[LessEqual[N[(b * c), $MachinePrecision], 7.8e+160]], $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 -7.5 \cdot 10^{+85} \lor \neg \left(b \cdot c \leq 7.8 \cdot 10^{+160}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -7.49999999999999942e85 or 7.80000000000000014e160 < (*.f64 b c) Initial program 82.3%
pow182.3%
associate-*l*82.3%
*-commutative82.3%
Applied egg-rr82.3%
unpow182.3%
associate-*l*87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in b around inf 66.6%
if -7.49999999999999942e85 < (*.f64 b c) < 7.80000000000000014e160Initial program 82.6%
Simplified85.6%
Taylor expanded in j around inf 27.6%
Final simplification39.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 (* 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 82.5%
pow182.5%
associate-*l*83.2%
*-commutative83.2%
Applied egg-rr83.2%
unpow183.2%
associate-*l*85.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in b around inf 24.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 2024087
(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)))