
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(+
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* i -4.0))))
(* j (* k -27.0)))
(* y (* z (* x (* 18.0 t))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (i * -4.0)))) + (j * (k * -27.0));
} else {
tmp = y * (z * (x * (18.0 * t)));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(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)) <= Inf) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(i * -4.0)))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(y * Float64(z * Float64(x * Float64(18.0 * t)))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(z * N[(x * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\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 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 95.3%
Simplified95.6%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified25.8%
Taylor expanded in y around inf 58.6%
associate-*r*61.7%
Simplified61.7%
Taylor expanded in z around inf 61.8%
Taylor expanded in j around 0 56.0%
associate-*r*56.0%
associate-*r*65.2%
*-commutative65.2%
Simplified65.2%
pow165.2%
associate-*r*68.2%
associate-*l*68.2%
Applied egg-rr68.2%
unpow168.2%
*-commutative68.2%
associate-*r*68.2%
Simplified68.2%
Final simplification92.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* y (* z (* x (* 18.0 t))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = y * (z * (x * (18.0 * t)));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = y * (z * (x * (18.0 * t)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= math.inf: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = y * (z * (x * (18.0 * t))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(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)) <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(y * Float64(z * Float64(x * Float64(18.0 * t)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Inf)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = y * (z * (x * (18.0 * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(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], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(z * N[(x * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\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 \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 95.3%
Simplified95.6%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified25.8%
Taylor expanded in y around inf 58.6%
associate-*r*61.7%
Simplified61.7%
Taylor expanded in z around inf 61.8%
Taylor expanded in j around 0 56.0%
associate-*r*56.0%
associate-*r*65.2%
*-commutative65.2%
Simplified65.2%
pow165.2%
associate-*r*68.2%
associate-*l*68.2%
Applied egg-rr68.2%
unpow168.2%
*-commutative68.2%
associate-*r*68.2%
Simplified68.2%
Final simplification92.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* (* j 27.0) k))
(t_3 (- (* -4.0 (+ (* x i) (* t a))) t_2))
(t_4 (* x (* y z))))
(if (<= (* b c) -3.6e+291)
(+ (* b c) t_1)
(if (<= (* b c) -3.9e-107)
t_3
(if (<= (* b c) -7.5e-231)
(+ t_1 (* 18.0 (* t t_4)))
(if (<= (* b c) 5e-312)
t_3
(if (<= (* b c) 3.6e-94)
(* t (- (* 18.0 t_4) (* a 4.0)))
(if (<= (* b c) 8.8e+117) t_3 (- (* b c) t_2)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (j * 27.0) * k;
double t_3 = (-4.0 * ((x * i) + (t * a))) - t_2;
double t_4 = x * (y * z);
double tmp;
if ((b * c) <= -3.6e+291) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -3.9e-107) {
tmp = t_3;
} else if ((b * c) <= -7.5e-231) {
tmp = t_1 + (18.0 * (t * t_4));
} else if ((b * c) <= 5e-312) {
tmp = t_3;
} else if ((b * c) <= 3.6e-94) {
tmp = t * ((18.0 * t_4) - (a * 4.0));
} else if ((b * c) <= 8.8e+117) {
tmp = t_3;
} else {
tmp = (b * c) - t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (j * 27.0d0) * k
t_3 = ((-4.0d0) * ((x * i) + (t * a))) - t_2
t_4 = x * (y * z)
if ((b * c) <= (-3.6d+291)) then
tmp = (b * c) + t_1
else if ((b * c) <= (-3.9d-107)) then
tmp = t_3
else if ((b * c) <= (-7.5d-231)) then
tmp = t_1 + (18.0d0 * (t * t_4))
else if ((b * c) <= 5d-312) then
tmp = t_3
else if ((b * c) <= 3.6d-94) then
tmp = t * ((18.0d0 * t_4) - (a * 4.0d0))
else if ((b * c) <= 8.8d+117) then
tmp = t_3
else
tmp = (b * c) - t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (j * 27.0) * k;
double t_3 = (-4.0 * ((x * i) + (t * a))) - t_2;
double t_4 = x * (y * z);
double tmp;
if ((b * c) <= -3.6e+291) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -3.9e-107) {
tmp = t_3;
} else if ((b * c) <= -7.5e-231) {
tmp = t_1 + (18.0 * (t * t_4));
} else if ((b * c) <= 5e-312) {
tmp = t_3;
} else if ((b * c) <= 3.6e-94) {
tmp = t * ((18.0 * t_4) - (a * 4.0));
} else if ((b * c) <= 8.8e+117) {
tmp = t_3;
} else {
tmp = (b * c) - t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (j * 27.0) * k t_3 = (-4.0 * ((x * i) + (t * a))) - t_2 t_4 = x * (y * z) tmp = 0 if (b * c) <= -3.6e+291: tmp = (b * c) + t_1 elif (b * c) <= -3.9e-107: tmp = t_3 elif (b * c) <= -7.5e-231: tmp = t_1 + (18.0 * (t * t_4)) elif (b * c) <= 5e-312: tmp = t_3 elif (b * c) <= 3.6e-94: tmp = t * ((18.0 * t_4) - (a * 4.0)) elif (b * c) <= 8.8e+117: tmp = t_3 else: tmp = (b * c) - t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) - t_2) t_4 = Float64(x * Float64(y * z)) tmp = 0.0 if (Float64(b * c) <= -3.6e+291) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= -3.9e-107) tmp = t_3; elseif (Float64(b * c) <= -7.5e-231) tmp = Float64(t_1 + Float64(18.0 * Float64(t * t_4))); elseif (Float64(b * c) <= 5e-312) tmp = t_3; elseif (Float64(b * c) <= 3.6e-94) tmp = Float64(t * Float64(Float64(18.0 * t_4) - Float64(a * 4.0))); elseif (Float64(b * c) <= 8.8e+117) tmp = t_3; else tmp = Float64(Float64(b * c) - t_2); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (j * 27.0) * k;
t_3 = (-4.0 * ((x * i) + (t * a))) - t_2;
t_4 = x * (y * z);
tmp = 0.0;
if ((b * c) <= -3.6e+291)
tmp = (b * c) + t_1;
elseif ((b * c) <= -3.9e-107)
tmp = t_3;
elseif ((b * c) <= -7.5e-231)
tmp = t_1 + (18.0 * (t * t_4));
elseif ((b * c) <= 5e-312)
tmp = t_3;
elseif ((b * c) <= 3.6e-94)
tmp = t * ((18.0 * t_4) - (a * 4.0));
elseif ((b * c) <= 8.8e+117)
tmp = t_3;
else
tmp = (b * c) - t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.6e+291], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.9e-107], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], -7.5e-231], N[(t$95$1 + N[(18.0 * N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5e-312], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 3.6e-94], N[(t * N[(N[(18.0 * t$95$4), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.8e+117], t$95$3, N[(N[(b * c), $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])\\\\
[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\\
t_3 := -4 \cdot \left(x \cdot i + t \cdot a\right) - t\_2\\
t_4 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;b \cdot c \leq -3.6 \cdot 10^{+291}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;b \cdot c \leq -3.9 \cdot 10^{-107}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq -7.5 \cdot 10^{-231}:\\
\;\;\;\;t\_1 + 18 \cdot \left(t \cdot t\_4\right)\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{-312}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{-94}:\\
\;\;\;\;t \cdot \left(18 \cdot t\_4 - a \cdot 4\right)\\
\mathbf{elif}\;b \cdot c \leq 8.8 \cdot 10^{+117}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -3.5999999999999997e291Initial program 69.6%
Simplified73.9%
Taylor expanded in b around inf 87.0%
if -3.5999999999999997e291 < (*.f64 b c) < -3.9000000000000001e-107 or -7.5000000000000001e-231 < (*.f64 b c) < 5.0000000000022e-312 or 3.6e-94 < (*.f64 b c) < 8.80000000000000056e117Initial program 90.4%
pow190.4%
associate-*l*87.4%
*-commutative87.4%
Applied egg-rr87.4%
unpow187.4%
associate-*l*87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y around 0 81.7%
distribute-lft-out81.7%
*-commutative81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in b around 0 71.4%
if -3.9000000000000001e-107 < (*.f64 b c) < -7.5000000000000001e-231Initial program 83.8%
Simplified95.6%
Taylor expanded in y around inf 75.2%
if 5.0000000000022e-312 < (*.f64 b c) < 3.6e-94Initial program 83.3%
Simplified86.6%
Taylor expanded in t around inf 76.6%
if 8.80000000000000056e117 < (*.f64 b c) Initial program 71.5%
pow171.5%
associate-*l*73.5%
*-commutative73.5%
Applied egg-rr73.5%
unpow173.5%
associate-*l*77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in b around inf 67.6%
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0))))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -2.8e+151)
t_2
(if (<= t -3.7e+121)
t_1
(if (<= t -1.15e+67)
t_2
(if (<= t -1.35e-33)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= t 3.8e-65) t_1 t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -2.8e+151) {
tmp = t_2;
} else if (t <= -3.7e+121) {
tmp = t_1;
} else if (t <= -1.15e+67) {
tmp = t_2;
} else if (t <= -1.35e-33) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= 3.8e-65) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-2.8d+151)) then
tmp = t_2
else if (t <= (-3.7d+121)) then
tmp = t_1
else if (t <= (-1.15d+67)) then
tmp = t_2
else if (t <= (-1.35d-33)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (t <= 3.8d-65) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -2.8e+151) {
tmp = t_2;
} else if (t <= -3.7e+121) {
tmp = t_1;
} else if (t <= -1.15e+67) {
tmp = t_2;
} else if (t <= -1.35e-33) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (t <= 3.8e-65) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -2.8e+151: tmp = t_2 elif t <= -3.7e+121: tmp = t_1 elif t <= -1.15e+67: tmp = t_2 elif t <= -1.35e-33: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif t <= 3.8e-65: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -2.8e+151) tmp = t_2; elseif (t <= -3.7e+121) tmp = t_1; elseif (t <= -1.15e+67) tmp = t_2; elseif (t <= -1.35e-33) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (t <= 3.8e-65) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -2.8e+151)
tmp = t_2;
elseif (t <= -3.7e+121)
tmp = t_1;
elseif (t <= -1.15e+67)
tmp = t_2;
elseif (t <= -1.35e-33)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (t <= 3.8e-65)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+151], t$95$2, If[LessEqual[t, -3.7e+121], t$95$1, If[LessEqual[t, -1.15e+67], t$95$2, If[LessEqual[t, -1.35e-33], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e-65], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+151}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{+67}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-33}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.79999999999999987e151 or -3.70000000000000013e121 < t < -1.1499999999999999e67 or 3.8000000000000002e-65 < t Initial program 80.1%
Simplified87.4%
Taylor expanded in t around inf 69.2%
if -2.79999999999999987e151 < t < -3.70000000000000013e121 or -1.35e-33 < t < 3.8000000000000002e-65Initial program 88.4%
Simplified86.6%
Taylor expanded in b around inf 66.7%
if -1.1499999999999999e67 < t < -1.35e-33Initial program 81.6%
Simplified85.1%
Taylor expanded in x around inf 60.0%
Final simplification67.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ t_1 (* a (* t -4.0))))
(t_3 (+ t_1 (* i (* x -4.0)))))
(if (<= i -3.8e+139)
t_3
(if (<= i -9.4e+47)
t_2
(if (<= i 1.5e-309)
(+ (* b c) t_1)
(if (<= i 16000000.0)
t_2
(if (<= i 5.1e+185) (* z (* y (* x (* 18.0 t)))) t_3)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (a * (t * -4.0));
double t_3 = t_1 + (i * (x * -4.0));
double tmp;
if (i <= -3.8e+139) {
tmp = t_3;
} else if (i <= -9.4e+47) {
tmp = t_2;
} else if (i <= 1.5e-309) {
tmp = (b * c) + t_1;
} else if (i <= 16000000.0) {
tmp = t_2;
} else if (i <= 5.1e+185) {
tmp = z * (y * (x * (18.0 * t)));
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + (a * (t * (-4.0d0)))
t_3 = t_1 + (i * (x * (-4.0d0)))
if (i <= (-3.8d+139)) then
tmp = t_3
else if (i <= (-9.4d+47)) then
tmp = t_2
else if (i <= 1.5d-309) then
tmp = (b * c) + t_1
else if (i <= 16000000.0d0) then
tmp = t_2
else if (i <= 5.1d+185) then
tmp = z * (y * (x * (18.0d0 * t)))
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (a * (t * -4.0));
double t_3 = t_1 + (i * (x * -4.0));
double tmp;
if (i <= -3.8e+139) {
tmp = t_3;
} else if (i <= -9.4e+47) {
tmp = t_2;
} else if (i <= 1.5e-309) {
tmp = (b * c) + t_1;
} else if (i <= 16000000.0) {
tmp = t_2;
} else if (i <= 5.1e+185) {
tmp = z * (y * (x * (18.0 * t)));
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (a * (t * -4.0)) t_3 = t_1 + (i * (x * -4.0)) tmp = 0 if i <= -3.8e+139: tmp = t_3 elif i <= -9.4e+47: tmp = t_2 elif i <= 1.5e-309: tmp = (b * c) + t_1 elif i <= 16000000.0: tmp = t_2 elif i <= 5.1e+185: tmp = z * (y * (x * (18.0 * t))) else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(a * Float64(t * -4.0))) t_3 = Float64(t_1 + Float64(i * Float64(x * -4.0))) tmp = 0.0 if (i <= -3.8e+139) tmp = t_3; elseif (i <= -9.4e+47) tmp = t_2; elseif (i <= 1.5e-309) tmp = Float64(Float64(b * c) + t_1); elseif (i <= 16000000.0) tmp = t_2; elseif (i <= 5.1e+185) tmp = Float64(z * Float64(y * Float64(x * Float64(18.0 * t)))); else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (a * (t * -4.0));
t_3 = t_1 + (i * (x * -4.0));
tmp = 0.0;
if (i <= -3.8e+139)
tmp = t_3;
elseif (i <= -9.4e+47)
tmp = t_2;
elseif (i <= 1.5e-309)
tmp = (b * c) + t_1;
elseif (i <= 16000000.0)
tmp = t_2;
elseif (i <= 5.1e+185)
tmp = z * (y * (x * (18.0 * t)));
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -3.8e+139], t$95$3, If[LessEqual[i, -9.4e+47], t$95$2, If[LessEqual[i, 1.5e-309], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[i, 16000000.0], t$95$2, If[LessEqual[i, 5.1e+185], N[(z * N[(y * N[(x * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t\_1 + a \cdot \left(t \cdot -4\right)\\
t_3 := t\_1 + i \cdot \left(x \cdot -4\right)\\
\mathbf{if}\;i \leq -3.8 \cdot 10^{+139}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;i \leq -9.4 \cdot 10^{+47}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq 1.5 \cdot 10^{-309}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;i \leq 16000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq 5.1 \cdot 10^{+185}:\\
\;\;\;\;z \cdot \left(y \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if i < -3.79999999999999999e139 or 5.09999999999999996e185 < i Initial program 79.6%
Simplified83.0%
Taylor expanded in i around inf 64.6%
associate-*r*64.6%
*-commutative64.6%
associate-*r*64.6%
*-commutative64.6%
*-commutative64.6%
Simplified64.6%
if -3.79999999999999999e139 < i < -9.39999999999999928e47 or 1.5e-309 < i < 1.6e7Initial program 87.3%
Simplified88.4%
Taylor expanded in a around inf 56.8%
metadata-eval56.8%
distribute-lft-neg-in56.8%
*-commutative56.8%
associate-*l*56.8%
distribute-lft-neg-in56.8%
distribute-lft-neg-in56.8%
metadata-eval56.8%
Simplified56.8%
if -9.39999999999999928e47 < i < 1.5e-309Initial program 82.4%
Simplified90.0%
Taylor expanded in b around inf 62.5%
if 1.6e7 < i < 5.09999999999999996e185Initial program 86.8%
Simplified82.6%
Taylor expanded in y around inf 67.5%
associate-*r*67.4%
Simplified67.4%
Taylor expanded in z around inf 63.6%
Taylor expanded in j around 0 58.5%
associate-*r*58.5%
associate-*r*62.5%
*-commutative62.5%
Simplified62.5%
Final simplification61.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* i (* x -4.0)))))
(if (<= i -3.2e+164)
t_2
(if (<= i 8.2e-195)
(+ (* b c) t_1)
(if (<= i 1.3e-156)
(* y (* 18.0 (* t (* x z))))
(if (<= i 4.5e-100)
(- (* b c) (* (* j 27.0) k))
(if (<= i 5.1e+185) (* z (* y (* x (* 18.0 t)))) t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (i * (x * -4.0));
double tmp;
if (i <= -3.2e+164) {
tmp = t_2;
} else if (i <= 8.2e-195) {
tmp = (b * c) + t_1;
} else if (i <= 1.3e-156) {
tmp = y * (18.0 * (t * (x * z)));
} else if (i <= 4.5e-100) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (i <= 5.1e+185) {
tmp = z * (y * (x * (18.0 * t)));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + (i * (x * (-4.0d0)))
if (i <= (-3.2d+164)) then
tmp = t_2
else if (i <= 8.2d-195) then
tmp = (b * c) + t_1
else if (i <= 1.3d-156) then
tmp = y * (18.0d0 * (t * (x * z)))
else if (i <= 4.5d-100) then
tmp = (b * c) - ((j * 27.0d0) * k)
else if (i <= 5.1d+185) then
tmp = z * (y * (x * (18.0d0 * t)))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (i * (x * -4.0));
double tmp;
if (i <= -3.2e+164) {
tmp = t_2;
} else if (i <= 8.2e-195) {
tmp = (b * c) + t_1;
} else if (i <= 1.3e-156) {
tmp = y * (18.0 * (t * (x * z)));
} else if (i <= 4.5e-100) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (i <= 5.1e+185) {
tmp = z * (y * (x * (18.0 * t)));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (i * (x * -4.0)) tmp = 0 if i <= -3.2e+164: tmp = t_2 elif i <= 8.2e-195: tmp = (b * c) + t_1 elif i <= 1.3e-156: tmp = y * (18.0 * (t * (x * z))) elif i <= 4.5e-100: tmp = (b * c) - ((j * 27.0) * k) elif i <= 5.1e+185: tmp = z * (y * (x * (18.0 * t))) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(i * Float64(x * -4.0))) tmp = 0.0 if (i <= -3.2e+164) tmp = t_2; elseif (i <= 8.2e-195) tmp = Float64(Float64(b * c) + t_1); elseif (i <= 1.3e-156) tmp = Float64(y * Float64(18.0 * Float64(t * Float64(x * z)))); elseif (i <= 4.5e-100) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); elseif (i <= 5.1e+185) tmp = Float64(z * Float64(y * Float64(x * Float64(18.0 * t)))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = t_1 + (i * (x * -4.0));
tmp = 0.0;
if (i <= -3.2e+164)
tmp = t_2;
elseif (i <= 8.2e-195)
tmp = (b * c) + t_1;
elseif (i <= 1.3e-156)
tmp = y * (18.0 * (t * (x * z)));
elseif (i <= 4.5e-100)
tmp = (b * c) - ((j * 27.0) * k);
elseif (i <= 5.1e+185)
tmp = z * (y * (x * (18.0 * t)));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -3.2e+164], t$95$2, If[LessEqual[i, 8.2e-195], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[i, 1.3e-156], N[(y * N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 4.5e-100], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 5.1e+185], N[(z * N[(y * N[(x * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t\_1 + i \cdot \left(x \cdot -4\right)\\
\mathbf{if}\;i \leq -3.2 \cdot 10^{+164}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq 8.2 \cdot 10^{-195}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;i \leq 1.3 \cdot 10^{-156}:\\
\;\;\;\;y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;i \leq 4.5 \cdot 10^{-100}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;i \leq 5.1 \cdot 10^{+185}:\\
\;\;\;\;z \cdot \left(y \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if i < -3.1999999999999998e164 or 5.09999999999999996e185 < i Initial program 78.9%
Simplified82.4%
Taylor expanded in i around inf 65.0%
associate-*r*65.0%
*-commutative65.0%
associate-*r*65.0%
*-commutative65.0%
*-commutative65.0%
Simplified65.0%
if -3.1999999999999998e164 < i < 8.20000000000000024e-195Initial program 83.3%
Simplified88.1%
Taylor expanded in b around inf 56.7%
if 8.20000000000000024e-195 < i < 1.3e-156Initial program 81.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
associate-*r*81.0%
Simplified81.0%
Taylor expanded in y around inf 100.0%
Taylor expanded in j around 0 100.0%
if 1.3e-156 < i < 4.5000000000000001e-100Initial program 99.9%
pow199.9%
associate-*l*100.0%
*-commutative100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around inf 56.5%
if 4.5000000000000001e-100 < i < 5.09999999999999996e185Initial program 88.1%
Simplified88.0%
Taylor expanded in y around inf 61.5%
associate-*r*61.4%
Simplified61.4%
Taylor expanded in z around inf 57.1%
Taylor expanded in j around 0 48.0%
associate-*r*48.0%
associate-*r*50.5%
*-commutative50.5%
Simplified50.5%
Final simplification58.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= i -3.9e+98)
(- (* -4.0 (+ (* x i) (* t a))) t_1)
(if (<= i 1.6e-101)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= i 1.45e+21)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= i 1e+77)
(- (- (* b c) (* 4.0 (* x i))) 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);
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 (i <= -3.9e+98) {
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
} else if (i <= 1.6e-101) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (i <= 1.45e+21) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (i <= 1e+77) {
tmp = ((b * c) - (4.0 * (x * i))) - 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.
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 (i <= (-3.9d+98)) then
tmp = ((-4.0d0) * ((x * i) + (t * a))) - t_1
else if (i <= 1.6d-101) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (i <= 1.45d+21) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (i <= 1d+77) then
tmp = ((b * c) - (4.0d0 * (x * i))) - 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;
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 (i <= -3.9e+98) {
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
} else if (i <= 1.6e-101) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (i <= 1.45e+21) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (i <= 1e+77) {
tmp = ((b * c) - (4.0 * (x * i))) - 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]) [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 i <= -3.9e+98: tmp = (-4.0 * ((x * i) + (t * a))) - t_1 elif i <= 1.6e-101: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif i <= 1.45e+21: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif i <= 1e+77: tmp = ((b * c) - (4.0 * (x * i))) - 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]) 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 (i <= -3.9e+98) tmp = Float64(Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) - t_1); elseif (i <= 1.6e-101) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (i <= 1.45e+21) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (i <= 1e+77) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - 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])){:}
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 (i <= -3.9e+98)
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
elseif (i <= 1.6e-101)
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
elseif (i <= 1.45e+21)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (i <= 1e+77)
tmp = ((b * c) - (4.0 * (x * i))) - 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.
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[i, -3.9e+98], N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[i, 1.6e-101], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[i, 1.45e+21], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1e+77], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;i \leq -3.9 \cdot 10^{+98}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) - t\_1\\
\mathbf{elif}\;i \leq 1.6 \cdot 10^{-101}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;i \leq 1.45 \cdot 10^{+21}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;i \leq 10^{+77}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - 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 i < -3.8999999999999999e98Initial program 75.5%
pow175.5%
associate-*l*68.8%
*-commutative68.8%
Applied egg-rr68.8%
unpow168.8%
associate-*l*68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in y around 0 73.4%
distribute-lft-out73.4%
*-commutative73.4%
*-commutative73.4%
Simplified73.4%
Taylor expanded in b around 0 67.8%
if -3.8999999999999999e98 < i < 1.59999999999999989e-101Initial program 85.8%
Taylor expanded in x around 0 77.7%
if 1.59999999999999989e-101 < i < 1.45e21Initial program 91.7%
Simplified95.6%
Taylor expanded in t around inf 72.8%
if 1.45e21 < i < 9.99999999999999983e76Initial program 100.0%
Taylor expanded in t around 0 100.0%
if 9.99999999999999983e76 < i Initial program 77.7%
Simplified77.8%
Taylor expanded in x around inf 74.0%
Final simplification75.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= y -2e+216)
(+ t_1 (* 18.0 (* y (* x (* z t)))))
(if (or (<= y -1.1e+149) (not (<= y -2.65e+132)))
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* (* j 27.0) k))
(+ t_1 (* 18.0 (* (* y z) (* x t))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (y <= -2e+216) {
tmp = t_1 + (18.0 * (y * (x * (z * t))));
} else if ((y <= -1.1e+149) || !(y <= -2.65e+132)) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
} else {
tmp = t_1 + (18.0 * ((y * z) * (x * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (y <= (-2d+216)) then
tmp = t_1 + (18.0d0 * (y * (x * (z * t))))
else if ((y <= (-1.1d+149)) .or. (.not. (y <= (-2.65d+132)))) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - ((j * 27.0d0) * k)
else
tmp = t_1 + (18.0d0 * ((y * z) * (x * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (y <= -2e+216) {
tmp = t_1 + (18.0 * (y * (x * (z * t))));
} else if ((y <= -1.1e+149) || !(y <= -2.65e+132)) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
} else {
tmp = t_1 + (18.0 * ((y * z) * (x * t)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if y <= -2e+216: tmp = t_1 + (18.0 * (y * (x * (z * t)))) elif (y <= -1.1e+149) or not (y <= -2.65e+132): tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k) else: tmp = t_1 + (18.0 * ((y * z) * (x * t))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (y <= -2e+216) tmp = Float64(t_1 + Float64(18.0 * Float64(y * Float64(x * Float64(z * t))))); elseif ((y <= -1.1e+149) || !(y <= -2.65e+132)) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(t_1 + Float64(18.0 * Float64(Float64(y * z) * Float64(x * t)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (y <= -2e+216)
tmp = t_1 + (18.0 * (y * (x * (z * t))));
elseif ((y <= -1.1e+149) || ~((y <= -2.65e+132)))
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
else
tmp = t_1 + (18.0 * ((y * z) * (x * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+216], N[(t$95$1 + N[(18.0 * N[(y * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.1e+149], N[Not[LessEqual[y, -2.65e+132]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;y \leq -2 \cdot 10^{+216}:\\
\;\;\;\;t\_1 + 18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{+149} \lor \neg \left(y \leq -2.65 \cdot 10^{+132}\right):\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t\_1 + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\end{array}
\end{array}
if y < -2e216Initial program 85.1%
Simplified70.4%
Taylor expanded in y around inf 78.1%
associate-*r*70.4%
Simplified70.4%
Taylor expanded in t around 0 78.1%
associate-*r*70.4%
*-commutative70.4%
associate-*r*99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*r*99.9%
Simplified99.9%
if -2e216 < y < -1.1e149 or -2.65e132 < y Initial program 84.4%
Taylor expanded in y around 0 78.7%
distribute-lft-out78.7%
*-commutative78.7%
Simplified78.7%
if -1.1e149 < y < -2.65e132Initial program 59.7%
Simplified72.7%
Taylor expanded in y around inf 86.9%
associate-*r*100.0%
Simplified100.0%
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.
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 (<= i -5.4e+98)
(- (* -4.0 (+ (* x i) (* t a))) t_1)
(if (<= i 2.1e-101)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= i 2.95e+21)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= i 9e+76)
(+ (* j (* k -27.0)) (* i (* x -4.0)))
(* 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);
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 (i <= -5.4e+98) {
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
} else if (i <= 2.1e-101) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (i <= 2.95e+21) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (i <= 9e+76) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} 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.
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 (i <= (-5.4d+98)) then
tmp = ((-4.0d0) * ((x * i) + (t * a))) - t_1
else if (i <= 2.1d-101) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (i <= 2.95d+21) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (i <= 9d+76) then
tmp = (j * (k * (-27.0d0))) + (i * (x * (-4.0d0)))
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;
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 (i <= -5.4e+98) {
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
} else if (i <= 2.1e-101) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (i <= 2.95e+21) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (i <= 9e+76) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} 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]) [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 i <= -5.4e+98: tmp = (-4.0 * ((x * i) + (t * a))) - t_1 elif i <= 2.1e-101: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif i <= 2.95e+21: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif i <= 9e+76: tmp = (j * (k * -27.0)) + (i * (x * -4.0)) 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]) 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 (i <= -5.4e+98) tmp = Float64(Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) - t_1); elseif (i <= 2.1e-101) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (i <= 2.95e+21) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (i <= 9e+76) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(i * Float64(x * -4.0))); 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])){:}
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 (i <= -5.4e+98)
tmp = (-4.0 * ((x * i) + (t * a))) - t_1;
elseif (i <= 2.1e-101)
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
elseif (i <= 2.95e+21)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (i <= 9e+76)
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
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.
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[i, -5.4e+98], N[(N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[i, 2.1e-101], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[i, 2.95e+21], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 9e+76], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;i \leq -5.4 \cdot 10^{+98}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right) - t\_1\\
\mathbf{elif}\;i \leq 2.1 \cdot 10^{-101}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;i \leq 2.95 \cdot 10^{+21}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;i \leq 9 \cdot 10^{+76}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if i < -5.4e98Initial program 75.5%
pow175.5%
associate-*l*68.8%
*-commutative68.8%
Applied egg-rr68.8%
unpow168.8%
associate-*l*68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in y around 0 73.4%
distribute-lft-out73.4%
*-commutative73.4%
*-commutative73.4%
Simplified73.4%
Taylor expanded in b around 0 67.8%
if -5.4e98 < i < 2.10000000000000016e-101Initial program 85.8%
Taylor expanded in x around 0 77.7%
if 2.10000000000000016e-101 < i < 2.95e21Initial program 91.7%
Simplified95.6%
Taylor expanded in t around inf 72.8%
if 2.95e21 < i < 8.9999999999999995e76Initial program 100.0%
Simplified99.8%
Taylor expanded in i around inf 75.4%
associate-*r*75.4%
*-commutative75.4%
associate-*r*75.4%
*-commutative75.4%
*-commutative75.4%
Simplified75.4%
if 8.9999999999999995e76 < i Initial program 77.7%
Simplified77.8%
Taylor expanded in x around inf 74.0%
Final simplification74.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* i (* x -4.0)))))
(if (<= i -4.6e+142)
t_3
(if (<= i -2.1e+21)
t_1
(if (<= i 1.4e-194) (+ (* b c) t_2) (if (<= i 5.8e+185) t_1 t_3))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (i * (x * -4.0));
double tmp;
if (i <= -4.6e+142) {
tmp = t_3;
} else if (i <= -2.1e+21) {
tmp = t_1;
} else if (i <= 1.4e-194) {
tmp = (b * c) + t_2;
} else if (i <= 5.8e+185) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + (i * (x * (-4.0d0)))
if (i <= (-4.6d+142)) then
tmp = t_3
else if (i <= (-2.1d+21)) then
tmp = t_1
else if (i <= 1.4d-194) then
tmp = (b * c) + t_2
else if (i <= 5.8d+185) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (i * (x * -4.0));
double tmp;
if (i <= -4.6e+142) {
tmp = t_3;
} else if (i <= -2.1e+21) {
tmp = t_1;
} else if (i <= 1.4e-194) {
tmp = (b * c) + t_2;
} else if (i <= 5.8e+185) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) t_2 = j * (k * -27.0) t_3 = t_2 + (i * (x * -4.0)) tmp = 0 if i <= -4.6e+142: tmp = t_3 elif i <= -2.1e+21: tmp = t_1 elif i <= 1.4e-194: tmp = (b * c) + t_2 elif i <= 5.8e+185: tmp = t_1 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(i * Float64(x * -4.0))) tmp = 0.0 if (i <= -4.6e+142) tmp = t_3; elseif (i <= -2.1e+21) tmp = t_1; elseif (i <= 1.4e-194) tmp = Float64(Float64(b * c) + t_2); elseif (i <= 5.8e+185) tmp = t_1; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
t_2 = j * (k * -27.0);
t_3 = t_2 + (i * (x * -4.0));
tmp = 0.0;
if (i <= -4.6e+142)
tmp = t_3;
elseif (i <= -2.1e+21)
tmp = t_1;
elseif (i <= 1.4e-194)
tmp = (b * c) + t_2;
elseif (i <= 5.8e+185)
tmp = t_1;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -4.6e+142], t$95$3, If[LessEqual[i, -2.1e+21], t$95$1, If[LessEqual[i, 1.4e-194], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[i, 5.8e+185], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t\_2 + i \cdot \left(x \cdot -4\right)\\
\mathbf{if}\;i \leq -4.6 \cdot 10^{+142}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;i \leq -2.1 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.4 \cdot 10^{-194}:\\
\;\;\;\;b \cdot c + t\_2\\
\mathbf{elif}\;i \leq 5.8 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if i < -4.60000000000000004e142 or 5.79999999999999976e185 < i Initial program 79.6%
Simplified83.0%
Taylor expanded in i around inf 64.6%
associate-*r*64.6%
*-commutative64.6%
associate-*r*64.6%
*-commutative64.6%
*-commutative64.6%
Simplified64.6%
if -4.60000000000000004e142 < i < -2.1e21 or 1.40000000000000006e-194 < i < 5.79999999999999976e185Initial program 86.7%
Simplified86.6%
Taylor expanded in t around inf 63.6%
if -2.1e21 < i < 1.40000000000000006e-194Initial program 83.6%
Simplified90.0%
Taylor expanded in b around inf 63.1%
Final simplification63.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -48.0)
(* y (* z (* x (* 18.0 t))))
(if (<= x -6.3e-260)
(* j (* k -27.0))
(if (<= x 1.95e-22) (* t (* a -4.0)) (* y (* 18.0 (* t (* x z))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -48.0) {
tmp = y * (z * (x * (18.0 * t)));
} else if (x <= -6.3e-260) {
tmp = j * (k * -27.0);
} else if (x <= 1.95e-22) {
tmp = t * (a * -4.0);
} else {
tmp = y * (18.0 * (t * (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.
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 <= (-48.0d0)) then
tmp = y * (z * (x * (18.0d0 * t)))
else if (x <= (-6.3d-260)) then
tmp = j * (k * (-27.0d0))
else if (x <= 1.95d-22) then
tmp = t * (a * (-4.0d0))
else
tmp = y * (18.0d0 * (t * (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;
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 <= -48.0) {
tmp = y * (z * (x * (18.0 * t)));
} else if (x <= -6.3e-260) {
tmp = j * (k * -27.0);
} else if (x <= 1.95e-22) {
tmp = t * (a * -4.0);
} else {
tmp = y * (18.0 * (t * (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]) [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 <= -48.0: tmp = y * (z * (x * (18.0 * t))) elif x <= -6.3e-260: tmp = j * (k * -27.0) elif x <= 1.95e-22: tmp = t * (a * -4.0) else: tmp = y * (18.0 * (t * (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]) 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 <= -48.0) tmp = Float64(y * Float64(z * Float64(x * Float64(18.0 * t)))); elseif (x <= -6.3e-260) tmp = Float64(j * Float64(k * -27.0)); elseif (x <= 1.95e-22) tmp = Float64(t * Float64(a * -4.0)); else tmp = Float64(y * Float64(18.0 * Float64(t * 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])){:}
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 <= -48.0)
tmp = y * (z * (x * (18.0 * t)));
elseif (x <= -6.3e-260)
tmp = j * (k * -27.0);
elseif (x <= 1.95e-22)
tmp = t * (a * -4.0);
else
tmp = y * (18.0 * (t * (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. 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, -48.0], N[(y * N[(z * N[(x * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.3e-260], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.95e-22], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -48:\\
\;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)\\
\mathbf{elif}\;x \leq -6.3 \cdot 10^{-260}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{-22}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if x < -48Initial program 74.9%
Simplified81.9%
Taylor expanded in y around inf 52.2%
associate-*r*49.5%
Simplified49.5%
Taylor expanded in z around inf 49.2%
Taylor expanded in j around 0 43.2%
associate-*r*43.2%
associate-*r*49.1%
*-commutative49.1%
Simplified49.1%
pow149.1%
associate-*r*50.2%
associate-*l*51.3%
Applied egg-rr51.3%
unpow151.3%
*-commutative51.3%
associate-*r*50.2%
Simplified50.2%
if -48 < x < -6.29999999999999978e-260Initial program 99.9%
Simplified96.3%
Taylor expanded in j around inf 43.5%
associate-*r*43.5%
Simplified43.5%
Taylor expanded in j around 0 43.5%
associate-*r*43.5%
*-commutative43.5%
associate-*r*43.5%
Simplified43.5%
if -6.29999999999999978e-260 < x < 1.94999999999999999e-22Initial program 98.3%
Simplified90.6%
Taylor expanded in t around inf 38.5%
Taylor expanded in x around 0 35.4%
if 1.94999999999999999e-22 < x Initial program 65.4%
Simplified82.5%
Taylor expanded in y around inf 55.8%
associate-*r*55.8%
Simplified55.8%
Taylor expanded in y around inf 57.3%
Taylor expanded in j around 0 48.4%
Final simplification44.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* y (* 18.0 (* t (* x z))))))
(if (<= x -0.0135)
t_1
(if (<= x -7.4e-258)
(* j (* k -27.0))
(if (<= x 2.95e-22) (* t (* a -4.0)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = y * (18.0 * (t * (x * z)));
double tmp;
if (x <= -0.0135) {
tmp = t_1;
} else if (x <= -7.4e-258) {
tmp = j * (k * -27.0);
} else if (x <= 2.95e-22) {
tmp = t * (a * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = y * (18.0d0 * (t * (x * z)))
if (x <= (-0.0135d0)) then
tmp = t_1
else if (x <= (-7.4d-258)) then
tmp = j * (k * (-27.0d0))
else if (x <= 2.95d-22) then
tmp = t * (a * (-4.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 = y * (18.0 * (t * (x * z)));
double tmp;
if (x <= -0.0135) {
tmp = t_1;
} else if (x <= -7.4e-258) {
tmp = j * (k * -27.0);
} else if (x <= 2.95e-22) {
tmp = t * (a * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 = y * (18.0 * (t * (x * z))) tmp = 0 if x <= -0.0135: tmp = t_1 elif x <= -7.4e-258: tmp = j * (k * -27.0) elif x <= 2.95e-22: tmp = t * (a * -4.0) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(y * Float64(18.0 * Float64(t * Float64(x * z)))) tmp = 0.0 if (x <= -0.0135) tmp = t_1; elseif (x <= -7.4e-258) tmp = Float64(j * Float64(k * -27.0)); elseif (x <= 2.95e-22) tmp = Float64(t * Float64(a * -4.0)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 = y * (18.0 * (t * (x * z)));
tmp = 0.0;
if (x <= -0.0135)
tmp = t_1;
elseif (x <= -7.4e-258)
tmp = j * (k * -27.0);
elseif (x <= 2.95e-22)
tmp = t * (a * -4.0);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(y * N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.0135], t$95$1, If[LessEqual[x, -7.4e-258], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.95e-22], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 := y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -0.0135:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -7.4 \cdot 10^{-258}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 2.95 \cdot 10^{-22}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -0.0134999999999999998 or 2.95000000000000004e-22 < x Initial program 71.0%
Simplified82.1%
Taylor expanded in y around inf 53.7%
associate-*r*52.1%
Simplified52.1%
Taylor expanded in y around inf 54.9%
Taylor expanded in j around 0 45.9%
if -0.0134999999999999998 < x < -7.4000000000000001e-258Initial program 99.9%
Simplified96.3%
Taylor expanded in j around inf 43.5%
associate-*r*43.5%
Simplified43.5%
Taylor expanded in j around 0 43.5%
associate-*r*43.5%
*-commutative43.5%
associate-*r*43.5%
Simplified43.5%
if -7.4000000000000001e-258 < x < 2.95000000000000004e-22Initial program 98.3%
Simplified90.6%
Taylor expanded in t around inf 38.5%
Taylor expanded in x around 0 35.4%
Final simplification42.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -55.0)
(* y (* z (* x (* 18.0 t))))
(if (<= x 7.6e+65)
(+ (* b c) (* j (* k -27.0)))
(* y (* 18.0 (* t (* x z)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -55.0) {
tmp = y * (z * (x * (18.0 * t)));
} else if (x <= 7.6e+65) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = y * (18.0 * (t * (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.
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 <= (-55.0d0)) then
tmp = y * (z * (x * (18.0d0 * t)))
else if (x <= 7.6d+65) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = y * (18.0d0 * (t * (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;
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 <= -55.0) {
tmp = y * (z * (x * (18.0 * t)));
} else if (x <= 7.6e+65) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = y * (18.0 * (t * (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]) [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 <= -55.0: tmp = y * (z * (x * (18.0 * t))) elif x <= 7.6e+65: tmp = (b * c) + (j * (k * -27.0)) else: tmp = y * (18.0 * (t * (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]) 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 <= -55.0) tmp = Float64(y * Float64(z * Float64(x * Float64(18.0 * t)))); elseif (x <= 7.6e+65) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(y * Float64(18.0 * Float64(t * 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])){:}
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 <= -55.0)
tmp = y * (z * (x * (18.0 * t)));
elseif (x <= 7.6e+65)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = y * (18.0 * (t * (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. 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, -55.0], N[(y * N[(z * N[(x * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.6e+65], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -55:\\
\;\;\;\;y \cdot \left(z \cdot \left(x \cdot \left(18 \cdot t\right)\right)\right)\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{+65}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if x < -55Initial program 74.9%
Simplified81.9%
Taylor expanded in y around inf 52.2%
associate-*r*49.5%
Simplified49.5%
Taylor expanded in z around inf 49.2%
Taylor expanded in j around 0 43.2%
associate-*r*43.2%
associate-*r*49.1%
*-commutative49.1%
Simplified49.1%
pow149.1%
associate-*r*50.2%
associate-*l*51.3%
Applied egg-rr51.3%
unpow151.3%
*-commutative51.3%
associate-*r*50.2%
Simplified50.2%
if -55 < x < 7.60000000000000022e65Initial program 98.3%
Simplified93.8%
Taylor expanded in b around inf 58.5%
if 7.60000000000000022e65 < x Initial program 59.3%
Simplified78.4%
Taylor expanded in y around inf 53.8%
associate-*r*53.8%
Simplified53.8%
Taylor expanded in y around inf 55.6%
Taylor expanded in j around 0 53.1%
Final simplification54.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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 (<= k -9.5e-47) (not (<= k 4e+162))) (* j (* k -27.0)) (* t (* a -4.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -9.5e-47) || !(k <= 4e+162)) {
tmp = j * (k * -27.0);
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= (-9.5d-47)) .or. (.not. (k <= 4d+162))) then
tmp = j * (k * (-27.0d0))
else
tmp = t * (a * (-4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -9.5e-47) || !(k <= 4e+162)) {
tmp = j * (k * -27.0);
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (k <= -9.5e-47) or not (k <= 4e+162): tmp = j * (k * -27.0) else: tmp = t * (a * -4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((k <= -9.5e-47) || !(k <= 4e+162)) tmp = Float64(j * Float64(k * -27.0)); else tmp = Float64(t * Float64(a * -4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((k <= -9.5e-47) || ~((k <= 4e+162)))
tmp = j * (k * -27.0);
else
tmp = t * (a * -4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -9.5e-47], N[Not[LessEqual[k, 4e+162]], $MachinePrecision]], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -9.5 \cdot 10^{-47} \lor \neg \left(k \leq 4 \cdot 10^{+162}\right):\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\end{array}
\end{array}
if k < -9.4999999999999991e-47 or 3.9999999999999998e162 < k Initial program 89.3%
Simplified88.3%
Taylor expanded in j around inf 41.2%
associate-*r*41.2%
Simplified41.2%
Taylor expanded in j around 0 41.2%
associate-*r*41.2%
*-commutative41.2%
associate-*r*41.3%
Simplified41.3%
if -9.4999999999999991e-47 < k < 3.9999999999999998e162Initial program 80.6%
Simplified86.5%
Taylor expanded in t around inf 50.2%
Taylor expanded in x around 0 24.0%
Final simplification30.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* j (* k -27.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return j * (k * -27.0);
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 = j * (k * (-27.0d0))
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return j * (k * -27.0);
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return j * (k * -27.0)
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(j * Float64(k * -27.0)) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = j * (k * -27.0);
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
j \cdot \left(k \cdot -27\right)
\end{array}
Initial program 83.8%
Simplified87.2%
Taylor expanded in j around inf 23.8%
associate-*r*23.8%
Simplified23.8%
Taylor expanded in j around 0 23.8%
associate-*r*23.8%
*-commutative23.8%
associate-*r*23.8%
Simplified23.8%
Final simplification23.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* -27.0 (* j k)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return -27.0 * (j * k);
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (-27.0d0) * (j * k)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return -27.0 * (j * k);
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return -27.0 * (j * k)
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(-27.0 * Float64(j * k)) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = -27.0 * (j * k);
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
-27 \cdot \left(j \cdot k\right)
\end{array}
Initial program 83.8%
Simplified87.2%
Taylor expanded in j around inf 23.8%
(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 2024089
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))