
(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 24 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 (* 18.0 (* y (* z t)))) (- (* b c) (* a (* t 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
(t_2
(-
(-
(- (* b c) (- (* t (* a 4.0)) (* (* (* (* x 18.0) y) z) t)))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 5e+306)
t_2
(if (<= t_2 INFINITY)
t_1
(* t (+ (* (* x 18.0) (* y z)) (* a -4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((x * (18.0 * (y * (z * t)))) + ((b * c) - (a * (t * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
double t_2 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= 5e+306) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
}
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 * (18.0 * (y * (z * t)))) + ((b * c) - (a * (t * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
double t_2 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= 5e+306) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((x * (18.0 * (y * (z * t)))) + ((b * c) - (a * (t * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) t_2 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= 5e+306: tmp = t_2 elif t_2 <= math.inf: tmp = t_1 else: tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))) + Float64(Float64(b * c) - Float64(a * Float64(t * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))) t_2 = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(t * Float64(a * 4.0)) - Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= 5e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = t_1; else tmp = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((x * (18.0 * (y * (z * t)))) + ((b * c) - (a * (t * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
t_2 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_2 <= -Inf)
tmp = t_1;
elseif (t_2 <= 5e+306)
tmp = t_2;
elseif (t_2 <= Inf)
tmp = t_1;
else
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(a * N[(t * 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]}, Block[{t$95$2 = N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 5e+306], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$1, N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + \left(b \cdot c - a \cdot \left(t \cdot 4\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
t_2 := \left(\left(b \cdot c - \left(t \cdot \left(a \cdot 4\right) - \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < -inf.0 or 4.99999999999999993e306 < (-.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 86.4%
Simplified89.7%
associate-*r*86.4%
distribute-rgt-out--86.4%
associate-+l-86.4%
associate-*l*93.1%
fmm-def93.1%
associate-*l*93.2%
*-commutative93.2%
Applied egg-rr93.2%
fmm-undef93.2%
*-commutative93.2%
associate-*r*93.2%
*-commutative93.2%
*-commutative93.2%
*-commutative93.2%
associate-*l*93.2%
*-commutative93.2%
*-commutative93.2%
Simplified93.2%
pow193.2%
associate-*l*98.2%
Applied egg-rr98.2%
unpow198.2%
associate-*l*98.1%
Simplified98.1%
if -inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < 4.99999999999999993e306Initial program 99.8%
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.0%
associate-*r*18.8%
distribute-rgt-out--0.0%
associate-+l-0.0%
associate-*l*6.3%
fmm-def9.4%
associate-*l*9.4%
*-commutative9.4%
Applied egg-rr9.4%
fmm-undef6.3%
*-commutative6.3%
associate-*r*6.3%
*-commutative6.3%
*-commutative6.3%
*-commutative6.3%
associate-*l*6.3%
*-commutative6.3%
*-commutative6.3%
Simplified6.3%
pow16.3%
associate-*l*9.4%
Applied egg-rr9.4%
unpow19.4%
associate-*l*9.4%
Simplified9.4%
Taylor expanded in t around inf 56.8%
cancel-sign-sub-inv56.8%
metadata-eval56.8%
associate-*r*56.8%
*-commutative56.8%
Simplified56.8%
Final simplification93.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 (* 4.0 i)) (* j (* 27.0 k)))))
(if (or (<= t -1.6e+92) (not (<= t 1e+115)))
(- (* t (- (+ (* 18.0 (* x (* y z))) (/ (* b c) t)) (* a 4.0))) t_1)
(- (+ (* x (* 18.0 (* y (* z t)))) (- (* b c) (* a (* t 4.0)))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if ((t <= -1.6e+92) || !(t <= 1e+115)) {
tmp = (t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0))) - t_1;
} else {
tmp = ((x * (18.0 * (y * (z * t)))) + ((b * c) - (a * (t * 4.0)))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (x * (4.0d0 * i)) + (j * (27.0d0 * k))
if ((t <= (-1.6d+92)) .or. (.not. (t <= 1d+115))) then
tmp = (t * (((18.0d0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0d0))) - t_1
else
tmp = ((x * (18.0d0 * (y * (z * t)))) + ((b * c) - (a * (t * 4.0d0)))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if ((t <= -1.6e+92) || !(t <= 1e+115)) {
tmp = (t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0))) - t_1;
} else {
tmp = ((x * (18.0 * (y * (z * t)))) + ((b * c) - (a * (t * 4.0)))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * (4.0 * i)) + (j * (27.0 * k)) tmp = 0 if (t <= -1.6e+92) or not (t <= 1e+115): tmp = (t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0))) - t_1 else: tmp = ((x * (18.0 * (y * (z * t)))) + ((b * c) - (a * (t * 4.0)))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))) tmp = 0.0 if ((t <= -1.6e+92) || !(t <= 1e+115)) tmp = Float64(Float64(t * Float64(Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(Float64(b * c) / t)) - Float64(a * 4.0))) - t_1); else tmp = Float64(Float64(Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))) + Float64(Float64(b * c) - Float64(a * Float64(t * 4.0)))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
tmp = 0.0;
if ((t <= -1.6e+92) || ~((t <= 1e+115)))
tmp = (t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0))) - t_1;
else
tmp = ((x * (18.0 * (y * (z * t)))) + ((b * c) - (a * (t * 4.0)))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -1.6e+92], N[Not[LessEqual[t, 1e+115]], $MachinePrecision]], N[(N[(t * N[(N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(a * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $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(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+92} \lor \neg \left(t \leq 10^{+115}\right):\\
\;\;\;\;t \cdot \left(\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \frac{b \cdot c}{t}\right) - a \cdot 4\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + \left(b \cdot c - a \cdot \left(t \cdot 4\right)\right)\right) - t\_1\\
\end{array}
\end{array}
if t < -1.60000000000000013e92 or 1e115 < t Initial program 78.7%
Simplified85.1%
Taylor expanded in t around inf 85.2%
if -1.60000000000000013e92 < t < 1e115Initial program 83.1%
Simplified81.8%
associate-*r*83.1%
distribute-rgt-out--83.1%
associate-+l-83.1%
associate-*l*89.0%
fmm-def89.0%
associate-*l*89.0%
*-commutative89.0%
Applied egg-rr89.0%
fmm-undef89.0%
*-commutative89.0%
associate-*r*89.0%
*-commutative89.0%
*-commutative89.0%
*-commutative89.0%
associate-*l*89.0%
*-commutative89.0%
*-commutative89.0%
Simplified89.0%
pow189.0%
associate-*l*91.9%
Applied egg-rr91.9%
unpow191.9%
associate-*l*91.8%
Simplified91.8%
Final simplification89.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (or (<= t_1 -2e+39) (not (<= t_1 2e-12)))
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) t_1)
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 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 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -2e+39) || !(t_1 <= 2e-12)) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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) :: tmp
t_1 = (j * 27.0d0) * k
if ((t_1 <= (-2d+39)) .or. (.not. (t_1 <= 2d-12))) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - t_1
else
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (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 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -2e+39) || !(t_1 <= 2e-12)) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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 = (j * 27.0) * k tmp = 0 if (t_1 <= -2e+39) or not (t_1 <= 2e-12): tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1 else: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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(Float64(j * 27.0) * k) tmp = 0.0 if ((t_1 <= -2e+39) || !(t_1 <= 2e-12)) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - 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 = (j * 27.0) * k;
tmp = 0.0;
if ((t_1 <= -2e+39) || ~((t_1 <= 2e-12)))
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
else
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+39], N[Not[LessEqual[t$95$1, 2e-12]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * 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(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+39} \lor \neg \left(t\_1 \leq 2 \cdot 10^{-12}\right):\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.99999999999999988e39 or 1.99999999999999996e-12 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 74.3%
Taylor expanded in y around 0 77.3%
distribute-lft-out77.3%
*-commutative77.3%
Simplified77.3%
if -1.99999999999999988e39 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.99999999999999996e-12Initial program 87.8%
Simplified88.5%
Taylor expanded in j around 0 85.8%
Final simplification81.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 (<= t -1.7e-109) (not (<= t 5.3e-147)))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* (* 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 <= -1.7e-109) || !(t <= 5.3e-147)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((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 <= (-1.7d-109)) .or. (.not. (t <= 5.3d-147))) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - ((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 <= -1.7e-109) || !(t <= 5.3e-147)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((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 <= -1.7e-109) or not (t <= 5.3e-147): tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((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 <= -1.7e-109) || !(t <= 5.3e-147)) 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)))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - 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 <= -1.7e-109) || ~((t <= 5.3e-147)))
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((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[t, -1.7e-109], N[Not[LessEqual[t, 5.3e-147]], $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], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $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 -1.7 \cdot 10^{-109} \lor \neg \left(t \leq 5.3 \cdot 10^{-147}\right):\\
\;\;\;\;\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)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -1.70000000000000006e-109 or 5.2999999999999998e-147 < t Initial program 83.2%
Simplified87.0%
if -1.70000000000000006e-109 < t < 5.2999999999999998e-147Initial program 77.0%
Taylor expanded in y around 0 91.2%
distribute-lft-out91.2%
*-commutative91.2%
Simplified91.2%
Final simplification88.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 (* -4.0 (* t a)))
(t_2 (* x (+ (* (* y z) (* 18.0 t)) (* i -4.0)))))
(if (<= x -9e+56)
t_2
(if (<= x -1.02e-94)
(+ (* b c) t_1)
(if (<= x 2.9e-156)
(+ (* j (* k -27.0)) t_1)
(if (<= x 5e+101) (* c (+ b (* -27.0 (* j (/ k c))))) t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = x * (((y * z) * (18.0 * t)) + (i * -4.0));
double tmp;
if (x <= -9e+56) {
tmp = t_2;
} else if (x <= -1.02e-94) {
tmp = (b * c) + t_1;
} else if (x <= 2.9e-156) {
tmp = (j * (k * -27.0)) + t_1;
} else if (x <= 5e+101) {
tmp = c * (b + (-27.0 * (j * (k / c))));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (t * a)
t_2 = x * (((y * z) * (18.0d0 * t)) + (i * (-4.0d0)))
if (x <= (-9d+56)) then
tmp = t_2
else if (x <= (-1.02d-94)) then
tmp = (b * c) + t_1
else if (x <= 2.9d-156) then
tmp = (j * (k * (-27.0d0))) + t_1
else if (x <= 5d+101) then
tmp = c * (b + ((-27.0d0) * (j * (k / c))))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = x * (((y * z) * (18.0 * t)) + (i * -4.0));
double tmp;
if (x <= -9e+56) {
tmp = t_2;
} else if (x <= -1.02e-94) {
tmp = (b * c) + t_1;
} else if (x <= 2.9e-156) {
tmp = (j * (k * -27.0)) + t_1;
} else if (x <= 5e+101) {
tmp = c * (b + (-27.0 * (j * (k / c))));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (t * a) t_2 = x * (((y * z) * (18.0 * t)) + (i * -4.0)) tmp = 0 if x <= -9e+56: tmp = t_2 elif x <= -1.02e-94: tmp = (b * c) + t_1 elif x <= 2.9e-156: tmp = (j * (k * -27.0)) + t_1 elif x <= 5e+101: tmp = c * (b + (-27.0 * (j * (k / c)))) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) t_2 = Float64(x * Float64(Float64(Float64(y * z) * Float64(18.0 * t)) + Float64(i * -4.0))) tmp = 0.0 if (x <= -9e+56) tmp = t_2; elseif (x <= -1.02e-94) tmp = Float64(Float64(b * c) + t_1); elseif (x <= 2.9e-156) tmp = Float64(Float64(j * Float64(k * -27.0)) + t_1); elseif (x <= 5e+101) tmp = Float64(c * Float64(b + Float64(-27.0 * Float64(j * Float64(k / c))))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (t * a);
t_2 = x * (((y * z) * (18.0 * t)) + (i * -4.0));
tmp = 0.0;
if (x <= -9e+56)
tmp = t_2;
elseif (x <= -1.02e-94)
tmp = (b * c) + t_1;
elseif (x <= 2.9e-156)
tmp = (j * (k * -27.0)) + t_1;
elseif (x <= 5e+101)
tmp = c * (b + (-27.0 * (j * (k / c))));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(N[(y * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9e+56], t$95$2, If[LessEqual[x, -1.02e-94], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 2.9e-156], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 5e+101], N[(c * N[(b + N[(-27.0 * N[(j * N[(k / c), $MachinePrecision]), $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 := -4 \cdot \left(t \cdot a\right)\\
t_2 := x \cdot \left(\left(y \cdot z\right) \cdot \left(18 \cdot t\right) + i \cdot -4\right)\\
\mathbf{if}\;x \leq -9 \cdot 10^{+56}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -1.02 \cdot 10^{-94}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-156}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t\_1\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+101}:\\
\;\;\;\;c \cdot \left(b + -27 \cdot \left(j \cdot \frac{k}{c}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -9.0000000000000006e56 or 4.99999999999999989e101 < x Initial program 65.5%
Simplified74.3%
associate-*r*70.1%
distribute-rgt-out--65.5%
associate-+l-65.5%
associate-*l*73.1%
fmm-def74.2%
associate-*l*74.2%
*-commutative74.2%
Applied egg-rr74.2%
fmm-undef73.1%
*-commutative73.1%
associate-*r*73.1%
*-commutative73.1%
*-commutative73.1%
*-commutative73.1%
associate-*l*73.1%
*-commutative73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in x around inf 72.2%
cancel-sign-sub-inv72.2%
associate-*r*72.2%
metadata-eval72.2%
Simplified72.2%
if -9.0000000000000006e56 < x < -1.02e-94Initial program 94.1%
Simplified97.1%
Taylor expanded in t around inf 94.3%
Taylor expanded in x around 0 75.3%
Taylor expanded in j around 0 66.4%
Taylor expanded in t around 0 69.3%
if -1.02e-94 < x < 2.90000000000000021e-156Initial program 92.9%
Simplified86.2%
Taylor expanded in a around inf 64.0%
*-commutative64.0%
Simplified64.0%
if 2.90000000000000021e-156 < x < 4.99999999999999989e101Initial program 81.6%
Simplified83.6%
Taylor expanded in t around 0 69.0%
Taylor expanded in i around 0 58.3%
Taylor expanded in c around inf 58.1%
associate-/l*62.1%
Simplified62.1%
Final simplification67.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 (* j (* k -27.0))))
(if (<= (* b c) -5e+152)
(* b (+ c (* -27.0 (* j (/ k b)))))
(if (<= (* b c) 1e-138)
(+ t_1 (* -4.0 (* t a)))
(if (<= (* b c) 1e+94) (+ t_1 (* i (* x -4.0))) (+ (* b c) 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 = j * (k * -27.0);
double tmp;
if ((b * c) <= -5e+152) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} else if ((b * c) <= 1e-138) {
tmp = t_1 + (-4.0 * (t * a));
} else if ((b * c) <= 1e+94) {
tmp = t_1 + (i * (x * -4.0));
} else {
tmp = (b * c) + 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 = j * (k * (-27.0d0))
if ((b * c) <= (-5d+152)) then
tmp = b * (c + ((-27.0d0) * (j * (k / b))))
else if ((b * c) <= 1d-138) then
tmp = t_1 + ((-4.0d0) * (t * a))
else if ((b * c) <= 1d+94) then
tmp = t_1 + (i * (x * (-4.0d0)))
else
tmp = (b * c) + 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 = j * (k * -27.0);
double tmp;
if ((b * c) <= -5e+152) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} else if ((b * c) <= 1e-138) {
tmp = t_1 + (-4.0 * (t * a));
} else if ((b * c) <= 1e+94) {
tmp = t_1 + (i * (x * -4.0));
} else {
tmp = (b * c) + 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 = j * (k * -27.0) tmp = 0 if (b * c) <= -5e+152: tmp = b * (c + (-27.0 * (j * (k / b)))) elif (b * c) <= 1e-138: tmp = t_1 + (-4.0 * (t * a)) elif (b * c) <= 1e+94: tmp = t_1 + (i * (x * -4.0)) else: tmp = (b * c) + 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(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -5e+152) tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(j * Float64(k / b))))); elseif (Float64(b * c) <= 1e-138) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); elseif (Float64(b * c) <= 1e+94) tmp = Float64(t_1 + Float64(i * Float64(x * -4.0))); else tmp = Float64(Float64(b * c) + 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 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -5e+152)
tmp = b * (c + (-27.0 * (j * (k / b))));
elseif ((b * c) <= 1e-138)
tmp = t_1 + (-4.0 * (t * a));
elseif ((b * c) <= 1e+94)
tmp = t_1 + (i * (x * -4.0));
else
tmp = (b * c) + 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5e+152], N[(b * N[(c + N[(-27.0 * N[(j * N[(k / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e-138], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+94], N[(t$95$1 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+152}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \left(j \cdot \frac{k}{b}\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{-138}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{+94}:\\
\;\;\;\;t\_1 + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -5e152Initial program 78.3%
Simplified76.3%
Taylor expanded in t around 0 71.3%
Taylor expanded in i around 0 71.3%
Taylor expanded in b around inf 73.7%
associate-/l*76.2%
Simplified76.2%
if -5e152 < (*.f64 b c) < 1.00000000000000007e-138Initial program 85.2%
Simplified86.8%
Taylor expanded in a around inf 53.8%
*-commutative53.8%
Simplified53.8%
if 1.00000000000000007e-138 < (*.f64 b c) < 1e94Initial program 80.4%
Simplified82.6%
Taylor expanded in i around inf 53.9%
metadata-eval53.9%
distribute-lft-neg-in53.9%
*-commutative53.9%
associate-*r*53.9%
distribute-rgt-neg-in53.9%
distribute-rgt-neg-in53.9%
metadata-eval53.9%
*-commutative53.9%
Simplified53.9%
if 1e94 < (*.f64 b c) Initial program 76.2%
Simplified80.1%
Taylor expanded in b around inf 73.1%
Final simplification61.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 (<= x -1.06e+147)
(* x (+ (* (* y z) (* 18.0 t)) (* i -4.0)))
(if (<= x 7e-116)
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))
(* x (- (/ (* b c) x) (+ (* 4.0 i) (* 27.0 (/ (* j k) x))))))))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.06e+147) {
tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0));
} else if (x <= 7e-116) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = x * (((b * c) / x) - ((4.0 * i) + (27.0 * ((j * k) / x))));
}
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.06d+147)) then
tmp = x * (((y * z) * (18.0d0 * t)) + (i * (-4.0d0)))
else if (x <= 7d-116) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
else
tmp = x * (((b * c) / x) - ((4.0d0 * i) + (27.0d0 * ((j * k) / x))))
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.06e+147) {
tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0));
} else if (x <= 7e-116) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = x * (((b * c) / x) - ((4.0 * i) + (27.0 * ((j * k) / x))));
}
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.06e+147: tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0)) elif x <= 7e-116: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) else: tmp = x * (((b * c) / x) - ((4.0 * i) + (27.0 * ((j * k) / x)))) 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.06e+147) tmp = Float64(x * Float64(Float64(Float64(y * z) * Float64(18.0 * t)) + Float64(i * -4.0))); elseif (x <= 7e-116) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(x * Float64(Float64(Float64(b * c) / x) - Float64(Float64(4.0 * i) + Float64(27.0 * Float64(Float64(j * k) / x))))); 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.06e+147)
tmp = x * (((y * z) * (18.0 * t)) + (i * -4.0));
elseif (x <= 7e-116)
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
else
tmp = x * (((b * c) / x) - ((4.0 * i) + (27.0 * ((j * k) / x))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -1.06e+147], N[(x * N[(N[(N[(y * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7e-116], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(b * c), $MachinePrecision] / x), $MachinePrecision] - N[(N[(4.0 * i), $MachinePrecision] + N[(27.0 * N[(N[(j * k), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.06 \cdot 10^{+147}:\\
\;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(18 \cdot t\right) + i \cdot -4\right)\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-116}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{b \cdot c}{x} - \left(4 \cdot i + 27 \cdot \frac{j \cdot k}{x}\right)\right)\\
\end{array}
\end{array}
if x < -1.06000000000000001e147Initial program 63.1%
Simplified71.5%
associate-*r*66.1%
distribute-rgt-out--63.1%
associate-+l-63.1%
associate-*l*68.3%
fmm-def68.3%
associate-*l*68.3%
*-commutative68.3%
Applied egg-rr68.3%
fmm-undef68.3%
*-commutative68.3%
associate-*r*68.3%
*-commutative68.3%
*-commutative68.3%
*-commutative68.3%
associate-*l*68.3%
*-commutative68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in x around inf 82.8%
cancel-sign-sub-inv82.8%
associate-*r*82.8%
metadata-eval82.8%
Simplified82.8%
if -1.06000000000000001e147 < x < 6.99999999999999968e-116Initial program 90.5%
Simplified88.5%
Taylor expanded in x around 0 75.1%
if 6.99999999999999968e-116 < x Initial program 72.1%
Simplified77.4%
Taylor expanded in t around 0 67.9%
Taylor expanded in x around inf 75.8%
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
(if (<= (* b c) -5e+152)
(* b (+ c (* -27.0 (* j (/ k b)))))
(if (<= (* b c) 1e+128)
(- (* -4.0 (+ (* x i) (* t a))) (* (* j 27.0) k))
(* c (+ b (* -27.0 (* j (/ k 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) <= -5e+152) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} else if ((b * c) <= 1e+128) {
tmp = (-4.0 * ((x * i) + (t * a))) - ((j * 27.0) * k);
} else {
tmp = c * (b + (-27.0 * (j * (k / 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) <= (-5d+152)) then
tmp = b * (c + ((-27.0d0) * (j * (k / b))))
else if ((b * c) <= 1d+128) then
tmp = ((-4.0d0) * ((x * i) + (t * a))) - ((j * 27.0d0) * k)
else
tmp = c * (b + ((-27.0d0) * (j * (k / 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) <= -5e+152) {
tmp = b * (c + (-27.0 * (j * (k / b))));
} else if ((b * c) <= 1e+128) {
tmp = (-4.0 * ((x * i) + (t * a))) - ((j * 27.0) * k);
} else {
tmp = c * (b + (-27.0 * (j * (k / 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) <= -5e+152: tmp = b * (c + (-27.0 * (j * (k / b)))) elif (b * c) <= 1e+128: tmp = (-4.0 * ((x * i) + (t * a))) - ((j * 27.0) * k) else: tmp = c * (b + (-27.0 * (j * (k / 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) <= -5e+152) tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(j * Float64(k / b))))); elseif (Float64(b * c) <= 1e+128) tmp = Float64(Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(c * Float64(b + Float64(-27.0 * Float64(j * Float64(k / 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) <= -5e+152)
tmp = b * (c + (-27.0 * (j * (k / b))));
elseif ((b * c) <= 1e+128)
tmp = (-4.0 * ((x * i) + (t * a))) - ((j * 27.0) * k);
else
tmp = c * (b + (-27.0 * (j * (k / 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], -5e+152], N[(b * N[(c + N[(-27.0 * N[(j * N[(k / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+128], N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(c * N[(b + N[(-27.0 * N[(j * N[(k / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+152}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \left(j \cdot \frac{k}{b}\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{+128}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(b + -27 \cdot \left(j \cdot \frac{k}{c}\right)\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -5e152Initial program 78.3%
Simplified76.3%
Taylor expanded in t around 0 71.3%
Taylor expanded in i around 0 71.3%
Taylor expanded in b around inf 73.7%
associate-/l*76.2%
Simplified76.2%
if -5e152 < (*.f64 b c) < 1.0000000000000001e128Initial program 82.8%
Taylor expanded in y around 0 74.6%
distribute-lft-out74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in b around 0 70.9%
if 1.0000000000000001e128 < (*.f64 b c) Initial program 79.1%
Simplified79.1%
Taylor expanded in t around 0 76.9%
Taylor expanded in i around 0 77.8%
Taylor expanded in c around inf 77.8%
associate-/l*77.8%
Simplified77.8%
Final simplification72.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -6.3e+65)
(* t (+ (* (* (* x 18.0) y) z) (* a -4.0)))
(if (<= t 1.8e-152)
(- (* b c) (* x (* 4.0 i)))
(if (<= t 1.1e+73)
(* k (+ (* b (/ c k)) (* j -27.0)))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -6.3e+65) {
tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0));
} else if (t <= 1.8e-152) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 1.1e+73) {
tmp = k * ((b * (c / k)) + (j * -27.0));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-6.3d+65)) then
tmp = t * ((((x * 18.0d0) * y) * z) + (a * (-4.0d0)))
else if (t <= 1.8d-152) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (t <= 1.1d+73) then
tmp = k * ((b * (c / k)) + (j * (-27.0d0)))
else
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -6.3e+65) {
tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0));
} else if (t <= 1.8e-152) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 1.1e+73) {
tmp = k * ((b * (c / k)) + (j * -27.0));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -6.3e+65: tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0)) elif t <= 1.8e-152: tmp = (b * c) - (x * (4.0 * i)) elif t <= 1.1e+73: tmp = k * ((b * (c / k)) + (j * -27.0)) else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -6.3e+65) tmp = Float64(t * Float64(Float64(Float64(Float64(x * 18.0) * y) * z) + Float64(a * -4.0))); elseif (t <= 1.8e-152) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (t <= 1.1e+73) tmp = Float64(k * Float64(Float64(b * Float64(c / k)) + Float64(j * -27.0))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -6.3e+65)
tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0));
elseif (t <= 1.8e-152)
tmp = (b * c) - (x * (4.0 * i));
elseif (t <= 1.1e+73)
tmp = k * ((b * (c / k)) + (j * -27.0));
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -6.3e+65], N[(t * N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-152], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+73], N[(k * N[(N[(b * N[(c / k), $MachinePrecision]), $MachinePrecision] + N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.3 \cdot 10^{+65}:\\
\;\;\;\;t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + a \cdot -4\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-152}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+73}:\\
\;\;\;\;k \cdot \left(b \cdot \frac{c}{k} + j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -6.29999999999999997e65Initial program 77.7%
Simplified81.7%
associate-*r*83.3%
distribute-rgt-out--77.7%
associate-+l-77.7%
associate-*l*76.2%
fmm-def76.2%
associate-*l*76.1%
*-commutative76.1%
Applied egg-rr76.1%
fmm-undef76.1%
*-commutative76.1%
associate-*r*76.1%
*-commutative76.1%
*-commutative76.1%
*-commutative76.1%
associate-*l*76.1%
*-commutative76.1%
*-commutative76.1%
Simplified76.1%
Taylor expanded in t around inf 66.6%
cancel-sign-sub-inv66.6%
associate-*r*68.1%
associate-*r*68.1%
associate-*r*68.1%
metadata-eval68.1%
Simplified68.1%
if -6.29999999999999997e65 < t < 1.8e-152Initial program 80.7%
Simplified78.8%
Taylor expanded in t around 0 81.6%
Taylor expanded in i around inf 58.9%
associate-*r*58.9%
*-commutative58.9%
*-commutative58.9%
Simplified58.9%
if 1.8e-152 < t < 1.1e73Initial program 87.3%
Simplified87.2%
Taylor expanded in t around 0 66.4%
Taylor expanded in i around 0 57.4%
Taylor expanded in k around inf 55.0%
cancel-sign-sub-inv55.0%
associate-/l*52.4%
metadata-eval52.4%
Simplified52.4%
if 1.1e73 < t Initial program 82.3%
Simplified89.3%
Taylor expanded in t around inf 78.1%
Final simplification64.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 -2.4e+65)
(* t (+ (* (* (* x 18.0) y) z) (* a -4.0)))
(if (<= t 6.2e-152)
(- (* b c) (* x (* 4.0 i)))
(if (<= t 7e+70)
(* k (+ (* b (/ c k)) (* j -27.0)))
(* t (+ (* (* x 18.0) (* y z)) (* a -4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -2.4e+65) {
tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0));
} else if (t <= 6.2e-152) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 7e+70) {
tmp = k * ((b * (c / k)) + (j * -27.0));
} else {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-2.4d+65)) then
tmp = t * ((((x * 18.0d0) * y) * z) + (a * (-4.0d0)))
else if (t <= 6.2d-152) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (t <= 7d+70) then
tmp = k * ((b * (c / k)) + (j * (-27.0d0)))
else
tmp = t * (((x * 18.0d0) * (y * z)) + (a * (-4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -2.4e+65) {
tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0));
} else if (t <= 6.2e-152) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 7e+70) {
tmp = k * ((b * (c / k)) + (j * -27.0));
} else {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -2.4e+65: tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0)) elif t <= 6.2e-152: tmp = (b * c) - (x * (4.0 * i)) elif t <= 7e+70: tmp = k * ((b * (c / k)) + (j * -27.0)) else: tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -2.4e+65) tmp = Float64(t * Float64(Float64(Float64(Float64(x * 18.0) * y) * z) + Float64(a * -4.0))); elseif (t <= 6.2e-152) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (t <= 7e+70) tmp = Float64(k * Float64(Float64(b * Float64(c / k)) + Float64(j * -27.0))); else tmp = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -2.4e+65)
tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0));
elseif (t <= 6.2e-152)
tmp = (b * c) - (x * (4.0 * i));
elseif (t <= 7e+70)
tmp = k * ((b * (c / k)) + (j * -27.0));
else
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -2.4e+65], N[(t * N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e-152], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+70], N[(k * N[(N[(b * N[(c / k), $MachinePrecision]), $MachinePrecision] + N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+65}:\\
\;\;\;\;t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + a \cdot -4\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-152}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+70}:\\
\;\;\;\;k \cdot \left(b \cdot \frac{c}{k} + j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\end{array}
\end{array}
if t < -2.4000000000000002e65Initial program 77.7%
Simplified81.7%
associate-*r*83.3%
distribute-rgt-out--77.7%
associate-+l-77.7%
associate-*l*76.2%
fmm-def76.2%
associate-*l*76.1%
*-commutative76.1%
Applied egg-rr76.1%
fmm-undef76.1%
*-commutative76.1%
associate-*r*76.1%
*-commutative76.1%
*-commutative76.1%
*-commutative76.1%
associate-*l*76.1%
*-commutative76.1%
*-commutative76.1%
Simplified76.1%
Taylor expanded in t around inf 66.6%
cancel-sign-sub-inv66.6%
associate-*r*68.1%
associate-*r*68.1%
associate-*r*68.1%
metadata-eval68.1%
Simplified68.1%
if -2.4000000000000002e65 < t < 6.1999999999999997e-152Initial program 80.7%
Simplified78.8%
Taylor expanded in t around 0 81.6%
Taylor expanded in i around inf 58.9%
associate-*r*58.9%
*-commutative58.9%
*-commutative58.9%
Simplified58.9%
if 6.1999999999999997e-152 < t < 7.00000000000000005e70Initial program 87.3%
Simplified87.2%
Taylor expanded in t around 0 66.4%
Taylor expanded in i around 0 57.4%
Taylor expanded in k around inf 55.0%
cancel-sign-sub-inv55.0%
associate-/l*52.4%
metadata-eval52.4%
Simplified52.4%
if 7.00000000000000005e70 < t Initial program 82.3%
Simplified89.3%
associate-*r*87.6%
distribute-rgt-out--82.3%
associate-+l-82.3%
associate-*l*74.0%
fmm-def75.8%
associate-*l*75.7%
*-commutative75.7%
Applied egg-rr75.7%
fmm-undef74.0%
*-commutative74.0%
associate-*r*74.0%
*-commutative74.0%
*-commutative74.0%
*-commutative74.0%
associate-*l*74.0%
*-commutative74.0%
*-commutative74.0%
Simplified74.0%
pow174.0%
associate-*l*67.5%
Applied egg-rr67.5%
unpow167.5%
associate-*l*67.5%
Simplified67.5%
Taylor expanded in t around inf 78.1%
cancel-sign-sub-inv78.1%
metadata-eval78.1%
associate-*r*78.1%
*-commutative78.1%
Simplified78.1%
Final simplification64.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 (* t (+ (* (* x 18.0) (* y z)) (* a -4.0)))))
(if (<= t -2.8e+63)
t_1
(if (<= t 1.45e-148)
(- (* b c) (* x (* 4.0 i)))
(if (<= t 1.16e+72) (* k (+ (* b (/ c k)) (* j -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 * (((x * 18.0) * (y * z)) + (a * -4.0));
double tmp;
if (t <= -2.8e+63) {
tmp = t_1;
} else if (t <= 1.45e-148) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 1.16e+72) {
tmp = k * ((b * (c / k)) + (j * -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 * (((x * 18.0d0) * (y * z)) + (a * (-4.0d0)))
if (t <= (-2.8d+63)) then
tmp = t_1
else if (t <= 1.45d-148) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (t <= 1.16d+72) then
tmp = k * ((b * (c / k)) + (j * (-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 * (((x * 18.0) * (y * z)) + (a * -4.0));
double tmp;
if (t <= -2.8e+63) {
tmp = t_1;
} else if (t <= 1.45e-148) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 1.16e+72) {
tmp = k * ((b * (c / k)) + (j * -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 * (((x * 18.0) * (y * z)) + (a * -4.0)) tmp = 0 if t <= -2.8e+63: tmp = t_1 elif t <= 1.45e-148: tmp = (b * c) - (x * (4.0 * i)) elif t <= 1.16e+72: tmp = k * ((b * (c / k)) + (j * -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(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))) tmp = 0.0 if (t <= -2.8e+63) tmp = t_1; elseif (t <= 1.45e-148) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (t <= 1.16e+72) tmp = Float64(k * Float64(Float64(b * Float64(c / k)) + Float64(j * -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 * (((x * 18.0) * (y * z)) + (a * -4.0));
tmp = 0.0;
if (t <= -2.8e+63)
tmp = t_1;
elseif (t <= 1.45e-148)
tmp = (b * c) - (x * (4.0 * i));
elseif (t <= 1.16e+72)
tmp = k * ((b * (c / k)) + (j * -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[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+63], t$95$1, If[LessEqual[t, 1.45e-148], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.16e+72], N[(k * N[(N[(b * N[(c / k), $MachinePrecision]), $MachinePrecision] + N[(j * -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(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-148}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{+72}:\\
\;\;\;\;k \cdot \left(b \cdot \frac{c}{k} + j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.79999999999999987e63 or 1.16000000000000003e72 < t Initial program 80.1%
Simplified85.6%
associate-*r*85.5%
distribute-rgt-out--80.1%
associate-+l-80.1%
associate-*l*75.1%
fmm-def76.0%
associate-*l*75.9%
*-commutative75.9%
Applied egg-rr75.9%
fmm-undef75.0%
*-commutative75.0%
associate-*r*75.0%
*-commutative75.0%
*-commutative75.0%
*-commutative75.0%
associate-*l*75.0%
*-commutative75.0%
*-commutative75.0%
Simplified75.0%
pow175.0%
associate-*l*69.9%
Applied egg-rr69.9%
unpow169.9%
associate-*l*70.0%
Simplified70.0%
Taylor expanded in t around inf 72.5%
cancel-sign-sub-inv72.5%
metadata-eval72.5%
associate-*r*72.5%
*-commutative72.5%
Simplified72.5%
if -2.79999999999999987e63 < t < 1.4499999999999999e-148Initial program 80.7%
Simplified78.8%
Taylor expanded in t around 0 81.6%
Taylor expanded in i around inf 58.9%
associate-*r*58.9%
*-commutative58.9%
*-commutative58.9%
Simplified58.9%
if 1.4499999999999999e-148 < t < 1.16000000000000003e72Initial program 87.3%
Simplified87.2%
Taylor expanded in t around 0 66.4%
Taylor expanded in i around 0 57.4%
Taylor expanded in k around inf 55.0%
cancel-sign-sub-inv55.0%
associate-/l*52.4%
metadata-eval52.4%
Simplified52.4%
Final simplification63.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -2.7e+132)
(* 18.0 (* t (* x (* y z))))
(if (<= x -1.75e-138)
(* c (+ b (* -27.0 (* j (/ k c)))))
(if (<= x 1.15e-105)
(+ (* j (* k -27.0)) (* -4.0 (* t a)))
(* x (- (/ (* b c) x) (* 4.0 i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.7e+132) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= -1.75e-138) {
tmp = c * (b + (-27.0 * (j * (k / c))));
} else if (x <= 1.15e-105) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else {
tmp = x * (((b * c) / x) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-2.7d+132)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= (-1.75d-138)) then
tmp = c * (b + ((-27.0d0) * (j * (k / c))))
else if (x <= 1.15d-105) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
else
tmp = x * (((b * c) / x) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.7e+132) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= -1.75e-138) {
tmp = c * (b + (-27.0 * (j * (k / c))));
} else if (x <= 1.15e-105) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else {
tmp = x * (((b * c) / x) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -2.7e+132: tmp = 18.0 * (t * (x * (y * z))) elif x <= -1.75e-138: tmp = c * (b + (-27.0 * (j * (k / c)))) elif x <= 1.15e-105: tmp = (j * (k * -27.0)) + (-4.0 * (t * a)) else: tmp = x * (((b * c) / x) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -2.7e+132) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= -1.75e-138) tmp = Float64(c * Float64(b + Float64(-27.0 * Float64(j * Float64(k / c))))); elseif (x <= 1.15e-105) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(x * Float64(Float64(Float64(b * c) / x) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -2.7e+132)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= -1.75e-138)
tmp = c * (b + (-27.0 * (j * (k / c))));
elseif (x <= 1.15e-105)
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
else
tmp = x * (((b * c) / x) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -2.7e+132], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.75e-138], N[(c * N[(b + N[(-27.0 * N[(j * N[(k / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-105], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(b * c), $MachinePrecision] / x), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{+132}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq -1.75 \cdot 10^{-138}:\\
\;\;\;\;c \cdot \left(b + -27 \cdot \left(j \cdot \frac{k}{c}\right)\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-105}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{b \cdot c}{x} - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -2.7e132Initial program 64.6%
Simplified72.0%
Taylor expanded in x around inf 79.4%
Taylor expanded in t around inf 46.7%
if -2.7e132 < x < -1.7499999999999999e-138Initial program 89.7%
Simplified94.7%
Taylor expanded in t around 0 63.5%
Taylor expanded in i around 0 56.6%
Taylor expanded in c around inf 61.6%
associate-/l*61.6%
Simplified61.6%
if -1.7499999999999999e-138 < x < 1.15e-105Initial program 91.8%
Simplified85.3%
Taylor expanded in a around inf 64.0%
*-commutative64.0%
Simplified64.0%
if 1.15e-105 < x Initial program 71.7%
Simplified77.1%
Taylor expanded in t around 0 67.4%
Taylor expanded in i around inf 53.2%
associate-*r*53.2%
*-commutative53.2%
*-commutative53.2%
Simplified53.2%
Taylor expanded in x around inf 61.2%
Final simplification60.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (/ (* b c) x) (* 4.0 i)))))
(if (<= x -5.4e+191)
t_1
(if (<= x -3.1e-271)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 3e-119) (+ (* b c) (* -4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (((b * c) / x) - (4.0 * i));
double tmp;
if (x <= -5.4e+191) {
tmp = t_1;
} else if (x <= -3.1e-271) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 3e-119) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * (((b * c) / x) - (4.0d0 * i))
if (x <= (-5.4d+191)) then
tmp = t_1
else if (x <= (-3.1d-271)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 3d-119) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (((b * c) / x) - (4.0 * i));
double tmp;
if (x <= -5.4e+191) {
tmp = t_1;
} else if (x <= -3.1e-271) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 3e-119) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (((b * c) / x) - (4.0 * i)) tmp = 0 if x <= -5.4e+191: tmp = t_1 elif x <= -3.1e-271: tmp = (b * c) - (27.0 * (j * k)) elif x <= 3e-119: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(Float64(b * c) / x) - Float64(4.0 * i))) tmp = 0.0 if (x <= -5.4e+191) tmp = t_1; elseif (x <= -3.1e-271) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 3e-119) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (((b * c) / x) - (4.0 * i));
tmp = 0.0;
if (x <= -5.4e+191)
tmp = t_1;
elseif (x <= -3.1e-271)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 3e-119)
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(N[(b * c), $MachinePrecision] / x), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.4e+191], t$95$1, If[LessEqual[x, -3.1e-271], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3e-119], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{b \cdot c}{x} - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -5.4 \cdot 10^{+191}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.1 \cdot 10^{-271}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-119}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.39999999999999992e191 or 3.0000000000000002e-119 < x Initial program 70.3%
Simplified75.3%
Taylor expanded in t around 0 67.1%
Taylor expanded in i around inf 53.7%
associate-*r*53.7%
*-commutative53.7%
*-commutative53.7%
Simplified53.7%
Taylor expanded in x around inf 60.6%
if -5.39999999999999992e191 < x < -3.0999999999999999e-271Initial program 86.7%
Simplified89.3%
Taylor expanded in t around 0 59.6%
Taylor expanded in i around 0 52.9%
if -3.0999999999999999e-271 < x < 3.0000000000000002e-119Initial program 92.4%
Simplified85.5%
Taylor expanded in t around inf 78.5%
Taylor expanded in x around 0 69.6%
Taylor expanded in j around 0 52.5%
Taylor expanded in t around 0 61.1%
Final simplification57.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -2.25e+135)
(* b c)
(if (<= (* b c) -5.6e-301)
(* 18.0 (* t (* x (* y z))))
(if (<= (* b c) 2.05e+155) (* -27.0 (* j k)) (* 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) <= -2.25e+135) {
tmp = b * c;
} else if ((b * c) <= -5.6e-301) {
tmp = 18.0 * (t * (x * (y * z)));
} else if ((b * c) <= 2.05e+155) {
tmp = -27.0 * (j * k);
} 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) <= (-2.25d+135)) then
tmp = b * c
else if ((b * c) <= (-5.6d-301)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if ((b * c) <= 2.05d+155) then
tmp = (-27.0d0) * (j * k)
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) <= -2.25e+135) {
tmp = b * c;
} else if ((b * c) <= -5.6e-301) {
tmp = 18.0 * (t * (x * (y * z)));
} else if ((b * c) <= 2.05e+155) {
tmp = -27.0 * (j * k);
} 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) <= -2.25e+135: tmp = b * c elif (b * c) <= -5.6e-301: tmp = 18.0 * (t * (x * (y * z))) elif (b * c) <= 2.05e+155: tmp = -27.0 * (j * k) 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) <= -2.25e+135) tmp = Float64(b * c); elseif (Float64(b * c) <= -5.6e-301) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (Float64(b * c) <= 2.05e+155) tmp = Float64(-27.0 * Float64(j * k)); 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) <= -2.25e+135)
tmp = b * c;
elseif ((b * c) <= -5.6e-301)
tmp = 18.0 * (t * (x * (y * z)));
elseif ((b * c) <= 2.05e+155)
tmp = -27.0 * (j * k);
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], -2.25e+135], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.6e-301], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.05e+155], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.25 \cdot 10^{+135}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5.6 \cdot 10^{-301}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2.05 \cdot 10^{+155}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.25000000000000004e135 or 2.0499999999999999e155 < (*.f64 b c) Initial program 77.6%
Simplified76.6%
associate-*r*80.1%
distribute-rgt-out--77.6%
associate-+l-77.6%
associate-*l*77.8%
fmm-def77.8%
associate-*l*77.8%
*-commutative77.8%
Applied egg-rr77.8%
fmm-undef77.8%
*-commutative77.8%
associate-*r*77.8%
*-commutative77.8%
*-commutative77.8%
*-commutative77.8%
associate-*l*77.8%
*-commutative77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in b around inf 66.3%
if -2.25000000000000004e135 < (*.f64 b c) < -5.6000000000000002e-301Initial program 82.1%
Simplified83.4%
Taylor expanded in x around inf 51.0%
Taylor expanded in t around inf 31.5%
if -5.6000000000000002e-301 < (*.f64 b c) < 2.0499999999999999e155Initial program 84.0%
Simplified87.6%
Taylor expanded in j around inf 32.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -3.6e+130)
(* b c)
(if (<= (* b c) -2.2e-42)
(* x (* i -4.0))
(if (<= (* b c) 1.95e+154) (* k (* j -27.0)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -3.6e+130) {
tmp = b * c;
} else if ((b * c) <= -2.2e-42) {
tmp = x * (i * -4.0);
} else if ((b * c) <= 1.95e+154) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-3.6d+130)) then
tmp = b * c
else if ((b * c) <= (-2.2d-42)) then
tmp = x * (i * (-4.0d0))
else if ((b * c) <= 1.95d+154) then
tmp = k * (j * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -3.6e+130) {
tmp = b * c;
} else if ((b * c) <= -2.2e-42) {
tmp = x * (i * -4.0);
} else if ((b * c) <= 1.95e+154) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -3.6e+130: tmp = b * c elif (b * c) <= -2.2e-42: tmp = x * (i * -4.0) elif (b * c) <= 1.95e+154: tmp = k * (j * -27.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -3.6e+130) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.2e-42) tmp = Float64(x * Float64(i * -4.0)); elseif (Float64(b * c) <= 1.95e+154) tmp = Float64(k * Float64(j * -27.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -3.6e+130)
tmp = b * c;
elseif ((b * c) <= -2.2e-42)
tmp = x * (i * -4.0);
elseif ((b * c) <= 1.95e+154)
tmp = k * (j * -27.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -3.6e+130], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.2e-42], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.95e+154], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -3.6 \cdot 10^{+130}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.2 \cdot 10^{-42}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.95 \cdot 10^{+154}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.6000000000000001e130 or 1.9500000000000001e154 < (*.f64 b c) Initial program 78.2%
Simplified77.2%
associate-*r*80.6%
distribute-rgt-out--78.2%
associate-+l-78.2%
associate-*l*78.3%
fmm-def78.3%
associate-*l*78.3%
*-commutative78.3%
Applied egg-rr78.3%
fmm-undef78.3%
*-commutative78.3%
associate-*r*78.3%
*-commutative78.3%
*-commutative78.3%
*-commutative78.3%
associate-*l*78.3%
*-commutative78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in b around inf 64.7%
if -3.6000000000000001e130 < (*.f64 b c) < -2.20000000000000005e-42Initial program 79.5%
Simplified82.1%
associate-*r*82.1%
distribute-rgt-out--79.5%
associate-+l-79.5%
associate-*l*87.1%
fmm-def89.7%
associate-*l*89.7%
*-commutative89.7%
Applied egg-rr89.7%
fmm-undef87.0%
*-commutative87.0%
associate-*r*87.0%
*-commutative87.0%
*-commutative87.0%
*-commutative87.0%
associate-*l*87.0%
*-commutative87.0%
*-commutative87.0%
Simplified87.0%
pow187.0%
associate-*l*86.9%
Applied egg-rr86.9%
unpow186.9%
associate-*l*86.8%
Simplified86.8%
Taylor expanded in i around inf 34.3%
associate-*r*34.3%
*-commutative34.3%
*-commutative34.3%
Simplified34.3%
if -2.20000000000000005e-42 < (*.f64 b c) < 1.9500000000000001e154Initial program 84.0%
Simplified86.8%
Taylor expanded in j around inf 31.1%
associate-*r*31.1%
*-commutative31.1%
metadata-eval31.1%
distribute-rgt-neg-in31.1%
*-commutative31.1%
distribute-rgt-neg-in31.1%
metadata-eval31.1%
*-commutative31.1%
Simplified31.1%
Final simplification42.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -8.5e+104)
(* t (+ (* (* (* x 18.0) y) z) (* a -4.0)))
(if (<= t 7e+70)
(- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -8.5e+104) {
tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0));
} else if (t <= 7e+70) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-8.5d+104)) then
tmp = t * ((((x * 18.0d0) * y) * z) + (a * (-4.0d0)))
else if (t <= 7d+70) then
tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
else
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -8.5e+104) {
tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0));
} else if (t <= 7e+70) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -8.5e+104: tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0)) elif t <= 7e+70: tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -8.5e+104) tmp = Float64(t * Float64(Float64(Float64(Float64(x * 18.0) * y) * z) + Float64(a * -4.0))); elseif (t <= 7e+70) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -8.5e+104)
tmp = t * ((((x * 18.0) * y) * z) + (a * -4.0));
elseif (t <= 7e+70)
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -8.5e+104], N[(t * N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+70], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+104}:\\
\;\;\;\;t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + a \cdot -4\right)\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+70}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -8.4999999999999999e104Initial program 81.2%
Simplified83.6%
associate-*r*85.4%
distribute-rgt-out--81.2%
associate-+l-81.2%
associate-*l*79.4%
fmm-def79.4%
associate-*l*79.4%
*-commutative79.4%
Applied egg-rr79.4%
fmm-undef79.4%
*-commutative79.4%
associate-*r*79.4%
*-commutative79.4%
*-commutative79.4%
*-commutative79.4%
associate-*l*79.4%
*-commutative79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in t around inf 66.5%
cancel-sign-sub-inv66.5%
associate-*r*68.3%
associate-*r*68.3%
associate-*r*68.3%
metadata-eval68.3%
Simplified68.3%
if -8.4999999999999999e104 < t < 7.00000000000000005e70Initial program 81.2%
Simplified80.5%
Taylor expanded in t around 0 77.1%
if 7.00000000000000005e70 < t Initial program 82.3%
Simplified89.3%
Taylor expanded in t around inf 78.1%
Final simplification75.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 (<= j -1e+154)
(+ (* b c) (* j (* k -27.0)))
(if (<= j -3.2e-205)
(+ (* b c) (* -4.0 (* t a)))
(if (<= j 4.1e-38)
(- (* b c) (* x (* 4.0 i)))
(* (* 18.0 t) (* z (* x y)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -1e+154) {
tmp = (b * c) + (j * (k * -27.0));
} else if (j <= -3.2e-205) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (j <= 4.1e-38) {
tmp = (b * c) - (x * (4.0 * i));
} else {
tmp = (18.0 * t) * (z * (x * y));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (j <= (-1d+154)) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (j <= (-3.2d-205)) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (j <= 4.1d-38) then
tmp = (b * c) - (x * (4.0d0 * i))
else
tmp = (18.0d0 * t) * (z * (x * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -1e+154) {
tmp = (b * c) + (j * (k * -27.0));
} else if (j <= -3.2e-205) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (j <= 4.1e-38) {
tmp = (b * c) - (x * (4.0 * i));
} else {
tmp = (18.0 * t) * (z * (x * y));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -1e+154: tmp = (b * c) + (j * (k * -27.0)) elif j <= -3.2e-205: tmp = (b * c) + (-4.0 * (t * a)) elif j <= 4.1e-38: tmp = (b * c) - (x * (4.0 * i)) else: tmp = (18.0 * t) * (z * (x * y)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -1e+154) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (j <= -3.2e-205) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (j <= 4.1e-38) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); else tmp = Float64(Float64(18.0 * t) * Float64(z * Float64(x * y))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (j <= -1e+154)
tmp = (b * c) + (j * (k * -27.0));
elseif (j <= -3.2e-205)
tmp = (b * c) + (-4.0 * (t * a));
elseif (j <= 4.1e-38)
tmp = (b * c) - (x * (4.0 * i));
else
tmp = (18.0 * t) * (z * (x * y));
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[j, -1e+154], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -3.2e-205], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4.1e-38], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(18.0 * t), $MachinePrecision] * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1 \cdot 10^{+154}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;j \leq -3.2 \cdot 10^{-205}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;j \leq 4.1 \cdot 10^{-38}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(18 \cdot t\right) \cdot \left(z \cdot \left(x \cdot y\right)\right)\\
\end{array}
\end{array}
if j < -1.00000000000000004e154Initial program 87.0%
Simplified86.9%
Taylor expanded in b around inf 75.2%
if -1.00000000000000004e154 < j < -3.20000000000000009e-205Initial program 78.2%
Simplified81.8%
Taylor expanded in t around inf 77.1%
Taylor expanded in x around 0 57.3%
Taylor expanded in j around 0 44.4%
Taylor expanded in t around 0 48.9%
if -3.20000000000000009e-205 < j < 4.0999999999999998e-38Initial program 89.2%
Simplified90.7%
Taylor expanded in t around 0 56.6%
Taylor expanded in i around inf 49.8%
associate-*r*49.8%
*-commutative49.8%
*-commutative49.8%
Simplified49.8%
if 4.0999999999999998e-38 < j Initial program 74.7%
Simplified74.8%
Taylor expanded in x around inf 44.7%
Taylor expanded in t around inf 37.7%
associate-*r*37.7%
*-commutative37.7%
associate-*r*39.0%
Simplified39.0%
Final simplification49.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= z 2.25e+194) (- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* (* j 27.0) k)) (+ (* 18.0 (* (* y z) (* x t))) (* 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 (z <= 2.25e+194) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
} else {
tmp = (18.0 * ((y * z) * (x * t))) + (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 (z <= 2.25d+194) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - ((j * 27.0d0) * k)
else
tmp = (18.0d0 * ((y * z) * (x * t))) + (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 (z <= 2.25e+194) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
} else {
tmp = (18.0 * ((y * z) * (x * t))) + (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 z <= 2.25e+194: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k) else: tmp = (18.0 * ((y * z) * (x * t))) + (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 (z <= 2.25e+194) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) + 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 (z <= 2.25e+194)
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
else
tmp = (18.0 * ((y * z) * (x * t))) + (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[LessEqual[z, 2.25e+194], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.25 \cdot 10^{+194}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if z < 2.2499999999999999e194Initial program 82.3%
Taylor expanded in y around 0 77.1%
distribute-lft-out77.1%
*-commutative77.1%
Simplified77.1%
if 2.2499999999999999e194 < z Initial program 72.7%
Simplified81.7%
Taylor expanded in y around inf 92.4%
associate-*r*88.1%
Simplified88.1%
Final simplification78.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -3e-132)
(+ (* b c) (* j (* k -27.0)))
(if (<= k 7.2e+96)
(- (* b c) (* x (* 4.0 i)))
(* k (+ (* b (/ c k)) (* j -27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -3e-132) {
tmp = (b * c) + (j * (k * -27.0));
} else if (k <= 7.2e+96) {
tmp = (b * c) - (x * (4.0 * i));
} else {
tmp = k * ((b * (c / k)) + (j * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-3d-132)) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (k <= 7.2d+96) then
tmp = (b * c) - (x * (4.0d0 * i))
else
tmp = k * ((b * (c / k)) + (j * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -3e-132) {
tmp = (b * c) + (j * (k * -27.0));
} else if (k <= 7.2e+96) {
tmp = (b * c) - (x * (4.0 * i));
} else {
tmp = k * ((b * (c / k)) + (j * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -3e-132: tmp = (b * c) + (j * (k * -27.0)) elif k <= 7.2e+96: tmp = (b * c) - (x * (4.0 * i)) else: tmp = k * ((b * (c / k)) + (j * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -3e-132) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (k <= 7.2e+96) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); else tmp = Float64(k * Float64(Float64(b * Float64(c / k)) + Float64(j * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -3e-132)
tmp = (b * c) + (j * (k * -27.0));
elseif (k <= 7.2e+96)
tmp = (b * c) - (x * (4.0 * i));
else
tmp = k * ((b * (c / k)) + (j * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -3e-132], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.2e+96], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(N[(b * N[(c / k), $MachinePrecision]), $MachinePrecision] + N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -3 \cdot 10^{-132}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;k \leq 7.2 \cdot 10^{+96}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(b \cdot \frac{c}{k} + j \cdot -27\right)\\
\end{array}
\end{array}
if k < -3e-132Initial program 82.6%
Simplified86.7%
Taylor expanded in b around inf 53.3%
if -3e-132 < k < 7.20000000000000026e96Initial program 80.4%
Simplified81.2%
Taylor expanded in t around 0 56.3%
Taylor expanded in i around inf 50.6%
associate-*r*50.6%
*-commutative50.6%
*-commutative50.6%
Simplified50.6%
if 7.20000000000000026e96 < k Initial program 82.1%
Simplified80.4%
Taylor expanded in t around 0 58.9%
Taylor expanded in i around 0 52.6%
Taylor expanded in k around inf 52.6%
cancel-sign-sub-inv52.6%
associate-/l*52.6%
metadata-eval52.6%
Simplified52.6%
Final simplification51.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -2.5e+143) (not (<= (* b c) 1.05e+156))) (* b c) (* -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 (((b * c) <= -2.5e+143) || !((b * c) <= 1.05e+156)) {
tmp = b * c;
} else {
tmp = -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 (((b * c) <= (-2.5d+143)) .or. (.not. ((b * c) <= 1.05d+156))) then
tmp = b * c
else
tmp = (-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 (((b * c) <= -2.5e+143) || !((b * c) <= 1.05e+156)) {
tmp = b * c;
} else {
tmp = -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 ((b * c) <= -2.5e+143) or not ((b * c) <= 1.05e+156): tmp = b * c else: tmp = -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 ((Float64(b * c) <= -2.5e+143) || !(Float64(b * c) <= 1.05e+156)) tmp = Float64(b * c); else tmp = 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 (((b * c) <= -2.5e+143) || ~(((b * c) <= 1.05e+156)))
tmp = b * c;
else
tmp = -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[N[(b * c), $MachinePrecision], -2.5e+143], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.05e+156]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * 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}\;b \cdot c \leq -2.5 \cdot 10^{+143} \lor \neg \left(b \cdot c \leq 1.05 \cdot 10^{+156}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.50000000000000006e143 or 1.04999999999999991e156 < (*.f64 b c) Initial program 77.1%
Simplified76.0%
associate-*r*79.6%
distribute-rgt-out--77.1%
associate-+l-77.1%
associate-*l*77.2%
fmm-def77.2%
associate-*l*77.2%
*-commutative77.2%
Applied egg-rr77.2%
fmm-undef77.2%
*-commutative77.2%
associate-*r*77.2%
*-commutative77.2%
*-commutative77.2%
*-commutative77.2%
associate-*l*77.2%
*-commutative77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in b around inf 67.8%
if -2.50000000000000006e143 < (*.f64 b c) < 1.04999999999999991e156Initial program 83.4%
Simplified86.1%
Taylor expanded in j around inf 28.7%
Final simplification40.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= x -1.12e+133) (* 18.0 (* t (* x (* y z)))) (if (<= x 7e+100) (- (* b c) (* 27.0 (* j k))) (* x (* i -4.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.12e+133) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 7e+100) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = x * (i * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-1.12d+133)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= 7d+100) then
tmp = (b * c) - (27.0d0 * (j * k))
else
tmp = x * (i * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.12e+133) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 7e+100) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = x * (i * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -1.12e+133: tmp = 18.0 * (t * (x * (y * z))) elif x <= 7e+100: tmp = (b * c) - (27.0 * (j * k)) else: tmp = x * (i * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -1.12e+133) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= 7e+100) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); else tmp = Float64(x * Float64(i * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -1.12e+133)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= 7e+100)
tmp = (b * c) - (27.0 * (j * k));
else
tmp = x * (i * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -1.12e+133], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7e+100], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.12 \cdot 10^{+133}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 7 \cdot 10^{+100}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\end{array}
\end{array}
if x < -1.12e133Initial program 64.6%
Simplified72.0%
Taylor expanded in x around inf 79.4%
Taylor expanded in t around inf 46.7%
if -1.12e133 < x < 6.99999999999999953e100Initial program 88.4%
Simplified88.0%
Taylor expanded in t around 0 61.0%
Taylor expanded in i around 0 54.4%
if 6.99999999999999953e100 < x Initial program 64.0%
Simplified69.6%
associate-*r*66.8%
distribute-rgt-out--64.0%
associate-+l-64.0%
associate-*l*75.0%
fmm-def75.0%
associate-*l*75.0%
*-commutative75.0%
Applied egg-rr75.0%
fmm-undef75.0%
*-commutative75.0%
associate-*r*75.0%
*-commutative75.0%
*-commutative75.0%
*-commutative75.0%
associate-*l*75.0%
*-commutative75.0%
*-commutative75.0%
Simplified75.0%
pow175.0%
associate-*l*80.6%
Applied egg-rr80.6%
unpow180.6%
associate-*l*80.5%
Simplified80.5%
Taylor expanded in i around inf 59.6%
associate-*r*59.6%
*-commutative59.6%
*-commutative59.6%
Simplified59.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= x -7e+132) (* 18.0 (* t (* x (* y z)))) (if (<= x 9.8e+100) (+ (* b c) (* j (* k -27.0))) (* x (* i -4.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -7e+132) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 9.8e+100) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = x * (i * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-7d+132)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= 9.8d+100) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = x * (i * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -7e+132) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= 9.8e+100) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = x * (i * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -7e+132: tmp = 18.0 * (t * (x * (y * z))) elif x <= 9.8e+100: tmp = (b * c) + (j * (k * -27.0)) else: tmp = x * (i * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -7e+132) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= 9.8e+100) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(x * Float64(i * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -7e+132)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= 9.8e+100)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = x * (i * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -7e+132], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.8e+100], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{+132}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{+100}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\end{array}
\end{array}
if x < -7.00000000000000041e132Initial program 64.6%
Simplified72.0%
Taylor expanded in x around inf 79.4%
Taylor expanded in t around inf 46.7%
if -7.00000000000000041e132 < x < 9.79999999999999934e100Initial program 88.4%
Simplified88.0%
Taylor expanded in b around inf 54.4%
if 9.79999999999999934e100 < x Initial program 64.0%
Simplified69.6%
associate-*r*66.8%
distribute-rgt-out--64.0%
associate-+l-64.0%
associate-*l*75.0%
fmm-def75.0%
associate-*l*75.0%
*-commutative75.0%
Applied egg-rr75.0%
fmm-undef75.0%
*-commutative75.0%
associate-*r*75.0%
*-commutative75.0%
*-commutative75.0%
*-commutative75.0%
associate-*l*75.0%
*-commutative75.0%
*-commutative75.0%
Simplified75.0%
pow175.0%
associate-*l*80.6%
Applied egg-rr80.6%
unpow180.6%
associate-*l*80.5%
Simplified80.5%
Taylor expanded in i around inf 59.6%
associate-*r*59.6%
*-commutative59.6%
*-commutative59.6%
Simplified59.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z -2.1e-63)
(* 18.0 (* t (* z (* x y))))
(if (<= z 8.5e+124)
(+ (* b c) (* -4.0 (* t a)))
(* 18.0 (* t (* x (* y 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 (z <= -2.1e-63) {
tmp = 18.0 * (t * (z * (x * y)));
} else if (z <= 8.5e+124) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = 18.0 * (t * (x * (y * 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 (z <= (-2.1d-63)) then
tmp = 18.0d0 * (t * (z * (x * y)))
else if (z <= 8.5d+124) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = 18.0d0 * (t * (x * (y * 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 (z <= -2.1e-63) {
tmp = 18.0 * (t * (z * (x * y)));
} else if (z <= 8.5e+124) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = 18.0 * (t * (x * (y * 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 z <= -2.1e-63: tmp = 18.0 * (t * (z * (x * y))) elif z <= 8.5e+124: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = 18.0 * (t * (x * (y * 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 (z <= -2.1e-63) tmp = Float64(18.0 * Float64(t * Float64(z * Float64(x * y)))); elseif (z <= 8.5e+124) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * 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 (z <= -2.1e-63)
tmp = 18.0 * (t * (z * (x * y)));
elseif (z <= 8.5e+124)
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = 18.0 * (t * (x * (y * 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[z, -2.1e-63], N[(18.0 * N[(t * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+124], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(18.0 * N[(t * N[(x * N[(y * 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}\;z \leq -2.1 \cdot 10^{-63}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+124}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if z < -2.1e-63Initial program 73.1%
Simplified75.7%
Taylor expanded in x around inf 44.9%
Taylor expanded in t around inf 35.5%
associate-*r*34.4%
Simplified34.4%
if -2.1e-63 < z < 8.4999999999999997e124Initial program 88.7%
Simplified89.3%
Taylor expanded in t around inf 83.9%
Taylor expanded in x around 0 61.4%
Taylor expanded in j around 0 46.3%
Taylor expanded in t around 0 50.2%
if 8.4999999999999997e124 < z Initial program 72.4%
Simplified75.1%
Taylor expanded in x around inf 56.8%
Taylor expanded in t around inf 53.9%
Final simplification46.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 (* 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 81.5%
Simplified83.0%
associate-*r*83.8%
distribute-rgt-out--81.4%
associate-+l-81.4%
associate-*l*83.0%
fmm-def83.4%
associate-*l*83.4%
*-commutative83.4%
Applied egg-rr83.4%
fmm-undef83.0%
*-commutative83.0%
associate-*r*83.0%
*-commutative83.0%
*-commutative83.0%
*-commutative83.0%
associate-*l*83.0%
*-commutative83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in b around inf 24.8%
(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 2024163
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))