
(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 30 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* t (- (* -18.0 (* z (* y (- x)))) (* a 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = t * ((-18.0 * (z * (y * -x))) - (a * 4.0));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = t * ((-18.0 * (z * (y * -x))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = t * ((-18.0 * (z * (y * -x))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(t * Float64(Float64(-18.0 * Float64(z * Float64(y * Float64(-x)))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = t * ((-18.0 * (z * (y * -x))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(N[(-18.0 * N[(z * N[(y * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-18 \cdot \left(z \cdot \left(y \cdot \left(-x\right)\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 95.7%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified38.7%
associate-*r*38.7%
distribute-rgt-out--3.2%
associate-*l*3.2%
*-commutative3.2%
*-commutative3.2%
Applied egg-rr3.2%
Taylor expanded in t around -inf 67.9%
associate-*r*67.9%
neg-mul-167.9%
cancel-sign-sub-inv67.9%
*-commutative67.9%
associate-*r*71.0%
metadata-eval71.0%
Simplified71.0%
Final simplification92.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 (* k (* j -27.0))) (t_2 (* (* t a) -4.0)) (t_3 (* (* x i) -4.0)))
(if (<= (* b c) -7.5e+39)
(* b c)
(if (<= (* b c) -3.6e-115)
t_2
(if (<= (* b c) -1.05e-279)
t_1
(if (<= (* b c) 2.15e-300)
t_3
(if (<= (* b c) 7.4e-242)
t_1
(if (<= (* b c) 1.46e-168)
t_3
(if (<= (* b c) 2.9e+67) t_2 (* b c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double t_2 = (t * a) * -4.0;
double t_3 = (x * i) * -4.0;
double tmp;
if ((b * c) <= -7.5e+39) {
tmp = b * c;
} else if ((b * c) <= -3.6e-115) {
tmp = t_2;
} else if ((b * c) <= -1.05e-279) {
tmp = t_1;
} else if ((b * c) <= 2.15e-300) {
tmp = t_3;
} else if ((b * c) <= 7.4e-242) {
tmp = t_1;
} else if ((b * c) <= 1.46e-168) {
tmp = t_3;
} else if ((b * c) <= 2.9e+67) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
t_2 = (t * a) * (-4.0d0)
t_3 = (x * i) * (-4.0d0)
if ((b * c) <= (-7.5d+39)) then
tmp = b * c
else if ((b * c) <= (-3.6d-115)) then
tmp = t_2
else if ((b * c) <= (-1.05d-279)) then
tmp = t_1
else if ((b * c) <= 2.15d-300) then
tmp = t_3
else if ((b * c) <= 7.4d-242) then
tmp = t_1
else if ((b * c) <= 1.46d-168) then
tmp = t_3
else if ((b * c) <= 2.9d+67) then
tmp = t_2
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double t_2 = (t * a) * -4.0;
double t_3 = (x * i) * -4.0;
double tmp;
if ((b * c) <= -7.5e+39) {
tmp = b * c;
} else if ((b * c) <= -3.6e-115) {
tmp = t_2;
} else if ((b * c) <= -1.05e-279) {
tmp = t_1;
} else if ((b * c) <= 2.15e-300) {
tmp = t_3;
} else if ((b * c) <= 7.4e-242) {
tmp = t_1;
} else if ((b * c) <= 1.46e-168) {
tmp = t_3;
} else if ((b * c) <= 2.9e+67) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) t_2 = (t * a) * -4.0 t_3 = (x * i) * -4.0 tmp = 0 if (b * c) <= -7.5e+39: tmp = b * c elif (b * c) <= -3.6e-115: tmp = t_2 elif (b * c) <= -1.05e-279: tmp = t_1 elif (b * c) <= 2.15e-300: tmp = t_3 elif (b * c) <= 7.4e-242: tmp = t_1 elif (b * c) <= 1.46e-168: tmp = t_3 elif (b * c) <= 2.9e+67: tmp = t_2 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) t_2 = Float64(Float64(t * a) * -4.0) t_3 = Float64(Float64(x * i) * -4.0) tmp = 0.0 if (Float64(b * c) <= -7.5e+39) tmp = Float64(b * c); elseif (Float64(b * c) <= -3.6e-115) tmp = t_2; elseif (Float64(b * c) <= -1.05e-279) tmp = t_1; elseif (Float64(b * c) <= 2.15e-300) tmp = t_3; elseif (Float64(b * c) <= 7.4e-242) tmp = t_1; elseif (Float64(b * c) <= 1.46e-168) tmp = t_3; elseif (Float64(b * c) <= 2.9e+67) tmp = t_2; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
t_2 = (t * a) * -4.0;
t_3 = (x * i) * -4.0;
tmp = 0.0;
if ((b * c) <= -7.5e+39)
tmp = b * c;
elseif ((b * c) <= -3.6e-115)
tmp = t_2;
elseif ((b * c) <= -1.05e-279)
tmp = t_1;
elseif ((b * c) <= 2.15e-300)
tmp = t_3;
elseif ((b * c) <= 7.4e-242)
tmp = t_1;
elseif ((b * c) <= 1.46e-168)
tmp = t_3;
elseif ((b * c) <= 2.9e+67)
tmp = t_2;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -7.5e+39], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.6e-115], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -1.05e-279], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2.15e-300], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 7.4e-242], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.46e-168], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 2.9e+67], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := \left(t \cdot a\right) \cdot -4\\
t_3 := \left(x \cdot i\right) \cdot -4\\
\mathbf{if}\;b \cdot c \leq -7.5 \cdot 10^{+39}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -3.6 \cdot 10^{-115}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -1.05 \cdot 10^{-279}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 2.15 \cdot 10^{-300}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot c \leq 7.4 \cdot 10^{-242}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 1.46 \cdot 10^{-168}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot c \leq 2.9 \cdot 10^{+67}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -7.5000000000000005e39 or 2.90000000000000023e67 < (*.f64 b c) Initial program 83.7%
Simplified87.4%
associate-*r*88.3%
distribute-rgt-out--84.6%
associate-*l*82.8%
*-commutative82.8%
*-commutative82.8%
Applied egg-rr82.8%
Taylor expanded in b around inf 50.1%
if -7.5000000000000005e39 < (*.f64 b c) < -3.60000000000000009e-115 or 1.46e-168 < (*.f64 b c) < 2.90000000000000023e67Initial program 87.4%
Simplified88.8%
associate-*r*93.9%
distribute-rgt-out--87.4%
associate-*l*88.9%
*-commutative88.9%
*-commutative88.9%
Applied egg-rr88.9%
Taylor expanded in a around inf 41.1%
if -3.60000000000000009e-115 < (*.f64 b c) < -1.05000000000000003e-279 or 2.15e-300 < (*.f64 b c) < 7.39999999999999994e-242Initial program 87.3%
Simplified96.6%
Taylor expanded in j around inf 45.4%
*-commutative45.4%
associate-*r*45.5%
*-commutative45.5%
associate-*l*45.5%
Simplified45.5%
if -1.05000000000000003e-279 < (*.f64 b c) < 2.15e-300 or 7.39999999999999994e-242 < (*.f64 b c) < 1.46e-168Initial program 79.2%
Simplified84.8%
associate-*r*77.4%
distribute-rgt-out--77.4%
associate-*l*75.3%
*-commutative75.3%
*-commutative75.3%
Applied egg-rr75.3%
Taylor expanded in i around inf 41.2%
*-commutative41.2%
*-commutative41.2%
Simplified41.2%
Final simplification45.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 a) -4.0)) (t_2 (* 18.0 (* t (* x (* y z))))))
(if (<= (* b c) -9e+274)
(* b c)
(if (<= (* b c) -3.5e+113)
t_2
(if (<= (* b c) -8.5e+39)
(* b c)
(if (<= (* b c) -3.1e-175)
t_1
(if (<= (* b c) -1.55e-279)
t_2
(if (<= (* b c) 9.6e-169)
(* (* x i) -4.0)
(if (<= (* b c) 1.85e+67) 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 t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if ((b * c) <= -9e+274) {
tmp = b * c;
} else if ((b * c) <= -3.5e+113) {
tmp = t_2;
} else if ((b * c) <= -8.5e+39) {
tmp = b * c;
} else if ((b * c) <= -3.1e-175) {
tmp = t_1;
} else if ((b * c) <= -1.55e-279) {
tmp = t_2;
} else if ((b * c) <= 9.6e-169) {
tmp = (x * i) * -4.0;
} else if ((b * c) <= 1.85e+67) {
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) :: t_2
real(8) :: tmp
t_1 = (t * a) * (-4.0d0)
t_2 = 18.0d0 * (t * (x * (y * z)))
if ((b * c) <= (-9d+274)) then
tmp = b * c
else if ((b * c) <= (-3.5d+113)) then
tmp = t_2
else if ((b * c) <= (-8.5d+39)) then
tmp = b * c
else if ((b * c) <= (-3.1d-175)) then
tmp = t_1
else if ((b * c) <= (-1.55d-279)) then
tmp = t_2
else if ((b * c) <= 9.6d-169) then
tmp = (x * i) * (-4.0d0)
else if ((b * c) <= 1.85d+67) 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 t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if ((b * c) <= -9e+274) {
tmp = b * c;
} else if ((b * c) <= -3.5e+113) {
tmp = t_2;
} else if ((b * c) <= -8.5e+39) {
tmp = b * c;
} else if ((b * c) <= -3.1e-175) {
tmp = t_1;
} else if ((b * c) <= -1.55e-279) {
tmp = t_2;
} else if ((b * c) <= 9.6e-169) {
tmp = (x * i) * -4.0;
} else if ((b * c) <= 1.85e+67) {
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 t_2 = 18.0 * (t * (x * (y * z))) tmp = 0 if (b * c) <= -9e+274: tmp = b * c elif (b * c) <= -3.5e+113: tmp = t_2 elif (b * c) <= -8.5e+39: tmp = b * c elif (b * c) <= -3.1e-175: tmp = t_1 elif (b * c) <= -1.55e-279: tmp = t_2 elif (b * c) <= 9.6e-169: tmp = (x * i) * -4.0 elif (b * c) <= 1.85e+67: 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(Float64(t * a) * -4.0) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (Float64(b * c) <= -9e+274) tmp = Float64(b * c); elseif (Float64(b * c) <= -3.5e+113) tmp = t_2; elseif (Float64(b * c) <= -8.5e+39) tmp = Float64(b * c); elseif (Float64(b * c) <= -3.1e-175) tmp = t_1; elseif (Float64(b * c) <= -1.55e-279) tmp = t_2; elseif (Float64(b * c) <= 9.6e-169) tmp = Float64(Float64(x * i) * -4.0); elseif (Float64(b * c) <= 1.85e+67) 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;
t_2 = 18.0 * (t * (x * (y * z)));
tmp = 0.0;
if ((b * c) <= -9e+274)
tmp = b * c;
elseif ((b * c) <= -3.5e+113)
tmp = t_2;
elseif ((b * c) <= -8.5e+39)
tmp = b * c;
elseif ((b * c) <= -3.1e-175)
tmp = t_1;
elseif ((b * c) <= -1.55e-279)
tmp = t_2;
elseif ((b * c) <= 9.6e-169)
tmp = (x * i) * -4.0;
elseif ((b * c) <= 1.85e+67)
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[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -9e+274], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.5e+113], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -8.5e+39], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.1e-175], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1.55e-279], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 9.6e-169], N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.85e+67], 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 := \left(t \cdot a\right) \cdot -4\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -9 \cdot 10^{+274}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -3.5 \cdot 10^{+113}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -8.5 \cdot 10^{+39}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -3.1 \cdot 10^{-175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -1.55 \cdot 10^{-279}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 9.6 \cdot 10^{-169}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\
\mathbf{elif}\;b \cdot c \leq 1.85 \cdot 10^{+67}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -8.9999999999999995e274 or -3.5000000000000001e113 < (*.f64 b c) < -8.49999999999999971e39 or 1.8499999999999999e67 < (*.f64 b c) Initial program 80.1%
Simplified83.7%
associate-*r*84.9%
distribute-rgt-out--81.3%
associate-*l*78.9%
*-commutative78.9%
*-commutative78.9%
Applied egg-rr78.9%
Taylor expanded in b around inf 58.1%
if -8.9999999999999995e274 < (*.f64 b c) < -3.5000000000000001e113 or -3.09999999999999999e-175 < (*.f64 b c) < -1.55e-279Initial program 92.5%
Simplified97.4%
Taylor expanded in x around inf 59.4%
Taylor expanded in t around inf 52.3%
if -8.49999999999999971e39 < (*.f64 b c) < -3.09999999999999999e-175 or 9.60000000000000043e-169 < (*.f64 b c) < 1.8499999999999999e67Initial program 87.6%
Simplified90.2%
associate-*r*94.6%
distribute-rgt-out--87.6%
associate-*l*88.9%
*-commutative88.9%
*-commutative88.9%
Applied egg-rr88.9%
Taylor expanded in a around inf 39.9%
if -1.55e-279 < (*.f64 b c) < 9.60000000000000043e-169Initial program 79.9%
Simplified86.6%
associate-*r*80.1%
distribute-rgt-out--78.4%
associate-*l*76.5%
*-commutative76.5%
*-commutative76.5%
Applied egg-rr76.5%
Taylor expanded in i around inf 36.6%
*-commutative36.6%
*-commutative36.6%
Simplified36.6%
Final simplification47.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 (* (* t a) -4.0)))
(if (<= (* b c) -1.7e+186)
(* b c)
(if (<= (* b c) -3.3e+113)
(* x (* z (* 18.0 (* y t))))
(if (<= (* b c) -1.6e+40)
(* b c)
(if (<= (* b c) -2.45e-175)
t_1
(if (<= (* b c) -8.5e-279)
(* 18.0 (* t (* x (* y z))))
(if (<= (* b c) 2e-171)
(* (* x i) -4.0)
(if (<= (* b c) 3.5e+67) 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.7e+186) {
tmp = b * c;
} else if ((b * c) <= -3.3e+113) {
tmp = x * (z * (18.0 * (y * t)));
} else if ((b * c) <= -1.6e+40) {
tmp = b * c;
} else if ((b * c) <= -2.45e-175) {
tmp = t_1;
} else if ((b * c) <= -8.5e-279) {
tmp = 18.0 * (t * (x * (y * z)));
} else if ((b * c) <= 2e-171) {
tmp = (x * i) * -4.0;
} else if ((b * c) <= 3.5e+67) {
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.7d+186)) then
tmp = b * c
else if ((b * c) <= (-3.3d+113)) then
tmp = x * (z * (18.0d0 * (y * t)))
else if ((b * c) <= (-1.6d+40)) then
tmp = b * c
else if ((b * c) <= (-2.45d-175)) then
tmp = t_1
else if ((b * c) <= (-8.5d-279)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if ((b * c) <= 2d-171) then
tmp = (x * i) * (-4.0d0)
else if ((b * c) <= 3.5d+67) 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.7e+186) {
tmp = b * c;
} else if ((b * c) <= -3.3e+113) {
tmp = x * (z * (18.0 * (y * t)));
} else if ((b * c) <= -1.6e+40) {
tmp = b * c;
} else if ((b * c) <= -2.45e-175) {
tmp = t_1;
} else if ((b * c) <= -8.5e-279) {
tmp = 18.0 * (t * (x * (y * z)));
} else if ((b * c) <= 2e-171) {
tmp = (x * i) * -4.0;
} else if ((b * c) <= 3.5e+67) {
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.7e+186: tmp = b * c elif (b * c) <= -3.3e+113: tmp = x * (z * (18.0 * (y * t))) elif (b * c) <= -1.6e+40: tmp = b * c elif (b * c) <= -2.45e-175: tmp = t_1 elif (b * c) <= -8.5e-279: tmp = 18.0 * (t * (x * (y * z))) elif (b * c) <= 2e-171: tmp = (x * i) * -4.0 elif (b * c) <= 3.5e+67: 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(Float64(t * a) * -4.0) tmp = 0.0 if (Float64(b * c) <= -1.7e+186) tmp = Float64(b * c); elseif (Float64(b * c) <= -3.3e+113) tmp = Float64(x * Float64(z * Float64(18.0 * Float64(y * t)))); elseif (Float64(b * c) <= -1.6e+40) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.45e-175) tmp = t_1; elseif (Float64(b * c) <= -8.5e-279) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (Float64(b * c) <= 2e-171) tmp = Float64(Float64(x * i) * -4.0); elseif (Float64(b * c) <= 3.5e+67) 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.7e+186)
tmp = b * c;
elseif ((b * c) <= -3.3e+113)
tmp = x * (z * (18.0 * (y * t)));
elseif ((b * c) <= -1.6e+40)
tmp = b * c;
elseif ((b * c) <= -2.45e-175)
tmp = t_1;
elseif ((b * c) <= -8.5e-279)
tmp = 18.0 * (t * (x * (y * z)));
elseif ((b * c) <= 2e-171)
tmp = (x * i) * -4.0;
elseif ((b * c) <= 3.5e+67)
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[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.7e+186], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.3e+113], N[(x * N[(z * N[(18.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.6e+40], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.45e-175], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -8.5e-279], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e-171], N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.5e+67], 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 := \left(t \cdot a\right) \cdot -4\\
\mathbf{if}\;b \cdot c \leq -1.7 \cdot 10^{+186}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -3.3 \cdot 10^{+113}:\\
\;\;\;\;x \cdot \left(z \cdot \left(18 \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -1.6 \cdot 10^{+40}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.45 \cdot 10^{-175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -8.5 \cdot 10^{-279}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-171}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\
\mathbf{elif}\;b \cdot c \leq 3.5 \cdot 10^{+67}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.70000000000000003e186 or -3.3000000000000003e113 < (*.f64 b c) < -1.5999999999999999e40 or 3.5e67 < (*.f64 b c) Initial program 82.8%
Simplified85.8%
associate-*r*86.8%
distribute-rgt-out--83.8%
associate-*l*81.7%
*-commutative81.7%
*-commutative81.7%
Applied egg-rr81.7%
Taylor expanded in b around inf 54.0%
if -1.70000000000000003e186 < (*.f64 b c) < -3.3000000000000003e113Initial program 91.5%
Simplified99.9%
Taylor expanded in x around inf 66.2%
Taylor expanded in t around inf 58.4%
associate-*r*58.4%
associate-*r*58.4%
*-commutative58.4%
Simplified58.4%
if -1.5999999999999999e40 < (*.f64 b c) < -2.44999999999999999e-175 or 2e-171 < (*.f64 b c) < 3.5e67Initial program 87.6%
Simplified90.2%
associate-*r*94.6%
distribute-rgt-out--87.6%
associate-*l*88.9%
*-commutative88.9%
*-commutative88.9%
Applied egg-rr88.9%
Taylor expanded in a around inf 39.9%
if -2.44999999999999999e-175 < (*.f64 b c) < -8.5000000000000002e-279Initial program 87.3%
Simplified93.5%
Taylor expanded in x around inf 69.7%
Taylor expanded in t around inf 69.8%
if -8.5000000000000002e-279 < (*.f64 b c) < 2e-171Initial program 79.9%
Simplified86.6%
associate-*r*80.1%
distribute-rgt-out--78.4%
associate-*l*76.5%
*-commutative76.5%
*-commutative76.5%
Applied egg-rr76.5%
Taylor expanded in i around inf 36.6%
*-commutative36.6%
*-commutative36.6%
Simplified36.6%
Final simplification47.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 (* 18.0 (* t (* x (* y z))))) (t_2 (* j (* k -27.0))))
(if (<= (* b c) -1.95e-51)
(+ (* b c) t_1)
(if (<= (* b c) -2.8e-175)
(- (* t (* a -4.0)) (* (* j 27.0) k))
(if (<= (* b c) -6e-280)
(+ t_1 t_2)
(if (<= (* b c) 6.4e-307)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= (* b c) 1.65e-171)
(+ t_2 (* (* x i) -4.0))
(if (<= (* b c) 8.8e+63)
(+ t_2 (* (* t a) -4.0))
(- (* b c) (* 27.0 (* j k)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double t_2 = j * (k * -27.0);
double tmp;
if ((b * c) <= -1.95e-51) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -2.8e-175) {
tmp = (t * (a * -4.0)) - ((j * 27.0) * k);
} else if ((b * c) <= -6e-280) {
tmp = t_1 + t_2;
} else if ((b * c) <= 6.4e-307) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if ((b * c) <= 1.65e-171) {
tmp = t_2 + ((x * i) * -4.0);
} else if ((b * c) <= 8.8e+63) {
tmp = t_2 + ((t * a) * -4.0);
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 18.0d0 * (t * (x * (y * z)))
t_2 = j * (k * (-27.0d0))
if ((b * c) <= (-1.95d-51)) then
tmp = (b * c) + t_1
else if ((b * c) <= (-2.8d-175)) then
tmp = (t * (a * (-4.0d0))) - ((j * 27.0d0) * k)
else if ((b * c) <= (-6d-280)) then
tmp = t_1 + t_2
else if ((b * c) <= 6.4d-307) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if ((b * c) <= 1.65d-171) then
tmp = t_2 + ((x * i) * (-4.0d0))
else if ((b * c) <= 8.8d+63) then
tmp = t_2 + ((t * a) * (-4.0d0))
else
tmp = (b * c) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double t_2 = j * (k * -27.0);
double tmp;
if ((b * c) <= -1.95e-51) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -2.8e-175) {
tmp = (t * (a * -4.0)) - ((j * 27.0) * k);
} else if ((b * c) <= -6e-280) {
tmp = t_1 + t_2;
} else if ((b * c) <= 6.4e-307) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if ((b * c) <= 1.65e-171) {
tmp = t_2 + ((x * i) * -4.0);
} else if ((b * c) <= 8.8e+63) {
tmp = t_2 + ((t * a) * -4.0);
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (t * (x * (y * z))) t_2 = j * (k * -27.0) tmp = 0 if (b * c) <= -1.95e-51: tmp = (b * c) + t_1 elif (b * c) <= -2.8e-175: tmp = (t * (a * -4.0)) - ((j * 27.0) * k) elif (b * c) <= -6e-280: tmp = t_1 + t_2 elif (b * c) <= 6.4e-307: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif (b * c) <= 1.65e-171: tmp = t_2 + ((x * i) * -4.0) elif (b * c) <= 8.8e+63: tmp = t_2 + ((t * a) * -4.0) else: tmp = (b * c) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -1.95e-51) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= -2.8e-175) tmp = Float64(Float64(t * Float64(a * -4.0)) - Float64(Float64(j * 27.0) * k)); elseif (Float64(b * c) <= -6e-280) tmp = Float64(t_1 + t_2); elseif (Float64(b * c) <= 6.4e-307) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (Float64(b * c) <= 1.65e-171) tmp = Float64(t_2 + Float64(Float64(x * i) * -4.0)); elseif (Float64(b * c) <= 8.8e+63) tmp = Float64(t_2 + Float64(Float64(t * a) * -4.0)); else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (t * (x * (y * z)));
t_2 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -1.95e-51)
tmp = (b * c) + t_1;
elseif ((b * c) <= -2.8e-175)
tmp = (t * (a * -4.0)) - ((j * 27.0) * k);
elseif ((b * c) <= -6e-280)
tmp = t_1 + t_2;
elseif ((b * c) <= 6.4e-307)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif ((b * c) <= 1.65e-171)
tmp = t_2 + ((x * i) * -4.0);
elseif ((b * c) <= 8.8e+63)
tmp = t_2 + ((t * a) * -4.0);
else
tmp = (b * c) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.95e-51], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.8e-175], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -6e-280], N[(t$95$1 + t$95$2), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.4e-307], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.65e-171], N[(t$95$2 + N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.8e+63], N[(t$95$2 + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{-51}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;b \cdot c \leq -2.8 \cdot 10^{-175}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;b \cdot c \leq -6 \cdot 10^{-280}:\\
\;\;\;\;t_1 + t_2\\
\mathbf{elif}\;b \cdot c \leq 6.4 \cdot 10^{-307}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 1.65 \cdot 10^{-171}:\\
\;\;\;\;t_2 + \left(x \cdot i\right) \cdot -4\\
\mathbf{elif}\;b \cdot c \leq 8.8 \cdot 10^{+63}:\\
\;\;\;\;t_2 + \left(t \cdot a\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.9499999999999999e-51Initial program 84.2%
Simplified84.2%
Taylor expanded in j around 0 78.8%
Taylor expanded in i around 0 76.2%
Taylor expanded in a around 0 65.5%
if -1.9499999999999999e-51 < (*.f64 b c) < -2.8e-175Initial program 89.8%
Taylor expanded in x around 0 89.4%
Taylor expanded in a around inf 74.3%
*-commutative74.3%
*-commutative74.3%
associate-*l*74.3%
*-commutative74.3%
Simplified74.3%
if -2.8e-175 < (*.f64 b c) < -5.99999999999999974e-280Initial program 87.3%
Simplified93.4%
Taylor expanded in y around inf 89.3%
if -5.99999999999999974e-280 < (*.f64 b c) < 6.40000000000000021e-307Initial program 83.1%
Simplified85.8%
Taylor expanded in x around inf 54.1%
if 6.40000000000000021e-307 < (*.f64 b c) < 1.6500000000000001e-171Initial program 74.3%
Simplified87.2%
Taylor expanded in i around inf 74.8%
if 1.6500000000000001e-171 < (*.f64 b c) < 8.7999999999999995e63Initial program 87.5%
Simplified90.8%
Taylor expanded in a around inf 72.4%
*-commutative72.4%
Simplified72.4%
if 8.7999999999999995e63 < (*.f64 b c) Initial program 82.9%
Taylor expanded in x around 0 81.3%
Taylor expanded in b around inf 68.0%
Taylor expanded in j around 0 68.0%
Final simplification68.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (* x i)))
(t_2 (* (* j 27.0) k))
(t_3 (- (* t (- (* -18.0 (* z (* y (- x)))) (* a 4.0))) t_2))
(t_4 (+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))))
(if (<= x -2.8e+117)
t_4
(if (<= x -8.6e+29)
t_3
(if (<= x -580.0)
(- (* b c) (+ t_1 (* 27.0 (* j k))))
(if (<= x -4.8e-52)
(+ (* x (* (* y t) (* 18.0 z))) (* j (* k -27.0)))
(if (<= x -3.55e-71)
t_3
(if (<= x -1.45e-191)
(- (+ (* b c) (* (* t a) -4.0)) t_1)
(if (<= x 6.9e-56)
(- (- (* b c) (* 4.0 (* t a))) t_2)
t_4)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = (j * 27.0) * k;
double t_3 = (t * ((-18.0 * (z * (y * -x))) - (a * 4.0))) - t_2;
double t_4 = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)));
double tmp;
if (x <= -2.8e+117) {
tmp = t_4;
} else if (x <= -8.6e+29) {
tmp = t_3;
} else if (x <= -580.0) {
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
} else if (x <= -4.8e-52) {
tmp = (x * ((y * t) * (18.0 * z))) + (j * (k * -27.0));
} else if (x <= -3.55e-71) {
tmp = t_3;
} else if (x <= -1.45e-191) {
tmp = ((b * c) + ((t * a) * -4.0)) - t_1;
} else if (x <= 6.9e-56) {
tmp = ((b * c) - (4.0 * (t * a))) - t_2;
} else {
tmp = t_4;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
t_2 = (j * 27.0d0) * k
t_3 = (t * (((-18.0d0) * (z * (y * -x))) - (a * 4.0d0))) - t_2
t_4 = (b * c) + (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i)))
if (x <= (-2.8d+117)) then
tmp = t_4
else if (x <= (-8.6d+29)) then
tmp = t_3
else if (x <= (-580.0d0)) then
tmp = (b * c) - (t_1 + (27.0d0 * (j * k)))
else if (x <= (-4.8d-52)) then
tmp = (x * ((y * t) * (18.0d0 * z))) + (j * (k * (-27.0d0)))
else if (x <= (-3.55d-71)) then
tmp = t_3
else if (x <= (-1.45d-191)) then
tmp = ((b * c) + ((t * a) * (-4.0d0))) - t_1
else if (x <= 6.9d-56) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_2
else
tmp = t_4
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = (j * 27.0) * k;
double t_3 = (t * ((-18.0 * (z * (y * -x))) - (a * 4.0))) - t_2;
double t_4 = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)));
double tmp;
if (x <= -2.8e+117) {
tmp = t_4;
} else if (x <= -8.6e+29) {
tmp = t_3;
} else if (x <= -580.0) {
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
} else if (x <= -4.8e-52) {
tmp = (x * ((y * t) * (18.0 * z))) + (j * (k * -27.0));
} else if (x <= -3.55e-71) {
tmp = t_3;
} else if (x <= -1.45e-191) {
tmp = ((b * c) + ((t * a) * -4.0)) - t_1;
} else if (x <= 6.9e-56) {
tmp = ((b * c) - (4.0 * (t * a))) - t_2;
} else {
tmp = t_4;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = (j * 27.0) * k t_3 = (t * ((-18.0 * (z * (y * -x))) - (a * 4.0))) - t_2 t_4 = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i))) tmp = 0 if x <= -2.8e+117: tmp = t_4 elif x <= -8.6e+29: tmp = t_3 elif x <= -580.0: tmp = (b * c) - (t_1 + (27.0 * (j * k))) elif x <= -4.8e-52: tmp = (x * ((y * t) * (18.0 * z))) + (j * (k * -27.0)) elif x <= -3.55e-71: tmp = t_3 elif x <= -1.45e-191: tmp = ((b * c) + ((t * a) * -4.0)) - t_1 elif x <= 6.9e-56: tmp = ((b * c) - (4.0 * (t * a))) - t_2 else: tmp = t_4 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(Float64(t * Float64(Float64(-18.0 * Float64(z * Float64(y * Float64(-x)))) - Float64(a * 4.0))) - t_2) t_4 = Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))) tmp = 0.0 if (x <= -2.8e+117) tmp = t_4; elseif (x <= -8.6e+29) tmp = t_3; elseif (x <= -580.0) tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(27.0 * Float64(j * k)))); elseif (x <= -4.8e-52) tmp = Float64(Float64(x * Float64(Float64(y * t) * Float64(18.0 * z))) + Float64(j * Float64(k * -27.0))); elseif (x <= -3.55e-71) tmp = t_3; elseif (x <= -1.45e-191) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - t_1); elseif (x <= 6.9e-56) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_2); else tmp = t_4; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
t_2 = (j * 27.0) * k;
t_3 = (t * ((-18.0 * (z * (y * -x))) - (a * 4.0))) - t_2;
t_4 = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)));
tmp = 0.0;
if (x <= -2.8e+117)
tmp = t_4;
elseif (x <= -8.6e+29)
tmp = t_3;
elseif (x <= -580.0)
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
elseif (x <= -4.8e-52)
tmp = (x * ((y * t) * (18.0 * z))) + (j * (k * -27.0));
elseif (x <= -3.55e-71)
tmp = t_3;
elseif (x <= -1.45e-191)
tmp = ((b * c) + ((t * a) * -4.0)) - t_1;
elseif (x <= 6.9e-56)
tmp = ((b * c) - (4.0 * (t * a))) - t_2;
else
tmp = t_4;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t * N[(N[(-18.0 * N[(z * N[(y * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+117], t$95$4, If[LessEqual[x, -8.6e+29], t$95$3, If[LessEqual[x, -580.0], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.8e-52], N[(N[(x * N[(N[(y * t), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.55e-71], t$95$3, If[LessEqual[x, -1.45e-191], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 6.9e-56], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], t$95$4]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := t \cdot \left(-18 \cdot \left(z \cdot \left(y \cdot \left(-x\right)\right)\right) - a \cdot 4\right) - t_2\\
t_4 := b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+117}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \leq -8.6 \cdot 10^{+29}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -580:\\
\;\;\;\;b \cdot c - \left(t_1 + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-52}:\\
\;\;\;\;x \cdot \left(\left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq -3.55 \cdot 10^{-71}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-191}:\\
\;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - t_1\\
\mathbf{elif}\;x \leq 6.9 \cdot 10^{-56}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_2\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if x < -2.79999999999999997e117 or 6.8999999999999996e-56 < x Initial program 77.5%
Taylor expanded in x around 0 88.7%
Taylor expanded in a around 0 86.7%
Taylor expanded in j around 0 78.8%
if -2.79999999999999997e117 < x < -8.6000000000000006e29 or -4.8000000000000003e-52 < x < -3.55000000000000004e-71Initial program 75.1%
Taylor expanded in x around 0 75.6%
Taylor expanded in t around -inf 89.9%
associate-*r*89.9%
neg-mul-189.9%
cancel-sign-sub-inv89.9%
metadata-eval89.9%
associate-*r*85.2%
*-commutative85.2%
Simplified85.2%
if -8.6000000000000006e29 < x < -580Initial program 100.0%
Simplified99.7%
Taylor expanded in t around 0 99.7%
if -580 < x < -4.8000000000000003e-52Initial program 82.2%
Simplified91.5%
Taylor expanded in y around inf 74.0%
*-commutative74.0%
associate-*r*74.0%
associate-*l*74.0%
*-commutative74.0%
*-commutative74.0%
associate-*r*82.3%
associate-*l*82.2%
Simplified82.2%
if -3.55000000000000004e-71 < x < -1.45e-191Initial program 84.0%
Simplified80.3%
Taylor expanded in j around 0 84.2%
Taylor expanded in y around 0 88.1%
if -1.45e-191 < x < 6.8999999999999996e-56Initial program 93.3%
Taylor expanded in x around 0 88.0%
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 (* (* j 27.0) k))
(t_2 (+ (* b c) (* (* t a) -4.0)))
(t_3 (- (* t (* a -4.0)) t_1))
(t_4 (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))
(if (<= x -6.8e+61)
t_4
(if (<= x -0.22)
(- (* b c) t_1)
(if (<= x -5.2e-17)
t_4
(if (<= x -2.7e-71)
t_3
(if (<= x 6.8e-279)
t_2
(if (<= x 1.3e-127) t_3 (if (<= x 1.15e-26) t_2 t_4)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (b * c) + ((t * a) * -4.0);
double t_3 = (t * (a * -4.0)) - t_1;
double t_4 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -6.8e+61) {
tmp = t_4;
} else if (x <= -0.22) {
tmp = (b * c) - t_1;
} else if (x <= -5.2e-17) {
tmp = t_4;
} else if (x <= -2.7e-71) {
tmp = t_3;
} else if (x <= 6.8e-279) {
tmp = t_2;
} else if (x <= 1.3e-127) {
tmp = t_3;
} else if (x <= 1.15e-26) {
tmp = t_2;
} else {
tmp = t_4;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = (b * c) + ((t * a) * (-4.0d0))
t_3 = (t * (a * (-4.0d0))) - t_1
t_4 = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
if (x <= (-6.8d+61)) then
tmp = t_4
else if (x <= (-0.22d0)) then
tmp = (b * c) - t_1
else if (x <= (-5.2d-17)) then
tmp = t_4
else if (x <= (-2.7d-71)) then
tmp = t_3
else if (x <= 6.8d-279) then
tmp = t_2
else if (x <= 1.3d-127) then
tmp = t_3
else if (x <= 1.15d-26) then
tmp = t_2
else
tmp = t_4
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (b * c) + ((t * a) * -4.0);
double t_3 = (t * (a * -4.0)) - t_1;
double t_4 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -6.8e+61) {
tmp = t_4;
} else if (x <= -0.22) {
tmp = (b * c) - t_1;
} else if (x <= -5.2e-17) {
tmp = t_4;
} else if (x <= -2.7e-71) {
tmp = t_3;
} else if (x <= 6.8e-279) {
tmp = t_2;
} else if (x <= 1.3e-127) {
tmp = t_3;
} else if (x <= 1.15e-26) {
tmp = t_2;
} else {
tmp = t_4;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = (b * c) + ((t * a) * -4.0) t_3 = (t * (a * -4.0)) - t_1 t_4 = x * ((18.0 * (z * (y * t))) + (i * -4.0)) tmp = 0 if x <= -6.8e+61: tmp = t_4 elif x <= -0.22: tmp = (b * c) - t_1 elif x <= -5.2e-17: tmp = t_4 elif x <= -2.7e-71: tmp = t_3 elif x <= 6.8e-279: tmp = t_2 elif x <= 1.3e-127: tmp = t_3 elif x <= 1.15e-26: tmp = t_2 else: tmp = t_4 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) t_3 = Float64(Float64(t * Float64(a * -4.0)) - t_1) t_4 = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) tmp = 0.0 if (x <= -6.8e+61) tmp = t_4; elseif (x <= -0.22) tmp = Float64(Float64(b * c) - t_1); elseif (x <= -5.2e-17) tmp = t_4; elseif (x <= -2.7e-71) tmp = t_3; elseif (x <= 6.8e-279) tmp = t_2; elseif (x <= 1.3e-127) tmp = t_3; elseif (x <= 1.15e-26) tmp = t_2; else tmp = t_4; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = (b * c) + ((t * a) * -4.0);
t_3 = (t * (a * -4.0)) - t_1;
t_4 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
tmp = 0.0;
if (x <= -6.8e+61)
tmp = t_4;
elseif (x <= -0.22)
tmp = (b * c) - t_1;
elseif (x <= -5.2e-17)
tmp = t_4;
elseif (x <= -2.7e-71)
tmp = t_3;
elseif (x <= 6.8e-279)
tmp = t_2;
elseif (x <= 1.3e-127)
tmp = t_3;
elseif (x <= 1.15e-26)
tmp = t_2;
else
tmp = t_4;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e+61], t$95$4, If[LessEqual[x, -0.22], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, -5.2e-17], t$95$4, If[LessEqual[x, -2.7e-71], t$95$3, If[LessEqual[x, 6.8e-279], t$95$2, If[LessEqual[x, 1.3e-127], t$95$3, If[LessEqual[x, 1.15e-26], t$95$2, t$95$4]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := b \cdot c + \left(t \cdot a\right) \cdot -4\\
t_3 := t \cdot \left(a \cdot -4\right) - t_1\\
t_4 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{+61}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \leq -0.22:\\
\;\;\;\;b \cdot c - t_1\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-17}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-71}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-279}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-127}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-26}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if x < -6.80000000000000051e61 or -0.220000000000000001 < x < -5.20000000000000006e-17 or 1.15000000000000004e-26 < x Initial program 76.0%
Simplified87.6%
Taylor expanded in x around inf 71.4%
cancel-sign-sub-inv71.4%
associate-*r*72.9%
metadata-eval72.9%
Applied egg-rr72.9%
if -6.80000000000000051e61 < x < -0.220000000000000001Initial program 80.0%
Taylor expanded in x around 0 80.0%
Taylor expanded in b around inf 80.3%
if -5.20000000000000006e-17 < x < -2.7000000000000001e-71 or 6.8000000000000003e-279 < x < 1.29999999999999995e-127Initial program 93.1%
Taylor expanded in x around 0 80.0%
Taylor expanded in a around inf 69.2%
*-commutative69.2%
*-commutative69.2%
associate-*l*69.2%
*-commutative69.2%
Simplified69.2%
if -2.7000000000000001e-71 < x < 6.8000000000000003e-279 or 1.29999999999999995e-127 < x < 1.15000000000000004e-26Initial program 91.5%
Simplified89.2%
Taylor expanded in j around 0 78.8%
Taylor expanded in x around 0 73.7%
Final simplification72.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (+ (* b c) (* (* t a) -4.0)))
(t_3 (- (* t (* a -4.0)) t_1))
(t_4 (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))
(if (<= x -1.3e+59)
t_4
(if (<= x -0.024)
(- (* b c) t_1)
(if (<= x -3.4e-9)
t_4
(if (<= x -2.9e-71)
t_3
(if (<= x 1.1e-278)
t_2
(if (<= x 9.2e-126)
t_3
(if (<= x 3.65e-23)
t_2
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (b * c) + ((t * a) * -4.0);
double t_3 = (t * (a * -4.0)) - t_1;
double t_4 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -1.3e+59) {
tmp = t_4;
} else if (x <= -0.024) {
tmp = (b * c) - t_1;
} else if (x <= -3.4e-9) {
tmp = t_4;
} else if (x <= -2.9e-71) {
tmp = t_3;
} else if (x <= 1.1e-278) {
tmp = t_2;
} else if (x <= 9.2e-126) {
tmp = t_3;
} else if (x <= 3.65e-23) {
tmp = t_2;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = (b * c) + ((t * a) * (-4.0d0))
t_3 = (t * (a * (-4.0d0))) - t_1
t_4 = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
if (x <= (-1.3d+59)) then
tmp = t_4
else if (x <= (-0.024d0)) then
tmp = (b * c) - t_1
else if (x <= (-3.4d-9)) then
tmp = t_4
else if (x <= (-2.9d-71)) then
tmp = t_3
else if (x <= 1.1d-278) then
tmp = t_2
else if (x <= 9.2d-126) then
tmp = t_3
else if (x <= 3.65d-23) then
tmp = t_2
else
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (b * c) + ((t * a) * -4.0);
double t_3 = (t * (a * -4.0)) - t_1;
double t_4 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -1.3e+59) {
tmp = t_4;
} else if (x <= -0.024) {
tmp = (b * c) - t_1;
} else if (x <= -3.4e-9) {
tmp = t_4;
} else if (x <= -2.9e-71) {
tmp = t_3;
} else if (x <= 1.1e-278) {
tmp = t_2;
} else if (x <= 9.2e-126) {
tmp = t_3;
} else if (x <= 3.65e-23) {
tmp = t_2;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = (b * c) + ((t * a) * -4.0) t_3 = (t * (a * -4.0)) - t_1 t_4 = x * ((18.0 * (z * (y * t))) + (i * -4.0)) tmp = 0 if x <= -1.3e+59: tmp = t_4 elif x <= -0.024: tmp = (b * c) - t_1 elif x <= -3.4e-9: tmp = t_4 elif x <= -2.9e-71: tmp = t_3 elif x <= 1.1e-278: tmp = t_2 elif x <= 9.2e-126: tmp = t_3 elif x <= 3.65e-23: tmp = t_2 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) t_3 = Float64(Float64(t * Float64(a * -4.0)) - t_1) t_4 = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) tmp = 0.0 if (x <= -1.3e+59) tmp = t_4; elseif (x <= -0.024) tmp = Float64(Float64(b * c) - t_1); elseif (x <= -3.4e-9) tmp = t_4; elseif (x <= -2.9e-71) tmp = t_3; elseif (x <= 1.1e-278) tmp = t_2; elseif (x <= 9.2e-126) tmp = t_3; elseif (x <= 3.65e-23) tmp = t_2; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = (b * c) + ((t * a) * -4.0);
t_3 = (t * (a * -4.0)) - t_1;
t_4 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
tmp = 0.0;
if (x <= -1.3e+59)
tmp = t_4;
elseif (x <= -0.024)
tmp = (b * c) - t_1;
elseif (x <= -3.4e-9)
tmp = t_4;
elseif (x <= -2.9e-71)
tmp = t_3;
elseif (x <= 1.1e-278)
tmp = t_2;
elseif (x <= 9.2e-126)
tmp = t_3;
elseif (x <= 3.65e-23)
tmp = t_2;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.3e+59], t$95$4, If[LessEqual[x, -0.024], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, -3.4e-9], t$95$4, If[LessEqual[x, -2.9e-71], t$95$3, If[LessEqual[x, 1.1e-278], t$95$2, If[LessEqual[x, 9.2e-126], t$95$3, If[LessEqual[x, 3.65e-23], t$95$2, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := b \cdot c + \left(t \cdot a\right) \cdot -4\\
t_3 := t \cdot \left(a \cdot -4\right) - t_1\\
t_4 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{+59}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \leq -0.024:\\
\;\;\;\;b \cdot c - t_1\\
\mathbf{elif}\;x \leq -3.4 \cdot 10^{-9}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-71}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-278}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 9.2 \cdot 10^{-126}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 3.65 \cdot 10^{-23}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -1.3e59 or -0.024 < x < -3.3999999999999998e-9Initial program 71.1%
Simplified85.4%
Taylor expanded in x around inf 73.3%
cancel-sign-sub-inv73.3%
associate-*r*76.4%
metadata-eval76.4%
Applied egg-rr76.4%
if -1.3e59 < x < -0.024Initial program 80.0%
Taylor expanded in x around 0 80.0%
Taylor expanded in b around inf 80.3%
if -3.3999999999999998e-9 < x < -2.8999999999999999e-71 or 1.1e-278 < x < 9.20000000000000043e-126Initial program 93.1%
Taylor expanded in x around 0 80.0%
Taylor expanded in a around inf 69.2%
*-commutative69.2%
*-commutative69.2%
associate-*l*69.2%
*-commutative69.2%
Simplified69.2%
if -2.8999999999999999e-71 < x < 1.1e-278 or 9.20000000000000043e-126 < x < 3.65000000000000002e-23Initial program 91.5%
Simplified89.2%
Taylor expanded in j around 0 78.8%
Taylor expanded in x around 0 73.7%
if 3.65000000000000002e-23 < x Initial program 81.2%
Simplified89.8%
Taylor expanded in x around inf 69.3%
Final simplification72.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k)))
(t_2 (* 4.0 (* x i)))
(t_3 (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))
(if (<= x -3.7e+78)
t_3
(if (<= x -6.5)
(- (* b c) (+ t_2 (* 27.0 (* j k))))
(if (<= x -1.42e-8)
t_3
(if (<= x 7.5e-63)
t_1
(if (<= x 960.0)
(- (+ (* b c) (* (* t a) -4.0)) t_2)
(if (<= x 3.1e+17)
t_1
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
double t_2 = 4.0 * (x * i);
double t_3 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -3.7e+78) {
tmp = t_3;
} else if (x <= -6.5) {
tmp = (b * c) - (t_2 + (27.0 * (j * k)));
} else if (x <= -1.42e-8) {
tmp = t_3;
} else if (x <= 7.5e-63) {
tmp = t_1;
} else if (x <= 960.0) {
tmp = ((b * c) + ((t * a) * -4.0)) - t_2;
} else if (x <= 3.1e+17) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
t_2 = 4.0d0 * (x * i)
t_3 = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
if (x <= (-3.7d+78)) then
tmp = t_3
else if (x <= (-6.5d0)) then
tmp = (b * c) - (t_2 + (27.0d0 * (j * k)))
else if (x <= (-1.42d-8)) then
tmp = t_3
else if (x <= 7.5d-63) then
tmp = t_1
else if (x <= 960.0d0) then
tmp = ((b * c) + ((t * a) * (-4.0d0))) - t_2
else if (x <= 3.1d+17) then
tmp = t_1
else
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
double t_2 = 4.0 * (x * i);
double t_3 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -3.7e+78) {
tmp = t_3;
} else if (x <= -6.5) {
tmp = (b * c) - (t_2 + (27.0 * (j * k)));
} else if (x <= -1.42e-8) {
tmp = t_3;
} else if (x <= 7.5e-63) {
tmp = t_1;
} else if (x <= 960.0) {
tmp = ((b * c) + ((t * a) * -4.0)) - t_2;
} else if (x <= 3.1e+17) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) t_2 = 4.0 * (x * i) t_3 = x * ((18.0 * (z * (y * t))) + (i * -4.0)) tmp = 0 if x <= -3.7e+78: tmp = t_3 elif x <= -6.5: tmp = (b * c) - (t_2 + (27.0 * (j * k))) elif x <= -1.42e-8: tmp = t_3 elif x <= 7.5e-63: tmp = t_1 elif x <= 960.0: tmp = ((b * c) + ((t * a) * -4.0)) - t_2 elif x <= 3.1e+17: tmp = t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)) t_2 = Float64(4.0 * Float64(x * i)) t_3 = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) tmp = 0.0 if (x <= -3.7e+78) tmp = t_3; elseif (x <= -6.5) tmp = Float64(Float64(b * c) - Float64(t_2 + Float64(27.0 * Float64(j * k)))); elseif (x <= -1.42e-8) tmp = t_3; elseif (x <= 7.5e-63) tmp = t_1; elseif (x <= 960.0) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - t_2); elseif (x <= 3.1e+17) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
t_2 = 4.0 * (x * i);
t_3 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
tmp = 0.0;
if (x <= -3.7e+78)
tmp = t_3;
elseif (x <= -6.5)
tmp = (b * c) - (t_2 + (27.0 * (j * k)));
elseif (x <= -1.42e-8)
tmp = t_3;
elseif (x <= 7.5e-63)
tmp = t_1;
elseif (x <= 960.0)
tmp = ((b * c) + ((t * a) * -4.0)) - t_2;
elseif (x <= 3.1e+17)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.7e+78], t$95$3, If[LessEqual[x, -6.5], N[(N[(b * c), $MachinePrecision] - N[(t$95$2 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.42e-8], t$95$3, If[LessEqual[x, 7.5e-63], t$95$1, If[LessEqual[x, 960.0], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[x, 3.1e+17], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
t_3 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{if}\;x \leq -3.7 \cdot 10^{+78}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -6.5:\\
\;\;\;\;b \cdot c - \left(t_2 + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{elif}\;x \leq -1.42 \cdot 10^{-8}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-63}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 960:\\
\;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - t_2\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -3.69999999999999985e78 or -6.5 < x < -1.41999999999999998e-8Initial program 71.1%
Simplified85.4%
Taylor expanded in x around inf 73.3%
cancel-sign-sub-inv73.3%
associate-*r*76.4%
metadata-eval76.4%
Applied egg-rr76.4%
if -3.69999999999999985e78 < x < -6.5Initial program 80.0%
Simplified89.8%
Taylor expanded in t around 0 90.1%
if -1.41999999999999998e-8 < x < 7.5000000000000003e-63 or 960 < x < 3.1e17Initial program 92.1%
Taylor expanded in x around 0 84.5%
if 7.5000000000000003e-63 < x < 960Initial program 88.7%
Simplified100.0%
Taylor expanded in j around 0 100.0%
Taylor expanded in y around 0 78.3%
if 3.1e17 < x Initial program 79.8%
Simplified87.9%
Taylor expanded in x around inf 72.3%
Final simplification80.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (* t a)))
(t_2 (* x (* y z)))
(t_3 (* (* j 27.0) k))
(t_4 (* 4.0 (* x i))))
(if (<= t_3 -4e+52)
(- (- (* b c) (+ t_1 t_4)) t_3)
(if (<= t_3 5e+58)
(- (+ (* b c) (* t (- (* 18.0 t_2) (* a 4.0)))) t_4)
(- (- (+ (* b c) (* 18.0 (* t t_2))) t_1) t_3)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (t * a);
double t_2 = x * (y * z);
double t_3 = (j * 27.0) * k;
double t_4 = 4.0 * (x * i);
double tmp;
if (t_3 <= -4e+52) {
tmp = ((b * c) - (t_1 + t_4)) - t_3;
} else if (t_3 <= 5e+58) {
tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_4;
} else {
tmp = (((b * c) + (18.0 * (t * t_2))) - t_1) - 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) :: t_4
real(8) :: tmp
t_1 = 4.0d0 * (t * a)
t_2 = x * (y * z)
t_3 = (j * 27.0d0) * k
t_4 = 4.0d0 * (x * i)
if (t_3 <= (-4d+52)) then
tmp = ((b * c) - (t_1 + t_4)) - t_3
else if (t_3 <= 5d+58) then
tmp = ((b * c) + (t * ((18.0d0 * t_2) - (a * 4.0d0)))) - t_4
else
tmp = (((b * c) + (18.0d0 * (t * t_2))) - t_1) - t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (t * a);
double t_2 = x * (y * z);
double t_3 = (j * 27.0) * k;
double t_4 = 4.0 * (x * i);
double tmp;
if (t_3 <= -4e+52) {
tmp = ((b * c) - (t_1 + t_4)) - t_3;
} else if (t_3 <= 5e+58) {
tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_4;
} else {
tmp = (((b * c) + (18.0 * (t * t_2))) - t_1) - t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (t * a) t_2 = x * (y * z) t_3 = (j * 27.0) * k t_4 = 4.0 * (x * i) tmp = 0 if t_3 <= -4e+52: tmp = ((b * c) - (t_1 + t_4)) - t_3 elif t_3 <= 5e+58: tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_4 else: tmp = (((b * c) + (18.0 * (t * t_2))) - t_1) - t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(t * a)) t_2 = Float64(x * Float64(y * z)) t_3 = Float64(Float64(j * 27.0) * k) t_4 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (t_3 <= -4e+52) tmp = Float64(Float64(Float64(b * c) - Float64(t_1 + t_4)) - t_3); elseif (t_3 <= 5e+58) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * t_2) - Float64(a * 4.0)))) - t_4); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * t_2))) - t_1) - t_3); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (t * a);
t_2 = x * (y * z);
t_3 = (j * 27.0) * k;
t_4 = 4.0 * (x * i);
tmp = 0.0;
if (t_3 <= -4e+52)
tmp = ((b * c) - (t_1 + t_4)) - t_3;
elseif (t_3 <= 5e+58)
tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_4;
else
tmp = (((b * c) + (18.0 * (t * t_2))) - t_1) - t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$4 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -4e+52], N[(N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + t$95$4), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t$95$3, 5e+58], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * t$95$2), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$3), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(t \cdot a\right)\\
t_2 := x \cdot \left(y \cdot z\right)\\
t_3 := \left(j \cdot 27\right) \cdot k\\
t_4 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t_3 \leq -4 \cdot 10^{+52}:\\
\;\;\;\;\left(b \cdot c - \left(t_1 + t_4\right)\right) - t_3\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+58}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot t_2 - a \cdot 4\right)\right) - t_4\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + 18 \cdot \left(t \cdot t_2\right)\right) - t_1\right) - t_3\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -4e52Initial program 80.5%
Taylor expanded in y around 0 81.9%
if -4e52 < (*.f64 (*.f64 j 27) k) < 4.99999999999999986e58Initial program 84.1%
Simplified88.7%
Taylor expanded in j around 0 89.3%
if 4.99999999999999986e58 < (*.f64 (*.f64 j 27) k) Initial program 89.3%
Taylor expanded in i around 0 89.3%
Final simplification87.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (* x i)))
(t_2 (- (* b c) (+ t_1 (* 27.0 (* j k)))))
(t_3 (* (* j 27.0) k)))
(if (<= t_3 -1e+80)
t_2
(if (<= t_3 1e+33)
(- (+ (* b c) (* (* t a) -4.0)) t_1)
(if (<= t_3 2e+153)
(+ (* 18.0 (* t (* x (* y z)))) (* j (* k -27.0)))
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 = 4.0 * (x * i);
double t_2 = (b * c) - (t_1 + (27.0 * (j * k)));
double t_3 = (j * 27.0) * k;
double tmp;
if (t_3 <= -1e+80) {
tmp = t_2;
} else if (t_3 <= 1e+33) {
tmp = ((b * c) + ((t * a) * -4.0)) - t_1;
} else if (t_3 <= 2e+153) {
tmp = (18.0 * (t * (x * (y * z)))) + (j * (k * -27.0));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
t_2 = (b * c) - (t_1 + (27.0d0 * (j * k)))
t_3 = (j * 27.0d0) * k
if (t_3 <= (-1d+80)) then
tmp = t_2
else if (t_3 <= 1d+33) then
tmp = ((b * c) + ((t * a) * (-4.0d0))) - t_1
else if (t_3 <= 2d+153) then
tmp = (18.0d0 * (t * (x * (y * z)))) + (j * (k * (-27.0d0)))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = (b * c) - (t_1 + (27.0 * (j * k)));
double t_3 = (j * 27.0) * k;
double tmp;
if (t_3 <= -1e+80) {
tmp = t_2;
} else if (t_3 <= 1e+33) {
tmp = ((b * c) + ((t * a) * -4.0)) - t_1;
} else if (t_3 <= 2e+153) {
tmp = (18.0 * (t * (x * (y * z)))) + (j * (k * -27.0));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = (b * c) - (t_1 + (27.0 * (j * k))) t_3 = (j * 27.0) * k tmp = 0 if t_3 <= -1e+80: tmp = t_2 elif t_3 <= 1e+33: tmp = ((b * c) + ((t * a) * -4.0)) - t_1 elif t_3 <= 2e+153: tmp = (18.0 * (t * (x * (y * z)))) + (j * (k * -27.0)) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(Float64(b * c) - Float64(t_1 + Float64(27.0 * Float64(j * k)))) t_3 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_3 <= -1e+80) tmp = t_2; elseif (t_3 <= 1e+33) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - t_1); elseif (t_3 <= 2e+153) tmp = Float64(Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) + Float64(j * Float64(k * -27.0))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
t_2 = (b * c) - (t_1 + (27.0 * (j * k)));
t_3 = (j * 27.0) * k;
tmp = 0.0;
if (t_3 <= -1e+80)
tmp = t_2;
elseif (t_3 <= 1e+33)
tmp = ((b * c) + ((t * a) * -4.0)) - t_1;
elseif (t_3 <= 2e+153)
tmp = (18.0 * (t * (x * (y * z)))) + (j * (k * -27.0));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+80], t$95$2, If[LessEqual[t$95$3, 1e+33], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 2e+153], N[(N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := b \cdot c - \left(t_1 + 27 \cdot \left(j \cdot k\right)\right)\\
t_3 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{+80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_3 \leq 10^{+33}:\\
\;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - t_1\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -1e80 or 2e153 < (*.f64 (*.f64 j 27) k) Initial program 82.1%
Simplified85.6%
Taylor expanded in t around 0 78.4%
if -1e80 < (*.f64 (*.f64 j 27) k) < 9.9999999999999995e32Initial program 84.7%
Simplified89.3%
Taylor expanded in j around 0 88.7%
Taylor expanded in y around 0 71.5%
if 9.9999999999999995e32 < (*.f64 (*.f64 j 27) k) < 2e153Initial program 87.7%
Simplified91.8%
Taylor expanded in y around inf 64.3%
Final simplification73.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (* t a))) (t_2 (* (* j 27.0) k)) (t_3 (* 4.0 (* x i))))
(if (<= t_2 -4e+52)
(- (- (* b c) (+ t_1 t_3)) t_2)
(if (<= t_2 5e+160)
(- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) t_3)
(- (- (* b c) 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 = 4.0 * (t * a);
double t_2 = (j * 27.0) * k;
double t_3 = 4.0 * (x * i);
double tmp;
if (t_2 <= -4e+52) {
tmp = ((b * c) - (t_1 + t_3)) - t_2;
} else if (t_2 <= 5e+160) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_3;
} else {
tmp = ((b * c) - 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) :: t_3
real(8) :: tmp
t_1 = 4.0d0 * (t * a)
t_2 = (j * 27.0d0) * k
t_3 = 4.0d0 * (x * i)
if (t_2 <= (-4d+52)) then
tmp = ((b * c) - (t_1 + t_3)) - t_2
else if (t_2 <= 5d+160) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - t_3
else
tmp = ((b * c) - 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 = 4.0 * (t * a);
double t_2 = (j * 27.0) * k;
double t_3 = 4.0 * (x * i);
double tmp;
if (t_2 <= -4e+52) {
tmp = ((b * c) - (t_1 + t_3)) - t_2;
} else if (t_2 <= 5e+160) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_3;
} else {
tmp = ((b * c) - 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 = 4.0 * (t * a) t_2 = (j * 27.0) * k t_3 = 4.0 * (x * i) tmp = 0 if t_2 <= -4e+52: tmp = ((b * c) - (t_1 + t_3)) - t_2 elif t_2 <= 5e+160: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_3 else: tmp = ((b * c) - 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(4.0 * Float64(t * a)) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (t_2 <= -4e+52) tmp = Float64(Float64(Float64(b * c) - Float64(t_1 + t_3)) - t_2); elseif (t_2 <= 5e+160) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - t_3); else tmp = Float64(Float64(Float64(b * c) - 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 = 4.0 * (t * a);
t_2 = (j * 27.0) * k;
t_3 = 4.0 * (x * i);
tmp = 0.0;
if (t_2 <= -4e+52)
tmp = ((b * c) - (t_1 + t_3)) - t_2;
elseif (t_2 <= 5e+160)
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_3;
else
tmp = ((b * c) - 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[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+52], N[(N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + t$95$3), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t$95$2, 5e+160], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], N[(N[(N[(b * c), $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 := 4 \cdot \left(t \cdot a\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t_2 \leq -4 \cdot 10^{+52}:\\
\;\;\;\;\left(b \cdot c - \left(t_1 + t_3\right)\right) - t_2\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+160}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t_3\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - t_1\right) - t_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -4e52Initial program 80.5%
Taylor expanded in y around 0 81.9%
if -4e52 < (*.f64 (*.f64 j 27) k) < 5.0000000000000002e160Initial program 85.0%
Simplified89.2%
Taylor expanded in j around 0 86.8%
if 5.0000000000000002e160 < (*.f64 (*.f64 j 27) k) Initial program 86.9%
Taylor expanded in x around 0 87.3%
Final simplification85.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 (* j (* k -27.0))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -5e+176)
(+ t_1 (* (* x i) -4.0))
(if (<= t_2 1e-322)
(+ (* b c) (* (* t a) -4.0))
(if (<= t_2 1e+131)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(+ (* b c) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+176) {
tmp = t_1 + ((x * i) * -4.0);
} else if (t_2 <= 1e-322) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (t_2 <= 1e+131) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (j * 27.0d0) * k
if (t_2 <= (-5d+176)) then
tmp = t_1 + ((x * i) * (-4.0d0))
else if (t_2 <= 1d-322) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else if (t_2 <= 1d+131) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+176) {
tmp = t_1 + ((x * i) * -4.0);
} else if (t_2 <= 1e-322) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (t_2 <= 1e+131) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -5e+176: tmp = t_1 + ((x * i) * -4.0) elif t_2 <= 1e-322: tmp = (b * c) + ((t * a) * -4.0) elif t_2 <= 1e+131: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) else: tmp = (b * c) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -5e+176) tmp = Float64(t_1 + Float64(Float64(x * i) * -4.0)); elseif (t_2 <= 1e-322) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); elseif (t_2 <= 1e+131) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -5e+176)
tmp = t_1 + ((x * i) * -4.0);
elseif (t_2 <= 1e-322)
tmp = (b * c) + ((t * a) * -4.0);
elseif (t_2 <= 1e+131)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+176], N[(t$95$1 + N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-322], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+131], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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 := j \cdot \left(k \cdot -27\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+176}:\\
\;\;\;\;t_1 + \left(x \cdot i\right) \cdot -4\\
\mathbf{elif}\;t_2 \leq 10^{-322}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;t_2 \leq 10^{+131}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -5e176Initial program 76.8%
Simplified79.5%
Taylor expanded in i around inf 77.2%
if -5e176 < (*.f64 (*.f64 j 27) k) < 9.88131e-323Initial program 84.1%
Simplified88.8%
Taylor expanded in j around 0 84.6%
Taylor expanded in x around 0 55.4%
if 9.88131e-323 < (*.f64 (*.f64 j 27) k) < 9.9999999999999991e130Initial program 86.8%
Simplified93.4%
Taylor expanded in t around inf 60.3%
if 9.9999999999999991e130 < (*.f64 (*.f64 j 27) k) Initial program 88.0%
Simplified88.0%
Taylor expanded in b around inf 79.6%
Final simplification63.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 (+ (* b c) (* (* t a) -4.0))) (t_2 (+ (* b c) (* j (* k -27.0)))))
(if (<= j -2.6e+172)
t_2
(if (<= j -1.7e+146)
(* x (* z (* 18.0 (* y t))))
(if (<= j -9.2e+94)
t_2
(if (<= j -1.36e-219)
t_1
(if (<= j -5.8e-266)
(* (* t (* 18.0 y)) (* x z))
(if (<= j 3.4e-90) 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) + ((t * a) * -4.0);
double t_2 = (b * c) + (j * (k * -27.0));
double tmp;
if (j <= -2.6e+172) {
tmp = t_2;
} else if (j <= -1.7e+146) {
tmp = x * (z * (18.0 * (y * t)));
} else if (j <= -9.2e+94) {
tmp = t_2;
} else if (j <= -1.36e-219) {
tmp = t_1;
} else if (j <= -5.8e-266) {
tmp = (t * (18.0 * y)) * (x * z);
} else if (j <= 3.4e-90) {
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) + ((t * a) * (-4.0d0))
t_2 = (b * c) + (j * (k * (-27.0d0)))
if (j <= (-2.6d+172)) then
tmp = t_2
else if (j <= (-1.7d+146)) then
tmp = x * (z * (18.0d0 * (y * t)))
else if (j <= (-9.2d+94)) then
tmp = t_2
else if (j <= (-1.36d-219)) then
tmp = t_1
else if (j <= (-5.8d-266)) then
tmp = (t * (18.0d0 * y)) * (x * z)
else if (j <= 3.4d-90) 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) + ((t * a) * -4.0);
double t_2 = (b * c) + (j * (k * -27.0));
double tmp;
if (j <= -2.6e+172) {
tmp = t_2;
} else if (j <= -1.7e+146) {
tmp = x * (z * (18.0 * (y * t)));
} else if (j <= -9.2e+94) {
tmp = t_2;
} else if (j <= -1.36e-219) {
tmp = t_1;
} else if (j <= -5.8e-266) {
tmp = (t * (18.0 * y)) * (x * z);
} else if (j <= 3.4e-90) {
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) + ((t * a) * -4.0) t_2 = (b * c) + (j * (k * -27.0)) tmp = 0 if j <= -2.6e+172: tmp = t_2 elif j <= -1.7e+146: tmp = x * (z * (18.0 * (y * t))) elif j <= -9.2e+94: tmp = t_2 elif j <= -1.36e-219: tmp = t_1 elif j <= -5.8e-266: tmp = (t * (18.0 * y)) * (x * z) elif j <= 3.4e-90: 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(Float64(t * a) * -4.0)) t_2 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (j <= -2.6e+172) tmp = t_2; elseif (j <= -1.7e+146) tmp = Float64(x * Float64(z * Float64(18.0 * Float64(y * t)))); elseif (j <= -9.2e+94) tmp = t_2; elseif (j <= -1.36e-219) tmp = t_1; elseif (j <= -5.8e-266) tmp = Float64(Float64(t * Float64(18.0 * y)) * Float64(x * z)); elseif (j <= 3.4e-90) 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) + ((t * a) * -4.0);
t_2 = (b * c) + (j * (k * -27.0));
tmp = 0.0;
if (j <= -2.6e+172)
tmp = t_2;
elseif (j <= -1.7e+146)
tmp = x * (z * (18.0 * (y * t)));
elseif (j <= -9.2e+94)
tmp = t_2;
elseif (j <= -1.36e-219)
tmp = t_1;
elseif (j <= -5.8e-266)
tmp = (t * (18.0 * y)) * (x * z);
elseif (j <= 3.4e-90)
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[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2.6e+172], t$95$2, If[LessEqual[j, -1.7e+146], N[(x * N[(z * N[(18.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -9.2e+94], t$95$2, If[LessEqual[j, -1.36e-219], t$95$1, If[LessEqual[j, -5.8e-266], N[(N[(t * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.4e-90], 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 + \left(t \cdot a\right) \cdot -4\\
t_2 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;j \leq -2.6 \cdot 10^{+172}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \leq -1.7 \cdot 10^{+146}:\\
\;\;\;\;x \cdot \left(z \cdot \left(18 \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;j \leq -9.2 \cdot 10^{+94}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \leq -1.36 \cdot 10^{-219}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq -5.8 \cdot 10^{-266}:\\
\;\;\;\;\left(t \cdot \left(18 \cdot y\right)\right) \cdot \left(x \cdot z\right)\\
\mathbf{elif}\;j \leq 3.4 \cdot 10^{-90}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if j < -2.6e172 or -1.69999999999999995e146 < j < -9.1999999999999999e94 or 3.39999999999999994e-90 < j Initial program 83.0%
Simplified88.8%
Taylor expanded in b around inf 53.8%
if -2.6e172 < j < -1.69999999999999995e146Initial program 75.0%
Simplified75.0%
Taylor expanded in x around inf 75.7%
Taylor expanded in t around inf 75.7%
associate-*r*75.7%
associate-*r*75.7%
*-commutative75.7%
Simplified75.7%
if -9.1999999999999999e94 < j < -1.35999999999999997e-219 or -5.79999999999999991e-266 < j < 3.39999999999999994e-90Initial program 86.6%
Simplified89.8%
Taylor expanded in j around 0 82.7%
Taylor expanded in x around 0 51.6%
if -1.35999999999999997e-219 < j < -5.79999999999999991e-266Initial program 68.0%
Taylor expanded in x around 0 68.0%
Taylor expanded in a around 0 57.1%
Taylor expanded in t around inf 35.6%
associate-*r*35.6%
*-commutative35.6%
associate-*l*46.3%
associate-*l*56.7%
associate-*r*56.5%
*-commutative56.5%
associate-*l*56.5%
Simplified56.5%
Final simplification53.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))))
(if (<= j -2e+172)
t_1
(if (<= j -3.05e+144)
(* x (* z (* 18.0 (* y t))))
(if (<= j -8.8e+95)
t_1
(if (<= j -1.35e-224)
(+ (* b c) (* (* t a) -4.0))
(if (<= j -3.7e-242)
(* 18.0 (* t (* x (* y z))))
(if (<= j 1.7e-88) (- (* b c) (* 4.0 (* x i))) t_1))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (j <= -2e+172) {
tmp = t_1;
} else if (j <= -3.05e+144) {
tmp = x * (z * (18.0 * (y * t)));
} else if (j <= -8.8e+95) {
tmp = t_1;
} else if (j <= -1.35e-224) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (j <= -3.7e-242) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (j <= 1.7e-88) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
if (j <= (-2d+172)) then
tmp = t_1
else if (j <= (-3.05d+144)) then
tmp = x * (z * (18.0d0 * (y * t)))
else if (j <= (-8.8d+95)) then
tmp = t_1
else if (j <= (-1.35d-224)) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else if (j <= (-3.7d-242)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (j <= 1.7d-88) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double tmp;
if (j <= -2e+172) {
tmp = t_1;
} else if (j <= -3.05e+144) {
tmp = x * (z * (18.0 * (y * t)));
} else if (j <= -8.8e+95) {
tmp = t_1;
} else if (j <= -1.35e-224) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (j <= -3.7e-242) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (j <= 1.7e-88) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) tmp = 0 if j <= -2e+172: tmp = t_1 elif j <= -3.05e+144: tmp = x * (z * (18.0 * (y * t))) elif j <= -8.8e+95: tmp = t_1 elif j <= -1.35e-224: tmp = (b * c) + ((t * a) * -4.0) elif j <= -3.7e-242: tmp = 18.0 * (t * (x * (y * z))) elif j <= 1.7e-88: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (j <= -2e+172) tmp = t_1; elseif (j <= -3.05e+144) tmp = Float64(x * Float64(z * Float64(18.0 * Float64(y * t)))); elseif (j <= -8.8e+95) tmp = t_1; elseif (j <= -1.35e-224) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); elseif (j <= -3.7e-242) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (j <= 1.7e-88) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
tmp = 0.0;
if (j <= -2e+172)
tmp = t_1;
elseif (j <= -3.05e+144)
tmp = x * (z * (18.0 * (y * t)));
elseif (j <= -8.8e+95)
tmp = t_1;
elseif (j <= -1.35e-224)
tmp = (b * c) + ((t * a) * -4.0);
elseif (j <= -3.7e-242)
tmp = 18.0 * (t * (x * (y * z)));
elseif (j <= 1.7e-88)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2e+172], t$95$1, If[LessEqual[j, -3.05e+144], N[(x * N[(z * N[(18.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -8.8e+95], t$95$1, If[LessEqual[j, -1.35e-224], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -3.7e-242], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.7e-88], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;j \leq -2 \cdot 10^{+172}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq -3.05 \cdot 10^{+144}:\\
\;\;\;\;x \cdot \left(z \cdot \left(18 \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;j \leq -8.8 \cdot 10^{+95}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq -1.35 \cdot 10^{-224}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;j \leq -3.7 \cdot 10^{-242}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;j \leq 1.7 \cdot 10^{-88}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if j < -2.0000000000000002e172 or -3.04999999999999986e144 < j < -8.7999999999999996e95 or 1.69999999999999987e-88 < j Initial program 83.0%
Simplified88.8%
Taylor expanded in b around inf 53.8%
if -2.0000000000000002e172 < j < -3.04999999999999986e144Initial program 75.0%
Simplified75.0%
Taylor expanded in x around inf 75.7%
Taylor expanded in t around inf 75.7%
associate-*r*75.7%
associate-*r*75.7%
*-commutative75.7%
Simplified75.7%
if -8.7999999999999996e95 < j < -1.34999999999999999e-224Initial program 83.2%
Simplified88.9%
Taylor expanded in j around 0 77.7%
Taylor expanded in x around 0 48.2%
if -1.34999999999999999e-224 < j < -3.69999999999999997e-242Initial program 35.3%
Simplified68.6%
Taylor expanded in x around inf 35.6%
Taylor expanded in t around inf 35.6%
if -3.69999999999999997e-242 < j < 1.69999999999999987e-88Initial program 90.4%
Simplified90.3%
Taylor expanded in j around 0 88.7%
Taylor expanded in t around 0 52.1%
Final simplification51.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* y z))) (t_2 (* j (* k -27.0))))
(if (<= (* b c) -1.05e+40)
(+ (* b c) (* 18.0 (* t t_1)))
(if (<= (* b c) 1.5e-274)
(* t (- (* 18.0 t_1) (* a 4.0)))
(if (<= (* b c) 1.35e-171)
(+ t_2 (* (* x i) -4.0))
(if (<= (* b c) 6.4e+66)
(+ t_2 (* (* t a) -4.0))
(- (* b c) (* 27.0 (* j k)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (y * z);
double t_2 = j * (k * -27.0);
double tmp;
if ((b * c) <= -1.05e+40) {
tmp = (b * c) + (18.0 * (t * t_1));
} else if ((b * c) <= 1.5e-274) {
tmp = t * ((18.0 * t_1) - (a * 4.0));
} else if ((b * c) <= 1.35e-171) {
tmp = t_2 + ((x * i) * -4.0);
} else if ((b * c) <= 6.4e+66) {
tmp = t_2 + ((t * a) * -4.0);
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (y * z)
t_2 = j * (k * (-27.0d0))
if ((b * c) <= (-1.05d+40)) then
tmp = (b * c) + (18.0d0 * (t * t_1))
else if ((b * c) <= 1.5d-274) then
tmp = t * ((18.0d0 * t_1) - (a * 4.0d0))
else if ((b * c) <= 1.35d-171) then
tmp = t_2 + ((x * i) * (-4.0d0))
else if ((b * c) <= 6.4d+66) then
tmp = t_2 + ((t * a) * (-4.0d0))
else
tmp = (b * c) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (y * z);
double t_2 = j * (k * -27.0);
double tmp;
if ((b * c) <= -1.05e+40) {
tmp = (b * c) + (18.0 * (t * t_1));
} else if ((b * c) <= 1.5e-274) {
tmp = t * ((18.0 * t_1) - (a * 4.0));
} else if ((b * c) <= 1.35e-171) {
tmp = t_2 + ((x * i) * -4.0);
} else if ((b * c) <= 6.4e+66) {
tmp = t_2 + ((t * a) * -4.0);
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (y * z) t_2 = j * (k * -27.0) tmp = 0 if (b * c) <= -1.05e+40: tmp = (b * c) + (18.0 * (t * t_1)) elif (b * c) <= 1.5e-274: tmp = t * ((18.0 * t_1) - (a * 4.0)) elif (b * c) <= 1.35e-171: tmp = t_2 + ((x * i) * -4.0) elif (b * c) <= 6.4e+66: tmp = t_2 + ((t * a) * -4.0) else: tmp = (b * c) - (27.0 * (j * k)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(y * z)) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -1.05e+40) tmp = Float64(Float64(b * c) + Float64(18.0 * Float64(t * t_1))); elseif (Float64(b * c) <= 1.5e-274) tmp = Float64(t * Float64(Float64(18.0 * t_1) - Float64(a * 4.0))); elseif (Float64(b * c) <= 1.35e-171) tmp = Float64(t_2 + Float64(Float64(x * i) * -4.0)); elseif (Float64(b * c) <= 6.4e+66) tmp = Float64(t_2 + Float64(Float64(t * a) * -4.0)); else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (y * z);
t_2 = j * (k * -27.0);
tmp = 0.0;
if ((b * c) <= -1.05e+40)
tmp = (b * c) + (18.0 * (t * t_1));
elseif ((b * c) <= 1.5e-274)
tmp = t * ((18.0 * t_1) - (a * 4.0));
elseif ((b * c) <= 1.35e-171)
tmp = t_2 + ((x * i) * -4.0);
elseif ((b * c) <= 6.4e+66)
tmp = t_2 + ((t * a) * -4.0);
else
tmp = (b * c) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.05e+40], N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.5e-274], N[(t * N[(N[(18.0 * t$95$1), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.35e-171], N[(t$95$2 + N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.4e+66], N[(t$95$2 + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -1.05 \cdot 10^{+40}:\\
\;\;\;\;b \cdot c + 18 \cdot \left(t \cdot t_1\right)\\
\mathbf{elif}\;b \cdot c \leq 1.5 \cdot 10^{-274}:\\
\;\;\;\;t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.35 \cdot 10^{-171}:\\
\;\;\;\;t_2 + \left(x \cdot i\right) \cdot -4\\
\mathbf{elif}\;b \cdot c \leq 6.4 \cdot 10^{+66}:\\
\;\;\;\;t_2 + \left(t \cdot a\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.05000000000000005e40Initial program 84.4%
Simplified86.2%
Taylor expanded in j around 0 81.3%
Taylor expanded in i around 0 79.8%
Taylor expanded in a around 0 70.2%
if -1.05000000000000005e40 < (*.f64 b c) < 1.49999999999999989e-274Initial program 85.5%
Simplified89.4%
Taylor expanded in t around inf 59.0%
if 1.49999999999999989e-274 < (*.f64 b c) < 1.35000000000000007e-171Initial program 74.1%
Simplified84.5%
Taylor expanded in i around inf 79.8%
if 1.35000000000000007e-171 < (*.f64 b c) < 6.3999999999999999e66Initial program 87.5%
Simplified90.8%
Taylor expanded in a around inf 72.4%
*-commutative72.4%
Simplified72.4%
if 6.3999999999999999e66 < (*.f64 b c) Initial program 82.9%
Taylor expanded in x around 0 81.3%
Taylor expanded in b around inf 68.0%
Taylor expanded in j around 0 68.0%
Final simplification66.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -1e+80)
(- (* b c) t_1)
(if (<= t_1 1e-5)
(+ (* b c) (* (* t a) -4.0))
(if (<= t_1 1e+78)
(* (* t (* 18.0 y)) (* x z))
(+ (* 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 t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -1e+80) {
tmp = (b * c) - t_1;
} else if (t_1 <= 1e-5) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (t_1 <= 1e+78) {
tmp = (t * (18.0 * y)) * (x * z);
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-1d+80)) then
tmp = (b * c) - t_1
else if (t_1 <= 1d-5) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else if (t_1 <= 1d+78) then
tmp = (t * (18.0d0 * y)) * (x * z)
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -1e+80) {
tmp = (b * c) - t_1;
} else if (t_1 <= 1e-5) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (t_1 <= 1e+78) {
tmp = (t * (18.0 * y)) * (x * z);
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -1e+80: tmp = (b * c) - t_1 elif t_1 <= 1e-5: tmp = (b * c) + ((t * a) * -4.0) elif t_1 <= 1e+78: tmp = (t * (18.0 * y)) * (x * z) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -1e+80) tmp = Float64(Float64(b * c) - t_1); elseif (t_1 <= 1e-5) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); elseif (t_1 <= 1e+78) tmp = Float64(Float64(t * Float64(18.0 * y)) * Float64(x * z)); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -1e+80)
tmp = (b * c) - t_1;
elseif (t_1 <= 1e-5)
tmp = (b * c) + ((t * a) * -4.0);
elseif (t_1 <= 1e+78)
tmp = (t * (18.0 * y)) * (x * z);
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+80], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 1e-5], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+78], N[(N[(t * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+80}:\\
\;\;\;\;b \cdot c - t_1\\
\mathbf{elif}\;t_1 \leq 10^{-5}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;t_1 \leq 10^{+78}:\\
\;\;\;\;\left(t \cdot \left(18 \cdot y\right)\right) \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -1e80Initial program 78.9%
Taylor expanded in x around 0 76.8%
Taylor expanded in b around inf 65.9%
if -1e80 < (*.f64 (*.f64 j 27) k) < 1.00000000000000008e-5Initial program 84.1%
Simplified88.9%
Taylor expanded in j around 0 88.2%
Taylor expanded in x around 0 55.8%
if 1.00000000000000008e-5 < (*.f64 (*.f64 j 27) k) < 1.00000000000000001e78Initial program 85.2%
Taylor expanded in x around 0 90.9%
Taylor expanded in a around 0 82.2%
Taylor expanded in t around inf 51.9%
associate-*r*51.8%
*-commutative51.8%
associate-*l*51.6%
associate-*l*56.2%
associate-*r*56.4%
*-commutative56.4%
associate-*l*56.3%
Simplified56.3%
if 1.00000000000000001e78 < (*.f64 (*.f64 j 27) k) Initial program 90.4%
Simplified90.3%
Taylor expanded in b around inf 73.6%
Final simplification60.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -5e+176)
(+ t_1 (* (* x i) -4.0))
(if (<= t_2 1e-5)
(+ (* b c) (* (* t a) -4.0))
(if (<= t_2 1e+78) (* (* t (* 18.0 y)) (* x z)) (+ (* b c) 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);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+176) {
tmp = t_1 + ((x * i) * -4.0);
} else if (t_2 <= 1e-5) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (t_2 <= 1e+78) {
tmp = (t * (18.0 * y)) * (x * z);
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (j * 27.0d0) * k
if (t_2 <= (-5d+176)) then
tmp = t_1 + ((x * i) * (-4.0d0))
else if (t_2 <= 1d-5) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else if (t_2 <= 1d+78) then
tmp = (t * (18.0d0 * y)) * (x * z)
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+176) {
tmp = t_1 + ((x * i) * -4.0);
} else if (t_2 <= 1e-5) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (t_2 <= 1e+78) {
tmp = (t * (18.0 * y)) * (x * z);
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -5e+176: tmp = t_1 + ((x * i) * -4.0) elif t_2 <= 1e-5: tmp = (b * c) + ((t * a) * -4.0) elif t_2 <= 1e+78: tmp = (t * (18.0 * y)) * (x * z) else: tmp = (b * c) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -5e+176) tmp = Float64(t_1 + Float64(Float64(x * i) * -4.0)); elseif (t_2 <= 1e-5) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); elseif (t_2 <= 1e+78) tmp = Float64(Float64(t * Float64(18.0 * y)) * Float64(x * z)); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -5e+176)
tmp = t_1 + ((x * i) * -4.0);
elseif (t_2 <= 1e-5)
tmp = (b * c) + ((t * a) * -4.0);
elseif (t_2 <= 1e+78)
tmp = (t * (18.0 * y)) * (x * z);
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+176], N[(t$95$1 + N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-5], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+78], N[(N[(t * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(x * z), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $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 := j \cdot \left(k \cdot -27\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+176}:\\
\;\;\;\;t_1 + \left(x \cdot i\right) \cdot -4\\
\mathbf{elif}\;t_2 \leq 10^{-5}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;t_2 \leq 10^{+78}:\\
\;\;\;\;\left(t \cdot \left(18 \cdot y\right)\right) \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -5e176Initial program 76.8%
Simplified79.5%
Taylor expanded in i around inf 77.2%
if -5e176 < (*.f64 (*.f64 j 27) k) < 1.00000000000000008e-5Initial program 84.2%
Simplified89.8%
Taylor expanded in j around 0 87.1%
Taylor expanded in x around 0 55.5%
if 1.00000000000000008e-5 < (*.f64 (*.f64 j 27) k) < 1.00000000000000001e78Initial program 85.2%
Taylor expanded in x around 0 90.9%
Taylor expanded in a around 0 82.2%
Taylor expanded in t around inf 51.9%
associate-*r*51.8%
*-commutative51.8%
associate-*l*51.6%
associate-*l*56.2%
associate-*r*56.4%
*-commutative56.4%
associate-*l*56.3%
Simplified56.3%
if 1.00000000000000001e78 < (*.f64 (*.f64 j 27) k) Initial program 90.4%
Simplified90.3%
Taylor expanded in b around inf 73.6%
Final simplification61.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* t (* x (* y z)))))
(t_2 (- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))))
(if (<= z -2.25e-57)
(+ t_1 (* j (* k -27.0)))
(if (<= z -3.65e-155)
t_2
(if (<= z -8.5e-300)
(+ (* b c) (* (* t a) -4.0))
(if (<= z 3.5e+85) t_2 (+ (* b c) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double t_2 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
double tmp;
if (z <= -2.25e-57) {
tmp = t_1 + (j * (k * -27.0));
} else if (z <= -3.65e-155) {
tmp = t_2;
} else if (z <= -8.5e-300) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (z <= 3.5e+85) {
tmp = t_2;
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = 18.0d0 * (t * (x * (y * z)))
t_2 = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
if (z <= (-2.25d-57)) then
tmp = t_1 + (j * (k * (-27.0d0)))
else if (z <= (-3.65d-155)) then
tmp = t_2
else if (z <= (-8.5d-300)) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else if (z <= 3.5d+85) then
tmp = t_2
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (x * (y * z)));
double t_2 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
double tmp;
if (z <= -2.25e-57) {
tmp = t_1 + (j * (k * -27.0));
} else if (z <= -3.65e-155) {
tmp = t_2;
} else if (z <= -8.5e-300) {
tmp = (b * c) + ((t * a) * -4.0);
} else if (z <= 3.5e+85) {
tmp = t_2;
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (t * (x * (y * z))) t_2 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) tmp = 0 if z <= -2.25e-57: tmp = t_1 + (j * (k * -27.0)) elif z <= -3.65e-155: tmp = t_2 elif z <= -8.5e-300: tmp = (b * c) + ((t * a) * -4.0) elif z <= 3.5e+85: tmp = t_2 else: tmp = (b * c) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) t_2 = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))) tmp = 0.0 if (z <= -2.25e-57) tmp = Float64(t_1 + Float64(j * Float64(k * -27.0))); elseif (z <= -3.65e-155) tmp = t_2; elseif (z <= -8.5e-300) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); elseif (z <= 3.5e+85) tmp = t_2; else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (t * (x * (y * z)));
t_2 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
tmp = 0.0;
if (z <= -2.25e-57)
tmp = t_1 + (j * (k * -27.0));
elseif (z <= -3.65e-155)
tmp = t_2;
elseif (z <= -8.5e-300)
tmp = (b * c) + ((t * a) * -4.0);
elseif (z <= 3.5e+85)
tmp = t_2;
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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[z, -2.25e-57], N[(t$95$1 + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.65e-155], t$95$2, If[LessEqual[z, -8.5e-300], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+85], t$95$2, N[(N[(b * c), $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 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
t_2 := b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{-57}:\\
\;\;\;\;t_1 + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;z \leq -3.65 \cdot 10^{-155}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-300}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+85}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_1\\
\end{array}
\end{array}
if z < -2.24999999999999986e-57Initial program 81.1%
Simplified79.7%
Taylor expanded in y around inf 49.2%
if -2.24999999999999986e-57 < z < -3.65000000000000017e-155 or -8.4999999999999995e-300 < z < 3.50000000000000005e85Initial program 84.8%
Simplified93.6%
Taylor expanded in t around 0 65.9%
if -3.65000000000000017e-155 < z < -8.4999999999999995e-300Initial program 96.6%
Simplified93.5%
Taylor expanded in j around 0 89.3%
Taylor expanded in x around 0 69.8%
if 3.50000000000000005e85 < z Initial program 79.3%
Simplified87.6%
Taylor expanded in j around 0 79.7%
Taylor expanded in i around 0 81.9%
Taylor expanded in a around 0 72.0%
Final simplification63.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 (* (* j 27.0) k)))
(if (<= t_1 -5e+56)
(- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
(if (<= t_1 1e+93)
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 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 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+56) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else if (t_1 <= 1e+93) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 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) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-5d+56)) then
tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
else if (t_1 <= 1d+93) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 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 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+56) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else if (t_1 <= 1e+93) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 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 = (j * 27.0) * k tmp = 0 if t_1 <= -5e+56: tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) elif t_1 <= 1e+93: tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 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(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -5e+56) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); elseif (t_1 <= 1e+93) 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))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -5e+56)
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
elseif (t_1 <= 1e+93)
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 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[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+56], 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$95$1, 1e+93], 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] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+56}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{elif}\;t_1 \leq 10^{+93}:\\
\;\;\;\;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) - t_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -5.00000000000000024e56Initial program 79.8%
Simplified86.4%
Taylor expanded in t around 0 74.0%
if -5.00000000000000024e56 < (*.f64 (*.f64 j 27) k) < 1.00000000000000004e93Initial program 84.4%
Simplified88.8%
Taylor expanded in j around 0 86.9%
Taylor expanded in i around 0 75.6%
if 1.00000000000000004e93 < (*.f64 (*.f64 j 27) k) Initial program 89.6%
Taylor expanded in x around 0 82.1%
Final simplification76.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 (<= x -4.2e+149)
(* 18.0 (* t (* x (* y z))))
(if (<= x -2.75e+117)
(* (* x i) -4.0)
(if (<= x -4.6e-25)
(* x (* z (* 18.0 (* y t))))
(if (<= x -5.5e-71)
(* (* j k) -27.0)
(if (<= x 1.35e+16)
(+ (* b c) (* (* t a) -4.0))
(* (* t (* 18.0 y)) (* x z))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -4.2e+149) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= -2.75e+117) {
tmp = (x * i) * -4.0;
} else if (x <= -4.6e-25) {
tmp = x * (z * (18.0 * (y * t)));
} else if (x <= -5.5e-71) {
tmp = (j * k) * -27.0;
} else if (x <= 1.35e+16) {
tmp = (b * c) + ((t * a) * -4.0);
} else {
tmp = (t * (18.0 * y)) * (x * z);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-4.2d+149)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (x <= (-2.75d+117)) then
tmp = (x * i) * (-4.0d0)
else if (x <= (-4.6d-25)) then
tmp = x * (z * (18.0d0 * (y * t)))
else if (x <= (-5.5d-71)) then
tmp = (j * k) * (-27.0d0)
else if (x <= 1.35d+16) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else
tmp = (t * (18.0d0 * y)) * (x * z)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -4.2e+149) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (x <= -2.75e+117) {
tmp = (x * i) * -4.0;
} else if (x <= -4.6e-25) {
tmp = x * (z * (18.0 * (y * t)));
} else if (x <= -5.5e-71) {
tmp = (j * k) * -27.0;
} else if (x <= 1.35e+16) {
tmp = (b * c) + ((t * a) * -4.0);
} else {
tmp = (t * (18.0 * y)) * (x * z);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -4.2e+149: tmp = 18.0 * (t * (x * (y * z))) elif x <= -2.75e+117: tmp = (x * i) * -4.0 elif x <= -4.6e-25: tmp = x * (z * (18.0 * (y * t))) elif x <= -5.5e-71: tmp = (j * k) * -27.0 elif x <= 1.35e+16: tmp = (b * c) + ((t * a) * -4.0) else: tmp = (t * (18.0 * y)) * (x * z) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -4.2e+149) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (x <= -2.75e+117) tmp = Float64(Float64(x * i) * -4.0); elseif (x <= -4.6e-25) tmp = Float64(x * Float64(z * Float64(18.0 * Float64(y * t)))); elseif (x <= -5.5e-71) tmp = Float64(Float64(j * k) * -27.0); elseif (x <= 1.35e+16) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); else tmp = Float64(Float64(t * Float64(18.0 * y)) * Float64(x * z)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -4.2e+149)
tmp = 18.0 * (t * (x * (y * z)));
elseif (x <= -2.75e+117)
tmp = (x * i) * -4.0;
elseif (x <= -4.6e-25)
tmp = x * (z * (18.0 * (y * t)));
elseif (x <= -5.5e-71)
tmp = (j * k) * -27.0;
elseif (x <= 1.35e+16)
tmp = (b * c) + ((t * a) * -4.0);
else
tmp = (t * (18.0 * y)) * (x * z);
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[x, -4.2e+149], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.75e+117], N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[x, -4.6e-25], N[(x * N[(z * N[(18.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.5e-71], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[x, 1.35e+16], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+149}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq -2.75 \cdot 10^{+117}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\
\mathbf{elif}\;x \leq -4.6 \cdot 10^{-25}:\\
\;\;\;\;x \cdot \left(z \cdot \left(18 \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{-71}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+16}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(18 \cdot y\right)\right) \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
if x < -4.2000000000000003e149Initial program 73.4%
Simplified82.0%
Taylor expanded in x around inf 78.5%
Taylor expanded in t around inf 60.6%
if -4.2000000000000003e149 < x < -2.74999999999999982e117Initial program 64.0%
Simplified81.8%
associate-*r*64.0%
distribute-rgt-out--64.0%
associate-*l*63.6%
*-commutative63.6%
*-commutative63.6%
Applied egg-rr63.6%
Taylor expanded in i around inf 69.0%
*-commutative69.0%
*-commutative69.0%
Simplified69.0%
if -2.74999999999999982e117 < x < -4.5999999999999998e-25Initial program 74.4%
Simplified92.7%
Taylor expanded in x around inf 49.6%
Taylor expanded in t around inf 42.2%
associate-*r*45.6%
associate-*r*45.6%
*-commutative45.6%
Simplified45.6%
if -4.5999999999999998e-25 < x < -5.4999999999999997e-71Initial program 99.6%
Simplified100.0%
Taylor expanded in j around inf 63.3%
if -5.4999999999999997e-71 < x < 1.35e16Initial program 91.4%
Simplified89.1%
Taylor expanded in j around 0 72.6%
Taylor expanded in x around 0 62.3%
if 1.35e16 < x Initial program 79.8%
Taylor expanded in x around 0 91.7%
Taylor expanded in a around 0 88.0%
Taylor expanded in t around inf 52.5%
associate-*r*52.5%
*-commutative52.5%
associate-*l*54.4%
associate-*l*54.4%
associate-*r*54.4%
*-commutative54.4%
associate-*l*54.4%
Simplified54.4%
Final simplification59.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 (* (* j 27.0) k)))
(if (or (<= x -6e-34) (not (<= x 650000000000.0)))
(- (+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))) t_1)
(- (- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i)))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((x <= -6e-34) || !(x <= 650000000000.0)) {
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - t_1;
} else {
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if ((x <= (-6d-34)) .or. (.not. (x <= 650000000000.0d0))) then
tmp = ((b * c) + (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i)))) - t_1
else
tmp = ((b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((x <= -6e-34) || !(x <= 650000000000.0)) {
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - t_1;
} else {
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if (x <= -6e-34) or not (x <= 650000000000.0): tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - t_1 else: tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((x <= -6e-34) || !(x <= 650000000000.0)) tmp = Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i)))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if ((x <= -6e-34) || ~((x <= 650000000000.0)))
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - t_1;
else
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[x, -6e-34], N[Not[LessEqual[x, 650000000000.0]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;x \leq -6 \cdot 10^{-34} \lor \neg \left(x \leq 650000000000\right):\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\right) - t_1\\
\end{array}
\end{array}
if x < -6e-34 or 6.5e11 < x Initial program 75.6%
Taylor expanded in x around 0 86.8%
Taylor expanded in a around 0 85.5%
if -6e-34 < x < 6.5e11Initial program 91.8%
Taylor expanded in y around 0 88.3%
Final simplification87.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= z -9.2e-57)
(- (* t (- (* -18.0 (* z (* y (- x)))) (* a 4.0))) t_1)
(if (<= z 1e+71)
(- (- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i)))) t_1)
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (z <= -9.2e-57) {
tmp = (t * ((-18.0 * (z * (y * -x))) - (a * 4.0))) - t_1;
} else if (z <= 1e+71) {
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - t_1;
} else {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (z <= (-9.2d-57)) then
tmp = (t * (((-18.0d0) * (z * (y * -x))) - (a * 4.0d0))) - t_1
else if (z <= 1d+71) then
tmp = ((b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))) - t_1
else
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (z <= -9.2e-57) {
tmp = (t * ((-18.0 * (z * (y * -x))) - (a * 4.0))) - t_1;
} else if (z <= 1e+71) {
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - t_1;
} else {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if z <= -9.2e-57: tmp = (t * ((-18.0 * (z * (y * -x))) - (a * 4.0))) - t_1 elif z <= 1e+71: tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - t_1 else: tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (z <= -9.2e-57) tmp = Float64(Float64(t * Float64(Float64(-18.0 * Float64(z * Float64(y * Float64(-x)))) - Float64(a * 4.0))) - t_1); elseif (z <= 1e+71) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i)))) - t_1); else tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (z <= -9.2e-57)
tmp = (t * ((-18.0 * (z * (y * -x))) - (a * 4.0))) - t_1;
elseif (z <= 1e+71)
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - t_1;
else
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[z, -9.2e-57], N[(N[(t * N[(N[(-18.0 * N[(z * N[(y * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 1e+71], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $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]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{-57}:\\
\;\;\;\;t \cdot \left(-18 \cdot \left(z \cdot \left(y \cdot \left(-x\right)\right)\right) - a \cdot 4\right) - t_1\\
\mathbf{elif}\;z \leq 10^{+71}:\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if z < -9.2000000000000001e-57Initial program 81.1%
Taylor expanded in x around 0 73.9%
Taylor expanded in t around -inf 60.5%
associate-*r*60.5%
neg-mul-160.5%
cancel-sign-sub-inv60.5%
metadata-eval60.5%
associate-*r*62.2%
*-commutative62.2%
Simplified62.2%
if -9.2000000000000001e-57 < z < 1e71Initial program 88.6%
Taylor expanded in y around 0 83.6%
if 1e71 < z Initial program 76.1%
Simplified88.1%
Taylor expanded in j around 0 80.5%
Taylor expanded in i around 0 82.6%
Final simplification77.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 (- (+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0)))) (+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
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) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
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) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)))
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))) 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) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
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[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\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])\\
\\
\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)
\end{array}
Initial program 84.1%
Simplified88.3%
Final simplification88.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -7.5e-21) (not (<= x 5e-56))) (+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))) (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -7.5e-21) || !(x <= 5e-56)) {
tmp = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-7.5d-21)) .or. (.not. (x <= 5d-56))) then
tmp = (b * c) + (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i)))
else
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -7.5e-21) || !(x <= 5e-56)) {
tmp = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -7.5e-21) or not (x <= 5e-56): tmp = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i))) else: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -7.5e-21) || !(x <= 5e-56)) tmp = Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -7.5e-21) || ~((x <= 5e-56)))
tmp = (b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)));
else
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -7.5e-21], N[Not[LessEqual[x, 5e-56]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{-21} \lor \neg \left(x \leq 5 \cdot 10^{-56}\right):\\
\;\;\;\;b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if x < -7.50000000000000072e-21 or 4.99999999999999997e-56 < x Initial program 77.0%
Taylor expanded in x around 0 86.6%
Taylor expanded in a around 0 85.1%
Taylor expanded in j around 0 75.2%
if -7.50000000000000072e-21 < x < 4.99999999999999997e-56Initial program 91.8%
Taylor expanded in x around 0 84.0%
Final simplification79.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j k) -27.0)))
(if (<= b -6.5e+86)
(* b c)
(if (<= b -4.6e-127)
t_1
(if (<= b -8e-306)
(* (* t a) -4.0)
(if (<= b 1.25e-47) 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 = (j * k) * -27.0;
double tmp;
if (b <= -6.5e+86) {
tmp = b * c;
} else if (b <= -4.6e-127) {
tmp = t_1;
} else if (b <= -8e-306) {
tmp = (t * a) * -4.0;
} else if (b <= 1.25e-47) {
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 = (j * k) * (-27.0d0)
if (b <= (-6.5d+86)) then
tmp = b * c
else if (b <= (-4.6d-127)) then
tmp = t_1
else if (b <= (-8d-306)) then
tmp = (t * a) * (-4.0d0)
else if (b <= 1.25d-47) 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 = (j * k) * -27.0;
double tmp;
if (b <= -6.5e+86) {
tmp = b * c;
} else if (b <= -4.6e-127) {
tmp = t_1;
} else if (b <= -8e-306) {
tmp = (t * a) * -4.0;
} else if (b <= 1.25e-47) {
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 = (j * k) * -27.0 tmp = 0 if b <= -6.5e+86: tmp = b * c elif b <= -4.6e-127: tmp = t_1 elif b <= -8e-306: tmp = (t * a) * -4.0 elif b <= 1.25e-47: 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(Float64(j * k) * -27.0) tmp = 0.0 if (b <= -6.5e+86) tmp = Float64(b * c); elseif (b <= -4.6e-127) tmp = t_1; elseif (b <= -8e-306) tmp = Float64(Float64(t * a) * -4.0); elseif (b <= 1.25e-47) 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 = (j * k) * -27.0;
tmp = 0.0;
if (b <= -6.5e+86)
tmp = b * c;
elseif (b <= -4.6e-127)
tmp = t_1;
elseif (b <= -8e-306)
tmp = (t * a) * -4.0;
elseif (b <= 1.25e-47)
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[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]}, If[LessEqual[b, -6.5e+86], N[(b * c), $MachinePrecision], If[LessEqual[b, -4.6e-127], t$95$1, If[LessEqual[b, -8e-306], N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[b, 1.25e-47], 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 := \left(j \cdot k\right) \cdot -27\\
\mathbf{if}\;b \leq -6.5 \cdot 10^{+86}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \leq -4.6 \cdot 10^{-127}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -8 \cdot 10^{-306}:\\
\;\;\;\;\left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{-47}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if b < -6.49999999999999996e86 or 1.25000000000000003e-47 < b Initial program 84.0%
Simplified87.8%
associate-*r*87.8%
distribute-rgt-out--84.0%
associate-*l*82.4%
*-commutative82.4%
*-commutative82.4%
Applied egg-rr82.4%
Taylor expanded in b around inf 35.7%
if -6.49999999999999996e86 < b < -4.60000000000000038e-127 or -8.00000000000000022e-306 < b < 1.25000000000000003e-47Initial program 84.1%
Simplified89.9%
Taylor expanded in j around inf 31.7%
if -4.60000000000000038e-127 < b < -8.00000000000000022e-306Initial program 84.9%
Simplified88.7%
associate-*r*85.1%
distribute-rgt-out--81.2%
associate-*l*84.8%
*-commutative84.8%
*-commutative84.8%
Applied egg-rr84.8%
Taylor expanded in a around inf 26.3%
Final simplification33.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))))
(if (<= b -3.2e+86)
(* b c)
(if (<= b -1.3e-126)
t_1
(if (<= b 1.45e-307)
(* (* t a) -4.0)
(if (<= b 1.3e-47) 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 = j * (k * -27.0);
double tmp;
if (b <= -3.2e+86) {
tmp = b * c;
} else if (b <= -1.3e-126) {
tmp = t_1;
} else if (b <= 1.45e-307) {
tmp = (t * a) * -4.0;
} else if (b <= 1.3e-47) {
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 = j * (k * (-27.0d0))
if (b <= (-3.2d+86)) then
tmp = b * c
else if (b <= (-1.3d-126)) then
tmp = t_1
else if (b <= 1.45d-307) then
tmp = (t * a) * (-4.0d0)
else if (b <= 1.3d-47) 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 = j * (k * -27.0);
double tmp;
if (b <= -3.2e+86) {
tmp = b * c;
} else if (b <= -1.3e-126) {
tmp = t_1;
} else if (b <= 1.45e-307) {
tmp = (t * a) * -4.0;
} else if (b <= 1.3e-47) {
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 = j * (k * -27.0) tmp = 0 if b <= -3.2e+86: tmp = b * c elif b <= -1.3e-126: tmp = t_1 elif b <= 1.45e-307: tmp = (t * a) * -4.0 elif b <= 1.3e-47: 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(j * Float64(k * -27.0)) tmp = 0.0 if (b <= -3.2e+86) tmp = Float64(b * c); elseif (b <= -1.3e-126) tmp = t_1; elseif (b <= 1.45e-307) tmp = Float64(Float64(t * a) * -4.0); elseif (b <= 1.3e-47) 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 = j * (k * -27.0);
tmp = 0.0;
if (b <= -3.2e+86)
tmp = b * c;
elseif (b <= -1.3e-126)
tmp = t_1;
elseif (b <= 1.45e-307)
tmp = (t * a) * -4.0;
elseif (b <= 1.3e-47)
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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.2e+86], N[(b * c), $MachinePrecision], If[LessEqual[b, -1.3e-126], t$95$1, If[LessEqual[b, 1.45e-307], N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[b, 1.3e-47], 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 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{+86}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \leq -1.3 \cdot 10^{-126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.45 \cdot 10^{-307}:\\
\;\;\;\;\left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;b \leq 1.3 \cdot 10^{-47}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if b < -3.2e86 or 1.3e-47 < b Initial program 84.0%
Simplified87.8%
associate-*r*87.8%
distribute-rgt-out--84.0%
associate-*l*82.4%
*-commutative82.4%
*-commutative82.4%
Applied egg-rr82.4%
Taylor expanded in b around inf 35.7%
if -3.2e86 < b < -1.3e-126 or 1.45e-307 < b < 1.3e-47Initial program 83.9%
Taylor expanded in x around 0 83.9%
Taylor expanded in j around inf 31.9%
*-commutative31.9%
associate-*r*32.0%
Simplified32.0%
if -1.3e-126 < b < 1.45e-307Initial program 85.4%
Simplified89.1%
associate-*r*85.6%
distribute-rgt-out--81.9%
associate-*l*85.4%
*-commutative85.4%
*-commutative85.4%
Applied egg-rr85.4%
Taylor expanded in a around inf 29.0%
Final simplification33.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 (* k (* j -27.0))))
(if (<= b -8.5e+86)
(* b c)
(if (<= b -2.8e-125)
t_1
(if (<= b -2.1e-306)
(* (* t a) -4.0)
(if (<= b 1.12e-47) 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 = k * (j * -27.0);
double tmp;
if (b <= -8.5e+86) {
tmp = b * c;
} else if (b <= -2.8e-125) {
tmp = t_1;
} else if (b <= -2.1e-306) {
tmp = (t * a) * -4.0;
} else if (b <= 1.12e-47) {
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 = k * (j * (-27.0d0))
if (b <= (-8.5d+86)) then
tmp = b * c
else if (b <= (-2.8d-125)) then
tmp = t_1
else if (b <= (-2.1d-306)) then
tmp = (t * a) * (-4.0d0)
else if (b <= 1.12d-47) 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 = k * (j * -27.0);
double tmp;
if (b <= -8.5e+86) {
tmp = b * c;
} else if (b <= -2.8e-125) {
tmp = t_1;
} else if (b <= -2.1e-306) {
tmp = (t * a) * -4.0;
} else if (b <= 1.12e-47) {
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 = k * (j * -27.0) tmp = 0 if b <= -8.5e+86: tmp = b * c elif b <= -2.8e-125: tmp = t_1 elif b <= -2.1e-306: tmp = (t * a) * -4.0 elif b <= 1.12e-47: 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(k * Float64(j * -27.0)) tmp = 0.0 if (b <= -8.5e+86) tmp = Float64(b * c); elseif (b <= -2.8e-125) tmp = t_1; elseif (b <= -2.1e-306) tmp = Float64(Float64(t * a) * -4.0); elseif (b <= 1.12e-47) 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 = k * (j * -27.0);
tmp = 0.0;
if (b <= -8.5e+86)
tmp = b * c;
elseif (b <= -2.8e-125)
tmp = t_1;
elseif (b <= -2.1e-306)
tmp = (t * a) * -4.0;
elseif (b <= 1.12e-47)
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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.5e+86], N[(b * c), $MachinePrecision], If[LessEqual[b, -2.8e-125], t$95$1, If[LessEqual[b, -2.1e-306], N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[b, 1.12e-47], 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 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{+86}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \leq -2.8 \cdot 10^{-125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -2.1 \cdot 10^{-306}:\\
\;\;\;\;\left(t \cdot a\right) \cdot -4\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{-47}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if b < -8.5000000000000005e86 or 1.12000000000000002e-47 < b Initial program 84.0%
Simplified87.8%
associate-*r*87.8%
distribute-rgt-out--84.0%
associate-*l*82.4%
*-commutative82.4%
*-commutative82.4%
Applied egg-rr82.4%
Taylor expanded in b around inf 35.7%
if -8.5000000000000005e86 < b < -2.8e-125 or -2.1000000000000001e-306 < b < 1.12000000000000002e-47Initial program 84.1%
Simplified89.9%
Taylor expanded in j around inf 31.7%
*-commutative31.7%
associate-*r*31.7%
*-commutative31.7%
associate-*l*31.7%
Simplified31.7%
if -2.8e-125 < b < -2.1000000000000001e-306Initial program 84.9%
Simplified88.7%
associate-*r*85.1%
distribute-rgt-out--81.2%
associate-*l*84.8%
*-commutative84.8%
*-commutative84.8%
Applied egg-rr84.8%
Taylor expanded in a around inf 26.3%
Final simplification33.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= b -1.35e+86) (not (<= b 7.2e-48))) (* b c) (* (* j k) -27.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b <= -1.35e+86) || !(b <= 7.2e-48)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b <= (-1.35d+86)) .or. (.not. (b <= 7.2d-48))) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b <= -1.35e+86) || !(b <= 7.2e-48)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b <= -1.35e+86) or not (b <= 7.2e-48): tmp = b * c else: tmp = (j * k) * -27.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((b <= -1.35e+86) || !(b <= 7.2e-48)) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b <= -1.35e+86) || ~((b <= 7.2e-48)))
tmp = b * c;
else
tmp = (j * k) * -27.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[b, -1.35e+86], N[Not[LessEqual[b, 7.2e-48]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.35 \cdot 10^{+86} \lor \neg \left(b \leq 7.2 \cdot 10^{-48}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if b < -1.35000000000000009e86 or 7.2000000000000003e-48 < b Initial program 84.0%
Simplified87.8%
associate-*r*87.8%
distribute-rgt-out--84.0%
associate-*l*82.4%
*-commutative82.4%
*-commutative82.4%
Applied egg-rr82.4%
Taylor expanded in b around inf 35.7%
if -1.35000000000000009e86 < b < 7.2000000000000003e-48Initial program 84.2%
Simplified89.7%
Taylor expanded in j around inf 28.8%
Final simplification32.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.1%
Simplified88.3%
associate-*r*88.5%
distribute-rgt-out--84.2%
associate-*l*83.3%
*-commutative83.3%
*-commutative83.3%
Applied egg-rr83.3%
Taylor expanded in b around inf 23.6%
Final simplification23.6%
(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 2024019
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(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)))