
(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 26 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= t -8000000000.0) (not (<= t 1.1e+17)))
(+
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
(* j (* k -27.0)))
(-
(-
(+ (- (* y (* (* x 18.0) (* t z))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -8000000000.0) || !(t <= 1.1e+17)) {
tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
} else {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -8000000000.0) || !(t <= 1.1e+17)) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(Float64(Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(t * z))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 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[Or[LessEqual[t, -8000000000.0], N[Not[LessEqual[t, 1.1e+17]], $MachinePrecision]], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\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 -8000000000 \lor \neg \left(t \leq 1.1 \cdot 10^{+17}\right):\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(t \cdot z\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if t < -8e9 or 1.1e17 < t Initial program 77.5%
Simplified90.5%
if -8e9 < t < 1.1e17Initial program 90.7%
pow190.7%
associate-*l*91.4%
*-commutative91.4%
Applied egg-rr91.4%
unpow191.4%
associate-*l*97.1%
*-commutative97.1%
Simplified97.1%
Final simplification94.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 (* z (* y (* x 18.0)))) (* t (* a 4.0))))
(* i (* x 4.0)))
(* k (* j 27.0)))))
(if (<= t_1 INFINITY) t_1 (* -4.0 (+ (* t a) (* x i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = -4.0 * ((t * a) + (x * 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) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = -4.0 * ((t * a) + (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = -4.0 * ((t * a) + (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 97.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%
Simplified41.2%
Taylor expanded in y around 0 55.9%
Taylor expanded in i around inf 61.9%
associate-*r*61.9%
*-commutative61.9%
Simplified61.9%
Taylor expanded in b around 0 59.4%
cancel-sign-sub-inv59.4%
metadata-eval59.4%
*-commutative59.4%
*-commutative59.4%
*-commutative59.4%
distribute-rgt-out59.4%
Simplified59.4%
Final simplification92.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -7e+31)
t_1
(if (<= t 7.4e-48)
(- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
(if (<= t 3.6e-31)
t_1
(if (<= t 5000.0)
(- (* b c) (* x (* i 4.0)))
(if (<= t 8.6e+76)
(+ (* b c) (* -4.0 (* t a)))
(if (<= t 3.5e+94)
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))
t_1))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -7e+31) {
tmp = t_1;
} else if (t <= 7.4e-48) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else if (t <= 3.6e-31) {
tmp = t_1;
} else if (t <= 5000.0) {
tmp = (b * c) - (x * (i * 4.0));
} else if (t <= 8.6e+76) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t <= 3.5e+94) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-7d+31)) then
tmp = t_1
else if (t <= 7.4d-48) then
tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
else if (t <= 3.6d-31) then
tmp = t_1
else if (t <= 5000.0d0) then
tmp = (b * c) - (x * (i * 4.0d0))
else if (t <= 8.6d+76) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (t <= 3.5d+94) then
tmp = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -7e+31) {
tmp = t_1;
} else if (t <= 7.4e-48) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else if (t <= 3.6e-31) {
tmp = t_1;
} else if (t <= 5000.0) {
tmp = (b * c) - (x * (i * 4.0));
} else if (t <= 8.6e+76) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t <= 3.5e+94) {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -7e+31: tmp = t_1 elif t <= 7.4e-48: tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) elif t <= 3.6e-31: tmp = t_1 elif t <= 5000.0: tmp = (b * c) - (x * (i * 4.0)) elif t <= 8.6e+76: tmp = (b * c) + (-4.0 * (t * a)) elif t <= 3.5e+94: tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -7e+31) tmp = t_1; elseif (t <= 7.4e-48) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); elseif (t <= 3.6e-31) tmp = t_1; elseif (t <= 5000.0) tmp = Float64(Float64(b * c) - Float64(x * Float64(i * 4.0))); elseif (t <= 8.6e+76) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (t <= 3.5e+94) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -7e+31)
tmp = t_1;
elseif (t <= 7.4e-48)
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
elseif (t <= 3.6e-31)
tmp = t_1;
elseif (t <= 5000.0)
tmp = (b * c) - (x * (i * 4.0));
elseif (t <= 8.6e+76)
tmp = (b * c) + (-4.0 * (t * a));
elseif (t <= 3.5e+94)
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e+31], t$95$1, If[LessEqual[t, 7.4e-48], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e-31], t$95$1, If[LessEqual[t, 5000.0], N[(N[(b * c), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.6e+76], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e+94], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -7 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{-48}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5000:\\
\;\;\;\;b \cdot c - x \cdot \left(i \cdot 4\right)\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{+76}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+94}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7e31 or 7.3999999999999996e-48 < t < 3.60000000000000004e-31 or 3.4999999999999997e94 < t Initial program 76.7%
Simplified87.8%
Taylor expanded in x around inf 86.0%
associate-*r*86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in t around inf 78.7%
if -7e31 < t < 7.3999999999999996e-48Initial program 89.3%
Simplified87.1%
Taylor expanded in t around 0 84.0%
if 3.60000000000000004e-31 < t < 5e3Initial program 100.0%
Simplified100.0%
Taylor expanded in t around 0 96.0%
Taylor expanded in i around inf 96.0%
associate-*r*96.0%
*-commutative96.0%
Simplified96.0%
if 5e3 < t < 8.59999999999999957e76Initial program 94.1%
Simplified100.0%
Taylor expanded in x around inf 94.4%
associate-*r*94.4%
*-commutative94.4%
Simplified94.4%
Taylor expanded in x around 0 76.9%
if 8.59999999999999957e76 < t < 3.4999999999999997e94Initial program 79.4%
Simplified79.4%
Taylor expanded in x around inf 80.3%
Final simplification81.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 (* i (* x 4.0))) (t_2 (* k (* j 27.0))))
(if (<= t -2.45e+147)
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(if (<= t 2e-29)
(-
(- (+ (- (* y (* (* x 18.0) (* t z))) (* t (* a 4.0))) (* b c)) t_1)
t_2)
(-
(- (- (* b c) (* t (+ (* a 4.0) (* (* y z) (* x -18.0))))) t_1)
t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = i * (x * 4.0);
double t_2 = k * (j * 27.0);
double tmp;
if (t <= -2.45e+147) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if (t <= 2e-29) {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - t_1) - t_2;
} else {
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - t_1) - 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 = i * (x * 4.0d0)
t_2 = k * (j * 27.0d0)
if (t <= (-2.45d+147)) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else if (t <= 2d-29) then
tmp = ((((y * ((x * 18.0d0) * (t * z))) - (t * (a * 4.0d0))) + (b * c)) - t_1) - t_2
else
tmp = (((b * c) - (t * ((a * 4.0d0) + ((y * z) * (x * (-18.0d0)))))) - t_1) - 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 = i * (x * 4.0);
double t_2 = k * (j * 27.0);
double tmp;
if (t <= -2.45e+147) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if (t <= 2e-29) {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - t_1) - t_2;
} else {
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - t_1) - 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 = i * (x * 4.0) t_2 = k * (j * 27.0) tmp = 0 if t <= -2.45e+147: tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) elif t <= 2e-29: tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - t_1) - t_2 else: tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - t_1) - 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(i * Float64(x * 4.0)) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t <= -2.45e+147) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); elseif (t <= 2e-29) tmp = Float64(Float64(Float64(Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(t * z))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - t_1) - t_2); else tmp = Float64(Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) + Float64(Float64(y * z) * Float64(x * -18.0))))) - t_1) - 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 = i * (x * 4.0);
t_2 = k * (j * 27.0);
tmp = 0.0;
if (t <= -2.45e+147)
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
elseif (t <= 2e-29)
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - t_1) - t_2;
else
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - t_1) - 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[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.45e+147], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-29], N[(N[(N[(N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] * N[(x * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $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 := i \cdot \left(x \cdot 4\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t \leq -2.45 \cdot 10^{+147}:\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-29}:\\
\;\;\;\;\left(\left(\left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(t \cdot z\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - t\_1\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c - t \cdot \left(a \cdot 4 + \left(y \cdot z\right) \cdot \left(x \cdot -18\right)\right)\right) - t\_1\right) - t\_2\\
\end{array}
\end{array}
if t < -2.4499999999999999e147Initial program 68.7%
Simplified81.3%
Taylor expanded in x around inf 84.4%
associate-*r*84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in i around 0 87.6%
if -2.4499999999999999e147 < t < 1.99999999999999989e-29Initial program 88.8%
pow188.8%
associate-*l*88.1%
*-commutative88.1%
Applied egg-rr88.1%
unpow188.1%
associate-*l*94.5%
*-commutative94.5%
Simplified94.5%
if 1.99999999999999989e-29 < t Initial program 82.8%
Taylor expanded in t around -inf 92.2%
associate-*r*92.2%
neg-mul-192.2%
cancel-sign-sub-inv92.2%
metadata-eval92.2%
associate-*r*92.1%
*-commutative92.1%
Simplified92.1%
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
(if (<= (* b c) -1e+43)
(- (* b c) (* x (* i 4.0)))
(if (or (<= (* b c) 5e+22)
(and (not (<= (* b c) 1e+80)) (<= (* b c) 6e+145)))
(* -4.0 (+ (* t a) (* x i)))
(* c (+ b (/ (* j (* k -27.0)) c))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1e+43) {
tmp = (b * c) - (x * (i * 4.0));
} else if (((b * c) <= 5e+22) || (!((b * c) <= 1e+80) && ((b * c) <= 6e+145))) {
tmp = -4.0 * ((t * a) + (x * i));
} else {
tmp = c * (b + ((j * (k * -27.0)) / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-1d+43)) then
tmp = (b * c) - (x * (i * 4.0d0))
else if (((b * c) <= 5d+22) .or. (.not. ((b * c) <= 1d+80)) .and. ((b * c) <= 6d+145)) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else
tmp = c * (b + ((j * (k * (-27.0d0))) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1e+43) {
tmp = (b * c) - (x * (i * 4.0));
} else if (((b * c) <= 5e+22) || (!((b * c) <= 1e+80) && ((b * c) <= 6e+145))) {
tmp = -4.0 * ((t * a) + (x * i));
} else {
tmp = c * (b + ((j * (k * -27.0)) / c));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1e+43: tmp = (b * c) - (x * (i * 4.0)) elif ((b * c) <= 5e+22) or (not ((b * c) <= 1e+80) and ((b * c) <= 6e+145)): tmp = -4.0 * ((t * a) + (x * i)) else: tmp = c * (b + ((j * (k * -27.0)) / c)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1e+43) tmp = Float64(Float64(b * c) - Float64(x * Float64(i * 4.0))); elseif ((Float64(b * c) <= 5e+22) || (!(Float64(b * c) <= 1e+80) && (Float64(b * c) <= 6e+145))) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); else tmp = Float64(c * Float64(b + Float64(Float64(j * Float64(k * -27.0)) / c))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -1e+43)
tmp = (b * c) - (x * (i * 4.0));
elseif (((b * c) <= 5e+22) || (~(((b * c) <= 1e+80)) && ((b * c) <= 6e+145)))
tmp = -4.0 * ((t * a) + (x * i));
else
tmp = c * (b + ((j * (k * -27.0)) / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1e+43], N[(N[(b * c), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(b * c), $MachinePrecision], 5e+22], And[N[Not[LessEqual[N[(b * c), $MachinePrecision], 1e+80]], $MachinePrecision], LessEqual[N[(b * c), $MachinePrecision], 6e+145]]], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(b + N[(N[(j * N[(k * -27.0), $MachinePrecision]), $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}
\mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+43}:\\
\;\;\;\;b \cdot c - x \cdot \left(i \cdot 4\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+22} \lor \neg \left(b \cdot c \leq 10^{+80}\right) \land b \cdot c \leq 6 \cdot 10^{+145}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(b + \frac{j \cdot \left(k \cdot -27\right)}{c}\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.00000000000000001e43Initial program 86.8%
Simplified90.1%
Taylor expanded in t around 0 76.1%
Taylor expanded in i around inf 68.0%
associate-*r*75.5%
*-commutative75.5%
Simplified68.0%
if -1.00000000000000001e43 < (*.f64 b c) < 4.9999999999999996e22 or 1e80 < (*.f64 b c) < 6.0000000000000005e145Initial program 83.2%
Simplified87.8%
Taylor expanded in y around 0 80.5%
Taylor expanded in i around inf 68.4%
associate-*r*68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in b around 0 64.6%
cancel-sign-sub-inv64.6%
metadata-eval64.6%
*-commutative64.6%
*-commutative64.6%
*-commutative64.6%
distribute-rgt-out64.6%
Simplified64.6%
if 4.9999999999999996e22 < (*.f64 b c) < 1e80 or 6.0000000000000005e145 < (*.f64 b c) Initial program 87.8%
Simplified87.7%
Taylor expanded in t around 0 83.0%
Taylor expanded in i around 0 79.4%
Taylor expanded in c around inf 82.0%
associate-*r/82.0%
*-commutative82.0%
associate-*r*82.0%
Simplified82.0%
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
(if (<= (* b c) -1e+43)
(- (* b c) (* x (* i 4.0)))
(if (<= (* b c) 4e+26)
(* -4.0 (+ (* t a) (* x i)))
(if (or (<= (* b c) 5e+97) (not (<= (* b c) 4e+134)))
(* j (- (/ (* b c) j) (* k 27.0)))
(+ (* b c) (* -4.0 (* t a)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1e+43) {
tmp = (b * c) - (x * (i * 4.0));
} else if ((b * c) <= 4e+26) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (((b * c) <= 5e+97) || !((b * c) <= 4e+134)) {
tmp = j * (((b * c) / j) - (k * 27.0));
} else {
tmp = (b * c) + (-4.0 * (t * a));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-1d+43)) then
tmp = (b * c) - (x * (i * 4.0d0))
else if ((b * c) <= 4d+26) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else if (((b * c) <= 5d+97) .or. (.not. ((b * c) <= 4d+134))) then
tmp = j * (((b * c) / j) - (k * 27.0d0))
else
tmp = (b * c) + ((-4.0d0) * (t * a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1e+43) {
tmp = (b * c) - (x * (i * 4.0));
} else if ((b * c) <= 4e+26) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (((b * c) <= 5e+97) || !((b * c) <= 4e+134)) {
tmp = j * (((b * c) / j) - (k * 27.0));
} else {
tmp = (b * c) + (-4.0 * (t * a));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1e+43: tmp = (b * c) - (x * (i * 4.0)) elif (b * c) <= 4e+26: tmp = -4.0 * ((t * a) + (x * i)) elif ((b * c) <= 5e+97) or not ((b * c) <= 4e+134): tmp = j * (((b * c) / j) - (k * 27.0)) else: tmp = (b * c) + (-4.0 * (t * a)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1e+43) tmp = Float64(Float64(b * c) - Float64(x * Float64(i * 4.0))); elseif (Float64(b * c) <= 4e+26) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); elseif ((Float64(b * c) <= 5e+97) || !(Float64(b * c) <= 4e+134)) tmp = Float64(j * Float64(Float64(Float64(b * c) / j) - Float64(k * 27.0))); else tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -1e+43)
tmp = (b * c) - (x * (i * 4.0));
elseif ((b * c) <= 4e+26)
tmp = -4.0 * ((t * a) + (x * i));
elseif (((b * c) <= 5e+97) || ~(((b * c) <= 4e+134)))
tmp = j * (((b * c) / j) - (k * 27.0));
else
tmp = (b * c) + (-4.0 * (t * a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1e+43], N[(N[(b * c), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4e+26], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(b * c), $MachinePrecision], 5e+97], N[Not[LessEqual[N[(b * c), $MachinePrecision], 4e+134]], $MachinePrecision]], N[(j * N[(N[(N[(b * c), $MachinePrecision] / j), $MachinePrecision] - N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $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 -1 \cdot 10^{+43}:\\
\;\;\;\;b \cdot c - x \cdot \left(i \cdot 4\right)\\
\mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{+26}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+97} \lor \neg \left(b \cdot c \leq 4 \cdot 10^{+134}\right):\\
\;\;\;\;j \cdot \left(\frac{b \cdot c}{j} - k \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.00000000000000001e43Initial program 86.8%
Simplified90.1%
Taylor expanded in t around 0 76.1%
Taylor expanded in i around inf 68.0%
associate-*r*75.5%
*-commutative75.5%
Simplified68.0%
if -1.00000000000000001e43 < (*.f64 b c) < 4.00000000000000019e26Initial program 83.4%
Simplified88.3%
Taylor expanded in y around 0 79.2%
Taylor expanded in i around inf 66.2%
associate-*r*66.2%
*-commutative66.2%
Simplified66.2%
Taylor expanded in b around 0 64.2%
cancel-sign-sub-inv64.2%
metadata-eval64.2%
*-commutative64.2%
*-commutative64.2%
*-commutative64.2%
distribute-rgt-out64.2%
Simplified64.2%
if 4.00000000000000019e26 < (*.f64 b c) < 4.99999999999999999e97 or 3.99999999999999969e134 < (*.f64 b c) Initial program 85.7%
Simplified85.6%
Taylor expanded in t around 0 85.7%
Taylor expanded in i around 0 77.7%
Taylor expanded in j around inf 86.7%
if 4.99999999999999999e97 < (*.f64 b c) < 3.99999999999999969e134Initial program 88.9%
Simplified89.5%
Taylor expanded in x around inf 89.5%
associate-*r*89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in x around 0 77.8%
Final simplification69.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 (* x (* i 4.0))) (t_2 (+ (* b c) (* -4.0 (* t a)))))
(if (<= i -2e+187)
(- t_2 t_1)
(if (<= i 6e+69)
(-
(+ (* b c) (* t (- (* z (* 18.0 (* x y))) (* a 4.0))))
(+ t_1 (* j (* k 27.0))))
(- t_2 (+ (* 4.0 (* x i)) (* 27.0 (* j k))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * 4.0);
double t_2 = (b * c) + (-4.0 * (t * a));
double tmp;
if (i <= -2e+187) {
tmp = t_2 - t_1;
} else if (i <= 6e+69) {
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - (t_1 + (j * (k * 27.0)));
} else {
tmp = t_2 - ((4.0 * (x * i)) + (27.0 * (j * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (i * 4.0d0)
t_2 = (b * c) + ((-4.0d0) * (t * a))
if (i <= (-2d+187)) then
tmp = t_2 - t_1
else if (i <= 6d+69) then
tmp = ((b * c) + (t * ((z * (18.0d0 * (x * y))) - (a * 4.0d0)))) - (t_1 + (j * (k * 27.0d0)))
else
tmp = t_2 - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * 4.0);
double t_2 = (b * c) + (-4.0 * (t * a));
double tmp;
if (i <= -2e+187) {
tmp = t_2 - t_1;
} else if (i <= 6e+69) {
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - (t_1 + (j * (k * 27.0)));
} else {
tmp = t_2 - ((4.0 * (x * i)) + (27.0 * (j * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * 4.0) t_2 = (b * c) + (-4.0 * (t * a)) tmp = 0 if i <= -2e+187: tmp = t_2 - t_1 elif i <= 6e+69: tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - (t_1 + (j * (k * 27.0))) else: tmp = t_2 - ((4.0 * (x * i)) + (27.0 * (j * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * 4.0)) t_2 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (i <= -2e+187) tmp = Float64(t_2 - t_1); elseif (i <= 6e+69) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(z * Float64(18.0 * Float64(x * y))) - Float64(a * 4.0)))) - Float64(t_1 + Float64(j * Float64(k * 27.0)))); else tmp = Float64(t_2 - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (i * 4.0);
t_2 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (i <= -2e+187)
tmp = t_2 - t_1;
elseif (i <= 6e+69)
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - (t_1 + (j * (k * 27.0)));
else
tmp = t_2 - ((4.0 * (x * i)) + (27.0 * (j * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -2e+187], N[(t$95$2 - t$95$1), $MachinePrecision], If[LessEqual[i, 6e+69], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(z * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * 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}
t_1 := x \cdot \left(i \cdot 4\right)\\
t_2 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;i \leq -2 \cdot 10^{+187}:\\
\;\;\;\;t\_2 - t\_1\\
\mathbf{elif}\;i \leq 6 \cdot 10^{+69}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\right) - \left(t\_1 + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if i < -1.99999999999999981e187Initial program 63.6%
Simplified68.2%
Taylor expanded in y around 0 90.9%
Taylor expanded in i around inf 95.5%
associate-*r*95.5%
*-commutative95.5%
Simplified95.5%
if -1.99999999999999981e187 < i < 5.99999999999999967e69Initial program 87.1%
Simplified90.0%
associate-*r*92.1%
distribute-rgt-out--87.1%
sub-neg87.1%
associate-*l*82.6%
*-commutative82.6%
*-commutative82.6%
Applied egg-rr82.6%
distribute-lft-neg-in82.6%
*-commutative82.6%
cancel-sign-sub-inv82.6%
*-commutative82.6%
associate-*r*87.1%
distribute-rgt-out--92.1%
*-commutative92.1%
*-commutative92.1%
associate-*r*92.1%
*-commutative92.1%
Simplified92.1%
if 5.99999999999999967e69 < i Initial program 85.7%
Simplified91.2%
Taylor expanded in y around 0 92.9%
Final simplification92.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 (+ (* t a) (* x i)))))
(if (<= (* b c) -1.4e+42)
(- (* b c) (* x (* i 4.0)))
(if (<= (* b c) 9e+52)
t_1
(if (<= (* b c) 4.5e+80)
(+ (* j (* k -27.0)) (* b c))
(if (<= (* b c) 7.8e+145) t_1 (- (* 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 t_1 = -4.0 * ((t * a) + (x * i));
double tmp;
if ((b * c) <= -1.4e+42) {
tmp = (b * c) - (x * (i * 4.0));
} else if ((b * c) <= 9e+52) {
tmp = t_1;
} else if ((b * c) <= 4.5e+80) {
tmp = (j * (k * -27.0)) + (b * c);
} else if ((b * c) <= 7.8e+145) {
tmp = t_1;
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * ((t * a) + (x * i))
if ((b * c) <= (-1.4d+42)) then
tmp = (b * c) - (x * (i * 4.0d0))
else if ((b * c) <= 9d+52) then
tmp = t_1
else if ((b * c) <= 4.5d+80) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else if ((b * c) <= 7.8d+145) then
tmp = t_1
else
tmp = (b * c) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((t * a) + (x * i));
double tmp;
if ((b * c) <= -1.4e+42) {
tmp = (b * c) - (x * (i * 4.0));
} else if ((b * c) <= 9e+52) {
tmp = t_1;
} else if ((b * c) <= 4.5e+80) {
tmp = (j * (k * -27.0)) + (b * c);
} else if ((b * c) <= 7.8e+145) {
tmp = t_1;
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((t * a) + (x * i)) tmp = 0 if (b * c) <= -1.4e+42: tmp = (b * c) - (x * (i * 4.0)) elif (b * c) <= 9e+52: tmp = t_1 elif (b * c) <= 4.5e+80: tmp = (j * (k * -27.0)) + (b * c) elif (b * c) <= 7.8e+145: tmp = t_1 else: tmp = (b * c) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) tmp = 0.0 if (Float64(b * c) <= -1.4e+42) tmp = Float64(Float64(b * c) - Float64(x * Float64(i * 4.0))); elseif (Float64(b * c) <= 9e+52) tmp = t_1; elseif (Float64(b * c) <= 4.5e+80) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); elseif (Float64(b * c) <= 7.8e+145) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((t * a) + (x * i));
tmp = 0.0;
if ((b * c) <= -1.4e+42)
tmp = (b * c) - (x * (i * 4.0));
elseif ((b * c) <= 9e+52)
tmp = t_1;
elseif ((b * c) <= 4.5e+80)
tmp = (j * (k * -27.0)) + (b * c);
elseif ((b * c) <= 7.8e+145)
tmp = t_1;
else
tmp = (b * c) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.4e+42], N[(N[(b * c), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9e+52], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 4.5e+80], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7.8e+145], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -1.4 \cdot 10^{+42}:\\
\;\;\;\;b \cdot c - x \cdot \left(i \cdot 4\right)\\
\mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 4.5 \cdot 10^{+80}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 7.8 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.4e42Initial program 86.8%
Simplified90.1%
Taylor expanded in t around 0 76.1%
Taylor expanded in i around inf 68.0%
associate-*r*75.5%
*-commutative75.5%
Simplified68.0%
if -1.4e42 < (*.f64 b c) < 8.9999999999999999e52 or 4.50000000000000007e80 < (*.f64 b c) < 7.7999999999999995e145Initial program 83.4%
Simplified88.0%
Taylor expanded in y around 0 80.1%
Taylor expanded in i around inf 68.1%
associate-*r*68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in b around 0 64.5%
cancel-sign-sub-inv64.5%
metadata-eval64.5%
*-commutative64.5%
*-commutative64.5%
*-commutative64.5%
distribute-rgt-out64.5%
Simplified64.5%
if 8.9999999999999999e52 < (*.f64 b c) < 4.50000000000000007e80Initial program 100.0%
Simplified85.5%
Taylor expanded in b around inf 91.6%
if 7.7999999999999995e145 < (*.f64 b c) Initial program 84.3%
Simplified87.5%
Taylor expanded in t around 0 84.3%
Taylor expanded in i around 0 81.5%
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 (* 27.0 (* j k)))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -5.8e+31)
t_2
(if (<= t 9.5e-48)
(- (* b c) (+ (* 4.0 (* x i)) t_1))
(if (<= t 6e-29)
t_2
(if (<= t 1380.0)
(- (* b c) (* x (* i 4.0)))
(- (+ (* b c) (* -4.0 (* t a))) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -5.8e+31) {
tmp = t_2;
} else if (t <= 9.5e-48) {
tmp = (b * c) - ((4.0 * (x * i)) + t_1);
} else if (t <= 6e-29) {
tmp = t_2;
} else if (t <= 1380.0) {
tmp = (b * c) - (x * (i * 4.0));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-5.8d+31)) then
tmp = t_2
else if (t <= 9.5d-48) then
tmp = (b * c) - ((4.0d0 * (x * i)) + t_1)
else if (t <= 6d-29) then
tmp = t_2
else if (t <= 1380.0d0) then
tmp = (b * c) - (x * (i * 4.0d0))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - 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 = 27.0 * (j * k);
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -5.8e+31) {
tmp = t_2;
} else if (t <= 9.5e-48) {
tmp = (b * c) - ((4.0 * (x * i)) + t_1);
} else if (t <= 6e-29) {
tmp = t_2;
} else if (t <= 1380.0) {
tmp = (b * c) - (x * (i * 4.0));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - 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 = 27.0 * (j * k) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -5.8e+31: tmp = t_2 elif t <= 9.5e-48: tmp = (b * c) - ((4.0 * (x * i)) + t_1) elif t <= 6e-29: tmp = t_2 elif t <= 1380.0: tmp = (b * c) - (x * (i * 4.0)) else: tmp = ((b * c) + (-4.0 * (t * a))) - 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(27.0 * Float64(j * k)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -5.8e+31) tmp = t_2; elseif (t <= 9.5e-48) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + t_1)); elseif (t <= 6e-29) tmp = t_2; elseif (t <= 1380.0) tmp = Float64(Float64(b * c) - Float64(x * Float64(i * 4.0))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - 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 = 27.0 * (j * k);
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -5.8e+31)
tmp = t_2;
elseif (t <= 9.5e-48)
tmp = (b * c) - ((4.0 * (x * i)) + t_1);
elseif (t <= 6e-29)
tmp = t_2;
elseif (t <= 1380.0)
tmp = (b * c) - (x * (i * 4.0));
else
tmp = ((b * c) + (-4.0 * (t * a))) - 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[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.8e+31], t$95$2, If[LessEqual[t, 9.5e-48], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-29], t$95$2, If[LessEqual[t, 1380.0], N[(N[(b * c), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $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 := 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-48}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + t\_1\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1380:\\
\;\;\;\;b \cdot c - x \cdot \left(i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\end{array}
\end{array}
if t < -5.8000000000000001e31 or 9.50000000000000036e-48 < t < 6.0000000000000005e-29Initial program 77.3%
Simplified85.4%
Taylor expanded in x around inf 82.4%
associate-*r*82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in t around inf 75.2%
if -5.8000000000000001e31 < t < 9.50000000000000036e-48Initial program 89.3%
Simplified87.1%
Taylor expanded in t around 0 84.0%
if 6.0000000000000005e-29 < t < 1380Initial program 100.0%
Simplified100.0%
Taylor expanded in t around 0 96.0%
Taylor expanded in i around inf 96.0%
associate-*r*96.0%
*-commutative96.0%
Simplified96.0%
if 1380 < t Initial program 81.3%
Simplified93.2%
Taylor expanded in x around 0 75.1%
Final simplification80.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* x (* i 4.0)) (* j (* k 27.0)))))
(if (<= z 2e+119)
(- (+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0)))) t_1)
(- (+ (* b c) (* t (- (* z (* 18.0 (* x y))) (* a 4.0)))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (i * 4.0)) + (j * (k * 27.0));
double tmp;
if (z <= 2e+119) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (x * (i * 4.0d0)) + (j * (k * 27.0d0))
if (z <= 2d+119) then
tmp = ((b * c) + (t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0)))) - t_1
else
tmp = ((b * c) + (t * ((z * (18.0d0 * (x * y))) - (a * 4.0d0)))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (i * 4.0)) + (j * (k * 27.0));
double tmp;
if (z <= 2e+119) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * (i * 4.0)) + (j * (k * 27.0)) tmp = 0 if z <= 2e+119: tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - t_1 else: tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0))) tmp = 0.0 if (z <= 2e+119) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(z * Float64(18.0 * Float64(x * y))) - Float64(a * 4.0)))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * (i * 4.0)) + (j * (k * 27.0));
tmp = 0.0;
if (z <= 2e+119)
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - t_1;
else
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 2e+119], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(z * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\\
\mathbf{if}\;z \leq 2 \cdot 10^{+119}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\right) - t\_1\\
\end{array}
\end{array}
if z < 1.99999999999999989e119Initial program 85.7%
Simplified91.5%
if 1.99999999999999989e119 < z Initial program 78.4%
Simplified66.2%
associate-*r*78.4%
distribute-rgt-out--78.4%
sub-neg78.4%
associate-*l*74.9%
*-commutative74.9%
*-commutative74.9%
Applied egg-rr74.9%
distribute-lft-neg-in74.9%
*-commutative74.9%
cancel-sign-sub-inv74.9%
*-commutative74.9%
associate-*r*78.4%
distribute-rgt-out--78.4%
*-commutative78.4%
*-commutative78.4%
associate-*r*78.4%
*-commutative78.4%
Simplified78.4%
Final simplification89.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z 2e-79)
(-
(- (- (* b c) (* t (+ (* a 4.0) (* (* y z) (* x -18.0))))) (* i (* x 4.0)))
(* k (* j 27.0)))
(-
(+ (* b c) (* t (- (* z (* 18.0 (* x y))) (* a 4.0))))
(+ (* 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 (z <= 2e-79) {
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - (i * (x * 4.0))) - (k * (j * 27.0));
} else {
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (z <= 2d-79) then
tmp = (((b * c) - (t * ((a * 4.0d0) + ((y * z) * (x * (-18.0d0)))))) - (i * (x * 4.0d0))) - (k * (j * 27.0d0))
else
tmp = ((b * c) + (t * ((z * (18.0d0 * (x * y))) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 2e-79) {
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - (i * (x * 4.0))) - (k * (j * 27.0));
} else {
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - ((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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= 2e-79: tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - (i * (x * 4.0))) - (k * (j * 27.0)) else: tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - ((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 (z <= 2e-79) tmp = Float64(Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) + Float64(Float64(y * z) * Float64(x * -18.0))))) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(z * Float64(18.0 * Float64(x * y))) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (z <= 2e-79)
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - (i * (x * 4.0))) - (k * (j * 27.0));
else
tmp = ((b * c) + (t * ((z * (18.0 * (x * y))) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, 2e-79], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] * N[(x * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(z * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2 \cdot 10^{-79}:\\
\;\;\;\;\left(\left(b \cdot c - t \cdot \left(a \cdot 4 + \left(y \cdot z\right) \cdot \left(x \cdot -18\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(z \cdot \left(18 \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\end{array}
\end{array}
if z < 2e-79Initial program 85.6%
Taylor expanded in t around -inf 90.6%
associate-*r*90.6%
neg-mul-190.6%
cancel-sign-sub-inv90.6%
metadata-eval90.6%
associate-*r*90.6%
*-commutative90.6%
Simplified90.6%
if 2e-79 < z Initial program 82.8%
Simplified81.6%
associate-*r*86.8%
distribute-rgt-out--82.8%
sub-neg82.8%
associate-*l*80.1%
*-commutative80.1%
*-commutative80.1%
Applied egg-rr80.1%
distribute-lft-neg-in80.1%
*-commutative80.1%
cancel-sign-sub-inv80.1%
*-commutative80.1%
associate-*r*82.8%
distribute-rgt-out--86.8%
*-commutative86.8%
*-commutative86.8%
associate-*r*86.8%
*-commutative86.8%
Simplified86.8%
Final simplification89.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))))
(if (<= (* b c) -1.45e+87)
(* b c)
(if (<= (* b c) 7.5e+52)
t_1
(if (<= (* b c) 8.2e+80)
(* j (* k -27.0))
(if (<= (* b c) 4e+134) 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) <= -1.45e+87) {
tmp = b * c;
} else if ((b * c) <= 7.5e+52) {
tmp = t_1;
} else if ((b * c) <= 8.2e+80) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 4e+134) {
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) <= (-1.45d+87)) then
tmp = b * c
else if ((b * c) <= 7.5d+52) then
tmp = t_1
else if ((b * c) <= 8.2d+80) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= 4d+134) 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) <= -1.45e+87) {
tmp = b * c;
} else if ((b * c) <= 7.5e+52) {
tmp = t_1;
} else if ((b * c) <= 8.2e+80) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 4e+134) {
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) <= -1.45e+87: tmp = b * c elif (b * c) <= 7.5e+52: tmp = t_1 elif (b * c) <= 8.2e+80: tmp = j * (k * -27.0) elif (b * c) <= 4e+134: 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) <= -1.45e+87) tmp = Float64(b * c); elseif (Float64(b * c) <= 7.5e+52) tmp = t_1; elseif (Float64(b * c) <= 8.2e+80) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= 4e+134) 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) <= -1.45e+87)
tmp = b * c;
elseif ((b * c) <= 7.5e+52)
tmp = t_1;
elseif ((b * c) <= 8.2e+80)
tmp = j * (k * -27.0);
elseif ((b * c) <= 4e+134)
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], -1.45e+87], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7.5e+52], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 8.2e+80], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4e+134], 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 -1.45 \cdot 10^{+87}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 7.5 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{+80}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.4499999999999999e87 or 3.99999999999999969e134 < (*.f64 b c) Initial program 85.4%
Taylor expanded in t around -inf 86.6%
associate-*r*86.6%
neg-mul-186.6%
cancel-sign-sub-inv86.6%
metadata-eval86.6%
associate-*r*86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in b around inf 62.5%
if -1.4499999999999999e87 < (*.f64 b c) < 7.49999999999999995e52 or 8.20000000000000003e80 < (*.f64 b c) < 3.99999999999999969e134Initial program 83.8%
Simplified88.7%
Taylor expanded in x around inf 79.6%
associate-*r*79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in a around inf 36.4%
*-commutative36.4%
*-commutative36.4%
associate-*r*36.4%
Simplified36.4%
if 7.49999999999999995e52 < (*.f64 b c) < 8.20000000000000003e80Initial program 100.0%
Simplified85.5%
Taylor expanded in j around inf 64.1%
*-commutative64.1%
associate-*r*64.1%
*-commutative64.1%
Simplified64.1%
Final simplification45.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* x (* i 4.0))))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -2.9e+31)
t_2
(if (<= t -2.5e-91)
t_1
(if (<= t -1.45e-136)
(+ (* j (* k -27.0)) (* -4.0 (* t a)))
(if (<= t 3e-53) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (x * (i * 4.0));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -2.9e+31) {
tmp = t_2;
} else if (t <= -2.5e-91) {
tmp = t_1;
} else if (t <= -1.45e-136) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else if (t <= 3e-53) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (x * (i * 4.0d0))
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-2.9d+31)) then
tmp = t_2
else if (t <= (-2.5d-91)) then
tmp = t_1
else if (t <= (-1.45d-136)) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (t * a))
else if (t <= 3d-53) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (x * (i * 4.0));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -2.9e+31) {
tmp = t_2;
} else if (t <= -2.5e-91) {
tmp = t_1;
} else if (t <= -1.45e-136) {
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
} else if (t <= 3e-53) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (x * (i * 4.0)) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -2.9e+31: tmp = t_2 elif t <= -2.5e-91: tmp = t_1 elif t <= -1.45e-136: tmp = (j * (k * -27.0)) + (-4.0 * (t * a)) elif t <= 3e-53: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(x * Float64(i * 4.0))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -2.9e+31) tmp = t_2; elseif (t <= -2.5e-91) tmp = t_1; elseif (t <= -1.45e-136) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(t * a))); elseif (t <= 3e-53) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (x * (i * 4.0));
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -2.9e+31)
tmp = t_2;
elseif (t <= -2.5e-91)
tmp = t_1;
elseif (t <= -1.45e-136)
tmp = (j * (k * -27.0)) + (-4.0 * (t * a));
elseif (t <= 3e-53)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e+31], t$95$2, If[LessEqual[t, -2.5e-91], t$95$1, If[LessEqual[t, -1.45e-136], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-53], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - x \cdot \left(i \cdot 4\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{-91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-136}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-53}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.9e31 or 3.0000000000000002e-53 < t Initial program 80.1%
Simplified89.6%
Taylor expanded in x around inf 86.6%
associate-*r*86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in t around inf 71.0%
if -2.9e31 < t < -2.49999999999999999e-91 or -1.44999999999999997e-136 < t < 3.0000000000000002e-53Initial program 87.6%
Simplified86.0%
Taylor expanded in t around 0 85.8%
Taylor expanded in i around inf 72.4%
associate-*r*79.1%
*-commutative79.1%
Simplified72.4%
if -2.49999999999999999e-91 < t < -1.44999999999999997e-136Initial program 99.8%
Simplified94.4%
Taylor expanded in a around inf 72.1%
*-commutative72.1%
Simplified72.1%
Final simplification71.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* y z)))
(t_2 (- (* b c) (* x (* i 4.0))))
(t_3 (* t (- (* 18.0 t_1) (* a 4.0)))))
(if (<= t -2.8e+31)
t_3
(if (<= t -2.85e-89)
t_2
(if (<= t -3.5e-137)
(+ (* j (* k -27.0)) (* 18.0 (* t t_1)))
(if (<= t 2.5e-48) t_2 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 = x * (y * z);
double t_2 = (b * c) - (x * (i * 4.0));
double t_3 = t * ((18.0 * t_1) - (a * 4.0));
double tmp;
if (t <= -2.8e+31) {
tmp = t_3;
} else if (t <= -2.85e-89) {
tmp = t_2;
} else if (t <= -3.5e-137) {
tmp = (j * (k * -27.0)) + (18.0 * (t * t_1));
} else if (t <= 2.5e-48) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = x * (y * z)
t_2 = (b * c) - (x * (i * 4.0d0))
t_3 = t * ((18.0d0 * t_1) - (a * 4.0d0))
if (t <= (-2.8d+31)) then
tmp = t_3
else if (t <= (-2.85d-89)) then
tmp = t_2
else if (t <= (-3.5d-137)) then
tmp = (j * (k * (-27.0d0))) + (18.0d0 * (t * t_1))
else if (t <= 2.5d-48) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 * (y * z);
double t_2 = (b * c) - (x * (i * 4.0));
double t_3 = t * ((18.0 * t_1) - (a * 4.0));
double tmp;
if (t <= -2.8e+31) {
tmp = t_3;
} else if (t <= -2.85e-89) {
tmp = t_2;
} else if (t <= -3.5e-137) {
tmp = (j * (k * -27.0)) + (18.0 * (t * t_1));
} else if (t <= 2.5e-48) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (y * z) t_2 = (b * c) - (x * (i * 4.0)) t_3 = t * ((18.0 * t_1) - (a * 4.0)) tmp = 0 if t <= -2.8e+31: tmp = t_3 elif t <= -2.85e-89: tmp = t_2 elif t <= -3.5e-137: tmp = (j * (k * -27.0)) + (18.0 * (t * t_1)) elif t <= 2.5e-48: tmp = t_2 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(y * z)) t_2 = Float64(Float64(b * c) - Float64(x * Float64(i * 4.0))) t_3 = Float64(t * Float64(Float64(18.0 * t_1) - Float64(a * 4.0))) tmp = 0.0 if (t <= -2.8e+31) tmp = t_3; elseif (t <= -2.85e-89) tmp = t_2; elseif (t <= -3.5e-137) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(18.0 * Float64(t * t_1))); elseif (t <= 2.5e-48) tmp = t_2; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (y * z);
t_2 = (b * c) - (x * (i * 4.0));
t_3 = t * ((18.0 * t_1) - (a * 4.0));
tmp = 0.0;
if (t <= -2.8e+31)
tmp = t_3;
elseif (t <= -2.85e-89)
tmp = t_2;
elseif (t <= -3.5e-137)
tmp = (j * (k * -27.0)) + (18.0 * (t * t_1));
elseif (t <= 2.5e-48)
tmp = t_2;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * t$95$1), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+31], t$95$3, If[LessEqual[t, -2.85e-89], t$95$2, If[LessEqual[t, -3.5e-137], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-48], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := b \cdot c - x \cdot \left(i \cdot 4\right)\\
t_3 := t \cdot \left(18 \cdot t\_1 - a \cdot 4\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+31}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -2.85 \cdot 10^{-89}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-137}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(t \cdot t\_1\right)\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-48}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -2.80000000000000017e31 or 2.4999999999999999e-48 < t Initial program 80.1%
Simplified89.6%
Taylor expanded in x around inf 86.6%
associate-*r*86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in t around inf 71.0%
if -2.80000000000000017e31 < t < -2.8500000000000001e-89 or -3.5000000000000001e-137 < t < 2.4999999999999999e-48Initial program 87.5%
Simplified85.8%
Taylor expanded in t around 0 86.5%
Taylor expanded in i around inf 73.0%
associate-*r*79.7%
*-commutative79.7%
Simplified73.0%
if -2.8500000000000001e-89 < t < -3.5000000000000001e-137Initial program 99.8%
Simplified94.7%
Taylor expanded in y around inf 68.9%
Final simplification71.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -6.6e+31) (not (<= t 4.2e-69))) (- (+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0)))) (* x (* i 4.0))) (- (+ (* b c) (* -4.0 (* t a))) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -6.6e+31) || !(t <= 4.2e-69)) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - (x * (i * 4.0));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-6.6d+31)) .or. (.not. (t <= 4.2d-69))) then
tmp = ((b * c) + (t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0)))) - (x * (i * 4.0d0))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -6.6e+31) || !(t <= 4.2e-69)) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - (x * (i * 4.0));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -6.6e+31) or not (t <= 4.2e-69): tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - (x * (i * 4.0)) else: tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -6.6e+31) || !(t <= 4.2e-69)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(x * Float64(i * 4.0))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -6.6e+31) || ~((t <= 4.2e-69)))
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - (x * (i * 4.0));
else
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -6.6e+31], N[Not[LessEqual[t, 4.2e-69]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * 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}\;t \leq -6.6 \cdot 10^{+31} \lor \neg \left(t \leq 4.2 \cdot 10^{-69}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - x \cdot \left(i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if t < -6.59999999999999985e31 or 4.1999999999999999e-69 < t Initial program 80.4%
Simplified89.8%
Taylor expanded in x around inf 86.8%
associate-*r*86.8%
*-commutative86.8%
Simplified86.8%
if -6.59999999999999985e31 < t < 4.1999999999999999e-69Initial program 89.1%
Simplified86.9%
Taylor expanded in y around 0 91.7%
Final simplification89.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 (+ (* b c) (* -4.0 (* t a))))
(t_2 (* k (* j 27.0)))
(t_3 (* 27.0 (* j k))))
(if (<= t_2 -1e+107)
(- t_1 t_3)
(if (<= t_2 2e+26)
(- t_1 (* x (* i 4.0)))
(- (* b c) (+ (* 4.0 (* x i)) 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 = (b * c) + (-4.0 * (t * a));
double t_2 = k * (j * 27.0);
double t_3 = 27.0 * (j * k);
double tmp;
if (t_2 <= -1e+107) {
tmp = t_1 - t_3;
} else if (t_2 <= 2e+26) {
tmp = t_1 - (x * (i * 4.0));
} else {
tmp = (b * c) - ((4.0 * (x * i)) + 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 = (b * c) + ((-4.0d0) * (t * a))
t_2 = k * (j * 27.0d0)
t_3 = 27.0d0 * (j * k)
if (t_2 <= (-1d+107)) then
tmp = t_1 - t_3
else if (t_2 <= 2d+26) then
tmp = t_1 - (x * (i * 4.0d0))
else
tmp = (b * c) - ((4.0d0 * (x * i)) + 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 = (b * c) + (-4.0 * (t * a));
double t_2 = k * (j * 27.0);
double t_3 = 27.0 * (j * k);
double tmp;
if (t_2 <= -1e+107) {
tmp = t_1 - t_3;
} else if (t_2 <= 2e+26) {
tmp = t_1 - (x * (i * 4.0));
} else {
tmp = (b * c) - ((4.0 * (x * i)) + 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 = (b * c) + (-4.0 * (t * a)) t_2 = k * (j * 27.0) t_3 = 27.0 * (j * k) tmp = 0 if t_2 <= -1e+107: tmp = t_1 - t_3 elif t_2 <= 2e+26: tmp = t_1 - (x * (i * 4.0)) else: tmp = (b * c) - ((4.0 * (x * i)) + 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(Float64(b * c) + Float64(-4.0 * Float64(t * a))) t_2 = Float64(k * Float64(j * 27.0)) t_3 = Float64(27.0 * Float64(j * k)) tmp = 0.0 if (t_2 <= -1e+107) tmp = Float64(t_1 - t_3); elseif (t_2 <= 2e+26) tmp = Float64(t_1 - Float64(x * Float64(i * 4.0))); else tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + 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 = (b * c) + (-4.0 * (t * a));
t_2 = k * (j * 27.0);
t_3 = 27.0 * (j * k);
tmp = 0.0;
if (t_2 <= -1e+107)
tmp = t_1 - t_3;
elseif (t_2 <= 2e+26)
tmp = t_1 - (x * (i * 4.0));
else
tmp = (b * c) - ((4.0 * (x * i)) + 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[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+107], N[(t$95$1 - t$95$3), $MachinePrecision], If[LessEqual[t$95$2, 2e+26], N[(t$95$1 - N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
t_3 := 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+107}:\\
\;\;\;\;t\_1 - t\_3\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+26}:\\
\;\;\;\;t\_1 - x \cdot \left(i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + t\_3\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999997e106Initial program 80.5%
Simplified83.0%
Taylor expanded in x around 0 79.0%
if -9.9999999999999997e106 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e26Initial program 87.9%
Simplified91.0%
Taylor expanded in y around 0 84.5%
Taylor expanded in i around inf 83.2%
associate-*r*83.2%
*-commutative83.2%
Simplified83.2%
if 2.0000000000000001e26 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 77.9%
Simplified84.0%
Taylor expanded in t around 0 74.4%
Final simplification80.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -5e+31) (not (<= t 1e+88))) (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (- (+ (* b c) (* -4.0 (* t a))) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5e+31) || !(t <= 1e+88)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-5d+31)) .or. (.not. (t <= 1d+88))) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5e+31) || !(t <= 1e+88)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -5e+31) or not (t <= 1e+88): tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) else: tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -5e+31) || !(t <= 1e+88)) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -5e+31) || ~((t <= 1e+88)))
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
else
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -5e+31], N[Not[LessEqual[t, 1e+88]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * 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}\;t \leq -5 \cdot 10^{+31} \lor \neg \left(t \leq 10^{+88}\right):\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if t < -5.00000000000000027e31 or 9.99999999999999959e87 < t Initial program 76.0%
Simplified87.5%
Taylor expanded in x around inf 85.6%
associate-*r*85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in i around 0 86.2%
if -5.00000000000000027e31 < t < 9.99999999999999959e87Initial program 90.0%
Simplified88.9%
Taylor expanded in y around 0 90.1%
Final simplification88.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -5.8e+31) (not (<= t 2.75e-55))) (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5.8e+31) || !(t <= 2.75e-55)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-5.8d+31)) .or. (.not. (t <= 2.75d-55))) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else
tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5.8e+31) || !(t <= 2.75e-55)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -5.8e+31) or not (t <= 2.75e-55): tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) else: tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -5.8e+31) || !(t <= 2.75e-55)) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); else tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -5.8e+31) || ~((t <= 2.75e-55)))
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
else
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -5.8e+31], N[Not[LessEqual[t, 2.75e-55]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * 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}\;t \leq -5.8 \cdot 10^{+31} \lor \neg \left(t \leq 2.75 \cdot 10^{-55}\right):\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if t < -5.8000000000000001e31 or 2.7499999999999999e-55 < t Initial program 80.3%
Simplified89.7%
Taylor expanded in x around inf 86.7%
associate-*r*86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in i around 0 84.0%
if -5.8000000000000001e31 < t < 2.7499999999999999e-55Initial program 89.2%
Simplified87.0%
Taylor expanded in t around 0 83.9%
Final simplification84.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 (* t (* a -4.0))))
(if (<= c -9.6e-74)
(* b c)
(if (<= c 7.8e-120)
t_1
(if (<= c 2.7e+100)
(* x (* -4.0 i))
(if (<= c 7.8e+130) 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 (c <= -9.6e-74) {
tmp = b * c;
} else if (c <= 7.8e-120) {
tmp = t_1;
} else if (c <= 2.7e+100) {
tmp = x * (-4.0 * i);
} else if (c <= 7.8e+130) {
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 (c <= (-9.6d-74)) then
tmp = b * c
else if (c <= 7.8d-120) then
tmp = t_1
else if (c <= 2.7d+100) then
tmp = x * ((-4.0d0) * i)
else if (c <= 7.8d+130) 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 (c <= -9.6e-74) {
tmp = b * c;
} else if (c <= 7.8e-120) {
tmp = t_1;
} else if (c <= 2.7e+100) {
tmp = x * (-4.0 * i);
} else if (c <= 7.8e+130) {
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 c <= -9.6e-74: tmp = b * c elif c <= 7.8e-120: tmp = t_1 elif c <= 2.7e+100: tmp = x * (-4.0 * i) elif c <= 7.8e+130: 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 (c <= -9.6e-74) tmp = Float64(b * c); elseif (c <= 7.8e-120) tmp = t_1; elseif (c <= 2.7e+100) tmp = Float64(x * Float64(-4.0 * i)); elseif (c <= 7.8e+130) 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 (c <= -9.6e-74)
tmp = b * c;
elseif (c <= 7.8e-120)
tmp = t_1;
elseif (c <= 2.7e+100)
tmp = x * (-4.0 * i);
elseif (c <= 7.8e+130)
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[c, -9.6e-74], N[(b * c), $MachinePrecision], If[LessEqual[c, 7.8e-120], t$95$1, If[LessEqual[c, 2.7e+100], N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 7.8e+130], 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}\;c \leq -9.6 \cdot 10^{-74}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 7.8 \cdot 10^{-120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2.7 \cdot 10^{+100}:\\
\;\;\;\;x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;c \leq 7.8 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -9.5999999999999996e-74 or 7.8000000000000004e130 < c Initial program 84.0%
Taylor expanded in t around -inf 86.5%
associate-*r*86.5%
neg-mul-186.5%
cancel-sign-sub-inv86.5%
metadata-eval86.5%
associate-*r*86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in b around inf 43.9%
if -9.5999999999999996e-74 < c < 7.8000000000000003e-120 or 2.69999999999999998e100 < c < 7.8000000000000004e130Initial program 85.7%
Simplified89.0%
Taylor expanded in x around inf 71.0%
associate-*r*71.0%
*-commutative71.0%
Simplified71.0%
Taylor expanded in a around inf 32.0%
*-commutative32.0%
*-commutative32.0%
associate-*r*32.0%
Simplified32.0%
if 7.8000000000000003e-120 < c < 2.69999999999999998e100Initial program 85.0%
Taylor expanded in t around -inf 90.1%
associate-*r*90.1%
neg-mul-190.1%
cancel-sign-sub-inv90.1%
metadata-eval90.1%
associate-*r*90.1%
*-commutative90.1%
Simplified90.1%
Taylor expanded in i around inf 34.1%
associate-*r*34.1%
*-commutative34.1%
Simplified34.1%
Final simplification38.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)) (* b c))))
(if (<= c -2.1e-74)
t_1
(if (<= c 1.35e+104)
(* -4.0 (+ (* t a) (* x i)))
(if (<= c 5.8e+165) (+ (* b c) (* -4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (b * c);
double tmp;
if (c <= -2.1e-74) {
tmp = t_1;
} else if (c <= 1.35e+104) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (c <= 5.8e+165) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + (b * c)
if (c <= (-2.1d-74)) then
tmp = t_1
else if (c <= 1.35d+104) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else if (c <= 5.8d+165) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (b * c);
double tmp;
if (c <= -2.1e-74) {
tmp = t_1;
} else if (c <= 1.35e+104) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (c <= 5.8e+165) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (k * -27.0)) + (b * c) tmp = 0 if c <= -2.1e-74: tmp = t_1 elif c <= 1.35e+104: tmp = -4.0 * ((t * a) + (x * i)) elif c <= 5.8e+165: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)) tmp = 0.0 if (c <= -2.1e-74) tmp = t_1; elseif (c <= 1.35e+104) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); elseif (c <= 5.8e+165) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (k * -27.0)) + (b * c);
tmp = 0.0;
if (c <= -2.1e-74)
tmp = t_1;
elseif (c <= 1.35e+104)
tmp = -4.0 * ((t * a) + (x * i));
elseif (c <= 5.8e+165)
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.1e-74], t$95$1, If[LessEqual[c, 1.35e+104], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.8e+165], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{if}\;c \leq -2.1 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{+104}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;c \leq 5.8 \cdot 10^{+165}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -2.1e-74 or 5.80000000000000011e165 < c Initial program 84.0%
Simplified89.5%
Taylor expanded in b around inf 51.4%
if -2.1e-74 < c < 1.34999999999999992e104Initial program 85.1%
Simplified89.3%
Taylor expanded in y around 0 79.8%
Taylor expanded in i around inf 61.1%
associate-*r*61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in b around 0 57.1%
cancel-sign-sub-inv57.1%
metadata-eval57.1%
*-commutative57.1%
*-commutative57.1%
*-commutative57.1%
distribute-rgt-out57.1%
Simplified57.1%
if 1.34999999999999992e104 < c < 5.80000000000000011e165Initial program 86.4%
Simplified86.4%
Taylor expanded in x around inf 73.6%
associate-*r*73.6%
*-commutative73.6%
Simplified73.6%
Taylor expanded in x around 0 67.6%
Final simplification55.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k)))))
(if (<= c -4.5e-74)
t_1
(if (<= c 1.9e+102)
(* -4.0 (+ (* t a) (* x i)))
(if (<= c 6e+166) (+ (* b c) (* -4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double tmp;
if (c <= -4.5e-74) {
tmp = t_1;
} else if (c <= 1.9e+102) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (c <= 6e+166) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - (27.0d0 * (j * k))
if (c <= (-4.5d-74)) then
tmp = t_1
else if (c <= 1.9d+102) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else if (c <= 6d+166) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double tmp;
if (c <= -4.5e-74) {
tmp = t_1;
} else if (c <= 1.9e+102) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (c <= 6e+166) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (27.0 * (j * k)) tmp = 0 if c <= -4.5e-74: tmp = t_1 elif c <= 1.9e+102: tmp = -4.0 * ((t * a) + (x * i)) elif c <= 6e+166: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (c <= -4.5e-74) tmp = t_1; elseif (c <= 1.9e+102) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); elseif (c <= 6e+166) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (27.0 * (j * k));
tmp = 0.0;
if (c <= -4.5e-74)
tmp = t_1;
elseif (c <= 1.9e+102)
tmp = -4.0 * ((t * a) + (x * i));
elseif (c <= 6e+166)
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4.5e-74], t$95$1, If[LessEqual[c, 1.9e+102], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6e+166], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;c \leq -4.5 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.9 \cdot 10^{+102}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;c \leq 6 \cdot 10^{+166}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -4.4999999999999999e-74 or 5.99999999999999997e166 < c Initial program 84.0%
Simplified87.7%
Taylor expanded in t around 0 68.5%
Taylor expanded in i around 0 51.4%
if -4.4999999999999999e-74 < c < 1.89999999999999989e102Initial program 85.1%
Simplified89.3%
Taylor expanded in y around 0 79.8%
Taylor expanded in i around inf 61.1%
associate-*r*61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in b around 0 57.1%
cancel-sign-sub-inv57.1%
metadata-eval57.1%
*-commutative57.1%
*-commutative57.1%
*-commutative57.1%
distribute-rgt-out57.1%
Simplified57.1%
if 1.89999999999999989e102 < c < 5.99999999999999997e166Initial program 86.4%
Simplified86.4%
Taylor expanded in x around inf 73.6%
associate-*r*73.6%
*-commutative73.6%
Simplified73.6%
Taylor expanded in x around 0 67.6%
Final simplification55.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -2.1e+39) (not (<= (* b c) 8.8e+77))) (* 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.1e+39) || !((b * c) <= 8.8e+77)) {
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.1d+39)) .or. (.not. ((b * c) <= 8.8d+77))) 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.1e+39) || !((b * c) <= 8.8e+77)) {
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.1e+39) or not ((b * c) <= 8.8e+77): 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.1e+39) || !(Float64(b * c) <= 8.8e+77)) 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.1e+39) || ~(((b * c) <= 8.8e+77)))
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.1e+39], N[Not[LessEqual[N[(b * c), $MachinePrecision], 8.8e+77]], $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.1 \cdot 10^{+39} \lor \neg \left(b \cdot c \leq 8.8 \cdot 10^{+77}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.0999999999999999e39 or 8.8000000000000002e77 < (*.f64 b c) Initial program 85.9%
Taylor expanded in t around -inf 87.9%
associate-*r*87.9%
neg-mul-187.9%
cancel-sign-sub-inv87.9%
metadata-eval87.9%
associate-*r*87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in b around inf 56.1%
if -2.0999999999999999e39 < (*.f64 b c) < 8.8000000000000002e77Initial program 83.9%
Simplified88.7%
Taylor expanded in j around inf 22.0%
Final simplification36.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.28e+39) (not (<= (* b c) 8e+77))) (* b c) (* j (* k -27.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.28e+39) || !((b * c) <= 8e+77)) {
tmp = b * c;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.28d+39)) .or. (.not. ((b * c) <= 8d+77))) then
tmp = b * c
else
tmp = j * (k * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.28e+39) || !((b * c) <= 8e+77)) {
tmp = b * c;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.28e+39) or not ((b * c) <= 8e+77): tmp = b * c else: tmp = j * (k * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.28e+39) || !(Float64(b * c) <= 8e+77)) tmp = Float64(b * c); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.28e+39) || ~(((b * c) <= 8e+77)))
tmp = b * c;
else
tmp = j * (k * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.28e+39], N[Not[LessEqual[N[(b * c), $MachinePrecision], 8e+77]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.28 \cdot 10^{+39} \lor \neg \left(b \cdot c \leq 8 \cdot 10^{+77}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.27999999999999994e39 or 7.99999999999999986e77 < (*.f64 b c) Initial program 85.9%
Taylor expanded in t around -inf 87.9%
associate-*r*87.9%
neg-mul-187.9%
cancel-sign-sub-inv87.9%
metadata-eval87.9%
associate-*r*87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in b around inf 56.1%
if -1.27999999999999994e39 < (*.f64 b c) < 7.99999999999999986e77Initial program 83.9%
Simplified88.7%
Taylor expanded in j around inf 22.0%
*-commutative22.0%
associate-*r*22.0%
*-commutative22.0%
Simplified22.0%
Final simplification36.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= c -3.4e-22) (not (<= c 7.8e+130))) (* b c) (* -4.0 (+ (* t a) (* x i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((c <= -3.4e-22) || !(c <= 7.8e+130)) {
tmp = b * c;
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((c <= (-3.4d-22)) .or. (.not. (c <= 7.8d+130))) then
tmp = b * c
else
tmp = (-4.0d0) * ((t * a) + (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((c <= -3.4e-22) || !(c <= 7.8e+130)) {
tmp = b * c;
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (c <= -3.4e-22) or not (c <= 7.8e+130): tmp = b * c else: tmp = -4.0 * ((t * a) + (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((c <= -3.4e-22) || !(c <= 7.8e+130)) tmp = Float64(b * c); else tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((c <= -3.4e-22) || ~((c <= 7.8e+130)))
tmp = b * c;
else
tmp = -4.0 * ((t * a) + (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[c, -3.4e-22], N[Not[LessEqual[c, 7.8e+130]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.4 \cdot 10^{-22} \lor \neg \left(c \leq 7.8 \cdot 10^{+130}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if c < -3.3999999999999998e-22 or 7.8000000000000004e130 < c Initial program 84.2%
Taylor expanded in t around -inf 87.0%
associate-*r*87.0%
neg-mul-187.0%
cancel-sign-sub-inv87.0%
metadata-eval87.0%
associate-*r*87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in b around inf 47.2%
if -3.3999999999999998e-22 < c < 7.8000000000000004e130Initial program 85.2%
Simplified88.8%
Taylor expanded in y around 0 80.0%
Taylor expanded in i around inf 62.7%
associate-*r*62.7%
*-commutative62.7%
Simplified62.7%
Taylor expanded in b around 0 56.6%
cancel-sign-sub-inv56.6%
metadata-eval56.6%
*-commutative56.6%
*-commutative56.6%
*-commutative56.6%
distribute-rgt-out56.6%
Simplified56.6%
Final simplification52.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c -3.4e-22)
(* b c)
(if (<= c 8.6e+102)
(* -4.0 (+ (* t a) (* x i)))
(+ (* b c) (* -4.0 (* t a))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -3.4e-22) {
tmp = b * c;
} else if (c <= 8.6e+102) {
tmp = -4.0 * ((t * a) + (x * i));
} else {
tmp = (b * c) + (-4.0 * (t * a));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (c <= (-3.4d-22)) then
tmp = b * c
else if (c <= 8.6d+102) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else
tmp = (b * c) + ((-4.0d0) * (t * a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -3.4e-22) {
tmp = b * c;
} else if (c <= 8.6e+102) {
tmp = -4.0 * ((t * a) + (x * i));
} else {
tmp = (b * c) + (-4.0 * (t * a));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= -3.4e-22: tmp = b * c elif c <= 8.6e+102: tmp = -4.0 * ((t * a) + (x * i)) else: tmp = (b * c) + (-4.0 * (t * a)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= -3.4e-22) tmp = Float64(b * c); elseif (c <= 8.6e+102) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); else tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (c <= -3.4e-22)
tmp = b * c;
elseif (c <= 8.6e+102)
tmp = -4.0 * ((t * a) + (x * i));
else
tmp = (b * c) + (-4.0 * (t * a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -3.4e-22], N[(b * c), $MachinePrecision], If[LessEqual[c, 8.6e+102], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $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}\;c \leq -3.4 \cdot 10^{-22}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 8.6 \cdot 10^{+102}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if c < -3.3999999999999998e-22Initial program 83.3%
Taylor expanded in t around -inf 87.7%
associate-*r*87.7%
neg-mul-187.7%
cancel-sign-sub-inv87.7%
metadata-eval87.7%
associate-*r*87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in b around inf 43.7%
if -3.3999999999999998e-22 < c < 8.6000000000000002e102Initial program 84.8%
Simplified88.7%
Taylor expanded in y around 0 80.0%
Taylor expanded in i around inf 62.9%
associate-*r*62.9%
*-commutative62.9%
Simplified62.9%
Taylor expanded in b around 0 58.5%
cancel-sign-sub-inv58.5%
metadata-eval58.5%
*-commutative58.5%
*-commutative58.5%
*-commutative58.5%
distribute-rgt-out58.5%
Simplified58.5%
if 8.6000000000000002e102 < c Initial program 86.5%
Simplified86.6%
Taylor expanded in x around inf 77.4%
associate-*r*77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in x around 0 64.0%
Final simplification55.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 84.7%
Taylor expanded in t around -inf 88.0%
associate-*r*88.0%
neg-mul-188.0%
cancel-sign-sub-inv88.0%
metadata-eval88.0%
associate-*r*88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in b around inf 26.0%
Final simplification26.0%
(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 2024081
(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)))