
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))
INFINITY)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= ((double) INFINITY)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= math.inf: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0))) <= Inf)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right) \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 94.9%
Simplified95.7%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified21.9%
Taylor expanded in x around inf 59.9%
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.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))))
(if (<= (* b c) -1.05e+77)
(* b c)
(if (<= (* b c) -7.6e-157)
t_1
(if (<= (* b c) 1.4e-234)
(* t (* a -4.0))
(if (<= (* b c) 1.25e+30)
t_1
(if (<= (* b c) 3.9e+108)
(* k (* j -27.0))
(if (<= (* b c) 4.9e+114) t_1 (* b c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -1.05e+77) {
tmp = b * c;
} else if ((b * c) <= -7.6e-157) {
tmp = t_1;
} else if ((b * c) <= 1.4e-234) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 1.25e+30) {
tmp = t_1;
} else if ((b * c) <= 3.9e+108) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 4.9e+114) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
if ((b * c) <= (-1.05d+77)) then
tmp = b * c
else if ((b * c) <= (-7.6d-157)) then
tmp = t_1
else if ((b * c) <= 1.4d-234) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 1.25d+30) then
tmp = t_1
else if ((b * c) <= 3.9d+108) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 4.9d+114) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -1.05e+77) {
tmp = b * c;
} else if ((b * c) <= -7.6e-157) {
tmp = t_1;
} else if ((b * c) <= 1.4e-234) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 1.25e+30) {
tmp = t_1;
} else if ((b * c) <= 3.9e+108) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 4.9e+114) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (x * i) tmp = 0 if (b * c) <= -1.05e+77: tmp = b * c elif (b * c) <= -7.6e-157: tmp = t_1 elif (b * c) <= 1.4e-234: tmp = t * (a * -4.0) elif (b * c) <= 1.25e+30: tmp = t_1 elif (b * c) <= 3.9e+108: tmp = k * (j * -27.0) elif (b * c) <= 4.9e+114: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (Float64(b * c) <= -1.05e+77) tmp = Float64(b * c); elseif (Float64(b * c) <= -7.6e-157) tmp = t_1; elseif (Float64(b * c) <= 1.4e-234) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 1.25e+30) tmp = t_1; elseif (Float64(b * c) <= 3.9e+108) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 4.9e+114) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (x * i);
tmp = 0.0;
if ((b * c) <= -1.05e+77)
tmp = b * c;
elseif ((b * c) <= -7.6e-157)
tmp = t_1;
elseif ((b * c) <= 1.4e-234)
tmp = t * (a * -4.0);
elseif ((b * c) <= 1.25e+30)
tmp = t_1;
elseif ((b * c) <= 3.9e+108)
tmp = k * (j * -27.0);
elseif ((b * c) <= 4.9e+114)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.05e+77], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7.6e-157], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.4e-234], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.25e+30], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 3.9e+108], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.9e+114], t$95$1, N[(b * c), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -1.05 \cdot 10^{+77}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -7.6 \cdot 10^{-157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{-234}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.25 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 3.9 \cdot 10^{+108}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 4.9 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.0499999999999999e77 or 4.9000000000000001e114 < (*.f64 b c) Initial program 83.7%
pow183.7%
associate-*l*78.6%
*-commutative78.6%
Applied egg-rr78.6%
unpow178.6%
associate-*l*80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in b around inf 58.7%
if -1.0499999999999999e77 < (*.f64 b c) < -7.60000000000000041e-157 or 1.3999999999999999e-234 < (*.f64 b c) < 1.25e30 or 3.89999999999999985e108 < (*.f64 b c) < 4.9000000000000001e114Initial program 82.5%
pow182.5%
associate-*l*78.1%
*-commutative78.1%
Applied egg-rr78.1%
unpow178.1%
associate-*l*83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in i around inf 38.0%
*-commutative38.0%
*-commutative38.0%
Simplified38.0%
if -7.60000000000000041e-157 < (*.f64 b c) < 1.3999999999999999e-234Initial program 84.3%
pow184.3%
associate-*l*85.9%
*-commutative85.9%
Applied egg-rr85.9%
unpow185.9%
associate-*l*87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in a around inf 43.2%
associate-*r*43.2%
*-commutative43.2%
*-commutative43.2%
Simplified43.2%
if 1.25e30 < (*.f64 b c) < 3.89999999999999985e108Initial program 78.4%
pow178.4%
associate-*l*83.7%
*-commutative83.7%
Applied egg-rr83.7%
unpow183.7%
associate-*l*88.8%
*-commutative88.8%
Simplified88.8%
Taylor expanded in j around inf 45.4%
associate-*r*45.6%
*-commutative45.6%
metadata-eval45.6%
distribute-rgt-neg-in45.6%
*-commutative45.6%
distribute-rgt-neg-in45.6%
metadata-eval45.6%
Simplified45.6%
Final simplification47.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* (- t) (+ (* a 4.0) (* (* y z) (* x -18.0)))))
(t_3 (+ t_1 (* -4.0 (* x i)))))
(if (<= t -1e+74)
t_2
(if (<= t -1.12e-21)
t_3
(if (<= t -2.1e-203)
(+ (* b c) t_1)
(if (<= t -2.35e-306)
t_3
(if (<= t 3.3e+90) (- (* b c) (* 27.0 (* j k))) t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -t * ((a * 4.0) + ((y * z) * (x * -18.0)));
double t_3 = t_1 + (-4.0 * (x * i));
double tmp;
if (t <= -1e+74) {
tmp = t_2;
} else if (t <= -1.12e-21) {
tmp = t_3;
} else if (t <= -2.1e-203) {
tmp = (b * c) + t_1;
} else if (t <= -2.35e-306) {
tmp = t_3;
} else if (t <= 3.3e+90) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = -t * ((a * 4.0d0) + ((y * z) * (x * (-18.0d0))))
t_3 = t_1 + ((-4.0d0) * (x * i))
if (t <= (-1d+74)) then
tmp = t_2
else if (t <= (-1.12d-21)) then
tmp = t_3
else if (t <= (-2.1d-203)) then
tmp = (b * c) + t_1
else if (t <= (-2.35d-306)) then
tmp = t_3
else if (t <= 3.3d+90) then
tmp = (b * c) - (27.0d0 * (j * k))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -t * ((a * 4.0) + ((y * z) * (x * -18.0)));
double t_3 = t_1 + (-4.0 * (x * i));
double tmp;
if (t <= -1e+74) {
tmp = t_2;
} else if (t <= -1.12e-21) {
tmp = t_3;
} else if (t <= -2.1e-203) {
tmp = (b * c) + t_1;
} else if (t <= -2.35e-306) {
tmp = t_3;
} else if (t <= 3.3e+90) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = -t * ((a * 4.0) + ((y * z) * (x * -18.0))) t_3 = t_1 + (-4.0 * (x * i)) tmp = 0 if t <= -1e+74: tmp = t_2 elif t <= -1.12e-21: tmp = t_3 elif t <= -2.1e-203: tmp = (b * c) + t_1 elif t <= -2.35e-306: tmp = t_3 elif t <= 3.3e+90: tmp = (b * c) - (27.0 * (j * k)) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(-t) * Float64(Float64(a * 4.0) + Float64(Float64(y * z) * Float64(x * -18.0)))) t_3 = Float64(t_1 + Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (t <= -1e+74) tmp = t_2; elseif (t <= -1.12e-21) tmp = t_3; elseif (t <= -2.1e-203) tmp = Float64(Float64(b * c) + t_1); elseif (t <= -2.35e-306) tmp = t_3; elseif (t <= 3.3e+90) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = -t * ((a * 4.0) + ((y * z) * (x * -18.0)));
t_3 = t_1 + (-4.0 * (x * i));
tmp = 0.0;
if (t <= -1e+74)
tmp = t_2;
elseif (t <= -1.12e-21)
tmp = t_3;
elseif (t <= -2.1e-203)
tmp = (b * c) + t_1;
elseif (t <= -2.35e-306)
tmp = t_3;
elseif (t <= 3.3e+90)
tmp = (b * c) - (27.0 * (j * k));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-t) * N[(N[(a * 4.0), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] * N[(x * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+74], t$95$2, If[LessEqual[t, -1.12e-21], t$95$3, If[LessEqual[t, -2.1e-203], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, -2.35e-306], t$95$3, If[LessEqual[t, 3.3e+90], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := \left(-t\right) \cdot \left(a \cdot 4 + \left(y \cdot z\right) \cdot \left(x \cdot -18\right)\right)\\
t_3 := t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -1 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-21}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-203}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq -2.35 \cdot 10^{-306}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+90}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -9.99999999999999952e73 or 3.30000000000000008e90 < t Initial program 80.9%
Taylor expanded in t around -inf 67.1%
associate-*r*67.1%
neg-mul-167.1%
cancel-sign-sub-inv67.1%
metadata-eval67.1%
*-commutative67.1%
associate-*r*67.1%
Simplified67.1%
if -9.99999999999999952e73 < t < -1.11999999999999998e-21 or -2.10000000000000002e-203 < t < -2.3500000000000001e-306Initial program 88.3%
Simplified97.2%
Taylor expanded in i around inf 74.6%
if -1.11999999999999998e-21 < t < -2.10000000000000002e-203Initial program 89.1%
Simplified91.2%
Taylor expanded in b around inf 62.1%
if -2.3500000000000001e-306 < t < 3.30000000000000008e90Initial program 80.1%
Simplified80.0%
Taylor expanded in x around 0 65.3%
Taylor expanded in a around 0 61.1%
Final simplification65.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* -4.0 (* x i)))))
(if (<= t -9e+72)
t_1
(if (<= t -3.7e-22)
t_3
(if (<= t -2.5e-201)
(+ (* b c) t_2)
(if (<= t -2.65e-306)
t_3
(if (<= t 8.2e+81) (- (* b c) (* 27.0 (* j k))) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (-4.0 * (x * i));
double tmp;
if (t <= -9e+72) {
tmp = t_1;
} else if (t <= -3.7e-22) {
tmp = t_3;
} else if (t <= -2.5e-201) {
tmp = (b * c) + t_2;
} else if (t <= -2.65e-306) {
tmp = t_3;
} else if (t <= 8.2e+81) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + ((-4.0d0) * (x * i))
if (t <= (-9d+72)) then
tmp = t_1
else if (t <= (-3.7d-22)) then
tmp = t_3
else if (t <= (-2.5d-201)) then
tmp = (b * c) + t_2
else if (t <= (-2.65d-306)) then
tmp = t_3
else if (t <= 8.2d+81) then
tmp = (b * c) - (27.0d0 * (j * k))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (-4.0 * (x * i));
double tmp;
if (t <= -9e+72) {
tmp = t_1;
} else if (t <= -3.7e-22) {
tmp = t_3;
} else if (t <= -2.5e-201) {
tmp = (b * c) + t_2;
} else if (t <= -2.65e-306) {
tmp = t_3;
} else if (t <= 8.2e+81) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) t_2 = j * (k * -27.0) t_3 = t_2 + (-4.0 * (x * i)) tmp = 0 if t <= -9e+72: tmp = t_1 elif t <= -3.7e-22: tmp = t_3 elif t <= -2.5e-201: tmp = (b * c) + t_2 elif t <= -2.65e-306: tmp = t_3 elif t <= 8.2e+81: tmp = (b * c) - (27.0 * (j * k)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (t <= -9e+72) tmp = t_1; elseif (t <= -3.7e-22) tmp = t_3; elseif (t <= -2.5e-201) tmp = Float64(Float64(b * c) + t_2); elseif (t <= -2.65e-306) tmp = t_3; elseif (t <= 8.2e+81) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
t_2 = j * (k * -27.0);
t_3 = t_2 + (-4.0 * (x * i));
tmp = 0.0;
if (t <= -9e+72)
tmp = t_1;
elseif (t <= -3.7e-22)
tmp = t_3;
elseif (t <= -2.5e-201)
tmp = (b * c) + t_2;
elseif (t <= -2.65e-306)
tmp = t_3;
elseif (t <= 8.2e+81)
tmp = (b * c) - (27.0 * (j * k));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+72], t$95$1, If[LessEqual[t, -3.7e-22], t$95$3, If[LessEqual[t, -2.5e-201], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t, -2.65e-306], t$95$3, If[LessEqual[t, 8.2e+81], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t\_2 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -9 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{-22}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{-201}:\\
\;\;\;\;b \cdot c + t\_2\\
\mathbf{elif}\;t \leq -2.65 \cdot 10^{-306}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+81}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.9999999999999997e72 or 8.20000000000000024e81 < t Initial program 80.9%
Simplified86.3%
Taylor expanded in t around inf 67.1%
if -8.9999999999999997e72 < t < -3.7e-22 or -2.5e-201 < t < -2.6499999999999999e-306Initial program 88.3%
Simplified97.2%
Taylor expanded in i around inf 74.6%
if -3.7e-22 < t < -2.5e-201Initial program 89.1%
Simplified91.2%
Taylor expanded in b around inf 62.1%
if -2.6499999999999999e-306 < t < 8.20000000000000024e81Initial program 80.1%
Simplified80.0%
Taylor expanded in x around 0 65.3%
Taylor expanded in a around 0 61.1%
Final simplification65.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k))))
(t_2 (* -4.0 (+ (* t a) (* x i)))))
(if (<= i -1.8e+111)
t_2
(if (<= i 6.1e+74)
t_1
(if (<= i 1.3e+135)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= i 2.5e+244) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
double t_2 = -4.0 * ((t * a) + (x * i));
double tmp;
if (i <= -1.8e+111) {
tmp = t_2;
} else if (i <= 6.1e+74) {
tmp = t_1;
} else if (i <= 1.3e+135) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (i <= 2.5e+244) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
t_2 = (-4.0d0) * ((t * a) + (x * i))
if (i <= (-1.8d+111)) then
tmp = t_2
else if (i <= 6.1d+74) then
tmp = t_1
else if (i <= 1.3d+135) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (i <= 2.5d+244) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
double t_2 = -4.0 * ((t * a) + (x * i));
double tmp;
if (i <= -1.8e+111) {
tmp = t_2;
} else if (i <= 6.1e+74) {
tmp = t_1;
} else if (i <= 1.3e+135) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (i <= 2.5e+244) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) t_2 = -4.0 * ((t * a) + (x * i)) tmp = 0 if i <= -1.8e+111: tmp = t_2 elif i <= 6.1e+74: tmp = t_1 elif i <= 1.3e+135: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif i <= 2.5e+244: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))) t_2 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) tmp = 0.0 if (i <= -1.8e+111) tmp = t_2; elseif (i <= 6.1e+74) tmp = t_1; elseif (i <= 1.3e+135) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (i <= 2.5e+244) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
t_2 = -4.0 * ((t * a) + (x * i));
tmp = 0.0;
if (i <= -1.8e+111)
tmp = t_2;
elseif (i <= 6.1e+74)
tmp = t_1;
elseif (i <= 1.3e+135)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (i <= 2.5e+244)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.8e+111], t$95$2, If[LessEqual[i, 6.1e+74], t$95$1, If[LessEqual[i, 1.3e+135], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.5e+244], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
t_2 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;i \leq -1.8 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq 6.1 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.3 \cdot 10^{+135}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;i \leq 2.5 \cdot 10^{+244}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if i < -1.8000000000000001e111 or 2.50000000000000011e244 < i Initial program 85.2%
Simplified88.9%
Taylor expanded in y around 0 88.9%
Taylor expanded in i around inf 85.2%
associate-*r*85.2%
*-commutative85.2%
associate-*r*85.2%
Simplified85.2%
Taylor expanded in b around 0 80.1%
cancel-sign-sub-inv80.1%
metadata-eval80.1%
distribute-lft-out80.1%
*-commutative80.1%
Simplified80.1%
if -1.8000000000000001e111 < i < 6.0999999999999997e74 or 1.3e135 < i < 2.50000000000000011e244Initial program 84.0%
Simplified86.5%
Taylor expanded in x around 0 70.4%
if 6.0999999999999997e74 < i < 1.3e135Initial program 58.3%
Simplified75.0%
Taylor expanded in x around inf 84.0%
Final simplification73.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= j -1.2e+127)
(+ (* 18.0 (* (* y z) (* x t))) (* j (* k -27.0)))
(if (<= j -54000000000.0)
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(if (<= j 1.65e-51)
(- (+ (* b c) (* -4.0 (* t a))) (* i (* x 4.0)))
(* k (- (+ (* -4.0 (/ (* t a) k)) (/ (* b c) k)) (* j 27.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -1.2e+127) {
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
} else if (j <= -54000000000.0) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if (j <= 1.65e-51) {
tmp = ((b * c) + (-4.0 * (t * a))) - (i * (x * 4.0));
} else {
tmp = k * (((-4.0 * ((t * a) / k)) + ((b * c) / k)) - (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (j <= (-1.2d+127)) then
tmp = (18.0d0 * ((y * z) * (x * t))) + (j * (k * (-27.0d0)))
else if (j <= (-54000000000.0d0)) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else if (j <= 1.65d-51) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (i * (x * 4.0d0))
else
tmp = k * ((((-4.0d0) * ((t * a) / k)) + ((b * c) / k)) - (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -1.2e+127) {
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
} else if (j <= -54000000000.0) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if (j <= 1.65e-51) {
tmp = ((b * c) + (-4.0 * (t * a))) - (i * (x * 4.0));
} else {
tmp = k * (((-4.0 * ((t * a) / k)) + ((b * c) / k)) - (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -1.2e+127: tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0)) elif j <= -54000000000.0: tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) elif j <= 1.65e-51: tmp = ((b * c) + (-4.0 * (t * a))) - (i * (x * 4.0)) else: tmp = k * (((-4.0 * ((t * a) / k)) + ((b * c) / k)) - (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -1.2e+127) tmp = Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) + Float64(j * Float64(k * -27.0))); elseif (j <= -54000000000.0) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); elseif (j <= 1.65e-51) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(i * Float64(x * 4.0))); else tmp = Float64(k * Float64(Float64(Float64(-4.0 * Float64(Float64(t * a) / k)) + Float64(Float64(b * c) / k)) - Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (j <= -1.2e+127)
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
elseif (j <= -54000000000.0)
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
elseif (j <= 1.65e-51)
tmp = ((b * c) + (-4.0 * (t * a))) - (i * (x * 4.0));
else
tmp = k * (((-4.0 * ((t * a) / k)) + ((b * c) / k)) - (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -1.2e+127], N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -54000000000.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[j, 1.65e-51], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] - N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.2 \cdot 10^{+127}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;j \leq -54000000000:\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;j \leq 1.65 \cdot 10^{-51}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - i \cdot \left(x \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(\left(-4 \cdot \frac{t \cdot a}{k} + \frac{b \cdot c}{k}\right) - j \cdot 27\right)\\
\end{array}
\end{array}
if j < -1.2000000000000001e127Initial program 69.0%
Simplified84.5%
Taylor expanded in y around inf 63.2%
associate-*r*66.1%
Simplified66.1%
if -1.2000000000000001e127 < j < -5.4e10Initial program 85.7%
Simplified92.8%
Taylor expanded in i around 0 93.3%
Taylor expanded in j around 0 68.6%
if -5.4e10 < j < 1.64999999999999986e-51Initial program 86.8%
Simplified90.3%
Taylor expanded in y around 0 87.5%
Taylor expanded in i around inf 84.2%
associate-*r*84.2%
*-commutative84.2%
associate-*r*84.2%
Simplified84.2%
if 1.64999999999999986e-51 < j Initial program 82.4%
Simplified82.5%
Taylor expanded in x around 0 69.5%
Taylor expanded in k around inf 60.5%
Final simplification72.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 27.0 (* j k))))
(if (or (<= t -8e+88) (not (<= t 1.1e+160)))
(- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) t_1)
(- (+ (* b c) (* -4.0 (* t a))) (+ t_1 (* 4.0 (* x i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double tmp;
if ((t <= -8e+88) || !(t <= 1.1e+160)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (4.0 * (x * i)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
if ((t <= (-8d+88)) .or. (.not. (t <= 1.1d+160))) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - t_1
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (t_1 + (4.0d0 * (x * i)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double tmp;
if ((t <= -8e+88) || !(t <= 1.1e+160)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (4.0 * (x * i)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 27.0 * (j * k) tmp = 0 if (t <= -8e+88) or not (t <= 1.1e+160): tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1 else: tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (4.0 * (x * i))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(27.0 * Float64(j * k)) tmp = 0.0 if ((t <= -8e+88) || !(t <= 1.1e+160)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(t_1 + Float64(4.0 * Float64(x * i)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 27.0 * (j * k);
tmp = 0.0;
if ((t <= -8e+88) || ~((t <= 1.1e+160)))
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
else
tmp = ((b * c) + (-4.0 * (t * a))) - (t_1 + (4.0 * (x * i)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -8e+88], N[Not[LessEqual[t, 1.1e+160]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t \leq -8 \cdot 10^{+88} \lor \neg \left(t \leq 1.1 \cdot 10^{+160}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(t\_1 + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if t < -7.99999999999999968e88 or 1.09999999999999996e160 < t Initial program 82.6%
Simplified88.0%
Taylor expanded in i around 0 84.9%
if -7.99999999999999968e88 < t < 1.09999999999999996e160Initial program 83.3%
Simplified85.6%
Taylor expanded in y around 0 87.7%
Final simplification86.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -2.6e+128) (not (<= t 3.4e+223))) (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (- (+ (* b c) (* -4.0 (* t a))) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -2.6e+128) || !(t <= 3.4e+223)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-2.6d+128)) .or. (.not. (t <= 3.4d+223))) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -2.6e+128) || !(t <= 3.4e+223)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -2.6e+128) or not (t <= 3.4e+223): tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) else: tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -2.6e+128) || !(t <= 3.4e+223)) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -2.6e+128) || ~((t <= 3.4e+223)))
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
else
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -2.6e+128], N[Not[LessEqual[t, 3.4e+223]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+128} \lor \neg \left(t \leq 3.4 \cdot 10^{+223}\right):\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if t < -2.6e128 or 3.3999999999999998e223 < t Initial program 80.9%
Simplified85.7%
Taylor expanded in i around 0 82.7%
Taylor expanded in j around 0 79.4%
if -2.6e128 < t < 3.3999999999999998e223Initial program 83.7%
Simplified86.8%
Taylor expanded in y around 0 87.0%
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.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))))
(if (<= j -1.15e+127)
(+ (* 18.0 (* (* y z) (* x t))) (* j (* k -27.0)))
(if (<= j -72000000000.0)
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(if (<= j 1.14e-51)
(- t_1 (* i (* x 4.0)))
(- t_1 (* 27.0 (* j k))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (j <= -1.15e+127) {
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
} else if (j <= -72000000000.0) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if (j <= 1.14e-51) {
tmp = t_1 - (i * (x * 4.0));
} else {
tmp = t_1 - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + ((-4.0d0) * (t * a))
if (j <= (-1.15d+127)) then
tmp = (18.0d0 * ((y * z) * (x * t))) + (j * (k * (-27.0d0)))
else if (j <= (-72000000000.0d0)) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else if (j <= 1.14d-51) then
tmp = t_1 - (i * (x * 4.0d0))
else
tmp = t_1 - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (j <= -1.15e+127) {
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
} else if (j <= -72000000000.0) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if (j <= 1.14e-51) {
tmp = t_1 - (i * (x * 4.0));
} else {
tmp = t_1 - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) tmp = 0 if j <= -1.15e+127: tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0)) elif j <= -72000000000.0: tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) elif j <= 1.14e-51: tmp = t_1 - (i * (x * 4.0)) else: tmp = t_1 - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (j <= -1.15e+127) tmp = Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) + Float64(j * Float64(k * -27.0))); elseif (j <= -72000000000.0) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); elseif (j <= 1.14e-51) tmp = Float64(t_1 - Float64(i * Float64(x * 4.0))); else tmp = Float64(t_1 - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (j <= -1.15e+127)
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
elseif (j <= -72000000000.0)
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
elseif (j <= 1.14e-51)
tmp = t_1 - (i * (x * 4.0));
else
tmp = t_1 - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.15e+127], N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -72000000000.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[j, 1.14e-51], N[(t$95$1 - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;j \leq -1.15 \cdot 10^{+127}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;j \leq -72000000000:\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;j \leq 1.14 \cdot 10^{-51}:\\
\;\;\;\;t\_1 - i \cdot \left(x \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if j < -1.1500000000000001e127Initial program 69.0%
Simplified84.5%
Taylor expanded in y around inf 63.2%
associate-*r*66.1%
Simplified66.1%
if -1.1500000000000001e127 < j < -7.2e10Initial program 85.7%
Simplified92.8%
Taylor expanded in i around 0 93.3%
Taylor expanded in j around 0 68.6%
if -7.2e10 < j < 1.1399999999999999e-51Initial program 86.8%
Simplified90.3%
Taylor expanded in y around 0 87.5%
Taylor expanded in i around inf 84.2%
associate-*r*84.2%
*-commutative84.2%
associate-*r*84.2%
Simplified84.2%
if 1.1399999999999999e-51 < j Initial program 82.4%
Simplified82.5%
Taylor expanded in x around 0 69.5%
Final simplification75.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -4.8e+41)
(+ (* b c) (* -4.0 (* t a)))
(if (<= (* b c) -9e-161)
(+ (* j (* k -27.0)) (* -4.0 (* x i)))
(if (<= (* b c) 8.8e+27)
(* -4.0 (+ (* t a) (* x i)))
(- (* b c) (* k (* j 27.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -4.8e+41) {
tmp = (b * c) + (-4.0 * (t * a));
} else if ((b * c) <= -9e-161) {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
} else if ((b * c) <= 8.8e+27) {
tmp = -4.0 * ((t * a) + (x * i));
} else {
tmp = (b * c) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-4.8d+41)) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if ((b * c) <= (-9d-161)) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
else if ((b * c) <= 8.8d+27) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else
tmp = (b * c) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -4.8e+41) {
tmp = (b * c) + (-4.0 * (t * a));
} else if ((b * c) <= -9e-161) {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
} else if ((b * c) <= 8.8e+27) {
tmp = -4.0 * ((t * a) + (x * i));
} else {
tmp = (b * c) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -4.8e+41: tmp = (b * c) + (-4.0 * (t * a)) elif (b * c) <= -9e-161: tmp = (j * (k * -27.0)) + (-4.0 * (x * i)) elif (b * c) <= 8.8e+27: tmp = -4.0 * ((t * a) + (x * i)) else: tmp = (b * c) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -4.8e+41) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (Float64(b * c) <= -9e-161) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i))); elseif (Float64(b * c) <= 8.8e+27) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); else tmp = Float64(Float64(b * c) - 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -4.8e+41)
tmp = (b * c) + (-4.0 * (t * a));
elseif ((b * c) <= -9e-161)
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
elseif ((b * c) <= 8.8e+27)
tmp = -4.0 * ((t * a) + (x * i));
else
tmp = (b * c) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -4.8e+41], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -9e-161], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.8e+27], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.8 \cdot 10^{+41}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq -9 \cdot 10^{-161}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 8.8 \cdot 10^{+27}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4.8000000000000003e41Initial program 82.8%
Simplified82.9%
Taylor expanded in x around 0 77.5%
Taylor expanded in j around 0 67.5%
if -4.8000000000000003e41 < (*.f64 b c) < -8.9999999999999993e-161Initial program 85.0%
Simplified90.1%
Taylor expanded in i around inf 64.8%
if -8.9999999999999993e-161 < (*.f64 b c) < 8.7999999999999995e27Initial program 83.8%
Simplified88.1%
Taylor expanded in y around 0 78.1%
Taylor expanded in i around inf 62.9%
associate-*r*62.9%
*-commutative62.9%
associate-*r*62.9%
Simplified62.9%
Taylor expanded in b around 0 59.4%
cancel-sign-sub-inv59.4%
metadata-eval59.4%
distribute-lft-out59.4%
*-commutative59.4%
Simplified59.4%
if 8.7999999999999995e27 < (*.f64 b c) Initial program 81.2%
Simplified85.2%
Taylor expanded in x around 0 70.4%
Taylor expanded in a around 0 63.9%
sub-neg63.9%
associate-*r*64.0%
Applied egg-rr64.0%
Final simplification63.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -1.25e+60)
(* b c)
(if (<= (* b c) 7.8e-230)
(* t (* a -4.0))
(if (<= (* b c) 6.2e+114) (* k (* j -27.0)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.25e+60) {
tmp = b * c;
} else if ((b * c) <= 7.8e-230) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 6.2e+114) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-1.25d+60)) then
tmp = b * c
else if ((b * c) <= 7.8d-230) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 6.2d+114) then
tmp = k * (j * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.25e+60) {
tmp = b * c;
} else if ((b * c) <= 7.8e-230) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 6.2e+114) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1.25e+60: tmp = b * c elif (b * c) <= 7.8e-230: tmp = t * (a * -4.0) elif (b * c) <= 6.2e+114: tmp = k * (j * -27.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1.25e+60) tmp = Float64(b * c); elseif (Float64(b * c) <= 7.8e-230) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 6.2e+114) tmp = Float64(k * Float64(j * -27.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -1.25e+60)
tmp = b * c;
elseif ((b * c) <= 7.8e-230)
tmp = t * (a * -4.0);
elseif ((b * c) <= 6.2e+114)
tmp = k * (j * -27.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1.25e+60], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7.8e-230], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.2e+114], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.25 \cdot 10^{+60}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 7.8 \cdot 10^{-230}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 6.2 \cdot 10^{+114}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.24999999999999994e60 or 6.2000000000000001e114 < (*.f64 b c) Initial program 82.4%
pow182.4%
associate-*l*77.4%
*-commutative77.4%
Applied egg-rr77.4%
unpow177.4%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in b around inf 56.8%
if -1.24999999999999994e60 < (*.f64 b c) < 7.8000000000000004e-230Initial program 84.4%
pow184.4%
associate-*l*82.1%
*-commutative82.1%
Applied egg-rr82.1%
unpow182.1%
associate-*l*86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in a around inf 33.3%
associate-*r*33.3%
*-commutative33.3%
*-commutative33.3%
Simplified33.3%
if 7.8000000000000004e-230 < (*.f64 b c) < 6.2000000000000001e114Initial program 82.0%
pow182.0%
associate-*l*81.9%
*-commutative81.9%
Applied egg-rr81.9%
unpow181.9%
associate-*l*85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in j around inf 28.4%
associate-*r*28.5%
*-commutative28.5%
metadata-eval28.5%
distribute-rgt-neg-in28.5%
*-commutative28.5%
distribute-rgt-neg-in28.5%
metadata-eval28.5%
Simplified28.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))))
(if (<= k -1e-10)
(+ (* 18.0 (* (* y z) (* x t))) (* j (* k -27.0)))
(if (<= k 6.5e+74) (- t_1 (* i (* x 4.0))) (- t_1 (* 27.0 (* j k)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (k <= -1e-10) {
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
} else if (k <= 6.5e+74) {
tmp = t_1 - (i * (x * 4.0));
} else {
tmp = t_1 - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + ((-4.0d0) * (t * a))
if (k <= (-1d-10)) then
tmp = (18.0d0 * ((y * z) * (x * t))) + (j * (k * (-27.0d0)))
else if (k <= 6.5d+74) then
tmp = t_1 - (i * (x * 4.0d0))
else
tmp = t_1 - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (k <= -1e-10) {
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
} else if (k <= 6.5e+74) {
tmp = t_1 - (i * (x * 4.0));
} else {
tmp = t_1 - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) tmp = 0 if k <= -1e-10: tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0)) elif k <= 6.5e+74: tmp = t_1 - (i * (x * 4.0)) else: tmp = t_1 - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (k <= -1e-10) tmp = Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) + Float64(j * Float64(k * -27.0))); elseif (k <= 6.5e+74) tmp = Float64(t_1 - Float64(i * Float64(x * 4.0))); else tmp = Float64(t_1 - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (k <= -1e-10)
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
elseif (k <= 6.5e+74)
tmp = t_1 - (i * (x * 4.0));
else
tmp = t_1 - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1e-10], N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.5e+74], N[(t$95$1 - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;k \leq -1 \cdot 10^{-10}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;k \leq 6.5 \cdot 10^{+74}:\\
\;\;\;\;t\_1 - i \cdot \left(x \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if k < -1.00000000000000004e-10Initial program 78.7%
Simplified84.8%
Taylor expanded in y around inf 59.8%
associate-*r*61.1%
Simplified61.1%
if -1.00000000000000004e-10 < k < 6.49999999999999962e74Initial program 86.6%
Simplified88.6%
Taylor expanded in y around 0 81.0%
Taylor expanded in i around inf 77.0%
associate-*r*77.0%
*-commutative77.0%
associate-*r*77.0%
Simplified77.0%
if 6.49999999999999962e74 < k Initial program 77.4%
Simplified81.9%
Taylor expanded in x around 0 76.9%
Final simplification72.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -4.5e+83) (not (<= (* b c) 1.4e+29))) (+ (* b c) (* j (* k -27.0))) (* -4.0 (+ (* t a) (* x i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.5e+83) || !((b * c) <= 1.4e+29)) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-4.5d+83)) .or. (.not. ((b * c) <= 1.4d+29))) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = (-4.0d0) * ((t * a) + (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.5e+83) || !((b * c) <= 1.4e+29)) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -4.5e+83) or not ((b * c) <= 1.4e+29): tmp = (b * c) + (j * (k * -27.0)) else: tmp = -4.0 * ((t * a) + (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -4.5e+83) || !(Float64(b * c) <= 1.4e+29)) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -4.5e+83) || ~(((b * c) <= 1.4e+29)))
tmp = (b * c) + (j * (k * -27.0));
else
tmp = -4.0 * ((t * a) + (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -4.5e+83], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.4e+29]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.5 \cdot 10^{+83} \lor \neg \left(b \cdot c \leq 1.4 \cdot 10^{+29}\right):\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4.4999999999999999e83 or 1.4e29 < (*.f64 b c) Initial program 82.7%
Simplified88.0%
Taylor expanded in b around inf 66.7%
if -4.4999999999999999e83 < (*.f64 b c) < 1.4e29Initial program 83.3%
Simplified88.1%
Taylor expanded in y around 0 78.3%
Taylor expanded in i around inf 61.0%
associate-*r*61.0%
*-commutative61.0%
associate-*r*61.0%
Simplified61.0%
Taylor expanded in b around 0 57.2%
cancel-sign-sub-inv57.2%
metadata-eval57.2%
distribute-lft-out57.2%
*-commutative57.2%
Simplified57.2%
Final simplification61.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -9.2e+76) (not (<= (* b c) 1.85e+109))) (+ (* b c) (* -4.0 (* t a))) (* -4.0 (+ (* t a) (* x i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -9.2e+76) || !((b * c) <= 1.85e+109)) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-9.2d+76)) .or. (.not. ((b * c) <= 1.85d+109))) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = (-4.0d0) * ((t * a) + (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -9.2e+76) || !((b * c) <= 1.85e+109)) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -9.2e+76) or not ((b * c) <= 1.85e+109): tmp = (b * c) + (-4.0 * (t * a)) else: tmp = -4.0 * ((t * a) + (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -9.2e+76) || !(Float64(b * c) <= 1.85e+109)) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -9.2e+76) || ~(((b * c) <= 1.85e+109)))
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = -4.0 * ((t * a) + (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -9.2e+76], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.85e+109]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -9.2 \cdot 10^{+76} \lor \neg \left(b \cdot c \leq 1.85 \cdot 10^{+109}\right):\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -9.20000000000000005e76 or 1.8500000000000001e109 < (*.f64 b c) Initial program 83.7%
Simplified84.8%
Taylor expanded in x around 0 75.6%
Taylor expanded in j around 0 66.5%
if -9.20000000000000005e76 < (*.f64 b c) < 1.8500000000000001e109Initial program 82.6%
Simplified87.6%
Taylor expanded in y around 0 78.0%
Taylor expanded in i around inf 59.0%
associate-*r*59.0%
*-commutative59.0%
associate-*r*59.0%
Simplified59.0%
Taylor expanded in b around 0 54.4%
cancel-sign-sub-inv54.4%
metadata-eval54.4%
distribute-lft-out54.4%
*-commutative54.4%
Simplified54.4%
Final simplification59.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -5.5e+86) (not (<= (* b c) 6e+115))) (* b c) (* -4.0 (+ (* t a) (* x i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -5.5e+86) || !((b * c) <= 6e+115)) {
tmp = b * c;
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-5.5d+86)) .or. (.not. ((b * c) <= 6d+115))) then
tmp = b * c
else
tmp = (-4.0d0) * ((t * a) + (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -5.5e+86) || !((b * c) <= 6e+115)) {
tmp = b * c;
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -5.5e+86) or not ((b * c) <= 6e+115): tmp = b * c else: tmp = -4.0 * ((t * a) + (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -5.5e+86) || !(Float64(b * c) <= 6e+115)) tmp = Float64(b * c); else tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -5.5e+86) || ~(((b * c) <= 6e+115)))
tmp = b * c;
else
tmp = -4.0 * ((t * a) + (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -5.5e+86], N[Not[LessEqual[N[(b * c), $MachinePrecision], 6e+115]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5.5 \cdot 10^{+86} \lor \neg \left(b \cdot c \leq 6 \cdot 10^{+115}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -5.5000000000000002e86 or 6.0000000000000001e115 < (*.f64 b c) Initial program 83.4%
pow183.4%
associate-*l*78.1%
*-commutative78.1%
Applied egg-rr78.1%
unpow178.1%
associate-*l*80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in b around inf 58.9%
if -5.5000000000000002e86 < (*.f64 b c) < 6.0000000000000001e115Initial program 82.8%
Simplified87.7%
Taylor expanded in y around 0 78.3%
Taylor expanded in i around inf 59.5%
associate-*r*59.5%
*-commutative59.5%
associate-*r*59.5%
Simplified59.5%
Taylor expanded in b around 0 54.3%
cancel-sign-sub-inv54.3%
metadata-eval54.3%
distribute-lft-out54.3%
*-commutative54.3%
Simplified54.3%
Final simplification56.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -7.5e+84)
(+ (* b c) (* j (* k -27.0)))
(if (<= (* b c) 2.55e+29)
(* -4.0 (+ (* t a) (* x i)))
(- (* b c) (* k (* j 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -7.5e+84) {
tmp = (b * c) + (j * (k * -27.0));
} else if ((b * c) <= 2.55e+29) {
tmp = -4.0 * ((t * a) + (x * i));
} else {
tmp = (b * c) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-7.5d+84)) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if ((b * c) <= 2.55d+29) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else
tmp = (b * c) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -7.5e+84) {
tmp = (b * c) + (j * (k * -27.0));
} else if ((b * c) <= 2.55e+29) {
tmp = -4.0 * ((t * a) + (x * i));
} else {
tmp = (b * c) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -7.5e+84: tmp = (b * c) + (j * (k * -27.0)) elif (b * c) <= 2.55e+29: tmp = -4.0 * ((t * a) + (x * i)) else: tmp = (b * c) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -7.5e+84) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (Float64(b * c) <= 2.55e+29) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); else tmp = Float64(Float64(b * c) - 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -7.5e+84)
tmp = (b * c) + (j * (k * -27.0));
elseif ((b * c) <= 2.55e+29)
tmp = -4.0 * ((t * a) + (x * i));
else
tmp = (b * c) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -7.5e+84], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.55e+29], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -7.5 \cdot 10^{+84}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 2.55 \cdot 10^{+29}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -7.5000000000000001e84Initial program 85.5%
Simplified88.1%
Taylor expanded in b around inf 71.6%
if -7.5000000000000001e84 < (*.f64 b c) < 2.55e29Initial program 83.3%
Simplified88.1%
Taylor expanded in y around 0 78.3%
Taylor expanded in i around inf 61.0%
associate-*r*61.0%
*-commutative61.0%
associate-*r*61.0%
Simplified61.0%
Taylor expanded in b around 0 57.2%
cancel-sign-sub-inv57.2%
metadata-eval57.2%
distribute-lft-out57.2%
*-commutative57.2%
Simplified57.2%
if 2.55e29 < (*.f64 b c) Initial program 81.2%
Simplified85.2%
Taylor expanded in x around 0 70.4%
Taylor expanded in a around 0 63.9%
sub-neg63.9%
associate-*r*64.0%
Applied egg-rr64.0%
Final simplification61.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -4.5e+59) (not (<= (* b c) 5.8e+112))) (* b c) (* k (* j -27.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.5e+59) || !((b * c) <= 5.8e+112)) {
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.
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) <= (-4.5d+59)) .or. (.not. ((b * c) <= 5.8d+112))) 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;
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) <= -4.5e+59) || !((b * c) <= 5.8e+112)) {
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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -4.5e+59) or not ((b * c) <= 5.8e+112): 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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -4.5e+59) || !(Float64(b * c) <= 5.8e+112)) 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -4.5e+59) || ~(((b * c) <= 5.8e+112)))
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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -4.5e+59], N[Not[LessEqual[N[(b * c), $MachinePrecision], 5.8e+112]], $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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.5 \cdot 10^{+59} \lor \neg \left(b \cdot c \leq 5.8 \cdot 10^{+112}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4.49999999999999959e59 or 5.8000000000000004e112 < (*.f64 b c) Initial program 82.4%
pow182.4%
associate-*l*77.4%
*-commutative77.4%
Applied egg-rr77.4%
unpow177.4%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in b around inf 56.8%
if -4.49999999999999959e59 < (*.f64 b c) < 5.8000000000000004e112Initial program 83.4%
pow183.4%
associate-*l*82.0%
*-commutative82.0%
Applied egg-rr82.0%
unpow182.0%
associate-*l*85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in j around inf 27.8%
associate-*r*27.8%
*-commutative27.8%
metadata-eval27.8%
distribute-rgt-neg-in27.8%
*-commutative27.8%
distribute-rgt-neg-in27.8%
metadata-eval27.8%
Simplified27.8%
Final simplification39.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -4.5e+60) (not (<= (* b c) 2.4e+115))) (* b c) (* (* j k) -27.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.5e+60) || !((b * c) <= 2.4e+115)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-4.5d+60)) .or. (.not. ((b * c) <= 2.4d+115))) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.5e+60) || !((b * c) <= 2.4e+115)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -4.5e+60) or not ((b * c) <= 2.4e+115): tmp = b * c else: tmp = (j * k) * -27.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -4.5e+60) || !(Float64(b * c) <= 2.4e+115)) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -4.5e+60) || ~(((b * c) <= 2.4e+115)))
tmp = b * c;
else
tmp = (j * k) * -27.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -4.5e+60], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.4e+115]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.5 \cdot 10^{+60} \lor \neg \left(b \cdot c \leq 2.4 \cdot 10^{+115}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -4.50000000000000013e60 or 2.4e115 < (*.f64 b c) Initial program 82.4%
pow182.4%
associate-*l*77.4%
*-commutative77.4%
Applied egg-rr77.4%
unpow177.4%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in b around inf 56.8%
if -4.50000000000000013e60 < (*.f64 b c) < 2.4e115Initial program 83.4%
Simplified87.9%
Taylor expanded in j around inf 27.8%
Final simplification39.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 83.0%
pow183.0%
associate-*l*80.2%
*-commutative80.2%
Applied egg-rr80.2%
unpow180.2%
associate-*l*83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in b around inf 26.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024101
(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)))