
(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 32 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(+ (* b c) (* y (+ (* 18.0 (* t (* x z))) (* (/ (* t a) y) -4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
(t_2
(-
(-
(+ (* b c) (- (* t (* z (* y (* 18.0 x)))) (* t (* 4.0 a))))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 1e+308)
t_2
(if (<= t_2 INFINITY)
t_1
(* 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 t_1 = ((b * c) + (y * ((18.0 * (t * (x * z))) + (((t * a) / y) * -4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
double t_2 = (((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (4.0 * a)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= 1e+308) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_1;
} 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 t_1 = ((b * c) + (y * ((18.0 * (t * (x * z))) + (((t * a) / y) * -4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
double t_2 = (((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (4.0 * a)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= 1e+308) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} 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): t_1 = ((b * c) + (y * ((18.0 * (t * (x * z))) + (((t * a) / y) * -4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) t_2 = (((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (4.0 * a)))) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= 1e+308: tmp = t_2 elif t_2 <= math.inf: tmp = t_1 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) t_1 = Float64(Float64(Float64(b * c) + Float64(y * Float64(Float64(18.0 * Float64(t * Float64(x * z))) + Float64(Float64(Float64(t * a) / y) * -4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))) t_2 = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(18.0 * x)))) - Float64(t * Float64(4.0 * a)))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= 1e+308) tmp = t_2; elseif (t_2 <= Inf) tmp = t_1; 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)
t_1 = ((b * c) + (y * ((18.0 * (t * (x * z))) + (((t * a) / y) * -4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
t_2 = (((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (4.0 * a)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_2 <= -Inf)
tmp = t_1;
elseif (t_2 <= 1e+308)
tmp = t_2;
elseif (t_2 <= Inf)
tmp = t_1;
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_] := Block[{t$95$1 = N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * a), $MachinePrecision] / y), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 1e+308], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$1, 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}
t_1 := \left(b \cdot c + y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right) + \frac{t \cdot a}{y} \cdot -4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
t_2 := \left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(18 \cdot x\right)\right)\right) - t \cdot \left(4 \cdot a\right)\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+308}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_1\\
\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.0 or 1e308 < (-.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 90.2%
Simplified92.9%
Taylor expanded in y around inf 98.1%
if -inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < 1e308Initial program 99.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%
Simplified19.0%
Taylor expanded in x around inf 71.5%
Final simplification96.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 (<= y -1.2e+154)
(-
(-
(* y (- (+ (* 18.0 (* t (* x z))) (/ (* b c) y)) (* 4.0 (/ (* t a) y))))
(* (* x 4.0) i))
(* (* j 27.0) k))
(+
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* i -4.0))))
(* j (* k -27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -1.2e+154) {
tmp = ((y * (((18.0 * (t * (x * z))) + ((b * c) / y)) - (4.0 * ((t * a) / y)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (i * -4.0)))) + (j * (k * -27.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -1.2e+154) tmp = Float64(Float64(Float64(y * Float64(Float64(Float64(18.0 * Float64(t * Float64(x * z))) + Float64(Float64(b * c) / y)) - Float64(4.0 * Float64(Float64(t * a) / y)))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(i * -4.0)))) + Float64(j * Float64(k * -27.0))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -1.2e+154], N[(N[(N[(y * N[(N[(N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+154}:\\
\;\;\;\;\left(y \cdot \left(\left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right) + \frac{b \cdot c}{y}\right) - 4 \cdot \frac{t \cdot a}{y}\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if y < -1.20000000000000007e154Initial program 74.0%
Taylor expanded in y around inf 97.2%
if -1.20000000000000007e154 < y Initial program 89.9%
Simplified92.3%
Final simplification93.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))
(t_2
(-
(+ (* b c) (- (* t (* z (* y (* 18.0 x)))) (* t (* 4.0 a))))
(* (* x 4.0) i)))
(t_3 (* (* j 27.0) k)))
(if (<= t_2 (- INFINITY))
(- (- (+ (* b c) t_1) (* 4.0 (* t a))) t_3)
(if (<= t_2 5e+254)
(- t_2 t_3)
(if (<= t_2 INFINITY)
(-
(*
y
(+ (+ (* 18.0 (* t (* x z))) (/ (* b c) y)) (* (/ (* t a) y) -4.0)))
(* 4.0 (* x i)))
t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double t_2 = ((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (4.0 * a)))) - ((x * 4.0) * i);
double t_3 = (j * 27.0) * k;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (((b * c) + t_1) - (4.0 * (t * a))) - t_3;
} else if (t_2 <= 5e+254) {
tmp = t_2 - t_3;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (y * (((18.0 * (t * (x * z))) + ((b * c) / y)) + (((t * a) / y) * -4.0))) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double t_2 = ((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (4.0 * a)))) - ((x * 4.0) * i);
double t_3 = (j * 27.0) * k;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (((b * c) + t_1) - (4.0 * (t * a))) - t_3;
} else if (t_2 <= 5e+254) {
tmp = t_2 - t_3;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (y * (((18.0 * (t * (x * z))) + ((b * c) / y)) + (((t * a) / y) * -4.0))) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) t_2 = ((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (4.0 * a)))) - ((x * 4.0) * i) t_3 = (j * 27.0) * k tmp = 0 if t_2 <= -math.inf: tmp = (((b * c) + t_1) - (4.0 * (t * a))) - t_3 elif t_2 <= 5e+254: tmp = t_2 - t_3 elif t_2 <= math.inf: tmp = (y * (((18.0 * (t * (x * z))) + ((b * c) / y)) + (((t * a) / y) * -4.0))) - (4.0 * (x * i)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) t_2 = Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(18.0 * x)))) - Float64(t * Float64(4.0 * a)))) - Float64(Float64(x * 4.0) * i)) t_3 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(Float64(Float64(b * c) + t_1) - Float64(4.0 * Float64(t * a))) - t_3); elseif (t_2 <= 5e+254) tmp = Float64(t_2 - t_3); elseif (t_2 <= Inf) tmp = Float64(Float64(y * Float64(Float64(Float64(18.0 * Float64(t * Float64(x * z))) + Float64(Float64(b * c) / y)) + Float64(Float64(Float64(t * a) / y) * -4.0))) - Float64(4.0 * Float64(x * i))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
t_2 = ((b * c) + ((t * (z * (y * (18.0 * x)))) - (t * (4.0 * a)))) - ((x * 4.0) * i);
t_3 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -Inf)
tmp = (((b * c) + t_1) - (4.0 * (t * a))) - t_3;
elseif (t_2 <= 5e+254)
tmp = t_2 - t_3;
elseif (t_2 <= Inf)
tmp = (y * (((18.0 * (t * (x * z))) + ((b * c) / y)) + (((t * a) / y) * -4.0))) - (4.0 * (x * i));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t$95$2, 5e+254], N[(t$95$2 - t$95$3), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(y * N[(N[(N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * a), $MachinePrecision] / y), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
t_2 := \left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(18 \cdot x\right)\right)\right) - t \cdot \left(4 \cdot a\right)\right)\right) - \left(x \cdot 4\right) \cdot i\\
t_3 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\left(\left(b \cdot c + t\_1\right) - 4 \cdot \left(t \cdot a\right)\right) - t\_3\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+254}:\\
\;\;\;\;t\_2 - t\_3\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;y \cdot \left(\left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right) + \frac{b \cdot c}{y}\right) + \frac{t \cdot a}{y} \cdot -4\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < -inf.0Initial program 80.4%
Taylor expanded in x around 0 89.1%
if -inf.0 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < 4.99999999999999994e254Initial program 99.8%
if 4.99999999999999994e254 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < +inf.0Initial program 88.7%
Simplified88.7%
Taylor expanded in j around 0 88.9%
Taylor expanded in y around inf 87.3%
if +inf.0 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) Initial program 0.0%
Simplified25.0%
Taylor expanded in x around inf 75.2%
Final simplification93.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 (* t (* a -4.0))) (t_2 (* 18.0 (* t (* x (* y z))))))
(if (<= (* b c) -1.62e+152)
(* b c)
(if (<= (* b c) -2.4e+29)
t_1
(if (<= (* b c) -5e-69)
(* -27.0 (* j k))
(if (<= (* b c) -4.15e-190)
t_1
(if (<= (* b c) 7e-184)
t_2
(if (<= (* b c) 1.6e-109)
t_1
(if (<= (* b c) 1.9e+129) t_2 (* 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 = t * (a * -4.0);
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if ((b * c) <= -1.62e+152) {
tmp = b * c;
} else if ((b * c) <= -2.4e+29) {
tmp = t_1;
} else if ((b * c) <= -5e-69) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= -4.15e-190) {
tmp = t_1;
} else if ((b * c) <= 7e-184) {
tmp = t_2;
} else if ((b * c) <= 1.6e-109) {
tmp = t_1;
} else if ((b * c) <= 1.9e+129) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
t_2 = 18.0d0 * (t * (x * (y * z)))
if ((b * c) <= (-1.62d+152)) then
tmp = b * c
else if ((b * c) <= (-2.4d+29)) then
tmp = t_1
else if ((b * c) <= (-5d-69)) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= (-4.15d-190)) then
tmp = t_1
else if ((b * c) <= 7d-184) then
tmp = t_2
else if ((b * c) <= 1.6d-109) then
tmp = t_1
else if ((b * c) <= 1.9d+129) then
tmp = t_2
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 = t * (a * -4.0);
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if ((b * c) <= -1.62e+152) {
tmp = b * c;
} else if ((b * c) <= -2.4e+29) {
tmp = t_1;
} else if ((b * c) <= -5e-69) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= -4.15e-190) {
tmp = t_1;
} else if ((b * c) <= 7e-184) {
tmp = t_2;
} else if ((b * c) <= 1.6e-109) {
tmp = t_1;
} else if ((b * c) <= 1.9e+129) {
tmp = t_2;
} 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 = t * (a * -4.0) t_2 = 18.0 * (t * (x * (y * z))) tmp = 0 if (b * c) <= -1.62e+152: tmp = b * c elif (b * c) <= -2.4e+29: tmp = t_1 elif (b * c) <= -5e-69: tmp = -27.0 * (j * k) elif (b * c) <= -4.15e-190: tmp = t_1 elif (b * c) <= 7e-184: tmp = t_2 elif (b * c) <= 1.6e-109: tmp = t_1 elif (b * c) <= 1.9e+129: tmp = t_2 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(t * Float64(a * -4.0)) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (Float64(b * c) <= -1.62e+152) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.4e+29) tmp = t_1; elseif (Float64(b * c) <= -5e-69) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= -4.15e-190) tmp = t_1; elseif (Float64(b * c) <= 7e-184) tmp = t_2; elseif (Float64(b * c) <= 1.6e-109) tmp = t_1; elseif (Float64(b * c) <= 1.9e+129) tmp = t_2; 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 = t * (a * -4.0);
t_2 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if ((b * c) <= -1.62e+152)
tmp = b * c;
elseif ((b * c) <= -2.4e+29)
tmp = t_1;
elseif ((b * c) <= -5e-69)
tmp = -27.0 * (j * k);
elseif ((b * c) <= -4.15e-190)
tmp = t_1;
elseif ((b * c) <= 7e-184)
tmp = t_2;
elseif ((b * c) <= 1.6e-109)
tmp = t_1;
elseif ((b * c) <= 1.9e+129)
tmp = t_2;
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[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.62e+152], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.4e+29], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -5e-69], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -4.15e-190], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 7e-184], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.6e-109], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.9e+129], t$95$2, 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 := t \cdot \left(a \cdot -4\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -1.62 \cdot 10^{+152}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.4 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-69}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq -4.15 \cdot 10^{-190}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 7 \cdot 10^{-184}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.6 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.9 \cdot 10^{+129}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.6200000000000001e152 or 1.90000000000000003e129 < (*.f64 b c) Initial program 83.2%
Simplified82.0%
Taylor expanded in c around inf 84.8%
Taylor expanded in c around inf 70.5%
if -1.6200000000000001e152 < (*.f64 b c) < -2.4000000000000001e29 or -5.00000000000000033e-69 < (*.f64 b c) < -4.15000000000000002e-190 or 6.99999999999999962e-184 < (*.f64 b c) < 1.6000000000000001e-109Initial program 87.2%
Simplified87.3%
Taylor expanded in c around inf 73.0%
Taylor expanded in a around inf 47.4%
*-commutative47.4%
*-commutative47.4%
associate-*r*47.4%
Simplified47.4%
if -2.4000000000000001e29 < (*.f64 b c) < -5.00000000000000033e-69Initial program 93.4%
Simplified99.6%
Taylor expanded in j around inf 51.0%
if -4.15000000000000002e-190 < (*.f64 b c) < 6.99999999999999962e-184 or 1.6000000000000001e-109 < (*.f64 b c) < 1.90000000000000003e129Initial program 90.1%
Simplified92.8%
Taylor expanded in c around inf 71.0%
Taylor expanded in y around inf 32.9%
Final simplification48.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))) (t_2 (* 18.0 (* t (* x (* y z))))))
(if (<= (* b c) -2e+153)
(* b c)
(if (<= (* b c) -2e+31)
t_1
(if (<= (* b c) -1e-66)
(* c (* -27.0 (/ (* j k) c)))
(if (<= (* b c) -2e-186)
t_1
(if (<= (* b c) 5e-184)
t_2
(if (<= (* b c) 2e-109)
t_1
(if (<= (* b c) 2e+129) t_2 (* 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 = t * (a * -4.0);
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if ((b * c) <= -2e+153) {
tmp = b * c;
} else if ((b * c) <= -2e+31) {
tmp = t_1;
} else if ((b * c) <= -1e-66) {
tmp = c * (-27.0 * ((j * k) / c));
} else if ((b * c) <= -2e-186) {
tmp = t_1;
} else if ((b * c) <= 5e-184) {
tmp = t_2;
} else if ((b * c) <= 2e-109) {
tmp = t_1;
} else if ((b * c) <= 2e+129) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
t_2 = 18.0d0 * (t * (x * (y * z)))
if ((b * c) <= (-2d+153)) then
tmp = b * c
else if ((b * c) <= (-2d+31)) then
tmp = t_1
else if ((b * c) <= (-1d-66)) then
tmp = c * ((-27.0d0) * ((j * k) / c))
else if ((b * c) <= (-2d-186)) then
tmp = t_1
else if ((b * c) <= 5d-184) then
tmp = t_2
else if ((b * c) <= 2d-109) then
tmp = t_1
else if ((b * c) <= 2d+129) then
tmp = t_2
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 = t * (a * -4.0);
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if ((b * c) <= -2e+153) {
tmp = b * c;
} else if ((b * c) <= -2e+31) {
tmp = t_1;
} else if ((b * c) <= -1e-66) {
tmp = c * (-27.0 * ((j * k) / c));
} else if ((b * c) <= -2e-186) {
tmp = t_1;
} else if ((b * c) <= 5e-184) {
tmp = t_2;
} else if ((b * c) <= 2e-109) {
tmp = t_1;
} else if ((b * c) <= 2e+129) {
tmp = t_2;
} 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 = t * (a * -4.0) t_2 = 18.0 * (t * (x * (y * z))) tmp = 0 if (b * c) <= -2e+153: tmp = b * c elif (b * c) <= -2e+31: tmp = t_1 elif (b * c) <= -1e-66: tmp = c * (-27.0 * ((j * k) / c)) elif (b * c) <= -2e-186: tmp = t_1 elif (b * c) <= 5e-184: tmp = t_2 elif (b * c) <= 2e-109: tmp = t_1 elif (b * c) <= 2e+129: tmp = t_2 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(t * Float64(a * -4.0)) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (Float64(b * c) <= -2e+153) tmp = Float64(b * c); elseif (Float64(b * c) <= -2e+31) tmp = t_1; elseif (Float64(b * c) <= -1e-66) tmp = Float64(c * Float64(-27.0 * Float64(Float64(j * k) / c))); elseif (Float64(b * c) <= -2e-186) tmp = t_1; elseif (Float64(b * c) <= 5e-184) tmp = t_2; elseif (Float64(b * c) <= 2e-109) tmp = t_1; elseif (Float64(b * c) <= 2e+129) tmp = t_2; 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 = t * (a * -4.0);
t_2 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if ((b * c) <= -2e+153)
tmp = b * c;
elseif ((b * c) <= -2e+31)
tmp = t_1;
elseif ((b * c) <= -1e-66)
tmp = c * (-27.0 * ((j * k) / c));
elseif ((b * c) <= -2e-186)
tmp = t_1;
elseif ((b * c) <= 5e-184)
tmp = t_2;
elseif ((b * c) <= 2e-109)
tmp = t_1;
elseif ((b * c) <= 2e+129)
tmp = t_2;
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[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+153], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e+31], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1e-66], N[(c * N[(-27.0 * N[(N[(j * k), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-186], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5e-184], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 2e-109], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2e+129], t$95$2, 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 := t \cdot \left(a \cdot -4\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+153}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-66}:\\
\;\;\;\;c \cdot \left(-27 \cdot \frac{j \cdot k}{c}\right)\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-184}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+129}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2e153 or 2e129 < (*.f64 b c) Initial program 83.2%
Simplified82.0%
Taylor expanded in c around inf 84.8%
Taylor expanded in c around inf 70.5%
if -2e153 < (*.f64 b c) < -1.9999999999999999e31 or -9.9999999999999998e-67 < (*.f64 b c) < -1.9999999999999998e-186 or 5.00000000000000003e-184 < (*.f64 b c) < 2e-109Initial program 87.2%
Simplified87.3%
Taylor expanded in c around inf 73.0%
Taylor expanded in a around inf 47.4%
*-commutative47.4%
*-commutative47.4%
associate-*r*47.4%
Simplified47.4%
if -1.9999999999999999e31 < (*.f64 b c) < -9.9999999999999998e-67Initial program 93.4%
Simplified99.6%
Taylor expanded in c around inf 87.6%
Taylor expanded in x around 0 75.3%
Taylor expanded in j around inf 51.1%
if -1.9999999999999998e-186 < (*.f64 b c) < 5.00000000000000003e-184 or 2e-109 < (*.f64 b c) < 2e129Initial program 90.1%
Simplified92.8%
Taylor expanded in c around inf 71.0%
Taylor expanded in y around inf 32.9%
Final simplification48.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= (* b c) -2e+153)
(* b c)
(if (<= (* b c) -2e+31)
t_1
(if (<= (* b c) -1e-66)
(* c (* -27.0 (/ (* j k) c)))
(if (<= (* b c) -2e-186)
t_1
(if (<= (* b c) 5e-184)
(* 18.0 (* t (* x (* y z))))
(if (<= (* b c) 2e-109)
t_1
(if (<= (* b c) 2e+129)
(* t (* (* 18.0 z) (* y x)))
(* 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 = t * (a * -4.0);
double tmp;
if ((b * c) <= -2e+153) {
tmp = b * c;
} else if ((b * c) <= -2e+31) {
tmp = t_1;
} else if ((b * c) <= -1e-66) {
tmp = c * (-27.0 * ((j * k) / c));
} else if ((b * c) <= -2e-186) {
tmp = t_1;
} else if ((b * c) <= 5e-184) {
tmp = 18.0 * (t * (x * (y * z)));
} else if ((b * c) <= 2e-109) {
tmp = t_1;
} else if ((b * c) <= 2e+129) {
tmp = t * ((18.0 * z) * (y * x));
} 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 = t * (a * (-4.0d0))
if ((b * c) <= (-2d+153)) then
tmp = b * c
else if ((b * c) <= (-2d+31)) then
tmp = t_1
else if ((b * c) <= (-1d-66)) then
tmp = c * ((-27.0d0) * ((j * k) / c))
else if ((b * c) <= (-2d-186)) then
tmp = t_1
else if ((b * c) <= 5d-184) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if ((b * c) <= 2d-109) then
tmp = t_1
else if ((b * c) <= 2d+129) then
tmp = t * ((18.0d0 * z) * (y * x))
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 = t * (a * -4.0);
double tmp;
if ((b * c) <= -2e+153) {
tmp = b * c;
} else if ((b * c) <= -2e+31) {
tmp = t_1;
} else if ((b * c) <= -1e-66) {
tmp = c * (-27.0 * ((j * k) / c));
} else if ((b * c) <= -2e-186) {
tmp = t_1;
} else if ((b * c) <= 5e-184) {
tmp = 18.0 * (t * (x * (y * z)));
} else if ((b * c) <= 2e-109) {
tmp = t_1;
} else if ((b * c) <= 2e+129) {
tmp = t * ((18.0 * z) * (y * x));
} 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 = t * (a * -4.0) tmp = 0 if (b * c) <= -2e+153: tmp = b * c elif (b * c) <= -2e+31: tmp = t_1 elif (b * c) <= -1e-66: tmp = c * (-27.0 * ((j * k) / c)) elif (b * c) <= -2e-186: tmp = t_1 elif (b * c) <= 5e-184: tmp = 18.0 * (t * (x * (y * z))) elif (b * c) <= 2e-109: tmp = t_1 elif (b * c) <= 2e+129: tmp = t * ((18.0 * z) * (y * x)) 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(t * Float64(a * -4.0)) tmp = 0.0 if (Float64(b * c) <= -2e+153) tmp = Float64(b * c); elseif (Float64(b * c) <= -2e+31) tmp = t_1; elseif (Float64(b * c) <= -1e-66) tmp = Float64(c * Float64(-27.0 * Float64(Float64(j * k) / c))); elseif (Float64(b * c) <= -2e-186) tmp = t_1; elseif (Float64(b * c) <= 5e-184) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (Float64(b * c) <= 2e-109) tmp = t_1; elseif (Float64(b * c) <= 2e+129) tmp = Float64(t * Float64(Float64(18.0 * z) * Float64(y * x))); 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 = t * (a * -4.0);
tmp = 0.0;
if ((b * c) <= -2e+153)
tmp = b * c;
elseif ((b * c) <= -2e+31)
tmp = t_1;
elseif ((b * c) <= -1e-66)
tmp = c * (-27.0 * ((j * k) / c));
elseif ((b * c) <= -2e-186)
tmp = t_1;
elseif ((b * c) <= 5e-184)
tmp = 18.0 * (t * (x * (y * z)));
elseif ((b * c) <= 2e-109)
tmp = t_1;
elseif ((b * c) <= 2e+129)
tmp = t * ((18.0 * z) * (y * x));
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[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+153], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e+31], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1e-66], N[(c * N[(-27.0 * N[(N[(j * k), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-186], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5e-184], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e-109], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2e+129], N[(t * N[(N[(18.0 * z), $MachinePrecision] * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+153}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-66}:\\
\;\;\;\;c \cdot \left(-27 \cdot \frac{j \cdot k}{c}\right)\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-184}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+129}:\\
\;\;\;\;t \cdot \left(\left(18 \cdot z\right) \cdot \left(y \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2e153 or 2e129 < (*.f64 b c) Initial program 83.2%
Simplified82.0%
Taylor expanded in c around inf 84.8%
Taylor expanded in c around inf 70.5%
if -2e153 < (*.f64 b c) < -1.9999999999999999e31 or -9.9999999999999998e-67 < (*.f64 b c) < -1.9999999999999998e-186 or 5.00000000000000003e-184 < (*.f64 b c) < 2e-109Initial program 87.2%
Simplified87.3%
Taylor expanded in c around inf 73.0%
Taylor expanded in a around inf 47.4%
*-commutative47.4%
*-commutative47.4%
associate-*r*47.4%
Simplified47.4%
if -1.9999999999999999e31 < (*.f64 b c) < -9.9999999999999998e-67Initial program 93.4%
Simplified99.6%
Taylor expanded in c around inf 87.6%
Taylor expanded in x around 0 75.3%
Taylor expanded in j around inf 51.1%
if -1.9999999999999998e-186 < (*.f64 b c) < 5.00000000000000003e-184Initial program 96.1%
Simplified98.0%
Taylor expanded in c around inf 68.7%
Taylor expanded in y around inf 31.0%
if 2e-109 < (*.f64 b c) < 2e129Initial program 84.5%
Simplified88.1%
Taylor expanded in c around inf 73.1%
Taylor expanded in y around inf 34.7%
*-commutative34.7%
associate-*r*34.7%
associate-*r*36.3%
*-commutative36.3%
associate-*r*36.4%
Simplified36.4%
Final simplification48.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* x (* y z)))
(t_3 (+ t_1 (* 18.0 (* t t_2))))
(t_4 (- (* b c) (* 4.0 (* x i))))
(t_5 (* t (- (* 18.0 t_2) (* 4.0 a)))))
(if (<= t -4e-50)
t_5
(if (<= t -2.9e-271)
(+ (* b c) t_1)
(if (<= t 7e-32)
t_4
(if (<= t 3.2e+50)
t_5
(if (<= t 2e+87)
t_4
(if (<= t 1.5e+116)
t_3
(if (<= t 5.6e+161)
(* c (+ b (* -4.0 (/ (* t a) c))))
(if (<= t 6.9e+186) t_3 t_5))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = x * (y * z);
double t_3 = t_1 + (18.0 * (t * t_2));
double t_4 = (b * c) - (4.0 * (x * i));
double t_5 = t * ((18.0 * t_2) - (4.0 * a));
double tmp;
if (t <= -4e-50) {
tmp = t_5;
} else if (t <= -2.9e-271) {
tmp = (b * c) + t_1;
} else if (t <= 7e-32) {
tmp = t_4;
} else if (t <= 3.2e+50) {
tmp = t_5;
} else if (t <= 2e+87) {
tmp = t_4;
} else if (t <= 1.5e+116) {
tmp = t_3;
} else if (t <= 5.6e+161) {
tmp = c * (b + (-4.0 * ((t * a) / c)));
} else if (t <= 6.9e+186) {
tmp = t_3;
} else {
tmp = t_5;
}
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) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = x * (y * z)
t_3 = t_1 + (18.0d0 * (t * t_2))
t_4 = (b * c) - (4.0d0 * (x * i))
t_5 = t * ((18.0d0 * t_2) - (4.0d0 * a))
if (t <= (-4d-50)) then
tmp = t_5
else if (t <= (-2.9d-271)) then
tmp = (b * c) + t_1
else if (t <= 7d-32) then
tmp = t_4
else if (t <= 3.2d+50) then
tmp = t_5
else if (t <= 2d+87) then
tmp = t_4
else if (t <= 1.5d+116) then
tmp = t_3
else if (t <= 5.6d+161) then
tmp = c * (b + ((-4.0d0) * ((t * a) / c)))
else if (t <= 6.9d+186) then
tmp = t_3
else
tmp = t_5
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 = x * (y * z);
double t_3 = t_1 + (18.0 * (t * t_2));
double t_4 = (b * c) - (4.0 * (x * i));
double t_5 = t * ((18.0 * t_2) - (4.0 * a));
double tmp;
if (t <= -4e-50) {
tmp = t_5;
} else if (t <= -2.9e-271) {
tmp = (b * c) + t_1;
} else if (t <= 7e-32) {
tmp = t_4;
} else if (t <= 3.2e+50) {
tmp = t_5;
} else if (t <= 2e+87) {
tmp = t_4;
} else if (t <= 1.5e+116) {
tmp = t_3;
} else if (t <= 5.6e+161) {
tmp = c * (b + (-4.0 * ((t * a) / c)));
} else if (t <= 6.9e+186) {
tmp = t_3;
} else {
tmp = t_5;
}
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 = x * (y * z) t_3 = t_1 + (18.0 * (t * t_2)) t_4 = (b * c) - (4.0 * (x * i)) t_5 = t * ((18.0 * t_2) - (4.0 * a)) tmp = 0 if t <= -4e-50: tmp = t_5 elif t <= -2.9e-271: tmp = (b * c) + t_1 elif t <= 7e-32: tmp = t_4 elif t <= 3.2e+50: tmp = t_5 elif t <= 2e+87: tmp = t_4 elif t <= 1.5e+116: tmp = t_3 elif t <= 5.6e+161: tmp = c * (b + (-4.0 * ((t * a) / c))) elif t <= 6.9e+186: tmp = t_3 else: tmp = t_5 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(x * Float64(y * z)) t_3 = Float64(t_1 + Float64(18.0 * Float64(t * t_2))) t_4 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) t_5 = Float64(t * Float64(Float64(18.0 * t_2) - Float64(4.0 * a))) tmp = 0.0 if (t <= -4e-50) tmp = t_5; elseif (t <= -2.9e-271) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 7e-32) tmp = t_4; elseif (t <= 3.2e+50) tmp = t_5; elseif (t <= 2e+87) tmp = t_4; elseif (t <= 1.5e+116) tmp = t_3; elseif (t <= 5.6e+161) tmp = Float64(c * Float64(b + Float64(-4.0 * Float64(Float64(t * a) / c)))); elseif (t <= 6.9e+186) tmp = t_3; else tmp = t_5; 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 = x * (y * z);
t_3 = t_1 + (18.0 * (t * t_2));
t_4 = (b * c) - (4.0 * (x * i));
t_5 = t * ((18.0 * t_2) - (4.0 * a));
tmp = 0.0;
if (t <= -4e-50)
tmp = t_5;
elseif (t <= -2.9e-271)
tmp = (b * c) + t_1;
elseif (t <= 7e-32)
tmp = t_4;
elseif (t <= 3.2e+50)
tmp = t_5;
elseif (t <= 2e+87)
tmp = t_4;
elseif (t <= 1.5e+116)
tmp = t_3;
elseif (t <= 5.6e+161)
tmp = c * (b + (-4.0 * ((t * a) / c)));
elseif (t <= 6.9e+186)
tmp = t_3;
else
tmp = t_5;
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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(18.0 * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t * N[(N[(18.0 * t$95$2), $MachinePrecision] - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e-50], t$95$5, If[LessEqual[t, -2.9e-271], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 7e-32], t$95$4, If[LessEqual[t, 3.2e+50], t$95$5, If[LessEqual[t, 2e+87], t$95$4, If[LessEqual[t, 1.5e+116], t$95$3, If[LessEqual[t, 5.6e+161], N[(c * N[(b + N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.9e+186], t$95$3, t$95$5]]]]]]]]]]]]]
\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 := x \cdot \left(y \cdot z\right)\\
t_3 := t\_1 + 18 \cdot \left(t \cdot t\_2\right)\\
t_4 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_5 := t \cdot \left(18 \cdot t\_2 - 4 \cdot a\right)\\
\mathbf{if}\;t \leq -4 \cdot 10^{-50}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{-271}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-32}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+50}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+87}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+116}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+161}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \frac{t \cdot a}{c}\right)\\
\mathbf{elif}\;t \leq 6.9 \cdot 10^{+186}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_5\\
\end{array}
\end{array}
if t < -4.00000000000000003e-50 or 6.9999999999999997e-32 < t < 3.19999999999999983e50 or 6.89999999999999992e186 < t Initial program 89.2%
Simplified90.3%
Taylor expanded in c around inf 77.7%
Taylor expanded in t around -inf 69.1%
if -4.00000000000000003e-50 < t < -2.90000000000000014e-271Initial program 91.8%
Simplified93.7%
Taylor expanded in b around inf 72.9%
if -2.90000000000000014e-271 < t < 6.9999999999999997e-32 or 3.19999999999999983e50 < t < 1.9999999999999999e87Initial program 79.7%
Simplified80.0%
Taylor expanded in j around 0 69.8%
Taylor expanded in t around 0 64.6%
if 1.9999999999999999e87 < t < 1.4999999999999999e116 or 5.60000000000000041e161 < t < 6.89999999999999992e186Initial program 92.6%
Simplified99.7%
Taylor expanded in y around inf 85.8%
if 1.4999999999999999e116 < t < 5.60000000000000041e161Initial program 92.7%
Simplified92.7%
Taylor expanded in c around inf 92.6%
Taylor expanded in x around 0 79.8%
Taylor expanded in j around 0 80.0%
Final simplification70.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* x (* y z)))
(t_3 (- (* b c) (* 4.0 (* x i))))
(t_4 (* t (- (* 18.0 t_2) (* 4.0 a)))))
(if (<= t -3.85e-50)
t_4
(if (<= t -4.8e-274)
(+ (* b c) t_1)
(if (<= t 5e-29)
t_3
(if (<= t 3.8e+53)
t_4
(if (<= t 9e+82)
t_3
(if (<= t 1.35e+116)
(+ t_1 (* 18.0 (* t t_2)))
(if (<= t 9.5e+160)
(* c (+ b (* -4.0 (/ (* t a) c))))
(if (<= t 8e+182)
(+ t_1 (* 18.0 (* (* y z) (* t x))))
t_4))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = x * (y * z);
double t_3 = (b * c) - (4.0 * (x * i));
double t_4 = t * ((18.0 * t_2) - (4.0 * a));
double tmp;
if (t <= -3.85e-50) {
tmp = t_4;
} else if (t <= -4.8e-274) {
tmp = (b * c) + t_1;
} else if (t <= 5e-29) {
tmp = t_3;
} else if (t <= 3.8e+53) {
tmp = t_4;
} else if (t <= 9e+82) {
tmp = t_3;
} else if (t <= 1.35e+116) {
tmp = t_1 + (18.0 * (t * t_2));
} else if (t <= 9.5e+160) {
tmp = c * (b + (-4.0 * ((t * a) / c)));
} else if (t <= 8e+182) {
tmp = t_1 + (18.0 * ((y * z) * (t * x)));
} else {
tmp = t_4;
}
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) :: t_4
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = x * (y * z)
t_3 = (b * c) - (4.0d0 * (x * i))
t_4 = t * ((18.0d0 * t_2) - (4.0d0 * a))
if (t <= (-3.85d-50)) then
tmp = t_4
else if (t <= (-4.8d-274)) then
tmp = (b * c) + t_1
else if (t <= 5d-29) then
tmp = t_3
else if (t <= 3.8d+53) then
tmp = t_4
else if (t <= 9d+82) then
tmp = t_3
else if (t <= 1.35d+116) then
tmp = t_1 + (18.0d0 * (t * t_2))
else if (t <= 9.5d+160) then
tmp = c * (b + ((-4.0d0) * ((t * a) / c)))
else if (t <= 8d+182) then
tmp = t_1 + (18.0d0 * ((y * z) * (t * x)))
else
tmp = t_4
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 = x * (y * z);
double t_3 = (b * c) - (4.0 * (x * i));
double t_4 = t * ((18.0 * t_2) - (4.0 * a));
double tmp;
if (t <= -3.85e-50) {
tmp = t_4;
} else if (t <= -4.8e-274) {
tmp = (b * c) + t_1;
} else if (t <= 5e-29) {
tmp = t_3;
} else if (t <= 3.8e+53) {
tmp = t_4;
} else if (t <= 9e+82) {
tmp = t_3;
} else if (t <= 1.35e+116) {
tmp = t_1 + (18.0 * (t * t_2));
} else if (t <= 9.5e+160) {
tmp = c * (b + (-4.0 * ((t * a) / c)));
} else if (t <= 8e+182) {
tmp = t_1 + (18.0 * ((y * z) * (t * x)));
} else {
tmp = t_4;
}
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 = x * (y * z) t_3 = (b * c) - (4.0 * (x * i)) t_4 = t * ((18.0 * t_2) - (4.0 * a)) tmp = 0 if t <= -3.85e-50: tmp = t_4 elif t <= -4.8e-274: tmp = (b * c) + t_1 elif t <= 5e-29: tmp = t_3 elif t <= 3.8e+53: tmp = t_4 elif t <= 9e+82: tmp = t_3 elif t <= 1.35e+116: tmp = t_1 + (18.0 * (t * t_2)) elif t <= 9.5e+160: tmp = c * (b + (-4.0 * ((t * a) / c))) elif t <= 8e+182: tmp = t_1 + (18.0 * ((y * z) * (t * x))) else: tmp = t_4 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(x * Float64(y * z)) t_3 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) t_4 = Float64(t * Float64(Float64(18.0 * t_2) - Float64(4.0 * a))) tmp = 0.0 if (t <= -3.85e-50) tmp = t_4; elseif (t <= -4.8e-274) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 5e-29) tmp = t_3; elseif (t <= 3.8e+53) tmp = t_4; elseif (t <= 9e+82) tmp = t_3; elseif (t <= 1.35e+116) tmp = Float64(t_1 + Float64(18.0 * Float64(t * t_2))); elseif (t <= 9.5e+160) tmp = Float64(c * Float64(b + Float64(-4.0 * Float64(Float64(t * a) / c)))); elseif (t <= 8e+182) tmp = Float64(t_1 + Float64(18.0 * Float64(Float64(y * z) * Float64(t * x)))); else tmp = t_4; 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 = x * (y * z);
t_3 = (b * c) - (4.0 * (x * i));
t_4 = t * ((18.0 * t_2) - (4.0 * a));
tmp = 0.0;
if (t <= -3.85e-50)
tmp = t_4;
elseif (t <= -4.8e-274)
tmp = (b * c) + t_1;
elseif (t <= 5e-29)
tmp = t_3;
elseif (t <= 3.8e+53)
tmp = t_4;
elseif (t <= 9e+82)
tmp = t_3;
elseif (t <= 1.35e+116)
tmp = t_1 + (18.0 * (t * t_2));
elseif (t <= 9.5e+160)
tmp = c * (b + (-4.0 * ((t * a) / c)));
elseif (t <= 8e+182)
tmp = t_1 + (18.0 * ((y * z) * (t * x)));
else
tmp = t_4;
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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t * N[(N[(18.0 * t$95$2), $MachinePrecision] - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.85e-50], t$95$4, If[LessEqual[t, -4.8e-274], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 5e-29], t$95$3, If[LessEqual[t, 3.8e+53], t$95$4, If[LessEqual[t, 9e+82], t$95$3, If[LessEqual[t, 1.35e+116], N[(t$95$1 + N[(18.0 * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+160], N[(c * N[(b + N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+182], N[(t$95$1 + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]]]
\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 := x \cdot \left(y \cdot z\right)\\
t_3 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_4 := t \cdot \left(18 \cdot t\_2 - 4 \cdot a\right)\\
\mathbf{if}\;t \leq -3.85 \cdot 10^{-50}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-274}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-29}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{+53}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+82}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+116}:\\
\;\;\;\;t\_1 + 18 \cdot \left(t \cdot t\_2\right)\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+160}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \frac{t \cdot a}{c}\right)\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+182}:\\
\;\;\;\;t\_1 + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if t < -3.84999999999999982e-50 or 4.99999999999999986e-29 < t < 3.79999999999999997e53 or 8.0000000000000005e182 < t Initial program 89.3%
Simplified90.3%
Taylor expanded in c around inf 77.1%
Taylor expanded in t around -inf 69.4%
if -3.84999999999999982e-50 < t < -4.8e-274Initial program 91.8%
Simplified93.7%
Taylor expanded in b around inf 72.9%
if -4.8e-274 < t < 4.99999999999999986e-29 or 3.79999999999999997e53 < t < 8.9999999999999993e82Initial program 79.7%
Simplified80.0%
Taylor expanded in j around 0 69.8%
Taylor expanded in t around 0 64.6%
if 8.9999999999999993e82 < t < 1.35e116Initial program 87.3%
Simplified99.8%
Taylor expanded in y around inf 87.3%
if 1.35e116 < t < 9.5000000000000006e160Initial program 92.7%
Simplified92.7%
Taylor expanded in c around inf 92.6%
Taylor expanded in x around 0 79.8%
Taylor expanded in j around 0 80.0%
if 9.5000000000000006e160 < t < 8.0000000000000005e182Initial program 100.0%
Simplified99.7%
Taylor expanded in y around inf 80.5%
associate-*r*81.3%
Simplified81.3%
Final simplification70.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (* x i)))
(t_2 (* (* j 27.0) k))
(t_3 (- (+ (* b c) (* (* t a) -4.0)) t_1))
(t_4 (* 18.0 (* x (* y z)))))
(if (<= t_2 -10000000.0)
(- (+ (* b c) (* 18.0 (* t (* z (* y x))))) t_2)
(if (<= t_2 1e-305)
t_3
(if (<= t_2 2e-179)
(- (* t (- t_4 (* 4.0 a))) t_1)
(if (<= t_2 2e+69)
t_3
(+ (* j (* k -27.0)) (* t (+ t_4 (* a -4.0))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = (j * 27.0) * k;
double t_3 = ((b * c) + ((t * a) * -4.0)) - t_1;
double t_4 = 18.0 * (x * (y * z));
double tmp;
if (t_2 <= -10000000.0) {
tmp = ((b * c) + (18.0 * (t * (z * (y * x))))) - t_2;
} else if (t_2 <= 1e-305) {
tmp = t_3;
} else if (t_2 <= 2e-179) {
tmp = (t * (t_4 - (4.0 * a))) - t_1;
} else if (t_2 <= 2e+69) {
tmp = t_3;
} else {
tmp = (j * (k * -27.0)) + (t * (t_4 + (a * -4.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
t_2 = (j * 27.0d0) * k
t_3 = ((b * c) + ((t * a) * (-4.0d0))) - t_1
t_4 = 18.0d0 * (x * (y * z))
if (t_2 <= (-10000000.0d0)) then
tmp = ((b * c) + (18.0d0 * (t * (z * (y * x))))) - t_2
else if (t_2 <= 1d-305) then
tmp = t_3
else if (t_2 <= 2d-179) then
tmp = (t * (t_4 - (4.0d0 * a))) - t_1
else if (t_2 <= 2d+69) then
tmp = t_3
else
tmp = (j * (k * (-27.0d0))) + (t * (t_4 + (a * (-4.0d0))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = (j * 27.0) * k;
double t_3 = ((b * c) + ((t * a) * -4.0)) - t_1;
double t_4 = 18.0 * (x * (y * z));
double tmp;
if (t_2 <= -10000000.0) {
tmp = ((b * c) + (18.0 * (t * (z * (y * x))))) - t_2;
} else if (t_2 <= 1e-305) {
tmp = t_3;
} else if (t_2 <= 2e-179) {
tmp = (t * (t_4 - (4.0 * a))) - t_1;
} else if (t_2 <= 2e+69) {
tmp = t_3;
} else {
tmp = (j * (k * -27.0)) + (t * (t_4 + (a * -4.0)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = (j * 27.0) * k t_3 = ((b * c) + ((t * a) * -4.0)) - t_1 t_4 = 18.0 * (x * (y * z)) tmp = 0 if t_2 <= -10000000.0: tmp = ((b * c) + (18.0 * (t * (z * (y * x))))) - t_2 elif t_2 <= 1e-305: tmp = t_3 elif t_2 <= 2e-179: tmp = (t * (t_4 - (4.0 * a))) - t_1 elif t_2 <= 2e+69: tmp = t_3 else: tmp = (j * (k * -27.0)) + (t * (t_4 + (a * -4.0))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - t_1) t_4 = Float64(18.0 * Float64(x * Float64(y * z))) tmp = 0.0 if (t_2 <= -10000000.0) tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(z * Float64(y * x))))) - t_2); elseif (t_2 <= 1e-305) tmp = t_3; elseif (t_2 <= 2e-179) tmp = Float64(Float64(t * Float64(t_4 - Float64(4.0 * a))) - t_1); elseif (t_2 <= 2e+69) tmp = t_3; else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(t_4 + Float64(a * -4.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
t_2 = (j * 27.0) * k;
t_3 = ((b * c) + ((t * a) * -4.0)) - t_1;
t_4 = 18.0 * (x * (y * z));
tmp = 0.0;
if (t_2 <= -10000000.0)
tmp = ((b * c) + (18.0 * (t * (z * (y * x))))) - t_2;
elseif (t_2 <= 1e-305)
tmp = t_3;
elseif (t_2 <= 2e-179)
tmp = (t * (t_4 - (4.0 * a))) - t_1;
elseif (t_2 <= 2e+69)
tmp = t_3;
else
tmp = (j * (k * -27.0)) + (t * (t_4 + (a * -4.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -10000000.0], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t$95$2, 1e-305], t$95$3, If[LessEqual[t$95$2, 2e-179], N[(N[(t * N[(t$95$4 - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e+69], t$95$3, N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(t$95$4 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := \left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - t\_1\\
t_4 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t\_2 \leq -10000000:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot \left(z \cdot \left(y \cdot x\right)\right)\right)\right) - t\_2\\
\mathbf{elif}\;t\_2 \leq 10^{-305}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-179}:\\
\;\;\;\;t \cdot \left(t\_4 - 4 \cdot a\right) - t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+69}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(t\_4 + a \cdot -4\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e7Initial program 92.3%
Taylor expanded in x around 0 81.9%
Taylor expanded in a around 0 78.6%
pow178.6%
Applied egg-rr78.6%
unpow178.6%
associate-*r*76.9%
Simplified76.9%
Taylor expanded in t around inf 79.9%
associate-*r*83.4%
*-commutative83.4%
Simplified83.4%
if -1e7 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999996e-306 or 2e-179 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e69Initial program 90.5%
Simplified91.9%
Taylor expanded in j around 0 90.5%
Taylor expanded in x around 0 80.4%
if 9.99999999999999996e-306 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e-179Initial program 67.1%
Simplified73.7%
Taylor expanded in j around 0 73.7%
Taylor expanded in b around 0 87.1%
if 2.0000000000000001e69 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 79.1%
Simplified86.0%
Taylor expanded in t around inf 81.5%
Final simplification81.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 (* 4.0 (* x i)))
(t_2 (- (+ (* b c) (* (* t a) -4.0)) t_1))
(t_3 (* (* j 27.0) k)))
(if (<= t_3 -10000000.0)
(- (+ (* b c) (* 18.0 (* t (* z (* y x))))) t_3)
(if (<= t_3 1e-305)
t_2
(if (<= t_3 2e-179)
(- (* t (- (* 18.0 (* x (* y z))) (* 4.0 a))) t_1)
(if (<= t_3 2e+33)
t_2
(- (+ (* b c) (* y (* z (* t (* 18.0 x))))) t_3)))))))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 t_2 = ((b * c) + ((t * a) * -4.0)) - t_1;
double t_3 = (j * 27.0) * k;
double tmp;
if (t_3 <= -10000000.0) {
tmp = ((b * c) + (18.0 * (t * (z * (y * x))))) - t_3;
} else if (t_3 <= 1e-305) {
tmp = t_2;
} else if (t_3 <= 2e-179) {
tmp = (t * ((18.0 * (x * (y * z))) - (4.0 * a))) - t_1;
} else if (t_3 <= 2e+33) {
tmp = t_2;
} else {
tmp = ((b * c) + (y * (z * (t * (18.0 * x))))) - t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = 4.0d0 * (x * i)
t_2 = ((b * c) + ((t * a) * (-4.0d0))) - t_1
t_3 = (j * 27.0d0) * k
if (t_3 <= (-10000000.0d0)) then
tmp = ((b * c) + (18.0d0 * (t * (z * (y * x))))) - t_3
else if (t_3 <= 1d-305) then
tmp = t_2
else if (t_3 <= 2d-179) then
tmp = (t * ((18.0d0 * (x * (y * z))) - (4.0d0 * a))) - t_1
else if (t_3 <= 2d+33) then
tmp = t_2
else
tmp = ((b * c) + (y * (z * (t * (18.0d0 * x))))) - t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 t_2 = ((b * c) + ((t * a) * -4.0)) - t_1;
double t_3 = (j * 27.0) * k;
double tmp;
if (t_3 <= -10000000.0) {
tmp = ((b * c) + (18.0 * (t * (z * (y * x))))) - t_3;
} else if (t_3 <= 1e-305) {
tmp = t_2;
} else if (t_3 <= 2e-179) {
tmp = (t * ((18.0 * (x * (y * z))) - (4.0 * a))) - t_1;
} else if (t_3 <= 2e+33) {
tmp = t_2;
} else {
tmp = ((b * c) + (y * (z * (t * (18.0 * x))))) - t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = ((b * c) + ((t * a) * -4.0)) - t_1 t_3 = (j * 27.0) * k tmp = 0 if t_3 <= -10000000.0: tmp = ((b * c) + (18.0 * (t * (z * (y * x))))) - t_3 elif t_3 <= 1e-305: tmp = t_2 elif t_3 <= 2e-179: tmp = (t * ((18.0 * (x * (y * z))) - (4.0 * a))) - t_1 elif t_3 <= 2e+33: tmp = t_2 else: tmp = ((b * c) + (y * (z * (t * (18.0 * x))))) - t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - t_1) t_3 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_3 <= -10000000.0) tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(z * Float64(y * x))))) - t_3); elseif (t_3 <= 1e-305) tmp = t_2; elseif (t_3 <= 2e-179) tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(4.0 * a))) - t_1); elseif (t_3 <= 2e+33) tmp = t_2; else tmp = Float64(Float64(Float64(b * c) + Float64(y * Float64(z * Float64(t * Float64(18.0 * x))))) - t_3); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
t_2 = ((b * c) + ((t * a) * -4.0)) - t_1;
t_3 = (j * 27.0) * k;
tmp = 0.0;
if (t_3 <= -10000000.0)
tmp = ((b * c) + (18.0 * (t * (z * (y * x))))) - t_3;
elseif (t_3 <= 1e-305)
tmp = t_2;
elseif (t_3 <= 2e-179)
tmp = (t * ((18.0 * (x * (y * z))) - (4.0 * a))) - t_1;
elseif (t_3 <= 2e+33)
tmp = t_2;
else
tmp = ((b * c) + (y * (z * (t * (18.0 * x))))) - t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$3, -10000000.0], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t$95$3, 1e-305], t$95$2, If[LessEqual[t$95$3, 2e-179], N[(N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 2e+33], t$95$2, N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(z * N[(t * N[(18.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := \left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - t\_1\\
t_3 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_3 \leq -10000000:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot \left(z \cdot \left(y \cdot x\right)\right)\right)\right) - t\_3\\
\mathbf{elif}\;t\_3 \leq 10^{-305}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-179}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right) - t\_1\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + y \cdot \left(z \cdot \left(t \cdot \left(18 \cdot x\right)\right)\right)\right) - t\_3\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e7Initial program 92.3%
Taylor expanded in x around 0 81.9%
Taylor expanded in a around 0 78.6%
pow178.6%
Applied egg-rr78.6%
unpow178.6%
associate-*r*76.9%
Simplified76.9%
Taylor expanded in t around inf 79.9%
associate-*r*83.4%
*-commutative83.4%
Simplified83.4%
if -1e7 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999996e-306 or 2e-179 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.9999999999999999e33Initial program 91.1%
Simplified92.5%
Taylor expanded in j around 0 91.1%
Taylor expanded in x around 0 80.3%
if 9.99999999999999996e-306 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e-179Initial program 67.1%
Simplified73.7%
Taylor expanded in j around 0 73.7%
Taylor expanded in b around 0 87.1%
if 1.9999999999999999e33 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 77.8%
Taylor expanded in x around 0 82.4%
Taylor expanded in a around 0 80.4%
pow180.4%
Applied egg-rr80.4%
unpow180.4%
associate-*r*84.6%
Simplified84.6%
Taylor expanded in t around inf 77.9%
associate-*r*78.0%
associate-*r*78.0%
*-commutative78.0%
associate-*r*80.1%
*-commutative80.1%
associate-*r*80.1%
Simplified80.1%
Final simplification81.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* x i)))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -5e+84)
(- (* b c) t_2)
(if (<= t_2 1e-290)
t_1
(if (<= t_2 1e-167)
(* t (* (* 18.0 z) (* y x)))
(if (<= t_2 1e+77)
t_1
(if (<= t_2 5e+274)
(* 18.0 (* t (* x (* y z))))
(* c (* -27.0 (/ (* j k) c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (x * i));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+84) {
tmp = (b * c) - t_2;
} else if (t_2 <= 1e-290) {
tmp = t_1;
} else if (t_2 <= 1e-167) {
tmp = t * ((18.0 * z) * (y * x));
} else if (t_2 <= 1e+77) {
tmp = t_1;
} else if (t_2 <= 5e+274) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = c * (-27.0 * ((j * k) / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (x * i))
t_2 = (j * 27.0d0) * k
if (t_2 <= (-5d+84)) then
tmp = (b * c) - t_2
else if (t_2 <= 1d-290) then
tmp = t_1
else if (t_2 <= 1d-167) then
tmp = t * ((18.0d0 * z) * (y * x))
else if (t_2 <= 1d+77) then
tmp = t_1
else if (t_2 <= 5d+274) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = c * ((-27.0d0) * ((j * k) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (x * i));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+84) {
tmp = (b * c) - t_2;
} else if (t_2 <= 1e-290) {
tmp = t_1;
} else if (t_2 <= 1e-167) {
tmp = t * ((18.0 * z) * (y * x));
} else if (t_2 <= 1e+77) {
tmp = t_1;
} else if (t_2 <= 5e+274) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = c * (-27.0 * ((j * k) / c));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (x * i)) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -5e+84: tmp = (b * c) - t_2 elif t_2 <= 1e-290: tmp = t_1 elif t_2 <= 1e-167: tmp = t * ((18.0 * z) * (y * x)) elif t_2 <= 1e+77: tmp = t_1 elif t_2 <= 5e+274: tmp = 18.0 * (t * (x * (y * z))) else: tmp = c * (-27.0 * ((j * k) / c)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -5e+84) tmp = Float64(Float64(b * c) - t_2); elseif (t_2 <= 1e-290) tmp = t_1; elseif (t_2 <= 1e-167) tmp = Float64(t * Float64(Float64(18.0 * z) * Float64(y * x))); elseif (t_2 <= 1e+77) tmp = t_1; elseif (t_2 <= 5e+274) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = Float64(c * Float64(-27.0 * Float64(Float64(j * k) / c))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (x * i));
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -5e+84)
tmp = (b * c) - t_2;
elseif (t_2 <= 1e-290)
tmp = t_1;
elseif (t_2 <= 1e-167)
tmp = t * ((18.0 * z) * (y * x));
elseif (t_2 <= 1e+77)
tmp = t_1;
elseif (t_2 <= 5e+274)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = c * (-27.0 * ((j * k) / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+84], N[(N[(b * c), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t$95$2, 1e-290], t$95$1, If[LessEqual[t$95$2, 1e-167], N[(t * N[(N[(18.0 * z), $MachinePrecision] * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+77], t$95$1, If[LessEqual[t$95$2, 5e+274], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(-27.0 * N[(N[(j * k), $MachinePrecision] / c), $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(x \cdot i\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+84}:\\
\;\;\;\;b \cdot c - t\_2\\
\mathbf{elif}\;t\_2 \leq 10^{-290}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-167}:\\
\;\;\;\;t \cdot \left(\left(18 \cdot z\right) \cdot \left(y \cdot x\right)\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+274}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(-27 \cdot \frac{j \cdot k}{c}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000001e84Initial program 90.6%
Taylor expanded in x around 0 86.4%
Taylor expanded in b around inf 68.8%
if -5.0000000000000001e84 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.0000000000000001e-290 or 1e-167 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999983e76Initial program 90.6%
Simplified91.3%
Taylor expanded in j around 0 89.4%
Taylor expanded in t around 0 54.7%
if 1.0000000000000001e-290 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e-167Initial program 71.9%
Simplified79.0%
Taylor expanded in c around inf 86.6%
Taylor expanded in y around inf 44.8%
*-commutative44.8%
associate-*r*44.8%
associate-*r*44.8%
*-commutative44.8%
associate-*r*44.8%
Simplified44.8%
if 9.99999999999999983e76 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999998e274Initial program 82.2%
Simplified85.8%
Taylor expanded in c around inf 61.4%
Taylor expanded in y around inf 51.9%
if 4.9999999999999998e274 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 71.4%
Simplified71.3%
Taylor expanded in c around inf 64.3%
Taylor expanded in x around 0 85.7%
Taylor expanded in j around inf 85.7%
Final simplification58.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (+ (* b c) (* (* t a) -4.0)) (* 4.0 (* x i))))
(t_2 (* j (* k -27.0)))
(t_3 (* x (* y z)))
(t_4 (* (* j 27.0) k)))
(if (<= t_4 -5e+84)
(+ t_2 (* 18.0 (* t t_3)))
(if (<= t_4 1e-305)
t_1
(if (<= t_4 2e-179)
(* t (- (* 18.0 t_3) (* 4.0 a)))
(if (<= t_4 2e+69) t_1 (+ t_2 (* 18.0 (* (* y z) (* t x))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i));
double t_2 = j * (k * -27.0);
double t_3 = x * (y * z);
double t_4 = (j * 27.0) * k;
double tmp;
if (t_4 <= -5e+84) {
tmp = t_2 + (18.0 * (t * t_3));
} else if (t_4 <= 1e-305) {
tmp = t_1;
} else if (t_4 <= 2e-179) {
tmp = t * ((18.0 * t_3) - (4.0 * a));
} else if (t_4 <= 2e+69) {
tmp = t_1;
} else {
tmp = t_2 + (18.0 * ((y * z) * (t * x)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = ((b * c) + ((t * a) * (-4.0d0))) - (4.0d0 * (x * i))
t_2 = j * (k * (-27.0d0))
t_3 = x * (y * z)
t_4 = (j * 27.0d0) * k
if (t_4 <= (-5d+84)) then
tmp = t_2 + (18.0d0 * (t * t_3))
else if (t_4 <= 1d-305) then
tmp = t_1
else if (t_4 <= 2d-179) then
tmp = t * ((18.0d0 * t_3) - (4.0d0 * a))
else if (t_4 <= 2d+69) then
tmp = t_1
else
tmp = t_2 + (18.0d0 * ((y * z) * (t * x)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i));
double t_2 = j * (k * -27.0);
double t_3 = x * (y * z);
double t_4 = (j * 27.0) * k;
double tmp;
if (t_4 <= -5e+84) {
tmp = t_2 + (18.0 * (t * t_3));
} else if (t_4 <= 1e-305) {
tmp = t_1;
} else if (t_4 <= 2e-179) {
tmp = t * ((18.0 * t_3) - (4.0 * a));
} else if (t_4 <= 2e+69) {
tmp = t_1;
} else {
tmp = t_2 + (18.0 * ((y * z) * (t * x)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i)) t_2 = j * (k * -27.0) t_3 = x * (y * z) t_4 = (j * 27.0) * k tmp = 0 if t_4 <= -5e+84: tmp = t_2 + (18.0 * (t * t_3)) elif t_4 <= 1e-305: tmp = t_1 elif t_4 <= 2e-179: tmp = t * ((18.0 * t_3) - (4.0 * a)) elif t_4 <= 2e+69: tmp = t_1 else: tmp = t_2 + (18.0 * ((y * z) * (t * x))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - Float64(4.0 * Float64(x * i))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(x * Float64(y * z)) t_4 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_4 <= -5e+84) tmp = Float64(t_2 + Float64(18.0 * Float64(t * t_3))); elseif (t_4 <= 1e-305) tmp = t_1; elseif (t_4 <= 2e-179) tmp = Float64(t * Float64(Float64(18.0 * t_3) - Float64(4.0 * a))); elseif (t_4 <= 2e+69) tmp = t_1; else tmp = Float64(t_2 + Float64(18.0 * Float64(Float64(y * z) * Float64(t * x)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((b * c) + ((t * a) * -4.0)) - (4.0 * (x * i));
t_2 = j * (k * -27.0);
t_3 = x * (y * z);
t_4 = (j * 27.0) * k;
tmp = 0.0;
if (t_4 <= -5e+84)
tmp = t_2 + (18.0 * (t * t_3));
elseif (t_4 <= 1e-305)
tmp = t_1;
elseif (t_4 <= 2e-179)
tmp = t * ((18.0 * t_3) - (4.0 * a));
elseif (t_4 <= 2e+69)
tmp = t_1;
else
tmp = t_2 + (18.0 * ((y * z) * (t * x)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$4, -5e+84], N[(t$95$2 + N[(18.0 * N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 1e-305], t$95$1, If[LessEqual[t$95$4, 2e-179], N[(t * N[(N[(18.0 * t$95$3), $MachinePrecision] - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+69], t$95$1, N[(t$95$2 + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - 4 \cdot \left(x \cdot i\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := x \cdot \left(y \cdot z\right)\\
t_4 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_4 \leq -5 \cdot 10^{+84}:\\
\;\;\;\;t\_2 + 18 \cdot \left(t \cdot t\_3\right)\\
\mathbf{elif}\;t\_4 \leq 10^{-305}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{-179}:\\
\;\;\;\;t \cdot \left(18 \cdot t\_3 - 4 \cdot a\right)\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2 + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot x\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000001e84Initial program 90.6%
Simplified93.3%
Taylor expanded in y around inf 70.2%
if -5.0000000000000001e84 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999996e-306 or 2e-179 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e69Initial program 91.1%
Simplified91.8%
Taylor expanded in j around 0 90.5%
Taylor expanded in x around 0 79.7%
if 9.99999999999999996e-306 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e-179Initial program 67.1%
Simplified73.7%
Taylor expanded in c around inf 80.8%
Taylor expanded in t around -inf 75.4%
if 2.0000000000000001e69 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 79.1%
Simplified86.0%
Taylor expanded in y around inf 77.0%
associate-*r*77.0%
Simplified77.0%
Final simplification77.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= (* b c) -5.6e+151)
(* b c)
(if (<= (* b c) -6.8e+28)
t_1
(if (<= (* b c) -2.5e-74)
(* -27.0 (* j k))
(if (<= (* b c) -3.15e-186)
t_1
(if (<= (* b c) 5.8e-184)
(* j (* k -27.0))
(if (<= (* b c) 3.8e+148) 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 = t * (a * -4.0);
double tmp;
if ((b * c) <= -5.6e+151) {
tmp = b * c;
} else if ((b * c) <= -6.8e+28) {
tmp = t_1;
} else if ((b * c) <= -2.5e-74) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= -3.15e-186) {
tmp = t_1;
} else if ((b * c) <= 5.8e-184) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 3.8e+148) {
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 = t * (a * (-4.0d0))
if ((b * c) <= (-5.6d+151)) then
tmp = b * c
else if ((b * c) <= (-6.8d+28)) then
tmp = t_1
else if ((b * c) <= (-2.5d-74)) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= (-3.15d-186)) then
tmp = t_1
else if ((b * c) <= 5.8d-184) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= 3.8d+148) 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 = t * (a * -4.0);
double tmp;
if ((b * c) <= -5.6e+151) {
tmp = b * c;
} else if ((b * c) <= -6.8e+28) {
tmp = t_1;
} else if ((b * c) <= -2.5e-74) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= -3.15e-186) {
tmp = t_1;
} else if ((b * c) <= 5.8e-184) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 3.8e+148) {
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 = t * (a * -4.0) tmp = 0 if (b * c) <= -5.6e+151: tmp = b * c elif (b * c) <= -6.8e+28: tmp = t_1 elif (b * c) <= -2.5e-74: tmp = -27.0 * (j * k) elif (b * c) <= -3.15e-186: tmp = t_1 elif (b * c) <= 5.8e-184: tmp = j * (k * -27.0) elif (b * c) <= 3.8e+148: 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(t * Float64(a * -4.0)) tmp = 0.0 if (Float64(b * c) <= -5.6e+151) tmp = Float64(b * c); elseif (Float64(b * c) <= -6.8e+28) tmp = t_1; elseif (Float64(b * c) <= -2.5e-74) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= -3.15e-186) tmp = t_1; elseif (Float64(b * c) <= 5.8e-184) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= 3.8e+148) 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 = t * (a * -4.0);
tmp = 0.0;
if ((b * c) <= -5.6e+151)
tmp = b * c;
elseif ((b * c) <= -6.8e+28)
tmp = t_1;
elseif ((b * c) <= -2.5e-74)
tmp = -27.0 * (j * k);
elseif ((b * c) <= -3.15e-186)
tmp = t_1;
elseif ((b * c) <= 5.8e-184)
tmp = j * (k * -27.0);
elseif ((b * c) <= 3.8e+148)
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[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5.6e+151], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -6.8e+28], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -2.5e-74], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.15e-186], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5.8e-184], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.8e+148], 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 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -5.6 \cdot 10^{+151}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -6.8 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -2.5 \cdot 10^{-74}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq -3.15 \cdot 10^{-186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 5.8 \cdot 10^{-184}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 3.8 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -5.59999999999999975e151 or 3.7999999999999998e148 < (*.f64 b c) Initial program 82.5%
Simplified81.4%
Taylor expanded in c around inf 84.2%
Taylor expanded in c around inf 73.1%
if -5.59999999999999975e151 < (*.f64 b c) < -6.8e28 or -2.49999999999999999e-74 < (*.f64 b c) < -3.1499999999999999e-186 or 5.80000000000000028e-184 < (*.f64 b c) < 3.7999999999999998e148Initial program 86.2%
Simplified88.0%
Taylor expanded in c around inf 73.8%
Taylor expanded in a around inf 31.9%
*-commutative31.9%
*-commutative31.9%
associate-*r*31.9%
Simplified31.9%
if -6.8e28 < (*.f64 b c) < -2.49999999999999999e-74Initial program 93.4%
Simplified99.6%
Taylor expanded in j around inf 51.0%
if -3.1499999999999999e-186 < (*.f64 b c) < 5.80000000000000028e-184Initial program 96.1%
Simplified98.0%
Taylor expanded in y around inf 60.1%
Taylor expanded in t around 0 29.9%
associate-*r*29.9%
*-commutative29.9%
associate-*r*29.9%
Simplified29.9%
Final simplification44.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 (* 18.0 (* x (* y z))))
(t_2 (* 4.0 (* x i)))
(t_3 (- (- (* b c) t_2) (* (* j 27.0) k)))
(t_4 (+ (* j (* k -27.0)) (* t (+ t_1 (* a -4.0))))))
(if (<= t -4.3e-50)
t_4
(if (<= t 5.4e-182)
t_3
(if (<= t 7.5e-103)
(- (+ (* b c) (* (* t a) -4.0)) t_2)
(if (<= t 8.8e-44)
t_3
(if (<= t 5.4e+55)
t_4
(if (<= t 2.9e+90) t_3 (+ (* b c) (* t (- t_1 (* 4.0 a))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double t_2 = 4.0 * (x * i);
double t_3 = ((b * c) - t_2) - ((j * 27.0) * k);
double t_4 = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0)));
double tmp;
if (t <= -4.3e-50) {
tmp = t_4;
} else if (t <= 5.4e-182) {
tmp = t_3;
} else if (t <= 7.5e-103) {
tmp = ((b * c) + ((t * a) * -4.0)) - t_2;
} else if (t <= 8.8e-44) {
tmp = t_3;
} else if (t <= 5.4e+55) {
tmp = t_4;
} else if (t <= 2.9e+90) {
tmp = t_3;
} else {
tmp = (b * c) + (t * (t_1 - (4.0 * a)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
t_2 = 4.0d0 * (x * i)
t_3 = ((b * c) - t_2) - ((j * 27.0d0) * k)
t_4 = (j * (k * (-27.0d0))) + (t * (t_1 + (a * (-4.0d0))))
if (t <= (-4.3d-50)) then
tmp = t_4
else if (t <= 5.4d-182) then
tmp = t_3
else if (t <= 7.5d-103) then
tmp = ((b * c) + ((t * a) * (-4.0d0))) - t_2
else if (t <= 8.8d-44) then
tmp = t_3
else if (t <= 5.4d+55) then
tmp = t_4
else if (t <= 2.9d+90) then
tmp = t_3
else
tmp = (b * c) + (t * (t_1 - (4.0d0 * a)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double t_2 = 4.0 * (x * i);
double t_3 = ((b * c) - t_2) - ((j * 27.0) * k);
double t_4 = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0)));
double tmp;
if (t <= -4.3e-50) {
tmp = t_4;
} else if (t <= 5.4e-182) {
tmp = t_3;
} else if (t <= 7.5e-103) {
tmp = ((b * c) + ((t * a) * -4.0)) - t_2;
} else if (t <= 8.8e-44) {
tmp = t_3;
} else if (t <= 5.4e+55) {
tmp = t_4;
} else if (t <= 2.9e+90) {
tmp = t_3;
} else {
tmp = (b * c) + (t * (t_1 - (4.0 * a)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) t_2 = 4.0 * (x * i) t_3 = ((b * c) - t_2) - ((j * 27.0) * k) t_4 = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0))) tmp = 0 if t <= -4.3e-50: tmp = t_4 elif t <= 5.4e-182: tmp = t_3 elif t <= 7.5e-103: tmp = ((b * c) + ((t * a) * -4.0)) - t_2 elif t <= 8.8e-44: tmp = t_3 elif t <= 5.4e+55: tmp = t_4 elif t <= 2.9e+90: tmp = t_3 else: tmp = (b * c) + (t * (t_1 - (4.0 * a))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) t_2 = Float64(4.0 * Float64(x * i)) t_3 = Float64(Float64(Float64(b * c) - t_2) - Float64(Float64(j * 27.0) * k)) t_4 = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(t_1 + Float64(a * -4.0)))) tmp = 0.0 if (t <= -4.3e-50) tmp = t_4; elseif (t <= 5.4e-182) tmp = t_3; elseif (t <= 7.5e-103) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - t_2); elseif (t <= 8.8e-44) tmp = t_3; elseif (t <= 5.4e+55) tmp = t_4; elseif (t <= 2.9e+90) tmp = t_3; else tmp = Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(4.0 * a)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
t_2 = 4.0 * (x * i);
t_3 = ((b * c) - t_2) - ((j * 27.0) * k);
t_4 = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0)));
tmp = 0.0;
if (t <= -4.3e-50)
tmp = t_4;
elseif (t <= 5.4e-182)
tmp = t_3;
elseif (t <= 7.5e-103)
tmp = ((b * c) + ((t * a) * -4.0)) - t_2;
elseif (t <= 8.8e-44)
tmp = t_3;
elseif (t <= 5.4e+55)
tmp = t_4;
elseif (t <= 2.9e+90)
tmp = t_3;
else
tmp = (b * c) + (t * (t_1 - (4.0 * a)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(b * c), $MachinePrecision] - t$95$2), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.3e-50], t$95$4, If[LessEqual[t, 5.4e-182], t$95$3, If[LessEqual[t, 7.5e-103], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, 8.8e-44], t$95$3, If[LessEqual[t, 5.4e+55], t$95$4, If[LessEqual[t, 2.9e+90], t$95$3, N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
t_3 := \left(b \cdot c - t\_2\right) - \left(j \cdot 27\right) \cdot k\\
t_4 := j \cdot \left(k \cdot -27\right) + t \cdot \left(t\_1 + a \cdot -4\right)\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{-50}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-182}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-103}:\\
\;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - t\_2\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{-44}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+55}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+90}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t \cdot \left(t\_1 - 4 \cdot a\right)\\
\end{array}
\end{array}
if t < -4.29999999999999997e-50 or 8.80000000000000048e-44 < t < 5.39999999999999954e55Initial program 91.6%
Simplified92.8%
Taylor expanded in t around inf 80.8%
if -4.29999999999999997e-50 < t < 5.39999999999999999e-182 or 7.5e-103 < t < 8.80000000000000048e-44 or 5.39999999999999954e55 < t < 2.9000000000000001e90Initial program 86.4%
Taylor expanded in t around 0 87.1%
if 5.39999999999999999e-182 < t < 7.5e-103Initial program 81.8%
Simplified77.6%
Taylor expanded in j around 0 72.9%
Taylor expanded in x around 0 72.1%
if 2.9000000000000001e90 < t Initial program 84.3%
Simplified88.6%
Taylor expanded in j around 0 84.4%
Taylor expanded in i around 0 82.2%
Final simplification82.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 (* 18.0 (* x (* y z))))
(t_2 (* 4.0 (* x i)))
(t_3 (- (- (* b c) t_2) (* (* j 27.0) k)))
(t_4 (* t (- t_1 (* 4.0 a))))
(t_5 (- t_4 t_2)))
(if (<= t -3.35e-50)
(+ (* j (* k -27.0)) (* t (+ t_1 (* a -4.0))))
(if (<= t 6.5e-161)
t_3
(if (<= t 5.5e-103)
t_5
(if (<= t 1.62e-43)
t_3
(if (<= t 1.1e+52)
t_5
(if (<= t 9.5e+89) t_3 (+ (* b c) t_4)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double t_2 = 4.0 * (x * i);
double t_3 = ((b * c) - t_2) - ((j * 27.0) * k);
double t_4 = t * (t_1 - (4.0 * a));
double t_5 = t_4 - t_2;
double tmp;
if (t <= -3.35e-50) {
tmp = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0)));
} else if (t <= 6.5e-161) {
tmp = t_3;
} else if (t <= 5.5e-103) {
tmp = t_5;
} else if (t <= 1.62e-43) {
tmp = t_3;
} else if (t <= 1.1e+52) {
tmp = t_5;
} else if (t <= 9.5e+89) {
tmp = t_3;
} else {
tmp = (b * c) + t_4;
}
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) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
t_2 = 4.0d0 * (x * i)
t_3 = ((b * c) - t_2) - ((j * 27.0d0) * k)
t_4 = t * (t_1 - (4.0d0 * a))
t_5 = t_4 - t_2
if (t <= (-3.35d-50)) then
tmp = (j * (k * (-27.0d0))) + (t * (t_1 + (a * (-4.0d0))))
else if (t <= 6.5d-161) then
tmp = t_3
else if (t <= 5.5d-103) then
tmp = t_5
else if (t <= 1.62d-43) then
tmp = t_3
else if (t <= 1.1d+52) then
tmp = t_5
else if (t <= 9.5d+89) then
tmp = t_3
else
tmp = (b * c) + t_4
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double t_2 = 4.0 * (x * i);
double t_3 = ((b * c) - t_2) - ((j * 27.0) * k);
double t_4 = t * (t_1 - (4.0 * a));
double t_5 = t_4 - t_2;
double tmp;
if (t <= -3.35e-50) {
tmp = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0)));
} else if (t <= 6.5e-161) {
tmp = t_3;
} else if (t <= 5.5e-103) {
tmp = t_5;
} else if (t <= 1.62e-43) {
tmp = t_3;
} else if (t <= 1.1e+52) {
tmp = t_5;
} else if (t <= 9.5e+89) {
tmp = t_3;
} else {
tmp = (b * c) + t_4;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) t_2 = 4.0 * (x * i) t_3 = ((b * c) - t_2) - ((j * 27.0) * k) t_4 = t * (t_1 - (4.0 * a)) t_5 = t_4 - t_2 tmp = 0 if t <= -3.35e-50: tmp = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0))) elif t <= 6.5e-161: tmp = t_3 elif t <= 5.5e-103: tmp = t_5 elif t <= 1.62e-43: tmp = t_3 elif t <= 1.1e+52: tmp = t_5 elif t <= 9.5e+89: tmp = t_3 else: tmp = (b * c) + t_4 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) t_2 = Float64(4.0 * Float64(x * i)) t_3 = Float64(Float64(Float64(b * c) - t_2) - Float64(Float64(j * 27.0) * k)) t_4 = Float64(t * Float64(t_1 - Float64(4.0 * a))) t_5 = Float64(t_4 - t_2) tmp = 0.0 if (t <= -3.35e-50) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(t_1 + Float64(a * -4.0)))); elseif (t <= 6.5e-161) tmp = t_3; elseif (t <= 5.5e-103) tmp = t_5; elseif (t <= 1.62e-43) tmp = t_3; elseif (t <= 1.1e+52) tmp = t_5; elseif (t <= 9.5e+89) tmp = t_3; else tmp = Float64(Float64(b * c) + t_4); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
t_2 = 4.0 * (x * i);
t_3 = ((b * c) - t_2) - ((j * 27.0) * k);
t_4 = t * (t_1 - (4.0 * a));
t_5 = t_4 - t_2;
tmp = 0.0;
if (t <= -3.35e-50)
tmp = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0)));
elseif (t <= 6.5e-161)
tmp = t_3;
elseif (t <= 5.5e-103)
tmp = t_5;
elseif (t <= 1.62e-43)
tmp = t_3;
elseif (t <= 1.1e+52)
tmp = t_5;
elseif (t <= 9.5e+89)
tmp = t_3;
else
tmp = (b * c) + t_4;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(b * c), $MachinePrecision] - t$95$2), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t * N[(t$95$1 - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 - t$95$2), $MachinePrecision]}, If[LessEqual[t, -3.35e-50], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e-161], t$95$3, If[LessEqual[t, 5.5e-103], t$95$5, If[LessEqual[t, 1.62e-43], t$95$3, If[LessEqual[t, 1.1e+52], t$95$5, If[LessEqual[t, 9.5e+89], t$95$3, N[(N[(b * c), $MachinePrecision] + t$95$4), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
t_3 := \left(b \cdot c - t\_2\right) - \left(j \cdot 27\right) \cdot k\\
t_4 := t \cdot \left(t\_1 - 4 \cdot a\right)\\
t_5 := t\_4 - t\_2\\
\mathbf{if}\;t \leq -3.35 \cdot 10^{-50}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(t\_1 + a \cdot -4\right)\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-161}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-103}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t \leq 1.62 \cdot 10^{-43}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+52}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+89}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_4\\
\end{array}
\end{array}
if t < -3.3500000000000002e-50Initial program 91.1%
Simplified92.5%
Taylor expanded in t around inf 81.7%
if -3.3500000000000002e-50 < t < 6.50000000000000008e-161 or 5.50000000000000032e-103 < t < 1.6199999999999999e-43 or 1.1e52 < t < 9.5000000000000003e89Initial program 86.1%
Taylor expanded in t around 0 86.8%
if 6.50000000000000008e-161 < t < 5.50000000000000032e-103 or 1.6199999999999999e-43 < t < 1.1e52Initial program 88.1%
Simplified88.3%
Taylor expanded in j around 0 82.5%
Taylor expanded in b around 0 79.8%
if 9.5000000000000003e89 < t Initial program 84.3%
Simplified88.6%
Taylor expanded in j around 0 84.4%
Taylor expanded in i around 0 82.2%
Final simplification83.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -5e+84)
(- (* b c) t_1)
(if (<= t_1 1e-167)
(* c (+ b (* -4.0 (/ (* t a) c))))
(if (<= t_1 1e+77)
(- (* b c) (* 4.0 (* x i)))
(if (<= t_1 1e+230)
(* 18.0 (* t (* x (* y z))))
(+ (* -27.0 (* j k)) (* -4.0 (* x i)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+84) {
tmp = (b * c) - t_1;
} else if (t_1 <= 1e-167) {
tmp = c * (b + (-4.0 * ((t * a) / c)));
} else if (t_1 <= 1e+77) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t_1 <= 1e+230) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-5d+84)) then
tmp = (b * c) - t_1
else if (t_1 <= 1d-167) then
tmp = c * (b + ((-4.0d0) * ((t * a) / c)))
else if (t_1 <= 1d+77) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (t_1 <= 1d+230) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = ((-27.0d0) * (j * k)) + ((-4.0d0) * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+84) {
tmp = (b * c) - t_1;
} else if (t_1 <= 1e-167) {
tmp = c * (b + (-4.0 * ((t * a) / c)));
} else if (t_1 <= 1e+77) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t_1 <= 1e+230) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -5e+84: tmp = (b * c) - t_1 elif t_1 <= 1e-167: tmp = c * (b + (-4.0 * ((t * a) / c))) elif t_1 <= 1e+77: tmp = (b * c) - (4.0 * (x * i)) elif t_1 <= 1e+230: tmp = 18.0 * (t * (x * (y * z))) else: tmp = (-27.0 * (j * k)) + (-4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -5e+84) tmp = Float64(Float64(b * c) - t_1); elseif (t_1 <= 1e-167) tmp = Float64(c * Float64(b + Float64(-4.0 * Float64(Float64(t * a) / c)))); elseif (t_1 <= 1e+77) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (t_1 <= 1e+230) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = Float64(Float64(-27.0 * Float64(j * k)) + Float64(-4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -5e+84)
tmp = (b * c) - t_1;
elseif (t_1 <= 1e-167)
tmp = c * (b + (-4.0 * ((t * a) / c)));
elseif (t_1 <= 1e+77)
tmp = (b * c) - (4.0 * (x * i));
elseif (t_1 <= 1e+230)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+84], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 1e-167], N[(c * N[(b + N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+77], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+230], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+84}:\\
\;\;\;\;b \cdot c - t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{-167}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \frac{t \cdot a}{c}\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+77}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+230}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000001e84Initial program 90.6%
Taylor expanded in x around 0 86.4%
Taylor expanded in b around inf 68.8%
if -5.0000000000000001e84 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e-167Initial program 87.6%
Simplified88.5%
Taylor expanded in c around inf 81.0%
Taylor expanded in x around 0 55.8%
Taylor expanded in j around 0 55.1%
if 1e-167 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999983e76Initial program 93.2%
Simplified95.4%
Taylor expanded in j around 0 90.9%
Taylor expanded in t around 0 65.3%
if 9.99999999999999983e76 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.0000000000000001e230Initial program 91.8%
Simplified91.7%
Taylor expanded in c around inf 71.6%
Taylor expanded in y around inf 56.3%
if 1.0000000000000001e230 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 61.1%
Simplified77.7%
Taylor expanded in i around inf 72.6%
associate-*r*72.6%
*-commutative72.6%
associate-*r*72.6%
*-commutative72.6%
*-commutative72.6%
Simplified72.6%
Taylor expanded in i around 0 72.6%
Final simplification60.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 (* (* j 27.0) k)))
(if (<= t_1 -5e+84)
(- (* b c) t_1)
(if (<= t_1 1e-167)
(* c (+ b (* -4.0 (/ (* t a) c))))
(if (<= t_1 1e+77)
(- (* b c) (* 4.0 (* x i)))
(if (<= t_1 5e+274)
(* 18.0 (* t (* x (* y z))))
(* c (* -27.0 (/ (* j k) c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+84) {
tmp = (b * c) - t_1;
} else if (t_1 <= 1e-167) {
tmp = c * (b + (-4.0 * ((t * a) / c)));
} else if (t_1 <= 1e+77) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t_1 <= 5e+274) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = c * (-27.0 * ((j * k) / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-5d+84)) then
tmp = (b * c) - t_1
else if (t_1 <= 1d-167) then
tmp = c * (b + ((-4.0d0) * ((t * a) / c)))
else if (t_1 <= 1d+77) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (t_1 <= 5d+274) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = c * ((-27.0d0) * ((j * k) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+84) {
tmp = (b * c) - t_1;
} else if (t_1 <= 1e-167) {
tmp = c * (b + (-4.0 * ((t * a) / c)));
} else if (t_1 <= 1e+77) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t_1 <= 5e+274) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = c * (-27.0 * ((j * k) / c));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -5e+84: tmp = (b * c) - t_1 elif t_1 <= 1e-167: tmp = c * (b + (-4.0 * ((t * a) / c))) elif t_1 <= 1e+77: tmp = (b * c) - (4.0 * (x * i)) elif t_1 <= 5e+274: tmp = 18.0 * (t * (x * (y * z))) else: tmp = c * (-27.0 * ((j * k) / c)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -5e+84) tmp = Float64(Float64(b * c) - t_1); elseif (t_1 <= 1e-167) tmp = Float64(c * Float64(b + Float64(-4.0 * Float64(Float64(t * a) / c)))); elseif (t_1 <= 1e+77) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (t_1 <= 5e+274) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = Float64(c * Float64(-27.0 * Float64(Float64(j * k) / c))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -5e+84)
tmp = (b * c) - t_1;
elseif (t_1 <= 1e-167)
tmp = c * (b + (-4.0 * ((t * a) / c)));
elseif (t_1 <= 1e+77)
tmp = (b * c) - (4.0 * (x * i));
elseif (t_1 <= 5e+274)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = c * (-27.0 * ((j * k) / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+84], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 1e-167], N[(c * N[(b + N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+77], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+274], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(-27.0 * N[(N[(j * k), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+84}:\\
\;\;\;\;b \cdot c - t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{-167}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \frac{t \cdot a}{c}\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+77}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+274}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(-27 \cdot \frac{j \cdot k}{c}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000001e84Initial program 90.6%
Taylor expanded in x around 0 86.4%
Taylor expanded in b around inf 68.8%
if -5.0000000000000001e84 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e-167Initial program 87.6%
Simplified88.5%
Taylor expanded in c around inf 81.0%
Taylor expanded in x around 0 55.8%
Taylor expanded in j around 0 55.1%
if 1e-167 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999983e76Initial program 93.2%
Simplified95.4%
Taylor expanded in j around 0 90.9%
Taylor expanded in t around 0 65.3%
if 9.99999999999999983e76 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999998e274Initial program 82.2%
Simplified85.8%
Taylor expanded in c around inf 61.4%
Taylor expanded in y around inf 51.9%
if 4.9999999999999998e274 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 71.4%
Simplified71.3%
Taylor expanded in c around inf 64.3%
Taylor expanded in x around 0 85.7%
Taylor expanded in j around inf 85.7%
Final simplification60.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) (* j (* k -27.0))))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* 4.0 a)))))
(if (<= t -3.7e-50)
t_2
(if (<= t -6.2e-274)
t_1
(if (<= t 4.7e-31)
(- (* b c) (* 4.0 (* x i)))
(if (<= t 1.15e+55)
t_2
(if (<= t 1.55e+90)
t_1
(if (<= t 6.5e+112)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
t_2))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = t * ((18.0 * (x * (y * z))) - (4.0 * a));
double tmp;
if (t <= -3.7e-50) {
tmp = t_2;
} else if (t <= -6.2e-274) {
tmp = t_1;
} else if (t <= 4.7e-31) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t <= 1.15e+55) {
tmp = t_2;
} else if (t <= 1.55e+90) {
tmp = t_1;
} else if (t <= 6.5e+112) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
t_2 = t * ((18.0d0 * (x * (y * z))) - (4.0d0 * a))
if (t <= (-3.7d-50)) then
tmp = t_2
else if (t <= (-6.2d-274)) then
tmp = t_1
else if (t <= 4.7d-31) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (t <= 1.15d+55) then
tmp = t_2
else if (t <= 1.55d+90) then
tmp = t_1
else if (t <= 6.5d+112) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = t * ((18.0 * (x * (y * z))) - (4.0 * a));
double tmp;
if (t <= -3.7e-50) {
tmp = t_2;
} else if (t <= -6.2e-274) {
tmp = t_1;
} else if (t <= 4.7e-31) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t <= 1.15e+55) {
tmp = t_2;
} else if (t <= 1.55e+90) {
tmp = t_1;
} else if (t <= 6.5e+112) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) t_2 = t * ((18.0 * (x * (y * z))) - (4.0 * a)) tmp = 0 if t <= -3.7e-50: tmp = t_2 elif t <= -6.2e-274: tmp = t_1 elif t <= 4.7e-31: tmp = (b * c) - (4.0 * (x * i)) elif t <= 1.15e+55: tmp = t_2 elif t <= 1.55e+90: tmp = t_1 elif t <= 6.5e+112: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(4.0 * a))) tmp = 0.0 if (t <= -3.7e-50) tmp = t_2; elseif (t <= -6.2e-274) tmp = t_1; elseif (t <= 4.7e-31) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (t <= 1.15e+55) tmp = t_2; elseif (t <= 1.55e+90) tmp = t_1; elseif (t <= 6.5e+112) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
t_2 = t * ((18.0 * (x * (y * z))) - (4.0 * a));
tmp = 0.0;
if (t <= -3.7e-50)
tmp = t_2;
elseif (t <= -6.2e-274)
tmp = t_1;
elseif (t <= 4.7e-31)
tmp = (b * c) - (4.0 * (x * i));
elseif (t <= 1.15e+55)
tmp = t_2;
elseif (t <= 1.55e+90)
tmp = t_1;
elseif (t <= 6.5e+112)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e-50], t$95$2, If[LessEqual[t, -6.2e-274], t$95$1, If[LessEqual[t, 4.7e-31], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+55], t$95$2, If[LessEqual[t, 1.55e+90], t$95$1, If[LessEqual[t, 6.5e+112], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $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 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{-50}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -6.2 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{-31}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+55}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+112}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.7000000000000001e-50 or 4.69999999999999987e-31 < t < 1.14999999999999994e55 or 6.4999999999999998e112 < t Initial program 90.2%
Simplified91.0%
Taylor expanded in c around inf 78.5%
Taylor expanded in t around -inf 68.3%
if -3.7000000000000001e-50 < t < -6.19999999999999956e-274 or 1.14999999999999994e55 < t < 1.54999999999999994e90Initial program 87.4%
Simplified92.7%
Taylor expanded in b around inf 72.8%
if -6.19999999999999956e-274 < t < 4.69999999999999987e-31Initial program 82.7%
Simplified83.0%
Taylor expanded in j around 0 71.8%
Taylor expanded in t around 0 62.8%
if 1.54999999999999994e90 < t < 6.4999999999999998e112Initial program 79.7%
Simplified99.7%
Taylor expanded in x around inf 81.2%
Final simplification68.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* 4.0 a)))))
(t_2 (* (* j 27.0) k)))
(if (or (<= t_2 -5e+84) (not (<= t_2 2e+33)))
(- t_1 (* 27.0 (* j k)))
(- t_1 (* 4.0 (* x i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (4.0 * a)));
double t_2 = (j * 27.0) * k;
double tmp;
if ((t_2 <= -5e+84) || !(t_2 <= 2e+33)) {
tmp = t_1 - (27.0 * (j * k));
} else {
tmp = t_1 - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (4.0d0 * a)))
t_2 = (j * 27.0d0) * k
if ((t_2 <= (-5d+84)) .or. (.not. (t_2 <= 2d+33))) then
tmp = t_1 - (27.0d0 * (j * k))
else
tmp = t_1 - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (4.0 * a)));
double t_2 = (j * 27.0) * k;
double tmp;
if ((t_2 <= -5e+84) || !(t_2 <= 2e+33)) {
tmp = t_1 - (27.0 * (j * k));
} else {
tmp = t_1 - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (4.0 * a))) t_2 = (j * 27.0) * k tmp = 0 if (t_2 <= -5e+84) or not (t_2 <= 2e+33): tmp = t_1 - (27.0 * (j * k)) else: tmp = t_1 - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(4.0 * a)))) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((t_2 <= -5e+84) || !(t_2 <= 2e+33)) tmp = Float64(t_1 - Float64(27.0 * Float64(j * k))); else tmp = Float64(t_1 - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (4.0 * a)));
t_2 = (j * 27.0) * k;
tmp = 0.0;
if ((t_2 <= -5e+84) || ~((t_2 <= 2e+33)))
tmp = t_1 - (27.0 * (j * k));
else
tmp = t_1 - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -5e+84], N[Not[LessEqual[t$95$2, 2e+33]], $MachinePrecision]], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+84} \lor \neg \left(t\_2 \leq 2 \cdot 10^{+33}\right):\\
\;\;\;\;t\_1 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000001e84 or 1.9999999999999999e33 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.2%
Simplified85.5%
Taylor expanded in i around 0 85.2%
if -5.0000000000000001e84 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.9999999999999999e33Initial program 89.4%
Simplified90.7%
Taylor expanded in j around 0 89.5%
Final simplification88.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -5e+35)
(- (+ (* b c) (* 18.0 (* t (* z (* y x))))) t_1)
(if (<= t_1 2e+33)
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* 4.0 a))))
(* 4.0 (* x i)))
(- (+ (* b c) (* y (* z (* t (* 18.0 x))))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+35) {
tmp = ((b * c) + (18.0 * (t * (z * (y * x))))) - t_1;
} else if (t_1 <= 2e+33) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (4.0 * a)))) - (4.0 * (x * i));
} else {
tmp = ((b * c) + (y * (z * (t * (18.0 * x))))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-5d+35)) then
tmp = ((b * c) + (18.0d0 * (t * (z * (y * x))))) - t_1
else if (t_1 <= 2d+33) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (4.0d0 * a)))) - (4.0d0 * (x * i))
else
tmp = ((b * c) + (y * (z * (t * (18.0d0 * x))))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+35) {
tmp = ((b * c) + (18.0 * (t * (z * (y * x))))) - t_1;
} else if (t_1 <= 2e+33) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (4.0 * a)))) - (4.0 * (x * i));
} else {
tmp = ((b * c) + (y * (z * (t * (18.0 * x))))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -5e+35: tmp = ((b * c) + (18.0 * (t * (z * (y * x))))) - t_1 elif t_1 <= 2e+33: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (4.0 * a)))) - (4.0 * (x * i)) else: tmp = ((b * c) + (y * (z * (t * (18.0 * x))))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -5e+35) tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(z * Float64(y * x))))) - t_1); elseif (t_1 <= 2e+33) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(4.0 * a)))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(y * Float64(z * Float64(t * Float64(18.0 * x))))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -5e+35)
tmp = ((b * c) + (18.0 * (t * (z * (y * x))))) - t_1;
elseif (t_1 <= 2e+33)
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (4.0 * a)))) - (4.0 * (x * i));
else
tmp = ((b * c) + (y * (z * (t * (18.0 * x))))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+35], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 2e+33], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(z * N[(t * N[(18.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+35}:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot \left(z \cdot \left(y \cdot x\right)\right)\right)\right) - t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+33}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + y \cdot \left(z \cdot \left(t \cdot \left(18 \cdot x\right)\right)\right)\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.00000000000000021e35Initial program 92.1%
Taylor expanded in x around 0 83.0%
Taylor expanded in a around 0 79.6%
pow179.6%
Applied egg-rr79.6%
unpow179.6%
associate-*r*77.8%
Simplified77.8%
Taylor expanded in t around inf 80.9%
associate-*r*84.5%
*-commutative84.5%
Simplified84.5%
if -5.00000000000000021e35 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.9999999999999999e33Initial program 88.9%
Simplified90.8%
Taylor expanded in j around 0 89.6%
if 1.9999999999999999e33 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 77.8%
Taylor expanded in x around 0 82.4%
Taylor expanded in a around 0 80.4%
pow180.4%
Applied egg-rr80.4%
unpow180.4%
associate-*r*84.6%
Simplified84.6%
Taylor expanded in t around inf 77.9%
associate-*r*78.0%
associate-*r*78.0%
*-commutative78.0%
associate-*r*80.1%
*-commutative80.1%
associate-*r*80.1%
Simplified80.1%
Final simplification86.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* 4.0 a)))))
(t_2 (* (* j 27.0) k)))
(if (<= t_2 -5e+84)
(- t_1 (* 27.0 (* j k)))
(if (<= t_2 200.0)
(- t_1 (* 4.0 (* x i)))
(- (+ (* b c) (* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (t * ((18.0 * (x * (y * z))) - (4.0 * a)));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+84) {
tmp = t_1 - (27.0 * (j * k));
} else if (t_2 <= 200.0) {
tmp = t_1 - (4.0 * (x * i));
} else {
tmp = ((b * c) + (x * ((18.0 * (z * (y * t))) - (4.0 * i)))) - 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) + (t * ((18.0d0 * (x * (y * z))) - (4.0d0 * a)))
t_2 = (j * 27.0d0) * k
if (t_2 <= (-5d+84)) then
tmp = t_1 - (27.0d0 * (j * k))
else if (t_2 <= 200.0d0) then
tmp = t_1 - (4.0d0 * (x * i))
else
tmp = ((b * c) + (x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i)))) - 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) + (t * ((18.0 * (x * (y * z))) - (4.0 * a)));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+84) {
tmp = t_1 - (27.0 * (j * k));
} else if (t_2 <= 200.0) {
tmp = t_1 - (4.0 * (x * i));
} else {
tmp = ((b * c) + (x * ((18.0 * (z * (y * t))) - (4.0 * i)))) - 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) + (t * ((18.0 * (x * (y * z))) - (4.0 * a))) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -5e+84: tmp = t_1 - (27.0 * (j * k)) elif t_2 <= 200.0: tmp = t_1 - (4.0 * (x * i)) else: tmp = ((b * c) + (x * ((18.0 * (z * (y * t))) - (4.0 * i)))) - t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(4.0 * a)))) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -5e+84) tmp = Float64(t_1 - Float64(27.0 * Float64(j * k))); elseif (t_2 <= 200.0) tmp = Float64(t_1 - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i)))) - 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) + (t * ((18.0 * (x * (y * z))) - (4.0 * a)));
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -5e+84)
tmp = t_1 - (27.0 * (j * k));
elseif (t_2 <= 200.0)
tmp = t_1 - (4.0 * (x * i));
else
tmp = ((b * c) + (x * ((18.0 * (z * (y * t))) - (4.0 * i)))) - t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+84], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 200.0], N[(t$95$1 - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+84}:\\
\;\;\;\;t\_1 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t\_2 \leq 200:\\
\;\;\;\;t\_1 - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\right) - t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000001e84Initial program 90.6%
Simplified91.0%
Taylor expanded in i around 0 88.2%
if -5.0000000000000001e84 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 200Initial program 89.2%
Simplified90.4%
Taylor expanded in j around 0 89.3%
if 200 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 79.7%
Taylor expanded in x around 0 83.9%
Taylor expanded in a around 0 82.0%
pow182.0%
Applied egg-rr82.0%
unpow182.0%
associate-*r*85.9%
Simplified85.9%
Final simplification88.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* j (* k -27.0)) (* (* t a) -4.0))))
(if (<= (* b c) -2e+132)
(* c (+ b (* -4.0 (/ (* t a) c))))
(if (<= (* b c) 2e-109)
t_1
(if (<= (* b c) 5e+106)
(+ (* -27.0 (* j k)) (* -4.0 (* x i)))
(if (<= (* b c) 2e+148) t_1 (- (* b c) (* 4.0 (* x i)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + ((t * a) * -4.0);
double tmp;
if ((b * c) <= -2e+132) {
tmp = c * (b + (-4.0 * ((t * a) / c)));
} else if ((b * c) <= 2e-109) {
tmp = t_1;
} else if ((b * c) <= 5e+106) {
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
} else if ((b * c) <= 2e+148) {
tmp = t_1;
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + ((t * a) * (-4.0d0))
if ((b * c) <= (-2d+132)) then
tmp = c * (b + ((-4.0d0) * ((t * a) / c)))
else if ((b * c) <= 2d-109) then
tmp = t_1
else if ((b * c) <= 5d+106) then
tmp = ((-27.0d0) * (j * k)) + ((-4.0d0) * (x * i))
else if ((b * c) <= 2d+148) then
tmp = t_1
else
tmp = (b * c) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + ((t * a) * -4.0);
double tmp;
if ((b * c) <= -2e+132) {
tmp = c * (b + (-4.0 * ((t * a) / c)));
} else if ((b * c) <= 2e-109) {
tmp = t_1;
} else if ((b * c) <= 5e+106) {
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
} else if ((b * c) <= 2e+148) {
tmp = t_1;
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (k * -27.0)) + ((t * a) * -4.0) tmp = 0 if (b * c) <= -2e+132: tmp = c * (b + (-4.0 * ((t * a) / c))) elif (b * c) <= 2e-109: tmp = t_1 elif (b * c) <= 5e+106: tmp = (-27.0 * (j * k)) + (-4.0 * (x * i)) elif (b * c) <= 2e+148: tmp = t_1 else: tmp = (b * c) - (4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(Float64(t * a) * -4.0)) tmp = 0.0 if (Float64(b * c) <= -2e+132) tmp = Float64(c * Float64(b + Float64(-4.0 * Float64(Float64(t * a) / c)))); elseif (Float64(b * c) <= 2e-109) tmp = t_1; elseif (Float64(b * c) <= 5e+106) tmp = Float64(Float64(-27.0 * Float64(j * k)) + Float64(-4.0 * Float64(x * i))); elseif (Float64(b * c) <= 2e+148) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (k * -27.0)) + ((t * a) * -4.0);
tmp = 0.0;
if ((b * c) <= -2e+132)
tmp = c * (b + (-4.0 * ((t * a) / c)));
elseif ((b * c) <= 2e-109)
tmp = t_1;
elseif ((b * c) <= 5e+106)
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
elseif ((b * c) <= 2e+148)
tmp = t_1;
else
tmp = (b * c) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+132], N[(c * N[(b + N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e-109], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5e+106], N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+148], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + \left(t \cdot a\right) \cdot -4\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+132}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \frac{t \cdot a}{c}\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+106}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.99999999999999998e132Initial program 78.1%
Simplified76.1%
Taylor expanded in c around inf 78.3%
Taylor expanded in x around 0 80.2%
Taylor expanded in j around 0 75.7%
if -1.99999999999999998e132 < (*.f64 b c) < 2e-109 or 4.9999999999999998e106 < (*.f64 b c) < 2.0000000000000001e148Initial program 92.3%
Simplified95.4%
Taylor expanded in a around inf 55.2%
*-commutative55.2%
Simplified55.2%
if 2e-109 < (*.f64 b c) < 4.9999999999999998e106Initial program 83.9%
Simplified90.1%
Taylor expanded in i around inf 45.8%
associate-*r*45.8%
*-commutative45.8%
associate-*r*45.8%
*-commutative45.8%
*-commutative45.8%
Simplified45.8%
Taylor expanded in i around 0 45.8%
if 2.0000000000000001e148 < (*.f64 b c) Initial program 86.8%
Simplified84.4%
Taylor expanded in j around 0 87.0%
Taylor expanded in t around 0 82.0%
Final simplification60.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 (<= (* b c) -2e+132)
(* c (+ b (* -4.0 (/ (* t a) c))))
(if (<= (* b c) 2e-109)
(+ (* j (* k -27.0)) (* (* t a) -4.0))
(if (<= (* b c) 5e+106)
(+ (* -27.0 (* j k)) (* -4.0 (* x i)))
(if (<= (* b c) 2e+148)
(- (* t (* a -4.0)) (* (* j 27.0) k))
(- (* b c) (* 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 ((b * c) <= -2e+132) {
tmp = c * (b + (-4.0 * ((t * a) / c)));
} else if ((b * c) <= 2e-109) {
tmp = (j * (k * -27.0)) + ((t * a) * -4.0);
} else if ((b * c) <= 5e+106) {
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
} else if ((b * c) <= 2e+148) {
tmp = (t * (a * -4.0)) - ((j * 27.0) * k);
} else {
tmp = (b * c) - (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 ((b * c) <= (-2d+132)) then
tmp = c * (b + ((-4.0d0) * ((t * a) / c)))
else if ((b * c) <= 2d-109) then
tmp = (j * (k * (-27.0d0))) + ((t * a) * (-4.0d0))
else if ((b * c) <= 5d+106) then
tmp = ((-27.0d0) * (j * k)) + ((-4.0d0) * (x * i))
else if ((b * c) <= 2d+148) then
tmp = (t * (a * (-4.0d0))) - ((j * 27.0d0) * k)
else
tmp = (b * c) - (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 ((b * c) <= -2e+132) {
tmp = c * (b + (-4.0 * ((t * a) / c)));
} else if ((b * c) <= 2e-109) {
tmp = (j * (k * -27.0)) + ((t * a) * -4.0);
} else if ((b * c) <= 5e+106) {
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
} else if ((b * c) <= 2e+148) {
tmp = (t * (a * -4.0)) - ((j * 27.0) * k);
} else {
tmp = (b * c) - (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 (b * c) <= -2e+132: tmp = c * (b + (-4.0 * ((t * a) / c))) elif (b * c) <= 2e-109: tmp = (j * (k * -27.0)) + ((t * a) * -4.0) elif (b * c) <= 5e+106: tmp = (-27.0 * (j * k)) + (-4.0 * (x * i)) elif (b * c) <= 2e+148: tmp = (t * (a * -4.0)) - ((j * 27.0) * k) else: tmp = (b * c) - (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 (Float64(b * c) <= -2e+132) tmp = Float64(c * Float64(b + Float64(-4.0 * Float64(Float64(t * a) / c)))); elseif (Float64(b * c) <= 2e-109) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(Float64(t * a) * -4.0)); elseif (Float64(b * c) <= 5e+106) tmp = Float64(Float64(-27.0 * Float64(j * k)) + Float64(-4.0 * Float64(x * i))); elseif (Float64(b * c) <= 2e+148) tmp = Float64(Float64(t * Float64(a * -4.0)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(b * c) - 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 ((b * c) <= -2e+132)
tmp = c * (b + (-4.0 * ((t * a) / c)));
elseif ((b * c) <= 2e-109)
tmp = (j * (k * -27.0)) + ((t * a) * -4.0);
elseif ((b * c) <= 5e+106)
tmp = (-27.0 * (j * k)) + (-4.0 * (x * i));
elseif ((b * c) <= 2e+148)
tmp = (t * (a * -4.0)) - ((j * 27.0) * k);
else
tmp = (b * c) - (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[LessEqual[N[(b * c), $MachinePrecision], -2e+132], N[(c * N[(b + N[(-4.0 * N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e-109], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e+106], N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+148], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+132}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \frac{t \cdot a}{c}\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-109}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+106}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+148}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.99999999999999998e132Initial program 78.1%
Simplified76.1%
Taylor expanded in c around inf 78.3%
Taylor expanded in x around 0 80.2%
Taylor expanded in j around 0 75.7%
if -1.99999999999999998e132 < (*.f64 b c) < 2e-109Initial program 92.3%
Simplified95.7%
Taylor expanded in a around inf 55.5%
*-commutative55.5%
Simplified55.5%
if 2e-109 < (*.f64 b c) < 4.9999999999999998e106Initial program 83.9%
Simplified90.1%
Taylor expanded in i around inf 45.8%
associate-*r*45.8%
*-commutative45.8%
associate-*r*45.8%
*-commutative45.8%
*-commutative45.8%
Simplified45.8%
Taylor expanded in i around 0 45.8%
if 4.9999999999999998e106 < (*.f64 b c) < 2.0000000000000001e148Initial program 91.6%
Taylor expanded in x around 0 83.0%
Taylor expanded in a around inf 52.1%
associate-*r*52.1%
Simplified52.1%
if 2.0000000000000001e148 < (*.f64 b c) Initial program 86.8%
Simplified84.4%
Taylor expanded in j around 0 87.0%
Taylor expanded in t around 0 82.0%
Final simplification60.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 (<= (* b c) -5e+144)
(- (+ (* b c) (* y (* z (* t (* 18.0 x))))) (* (* j 27.0) k))
(-
(+ (* b c) (* t (- (* (* y z) (* 18.0 x)) (* 4.0 a))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+144) {
tmp = ((b * c) + (y * (z * (t * (18.0 * x))))) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * (((y * z) * (18.0 * x)) - (4.0 * a)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-5d+144)) then
tmp = ((b * c) + (y * (z * (t * (18.0d0 * x))))) - ((j * 27.0d0) * k)
else
tmp = ((b * c) + (t * (((y * z) * (18.0d0 * x)) - (4.0d0 * a)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+144) {
tmp = ((b * c) + (y * (z * (t * (18.0 * x))))) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * (((y * z) * (18.0 * x)) - (4.0 * a)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -5e+144: tmp = ((b * c) + (y * (z * (t * (18.0 * x))))) - ((j * 27.0) * k) else: tmp = ((b * c) + (t * (((y * z) * (18.0 * x)) - (4.0 * a)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -5e+144) tmp = Float64(Float64(Float64(b * c) + Float64(y * Float64(z * Float64(t * Float64(18.0 * x))))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(18.0 * x)) - Float64(4.0 * a)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -5e+144)
tmp = ((b * c) + (y * (z * (t * (18.0 * x))))) - ((j * 27.0) * k);
else
tmp = ((b * c) + (t * (((y * z) * (18.0 * x)) - (4.0 * a)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -5e+144], N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(z * N[(t * N[(18.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(18.0 * x), $MachinePrecision]), $MachinePrecision] - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+144}:\\
\;\;\;\;\left(b \cdot c + y \cdot \left(z \cdot \left(t \cdot \left(18 \cdot x\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(18 \cdot x\right) - 4 \cdot a\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4.9999999999999999e144Initial program 79.2%
Taylor expanded in x around 0 74.3%
Taylor expanded in a around 0 76.9%
pow176.9%
Applied egg-rr76.9%
unpow176.9%
associate-*r*79.4%
Simplified79.4%
Taylor expanded in t around inf 79.5%
associate-*r*79.5%
associate-*r*79.5%
*-commutative79.5%
associate-*r*89.4%
*-commutative89.4%
associate-*r*89.4%
Simplified89.4%
if -4.9999999999999999e144 < (*.f64 b c) Initial program 89.1%
Simplified90.9%
Final simplification90.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* t (* x (* y z))))))
(if (<= t -4.4e+176)
t_1
(if (<= t -8e+79)
(* t (* a -4.0))
(if (<= t -2.7e-278)
(+ (* b c) (* j (* k -27.0)))
(if (<= t 7.8e+88) (- (* b c) (* 4.0 (* x i))) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -4.4e+176) {
tmp = t_1;
} else if (t <= -8e+79) {
tmp = t * (a * -4.0);
} else if (t <= -2.7e-278) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 7.8e+88) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (t * (x * (y * z)))
if (t <= (-4.4d+176)) then
tmp = t_1
else if (t <= (-8d+79)) then
tmp = t * (a * (-4.0d0))
else if (t <= (-2.7d-278)) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (t <= 7.8d+88) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double tmp;
if (t <= -4.4e+176) {
tmp = t_1;
} else if (t <= -8e+79) {
tmp = t * (a * -4.0);
} else if (t <= -2.7e-278) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 7.8e+88) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (t * (x * (y * z))) tmp = 0 if t <= -4.4e+176: tmp = t_1 elif t <= -8e+79: tmp = t * (a * -4.0) elif t <= -2.7e-278: tmp = (b * c) + (j * (k * -27.0)) elif t <= 7.8e+88: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (t <= -4.4e+176) tmp = t_1; elseif (t <= -8e+79) tmp = Float64(t * Float64(a * -4.0)); elseif (t <= -2.7e-278) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (t <= 7.8e+88) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if (t <= -4.4e+176)
tmp = t_1;
elseif (t <= -8e+79)
tmp = t * (a * -4.0);
elseif (t <= -2.7e-278)
tmp = (b * c) + (j * (k * -27.0));
elseif (t <= 7.8e+88)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e+176], t$95$1, If[LessEqual[t, -8e+79], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.7e-278], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+88], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{+176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8 \cdot 10^{+79}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{-278}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+88}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.40000000000000015e176 or 7.8000000000000002e88 < t Initial program 84.9%
Simplified88.6%
Taylor expanded in c around inf 74.7%
Taylor expanded in y around inf 49.1%
if -4.40000000000000015e176 < t < -7.99999999999999974e79Initial program 94.9%
Simplified95.0%
Taylor expanded in c around inf 95.1%
Taylor expanded in a around inf 51.8%
*-commutative51.8%
*-commutative51.8%
associate-*r*51.8%
Simplified51.8%
if -7.99999999999999974e79 < t < -2.7000000000000001e-278Initial program 93.3%
Simplified93.3%
Taylor expanded in b around inf 60.1%
if -2.7000000000000001e-278 < t < 7.8000000000000002e88Initial program 83.4%
Simplified83.6%
Taylor expanded in j around 0 73.0%
Taylor expanded in t around 0 56.8%
Final simplification54.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* x (* y z)))))
(if (<= t -1.55e+82)
(+ (* j (* k -27.0)) (* t (+ t_1 (* a -4.0))))
(if (<= t 5.1e+90)
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) (* (* j 27.0) k))
(+ (* b c) (* t (- t_1 (* 4.0 a))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -1.55e+82) {
tmp = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0)));
} else if (t <= 5.1e+90) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
} else {
tmp = (b * c) + (t * (t_1 - (4.0 * a)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
if (t <= (-1.55d+82)) then
tmp = (j * (k * (-27.0d0))) + (t * (t_1 + (a * (-4.0d0))))
else if (t <= 5.1d+90) then
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - ((j * 27.0d0) * k)
else
tmp = (b * c) + (t * (t_1 - (4.0d0 * a)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -1.55e+82) {
tmp = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0)));
} else if (t <= 5.1e+90) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
} else {
tmp = (b * c) + (t * (t_1 - (4.0 * a)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) tmp = 0 if t <= -1.55e+82: tmp = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0))) elif t <= 5.1e+90: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k) else: tmp = (b * c) + (t * (t_1 - (4.0 * a))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) tmp = 0.0 if (t <= -1.55e+82) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(t_1 + Float64(a * -4.0)))); elseif (t <= 5.1e+90) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(4.0 * a)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
tmp = 0.0;
if (t <= -1.55e+82)
tmp = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0)));
elseif (t <= 5.1e+90)
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - ((j * 27.0) * k);
else
tmp = (b * c) + (t * (t_1 - (4.0 * a)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e+82], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.1e+90], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+82}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(t\_1 + a \cdot -4\right)\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{+90}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t \cdot \left(t\_1 - 4 \cdot a\right)\\
\end{array}
\end{array}
if t < -1.55000000000000016e82Initial program 88.3%
Simplified92.2%
Taylor expanded in t around inf 88.6%
if -1.55000000000000016e82 < t < 5.09999999999999959e90Initial program 88.3%
Taylor expanded in y around 0 82.7%
distribute-lft-out82.7%
*-commutative82.7%
Simplified82.7%
if 5.09999999999999959e90 < t Initial program 84.3%
Simplified88.6%
Taylor expanded in j around 0 84.4%
Taylor expanded in i around 0 82.2%
Final simplification83.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* 4.0 a)))))
(if (<= t -3.6e-50)
t_1
(if (<= t -1e-277)
(+ (* b c) (* j (* k -27.0)))
(if (<= t 9.8e-29) (- (* b c) (* 4.0 (* x i))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (4.0 * a));
double tmp;
if (t <= -3.6e-50) {
tmp = t_1;
} else if (t <= -1e-277) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 9.8e-29) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (4.0d0 * a))
if (t <= (-3.6d-50)) then
tmp = t_1
else if (t <= (-1d-277)) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (t <= 9.8d-29) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (4.0 * a));
double tmp;
if (t <= -3.6e-50) {
tmp = t_1;
} else if (t <= -1e-277) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 9.8e-29) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (4.0 * a)) tmp = 0 if t <= -3.6e-50: tmp = t_1 elif t <= -1e-277: tmp = (b * c) + (j * (k * -27.0)) elif t <= 9.8e-29: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(4.0 * a))) tmp = 0.0 if (t <= -3.6e-50) tmp = t_1; elseif (t <= -1e-277) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (t <= 9.8e-29) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) - (4.0 * a));
tmp = 0.0;
if (t <= -3.6e-50)
tmp = t_1;
elseif (t <= -1e-277)
tmp = (b * c) + (j * (k * -27.0));
elseif (t <= 9.8e-29)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.6e-50], t$95$1, If[LessEqual[t, -1e-277], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.8e-29], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-277}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-29}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.59999999999999979e-50 or 9.7999999999999997e-29 < t Initial program 88.3%
Simplified89.7%
Taylor expanded in c around inf 76.3%
Taylor expanded in t around -inf 65.7%
if -3.59999999999999979e-50 < t < -9.99999999999999969e-278Initial program 91.8%
Simplified93.7%
Taylor expanded in b around inf 72.9%
if -9.99999999999999969e-278 < t < 9.7999999999999997e-29Initial program 82.7%
Simplified83.0%
Taylor expanded in j around 0 71.8%
Taylor expanded in t around 0 62.8%
Final simplification66.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 (<= x -2.3e+66) (not (<= x 1.7e+15))) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (- (+ (* b c) (* (* t a) -4.0)) (* 27.0 (* j k)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -2.3e+66) || !(x <= 1.7e+15)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-2.3d+66)) .or. (.not. (x <= 1.7d+15))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = ((b * c) + ((t * a) * (-4.0d0))) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -2.3e+66) || !(x <= 1.7e+15)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -2.3e+66) or not (x <= 1.7e+15): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -2.3e+66) || !(x <= 1.7e+15)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -2.3e+66) || ~((x <= 1.7e+15)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = ((b * c) + ((t * a) * -4.0)) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -2.3e+66], N[Not[LessEqual[x, 1.7e+15]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+66} \lor \neg \left(x \leq 1.7 \cdot 10^{+15}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if x < -2.3e66 or 1.7e15 < x Initial program 79.4%
Simplified86.2%
Taylor expanded in x around inf 71.9%
if -2.3e66 < x < 1.7e15Initial program 93.0%
Simplified90.6%
Taylor expanded in x around 0 78.3%
Final simplification75.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -1.95e+176)
(* 18.0 (* t (* x (* y z))))
(if (<= t -8e+79)
(* t (* a -4.0))
(if (<= t 1.9e+90)
(+ (* b c) (* j (* k -27.0)))
(* t (* (* 18.0 z) (* y x)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.95e+176) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (t <= -8e+79) {
tmp = t * (a * -4.0);
} else if (t <= 1.9e+90) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t * ((18.0 * z) * (y * x));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-1.95d+176)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (t <= (-8d+79)) then
tmp = t * (a * (-4.0d0))
else if (t <= 1.9d+90) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = t * ((18.0d0 * z) * (y * x))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.95e+176) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (t <= -8e+79) {
tmp = t * (a * -4.0);
} else if (t <= 1.9e+90) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t * ((18.0 * z) * (y * x));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -1.95e+176: tmp = 18.0 * (t * (x * (y * z))) elif t <= -8e+79: tmp = t * (a * -4.0) elif t <= 1.9e+90: tmp = (b * c) + (j * (k * -27.0)) else: tmp = t * ((18.0 * z) * (y * x)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -1.95e+176) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (t <= -8e+79) tmp = Float64(t * Float64(a * -4.0)); elseif (t <= 1.9e+90) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(t * Float64(Float64(18.0 * z) * Float64(y * x))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -1.95e+176)
tmp = 18.0 * (t * (x * (y * z)));
elseif (t <= -8e+79)
tmp = t * (a * -4.0);
elseif (t <= 1.9e+90)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = t * ((18.0 * z) * (y * x));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -1.95e+176], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8e+79], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e+90], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * z), $MachinePrecision] * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.95 \cdot 10^{+176}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq -8 \cdot 10^{+79}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+90}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(18 \cdot z\right) \cdot \left(y \cdot x\right)\right)\\
\end{array}
\end{array}
if t < -1.9500000000000001e176Initial program 85.2%
Simplified88.2%
Taylor expanded in c around inf 74.7%
Taylor expanded in y around inf 57.3%
if -1.9500000000000001e176 < t < -7.99999999999999974e79Initial program 94.9%
Simplified95.0%
Taylor expanded in c around inf 95.1%
Taylor expanded in a around inf 51.8%
*-commutative51.8%
*-commutative51.8%
associate-*r*51.8%
Simplified51.8%
if -7.99999999999999974e79 < t < 1.9000000000000001e90Initial program 88.2%
Simplified89.6%
Taylor expanded in b around inf 52.6%
if 1.9000000000000001e90 < t Initial program 84.3%
Simplified88.6%
Taylor expanded in c around inf 76.4%
Taylor expanded in y around inf 43.9%
*-commutative43.9%
associate-*r*44.0%
associate-*r*44.0%
*-commutative44.0%
associate-*r*43.9%
Simplified43.9%
Final simplification51.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 (* x (* i -4.0))))
(if (<= i -2.7e+137)
t_1
(if (<= i 9.5e-51) (* b c) (if (<= i 2.5e+78) (* j (* k -27.0)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double tmp;
if (i <= -2.7e+137) {
tmp = t_1;
} else if (i <= 9.5e-51) {
tmp = b * c;
} else if (i <= 2.5e+78) {
tmp = j * (k * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * (i * (-4.0d0))
if (i <= (-2.7d+137)) then
tmp = t_1
else if (i <= 9.5d-51) then
tmp = b * c
else if (i <= 2.5d+78) then
tmp = j * (k * (-27.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double tmp;
if (i <= -2.7e+137) {
tmp = t_1;
} else if (i <= 9.5e-51) {
tmp = b * c;
} else if (i <= 2.5e+78) {
tmp = j * (k * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * -4.0) tmp = 0 if i <= -2.7e+137: tmp = t_1 elif i <= 9.5e-51: tmp = b * c elif i <= 2.5e+78: tmp = j * (k * -27.0) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * -4.0)) tmp = 0.0 if (i <= -2.7e+137) tmp = t_1; elseif (i <= 9.5e-51) tmp = Float64(b * c); elseif (i <= 2.5e+78) tmp = Float64(j * Float64(k * -27.0)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (i * -4.0);
tmp = 0.0;
if (i <= -2.7e+137)
tmp = t_1;
elseif (i <= 9.5e-51)
tmp = b * c;
elseif (i <= 2.5e+78)
tmp = j * (k * -27.0);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -2.7e+137], t$95$1, If[LessEqual[i, 9.5e-51], N[(b * c), $MachinePrecision], If[LessEqual[i, 2.5e+78], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;i \leq -2.7 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 9.5 \cdot 10^{-51}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;i \leq 2.5 \cdot 10^{+78}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -2.70000000000000017e137 or 2.49999999999999992e78 < i Initial program 79.4%
Simplified82.2%
Taylor expanded in c around inf 70.9%
Taylor expanded in i around inf 49.1%
associate-*r*49.1%
metadata-eval49.1%
distribute-lft-neg-in49.1%
distribute-lft-neg-in49.1%
*-commutative49.1%
distribute-rgt-neg-in49.1%
distribute-lft-neg-in49.1%
metadata-eval49.1%
*-commutative49.1%
Simplified49.1%
if -2.70000000000000017e137 < i < 9.4999999999999998e-51Initial program 92.2%
Simplified92.8%
Taylor expanded in c around inf 81.8%
Taylor expanded in c around inf 34.2%
if 9.4999999999999998e-51 < i < 2.49999999999999992e78Initial program 84.9%
Simplified85.1%
Taylor expanded in y around inf 65.1%
Taylor expanded in t around 0 39.3%
associate-*r*39.2%
*-commutative39.2%
associate-*r*39.3%
Simplified39.3%
Final simplification39.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -2.7e+78) (not (<= (* b c) 7.8e+133))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.7e+78) || !((b * c) <= 7.8e+133)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-2.7d+78)) .or. (.not. ((b * c) <= 7.8d+133))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.7e+78) || !((b * c) <= 7.8e+133)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -2.7e+78) or not ((b * c) <= 7.8e+133): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -2.7e+78) || !(Float64(b * c) <= 7.8e+133)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -2.7e+78) || ~(((b * c) <= 7.8e+133)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -2.7e+78], N[Not[LessEqual[N[(b * c), $MachinePrecision], 7.8e+133]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.7 \cdot 10^{+78} \lor \neg \left(b \cdot c \leq 7.8 \cdot 10^{+133}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.70000000000000004e78 or 7.80000000000000028e133 < (*.f64 b c) Initial program 84.1%
Simplified82.1%
Taylor expanded in c around inf 83.2%
Taylor expanded in c around inf 62.2%
if -2.70000000000000004e78 < (*.f64 b c) < 7.80000000000000028e133Initial program 89.4%
Simplified93.6%
Taylor expanded in j around inf 26.2%
Final simplification38.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 (* 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 87.6%
Simplified88.9%
Taylor expanded in c around inf 76.6%
Taylor expanded in c around inf 26.4%
Final simplification26.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024082
(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)))