
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (* z (* y (* x 18.0)))) (* t (* a 4.0))))
(* i (* x 4.0)))))
(if (<= t_1 (- INFINITY))
(-
(+ (+ (* y (* x (* 18.0 (* t z)))) (* a (* t -4.0))) (* b c))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(if (<= t_1 1e+298)
(- t_1 (* k (* j 27.0)))
(if (<= t_1 INFINITY)
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 4.0 (* x i)))
(* x (- (* 18.0 (* t (* y z))) (* i 4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = ((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (((y * (x * (18.0 * (t * z)))) + (a * (t * -4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else if (t_1 <= 1e+298) {
tmp = t_1 - (k * (j * 27.0));
} else if (t_1 <= ((double) INFINITY)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (((y * (x * (18.0 * (t * z)))) + (a * (t * -4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else if (t_1 <= 1e+298) {
tmp = t_1 - (k * (j * 27.0));
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0)) tmp = 0 if t_1 <= -math.inf: tmp = (((y * (x * (18.0 * (t * z)))) + (a * (t * -4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0))) elif t_1 <= 1e+298: tmp = t_1 - (k * (j * 27.0)) elif t_1 <= math.inf: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) else: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(Float64(Float64(y * Float64(x * Float64(18.0 * Float64(t * z)))) + Float64(a * Float64(t * -4.0))) + Float64(b * c)) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); elseif (t_1 <= 1e+298) tmp = Float64(t_1 - Float64(k * Float64(j * 27.0))); elseif (t_1 <= Inf) 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(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0));
tmp = 0.0;
if (t_1 <= -Inf)
tmp = (((y * (x * (18.0 * (t * z)))) + (a * (t * -4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
elseif (t_1 <= 1e+298)
tmp = t_1 - (k * (j * 27.0));
elseif (t_1 <= Inf)
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
else
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(N[(y * N[(x * N[(18.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+298], N[(t$95$1 - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], 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[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - i \cdot \left(x \cdot 4\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\left(\left(y \cdot \left(x \cdot \left(18 \cdot \left(t \cdot z\right)\right)\right) + a \cdot \left(t \cdot -4\right)\right) + b \cdot c\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+298}:\\
\;\;\;\;t\_1 - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\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}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if (-.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)) < -inf.0Initial program 76.5%
Simplified89.2%
associate-*r*76.5%
distribute-rgt-out--76.5%
sub-neg76.5%
associate-*l*78.0%
*-commutative78.0%
*-commutative78.0%
Applied egg-rr78.0%
sub-neg78.0%
associate-*r*78.0%
*-commutative78.0%
associate-*l*90.7%
*-commutative90.7%
fma-neg90.7%
*-commutative90.7%
*-commutative90.7%
associate-*l*88.8%
*-commutative88.8%
distribute-rgt-neg-in88.8%
distribute-lft-neg-in88.8%
metadata-eval88.8%
Simplified88.8%
fma-undefine88.8%
associate-*l*88.8%
*-commutative88.8%
Applied egg-rr88.8%
if -inf.0 < (-.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)) < 9.9999999999999996e297Initial program 99.8%
if 9.9999999999999996e297 < (-.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)) < +inf.0Initial program 81.1%
Simplified81.1%
Taylor expanded in j around 0 89.2%
if +inf.0 < (-.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)) Initial program 0.0%
Simplified21.1%
Taylor expanded in x around inf 79.0%
Final simplification93.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 -2.5e+59) (not (<= t 2e-103)))
(+
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
(* j (* k -27.0)))
(-
(+ (+ (* y (* x (* 18.0 (* t z)))) (* a (* t -4.0))) (* b c))
(+ (* x (* i 4.0)) (* j (* k 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -2.5e+59) || !(t <= 2e-103)) {
tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
} else {
tmp = (((y * (x * (18.0 * (t * z)))) + (a * (t * -4.0))) + (b * c)) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -2.5e+59) || !(t <= 2e-103)) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(Float64(Float64(y * Float64(x * Float64(18.0 * Float64(t * z)))) + Float64(a * Float64(t * -4.0))) + Float64(b * c)) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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, -2.5e+59], N[Not[LessEqual[t, 2e-103]], $MachinePrecision]], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y * N[(x * N[(18.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+59} \lor \neg \left(t \leq 2 \cdot 10^{-103}\right):\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(y \cdot \left(x \cdot \left(18 \cdot \left(t \cdot z\right)\right)\right) + a \cdot \left(t \cdot -4\right)\right) + b \cdot c\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\end{array}
\end{array}
if t < -2.4999999999999999e59 or 1.99999999999999992e-103 < t Initial program 81.2%
Simplified88.2%
if -2.4999999999999999e59 < t < 1.99999999999999992e-103Initial program 85.2%
Simplified86.1%
associate-*r*85.2%
distribute-rgt-out--85.2%
sub-neg85.2%
associate-*l*90.1%
*-commutative90.1%
*-commutative90.1%
Applied egg-rr90.1%
sub-neg90.1%
associate-*r*90.1%
*-commutative90.1%
associate-*l*95.5%
*-commutative95.5%
fma-neg95.5%
*-commutative95.5%
*-commutative95.5%
associate-*l*95.5%
*-commutative95.5%
distribute-rgt-neg-in95.5%
distribute-lft-neg-in95.5%
metadata-eval95.5%
Simplified95.5%
fma-undefine95.5%
associate-*l*95.4%
*-commutative95.4%
Applied egg-rr95.4%
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.
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)) (* i (* x -4.0))))
(t_2 (- (* b c) (* 27.0 (* j k))))
(t_3 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -1.7e+165)
t_3
(if (<= t -1.65e+43)
(* b (+ c (* -27.0 (/ (* j k) b))))
(if (<= t -2.35e+17)
t_3
(if (<= t -1.12e-8)
t_2
(if (<= t -8e-22)
t_3
(if (<= t -4.5e-74)
t_1
(if (<= t 3.8e-282)
t_2
(if (<= t 1.6e+52)
t_1
(if (<= t 2.7e+82)
(- (* b c) (* 4.0 (* t a)))
(if (<= t 7.9e+87) t_1 t_3))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (j * (k * -27.0)) + (i * (x * -4.0));
double t_2 = (b * c) - (27.0 * (j * k));
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.7e+165) {
tmp = t_3;
} else if (t <= -1.65e+43) {
tmp = b * (c + (-27.0 * ((j * k) / b)));
} else if (t <= -2.35e+17) {
tmp = t_3;
} else if (t <= -1.12e-8) {
tmp = t_2;
} else if (t <= -8e-22) {
tmp = t_3;
} else if (t <= -4.5e-74) {
tmp = t_1;
} else if (t <= 3.8e-282) {
tmp = t_2;
} else if (t <= 1.6e+52) {
tmp = t_1;
} else if (t <= 2.7e+82) {
tmp = (b * c) - (4.0 * (t * a));
} else if (t <= 7.9e+87) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + (i * (x * (-4.0d0)))
t_2 = (b * c) - (27.0d0 * (j * k))
t_3 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-1.7d+165)) then
tmp = t_3
else if (t <= (-1.65d+43)) then
tmp = b * (c + ((-27.0d0) * ((j * k) / b)))
else if (t <= (-2.35d+17)) then
tmp = t_3
else if (t <= (-1.12d-8)) then
tmp = t_2
else if (t <= (-8d-22)) then
tmp = t_3
else if (t <= (-4.5d-74)) then
tmp = t_1
else if (t <= 3.8d-282) then
tmp = t_2
else if (t <= 1.6d+52) then
tmp = t_1
else if (t <= 2.7d+82) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (t <= 7.9d+87) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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)) + (i * (x * -4.0));
double t_2 = (b * c) - (27.0 * (j * k));
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.7e+165) {
tmp = t_3;
} else if (t <= -1.65e+43) {
tmp = b * (c + (-27.0 * ((j * k) / b)));
} else if (t <= -2.35e+17) {
tmp = t_3;
} else if (t <= -1.12e-8) {
tmp = t_2;
} else if (t <= -8e-22) {
tmp = t_3;
} else if (t <= -4.5e-74) {
tmp = t_1;
} else if (t <= 3.8e-282) {
tmp = t_2;
} else if (t <= 1.6e+52) {
tmp = t_1;
} else if (t <= 2.7e+82) {
tmp = (b * c) - (4.0 * (t * a));
} else if (t <= 7.9e+87) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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)) + (i * (x * -4.0)) t_2 = (b * c) - (27.0 * (j * k)) t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -1.7e+165: tmp = t_3 elif t <= -1.65e+43: tmp = b * (c + (-27.0 * ((j * k) / b))) elif t <= -2.35e+17: tmp = t_3 elif t <= -1.12e-8: tmp = t_2 elif t <= -8e-22: tmp = t_3 elif t <= -4.5e-74: tmp = t_1 elif t <= 3.8e-282: tmp = t_2 elif t <= 1.6e+52: tmp = t_1 elif t <= 2.7e+82: tmp = (b * c) - (4.0 * (t * a)) elif t <= 7.9e+87: tmp = t_1 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(i * Float64(x * -4.0))) t_2 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.7e+165) tmp = t_3; elseif (t <= -1.65e+43) tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(Float64(j * k) / b)))); elseif (t <= -2.35e+17) tmp = t_3; elseif (t <= -1.12e-8) tmp = t_2; elseif (t <= -8e-22) tmp = t_3; elseif (t <= -4.5e-74) tmp = t_1; elseif (t <= 3.8e-282) tmp = t_2; elseif (t <= 1.6e+52) tmp = t_1; elseif (t <= 2.7e+82) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (t <= 7.9e+87) tmp = t_1; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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)) + (i * (x * -4.0));
t_2 = (b * c) - (27.0 * (j * k));
t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.7e+165)
tmp = t_3;
elseif (t <= -1.65e+43)
tmp = b * (c + (-27.0 * ((j * k) / b)));
elseif (t <= -2.35e+17)
tmp = t_3;
elseif (t <= -1.12e-8)
tmp = t_2;
elseif (t <= -8e-22)
tmp = t_3;
elseif (t <= -4.5e-74)
tmp = t_1;
elseif (t <= 3.8e-282)
tmp = t_2;
elseif (t <= 1.6e+52)
tmp = t_1;
elseif (t <= 2.7e+82)
tmp = (b * c) - (4.0 * (t * a));
elseif (t <= 7.9e+87)
tmp = t_1;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+165], t$95$3, If[LessEqual[t, -1.65e+43], N[(b * N[(c + N[(-27.0 * N[(N[(j * k), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.35e+17], t$95$3, If[LessEqual[t, -1.12e-8], t$95$2, If[LessEqual[t, -8e-22], t$95$3, If[LessEqual[t, -4.5e-74], t$95$1, If[LessEqual[t, 3.8e-282], t$95$2, If[LessEqual[t, 1.6e+52], t$95$1, If[LessEqual[t, 2.7e+82], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.9e+87], t$95$1, t$95$3]]]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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) + i \cdot \left(x \cdot -4\right)\\
t_2 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+165}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{+43}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \frac{j \cdot k}{b}\right)\\
\mathbf{elif}\;t \leq -2.35 \cdot 10^{+17}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-8}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-22}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-282}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+82}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq 7.9 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -1.70000000000000005e165 or -1.6500000000000001e43 < t < -2.35e17 or -1.11999999999999994e-8 < t < -8.0000000000000004e-22 or 7.8999999999999996e87 < t Initial program 86.4%
Simplified90.8%
Taylor expanded in t around inf 80.9%
if -1.70000000000000005e165 < t < -1.6500000000000001e43Initial program 75.7%
Simplified86.1%
Taylor expanded in b around inf 53.1%
Taylor expanded in b around inf 59.8%
if -2.35e17 < t < -1.11999999999999994e-8 or -4.4999999999999999e-74 < t < 3.79999999999999992e-282Initial program 92.0%
Taylor expanded in x around 0 82.5%
Taylor expanded in a around 0 78.6%
if -8.0000000000000004e-22 < t < -4.4999999999999999e-74 or 3.79999999999999992e-282 < t < 1.6e52 or 2.6999999999999999e82 < t < 7.8999999999999996e87Initial program 78.1%
Simplified81.6%
Taylor expanded in i around inf 66.2%
metadata-eval66.2%
distribute-lft-neg-in66.2%
*-commutative66.2%
associate-*r*66.2%
distribute-rgt-neg-in66.2%
distribute-rgt-neg-in66.2%
metadata-eval66.2%
*-commutative66.2%
Simplified66.2%
if 1.6e52 < t < 2.6999999999999999e82Initial program 60.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in j around 0 100.0%
Final simplification73.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j -27.0))))
(if (<= (* b c) -1.05e+119)
(* b c)
(if (<= (* b c) -1.08e-252)
t_1
(if (<= (* b c) 0.0)
(* t (* a -4.0))
(if (<= (* b c) 2.85e-120)
t_1
(if (<= (* b c) 4.1e-13)
(* -4.0 (* x i))
(if (<= (* b c) 3.8e+219)
(* -27.0 (* j k))
(if (<= (* b c) 8.5e+278)
(* 18.0 (* t (* x (* y z))))
(* b c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -1.05e+119) {
tmp = b * c;
} else if ((b * c) <= -1.08e-252) {
tmp = t_1;
} else if ((b * c) <= 0.0) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 2.85e-120) {
tmp = t_1;
} else if ((b * c) <= 4.1e-13) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 3.8e+219) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 8.5e+278) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
if ((b * c) <= (-1.05d+119)) then
tmp = b * c
else if ((b * c) <= (-1.08d-252)) then
tmp = t_1
else if ((b * c) <= 0.0d0) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 2.85d-120) then
tmp = t_1
else if ((b * c) <= 4.1d-13) then
tmp = (-4.0d0) * (x * i)
else if ((b * c) <= 3.8d+219) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 8.5d+278) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -1.05e+119) {
tmp = b * c;
} else if ((b * c) <= -1.08e-252) {
tmp = t_1;
} else if ((b * c) <= 0.0) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 2.85e-120) {
tmp = t_1;
} else if ((b * c) <= 4.1e-13) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 3.8e+219) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 8.5e+278) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if (b * c) <= -1.05e+119: tmp = b * c elif (b * c) <= -1.08e-252: tmp = t_1 elif (b * c) <= 0.0: tmp = t * (a * -4.0) elif (b * c) <= 2.85e-120: tmp = t_1 elif (b * c) <= 4.1e-13: tmp = -4.0 * (x * i) elif (b * c) <= 3.8e+219: tmp = -27.0 * (j * k) elif (b * c) <= 8.5e+278: tmp = 18.0 * (t * (x * (y * z))) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (Float64(b * c) <= -1.05e+119) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.08e-252) tmp = t_1; elseif (Float64(b * c) <= 0.0) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 2.85e-120) tmp = t_1; elseif (Float64(b * c) <= 4.1e-13) tmp = Float64(-4.0 * Float64(x * i)); elseif (Float64(b * c) <= 3.8e+219) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 8.5e+278) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if ((b * c) <= -1.05e+119)
tmp = b * c;
elseif ((b * c) <= -1.08e-252)
tmp = t_1;
elseif ((b * c) <= 0.0)
tmp = t * (a * -4.0);
elseif ((b * c) <= 2.85e-120)
tmp = t_1;
elseif ((b * c) <= 4.1e-13)
tmp = -4.0 * (x * i);
elseif ((b * c) <= 3.8e+219)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 8.5e+278)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.05e+119], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.08e-252], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 0.0], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.85e-120], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 4.1e-13], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.8e+219], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.5e+278], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -1.05 \cdot 10^{+119}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.08 \cdot 10^{-252}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 2.85 \cdot 10^{-120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 4.1 \cdot 10^{-13}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 3.8 \cdot 10^{+219}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 8.5 \cdot 10^{+278}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.04999999999999991e119 or 8.49999999999999993e278 < (*.f64 b c) Initial program 77.0%
Simplified77.1%
pow177.1%
associate-*l*77.1%
associate-*r*77.1%
Applied egg-rr77.1%
unpow177.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in b around inf 65.0%
if -1.04999999999999991e119 < (*.f64 b c) < -1.08e-252 or -0.0 < (*.f64 b c) < 2.85000000000000015e-120Initial program 83.2%
Simplified86.3%
Taylor expanded in j around inf 37.8%
associate-*r*37.8%
*-commutative37.8%
metadata-eval37.8%
distribute-rgt-neg-in37.8%
*-commutative37.8%
distribute-rgt-neg-in37.8%
metadata-eval37.8%
*-commutative37.8%
Simplified37.8%
if -1.08e-252 < (*.f64 b c) < -0.0Initial program 88.6%
Simplified96.8%
pow196.8%
associate-*l*96.9%
associate-*r*96.9%
Applied egg-rr96.9%
unpow196.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in a around inf 36.8%
metadata-eval36.8%
distribute-lft-neg-in36.8%
associate-*r*36.8%
*-commutative36.8%
distribute-rgt-neg-in36.8%
distribute-lft-neg-in36.8%
metadata-eval36.8%
*-commutative36.8%
Simplified36.8%
if 2.85000000000000015e-120 < (*.f64 b c) < 4.1000000000000002e-13Initial program 75.6%
Simplified81.7%
pow181.7%
associate-*l*81.7%
associate-*r*81.7%
Applied egg-rr81.7%
unpow181.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in i around inf 45.8%
*-commutative45.8%
*-commutative45.8%
Simplified45.8%
if 4.1000000000000002e-13 < (*.f64 b c) < 3.79999999999999996e219Initial program 87.0%
Simplified90.0%
Taylor expanded in j around inf 35.8%
if 3.79999999999999996e219 < (*.f64 b c) < 8.49999999999999993e278Initial program 92.3%
Simplified92.3%
pow192.3%
associate-*l*92.3%
associate-*r*92.3%
Applied egg-rr92.3%
unpow192.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in z around inf 59.7%
Final simplification45.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j -27.0))))
(if (<= (* b c) -1e+121)
(* b c)
(if (<= (* b c) -2e-244)
t_1
(if (<= (* b c) 0.0)
(* t (* a -4.0))
(if (<= (* b c) 5e-121)
t_1
(if (<= (* b c) 5e-13)
(* -4.0 (* x i))
(if (<= (* b c) 2e+217)
(* b (* -27.0 (/ (* j k) b)))
(if (<= (* b c) 1e+279)
(* 18.0 (* t (* x (* y z))))
(* b c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -1e+121) {
tmp = b * c;
} else if ((b * c) <= -2e-244) {
tmp = t_1;
} else if ((b * c) <= 0.0) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 5e-121) {
tmp = t_1;
} else if ((b * c) <= 5e-13) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 2e+217) {
tmp = b * (-27.0 * ((j * k) / b));
} else if ((b * c) <= 1e+279) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
if ((b * c) <= (-1d+121)) then
tmp = b * c
else if ((b * c) <= (-2d-244)) then
tmp = t_1
else if ((b * c) <= 0.0d0) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 5d-121) then
tmp = t_1
else if ((b * c) <= 5d-13) then
tmp = (-4.0d0) * (x * i)
else if ((b * c) <= 2d+217) then
tmp = b * ((-27.0d0) * ((j * k) / b))
else if ((b * c) <= 1d+279) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -1e+121) {
tmp = b * c;
} else if ((b * c) <= -2e-244) {
tmp = t_1;
} else if ((b * c) <= 0.0) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 5e-121) {
tmp = t_1;
} else if ((b * c) <= 5e-13) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 2e+217) {
tmp = b * (-27.0 * ((j * k) / b));
} else if ((b * c) <= 1e+279) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if (b * c) <= -1e+121: tmp = b * c elif (b * c) <= -2e-244: tmp = t_1 elif (b * c) <= 0.0: tmp = t * (a * -4.0) elif (b * c) <= 5e-121: tmp = t_1 elif (b * c) <= 5e-13: tmp = -4.0 * (x * i) elif (b * c) <= 2e+217: tmp = b * (-27.0 * ((j * k) / b)) elif (b * c) <= 1e+279: tmp = 18.0 * (t * (x * (y * z))) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (Float64(b * c) <= -1e+121) tmp = Float64(b * c); elseif (Float64(b * c) <= -2e-244) tmp = t_1; elseif (Float64(b * c) <= 0.0) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 5e-121) tmp = t_1; elseif (Float64(b * c) <= 5e-13) tmp = Float64(-4.0 * Float64(x * i)); elseif (Float64(b * c) <= 2e+217) tmp = Float64(b * Float64(-27.0 * Float64(Float64(j * k) / b))); elseif (Float64(b * c) <= 1e+279) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if ((b * c) <= -1e+121)
tmp = b * c;
elseif ((b * c) <= -2e-244)
tmp = t_1;
elseif ((b * c) <= 0.0)
tmp = t * (a * -4.0);
elseif ((b * c) <= 5e-121)
tmp = t_1;
elseif ((b * c) <= 5e-13)
tmp = -4.0 * (x * i);
elseif ((b * c) <= 2e+217)
tmp = b * (-27.0 * ((j * k) / b));
elseif ((b * c) <= 1e+279)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e+121], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-244], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 0.0], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e-121], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5e-13], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+217], N[(b * N[(-27.0 * N[(N[(j * k), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+279], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+121}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-13}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+217}:\\
\;\;\;\;b \cdot \left(-27 \cdot \frac{j \cdot k}{b}\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{+279}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.00000000000000004e121 or 1.00000000000000006e279 < (*.f64 b c) Initial program 77.0%
Simplified77.1%
pow177.1%
associate-*l*77.1%
associate-*r*77.1%
Applied egg-rr77.1%
unpow177.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in b around inf 65.0%
if -1.00000000000000004e121 < (*.f64 b c) < -1.9999999999999999e-244 or -0.0 < (*.f64 b c) < 4.99999999999999989e-121Initial program 83.2%
Simplified86.3%
Taylor expanded in j around inf 37.8%
associate-*r*37.8%
*-commutative37.8%
metadata-eval37.8%
distribute-rgt-neg-in37.8%
*-commutative37.8%
distribute-rgt-neg-in37.8%
metadata-eval37.8%
*-commutative37.8%
Simplified37.8%
if -1.9999999999999999e-244 < (*.f64 b c) < -0.0Initial program 88.6%
Simplified96.8%
pow196.8%
associate-*l*96.9%
associate-*r*96.9%
Applied egg-rr96.9%
unpow196.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in a around inf 36.8%
metadata-eval36.8%
distribute-lft-neg-in36.8%
associate-*r*36.8%
*-commutative36.8%
distribute-rgt-neg-in36.8%
distribute-lft-neg-in36.8%
metadata-eval36.8%
*-commutative36.8%
Simplified36.8%
if 4.99999999999999989e-121 < (*.f64 b c) < 4.9999999999999999e-13Initial program 75.6%
Simplified81.7%
pow181.7%
associate-*l*81.7%
associate-*r*81.7%
Applied egg-rr81.7%
unpow181.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in i around inf 45.8%
*-commutative45.8%
*-commutative45.8%
Simplified45.8%
if 4.9999999999999999e-13 < (*.f64 b c) < 1.99999999999999992e217Initial program 87.0%
Simplified90.0%
Taylor expanded in b around inf 54.0%
Taylor expanded in b around inf 53.8%
Taylor expanded in c around 0 35.7%
if 1.99999999999999992e217 < (*.f64 b c) < 1.00000000000000006e279Initial program 92.3%
Simplified92.3%
pow192.3%
associate-*l*92.3%
associate-*r*92.3%
Applied egg-rr92.3%
unpow192.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in z around inf 59.7%
Final simplification45.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (* i (- (/ (* b c) i) (+ (* x 4.0) (* 27.0 (/ (* j k) i))))))
(t_2 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(t_3 (* k (* j 27.0))))
(if (<= t_3 -1.5e+137)
t_1
(if (<= t_3 0.0001)
(- t_2 (* 4.0 (* x i)))
(if (<= t_3 2e+64)
t_1
(if (<= t_3 1e+154) t_2 (- (- (* b c) (* 4.0 (* t a))) t_3)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = i * (((b * c) / i) - ((x * 4.0) + (27.0 * ((j * k) / i))));
double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double t_3 = k * (j * 27.0);
double tmp;
if (t_3 <= -1.5e+137) {
tmp = t_1;
} else if (t_3 <= 0.0001) {
tmp = t_2 - (4.0 * (x * i));
} else if (t_3 <= 2e+64) {
tmp = t_1;
} else if (t_3 <= 1e+154) {
tmp = t_2;
} else {
tmp = ((b * c) - (4.0 * (t * a))) - t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = i * (((b * c) / i) - ((x * 4.0d0) + (27.0d0 * ((j * k) / i))))
t_2 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
t_3 = k * (j * 27.0d0)
if (t_3 <= (-1.5d+137)) then
tmp = t_1
else if (t_3 <= 0.0001d0) then
tmp = t_2 - (4.0d0 * (x * i))
else if (t_3 <= 2d+64) then
tmp = t_1
else if (t_3 <= 1d+154) then
tmp = t_2
else
tmp = ((b * c) - (4.0d0 * (t * a))) - t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = i * (((b * c) / i) - ((x * 4.0) + (27.0 * ((j * k) / i))));
double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double t_3 = k * (j * 27.0);
double tmp;
if (t_3 <= -1.5e+137) {
tmp = t_1;
} else if (t_3 <= 0.0001) {
tmp = t_2 - (4.0 * (x * i));
} else if (t_3 <= 2e+64) {
tmp = t_1;
} else if (t_3 <= 1e+154) {
tmp = t_2;
} else {
tmp = ((b * c) - (4.0 * (t * a))) - t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = i * (((b * c) / i) - ((x * 4.0) + (27.0 * ((j * k) / i)))) t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) t_3 = k * (j * 27.0) tmp = 0 if t_3 <= -1.5e+137: tmp = t_1 elif t_3 <= 0.0001: tmp = t_2 - (4.0 * (x * i)) elif t_3 <= 2e+64: tmp = t_1 elif t_3 <= 1e+154: tmp = t_2 else: tmp = ((b * c) - (4.0 * (t * a))) - t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(i * Float64(Float64(Float64(b * c) / i) - Float64(Float64(x * 4.0) + Float64(27.0 * Float64(Float64(j * k) / i))))) t_2 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) t_3 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_3 <= -1.5e+137) tmp = t_1; elseif (t_3 <= 0.0001) tmp = Float64(t_2 - Float64(4.0 * Float64(x * i))); elseif (t_3 <= 2e+64) tmp = t_1; elseif (t_3 <= 1e+154) tmp = t_2; else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_3); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = i * (((b * c) / i) - ((x * 4.0) + (27.0 * ((j * k) / i))));
t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
t_3 = k * (j * 27.0);
tmp = 0.0;
if (t_3 <= -1.5e+137)
tmp = t_1;
elseif (t_3 <= 0.0001)
tmp = t_2 - (4.0 * (x * i));
elseif (t_3 <= 2e+64)
tmp = t_1;
elseif (t_3 <= 1e+154)
tmp = t_2;
else
tmp = ((b * c) - (4.0 * (t * a))) - t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(i * N[(N[(N[(b * c), $MachinePrecision] / i), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] + N[(27.0 * N[(N[(j * k), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1.5e+137], t$95$1, If[LessEqual[t$95$3, 0.0001], N[(t$95$2 - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+64], t$95$1, If[LessEqual[t$95$3, 1e+154], t$95$2, N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $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])\\\\
[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 := i \cdot \left(\frac{b \cdot c}{i} - \left(x \cdot 4 + 27 \cdot \frac{j \cdot k}{i}\right)\right)\\
t_2 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_3 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_3 \leq -1.5 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq 0.0001:\\
\;\;\;\;t\_2 - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq 10^{+154}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_3\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.5e137 or 1.00000000000000005e-4 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000004e64Initial program 79.2%
Simplified81.3%
Taylor expanded in i around inf 83.1%
Taylor expanded in t around 0 86.8%
if -1.5e137 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000005e-4Initial program 86.5%
Simplified90.5%
Taylor expanded in j around 0 86.0%
if 2.00000000000000004e64 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e154Initial program 74.7%
Simplified87.5%
pow187.5%
associate-*l*87.5%
associate-*r*87.5%
Applied egg-rr87.5%
unpow187.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in i around 0 87.5%
Taylor expanded in j around 0 77.8%
if 1.00000000000000004e154 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 78.5%
Taylor expanded in x around 0 74.0%
Final simplification83.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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)))))
(t_2 (* k (* j 27.0))))
(if (<= t_2 -1.5e+137)
(* i (- (/ (* b c) i) (+ (* x 4.0) (* 27.0 (/ (* j k) i)))))
(if (<= t_2 5e+47)
(- t_1 (* 4.0 (* x i)))
(if (<= t_2 5e+304)
(- t_1 (* 27.0 (* j k)))
(* b (- c (+ (* 4.0 (/ (* t a) b)) (* 27.0 (/ (* j k) b))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -1.5e+137) {
tmp = i * (((b * c) / i) - ((x * 4.0) + (27.0 * ((j * k) / i))));
} else if (t_2 <= 5e+47) {
tmp = t_1 - (4.0 * (x * i));
} else if (t_2 <= 5e+304) {
tmp = t_1 - (27.0 * (j * k));
} else {
tmp = b * (c - ((4.0 * ((t * a) / b)) + (27.0 * ((j * k) / b))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
t_2 = k * (j * 27.0d0)
if (t_2 <= (-1.5d+137)) then
tmp = i * (((b * c) / i) - ((x * 4.0d0) + (27.0d0 * ((j * k) / i))))
else if (t_2 <= 5d+47) then
tmp = t_1 - (4.0d0 * (x * i))
else if (t_2 <= 5d+304) then
tmp = t_1 - (27.0d0 * (j * k))
else
tmp = b * (c - ((4.0d0 * ((t * a) / b)) + (27.0d0 * ((j * k) / b))))
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;
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 t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -1.5e+137) {
tmp = i * (((b * c) / i) - ((x * 4.0) + (27.0 * ((j * k) / i))));
} else if (t_2 <= 5e+47) {
tmp = t_1 - (4.0 * (x * i));
} else if (t_2 <= 5e+304) {
tmp = t_1 - (27.0 * (j * k));
} else {
tmp = b * (c - ((4.0 * ((t * a) / b)) + (27.0 * ((j * k) / b))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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))) t_2 = k * (j * 27.0) tmp = 0 if t_2 <= -1.5e+137: tmp = i * (((b * c) / i) - ((x * 4.0) + (27.0 * ((j * k) / i)))) elif t_2 <= 5e+47: tmp = t_1 - (4.0 * (x * i)) elif t_2 <= 5e+304: tmp = t_1 - (27.0 * (j * k)) else: tmp = b * (c - ((4.0 * ((t * a) / b)) + (27.0 * ((j * k) / b)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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)))) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -1.5e+137) tmp = Float64(i * Float64(Float64(Float64(b * c) / i) - Float64(Float64(x * 4.0) + Float64(27.0 * Float64(Float64(j * k) / i))))); elseif (t_2 <= 5e+47) tmp = Float64(t_1 - Float64(4.0 * Float64(x * i))); elseif (t_2 <= 5e+304) tmp = Float64(t_1 - Float64(27.0 * Float64(j * k))); else tmp = Float64(b * Float64(c - Float64(Float64(4.0 * Float64(Float64(t * a) / b)) + Float64(27.0 * Float64(Float64(j * k) / b))))); 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])){:}
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)));
t_2 = k * (j * 27.0);
tmp = 0.0;
if (t_2 <= -1.5e+137)
tmp = i * (((b * c) / i) - ((x * 4.0) + (27.0 * ((j * k) / i))));
elseif (t_2 <= 5e+47)
tmp = t_1 - (4.0 * (x * i));
elseif (t_2 <= 5e+304)
tmp = t_1 - (27.0 * (j * k));
else
tmp = b * (c - ((4.0 * ((t * a) / b)) + (27.0 * ((j * k) / b))));
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.
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]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1.5e+137], N[(i * N[(N[(N[(b * c), $MachinePrecision] / i), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] + N[(27.0 * N[(N[(j * k), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+47], N[(t$95$1 - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+304], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(c - N[(N[(4.0 * N[(N[(t * a), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(j * k), $MachinePrecision] / b), $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])\\\\
[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)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -1.5 \cdot 10^{+137}:\\
\;\;\;\;i \cdot \left(\frac{b \cdot c}{i} - \left(x \cdot 4 + 27 \cdot \frac{j \cdot k}{i}\right)\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+47}:\\
\;\;\;\;t\_1 - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t\_1 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(c - \left(4 \cdot \frac{t \cdot a}{b} + 27 \cdot \frac{j \cdot k}{b}\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.5e137Initial program 77.2%
Simplified81.8%
Taylor expanded in i around inf 84.0%
Taylor expanded in t around 0 86.4%
if -1.5e137 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5.00000000000000022e47Initial program 86.4%
Simplified89.6%
Taylor expanded in j around 0 84.1%
if 5.00000000000000022e47 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999997e304Initial program 91.1%
Simplified93.3%
pow193.3%
associate-*l*93.3%
associate-*r*93.3%
Applied egg-rr93.3%
unpow193.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in i around 0 93.3%
if 4.9999999999999997e304 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 47.1%
Taylor expanded in x around 0 52.9%
Taylor expanded in b around -inf 70.6%
Final simplification85.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j -27.0))))
(if (<= (* b c) -2.4e+116)
(* b c)
(if (<= (* b c) -2.05e-252)
t_1
(if (<= (* b c) 0.0)
(* t (* a -4.0))
(if (<= (* b c) 4.2e-121)
t_1
(if (<= (* b c) 2.25e-11)
(* -4.0 (* x i))
(if (<= (* b c) 3e+232) (* -27.0 (* j k)) (* b c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -2.4e+116) {
tmp = b * c;
} else if ((b * c) <= -2.05e-252) {
tmp = t_1;
} else if ((b * c) <= 0.0) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 4.2e-121) {
tmp = t_1;
} else if ((b * c) <= 2.25e-11) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 3e+232) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
if ((b * c) <= (-2.4d+116)) then
tmp = b * c
else if ((b * c) <= (-2.05d-252)) then
tmp = t_1
else if ((b * c) <= 0.0d0) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 4.2d-121) then
tmp = t_1
else if ((b * c) <= 2.25d-11) then
tmp = (-4.0d0) * (x * i)
else if ((b * c) <= 3d+232) then
tmp = (-27.0d0) * (j * k)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -2.4e+116) {
tmp = b * c;
} else if ((b * c) <= -2.05e-252) {
tmp = t_1;
} else if ((b * c) <= 0.0) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 4.2e-121) {
tmp = t_1;
} else if ((b * c) <= 2.25e-11) {
tmp = -4.0 * (x * i);
} else if ((b * c) <= 3e+232) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if (b * c) <= -2.4e+116: tmp = b * c elif (b * c) <= -2.05e-252: tmp = t_1 elif (b * c) <= 0.0: tmp = t * (a * -4.0) elif (b * c) <= 4.2e-121: tmp = t_1 elif (b * c) <= 2.25e-11: tmp = -4.0 * (x * i) elif (b * c) <= 3e+232: tmp = -27.0 * (j * k) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (Float64(b * c) <= -2.4e+116) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.05e-252) tmp = t_1; elseif (Float64(b * c) <= 0.0) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 4.2e-121) tmp = t_1; elseif (Float64(b * c) <= 2.25e-11) tmp = Float64(-4.0 * Float64(x * i)); elseif (Float64(b * c) <= 3e+232) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if ((b * c) <= -2.4e+116)
tmp = b * c;
elseif ((b * c) <= -2.05e-252)
tmp = t_1;
elseif ((b * c) <= 0.0)
tmp = t * (a * -4.0);
elseif ((b * c) <= 4.2e-121)
tmp = t_1;
elseif ((b * c) <= 2.25e-11)
tmp = -4.0 * (x * i);
elseif ((b * c) <= 3e+232)
tmp = -27.0 * (j * k);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.4e+116], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.05e-252], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 0.0], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.2e-121], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2.25e-11], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3e+232], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -2.4 \cdot 10^{+116}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.05 \cdot 10^{-252}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 4.2 \cdot 10^{-121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 2.25 \cdot 10^{-11}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{+232}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.4e116 or 3.00000000000000003e232 < (*.f64 b c) Initial program 79.3%
Simplified79.3%
pow179.3%
associate-*l*79.3%
associate-*r*79.3%
Applied egg-rr79.3%
unpow179.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in b around inf 58.8%
if -2.4e116 < (*.f64 b c) < -2.05000000000000007e-252 or -0.0 < (*.f64 b c) < 4.1999999999999997e-121Initial program 83.2%
Simplified86.3%
Taylor expanded in j around inf 37.8%
associate-*r*37.8%
*-commutative37.8%
metadata-eval37.8%
distribute-rgt-neg-in37.8%
*-commutative37.8%
distribute-rgt-neg-in37.8%
metadata-eval37.8%
*-commutative37.8%
Simplified37.8%
if -2.05000000000000007e-252 < (*.f64 b c) < -0.0Initial program 88.6%
Simplified96.8%
pow196.8%
associate-*l*96.9%
associate-*r*96.9%
Applied egg-rr96.9%
unpow196.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in a around inf 36.8%
metadata-eval36.8%
distribute-lft-neg-in36.8%
associate-*r*36.8%
*-commutative36.8%
distribute-rgt-neg-in36.8%
distribute-lft-neg-in36.8%
metadata-eval36.8%
*-commutative36.8%
Simplified36.8%
if 4.1999999999999997e-121 < (*.f64 b c) < 2.25e-11Initial program 75.6%
Simplified81.7%
pow181.7%
associate-*l*81.7%
associate-*r*81.7%
Applied egg-rr81.7%
unpow181.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in i around inf 45.8%
*-commutative45.8%
*-commutative45.8%
Simplified45.8%
if 2.25e-11 < (*.f64 b c) < 3.00000000000000003e232Initial program 87.4%
Simplified90.3%
Taylor expanded in j around inf 34.9%
Final simplification43.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* i 4.0)))))
(if (<= x -1.2e+33)
t_2
(if (<= x -2.4e-82)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 2.8e-193)
(+ t_1 (* a (* t -4.0)))
(if (<= x 3.7e-26)
(+ t_1 (* b c))
(if (or (<= x 8.5e+24) (not (<= x 5.5e+111)))
t_2
(* b (+ c (* -27.0 (/ (* j k) b)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = j * (k * -27.0);
double t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -1.2e+33) {
tmp = t_2;
} else if (x <= -2.4e-82) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 2.8e-193) {
tmp = t_1 + (a * (t * -4.0));
} else if (x <= 3.7e-26) {
tmp = t_1 + (b * c);
} else if ((x <= 8.5e+24) || !(x <= 5.5e+111)) {
tmp = t_2;
} else {
tmp = b * (c + (-27.0 * ((j * k) / b)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
if (x <= (-1.2d+33)) then
tmp = t_2
else if (x <= (-2.4d-82)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 2.8d-193) then
tmp = t_1 + (a * (t * (-4.0d0)))
else if (x <= 3.7d-26) then
tmp = t_1 + (b * c)
else if ((x <= 8.5d+24) .or. (.not. (x <= 5.5d+111))) then
tmp = t_2
else
tmp = b * (c + ((-27.0d0) * ((j * k) / b)))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -1.2e+33) {
tmp = t_2;
} else if (x <= -2.4e-82) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 2.8e-193) {
tmp = t_1 + (a * (t * -4.0));
} else if (x <= 3.7e-26) {
tmp = t_1 + (b * c);
} else if ((x <= 8.5e+24) || !(x <= 5.5e+111)) {
tmp = t_2;
} else {
tmp = b * (c + (-27.0 * ((j * k) / b)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0)) tmp = 0 if x <= -1.2e+33: tmp = t_2 elif x <= -2.4e-82: tmp = (b * c) - (27.0 * (j * k)) elif x <= 2.8e-193: tmp = t_1 + (a * (t * -4.0)) elif x <= 3.7e-26: tmp = t_1 + (b * c) elif (x <= 8.5e+24) or not (x <= 5.5e+111): tmp = t_2 else: tmp = b * (c + (-27.0 * ((j * k) / b))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))) tmp = 0.0 if (x <= -1.2e+33) tmp = t_2; elseif (x <= -2.4e-82) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 2.8e-193) tmp = Float64(t_1 + Float64(a * Float64(t * -4.0))); elseif (x <= 3.7e-26) tmp = Float64(t_1 + Float64(b * c)); elseif ((x <= 8.5e+24) || !(x <= 5.5e+111)) tmp = t_2; else tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(Float64(j * k) / b)))); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
tmp = 0.0;
if (x <= -1.2e+33)
tmp = t_2;
elseif (x <= -2.4e-82)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 2.8e-193)
tmp = t_1 + (a * (t * -4.0));
elseif (x <= 3.7e-26)
tmp = t_1 + (b * c);
elseif ((x <= 8.5e+24) || ~((x <= 5.5e+111)))
tmp = t_2;
else
tmp = b * (c + (-27.0 * ((j * k) / b)));
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.2e+33], t$95$2, If[LessEqual[x, -2.4e-82], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e-193], N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e-26], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 8.5e+24], N[Not[LessEqual[x, 5.5e+111]], $MachinePrecision]], t$95$2, N[(b * N[(c + N[(-27.0 * N[(N[(j * k), $MachinePrecision] / b), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-82}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-193}:\\
\;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-26}:\\
\;\;\;\;t\_1 + b \cdot c\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+24} \lor \neg \left(x \leq 5.5 \cdot 10^{+111}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \frac{j \cdot k}{b}\right)\\
\end{array}
\end{array}
if x < -1.2e33 or 3.6999999999999999e-26 < x < 8.49999999999999959e24 or 5.4999999999999998e111 < x Initial program 70.5%
Simplified80.0%
Taylor expanded in x around inf 71.8%
if -1.2e33 < x < -2.40000000000000008e-82Initial program 89.6%
Taylor expanded in x around 0 84.7%
Taylor expanded in a around 0 74.4%
if -2.40000000000000008e-82 < x < 2.8000000000000002e-193Initial program 91.1%
Simplified89.8%
Taylor expanded in a around inf 71.2%
metadata-eval71.2%
distribute-lft-neg-in71.2%
*-commutative71.2%
associate-*l*71.2%
distribute-lft-neg-in71.2%
distribute-lft-neg-in71.2%
metadata-eval71.2%
Simplified71.2%
if 2.8000000000000002e-193 < x < 3.6999999999999999e-26Initial program 97.7%
Simplified92.7%
Taylor expanded in b around inf 68.5%
if 8.49999999999999959e24 < x < 5.4999999999999998e111Initial program 93.2%
Simplified93.3%
Taylor expanded in b around inf 67.9%
Taylor expanded in b around inf 74.5%
Final simplification71.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (- (* b c) (* 4.0 (* t a))) (* k (* j 27.0))))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* i 4.0)))))
(if (<= x -2.7e+249)
t_2
(if (<= x -5e+210)
t_1
(if (<= x -2.16e+33)
t_2
(if (<= x 8e-26)
t_1
(if (or (<= x 6.6e+24) (not (<= x 1.5e+113)))
t_2
(* b (+ c (* -27.0 (/ (* j k) b)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
double t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -2.7e+249) {
tmp = t_2;
} else if (x <= -5e+210) {
tmp = t_1;
} else if (x <= -2.16e+33) {
tmp = t_2;
} else if (x <= 8e-26) {
tmp = t_1;
} else if ((x <= 6.6e+24) || !(x <= 1.5e+113)) {
tmp = t_2;
} else {
tmp = b * (c + (-27.0 * ((j * k) / b)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 * (t * a))) - (k * (j * 27.0d0))
t_2 = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
if (x <= (-2.7d+249)) then
tmp = t_2
else if (x <= (-5d+210)) then
tmp = t_1
else if (x <= (-2.16d+33)) then
tmp = t_2
else if (x <= 8d-26) then
tmp = t_1
else if ((x <= 6.6d+24) .or. (.not. (x <= 1.5d+113))) then
tmp = t_2
else
tmp = b * (c + ((-27.0d0) * ((j * k) / b)))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
double t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double tmp;
if (x <= -2.7e+249) {
tmp = t_2;
} else if (x <= -5e+210) {
tmp = t_1;
} else if (x <= -2.16e+33) {
tmp = t_2;
} else if (x <= 8e-26) {
tmp = t_1;
} else if ((x <= 6.6e+24) || !(x <= 1.5e+113)) {
tmp = t_2;
} else {
tmp = b * (c + (-27.0 * ((j * k) / b)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0)) t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0)) tmp = 0 if x <= -2.7e+249: tmp = t_2 elif x <= -5e+210: tmp = t_1 elif x <= -2.16e+33: tmp = t_2 elif x <= 8e-26: tmp = t_1 elif (x <= 6.6e+24) or not (x <= 1.5e+113): tmp = t_2 else: tmp = b * (c + (-27.0 * ((j * k) / b))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(b * c) - Float64(4.0 * Float64(t * a))) - Float64(k * Float64(j * 27.0))) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))) tmp = 0.0 if (x <= -2.7e+249) tmp = t_2; elseif (x <= -5e+210) tmp = t_1; elseif (x <= -2.16e+33) tmp = t_2; elseif (x <= 8e-26) tmp = t_1; elseif ((x <= 6.6e+24) || !(x <= 1.5e+113)) tmp = t_2; else tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(Float64(j * k) / b)))); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
t_2 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
tmp = 0.0;
if (x <= -2.7e+249)
tmp = t_2;
elseif (x <= -5e+210)
tmp = t_1;
elseif (x <= -2.16e+33)
tmp = t_2;
elseif (x <= 8e-26)
tmp = t_1;
elseif ((x <= 6.6e+24) || ~((x <= 1.5e+113)))
tmp = t_2;
else
tmp = b * (c + (-27.0 * ((j * k) / b)));
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.
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[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.7e+249], t$95$2, If[LessEqual[x, -5e+210], t$95$1, If[LessEqual[x, -2.16e+33], t$95$2, If[LessEqual[x, 8e-26], t$95$1, If[Or[LessEqual[x, 6.6e+24], N[Not[LessEqual[x, 1.5e+113]], $MachinePrecision]], t$95$2, N[(b * N[(c + N[(-27.0 * N[(N[(j * k), $MachinePrecision] / b), $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])\\\\
[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(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{if}\;x \leq -2.7 \cdot 10^{+249}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -5 \cdot 10^{+210}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.16 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{+24} \lor \neg \left(x \leq 1.5 \cdot 10^{+113}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \frac{j \cdot k}{b}\right)\\
\end{array}
\end{array}
if x < -2.70000000000000018e249 or -4.9999999999999998e210 < x < -2.1600000000000001e33 or 8.0000000000000003e-26 < x < 6.5999999999999998e24 or 1.5e113 < x Initial program 73.1%
Simplified79.8%
Taylor expanded in x around inf 76.4%
if -2.70000000000000018e249 < x < -4.9999999999999998e210 or -2.1600000000000001e33 < x < 8.0000000000000003e-26Initial program 89.2%
Taylor expanded in x around 0 79.5%
if 6.5999999999999998e24 < x < 1.5e113Initial program 93.2%
Simplified93.3%
Taylor expanded in b around inf 67.9%
Taylor expanded in b around inf 74.5%
Final simplification78.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 (* i 4.0)) (* j (* k 27.0)))))
(if (or (<= t -1e+94) (not (<= t 1e+20)))
(- (* t (- (+ (* 18.0 (* x (* y z))) (/ (* b c) t)) (* a 4.0))) t_1)
(- (+ (+ (* y (* x (* 18.0 (* t z)))) (* a (* t -4.0))) (* b c)) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 * (i * 4.0)) + (j * (k * 27.0));
double tmp;
if ((t <= -1e+94) || !(t <= 1e+20)) {
tmp = (t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0))) - t_1;
} else {
tmp = (((y * (x * (18.0 * (t * z)))) + (a * (t * -4.0))) + (b * c)) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 * (i * 4.0d0)) + (j * (k * 27.0d0))
if ((t <= (-1d+94)) .or. (.not. (t <= 1d+20))) then
tmp = (t * (((18.0d0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0d0))) - t_1
else
tmp = (((y * (x * (18.0d0 * (t * z)))) + (a * (t * (-4.0d0)))) + (b * c)) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 * (i * 4.0)) + (j * (k * 27.0));
double tmp;
if ((t <= -1e+94) || !(t <= 1e+20)) {
tmp = (t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0))) - t_1;
} else {
tmp = (((y * (x * (18.0 * (t * z)))) + (a * (t * -4.0))) + (b * c)) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 * (i * 4.0)) + (j * (k * 27.0)) tmp = 0 if (t <= -1e+94) or not (t <= 1e+20): tmp = (t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0))) - t_1 else: tmp = (((y * (x * (18.0 * (t * z)))) + (a * (t * -4.0))) + (b * c)) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0))) tmp = 0.0 if ((t <= -1e+94) || !(t <= 1e+20)) tmp = Float64(Float64(t * Float64(Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(Float64(b * c) / t)) - Float64(a * 4.0))) - t_1); else tmp = Float64(Float64(Float64(Float64(y * Float64(x * Float64(18.0 * Float64(t * z)))) + Float64(a * Float64(t * -4.0))) + Float64(b * c)) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 * (i * 4.0)) + (j * (k * 27.0));
tmp = 0.0;
if ((t <= -1e+94) || ~((t <= 1e+20)))
tmp = (t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0))) - t_1;
else
tmp = (((y * (x * (18.0 * (t * z)))) + (a * (t * -4.0))) + (b * c)) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -1e+94], N[Not[LessEqual[t, 1e+20]], $MachinePrecision]], N[(N[(t * N[(N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(N[(y * N[(x * N[(18.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\\
\mathbf{if}\;t \leq -1 \cdot 10^{+94} \lor \neg \left(t \leq 10^{+20}\right):\\
\;\;\;\;t \cdot \left(\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \frac{b \cdot c}{t}\right) - a \cdot 4\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(y \cdot \left(x \cdot \left(18 \cdot \left(t \cdot z\right)\right)\right) + a \cdot \left(t \cdot -4\right)\right) + b \cdot c\right) - t\_1\\
\end{array}
\end{array}
if t < -1e94 or 1e20 < t Initial program 82.6%
Simplified88.0%
Taylor expanded in t around inf 89.9%
if -1e94 < t < 1e20Initial program 83.3%
Simplified83.9%
associate-*r*83.2%
distribute-rgt-out--83.2%
sub-neg83.2%
associate-*l*87.0%
*-commutative87.0%
*-commutative87.0%
Applied egg-rr87.0%
sub-neg87.0%
associate-*r*87.0%
*-commutative87.0%
associate-*l*92.4%
*-commutative92.4%
fma-neg92.4%
*-commutative92.4%
*-commutative92.4%
associate-*l*92.4%
*-commutative92.4%
distribute-rgt-neg-in92.4%
distribute-lft-neg-in92.4%
metadata-eval92.4%
Simplified92.4%
fma-undefine92.4%
associate-*l*92.4%
*-commutative92.4%
Applied egg-rr92.4%
Final simplification91.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 -13600.0)
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(if (<= x 1.3e-25)
(- (- (* b c) (* 4.0 (* t a))) (* k (* j 27.0)))
(if (or (<= x 7.2e+24) (not (<= x 1.7e+113)))
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))
(* i (- (/ (* b c) i) (+ (* x 4.0) (* 27.0 (/ (* j k) i)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -13600.0) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if (x <= 1.3e-25) {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
} else if ((x <= 7.2e+24) || !(x <= 1.7e+113)) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else {
tmp = i * (((b * c) / i) - ((x * 4.0) + (27.0 * ((j * k) / 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-13600.0d0)) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else if (x <= 1.3d-25) then
tmp = ((b * c) - (4.0d0 * (t * a))) - (k * (j * 27.0d0))
else if ((x <= 7.2d+24) .or. (.not. (x <= 1.7d+113))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
else
tmp = i * (((b * c) / i) - ((x * 4.0d0) + (27.0d0 * ((j * k) / 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;
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 <= -13600.0) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if (x <= 1.3e-25) {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
} else if ((x <= 7.2e+24) || !(x <= 1.7e+113)) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else {
tmp = i * (((b * c) / i) - ((x * 4.0) + (27.0 * ((j * k) / i))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 <= -13600.0: tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) elif x <= 1.3e-25: tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0)) elif (x <= 7.2e+24) or not (x <= 1.7e+113): tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) else: tmp = i * (((b * c) / i) - ((x * 4.0) + (27.0 * ((j * k) / i)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -13600.0) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); elseif (x <= 1.3e-25) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(k * Float64(j * 27.0))); elseif ((x <= 7.2e+24) || !(x <= 1.7e+113)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); else tmp = Float64(i * Float64(Float64(Float64(b * c) / i) - Float64(Float64(x * 4.0) + Float64(27.0 * Float64(Float64(j * k) / 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])){:}
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 <= -13600.0)
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
elseif (x <= 1.3e-25)
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
elseif ((x <= 7.2e+24) || ~((x <= 1.7e+113)))
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
else
tmp = i * (((b * c) / i) - ((x * 4.0) + (27.0 * ((j * k) / 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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -13600.0], 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[x, 1.3e-25], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 7.2e+24], N[Not[LessEqual[x, 1.7e+113]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(N[(N[(b * c), $MachinePrecision] / i), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] + N[(27.0 * N[(N[(j * k), $MachinePrecision] / i), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -13600:\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-25}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+24} \lor \neg \left(x \leq 1.7 \cdot 10^{+113}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(\frac{b \cdot c}{i} - \left(x \cdot 4 + 27 \cdot \frac{j \cdot k}{i}\right)\right)\\
\end{array}
\end{array}
if x < -13600Initial program 71.4%
Simplified80.4%
pow180.4%
associate-*l*80.4%
associate-*r*80.4%
Applied egg-rr80.4%
unpow180.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in i around 0 74.7%
Taylor expanded in j around 0 70.4%
if -13600 < x < 1.3e-25Initial program 92.7%
Taylor expanded in x around 0 80.8%
if 1.3e-25 < x < 7.19999999999999966e24 or 1.70000000000000009e113 < x Initial program 72.1%
Simplified81.3%
Taylor expanded in x around inf 78.1%
if 7.19999999999999966e24 < x < 1.70000000000000009e113Initial program 93.2%
Simplified93.3%
Taylor expanded in i around inf 80.9%
Taylor expanded in t around 0 80.9%
Final simplification77.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* a (* t -4.0)))))
(if (<= a -4.8e+42)
t_2
(if (<= a -9.2e-200)
(+ t_1 (* b c))
(if (<= a -2.7e-266)
(* 18.0 (* t (* x (* y z))))
(if (<= a 3.4e-61)
(* b (+ c (* -27.0 (/ (* j k) b))))
(if (<= a 4.4e+65) (+ t_1 (* i (* x -4.0))) t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = j * (k * -27.0);
double t_2 = t_1 + (a * (t * -4.0));
double tmp;
if (a <= -4.8e+42) {
tmp = t_2;
} else if (a <= -9.2e-200) {
tmp = t_1 + (b * c);
} else if (a <= -2.7e-266) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (a <= 3.4e-61) {
tmp = b * (c + (-27.0 * ((j * k) / b)));
} else if (a <= 4.4e+65) {
tmp = t_1 + (i * (x * -4.0));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + (a * (t * (-4.0d0)))
if (a <= (-4.8d+42)) then
tmp = t_2
else if (a <= (-9.2d-200)) then
tmp = t_1 + (b * c)
else if (a <= (-2.7d-266)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (a <= 3.4d-61) then
tmp = b * (c + ((-27.0d0) * ((j * k) / b)))
else if (a <= 4.4d+65) then
tmp = t_1 + (i * (x * (-4.0d0)))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (a * (t * -4.0));
double tmp;
if (a <= -4.8e+42) {
tmp = t_2;
} else if (a <= -9.2e-200) {
tmp = t_1 + (b * c);
} else if (a <= -2.7e-266) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (a <= 3.4e-61) {
tmp = b * (c + (-27.0 * ((j * k) / b)));
} else if (a <= 4.4e+65) {
tmp = t_1 + (i * (x * -4.0));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (a * (t * -4.0)) tmp = 0 if a <= -4.8e+42: tmp = t_2 elif a <= -9.2e-200: tmp = t_1 + (b * c) elif a <= -2.7e-266: tmp = 18.0 * (t * (x * (y * z))) elif a <= 3.4e-61: tmp = b * (c + (-27.0 * ((j * k) / b))) elif a <= 4.4e+65: tmp = t_1 + (i * (x * -4.0)) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(a * Float64(t * -4.0))) tmp = 0.0 if (a <= -4.8e+42) tmp = t_2; elseif (a <= -9.2e-200) tmp = Float64(t_1 + Float64(b * c)); elseif (a <= -2.7e-266) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (a <= 3.4e-61) tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(Float64(j * k) / b)))); elseif (a <= 4.4e+65) tmp = Float64(t_1 + Float64(i * Float64(x * -4.0))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (a * (t * -4.0));
tmp = 0.0;
if (a <= -4.8e+42)
tmp = t_2;
elseif (a <= -9.2e-200)
tmp = t_1 + (b * c);
elseif (a <= -2.7e-266)
tmp = 18.0 * (t * (x * (y * z)));
elseif (a <= 3.4e-61)
tmp = b * (c + (-27.0 * ((j * k) / b)));
elseif (a <= 4.4e+65)
tmp = t_1 + (i * (x * -4.0));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.8e+42], t$95$2, If[LessEqual[a, -9.2e-200], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.7e-266], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e-61], N[(b * N[(c + N[(-27.0 * N[(N[(j * k), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.4e+65], N[(t$95$1 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t\_1 + a \cdot \left(t \cdot -4\right)\\
\mathbf{if}\;a \leq -4.8 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -9.2 \cdot 10^{-200}:\\
\;\;\;\;t\_1 + b \cdot c\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{-266}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-61}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \frac{j \cdot k}{b}\right)\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{+65}:\\
\;\;\;\;t\_1 + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -4.7999999999999997e42 or 4.3999999999999997e65 < a Initial program 78.7%
Simplified86.5%
Taylor expanded in a around inf 62.7%
metadata-eval62.7%
distribute-lft-neg-in62.7%
*-commutative62.7%
associate-*l*62.7%
distribute-lft-neg-in62.7%
distribute-lft-neg-in62.7%
metadata-eval62.7%
Simplified62.7%
if -4.7999999999999997e42 < a < -9.2000000000000003e-200Initial program 89.1%
Simplified91.1%
Taylor expanded in b around inf 68.2%
if -9.2000000000000003e-200 < a < -2.69999999999999996e-266Initial program 93.8%
Simplified93.5%
pow193.5%
associate-*l*93.7%
associate-*r*93.7%
Applied egg-rr93.7%
unpow193.7%
*-commutative93.7%
Simplified93.7%
Taylor expanded in z around inf 57.5%
if -2.69999999999999996e-266 < a < 3.3999999999999998e-61Initial program 81.1%
Simplified84.1%
Taylor expanded in b around inf 57.1%
Taylor expanded in b around inf 62.5%
if 3.3999999999999998e-61 < a < 4.3999999999999997e65Initial program 88.1%
Simplified88.1%
Taylor expanded in i around inf 65.2%
metadata-eval65.2%
distribute-lft-neg-in65.2%
*-commutative65.2%
associate-*r*65.2%
distribute-rgt-neg-in65.2%
distribute-rgt-neg-in65.2%
metadata-eval65.2%
*-commutative65.2%
Simplified65.2%
Final simplification63.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) 5e+293)
(-
(+ (* b c) (* t (- (* x (* z (* 18.0 y))) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(* b (+ c (* -27.0 (/ (* j k) b))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= 5e+293) {
tmp = ((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = b * (c + (-27.0 * ((j * k) / b)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= 5d+293) then
tmp = ((b * c) + (t * ((x * (z * (18.0d0 * y))) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
else
tmp = b * (c + ((-27.0d0) * ((j * k) / b)))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= 5e+293) {
tmp = ((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = b * (c + (-27.0 * ((j * k) / b)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= 5e+293: tmp = ((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = b * (c + (-27.0 * ((j * k) / b))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= 5e+293) 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(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(Float64(j * k) / b)))); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= 5e+293)
tmp = ((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = b * (c + (-27.0 * ((j * k) / b)));
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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], 5e+293], 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[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(c + N[(-27.0 * N[(N[(j * k), $MachinePrecision] / b), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq 5 \cdot 10^{+293}:\\
\;\;\;\;\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(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \frac{j \cdot k}{b}\right)\\
\end{array}
\end{array}
if (*.f64 b c) < 5.00000000000000033e293Initial program 85.4%
Simplified88.3%
pow188.3%
associate-*l*88.3%
associate-*r*88.3%
Applied egg-rr88.3%
unpow188.3%
*-commutative88.3%
Simplified88.3%
if 5.00000000000000033e293 < (*.f64 b c) Initial program 52.6%
Simplified63.2%
Taylor expanded in b around inf 74.3%
Taylor expanded in b around inf 90.1%
Final simplification88.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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)) (* b c)))
(t_2 (- (* b c) (* 4.0 (* t a))))
(t_3 (* 18.0 (* t (* x (* y z))))))
(if (<= t -2.25e+215)
t_3
(if (<= t -1.05e+163)
t_2
(if (<= t -2.5e+42)
t_1
(if (<= t -8.2e+18) t_3 (if (<= t 9.5e+36) t_1 t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (j * (k * -27.0)) + (b * c);
double t_2 = (b * c) - (4.0 * (t * a));
double t_3 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -2.25e+215) {
tmp = t_3;
} else if (t <= -1.05e+163) {
tmp = t_2;
} else if (t <= -2.5e+42) {
tmp = t_1;
} else if (t <= -8.2e+18) {
tmp = t_3;
} else if (t <= 9.5e+36) {
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + (b * c)
t_2 = (b * c) - (4.0d0 * (t * a))
t_3 = 18.0d0 * (t * (x * (y * z)))
if (t <= (-2.25d+215)) then
tmp = t_3
else if (t <= (-1.05d+163)) then
tmp = t_2
else if (t <= (-2.5d+42)) then
tmp = t_1
else if (t <= (-8.2d+18)) then
tmp = t_3
else if (t <= 9.5d+36) 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;
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)) + (b * c);
double t_2 = (b * c) - (4.0 * (t * a));
double t_3 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -2.25e+215) {
tmp = t_3;
} else if (t <= -1.05e+163) {
tmp = t_2;
} else if (t <= -2.5e+42) {
tmp = t_1;
} else if (t <= -8.2e+18) {
tmp = t_3;
} else if (t <= 9.5e+36) {
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]) [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)) + (b * c) t_2 = (b * c) - (4.0 * (t * a)) t_3 = 18.0 * (t * (x * (y * z))) tmp = 0 if t <= -2.25e+215: tmp = t_3 elif t <= -1.05e+163: tmp = t_2 elif t <= -2.5e+42: tmp = t_1 elif t <= -8.2e+18: tmp = t_3 elif t <= 9.5e+36: 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]) 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(b * c)) t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) t_3 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (t <= -2.25e+215) tmp = t_3; elseif (t <= -1.05e+163) tmp = t_2; elseif (t <= -2.5e+42) tmp = t_1; elseif (t <= -8.2e+18) tmp = t_3; elseif (t <= 9.5e+36) 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])){:}
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)) + (b * c);
t_2 = (b * c) - (4.0 * (t * a));
t_3 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (t <= -2.25e+215)
tmp = t_3;
elseif (t <= -1.05e+163)
tmp = t_2;
elseif (t <= -2.5e+42)
tmp = t_1;
elseif (t <= -8.2e+18)
tmp = t_3;
elseif (t <= 9.5e+36)
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.
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[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.25e+215], t$95$3, If[LessEqual[t, -1.05e+163], t$95$2, If[LessEqual[t, -2.5e+42], t$95$1, If[LessEqual[t, -8.2e+18], t$95$3, If[LessEqual[t, 9.5e+36], 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])\\\\
[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) + b \cdot c\\
t_2 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
t_3 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -2.25 \cdot 10^{+215}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{+163}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.2 \cdot 10^{+18}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.2500000000000001e215 or -2.50000000000000003e42 < t < -8.2e18Initial program 87.8%
Simplified93.8%
pow193.8%
associate-*l*93.9%
associate-*r*93.8%
Applied egg-rr93.8%
unpow193.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in z around inf 67.1%
if -2.2500000000000001e215 < t < -1.05e163 or 9.49999999999999974e36 < t Initial program 84.1%
Taylor expanded in x around 0 69.5%
Taylor expanded in j around 0 59.2%
if -1.05e163 < t < -2.50000000000000003e42 or -8.2e18 < t < 9.49999999999999974e36Initial program 81.5%
Simplified84.6%
Taylor expanded in b around inf 57.7%
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* t a)))) (t_2 (* 18.0 (* t (* x (* y z))))))
(if (<= t -3.4e+216)
t_2
(if (<= t -2.35e+163)
t_1
(if (<= t -2e+43)
(- (* b c) (* 27.0 (* j k)))
(if (<= t -6.6e+17)
t_2
(if (<= t 5.1e+36) (+ (* j (* k -27.0)) (* b c)) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (b * c) - (4.0 * (t * a));
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -3.4e+216) {
tmp = t_2;
} else if (t <= -2.35e+163) {
tmp = t_1;
} else if (t <= -2e+43) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= -6.6e+17) {
tmp = t_2;
} else if (t <= 5.1e+36) {
tmp = (j * (k * -27.0)) + (b * c);
} 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.
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 * (t * a))
t_2 = 18.0d0 * (t * (x * (y * z)))
if (t <= (-3.4d+216)) then
tmp = t_2
else if (t <= (-2.35d+163)) then
tmp = t_1
else if (t <= (-2d+43)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (t <= (-6.6d+17)) then
tmp = t_2
else if (t <= 5.1d+36) then
tmp = (j * (k * (-27.0d0))) + (b * c)
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -3.4e+216) {
tmp = t_2;
} else if (t <= -2.35e+163) {
tmp = t_1;
} else if (t <= -2e+43) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= -6.6e+17) {
tmp = t_2;
} else if (t <= 5.1e+36) {
tmp = (j * (k * -27.0)) + (b * c);
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (t * a)) t_2 = 18.0 * (t * (x * (y * z))) tmp = 0 if t <= -3.4e+216: tmp = t_2 elif t <= -2.35e+163: tmp = t_1 elif t <= -2e+43: tmp = (b * c) - (27.0 * (j * k)) elif t <= -6.6e+17: tmp = t_2 elif t <= 5.1e+36: tmp = (j * (k * -27.0)) + (b * c) 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (t <= -3.4e+216) tmp = t_2; elseif (t <= -2.35e+163) tmp = t_1; elseif (t <= -2e+43) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (t <= -6.6e+17) tmp = t_2; elseif (t <= 5.1e+36) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (t * a));
t_2 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (t <= -3.4e+216)
tmp = t_2;
elseif (t <= -2.35e+163)
tmp = t_1;
elseif (t <= -2e+43)
tmp = (b * c) - (27.0 * (j * k));
elseif (t <= -6.6e+17)
tmp = t_2;
elseif (t <= 5.1e+36)
tmp = (j * (k * -27.0)) + (b * c);
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+216], t$95$2, If[LessEqual[t, -2.35e+163], t$95$1, If[LessEqual[t, -2e+43], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.6e+17], t$95$2, If[LessEqual[t, 5.1e+36], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+216}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.35 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2 \cdot 10^{+43}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq -6.6 \cdot 10^{+17}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{+36}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.40000000000000026e216 or -2.00000000000000003e43 < t < -6.6e17Initial program 87.8%
Simplified93.8%
pow193.8%
associate-*l*93.9%
associate-*r*93.8%
Applied egg-rr93.8%
unpow193.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in z around inf 67.1%
if -3.40000000000000026e216 < t < -2.35000000000000009e163 or 5.09999999999999973e36 < t Initial program 84.1%
Taylor expanded in x around 0 69.5%
Taylor expanded in j around 0 59.2%
if -2.35000000000000009e163 < t < -2.00000000000000003e43Initial program 75.7%
Taylor expanded in x around 0 59.7%
Taylor expanded in a around 0 53.1%
if -6.6e17 < t < 5.09999999999999973e36Initial program 82.8%
Simplified84.3%
Taylor expanded in b around inf 58.7%
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* t a)))) (t_2 (* 18.0 (* t (* x (* y z))))))
(if (<= t -6.8e+216)
t_2
(if (<= t -3.4e+162)
t_1
(if (<= t -4.3e+42)
(* b (+ c (* -27.0 (/ (* j k) b))))
(if (<= t -1.15e+19)
t_2
(if (<= t 4.8e+36) (+ (* j (* k -27.0)) (* b c)) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (b * c) - (4.0 * (t * a));
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -6.8e+216) {
tmp = t_2;
} else if (t <= -3.4e+162) {
tmp = t_1;
} else if (t <= -4.3e+42) {
tmp = b * (c + (-27.0 * ((j * k) / b)));
} else if (t <= -1.15e+19) {
tmp = t_2;
} else if (t <= 4.8e+36) {
tmp = (j * (k * -27.0)) + (b * c);
} 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.
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 * (t * a))
t_2 = 18.0d0 * (t * (x * (y * z)))
if (t <= (-6.8d+216)) then
tmp = t_2
else if (t <= (-3.4d+162)) then
tmp = t_1
else if (t <= (-4.3d+42)) then
tmp = b * (c + ((-27.0d0) * ((j * k) / b)))
else if (t <= (-1.15d+19)) then
tmp = t_2
else if (t <= 4.8d+36) then
tmp = (j * (k * (-27.0d0))) + (b * c)
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -6.8e+216) {
tmp = t_2;
} else if (t <= -3.4e+162) {
tmp = t_1;
} else if (t <= -4.3e+42) {
tmp = b * (c + (-27.0 * ((j * k) / b)));
} else if (t <= -1.15e+19) {
tmp = t_2;
} else if (t <= 4.8e+36) {
tmp = (j * (k * -27.0)) + (b * c);
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (t * a)) t_2 = 18.0 * (t * (x * (y * z))) tmp = 0 if t <= -6.8e+216: tmp = t_2 elif t <= -3.4e+162: tmp = t_1 elif t <= -4.3e+42: tmp = b * (c + (-27.0 * ((j * k) / b))) elif t <= -1.15e+19: tmp = t_2 elif t <= 4.8e+36: tmp = (j * (k * -27.0)) + (b * c) 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (t <= -6.8e+216) tmp = t_2; elseif (t <= -3.4e+162) tmp = t_1; elseif (t <= -4.3e+42) tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(Float64(j * k) / b)))); elseif (t <= -1.15e+19) tmp = t_2; elseif (t <= 4.8e+36) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (t * a));
t_2 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (t <= -6.8e+216)
tmp = t_2;
elseif (t <= -3.4e+162)
tmp = t_1;
elseif (t <= -4.3e+42)
tmp = b * (c + (-27.0 * ((j * k) / b)));
elseif (t <= -1.15e+19)
tmp = t_2;
elseif (t <= 4.8e+36)
tmp = (j * (k * -27.0)) + (b * c);
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e+216], t$95$2, If[LessEqual[t, -3.4e+162], t$95$1, If[LessEqual[t, -4.3e+42], N[(b * N[(c + N[(-27.0 * N[(N[(j * k), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.15e+19], t$95$2, If[LessEqual[t, 4.8e+36], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{+216}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.3 \cdot 10^{+42}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \frac{j \cdot k}{b}\right)\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{+19}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+36}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.80000000000000051e216 or -4.2999999999999998e42 < t < -1.15e19Initial program 87.8%
Simplified93.8%
pow193.8%
associate-*l*93.9%
associate-*r*93.8%
Applied egg-rr93.8%
unpow193.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in z around inf 67.1%
if -6.80000000000000051e216 < t < -3.40000000000000003e162 or 4.79999999999999985e36 < t Initial program 84.1%
Taylor expanded in x around 0 69.5%
Taylor expanded in j around 0 59.2%
if -3.40000000000000003e162 < t < -4.2999999999999998e42Initial program 75.7%
Simplified86.1%
Taylor expanded in b around inf 53.1%
Taylor expanded in b around inf 59.8%
if -1.15e19 < t < 4.79999999999999985e36Initial program 82.8%
Simplified84.3%
Taylor expanded in b around inf 58.7%
Final simplification60.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 -28.0)
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(if (<= x 1.3e-25)
(- (- (* b c) (* 4.0 (* t a))) (* k (* j 27.0)))
(if (or (<= x 5.8e+24) (not (<= x 1.3e+111)))
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))
(* b (+ c (* -27.0 (/ (* j k) b))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -28.0) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if (x <= 1.3e-25) {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
} else if ((x <= 5.8e+24) || !(x <= 1.3e+111)) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else {
tmp = b * (c + (-27.0 * ((j * k) / b)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-28.0d0)) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else if (x <= 1.3d-25) then
tmp = ((b * c) - (4.0d0 * (t * a))) - (k * (j * 27.0d0))
else if ((x <= 5.8d+24) .or. (.not. (x <= 1.3d+111))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
else
tmp = b * (c + ((-27.0d0) * ((j * k) / b)))
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;
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 <= -28.0) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if (x <= 1.3e-25) {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
} else if ((x <= 5.8e+24) || !(x <= 1.3e+111)) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else {
tmp = b * (c + (-27.0 * ((j * k) / b)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 <= -28.0: tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) elif x <= 1.3e-25: tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0)) elif (x <= 5.8e+24) or not (x <= 1.3e+111): tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) else: tmp = b * (c + (-27.0 * ((j * k) / b))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -28.0) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); elseif (x <= 1.3e-25) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(k * Float64(j * 27.0))); elseif ((x <= 5.8e+24) || !(x <= 1.3e+111)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); else tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(Float64(j * k) / b)))); 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])){:}
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 <= -28.0)
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
elseif (x <= 1.3e-25)
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
elseif ((x <= 5.8e+24) || ~((x <= 1.3e+111)))
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
else
tmp = b * (c + (-27.0 * ((j * k) / b)));
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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -28.0], 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[x, 1.3e-25], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 5.8e+24], N[Not[LessEqual[x, 1.3e+111]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(c + N[(-27.0 * N[(N[(j * k), $MachinePrecision] / b), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -28:\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-25}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{+24} \lor \neg \left(x \leq 1.3 \cdot 10^{+111}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(c + -27 \cdot \frac{j \cdot k}{b}\right)\\
\end{array}
\end{array}
if x < -28Initial program 71.4%
Simplified80.4%
pow180.4%
associate-*l*80.4%
associate-*r*80.4%
Applied egg-rr80.4%
unpow180.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in i around 0 74.7%
Taylor expanded in j around 0 70.4%
if -28 < x < 1.3e-25Initial program 92.7%
Taylor expanded in x around 0 80.8%
if 1.3e-25 < x < 5.79999999999999958e24 or 1.2999999999999999e111 < x Initial program 72.1%
Simplified81.3%
Taylor expanded in x around inf 78.1%
if 5.79999999999999958e24 < x < 1.2999999999999999e111Initial program 93.2%
Simplified93.3%
Taylor expanded in b around inf 67.9%
Taylor expanded in b around inf 74.5%
Final simplification77.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j -27.0))))
(if (<= (* b c) -2e+108)
(* b c)
(if (<= (* b c) -6.4e-255)
t_1
(if (<= (* b c) 0.0)
(* t (* a -4.0))
(if (<= (* b c) 3e+232) t_1 (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -2e+108) {
tmp = b * c;
} else if ((b * c) <= -6.4e-255) {
tmp = t_1;
} else if ((b * c) <= 0.0) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 3e+232) {
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
if ((b * c) <= (-2d+108)) then
tmp = b * c
else if ((b * c) <= (-6.4d-255)) then
tmp = t_1
else if ((b * c) <= 0.0d0) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 3d+232) 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double tmp;
if ((b * c) <= -2e+108) {
tmp = b * c;
} else if ((b * c) <= -6.4e-255) {
tmp = t_1;
} else if ((b * c) <= 0.0) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 3e+232) {
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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if (b * c) <= -2e+108: tmp = b * c elif (b * c) <= -6.4e-255: tmp = t_1 elif (b * c) <= 0.0: tmp = t * (a * -4.0) elif (b * c) <= 3e+232: 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (Float64(b * c) <= -2e+108) tmp = Float64(b * c); elseif (Float64(b * c) <= -6.4e-255) tmp = t_1; elseif (Float64(b * c) <= 0.0) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 3e+232) 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if ((b * c) <= -2e+108)
tmp = b * c;
elseif ((b * c) <= -6.4e-255)
tmp = t_1;
elseif ((b * c) <= 0.0)
tmp = t * (a * -4.0);
elseif ((b * c) <= 3e+232)
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+108], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -6.4e-255], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 0.0], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3e+232], 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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+108}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -6.4 \cdot 10^{-255}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{+232}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.0000000000000001e108 or 3.00000000000000003e232 < (*.f64 b c) Initial program 79.3%
Simplified79.3%
pow179.3%
associate-*l*79.3%
associate-*r*79.3%
Applied egg-rr79.3%
unpow179.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in b around inf 58.8%
if -2.0000000000000001e108 < (*.f64 b c) < -6.39999999999999985e-255 or -0.0 < (*.f64 b c) < 3.00000000000000003e232Initial program 83.5%
Simplified86.9%
Taylor expanded in j around inf 34.9%
associate-*r*34.9%
*-commutative34.9%
metadata-eval34.9%
distribute-rgt-neg-in34.9%
*-commutative34.9%
distribute-rgt-neg-in34.9%
metadata-eval34.9%
*-commutative34.9%
Simplified34.9%
if -6.39999999999999985e-255 < (*.f64 b c) < -0.0Initial program 88.6%
Simplified96.8%
pow196.8%
associate-*l*96.9%
associate-*r*96.9%
Applied egg-rr96.9%
unpow196.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in a around inf 36.8%
metadata-eval36.8%
distribute-lft-neg-in36.8%
associate-*r*36.8%
*-commutative36.8%
distribute-rgt-neg-in36.8%
distribute-lft-neg-in36.8%
metadata-eval36.8%
*-commutative36.8%
Simplified36.8%
Final simplification41.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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)) (* b c))) (t_2 (* 18.0 (* t (* x (* y z))))))
(if (<= t -1.15e+165)
t_2
(if (<= t -2.55e+42)
t_1
(if (<= t -1.15e+19) t_2 (if (<= t 2.7e+241) t_1 (* t (* a -4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && 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 t_1 = (j * (k * -27.0)) + (b * c);
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -1.15e+165) {
tmp = t_2;
} else if (t <= -2.55e+42) {
tmp = t_1;
} else if (t <= -1.15e+19) {
tmp = t_2;
} else if (t <= 2.7e+241) {
tmp = t_1;
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + (b * c)
t_2 = 18.0d0 * (t * (x * (y * z)))
if (t <= (-1.15d+165)) then
tmp = t_2
else if (t <= (-2.55d+42)) then
tmp = t_1
else if (t <= (-1.15d+19)) then
tmp = t_2
else if (t <= 2.7d+241) then
tmp = t_1
else
tmp = t * (a * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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)) + (b * c);
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -1.15e+165) {
tmp = t_2;
} else if (t <= -2.55e+42) {
tmp = t_1;
} else if (t <= -1.15e+19) {
tmp = t_2;
} else if (t <= 2.7e+241) {
tmp = t_1;
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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)) + (b * c) t_2 = 18.0 * (t * (x * (y * z))) tmp = 0 if t <= -1.15e+165: tmp = t_2 elif t <= -2.55e+42: tmp = t_1 elif t <= -1.15e+19: tmp = t_2 elif t <= 2.7e+241: tmp = t_1 else: tmp = t * (a * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(b * c)) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (t <= -1.15e+165) tmp = t_2; elseif (t <= -2.55e+42) tmp = t_1; elseif (t <= -1.15e+19) tmp = t_2; elseif (t <= 2.7e+241) tmp = t_1; else tmp = Float64(t * Float64(a * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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)) + (b * c);
t_2 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (t <= -1.15e+165)
tmp = t_2;
elseif (t <= -2.55e+42)
tmp = t_1;
elseif (t <= -1.15e+19)
tmp = t_2;
elseif (t <= 2.7e+241)
tmp = t_1;
else
tmp = t * (a * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+165], t$95$2, If[LessEqual[t, -2.55e+42], t$95$1, If[LessEqual[t, -1.15e+19], t$95$2, If[LessEqual[t, 2.7e+241], t$95$1, N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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) + b \cdot c\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+165}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.55 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{+19}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+241}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\end{array}
\end{array}
if t < -1.15000000000000008e165 or -2.55e42 < t < -1.15e19Initial program 84.7%
Simplified89.1%
pow189.1%
associate-*l*89.1%
associate-*r*89.1%
Applied egg-rr89.1%
unpow189.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in z around inf 59.3%
if -1.15000000000000008e165 < t < -2.55e42 or -1.15e19 < t < 2.69999999999999972e241Initial program 81.8%
Simplified86.4%
Taylor expanded in b around inf 55.2%
if 2.69999999999999972e241 < t Initial program 92.9%
Simplified92.9%
pow192.9%
associate-*l*92.9%
associate-*r*92.9%
Applied egg-rr92.9%
unpow192.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in a around inf 51.3%
metadata-eval51.3%
distribute-lft-neg-in51.3%
associate-*r*51.3%
*-commutative51.3%
distribute-rgt-neg-in51.3%
distribute-lft-neg-in51.3%
metadata-eval51.3%
*-commutative51.3%
Simplified51.3%
Final simplification55.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= b -3.05e+290)
(- (* b c) (* 4.0 (* t a)))
(if (or (<= b -1.76e+90) (not (<= b 6.8e-17)))
(* b (+ c (* -27.0 (/ (* j k) b))))
(+ (* j (* k -27.0)) (* i (* x -4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (b <= -3.05e+290) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b <= -1.76e+90) || !(b <= 6.8e-17)) {
tmp = b * (c + (-27.0 * ((j * k) / b)));
} else {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-3.05d+290)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if ((b <= (-1.76d+90)) .or. (.not. (b <= 6.8d-17))) then
tmp = b * (c + ((-27.0d0) * ((j * k) / b)))
else
tmp = (j * (k * (-27.0d0))) + (i * (x * (-4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -3.05e+290) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b <= -1.76e+90) || !(b <= 6.8e-17)) {
tmp = b * (c + (-27.0 * ((j * k) / b)));
} else {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 <= -3.05e+290: tmp = (b * c) - (4.0 * (t * a)) elif (b <= -1.76e+90) or not (b <= 6.8e-17): tmp = b * (c + (-27.0 * ((j * k) / b))) else: tmp = (j * (k * -27.0)) + (i * (x * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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 (b <= -3.05e+290) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif ((b <= -1.76e+90) || !(b <= 6.8e-17)) tmp = Float64(b * Float64(c + Float64(-27.0 * Float64(Float64(j * k) / b)))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(i * Float64(x * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 <= -3.05e+290)
tmp = (b * c) - (4.0 * (t * a));
elseif ((b <= -1.76e+90) || ~((b <= 6.8e-17)))
tmp = b * (c + (-27.0 * ((j * k) / b)));
else
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[b, -3.05e+290], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, -1.76e+90], N[Not[LessEqual[b, 6.8e-17]], $MachinePrecision]], N[(b * N[(c + N[(-27.0 * N[(N[(j * k), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 \leq -3.05 \cdot 10^{+290}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \leq -1.76 \cdot 10^{+90} \lor \neg \left(b \leq 6.8 \cdot 10^{-17}\right):\\
\;\;\;\;b \cdot \left(c + -27 \cdot \frac{j \cdot k}{b}\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\
\end{array}
\end{array}
if b < -3.0499999999999999e290Initial program 87.5%
Taylor expanded in x around 0 63.1%
Taylor expanded in j around 0 63.1%
if -3.0499999999999999e290 < b < -1.76e90 or 6.7999999999999996e-17 < b Initial program 82.9%
Simplified84.9%
Taylor expanded in b around inf 60.0%
Taylor expanded in b around inf 63.8%
if -1.76e90 < b < 6.7999999999999996e-17Initial program 82.8%
Simplified88.3%
Taylor expanded in i around inf 52.6%
metadata-eval52.6%
distribute-lft-neg-in52.6%
*-commutative52.6%
associate-*r*52.6%
distribute-rgt-neg-in52.6%
distribute-rgt-neg-in52.6%
metadata-eval52.6%
*-commutative52.6%
Simplified52.6%
Final simplification57.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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) -7e+116) (not (<= (* b c) 3e+232))) (* 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);
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) <= -7e+116) || !((b * c) <= 3e+232)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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) <= (-7d+116)) .or. (.not. ((b * c) <= 3d+232))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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) <= -7e+116) || !((b * c) <= 3e+232)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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) <= -7e+116) or not ((b * c) <= 3e+232): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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) <= -7e+116) || !(Float64(b * c) <= 3e+232)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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) <= -7e+116) || ~(((b * c) <= 3e+232)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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], -7e+116], N[Not[LessEqual[N[(b * c), $MachinePrecision], 3e+232]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 \cdot 10^{+116} \lor \neg \left(b \cdot c \leq 3 \cdot 10^{+232}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -6.99999999999999993e116 or 3.00000000000000003e232 < (*.f64 b c) Initial program 79.3%
Simplified79.3%
pow179.3%
associate-*l*79.3%
associate-*r*79.3%
Applied egg-rr79.3%
unpow179.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in b around inf 58.8%
if -6.99999999999999993e116 < (*.f64 b c) < 3.00000000000000003e232Initial program 84.4%
Simplified88.7%
Taylor expanded in j around inf 32.6%
Final simplification39.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -5.4e+116) (not (<= (* b c) 4.8e+232))) (* b c) (* k (* j -27.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -5.4e+116) || !((b * c) <= 4.8e+232)) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-5.4d+116)) .or. (.not. ((b * c) <= 4.8d+232))) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -5.4e+116) || !((b * c) <= 4.8e+232)) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -5.4e+116) or not ((b * c) <= 4.8e+232): tmp = b * c else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -5.4e+116) || !(Float64(b * c) <= 4.8e+232)) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -5.4e+116) || ~(((b * c) <= 4.8e+232)))
tmp = b * c;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -5.4e+116], N[Not[LessEqual[N[(b * c), $MachinePrecision], 4.8e+232]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5.4 \cdot 10^{+116} \lor \neg \left(b \cdot c \leq 4.8 \cdot 10^{+232}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -5.3999999999999999e116 or 4.8000000000000003e232 < (*.f64 b c) Initial program 79.3%
Simplified79.3%
pow179.3%
associate-*l*79.3%
associate-*r*79.3%
Applied egg-rr79.3%
unpow179.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in b around inf 58.8%
if -5.3999999999999999e116 < (*.f64 b c) < 4.8000000000000003e232Initial program 84.4%
Simplified88.7%
Taylor expanded in j around inf 32.6%
associate-*r*32.6%
*-commutative32.6%
metadata-eval32.6%
distribute-rgt-neg-in32.6%
*-commutative32.6%
distribute-rgt-neg-in32.6%
metadata-eval32.6%
*-commutative32.6%
Simplified32.6%
Final simplification40.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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);
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.
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;
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]) [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]) 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])){:}
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. 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])\\\\
[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 83.0%
Simplified85.7%
pow185.7%
associate-*l*85.7%
associate-*r*85.7%
Applied egg-rr85.7%
unpow185.7%
*-commutative85.7%
Simplified85.7%
Taylor expanded in b around inf 22.9%
Final simplification22.9%
(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 2024060
(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)))