
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= t -6.6e-69) (not (<= t 2.55e-172)))
(-
(+ (* b c) (* t (- (* x (* z (* 18.0 y))) (* 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 <= -6.6e-69) || !(t <= 2.55e-172)) {
tmp = ((b * c) + (t * ((x * (z * (18.0 * y))) - (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 <= (-6.6d-69)) .or. (.not. (t <= 2.55d-172))) then
tmp = ((b * c) + (t * ((x * (z * (18.0d0 * y))) - (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 <= -6.6e-69) || !(t <= 2.55e-172)) {
tmp = ((b * c) + (t * ((x * (z * (18.0 * y))) - (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 <= -6.6e-69) or not (t <= 2.55e-172): tmp = ((b * c) + (t * ((x * (z * (18.0 * y))) - (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 <= -6.6e-69) || !(t <= 2.55e-172)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(x * Float64(z * Float64(18.0 * y))) - 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 <= -6.6e-69) || ~((t <= 2.55e-172)))
tmp = ((b * c) + (t * ((x * (z * (18.0 * y))) - (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, -6.6e-69], N[Not[LessEqual[t, 2.55e-172]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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 -6.6 \cdot 10^{-69} \lor \neg \left(t \leq 2.55 \cdot 10^{-172}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\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 < -6.6000000000000001e-69 or 2.5499999999999999e-172 < t Initial program 87.5%
Simplified91.8%
pow191.8%
associate-*l*91.7%
associate-*r*91.7%
Applied egg-rr91.7%
unpow191.7%
*-commutative91.7%
Simplified91.7%
if -6.6000000000000001e-69 < t < 2.5499999999999999e-172Initial program 76.8%
Taylor expanded in y around 0 93.1%
distribute-lft-out93.1%
*-commutative93.1%
Simplified93.1%
Final simplification92.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
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 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 * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * (((b * c) / x) - ((4.0 * i) + (27.0 * ((j * k) / x))));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * 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 * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= math.inf: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * 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 (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(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(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 * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Inf)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * 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[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(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[(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}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\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}:\\
\;\;\;\;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 (-.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 95.2%
Simplified96.1%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified17.2%
Taylor expanded in t around 0 41.4%
Taylor expanded in x around inf 55.2%
Final simplification91.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 (* a (* t -4.0))) (t_2 (* -18.0 (* t (* x (* y (- z)))))))
(if (<= t -3.9e+156)
t_2
(if (<= t -8.5e+68)
t_1
(if (<= t -3.3e+19)
t_2
(if (<= t -2.85e-56)
(* b (+ c (* -4.0 (* i (/ x b)))))
(if (<= t -6.5e-97)
(* i (+ (* b (/ c i)) (* x -4.0)))
(if (<= t 3.6e-193)
(- (* b c) (* 27.0 (* j k)))
(if (<= t 1.1e+123)
(- (* b c) (* x (* 4.0 i)))
(if (<= t 1.3e+224) t_1 t_2))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double t_2 = -18.0 * (t * (x * (y * -z)));
double tmp;
if (t <= -3.9e+156) {
tmp = t_2;
} else if (t <= -8.5e+68) {
tmp = t_1;
} else if (t <= -3.3e+19) {
tmp = t_2;
} else if (t <= -2.85e-56) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else if (t <= -6.5e-97) {
tmp = i * ((b * (c / i)) + (x * -4.0));
} else if (t <= 3.6e-193) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 1.1e+123) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 1.3e+224) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (t * (-4.0d0))
t_2 = (-18.0d0) * (t * (x * (y * -z)))
if (t <= (-3.9d+156)) then
tmp = t_2
else if (t <= (-8.5d+68)) then
tmp = t_1
else if (t <= (-3.3d+19)) then
tmp = t_2
else if (t <= (-2.85d-56)) then
tmp = b * (c + ((-4.0d0) * (i * (x / b))))
else if (t <= (-6.5d-97)) then
tmp = i * ((b * (c / i)) + (x * (-4.0d0)))
else if (t <= 3.6d-193) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (t <= 1.1d+123) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (t <= 1.3d+224) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double t_2 = -18.0 * (t * (x * (y * -z)));
double tmp;
if (t <= -3.9e+156) {
tmp = t_2;
} else if (t <= -8.5e+68) {
tmp = t_1;
} else if (t <= -3.3e+19) {
tmp = t_2;
} else if (t <= -2.85e-56) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else if (t <= -6.5e-97) {
tmp = i * ((b * (c / i)) + (x * -4.0));
} else if (t <= 3.6e-193) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 1.1e+123) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 1.3e+224) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = a * (t * -4.0) t_2 = -18.0 * (t * (x * (y * -z))) tmp = 0 if t <= -3.9e+156: tmp = t_2 elif t <= -8.5e+68: tmp = t_1 elif t <= -3.3e+19: tmp = t_2 elif t <= -2.85e-56: tmp = b * (c + (-4.0 * (i * (x / b)))) elif t <= -6.5e-97: tmp = i * ((b * (c / i)) + (x * -4.0)) elif t <= 3.6e-193: tmp = (b * c) - (27.0 * (j * k)) elif t <= 1.1e+123: tmp = (b * c) - (x * (4.0 * i)) elif t <= 1.3e+224: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(a * Float64(t * -4.0)) t_2 = Float64(-18.0 * Float64(t * Float64(x * Float64(y * Float64(-z))))) tmp = 0.0 if (t <= -3.9e+156) tmp = t_2; elseif (t <= -8.5e+68) tmp = t_1; elseif (t <= -3.3e+19) tmp = t_2; elseif (t <= -2.85e-56) tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b))))); elseif (t <= -6.5e-97) tmp = Float64(i * Float64(Float64(b * Float64(c / i)) + Float64(x * -4.0))); elseif (t <= 3.6e-193) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (t <= 1.1e+123) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (t <= 1.3e+224) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = a * (t * -4.0);
t_2 = -18.0 * (t * (x * (y * -z)));
tmp = 0.0;
if (t <= -3.9e+156)
tmp = t_2;
elseif (t <= -8.5e+68)
tmp = t_1;
elseif (t <= -3.3e+19)
tmp = t_2;
elseif (t <= -2.85e-56)
tmp = b * (c + (-4.0 * (i * (x / b))));
elseif (t <= -6.5e-97)
tmp = i * ((b * (c / i)) + (x * -4.0));
elseif (t <= 3.6e-193)
tmp = (b * c) - (27.0 * (j * k));
elseif (t <= 1.1e+123)
tmp = (b * c) - (x * (4.0 * i));
elseif (t <= 1.3e+224)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-18.0 * N[(t * N[(x * N[(y * (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.9e+156], t$95$2, If[LessEqual[t, -8.5e+68], t$95$1, If[LessEqual[t, -3.3e+19], t$95$2, If[LessEqual[t, -2.85e-56], N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.5e-97], N[(i * N[(N[(b * N[(c / i), $MachinePrecision]), $MachinePrecision] + N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e-193], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+123], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e+224], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(t \cdot -4\right)\\
t_2 := -18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(-z\right)\right)\right)\right)\\
\mathbf{if}\;t \leq -3.9 \cdot 10^{+156}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{+19}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.85 \cdot 10^{-56}:\\
\;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-97}:\\
\;\;\;\;i \cdot \left(b \cdot \frac{c}{i} + x \cdot -4\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-193}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+123}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+224}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.8999999999999997e156 or -8.49999999999999966e68 < t < -3.3e19 or 1.3e224 < t Initial program 88.4%
Simplified92.2%
pow192.2%
associate-*l*92.2%
associate-*r*92.2%
Applied egg-rr92.2%
unpow192.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in x around -inf 62.3%
mul-1-neg62.3%
cancel-sign-sub-inv62.3%
associate-*r*62.4%
metadata-eval62.4%
Simplified62.4%
Taylor expanded in t around inf 58.7%
if -3.8999999999999997e156 < t < -8.49999999999999966e68 or 1.09999999999999996e123 < t < 1.3e224Initial program 91.0%
Taylor expanded in y around 0 80.6%
distribute-lft-out80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in t around inf 58.8%
*-commutative58.8%
associate-*l*58.8%
Simplified58.8%
if -3.3e19 < t < -2.8499999999999999e-56Initial program 92.2%
Simplified100.0%
Taylor expanded in t around 0 52.1%
Taylor expanded in i around inf 43.9%
associate-*r*43.9%
*-commutative43.9%
Simplified43.9%
Taylor expanded in b around inf 43.9%
associate-/l*52.0%
Simplified52.0%
if -2.8499999999999999e-56 < t < -6.5000000000000004e-97Initial program 88.9%
Simplified88.9%
Taylor expanded in t around 0 89.6%
Taylor expanded in i around inf 67.6%
associate-*r*67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in i around inf 78.0%
cancel-sign-sub-inv78.0%
metadata-eval78.0%
associate-/l*78.0%
*-commutative78.0%
Simplified78.0%
if -6.5000000000000004e-97 < t < 3.5999999999999999e-193Initial program 75.5%
Simplified74.0%
Taylor expanded in x around 0 77.0%
Taylor expanded in a around 0 73.7%
if 3.5999999999999999e-193 < t < 1.09999999999999996e123Initial program 83.2%
Simplified88.3%
Taylor expanded in t around 0 67.1%
Taylor expanded in i around inf 56.1%
associate-*r*56.1%
*-commutative56.1%
Simplified56.1%
Final simplification61.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (+ (* x i) (* t a)))))
(t_2 (* t (- (* a (- 4.0)) (* (* x (* y z)) -18.0)))))
(if (<= t -1.05e-73)
t_2
(if (<= t 2.15e-191)
(- (* b c) (* 27.0 (* j k)))
(if (<= t 6.7e-79)
t_1
(if (<= t 8e+36)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= t 1.3e+99) t_1 t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * ((x * i) + (t * a)));
double t_2 = t * ((a * -4.0) - ((x * (y * z)) * -18.0));
double tmp;
if (t <= -1.05e-73) {
tmp = t_2;
} else if (t <= 2.15e-191) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 6.7e-79) {
tmp = t_1;
} else if (t <= 8e+36) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= 1.3e+99) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * ((x * i) + (t * a)))
t_2 = t * ((a * -4.0d0) - ((x * (y * z)) * (-18.0d0)))
if (t <= (-1.05d-73)) then
tmp = t_2
else if (t <= 2.15d-191) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (t <= 6.7d-79) then
tmp = t_1
else if (t <= 8d+36) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (t <= 1.3d+99) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * ((x * i) + (t * a)));
double t_2 = t * ((a * -4.0) - ((x * (y * z)) * -18.0));
double tmp;
if (t <= -1.05e-73) {
tmp = t_2;
} else if (t <= 2.15e-191) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 6.7e-79) {
tmp = t_1;
} else if (t <= 8e+36) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= 1.3e+99) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * ((x * i) + (t * a))) t_2 = t * ((a * -4.0) - ((x * (y * z)) * -18.0)) tmp = 0 if t <= -1.05e-73: tmp = t_2 elif t <= 2.15e-191: tmp = (b * c) - (27.0 * (j * k)) elif t <= 6.7e-79: tmp = t_1 elif t <= 8e+36: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif t <= 1.3e+99: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) t_2 = Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(x * Float64(y * z)) * -18.0))) tmp = 0.0 if (t <= -1.05e-73) tmp = t_2; elseif (t <= 2.15e-191) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (t <= 6.7e-79) tmp = t_1; elseif (t <= 8e+36) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (t <= 1.3e+99) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * ((x * i) + (t * a)));
t_2 = t * ((a * -4.0) - ((x * (y * z)) * -18.0));
tmp = 0.0;
if (t <= -1.05e-73)
tmp = t_2;
elseif (t <= 2.15e-191)
tmp = (b * c) - (27.0 * (j * k));
elseif (t <= 6.7e-79)
tmp = t_1;
elseif (t <= 8e+36)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (t <= 1.3e+99)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e-73], t$95$2, If[LessEqual[t, 2.15e-191], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.7e-79], t$95$1, If[LessEqual[t, 8e+36], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e+99], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
t_2 := t \cdot \left(a \cdot \left(-4\right) - \left(x \cdot \left(y \cdot z\right)\right) \cdot -18\right)\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{-73}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-191}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 6.7 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+36}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.0499999999999999e-73 or 1.3e99 < t Initial program 89.0%
Taylor expanded in t around -inf 78.3%
associate-*r*78.3%
neg-mul-178.3%
cancel-sign-sub-inv78.3%
metadata-eval78.3%
*-commutative78.3%
*-commutative78.3%
Simplified78.3%
if -1.0499999999999999e-73 < t < 2.14999999999999992e-191Initial program 76.2%
Simplified74.8%
Taylor expanded in x around 0 74.6%
Taylor expanded in a around 0 71.7%
if 2.14999999999999992e-191 < t < 6.70000000000000017e-79 or 8.00000000000000034e36 < t < 1.3e99Initial program 82.8%
Taylor expanded in y around 0 82.9%
distribute-lft-out82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in j around 0 74.0%
if 6.70000000000000017e-79 < t < 8.00000000000000034e36Initial program 87.9%
Simplified91.9%
Taylor expanded in x around inf 71.6%
Final simplification75.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 (* b (+ c (* -4.0 (* i (/ x b)))))))
(if (<= (* b c) -1e-64)
t_1
(if (<= (* b c) -2e-116)
(* a (* t -4.0))
(if (<= (* b c) -1e-279)
(* -18.0 (* t (* x (* y (- z)))))
(if (<= (* b c) 5e+48)
(+ (* j (* k -27.0)) (* i (* x -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 = b * (c + (-4.0 * (i * (x / b))));
double tmp;
if ((b * c) <= -1e-64) {
tmp = t_1;
} else if ((b * c) <= -2e-116) {
tmp = a * (t * -4.0);
} else if ((b * c) <= -1e-279) {
tmp = -18.0 * (t * (x * (y * -z)));
} else if ((b * c) <= 5e+48) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = b * (c + ((-4.0d0) * (i * (x / b))))
if ((b * c) <= (-1d-64)) then
tmp = t_1
else if ((b * c) <= (-2d-116)) then
tmp = a * (t * (-4.0d0))
else if ((b * c) <= (-1d-279)) then
tmp = (-18.0d0) * (t * (x * (y * -z)))
else if ((b * c) <= 5d+48) then
tmp = (j * (k * (-27.0d0))) + (i * (x * (-4.0d0)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = b * (c + (-4.0 * (i * (x / b))));
double tmp;
if ((b * c) <= -1e-64) {
tmp = t_1;
} else if ((b * c) <= -2e-116) {
tmp = a * (t * -4.0);
} else if ((b * c) <= -1e-279) {
tmp = -18.0 * (t * (x * (y * -z)));
} else if ((b * c) <= 5e+48) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = b * (c + (-4.0 * (i * (x / b)))) tmp = 0 if (b * c) <= -1e-64: tmp = t_1 elif (b * c) <= -2e-116: tmp = a * (t * -4.0) elif (b * c) <= -1e-279: tmp = -18.0 * (t * (x * (y * -z))) elif (b * c) <= 5e+48: tmp = (j * (k * -27.0)) + (i * (x * -4.0)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b))))) tmp = 0.0 if (Float64(b * c) <= -1e-64) tmp = t_1; elseif (Float64(b * c) <= -2e-116) tmp = Float64(a * Float64(t * -4.0)); elseif (Float64(b * c) <= -1e-279) tmp = Float64(-18.0 * Float64(t * Float64(x * Float64(y * Float64(-z))))); elseif (Float64(b * c) <= 5e+48) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(i * Float64(x * -4.0))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = b * (c + (-4.0 * (i * (x / b))));
tmp = 0.0;
if ((b * c) <= -1e-64)
tmp = t_1;
elseif ((b * c) <= -2e-116)
tmp = a * (t * -4.0);
elseif ((b * c) <= -1e-279)
tmp = -18.0 * (t * (x * (y * -z)));
elseif ((b * c) <= 5e+48)
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e-64], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -2e-116], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1e-279], N[(-18.0 * N[(t * N[(x * N[(y * (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+48], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\mathbf{if}\;b \cdot c \leq -1 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-116}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-279}:\\
\;\;\;\;-18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(-z\right)\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+48}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -9.99999999999999965e-65 or 4.99999999999999973e48 < (*.f64 b c) Initial program 80.4%
Simplified83.3%
Taylor expanded in t around 0 65.7%
Taylor expanded in i around inf 55.9%
associate-*r*55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in b around inf 57.3%
associate-/l*57.9%
Simplified57.9%
if -9.99999999999999965e-65 < (*.f64 b c) < -2e-116Initial program 100.0%
Taylor expanded in y around 0 91.4%
distribute-lft-out91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in t around inf 73.3%
*-commutative73.3%
associate-*l*73.3%
Simplified73.3%
if -2e-116 < (*.f64 b c) < -1.00000000000000006e-279Initial program 85.2%
Simplified89.9%
pow189.9%
associate-*l*89.8%
associate-*r*89.8%
Applied egg-rr89.8%
unpow189.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in x around -inf 80.4%
mul-1-neg80.4%
cancel-sign-sub-inv80.4%
associate-*r*80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in t around inf 63.5%
if -1.00000000000000006e-279 < (*.f64 b c) < 4.99999999999999973e48Initial program 88.6%
Simplified90.9%
Taylor expanded in i around inf 53.4%
metadata-eval53.4%
distribute-lft-neg-in53.4%
*-commutative53.4%
associate-*r*53.4%
distribute-rgt-neg-in53.4%
distribute-rgt-neg-in53.4%
metadata-eval53.4%
*-commutative53.4%
Simplified53.4%
Final simplification57.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* j (* k -27.0)) (* a (* t -4.0)))))
(if (<= (* b c) -2e+56)
(* b (+ c (* -4.0 (* i (/ x b)))))
(if (<= (* b c) -2e-116)
t_1
(if (<= (* b c) -1e-279)
(* -18.0 (* t (* x (* y (- z)))))
(if (<= (* b c) 2e+120) t_1 (- (* b c) (* x (* 4.0 i)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (a * (t * -4.0));
double tmp;
if ((b * c) <= -2e+56) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else if ((b * c) <= -2e-116) {
tmp = t_1;
} else if ((b * c) <= -1e-279) {
tmp = -18.0 * (t * (x * (y * -z)));
} else if ((b * c) <= 2e+120) {
tmp = t_1;
} else {
tmp = (b * c) - (x * (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
if ((b * c) <= (-2d+56)) then
tmp = b * (c + ((-4.0d0) * (i * (x / b))))
else if ((b * c) <= (-2d-116)) then
tmp = t_1
else if ((b * c) <= (-1d-279)) then
tmp = (-18.0d0) * (t * (x * (y * -z)))
else if ((b * c) <= 2d+120) then
tmp = t_1
else
tmp = (b * c) - (x * (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (a * (t * -4.0));
double tmp;
if ((b * c) <= -2e+56) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else if ((b * c) <= -2e-116) {
tmp = t_1;
} else if ((b * c) <= -1e-279) {
tmp = -18.0 * (t * (x * (y * -z)));
} else if ((b * c) <= 2e+120) {
tmp = t_1;
} else {
tmp = (b * c) - (x * (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (k * -27.0)) + (a * (t * -4.0)) tmp = 0 if (b * c) <= -2e+56: tmp = b * (c + (-4.0 * (i * (x / b)))) elif (b * c) <= -2e-116: tmp = t_1 elif (b * c) <= -1e-279: tmp = -18.0 * (t * (x * (y * -z))) elif (b * c) <= 2e+120: tmp = t_1 else: tmp = (b * c) - (x * (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0))) tmp = 0.0 if (Float64(b * c) <= -2e+56) tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b))))); elseif (Float64(b * c) <= -2e-116) tmp = t_1; elseif (Float64(b * c) <= -1e-279) tmp = Float64(-18.0 * Float64(t * Float64(x * Float64(y * Float64(-z))))); elseif (Float64(b * c) <= 2e+120) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (k * -27.0)) + (a * (t * -4.0));
tmp = 0.0;
if ((b * c) <= -2e+56)
tmp = b * (c + (-4.0 * (i * (x / b))));
elseif ((b * c) <= -2e-116)
tmp = t_1;
elseif ((b * c) <= -1e-279)
tmp = -18.0 * (t * (x * (y * -z)));
elseif ((b * c) <= 2e+120)
tmp = t_1;
else
tmp = (b * c) - (x * (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+56], N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-116], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1e-279], N[(-18.0 * N[(t * N[(x * N[(y * (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+120], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+56}:\\
\;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-279}:\\
\;\;\;\;-18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(-z\right)\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.00000000000000018e56Initial program 81.1%
Simplified87.2%
Taylor expanded in t around 0 68.9%
Taylor expanded in i around inf 62.5%
associate-*r*62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in b around inf 60.5%
associate-/l*60.5%
Simplified60.5%
if -2.00000000000000018e56 < (*.f64 b c) < -2e-116 or -1.00000000000000006e-279 < (*.f64 b c) < 2e120Initial program 89.1%
Simplified89.9%
Taylor expanded in a around inf 56.4%
metadata-eval56.4%
distribute-lft-neg-in56.4%
*-commutative56.4%
associate-*l*56.4%
distribute-lft-neg-in56.4%
distribute-lft-neg-in56.4%
metadata-eval56.4%
Simplified56.4%
if -2e-116 < (*.f64 b c) < -1.00000000000000006e-279Initial program 85.2%
Simplified89.9%
pow189.9%
associate-*l*89.8%
associate-*r*89.8%
Applied egg-rr89.8%
unpow189.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in x around -inf 80.4%
mul-1-neg80.4%
cancel-sign-sub-inv80.4%
associate-*r*80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in t around inf 63.5%
if 2e120 < (*.f64 b c) Initial program 74.5%
Simplified78.5%
Taylor expanded in t around 0 75.0%
Taylor expanded in i around inf 69.4%
associate-*r*69.4%
*-commutative69.4%
Simplified69.4%
Final simplification60.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* (* t a) -4.0) (* 27.0 (* j k)))))
(if (<= (* b c) -2e+56)
(* b (+ c (* -4.0 (* i (/ x b)))))
(if (<= (* b c) -2e-116)
t_1
(if (<= (* b c) -1e-279)
(* -18.0 (* t (* x (* y (- z)))))
(if (<= (* b c) 2e+120) t_1 (- (* b c) (* x (* 4.0 i)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((t * a) * -4.0) - (27.0 * (j * k));
double tmp;
if ((b * c) <= -2e+56) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else if ((b * c) <= -2e-116) {
tmp = t_1;
} else if ((b * c) <= -1e-279) {
tmp = -18.0 * (t * (x * (y * -z)));
} else if ((b * c) <= 2e+120) {
tmp = t_1;
} else {
tmp = (b * c) - (x * (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = ((t * a) * (-4.0d0)) - (27.0d0 * (j * k))
if ((b * c) <= (-2d+56)) then
tmp = b * (c + ((-4.0d0) * (i * (x / b))))
else if ((b * c) <= (-2d-116)) then
tmp = t_1
else if ((b * c) <= (-1d-279)) then
tmp = (-18.0d0) * (t * (x * (y * -z)))
else if ((b * c) <= 2d+120) then
tmp = t_1
else
tmp = (b * c) - (x * (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((t * a) * -4.0) - (27.0 * (j * k));
double tmp;
if ((b * c) <= -2e+56) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else if ((b * c) <= -2e-116) {
tmp = t_1;
} else if ((b * c) <= -1e-279) {
tmp = -18.0 * (t * (x * (y * -z)));
} else if ((b * c) <= 2e+120) {
tmp = t_1;
} else {
tmp = (b * c) - (x * (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((t * a) * -4.0) - (27.0 * (j * k)) tmp = 0 if (b * c) <= -2e+56: tmp = b * (c + (-4.0 * (i * (x / b)))) elif (b * c) <= -2e-116: tmp = t_1 elif (b * c) <= -1e-279: tmp = -18.0 * (t * (x * (y * -z))) elif (b * c) <= 2e+120: tmp = t_1 else: tmp = (b * c) - (x * (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(t * a) * -4.0) - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (Float64(b * c) <= -2e+56) tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b))))); elseif (Float64(b * c) <= -2e-116) tmp = t_1; elseif (Float64(b * c) <= -1e-279) tmp = Float64(-18.0 * Float64(t * Float64(x * Float64(y * Float64(-z))))); elseif (Float64(b * c) <= 2e+120) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((t * a) * -4.0) - (27.0 * (j * k));
tmp = 0.0;
if ((b * c) <= -2e+56)
tmp = b * (c + (-4.0 * (i * (x / b))));
elseif ((b * c) <= -2e-116)
tmp = t_1;
elseif ((b * c) <= -1e-279)
tmp = -18.0 * (t * (x * (y * -z)));
elseif ((b * c) <= 2e+120)
tmp = t_1;
else
tmp = (b * c) - (x * (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+56], N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-116], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1e-279], N[(-18.0 * N[(t * N[(x * N[(y * (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+120], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(t \cdot a\right) \cdot -4 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+56}:\\
\;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-279}:\\
\;\;\;\;-18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(-z\right)\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.00000000000000018e56Initial program 81.1%
Simplified87.2%
Taylor expanded in t around 0 68.9%
Taylor expanded in i around inf 62.5%
associate-*r*62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in b around inf 60.5%
associate-/l*60.5%
Simplified60.5%
if -2.00000000000000018e56 < (*.f64 b c) < -2e-116 or -1.00000000000000006e-279 < (*.f64 b c) < 2e120Initial program 89.1%
Simplified89.9%
Taylor expanded in x around 0 61.4%
Taylor expanded in b around 0 56.5%
if -2e-116 < (*.f64 b c) < -1.00000000000000006e-279Initial program 85.2%
Simplified89.9%
pow189.9%
associate-*l*89.8%
associate-*r*89.8%
Applied egg-rr89.8%
unpow189.8%
*-commutative89.8%
Simplified89.8%
Taylor expanded in x around -inf 80.4%
mul-1-neg80.4%
cancel-sign-sub-inv80.4%
associate-*r*80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in t around inf 63.5%
if 2e120 < (*.f64 b c) Initial program 74.5%
Simplified78.5%
Taylor expanded in t around 0 75.0%
Taylor expanded in i around inf 69.4%
associate-*r*69.4%
*-commutative69.4%
Simplified69.4%
Final simplification60.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 (* a (* t -4.0))) (t_2 (* -18.0 (* t (* x (* y (- z)))))))
(if (<= t -1.1e+157)
t_2
(if (<= t -6.5e+18)
t_1
(if (<= t 9.2e-192)
(- (* b c) (* 27.0 (* j k)))
(if (<= t 2.65e+123)
(- (* b c) (* x (* 4.0 i)))
(if (<= t 1e+226) t_1 t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double t_2 = -18.0 * (t * (x * (y * -z)));
double tmp;
if (t <= -1.1e+157) {
tmp = t_2;
} else if (t <= -6.5e+18) {
tmp = t_1;
} else if (t <= 9.2e-192) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 2.65e+123) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 1e+226) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (t * (-4.0d0))
t_2 = (-18.0d0) * (t * (x * (y * -z)))
if (t <= (-1.1d+157)) then
tmp = t_2
else if (t <= (-6.5d+18)) then
tmp = t_1
else if (t <= 9.2d-192) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (t <= 2.65d+123) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (t <= 1d+226) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double t_2 = -18.0 * (t * (x * (y * -z)));
double tmp;
if (t <= -1.1e+157) {
tmp = t_2;
} else if (t <= -6.5e+18) {
tmp = t_1;
} else if (t <= 9.2e-192) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 2.65e+123) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 1e+226) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = a * (t * -4.0) t_2 = -18.0 * (t * (x * (y * -z))) tmp = 0 if t <= -1.1e+157: tmp = t_2 elif t <= -6.5e+18: tmp = t_1 elif t <= 9.2e-192: tmp = (b * c) - (27.0 * (j * k)) elif t <= 2.65e+123: tmp = (b * c) - (x * (4.0 * i)) elif t <= 1e+226: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(a * Float64(t * -4.0)) t_2 = Float64(-18.0 * Float64(t * Float64(x * Float64(y * Float64(-z))))) tmp = 0.0 if (t <= -1.1e+157) tmp = t_2; elseif (t <= -6.5e+18) tmp = t_1; elseif (t <= 9.2e-192) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (t <= 2.65e+123) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (t <= 1e+226) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = a * (t * -4.0);
t_2 = -18.0 * (t * (x * (y * -z)));
tmp = 0.0;
if (t <= -1.1e+157)
tmp = t_2;
elseif (t <= -6.5e+18)
tmp = t_1;
elseif (t <= 9.2e-192)
tmp = (b * c) - (27.0 * (j * k));
elseif (t <= 2.65e+123)
tmp = (b * c) - (x * (4.0 * i));
elseif (t <= 1e+226)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-18.0 * N[(t * N[(x * N[(y * (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+157], t$95$2, If[LessEqual[t, -6.5e+18], t$95$1, If[LessEqual[t, 9.2e-192], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.65e+123], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+226], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(t \cdot -4\right)\\
t_2 := -18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(-z\right)\right)\right)\right)\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+157}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{-192}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{+123}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 10^{+226}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.1000000000000001e157 or 9.99999999999999961e225 < t Initial program 88.3%
Simplified93.0%
pow193.0%
associate-*l*92.9%
associate-*r*93.0%
Applied egg-rr93.0%
unpow193.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in x around -inf 63.6%
mul-1-neg63.6%
cancel-sign-sub-inv63.6%
associate-*r*63.6%
metadata-eval63.6%
Simplified63.6%
Taylor expanded in t around inf 59.1%
if -1.1000000000000001e157 < t < -6.5e18 or 2.65e123 < t < 9.99999999999999961e225Initial program 90.9%
Taylor expanded in y around 0 75.1%
distribute-lft-out75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in t around inf 52.4%
*-commutative52.4%
associate-*l*52.4%
Simplified52.4%
if -6.5e18 < t < 9.20000000000000073e-192Initial program 79.2%
Simplified79.2%
Taylor expanded in x around 0 73.0%
Taylor expanded in a around 0 67.0%
if 9.20000000000000073e-192 < t < 2.65e123Initial program 83.2%
Simplified88.3%
Taylor expanded in t around 0 67.1%
Taylor expanded in i around inf 56.1%
associate-*r*56.1%
*-commutative56.1%
Simplified56.1%
Final simplification59.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* a (* t -4.0))))
(if (<= (* b c) -2.7e+103)
(* b c)
(if (<= (* b c) -7.5e-257)
t_1
(if (<= (* b c) 1e-318)
(* (* j k) -27.0)
(if (<= (* b c) 4.3e+154) t_1 (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double tmp;
if ((b * c) <= -2.7e+103) {
tmp = b * c;
} else if ((b * c) <= -7.5e-257) {
tmp = t_1;
} else if ((b * c) <= 1e-318) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 4.3e+154) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = a * (t * (-4.0d0))
if ((b * c) <= (-2.7d+103)) then
tmp = b * c
else if ((b * c) <= (-7.5d-257)) then
tmp = t_1
else if ((b * c) <= 1d-318) then
tmp = (j * k) * (-27.0d0)
else if ((b * c) <= 4.3d+154) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double tmp;
if ((b * c) <= -2.7e+103) {
tmp = b * c;
} else if ((b * c) <= -7.5e-257) {
tmp = t_1;
} else if ((b * c) <= 1e-318) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 4.3e+154) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = a * (t * -4.0) tmp = 0 if (b * c) <= -2.7e+103: tmp = b * c elif (b * c) <= -7.5e-257: tmp = t_1 elif (b * c) <= 1e-318: tmp = (j * k) * -27.0 elif (b * c) <= 4.3e+154: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(a * Float64(t * -4.0)) tmp = 0.0 if (Float64(b * c) <= -2.7e+103) tmp = Float64(b * c); elseif (Float64(b * c) <= -7.5e-257) tmp = t_1; elseif (Float64(b * c) <= 1e-318) tmp = Float64(Float64(j * k) * -27.0); elseif (Float64(b * c) <= 4.3e+154) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = a * (t * -4.0);
tmp = 0.0;
if ((b * c) <= -2.7e+103)
tmp = b * c;
elseif ((b * c) <= -7.5e-257)
tmp = t_1;
elseif ((b * c) <= 1e-318)
tmp = (j * k) * -27.0;
elseif ((b * c) <= 4.3e+154)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.7e+103], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7.5e-257], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1e-318], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.3e+154], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(t \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -2.7 \cdot 10^{+103}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -7.5 \cdot 10^{-257}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 10^{-318}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;b \cdot c \leq 4.3 \cdot 10^{+154}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.69999999999999993e103 or 4.2999999999999998e154 < (*.f64 b c) Initial program 77.0%
Simplified82.4%
pow182.4%
associate-*l*82.4%
associate-*r*82.4%
Applied egg-rr82.4%
unpow182.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in b around inf 59.1%
if -2.69999999999999993e103 < (*.f64 b c) < -7.4999999999999995e-257 or 9.9999875e-319 < (*.f64 b c) < 4.2999999999999998e154Initial program 88.4%
Taylor expanded in y around 0 74.3%
distribute-lft-out74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in t around inf 33.9%
*-commutative33.9%
associate-*l*33.9%
Simplified33.9%
if -7.4999999999999995e-257 < (*.f64 b c) < 9.9999875e-319Initial program 88.8%
Simplified91.4%
Taylor expanded in j around inf 43.2%
Final simplification44.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 (* a (* t -4.0))))
(if (<= (* b c) -2.8e+88)
(* b c)
(if (<= (* b c) -1.8e-264)
t_1
(if (<= (* b c) 1e-318)
(* k (* j -27.0))
(if (<= (* b c) 8.2e+157) t_1 (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double tmp;
if ((b * c) <= -2.8e+88) {
tmp = b * c;
} else if ((b * c) <= -1.8e-264) {
tmp = t_1;
} else if ((b * c) <= 1e-318) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 8.2e+157) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = a * (t * (-4.0d0))
if ((b * c) <= (-2.8d+88)) then
tmp = b * c
else if ((b * c) <= (-1.8d-264)) then
tmp = t_1
else if ((b * c) <= 1d-318) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 8.2d+157) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double tmp;
if ((b * c) <= -2.8e+88) {
tmp = b * c;
} else if ((b * c) <= -1.8e-264) {
tmp = t_1;
} else if ((b * c) <= 1e-318) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 8.2e+157) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = a * (t * -4.0) tmp = 0 if (b * c) <= -2.8e+88: tmp = b * c elif (b * c) <= -1.8e-264: tmp = t_1 elif (b * c) <= 1e-318: tmp = k * (j * -27.0) elif (b * c) <= 8.2e+157: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(a * Float64(t * -4.0)) tmp = 0.0 if (Float64(b * c) <= -2.8e+88) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.8e-264) tmp = t_1; elseif (Float64(b * c) <= 1e-318) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 8.2e+157) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = a * (t * -4.0);
tmp = 0.0;
if ((b * c) <= -2.8e+88)
tmp = b * c;
elseif ((b * c) <= -1.8e-264)
tmp = t_1;
elseif ((b * c) <= 1e-318)
tmp = k * (j * -27.0);
elseif ((b * c) <= 8.2e+157)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.8e+88], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.8e-264], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1e-318], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.2e+157], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(t \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -2.8 \cdot 10^{+88}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.8 \cdot 10^{-264}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 10^{-318}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.79999999999999989e88 or 8.20000000000000032e157 < (*.f64 b c) Initial program 77.0%
Simplified82.4%
pow182.4%
associate-*l*82.4%
associate-*r*82.4%
Applied egg-rr82.4%
unpow182.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in b around inf 59.1%
if -2.79999999999999989e88 < (*.f64 b c) < -1.8000000000000001e-264 or 9.9999875e-319 < (*.f64 b c) < 8.20000000000000032e157Initial program 88.4%
Taylor expanded in y around 0 74.3%
distribute-lft-out74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in t around inf 33.9%
*-commutative33.9%
associate-*l*33.9%
Simplified33.9%
if -1.8000000000000001e-264 < (*.f64 b c) < 9.9999875e-319Initial program 88.8%
Simplified91.4%
Taylor expanded in j around inf 43.2%
associate-*r*43.3%
*-commutative43.3%
Simplified43.3%
Final simplification44.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -1.85e-65) (not (<= t 96000000000000.0))) (- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (* 4.0 (* x i))) (- (- (* 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.85e-65) || !(t <= 96000000000000.0)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} 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.85d-65)) .or. (.not. (t <= 96000000000000.0d0))) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
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.85e-65) || !(t <= 96000000000000.0)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} 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.85e-65) or not (t <= 96000000000000.0): tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) 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.85e-65) || !(t <= 96000000000000.0)) 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))); 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.85e-65) || ~((t <= 96000000000000.0)))
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
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.85e-65], N[Not[LessEqual[t, 96000000000000.0]], $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], 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.85 \cdot 10^{-65} \lor \neg \left(t \leq 96000000000000\right):\\
\;\;\;\;\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)\\
\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.85e-65 or 9.6e13 < t Initial program 87.8%
Simplified92.8%
Taylor expanded in j around 0 90.0%
if -1.85e-65 < t < 9.6e13Initial program 80.4%
Taylor expanded in y around 0 88.1%
distribute-lft-out88.1%
*-commutative88.1%
Simplified88.1%
Final simplification89.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 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))
(if (<= t -9.5e-68)
(- t_1 (* 27.0 (* j k)))
(if (<= t 1.25e+14)
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* (* j 27.0) k))
(- t_1 (* 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 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (t <= -9.5e-68) {
tmp = t_1 - (27.0 * (j * k));
} else if (t <= 1.25e+14) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
} else {
tmp = t_1 - (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 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
if (t <= (-9.5d-68)) then
tmp = t_1 - (27.0d0 * (j * k))
else if (t <= 1.25d+14) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - ((j * 27.0d0) * k)
else
tmp = t_1 - (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 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (t <= -9.5e-68) {
tmp = t_1 - (27.0 * (j * k));
} else if (t <= 1.25e+14) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
} else {
tmp = t_1 - (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 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) tmp = 0 if t <= -9.5e-68: tmp = t_1 - (27.0 * (j * k)) elif t <= 1.25e+14: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k) else: tmp = t_1 - (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(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) tmp = 0.0 if (t <= -9.5e-68) tmp = Float64(t_1 - Float64(27.0 * Float64(j * k))); elseif (t <= 1.25e+14) 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(t_1 - 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 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
tmp = 0.0;
if (t <= -9.5e-68)
tmp = t_1 - (27.0 * (j * k));
elseif (t <= 1.25e+14)
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
else
tmp = t_1 - (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[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e-68], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+14], 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[(t$95$1 - 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 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-68}:\\
\;\;\;\;t\_1 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+14}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t\_1 - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if t < -9.4999999999999997e-68Initial program 90.4%
Simplified95.2%
pow195.2%
associate-*l*95.1%
associate-*r*95.1%
Applied egg-rr95.1%
unpow195.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in i around 0 92.5%
if -9.4999999999999997e-68 < t < 1.25e14Initial program 80.4%
Taylor expanded in y around 0 88.1%
distribute-lft-out88.1%
*-commutative88.1%
Simplified88.1%
if 1.25e14 < t Initial program 85.8%
Simplified90.8%
Taylor expanded in j around 0 89.7%
Final simplification89.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -1.3e-64) (not (<= t 1.38e+14))) (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (- (- (* 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.3e-64) || !(t <= 1.38e+14)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} 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.3d-64)) .or. (.not. (t <= 1.38d+14))) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
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.3e-64) || !(t <= 1.38e+14)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} 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.3e-64) or not (t <= 1.38e+14): tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) 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.3e-64) || !(t <= 1.38e+14)) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); 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.3e-64) || ~((t <= 1.38e+14)))
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
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.3e-64], N[Not[LessEqual[t, 1.38e+14]], $MachinePrecision]], 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[(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.3 \cdot 10^{-64} \lor \neg \left(t \leq 1.38 \cdot 10^{+14}\right):\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\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.3e-64 or 1.38e14 < t Initial program 87.8%
Simplified92.8%
pow192.8%
associate-*l*92.7%
associate-*r*92.7%
Applied egg-rr92.7%
unpow192.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in i around 0 87.7%
Taylor expanded in j around 0 84.9%
if -1.3e-64 < t < 1.38e14Initial program 80.4%
Taylor expanded in y around 0 88.1%
distribute-lft-out88.1%
*-commutative88.1%
Simplified88.1%
Final simplification86.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 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -1.75e+160)
t_1
(if (<= x 5.2e-182)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 17000000000.0) (+ (* j (* k -27.0)) (* 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 * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -1.75e+160) {
tmp = t_1;
} else if (x <= 5.2e-182) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 17000000000.0) {
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-1.75d+160)) then
tmp = t_1
else if (x <= 5.2d-182) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 17000000000.0d0) then
tmp = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -1.75e+160) {
tmp = t_1;
} else if (x <= 5.2e-182) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 17000000000.0) {
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -1.75e+160: tmp = t_1 elif x <= 5.2e-182: tmp = (b * c) - (27.0 * (j * k)) elif x <= 17000000000.0: tmp = (j * (k * -27.0)) + (a * (t * -4.0)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -1.75e+160) tmp = t_1; elseif (x <= 5.2e-182) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 17000000000.0) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -1.75e+160)
tmp = t_1;
elseif (x <= 5.2e-182)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 17000000000.0)
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.75e+160], t$95$1, If[LessEqual[x, 5.2e-182], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 17000000000.0], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -1.75 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-182}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 17000000000:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.75000000000000013e160 or 1.7e10 < x Initial program 73.6%
Simplified81.4%
Taylor expanded in x around inf 69.3%
if -1.75000000000000013e160 < x < 5.20000000000000011e-182Initial program 89.8%
Simplified88.8%
Taylor expanded in x around 0 79.0%
Taylor expanded in a around 0 62.8%
if 5.20000000000000011e-182 < x < 1.7e10Initial program 95.7%
Simplified95.7%
Taylor expanded in a around inf 61.1%
metadata-eval61.1%
distribute-lft-neg-in61.1%
*-commutative61.1%
associate-*l*61.1%
distribute-lft-neg-in61.1%
distribute-lft-neg-in61.1%
metadata-eval61.1%
Simplified61.1%
Final simplification65.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 a) -4.0) (* 27.0 (* j k)))))
(if (<= j -1.1e+155)
t_1
(if (<= j -1.92e+136)
(* -18.0 (* t (* x (* y (- z)))))
(if (<= j -9e+120) t_1 (- (* b c) (* 4.0 (+ (* x i) (* t a)))))))))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 * a) * -4.0) - (27.0 * (j * k));
double tmp;
if (j <= -1.1e+155) {
tmp = t_1;
} else if (j <= -1.92e+136) {
tmp = -18.0 * (t * (x * (y * -z)));
} else if (j <= -9e+120) {
tmp = t_1;
} else {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
}
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 * a) * (-4.0d0)) - (27.0d0 * (j * k))
if (j <= (-1.1d+155)) then
tmp = t_1
else if (j <= (-1.92d+136)) then
tmp = (-18.0d0) * (t * (x * (y * -z)))
else if (j <= (-9d+120)) then
tmp = t_1
else
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
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 * a) * -4.0) - (27.0 * (j * k));
double tmp;
if (j <= -1.1e+155) {
tmp = t_1;
} else if (j <= -1.92e+136) {
tmp = -18.0 * (t * (x * (y * -z)));
} else if (j <= -9e+120) {
tmp = t_1;
} else {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
}
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 * a) * -4.0) - (27.0 * (j * k)) tmp = 0 if j <= -1.1e+155: tmp = t_1 elif j <= -1.92e+136: tmp = -18.0 * (t * (x * (y * -z))) elif j <= -9e+120: tmp = t_1 else: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) 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(t * a) * -4.0) - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (j <= -1.1e+155) tmp = t_1; elseif (j <= -1.92e+136) tmp = Float64(-18.0 * Float64(t * Float64(x * Float64(y * Float64(-z))))); elseif (j <= -9e+120) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); 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 * a) * -4.0) - (27.0 * (j * k));
tmp = 0.0;
if (j <= -1.1e+155)
tmp = t_1;
elseif (j <= -1.92e+136)
tmp = -18.0 * (t * (x * (y * -z)));
elseif (j <= -9e+120)
tmp = t_1;
else
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
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[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.1e+155], t$95$1, If[LessEqual[j, -1.92e+136], N[(-18.0 * N[(t * N[(x * N[(y * (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -9e+120], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(t \cdot a\right) \cdot -4 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;j \leq -1.1 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -1.92 \cdot 10^{+136}:\\
\;\;\;\;-18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \left(-z\right)\right)\right)\right)\\
\mathbf{elif}\;j \leq -9 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\end{array}
\end{array}
if j < -1.1000000000000001e155 or -1.91999999999999998e136 < j < -8.99999999999999953e120Initial program 75.3%
Simplified77.4%
Taylor expanded in x around 0 72.8%
Taylor expanded in b around 0 67.3%
if -1.1000000000000001e155 < j < -1.91999999999999998e136Initial program 0.0%
Simplified33.3%
pow133.3%
associate-*l*33.3%
associate-*r*33.3%
Applied egg-rr33.3%
unpow133.3%
*-commutative33.3%
Simplified33.3%
Taylor expanded in x around -inf 34.5%
mul-1-neg34.5%
cancel-sign-sub-inv34.5%
associate-*r*34.5%
metadata-eval34.5%
Simplified34.5%
Taylor expanded in t around inf 67.0%
if -8.99999999999999953e120 < j Initial program 87.3%
Taylor expanded in y around 0 78.0%
distribute-lft-out78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in j around 0 67.4%
Final simplification67.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 (or (<= t -1.25e-64) (not (<= t 1.3e+14))) (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1.25e-64) || !(t <= 1.3e+14)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-1.25d-64)) .or. (.not. (t <= 1.3d+14))) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else
tmp = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1.25e-64) || !(t <= 1.3e+14)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -1.25e-64) or not (t <= 1.3e+14): tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) else: tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -1.25e-64) || !(t <= 1.3e+14)) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); else tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -1.25e-64) || ~((t <= 1.3e+14)))
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
else
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1.25e-64], N[Not[LessEqual[t, 1.3e+14]], $MachinePrecision]], 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[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-64} \lor \neg \left(t \leq 1.3 \cdot 10^{+14}\right):\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if t < -1.25000000000000008e-64 or 1.3e14 < t Initial program 87.8%
Simplified92.8%
pow192.8%
associate-*l*92.7%
associate-*r*92.7%
Applied egg-rr92.7%
unpow192.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in i around 0 87.7%
Taylor expanded in j around 0 84.9%
if -1.25000000000000008e-64 < t < 1.3e14Initial program 80.4%
Simplified80.4%
Taylor expanded in t around 0 83.3%
Final simplification84.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -3.6e-22) (not (<= t 1.38e+14))) (* t (- (* a (- 4.0)) (* (* x (* y z)) -18.0))) (- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -3.6e-22) || !(t <= 1.38e+14)) {
tmp = t * ((a * -4.0) - ((x * (y * z)) * -18.0));
} else {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-3.6d-22)) .or. (.not. (t <= 1.38d+14))) then
tmp = t * ((a * -4.0d0) - ((x * (y * z)) * (-18.0d0)))
else
tmp = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -3.6e-22) || !(t <= 1.38e+14)) {
tmp = t * ((a * -4.0) - ((x * (y * z)) * -18.0));
} else {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -3.6e-22) or not (t <= 1.38e+14): tmp = t * ((a * -4.0) - ((x * (y * z)) * -18.0)) else: tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -3.6e-22) || !(t <= 1.38e+14)) tmp = Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(x * Float64(y * z)) * -18.0))); else tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -3.6e-22) || ~((t <= 1.38e+14)))
tmp = t * ((a * -4.0) - ((x * (y * z)) * -18.0));
else
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -3.6e-22], N[Not[LessEqual[t, 1.38e+14]], $MachinePrecision]], N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-22} \lor \neg \left(t \leq 1.38 \cdot 10^{+14}\right):\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(x \cdot \left(y \cdot z\right)\right) \cdot -18\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if t < -3.5999999999999998e-22 or 1.38e14 < t Initial program 87.8%
Taylor expanded in t around -inf 75.9%
associate-*r*75.9%
neg-mul-175.9%
cancel-sign-sub-inv75.9%
metadata-eval75.9%
*-commutative75.9%
*-commutative75.9%
Simplified75.9%
if -3.5999999999999998e-22 < t < 1.38e14Initial program 80.9%
Simplified81.7%
Taylor expanded in t around 0 82.0%
Final simplification78.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* a (* t -4.0))))
(if (<= t -5.8e+18)
t_1
(if (<= t 6e-193)
(- (* b c) (* 27.0 (* j k)))
(if (<= t 5.5e+125) (- (* b c) (* x (* 4.0 i))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double tmp;
if (t <= -5.8e+18) {
tmp = t_1;
} else if (t <= 6e-193) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 5.5e+125) {
tmp = (b * c) - (x * (4.0 * i));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = a * (t * (-4.0d0))
if (t <= (-5.8d+18)) then
tmp = t_1
else if (t <= 6d-193) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (t <= 5.5d+125) then
tmp = (b * c) - (x * (4.0d0 * i))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = a * (t * -4.0);
double tmp;
if (t <= -5.8e+18) {
tmp = t_1;
} else if (t <= 6e-193) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 5.5e+125) {
tmp = (b * c) - (x * (4.0 * i));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = a * (t * -4.0) tmp = 0 if t <= -5.8e+18: tmp = t_1 elif t <= 6e-193: tmp = (b * c) - (27.0 * (j * k)) elif t <= 5.5e+125: tmp = (b * c) - (x * (4.0 * i)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(a * Float64(t * -4.0)) tmp = 0.0 if (t <= -5.8e+18) tmp = t_1; elseif (t <= 6e-193) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (t <= 5.5e+125) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = a * (t * -4.0);
tmp = 0.0;
if (t <= -5.8e+18)
tmp = t_1;
elseif (t <= 6e-193)
tmp = (b * c) - (27.0 * (j * k));
elseif (t <= 5.5e+125)
tmp = (b * c) - (x * (4.0 * i));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.8e+18], t$95$1, If[LessEqual[t, 6e-193], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+125], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(t \cdot -4\right)\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-193}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+125}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.8e18 or 5.49999999999999996e125 < t Initial program 89.7%
Taylor expanded in y around 0 66.0%
distribute-lft-out66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in t around inf 45.3%
*-commutative45.3%
associate-*l*45.3%
Simplified45.3%
if -5.8e18 < t < 5.9999999999999998e-193Initial program 79.2%
Simplified79.2%
Taylor expanded in x around 0 73.0%
Taylor expanded in a around 0 67.0%
if 5.9999999999999998e-193 < t < 5.49999999999999996e125Initial program 83.2%
Simplified88.3%
Taylor expanded in t around 0 67.1%
Taylor expanded in i around inf 56.1%
associate-*r*56.1%
*-commutative56.1%
Simplified56.1%
Final simplification55.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 (or (<= (* b c) -7.6e+44) (not (<= (* b c) 8.4e+48))) (* b c) (* (* j k) -27.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -7.6e+44) || !((b * c) <= 8.4e+48)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-7.6d+44)) .or. (.not. ((b * c) <= 8.4d+48))) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -7.6e+44) || !((b * c) <= 8.4e+48)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -7.6e+44) or not ((b * c) <= 8.4e+48): tmp = b * c else: tmp = (j * k) * -27.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -7.6e+44) || !(Float64(b * c) <= 8.4e+48)) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -7.6e+44) || ~(((b * c) <= 8.4e+48)))
tmp = b * c;
else
tmp = (j * k) * -27.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -7.6e+44], N[Not[LessEqual[N[(b * c), $MachinePrecision], 8.4e+48]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -7.6 \cdot 10^{+44} \lor \neg \left(b \cdot c \leq 8.4 \cdot 10^{+48}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -7.6000000000000004e44 or 8.3999999999999994e48 < (*.f64 b c) Initial program 79.9%
Simplified84.2%
pow184.2%
associate-*l*84.2%
associate-*r*84.2%
Applied egg-rr84.2%
unpow184.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in b around inf 50.9%
if -7.6000000000000004e44 < (*.f64 b c) < 8.3999999999999994e48Initial program 88.1%
Simplified89.5%
Taylor expanded in j around inf 27.4%
Final simplification37.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 (<= t -7.5e+18) (not (<= t 1.45e+125))) (* a (* t -4.0)) (+ (* b c) (* j (* k -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -7.5e+18) || !(t <= 1.45e+125)) {
tmp = a * (t * -4.0);
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-7.5d+18)) .or. (.not. (t <= 1.45d+125))) then
tmp = a * (t * (-4.0d0))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -7.5e+18) || !(t <= 1.45e+125)) {
tmp = a * (t * -4.0);
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -7.5e+18) or not (t <= 1.45e+125): tmp = a * (t * -4.0) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -7.5e+18) || !(t <= 1.45e+125)) tmp = Float64(a * Float64(t * -4.0)); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -7.5e+18) || ~((t <= 1.45e+125)))
tmp = a * (t * -4.0);
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -7.5e+18], N[Not[LessEqual[t, 1.45e+125]], $MachinePrecision]], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+18} \lor \neg \left(t \leq 1.45 \cdot 10^{+125}\right):\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if t < -7.5e18 or 1.44999999999999997e125 < t Initial program 89.7%
Taylor expanded in y around 0 66.0%
distribute-lft-out66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in t around inf 45.3%
*-commutative45.3%
associate-*l*45.3%
Simplified45.3%
if -7.5e18 < t < 1.44999999999999997e125Initial program 81.1%
Simplified84.2%
Taylor expanded in b around inf 57.9%
Final simplification53.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 (if (or (<= t -7.5e+18) (not (<= t 3.55e+124))) (* a (* t -4.0)) (- (* 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 ((t <= -7.5e+18) || !(t <= 3.55e+124)) {
tmp = a * (t * -4.0);
} else {
tmp = (b * c) - (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 ((t <= (-7.5d+18)) .or. (.not. (t <= 3.55d+124))) then
tmp = a * (t * (-4.0d0))
else
tmp = (b * c) - (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 ((t <= -7.5e+18) || !(t <= 3.55e+124)) {
tmp = a * (t * -4.0);
} else {
tmp = (b * c) - (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 (t <= -7.5e+18) or not (t <= 3.55e+124): tmp = a * (t * -4.0) else: tmp = (b * c) - (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 ((t <= -7.5e+18) || !(t <= 3.55e+124)) tmp = Float64(a * Float64(t * -4.0)); else tmp = Float64(Float64(b * c) - 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 ((t <= -7.5e+18) || ~((t <= 3.55e+124)))
tmp = a * (t * -4.0);
else
tmp = (b * c) - (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[t, -7.5e+18], N[Not[LessEqual[t, 3.55e+124]], $MachinePrecision]], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+18} \lor \neg \left(t \leq 3.55 \cdot 10^{+124}\right):\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if t < -7.5e18 or 3.5500000000000002e124 < t Initial program 89.7%
Taylor expanded in y around 0 66.0%
distribute-lft-out66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in t around inf 45.3%
*-commutative45.3%
associate-*l*45.3%
Simplified45.3%
if -7.5e18 < t < 3.5500000000000002e124Initial program 81.1%
Simplified83.6%
Taylor expanded in x around 0 65.3%
Taylor expanded in a around 0 58.0%
Final simplification53.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 (* 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 84.4%
Simplified87.1%
pow187.1%
associate-*l*87.1%
associate-*r*87.1%
Applied egg-rr87.1%
unpow187.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in b around inf 25.4%
Final simplification25.4%
(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 2024079
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))