
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 96.1%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified20.0%
Taylor expanded in x around inf 63.6%
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.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= x -1.42e+240) (not (<= x 9.8e+175)))
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(-
(- (+ (* b c) (* t (- (* x (* z (* 18.0 y))) (* a 4.0)))) (* (* x 4.0) i))
(* (* j 27.0) k))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.42e+240) || !(x <= 9.8e+175)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-1.42d+240)) .or. (.not. (x <= 9.8d+175))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = (((b * c) + (t * ((x * (z * (18.0d0 * y))) - (a * 4.0d0)))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.42e+240) || !(x <= 9.8e+175)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -1.42e+240) or not (x <= 9.8e+175): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = (((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -1.42e+240) || !(x <= 9.8e+175)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(x * Float64(z * Float64(18.0 * y))) - Float64(a * 4.0)))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -1.42e+240) || ~((x <= 9.8e+175)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = (((b * c) + (t * ((x * (z * (18.0 * y))) - (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -1.42e+240], N[Not[LessEqual[x, 9.8e+175]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.42 \cdot 10^{+240} \lor \neg \left(x \leq 9.8 \cdot 10^{+175}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right) - a \cdot 4\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if x < -1.41999999999999999e240 or 9.80000000000000002e175 < x Initial program 59.4%
Simplified61.9%
Taylor expanded in x around inf 94.9%
if -1.41999999999999999e240 < x < 9.80000000000000002e175Initial program 89.5%
distribute-rgt-out--91.3%
associate-*r*89.6%
*-commutative89.6%
associate-*l*89.6%
associate-*r*89.6%
Applied egg-rr89.6%
Final simplification90.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= x -2.2e+235) (not (<= x 1.7e+175)))
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -2.2e+235) || !(x <= 1.7e+175)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-2.2d+235)) .or. (.not. (x <= 1.7d+175))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -2.2e+235) || !(x <= 1.7e+175)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -2.2e+235) or not (x <= 1.7e+175): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -2.2e+235) || !(x <= 1.7e+175)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else 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)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -2.2e+235) || ~((x <= 1.7e+175)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -2.2e+235], N[Not[LessEqual[x, 1.7e+175]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+235} \lor \neg \left(x \leq 1.7 \cdot 10^{+175}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if x < -2.2e235 or 1.70000000000000014e175 < x Initial program 59.4%
Simplified61.9%
Taylor expanded in x around inf 94.9%
if -2.2e235 < x < 1.70000000000000014e175Initial program 89.5%
Simplified89.6%
Final simplification90.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= a -18000000000.0) (not (<= a 2.25e+151)))
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* (* j 27.0) k))
(-
(+ (* b c) (* y (* 18.0 (* t (* x z)))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((a <= -18000000000.0) || !(a <= 2.25e+151)) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (y * (18.0 * (t * (x * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((a <= (-18000000000.0d0)) .or. (.not. (a <= 2.25d+151))) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - ((j * 27.0d0) * k)
else
tmp = ((b * c) + (y * (18.0d0 * (t * (x * z))))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((a <= -18000000000.0) || !(a <= 2.25e+151)) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (y * (18.0 * (t * (x * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (a <= -18000000000.0) or not (a <= 2.25e+151): tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k) else: tmp = ((b * c) + (y * (18.0 * (t * (x * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((a <= -18000000000.0) || !(a <= 2.25e+151)) 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(Float64(Float64(b * c) + Float64(y * Float64(18.0 * Float64(t * Float64(x * z))))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((a <= -18000000000.0) || ~((a <= 2.25e+151)))
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
else
tmp = ((b * c) + (y * (18.0 * (t * (x * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[a, -18000000000.0], N[Not[LessEqual[a, 2.25e+151]], $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[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -18000000000 \lor \neg \left(a \leq 2.25 \cdot 10^{+151}\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}:\\
\;\;\;\;\left(b \cdot c + y \cdot \left(18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if a < -1.8e10 or 2.2499999999999999e151 < a Initial program 82.2%
Taylor expanded in y around 0 87.4%
distribute-lft-out87.4%
*-commutative87.4%
Simplified87.4%
if -1.8e10 < a < 2.2499999999999999e151Initial program 86.3%
Simplified85.2%
Taylor expanded in y around inf 83.7%
Taylor expanded in a around 0 84.4%
Final simplification85.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (or (<= z -1.4e-14) (not (<= z 9.2e+99)))
(- (* t (+ (* 18.0 (* z (* x y))) (* a -4.0))) t_1)
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((z <= -1.4e-14) || !(z <= 9.2e+99)) {
tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1;
} else {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if ((z <= (-1.4d-14)) .or. (.not. (z <= 9.2d+99))) then
tmp = (t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))) - t_1
else
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((z <= -1.4e-14) || !(z <= 9.2e+99)) {
tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1;
} else {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if (z <= -1.4e-14) or not (z <= 9.2e+99): tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1 else: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((z <= -1.4e-14) || !(z <= 9.2e+99)) tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if ((z <= -1.4e-14) || ~((z <= 9.2e+99)))
tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1;
else
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[z, -1.4e-14], N[Not[LessEqual[z, 9.2e+99]], $MachinePrecision]], N[(N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{-14} \lor \neg \left(z \leq 9.2 \cdot 10^{+99}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - t\_1\\
\end{array}
\end{array}
if z < -1.4e-14 or 9.20000000000000077e99 < z Initial program 82.4%
distribute-rgt-out--84.1%
associate-*r*78.5%
*-commutative78.5%
associate-*l*78.5%
associate-*r*78.5%
Applied egg-rr78.5%
Taylor expanded in t around inf 67.5%
cancel-sign-sub-inv67.5%
associate-*r*71.5%
metadata-eval71.5%
Simplified71.5%
if -1.4e-14 < z < 9.20000000000000077e99Initial program 87.0%
Taylor expanded in y around 0 83.8%
distribute-lft-out83.8%
*-commutative83.8%
Simplified83.8%
Final simplification78.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (or (<= t -5.2e+32) (not (<= t 7e+114)))
(- (* t (+ (* 18.0 (* z (* x y))) (* a -4.0))) t_1)
(- (- (* b c) (* 4.0 (* x i))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t <= -5.2e+32) || !(t <= 7e+114)) {
tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1;
} else {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if ((t <= (-5.2d+32)) .or. (.not. (t <= 7d+114))) then
tmp = (t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))) - t_1
else
tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t <= -5.2e+32) || !(t <= 7e+114)) {
tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1;
} else {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if (t <= -5.2e+32) or not (t <= 7e+114): tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1 else: tmp = ((b * c) - (4.0 * (x * i))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((t <= -5.2e+32) || !(t <= 7e+114)) tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if ((t <= -5.2e+32) || ~((t <= 7e+114)))
tmp = (t * ((18.0 * (z * (x * y))) + (a * -4.0))) - t_1;
else
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t, -5.2e+32], N[Not[LessEqual[t, 7e+114]], $MachinePrecision]], N[(N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+32} \lor \neg \left(t \leq 7 \cdot 10^{+114}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
\end{array}
\end{array}
if t < -5.2000000000000004e32 or 7.0000000000000001e114 < t Initial program 78.9%
distribute-rgt-out--84.4%
associate-*r*85.6%
*-commutative85.6%
associate-*l*85.6%
associate-*r*85.6%
Applied egg-rr85.6%
Taylor expanded in t around inf 79.3%
cancel-sign-sub-inv79.3%
associate-*r*79.2%
metadata-eval79.2%
Simplified79.2%
if -5.2000000000000004e32 < t < 7.0000000000000001e114Initial program 88.1%
Taylor expanded in t around 0 73.2%
Final simplification75.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -3.5e+46)
t_1
(if (<= x -5.4e-26)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= x 2.3e+17) (+ (* b c) (* j (* k -27.0))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -3.5e+46) {
tmp = t_1;
} else if (x <= -5.4e-26) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 2.3e+17) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-3.5d+46)) then
tmp = t_1
else if (x <= (-5.4d-26)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (x <= 2.3d+17) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -3.5e+46) {
tmp = t_1;
} else if (x <= -5.4e-26) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 2.3e+17) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -3.5e+46: tmp = t_1 elif x <= -5.4e-26: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif x <= 2.3e+17: tmp = (b * c) + (j * (k * -27.0)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -3.5e+46) tmp = t_1; elseif (x <= -5.4e-26) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (x <= 2.3e+17) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -3.5e+46)
tmp = t_1;
elseif (x <= -5.4e-26)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (x <= 2.3e+17)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.5e+46], t$95$1, If[LessEqual[x, -5.4e-26], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.3e+17], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -5.4 \cdot 10^{-26}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{+17}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.49999999999999985e46 or 2.3e17 < x Initial program 72.9%
Simplified78.1%
Taylor expanded in x around inf 75.5%
if -3.49999999999999985e46 < x < -5.39999999999999963e-26Initial program 84.4%
Simplified99.8%
Taylor expanded in t around inf 77.5%
if -5.39999999999999963e-26 < x < 2.3e17Initial program 95.3%
Simplified90.3%
Taylor expanded in b around inf 56.8%
Final simplification66.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= z -5.9e-5)
t_1
(if (<= z 5.3e-68)
(* b (+ c (* -4.0 (* i (/ x b)))))
(if (<= z 7.4e+99) (- (* (* x i) -4.0) (* 27.0 (* j k))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (z <= -5.9e-5) {
tmp = t_1;
} else if (z <= 5.3e-68) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else if (z <= 7.4e+99) {
tmp = ((x * i) * -4.0) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (z <= (-5.9d-5)) then
tmp = t_1
else if (z <= 5.3d-68) then
tmp = b * (c + ((-4.0d0) * (i * (x / b))))
else if (z <= 7.4d+99) then
tmp = ((x * i) * (-4.0d0)) - (27.0d0 * (j * k))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (z <= -5.9e-5) {
tmp = t_1;
} else if (z <= 5.3e-68) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else if (z <= 7.4e+99) {
tmp = ((x * i) * -4.0) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if z <= -5.9e-5: tmp = t_1 elif z <= 5.3e-68: tmp = b * (c + (-4.0 * (i * (x / b)))) elif z <= 7.4e+99: tmp = ((x * i) * -4.0) - (27.0 * (j * k)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (z <= -5.9e-5) tmp = t_1; elseif (z <= 5.3e-68) tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b))))); elseif (z <= 7.4e+99) tmp = Float64(Float64(Float64(x * i) * -4.0) - Float64(27.0 * Float64(j * k))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (z <= -5.9e-5)
tmp = t_1;
elseif (z <= 5.3e-68)
tmp = b * (c + (-4.0 * (i * (x / b))));
elseif (z <= 7.4e+99)
tmp = ((x * i) * -4.0) - (27.0 * (j * k));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.9e-5], t$95$1, If[LessEqual[z, 5.3e-68], N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.4e+99], N[(N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;z \leq -5.9 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{-68}:\\
\;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{+99}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.8999999999999998e-5 or 7.4000000000000002e99 < z Initial program 81.9%
Simplified77.9%
Taylor expanded in t around inf 54.3%
if -5.8999999999999998e-5 < z < 5.3e-68Initial program 87.4%
Taylor expanded in t around 0 74.2%
Taylor expanded in b around inf 67.8%
associate-*r/67.8%
mul-1-neg67.8%
associate-*r*67.8%
*-commutative67.8%
*-commutative67.8%
associate-*r*67.8%
distribute-neg-in67.8%
associate-*r*67.8%
distribute-lft-neg-out67.8%
*-commutative67.8%
distribute-rgt-neg-in67.8%
metadata-eval67.8%
associate-*r*67.8%
*-commutative67.8%
distribute-lft-neg-in67.8%
metadata-eval67.8%
*-commutative67.8%
Simplified67.8%
Taylor expanded in i around inf 59.1%
associate-/l*58.1%
Simplified58.1%
if 5.3e-68 < z < 7.4000000000000002e99Initial program 87.0%
Taylor expanded in t around 0 55.4%
Taylor expanded in b around inf 45.5%
associate-/l*50.3%
Simplified50.3%
Taylor expanded in b around 0 40.7%
Final simplification53.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* b (+ c (* -4.0 (* i (/ x b)))))))
(if (<= b -4.1e+167)
t_1
(if (<= b -2.85e+19)
(+ (* j (* k -27.0)) (* a (* t -4.0)))
(if (<= b 3.5e-78) (- (* (* x i) -4.0) (* 27.0 (* j k))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = b * (c + (-4.0 * (i * (x / b))));
double tmp;
if (b <= -4.1e+167) {
tmp = t_1;
} else if (b <= -2.85e+19) {
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
} else if (b <= 3.5e-78) {
tmp = ((x * i) * -4.0) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = b * (c + ((-4.0d0) * (i * (x / b))))
if (b <= (-4.1d+167)) then
tmp = t_1
else if (b <= (-2.85d+19)) then
tmp = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
else if (b <= 3.5d-78) then
tmp = ((x * i) * (-4.0d0)) - (27.0d0 * (j * k))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = b * (c + (-4.0 * (i * (x / b))));
double tmp;
if (b <= -4.1e+167) {
tmp = t_1;
} else if (b <= -2.85e+19) {
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
} else if (b <= 3.5e-78) {
tmp = ((x * i) * -4.0) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = b * (c + (-4.0 * (i * (x / b)))) tmp = 0 if b <= -4.1e+167: tmp = t_1 elif b <= -2.85e+19: tmp = (j * (k * -27.0)) + (a * (t * -4.0)) elif b <= 3.5e-78: tmp = ((x * i) * -4.0) - (27.0 * (j * k)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b))))) tmp = 0.0 if (b <= -4.1e+167) tmp = t_1; elseif (b <= -2.85e+19) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0))); elseif (b <= 3.5e-78) tmp = Float64(Float64(Float64(x * i) * -4.0) - Float64(27.0 * Float64(j * k))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = b * (c + (-4.0 * (i * (x / b))));
tmp = 0.0;
if (b <= -4.1e+167)
tmp = t_1;
elseif (b <= -2.85e+19)
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
elseif (b <= 3.5e-78)
tmp = ((x * i) * -4.0) - (27.0 * (j * k));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.1e+167], t$95$1, If[LessEqual[b, -2.85e+19], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.5e-78], N[(N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\mathbf{if}\;b \leq -4.1 \cdot 10^{+167}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.85 \cdot 10^{+19}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;b \leq 3.5 \cdot 10^{-78}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.1e167 or 3.4999999999999999e-78 < b Initial program 79.9%
Taylor expanded in t around 0 60.3%
Taylor expanded in b around inf 63.0%
associate-*r/63.0%
mul-1-neg63.0%
associate-*r*63.0%
*-commutative63.0%
*-commutative63.0%
associate-*r*63.0%
distribute-neg-in63.0%
associate-*r*63.0%
distribute-lft-neg-out63.0%
*-commutative63.0%
distribute-rgt-neg-in63.0%
metadata-eval63.0%
associate-*r*63.0%
*-commutative63.0%
distribute-lft-neg-in63.0%
metadata-eval63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in i around inf 52.6%
associate-/l*52.6%
Simplified52.6%
if -4.1e167 < b < -2.85e19Initial program 87.2%
Simplified93.7%
Taylor expanded in a around inf 46.0%
metadata-eval46.0%
distribute-lft-neg-in46.0%
*-commutative46.0%
associate-*l*46.0%
distribute-lft-neg-in46.0%
distribute-lft-neg-in46.0%
metadata-eval46.0%
Simplified46.0%
if -2.85e19 < b < 3.4999999999999999e-78Initial program 88.5%
Taylor expanded in t around 0 58.7%
Taylor expanded in b around inf 50.6%
associate-/l*49.6%
Simplified49.6%
Taylor expanded in b around 0 49.9%
Final simplification50.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (* b (+ c (* -4.0 (* i (/ x b)))))))
(if (<= b -4.1e+167)
t_2
(if (<= b -560000000000.0)
(+ t_1 (* a (* t -4.0)))
(if (<= b 1.4e-76) (+ t_1 (* i (* x -4.0))) t_2)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = b * (c + (-4.0 * (i * (x / b))));
double tmp;
if (b <= -4.1e+167) {
tmp = t_2;
} else if (b <= -560000000000.0) {
tmp = t_1 + (a * (t * -4.0));
} else if (b <= 1.4e-76) {
tmp = t_1 + (i * (x * -4.0));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = b * (c + ((-4.0d0) * (i * (x / b))))
if (b <= (-4.1d+167)) then
tmp = t_2
else if (b <= (-560000000000.0d0)) then
tmp = t_1 + (a * (t * (-4.0d0)))
else if (b <= 1.4d-76) then
tmp = t_1 + (i * (x * (-4.0d0)))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = b * (c + (-4.0 * (i * (x / b))));
double tmp;
if (b <= -4.1e+167) {
tmp = t_2;
} else if (b <= -560000000000.0) {
tmp = t_1 + (a * (t * -4.0));
} else if (b <= 1.4e-76) {
tmp = t_1 + (i * (x * -4.0));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = b * (c + (-4.0 * (i * (x / b)))) tmp = 0 if b <= -4.1e+167: tmp = t_2 elif b <= -560000000000.0: tmp = t_1 + (a * (t * -4.0)) elif b <= 1.4e-76: tmp = t_1 + (i * (x * -4.0)) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b))))) tmp = 0.0 if (b <= -4.1e+167) tmp = t_2; elseif (b <= -560000000000.0) tmp = Float64(t_1 + Float64(a * Float64(t * -4.0))); elseif (b <= 1.4e-76) tmp = Float64(t_1 + Float64(i * Float64(x * -4.0))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = b * (c + (-4.0 * (i * (x / b))));
tmp = 0.0;
if (b <= -4.1e+167)
tmp = t_2;
elseif (b <= -560000000000.0)
tmp = t_1 + (a * (t * -4.0));
elseif (b <= 1.4e-76)
tmp = t_1 + (i * (x * -4.0));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.1e+167], t$95$2, If[LessEqual[b, -560000000000.0], N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e-76], N[(t$95$1 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\mathbf{if}\;b \leq -4.1 \cdot 10^{+167}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -560000000000:\\
\;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{-76}:\\
\;\;\;\;t\_1 + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -4.1e167 or 1.40000000000000005e-76 < b Initial program 79.9%
Taylor expanded in t around 0 60.3%
Taylor expanded in b around inf 63.0%
associate-*r/63.0%
mul-1-neg63.0%
associate-*r*63.0%
*-commutative63.0%
*-commutative63.0%
associate-*r*63.0%
distribute-neg-in63.0%
associate-*r*63.0%
distribute-lft-neg-out63.0%
*-commutative63.0%
distribute-rgt-neg-in63.0%
metadata-eval63.0%
associate-*r*63.0%
*-commutative63.0%
distribute-lft-neg-in63.0%
metadata-eval63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in i around inf 52.6%
associate-/l*52.6%
Simplified52.6%
if -4.1e167 < b < -5.6e11Initial program 87.2%
Simplified93.7%
Taylor expanded in a around inf 46.0%
metadata-eval46.0%
distribute-lft-neg-in46.0%
*-commutative46.0%
associate-*l*46.0%
distribute-lft-neg-in46.0%
distribute-lft-neg-in46.0%
metadata-eval46.0%
Simplified46.0%
if -5.6e11 < b < 1.40000000000000005e-76Initial program 88.5%
Simplified90.3%
Taylor expanded in i around inf 49.9%
associate-*r*49.9%
*-commutative49.9%
associate-*r*49.9%
*-commutative49.9%
*-commutative49.9%
Simplified49.9%
Final simplification50.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -6.5e+34) (not (<= t 1.25e+114))) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))) (- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -6.5e+34) || !(t <= 1.25e+114)) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-6.5d+34)) .or. (.not. (t <= 1.25d+114))) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else
tmp = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -6.5e+34) || !(t <= 1.25e+114)) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -6.5e+34) or not (t <= 1.25e+114): tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) else: tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -6.5e+34) || !(t <= 1.25e+114)) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -6.5e+34) || ~((t <= 1.25e+114)))
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
else
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -6.5e+34], N[Not[LessEqual[t, 1.25e+114]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+34} \lor \neg \left(t \leq 1.25 \cdot 10^{+114}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -6.50000000000000017e34 or 1.25e114 < t Initial program 78.9%
Simplified84.6%
Taylor expanded in t around inf 73.0%
if -6.50000000000000017e34 < t < 1.25e114Initial program 88.1%
Taylor expanded in t around 0 73.2%
Final simplification73.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= z -2.6e-79) (not (<= z 1.2e+113))) (- (* (* z (* x y)) (* 18.0 t)) (* (* j 27.0) k)) (- (* b c) (* 4.0 (+ (* x i) (* t a))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((z <= -2.6e-79) || !(z <= 1.2e+113)) {
tmp = ((z * (x * y)) * (18.0 * t)) - ((j * 27.0) * k);
} else {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((z <= (-2.6d-79)) .or. (.not. (z <= 1.2d+113))) then
tmp = ((z * (x * y)) * (18.0d0 * t)) - ((j * 27.0d0) * k)
else
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((z <= -2.6e-79) || !(z <= 1.2e+113)) {
tmp = ((z * (x * y)) * (18.0 * t)) - ((j * 27.0) * k);
} else {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (z <= -2.6e-79) or not (z <= 1.2e+113): tmp = ((z * (x * y)) * (18.0 * t)) - ((j * 27.0) * k) else: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((z <= -2.6e-79) || !(z <= 1.2e+113)) tmp = Float64(Float64(Float64(z * Float64(x * y)) * Float64(18.0 * t)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((z <= -2.6e-79) || ~((z <= 1.2e+113)))
tmp = ((z * (x * y)) * (18.0 * t)) - ((j * 27.0) * k);
else
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[z, -2.6e-79], N[Not[LessEqual[z, 1.2e+113]], $MachinePrecision]], N[(N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-79} \lor \neg \left(z \leq 1.2 \cdot 10^{+113}\right):\\
\;\;\;\;\left(z \cdot \left(x \cdot y\right)\right) \cdot \left(18 \cdot t\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\end{array}
\end{array}
if z < -2.59999999999999994e-79 or 1.19999999999999992e113 < z Initial program 84.1%
distribute-rgt-out--85.6%
associate-*r*80.6%
*-commutative80.6%
associate-*l*80.5%
associate-*r*80.5%
Applied egg-rr80.5%
Taylor expanded in y around inf 53.4%
associate-*r*53.5%
associate-*r*57.1%
Simplified57.1%
if -2.59999999999999994e-79 < z < 1.19999999999999992e113Initial program 85.7%
Taylor expanded in y around 0 82.2%
distribute-lft-out82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in j around 0 71.0%
Final simplification63.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -5e+30) (not (<= (* b c) 2e+181))) (* b (+ c (* -4.0 (* i (/ x b))))) (+ (* j (* k -27.0)) (* i (* x -4.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -5e+30) || !((b * c) <= 2e+181)) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-5d+30)) .or. (.not. ((b * c) <= 2d+181))) then
tmp = b * (c + ((-4.0d0) * (i * (x / b))))
else
tmp = (j * (k * (-27.0d0))) + (i * (x * (-4.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -5e+30) || !((b * c) <= 2e+181)) {
tmp = b * (c + (-4.0 * (i * (x / b))));
} else {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -5e+30) or not ((b * c) <= 2e+181): tmp = b * (c + (-4.0 * (i * (x / b)))) else: tmp = (j * (k * -27.0)) + (i * (x * -4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -5e+30) || !(Float64(b * c) <= 2e+181)) tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b))))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(i * Float64(x * -4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -5e+30) || ~(((b * c) <= 2e+181)))
tmp = b * (c + (-4.0 * (i * (x / b))));
else
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -5e+30], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2e+181]], $MachinePrecision]], N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+30} \lor \neg \left(b \cdot c \leq 2 \cdot 10^{+181}\right):\\
\;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4.9999999999999998e30 or 1.9999999999999998e181 < (*.f64 b c) Initial program 82.8%
Taylor expanded in t around 0 74.2%
Taylor expanded in b around inf 75.5%
associate-*r/75.5%
mul-1-neg75.5%
associate-*r*75.5%
*-commutative75.5%
*-commutative75.5%
associate-*r*75.6%
distribute-neg-in75.6%
associate-*r*75.6%
distribute-lft-neg-out75.6%
*-commutative75.6%
distribute-rgt-neg-in75.6%
metadata-eval75.6%
associate-*r*75.5%
*-commutative75.5%
distribute-lft-neg-in75.5%
metadata-eval75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in i around inf 73.4%
associate-/l*72.4%
Simplified72.4%
if -4.9999999999999998e30 < (*.f64 b c) < 1.9999999999999998e181Initial program 86.0%
Simplified87.3%
Taylor expanded in i around inf 47.7%
associate-*r*47.7%
*-commutative47.7%
associate-*r*47.7%
*-commutative47.7%
*-commutative47.7%
Simplified47.7%
Final simplification56.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* x i) -4.0)))
(if (<= x -2.3e+45)
t_1
(if (<= x 7.5e+18)
(+ (* b c) (* j (* k -27.0)))
(if (<= x 2.2e+174) (* t (* 18.0 (* x (* y z)))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * i) * -4.0;
double tmp;
if (x <= -2.3e+45) {
tmp = t_1;
} else if (x <= 7.5e+18) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 2.2e+174) {
tmp = t * (18.0 * (x * (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (x * i) * (-4.0d0)
if (x <= (-2.3d+45)) then
tmp = t_1
else if (x <= 7.5d+18) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (x <= 2.2d+174) then
tmp = t * (18.0d0 * (x * (y * z)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * i) * -4.0;
double tmp;
if (x <= -2.3e+45) {
tmp = t_1;
} else if (x <= 7.5e+18) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 2.2e+174) {
tmp = t * (18.0 * (x * (y * z)));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * i) * -4.0 tmp = 0 if x <= -2.3e+45: tmp = t_1 elif x <= 7.5e+18: tmp = (b * c) + (j * (k * -27.0)) elif x <= 2.2e+174: tmp = t * (18.0 * (x * (y * z))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * i) * -4.0) tmp = 0.0 if (x <= -2.3e+45) tmp = t_1; elseif (x <= 7.5e+18) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (x <= 2.2e+174) tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z)))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * i) * -4.0;
tmp = 0.0;
if (x <= -2.3e+45)
tmp = t_1;
elseif (x <= 7.5e+18)
tmp = (b * c) + (j * (k * -27.0));
elseif (x <= 2.2e+174)
tmp = t * (18.0 * (x * (y * z)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]}, If[LessEqual[x, -2.3e+45], t$95$1, If[LessEqual[x, 7.5e+18], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+174], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot i\right) \cdot -4\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+18}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+174}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.30000000000000012e45 or 2.2000000000000002e174 < x Initial program 73.4%
Taylor expanded in y around 0 62.9%
distribute-lft-out62.9%
*-commutative62.9%
Simplified62.9%
Taylor expanded in i around inf 54.9%
*-commutative54.9%
Simplified54.9%
if -2.30000000000000012e45 < x < 7.5e18Initial program 94.3%
Simplified91.1%
Taylor expanded in b around inf 54.0%
if 7.5e18 < x < 2.2000000000000002e174Initial program 71.8%
Simplified83.0%
Taylor expanded in t around inf 61.0%
Taylor expanded in x around inf 44.5%
Final simplification53.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* 18.0 (* x (* y z))))))
(if (<= z -1.35e-79)
t_1
(if (<= z -1.75e-284) (* b c) (if (<= z 7.4e+99) (* (* x i) -4.0) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (18.0 * (x * (y * z)));
double tmp;
if (z <= -1.35e-79) {
tmp = t_1;
} else if (z <= -1.75e-284) {
tmp = b * c;
} else if (z <= 7.4e+99) {
tmp = (x * i) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * (18.0d0 * (x * (y * z)))
if (z <= (-1.35d-79)) then
tmp = t_1
else if (z <= (-1.75d-284)) then
tmp = b * c
else if (z <= 7.4d+99) then
tmp = (x * i) * (-4.0d0)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (18.0 * (x * (y * z)));
double tmp;
if (z <= -1.35e-79) {
tmp = t_1;
} else if (z <= -1.75e-284) {
tmp = b * c;
} else if (z <= 7.4e+99) {
tmp = (x * i) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (18.0 * (x * (y * z))) tmp = 0 if z <= -1.35e-79: tmp = t_1 elif z <= -1.75e-284: tmp = b * c elif z <= 7.4e+99: tmp = (x * i) * -4.0 else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(18.0 * Float64(x * Float64(y * z)))) tmp = 0.0 if (z <= -1.35e-79) tmp = t_1; elseif (z <= -1.75e-284) tmp = Float64(b * c); elseif (z <= 7.4e+99) tmp = Float64(Float64(x * i) * -4.0); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * (18.0 * (x * (y * z)));
tmp = 0.0;
if (z <= -1.35e-79)
tmp = t_1;
elseif (z <= -1.75e-284)
tmp = b * c;
elseif (z <= 7.4e+99)
tmp = (x * i) * -4.0;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e-79], t$95$1, If[LessEqual[z, -1.75e-284], N[(b * c), $MachinePrecision], If[LessEqual[z, 7.4e+99], N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-284}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{+99}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3500000000000001e-79 or 7.4000000000000002e99 < z Initial program 83.9%
Simplified80.5%
Taylor expanded in t around inf 50.1%
Taylor expanded in x around inf 38.8%
if -1.3500000000000001e-79 < z < -1.74999999999999988e-284Initial program 89.5%
Taylor expanded in y around 0 95.0%
distribute-lft-out95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in b around inf 35.8%
if -1.74999999999999988e-284 < z < 7.4000000000000002e99Initial program 84.3%
Taylor expanded in y around 0 77.6%
distribute-lft-out77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in i around inf 37.2%
*-commutative37.2%
Simplified37.2%
Final simplification37.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -1.8e+41) (not (<= x 1.16e+55))) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (- (* b c) (* 4.0 (+ (* x i) (* t a))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.8e+41) || !(x <= 1.16e+55)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-1.8d+41)) .or. (.not. (x <= 1.16d+55))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.8e+41) || !(x <= 1.16e+55)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -1.8e+41) or not (x <= 1.16e+55): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -1.8e+41) || !(x <= 1.16e+55)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -1.8e+41) || ~((x <= 1.16e+55)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -1.8e+41], N[Not[LessEqual[x, 1.16e+55]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+41} \lor \neg \left(x \leq 1.16 \cdot 10^{+55}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\end{array}
\end{array}
if x < -1.80000000000000013e41 or 1.1599999999999999e55 < x Initial program 72.0%
Simplified77.6%
Taylor expanded in x around inf 78.3%
if -1.80000000000000013e41 < x < 1.1599999999999999e55Initial program 93.9%
Taylor expanded in y around 0 84.2%
distribute-lft-out84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in j around 0 62.2%
Final simplification68.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z -2.3e-79)
(+ (* 18.0 (* (* y z) (* x t))) (* j (* k -27.0)))
(if (<= z 1.1e+116)
(- (* b c) (* 4.0 (+ (* x i) (* t a))))
(* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= -2.3e-79) {
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
} else if (z <= 1.1e+116) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (z <= (-2.3d-79)) then
tmp = (18.0d0 * ((y * z) * (x * t))) + (j * (k * (-27.0d0)))
else if (z <= 1.1d+116) then
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
else
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= -2.3e-79) {
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
} else if (z <= 1.1e+116) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= -2.3e-79: tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0)) elif z <= 1.1e+116: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) else: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= -2.3e-79) tmp = Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) + Float64(j * Float64(k * -27.0))); elseif (z <= 1.1e+116) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); else tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (z <= -2.3e-79)
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
elseif (z <= 1.1e+116)
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
else
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, -2.3e-79], N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+116], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-79}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+116}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if z < -2.30000000000000012e-79Initial program 82.7%
Simplified83.9%
Taylor expanded in y around inf 59.8%
associate-*r*60.1%
Simplified60.1%
if -2.30000000000000012e-79 < z < 1.1e116Initial program 85.7%
Taylor expanded in y around 0 82.2%
distribute-lft-out82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in j around 0 71.0%
if 1.1e116 < z Initial program 86.8%
Simplified76.0%
Taylor expanded in t around inf 47.2%
Final simplification63.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= z -4.5e-15) (not (<= z 6.2e+104))) (* t (* 18.0 (* x (* y z)))) (* b (+ c (* -4.0 (* i (/ x b)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((z <= -4.5e-15) || !(z <= 6.2e+104)) {
tmp = t * (18.0 * (x * (y * z)));
} else {
tmp = b * (c + (-4.0 * (i * (x / b))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((z <= (-4.5d-15)) .or. (.not. (z <= 6.2d+104))) then
tmp = t * (18.0d0 * (x * (y * z)))
else
tmp = b * (c + ((-4.0d0) * (i * (x / b))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((z <= -4.5e-15) || !(z <= 6.2e+104)) {
tmp = t * (18.0 * (x * (y * z)));
} else {
tmp = b * (c + (-4.0 * (i * (x / b))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (z <= -4.5e-15) or not (z <= 6.2e+104): tmp = t * (18.0 * (x * (y * z))) else: tmp = b * (c + (-4.0 * (i * (x / b)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((z <= -4.5e-15) || !(z <= 6.2e+104)) tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z)))); else tmp = Float64(b * Float64(c + Float64(-4.0 * Float64(i * Float64(x / b))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((z <= -4.5e-15) || ~((z <= 6.2e+104)))
tmp = t * (18.0 * (x * (y * z)));
else
tmp = b * (c + (-4.0 * (i * (x / b))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[z, -4.5e-15], N[Not[LessEqual[z, 6.2e+104]], $MachinePrecision]], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(c + N[(-4.0 * N[(i * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-15} \lor \neg \left(z \leq 6.2 \cdot 10^{+104}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(c + -4 \cdot \left(i \cdot \frac{x}{b}\right)\right)\\
\end{array}
\end{array}
if z < -4.4999999999999998e-15 or 6.20000000000000033e104 < z Initial program 82.2%
Simplified78.3%
Taylor expanded in t around inf 53.4%
Taylor expanded in x around inf 42.7%
if -4.4999999999999998e-15 < z < 6.20000000000000033e104Initial program 87.1%
Taylor expanded in t around 0 68.6%
Taylor expanded in b around inf 63.8%
associate-*r/63.8%
mul-1-neg63.8%
associate-*r*63.8%
*-commutative63.8%
*-commutative63.8%
associate-*r*63.8%
distribute-neg-in63.8%
associate-*r*63.8%
distribute-lft-neg-out63.8%
*-commutative63.8%
distribute-rgt-neg-in63.8%
metadata-eval63.8%
associate-*r*63.8%
*-commutative63.8%
distribute-lft-neg-in63.8%
metadata-eval63.8%
*-commutative63.8%
Simplified63.8%
Taylor expanded in i around inf 52.6%
associate-/l*53.2%
Simplified53.2%
Final simplification48.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -2.3e+195) (not (<= (* b c) 1.8e+181))) (* b c) (* (* x i) -4.0)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.3e+195) || !((b * c) <= 1.8e+181)) {
tmp = b * c;
} else {
tmp = (x * i) * -4.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-2.3d+195)) .or. (.not. ((b * c) <= 1.8d+181))) then
tmp = b * c
else
tmp = (x * i) * (-4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.3e+195) || !((b * c) <= 1.8e+181)) {
tmp = b * c;
} else {
tmp = (x * i) * -4.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -2.3e+195) or not ((b * c) <= 1.8e+181): tmp = b * c else: tmp = (x * i) * -4.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -2.3e+195) || !(Float64(b * c) <= 1.8e+181)) tmp = Float64(b * c); else tmp = Float64(Float64(x * i) * -4.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -2.3e+195) || ~(((b * c) <= 1.8e+181)))
tmp = b * c;
else
tmp = (x * i) * -4.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -2.3e+195], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.8e+181]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.3 \cdot 10^{+195} \lor \neg \left(b \cdot c \leq 1.8 \cdot 10^{+181}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if (*.f64 b c) < -2.3000000000000001e195 or 1.79999999999999992e181 < (*.f64 b c) Initial program 79.8%
Taylor expanded in y around 0 81.7%
distribute-lft-out81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in b around inf 76.6%
if -2.3000000000000001e195 < (*.f64 b c) < 1.79999999999999992e181Initial program 86.2%
Taylor expanded in y around 0 72.0%
distribute-lft-out72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in i around inf 28.1%
*-commutative28.1%
Simplified28.1%
Final simplification38.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.12e+154) (not (<= (* b c) 1.2e+181))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.12e+154) || !((b * c) <= 1.2e+181)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.12d+154)) .or. (.not. ((b * c) <= 1.2d+181))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.12e+154) || !((b * c) <= 1.2e+181)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.12e+154) or not ((b * c) <= 1.2e+181): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.12e+154) || !(Float64(b * c) <= 1.2e+181)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.12e+154) || ~(((b * c) <= 1.2e+181)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.12e+154], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.2e+181]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.12 \cdot 10^{+154} \lor \neg \left(b \cdot c \leq 1.2 \cdot 10^{+181}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.11999999999999994e154 or 1.20000000000000001e181 < (*.f64 b c) Initial program 79.8%
Taylor expanded in y around 0 81.6%
distribute-lft-out81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in b around inf 71.9%
if -1.11999999999999994e154 < (*.f64 b c) < 1.20000000000000001e181Initial program 86.4%
Simplified88.0%
Taylor expanded in j around inf 23.1%
Final simplification34.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 84.9%
Taylor expanded in y around 0 74.0%
distribute-lft-out74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in b around inf 22.9%
(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 2024182
(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
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))