
(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 19 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 (* t (* a 4.0))))
(if (<=
(-
(- (+ (- (* (* (* (* x 18.0) y) z) t) t_1) (* b c)) (* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(-
(+ (* z (* t (* 18.0 (* x y)))) (- (* b c) t_1))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* z (+ (* -27.0 (/ (* j k) z)) (* 18.0 (* t (* x y))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * 4.0);
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - t_1) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = ((z * (t * (18.0 * (x * y)))) + ((b * c) - t_1)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = z * ((-27.0 * ((j * k) / z)) + (18.0 * (t * (x * y))));
}
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 = t * (a * 4.0);
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - t_1) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Double.POSITIVE_INFINITY) {
tmp = ((z * (t * (18.0 * (x * y)))) + ((b * c) - t_1)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = z * ((-27.0 * ((j * k) / z)) + (18.0 * (t * (x * y))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * 4.0) tmp = 0 if ((((((((x * 18.0) * y) * z) * t) - t_1) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= math.inf: tmp = ((z * (t * (18.0 * (x * y)))) + ((b * c) - t_1)) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = z * ((-27.0 * ((j * k) / z)) + (18.0 * (t * (x * y)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * 4.0)) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - t_1) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) <= Inf) tmp = Float64(Float64(Float64(z * Float64(t * Float64(18.0 * Float64(x * y)))) + Float64(Float64(b * c) - t_1)) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(z * Float64(Float64(-27.0 * Float64(Float64(j * k) / z)) + Float64(18.0 * Float64(t * Float64(x * y))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * (a * 4.0);
tmp = 0.0;
if (((((((((x * 18.0) * y) * z) * t) - t_1) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Inf)
tmp = ((z * (t * (18.0 * (x * y)))) + ((b * c) - t_1)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = z * ((-27.0 * ((j * k) / z)) + (18.0 * (t * (x * y))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(z * N[(t * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(x * y), $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}
t_1 := t \cdot \left(a \cdot 4\right)\\
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t\_1\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\
\;\;\;\;\left(z \cdot \left(t \cdot \left(18 \cdot \left(x \cdot y\right)\right)\right) + \left(b \cdot c - t\_1\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-27 \cdot \frac{j \cdot k}{z} + 18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 94.8%
Simplified94.1%
associate-*r*94.8%
distribute-rgt-out--94.8%
associate-+l-94.8%
associate-*l*93.5%
fmm-def93.5%
associate-*l*93.0%
*-commutative93.0%
Applied egg-rr93.0%
fmm-undef93.0%
*-commutative93.0%
Simplified93.0%
associate-*r*95.3%
fmm-def95.3%
Applied egg-rr95.3%
fmm-undef95.3%
*-commutative95.3%
associate-*r*95.7%
*-commutative95.7%
associate-*r*95.7%
Simplified95.7%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified27.6%
Taylor expanded in y around inf 65.7%
associate-*r*65.8%
Simplified65.8%
Taylor expanded in z around inf 72.4%
Final simplification93.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -1e+98)
(- (- (* 18.0 (* (* y z) (* x t))) (* 4.0 (+ (* x i) (* t a)))) t_1)
(if (<= t_1 1e+191)
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 4.0 (* x i)))
(+ (* b c) (* j (* k -27.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -1e+98) {
tmp = ((18.0 * ((y * z) * (x * t))) - (4.0 * ((x * i) + (t * a)))) - t_1;
} else if (t_1 <= 1e+191) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-1d+98)) then
tmp = ((18.0d0 * ((y * z) * (x * t))) - (4.0d0 * ((x * i) + (t * a)))) - t_1
else if (t_1 <= 1d+191) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -1e+98) {
tmp = ((18.0 * ((y * z) * (x * t))) - (4.0 * ((x * i) + (t * a)))) - t_1;
} else if (t_1 <= 1e+191) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -1e+98: tmp = ((18.0 * ((y * z) * (x * t))) - (4.0 * ((x * i) + (t * a)))) - t_1 elif t_1 <= 1e+191: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -1e+98) tmp = Float64(Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - t_1); elseif (t_1 <= 1e+191) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -1e+98)
tmp = ((18.0 * ((y * z) * (x * t))) - (4.0 * ((x * i) + (t * a)))) - t_1;
elseif (t_1 <= 1e+191)
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+98], N[(N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 1e+191], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+98}:\\
\;\;\;\;\left(18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{+191}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.99999999999999998e97Initial program 79.2%
Taylor expanded in b around 0 86.1%
associate-*r*85.9%
distribute-lft-out85.9%
*-commutative85.9%
Simplified85.9%
if -9.99999999999999998e97 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000007e191Initial program 84.7%
Simplified86.5%
Taylor expanded in j around 0 85.0%
if 1.00000000000000007e191 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 87.9%
Simplified87.8%
Taylor expanded in b around inf 95.8%
Final simplification86.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)) (t_2 (* j (* k -27.0))))
(if (<= t_1 -1e+98)
(+ (* 18.0 (* (* y z) (* x t))) t_2)
(if (<= t_1 1e+191)
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 4.0 (* x i)))
(+ (* b c) 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 * 27.0) * k;
double t_2 = j * (k * -27.0);
double tmp;
if (t_1 <= -1e+98) {
tmp = (18.0 * ((y * z) * (x * t))) + t_2;
} else if (t_1 <= 1e+191) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = (b * c) + t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 * 27.0d0) * k
t_2 = j * (k * (-27.0d0))
if (t_1 <= (-1d+98)) then
tmp = (18.0d0 * ((y * z) * (x * t))) + t_2
else if (t_1 <= 1d+191) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
else
tmp = (b * c) + t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = j * (k * -27.0);
double tmp;
if (t_1 <= -1e+98) {
tmp = (18.0 * ((y * z) * (x * t))) + t_2;
} else if (t_1 <= 1e+191) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = (b * c) + t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = j * (k * -27.0) tmp = 0 if t_1 <= -1e+98: tmp = (18.0 * ((y * z) * (x * t))) + t_2 elif t_1 <= 1e+191: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) else: tmp = (b * c) + t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (t_1 <= -1e+98) tmp = Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) + t_2); elseif (t_1 <= 1e+191) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) + t_2); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = j * (k * -27.0);
tmp = 0.0;
if (t_1 <= -1e+98)
tmp = (18.0 * ((y * z) * (x * t))) + t_2;
elseif (t_1 <= 1e+191)
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
else
tmp = (b * c) + t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+98], N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t$95$1, 1e+191], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+98}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+191}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.99999999999999998e97Initial program 79.2%
Simplified86.2%
Taylor expanded in y around inf 84.4%
associate-*r*84.2%
Simplified84.2%
if -9.99999999999999998e97 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000007e191Initial program 84.7%
Simplified86.5%
Taylor expanded in j around 0 85.0%
if 1.00000000000000007e191 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 87.9%
Simplified87.8%
Taylor expanded in b around inf 95.8%
Final simplification85.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 (<= x -5.1e+206)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= x 3.7e+173)
(-
(- (* b c) (* t (- (* a 4.0) (* (* x 18.0) (* y z)))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* x (- (* 4.0 (- i)) (* -18.0 (* z (* y t))))))))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 <= -5.1e+206) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= 3.7e+173) {
tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((4.0 * -i) - (-18.0 * (z * (y * t))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= (-5.1d+206)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (x <= 3.7d+173) then
tmp = ((b * c) - (t * ((a * 4.0d0) - ((x * 18.0d0) * (y * z))))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = x * ((4.0d0 * -i) - ((-18.0d0) * (z * (y * t))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= -5.1e+206) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= 3.7e+173) {
tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((4.0 * -i) - (-18.0 * (z * (y * t))));
}
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 <= -5.1e+206: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif x <= 3.7e+173: tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = x * ((4.0 * -i) - (-18.0 * (z * (y * t)))) 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 <= -5.1e+206) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (x <= 3.7e+173) tmp = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(Float64(x * 18.0) * Float64(y * z))))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(x * Float64(Float64(4.0 * Float64(-i)) - Float64(-18.0 * Float64(z * Float64(y * t))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -5.1e+206)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (x <= 3.7e+173)
tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = x * ((4.0 * -i) - (-18.0 * (z * (y * t))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -5.1e+206], 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.7e+173], N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(N[(x * 18.0), $MachinePrecision] * N[(y * 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], N[(x * N[(N[(4.0 * (-i)), $MachinePrecision] - N[(-18.0 * N[(z * N[(y * t), $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}\;x \leq -5.1 \cdot 10^{+206}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+173}:\\
\;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - \left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4 \cdot \left(-i\right) - -18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.1000000000000003e206Initial program 53.4%
Simplified64.9%
Taylor expanded in x around inf 94.4%
if -5.1000000000000003e206 < x < 3.69999999999999986e173Initial program 88.7%
Simplified89.9%
if 3.69999999999999986e173 < x Initial program 67.0%
Simplified70.7%
associate-*r*67.0%
distribute-rgt-out--67.0%
associate-+l-67.0%
associate-*l*74.0%
fmm-def74.0%
associate-*l*74.0%
*-commutative74.0%
Applied egg-rr74.0%
fmm-undef74.0%
*-commutative74.0%
Simplified74.0%
associate-*r*74.0%
fmm-def74.0%
Applied egg-rr74.0%
fmm-undef74.0%
*-commutative74.0%
associate-*r*74.1%
*-commutative74.1%
associate-*r*74.0%
Simplified74.0%
Taylor expanded in x around -inf 82.0%
associate-*r*82.0%
neg-mul-182.0%
cancel-sign-sub-inv82.0%
associate-*r*83.7%
metadata-eval83.7%
*-commutative83.7%
Simplified83.7%
Final simplification89.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= y -8.5e+203)
(+ (* j (* k -27.0)) (* 18.0 (* z (* t (* x y)))))
(if (<= y -6.2e+116)
(* x (- (* -18.0 (* (* y t) (- z))) (* 4.0 i)))
(if (<= y 1.6e-17)
(- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* (* j 27.0) k))
(* 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 (y <= -8.5e+203) {
tmp = (j * (k * -27.0)) + (18.0 * (z * (t * (x * y))));
} else if (y <= -6.2e+116) {
tmp = x * ((-18.0 * ((y * t) * -z)) - (4.0 * i));
} else if (y <= 1.6e-17) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
} 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 (y <= (-8.5d+203)) then
tmp = (j * (k * (-27.0d0))) + (18.0d0 * (z * (t * (x * y))))
else if (y <= (-6.2d+116)) then
tmp = x * (((-18.0d0) * ((y * t) * -z)) - (4.0d0 * i))
else if (y <= 1.6d-17) then
tmp = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - ((j * 27.0d0) * k)
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 (y <= -8.5e+203) {
tmp = (j * (k * -27.0)) + (18.0 * (z * (t * (x * y))));
} else if (y <= -6.2e+116) {
tmp = x * ((-18.0 * ((y * t) * -z)) - (4.0 * i));
} else if (y <= 1.6e-17) {
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
} 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 y <= -8.5e+203: tmp = (j * (k * -27.0)) + (18.0 * (z * (t * (x * y)))) elif y <= -6.2e+116: tmp = x * ((-18.0 * ((y * t) * -z)) - (4.0 * i)) elif y <= 1.6e-17: tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k) 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 (y <= -8.5e+203) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(18.0 * Float64(z * Float64(t * Float64(x * y))))); elseif (y <= -6.2e+116) tmp = Float64(x * Float64(Float64(-18.0 * Float64(Float64(y * t) * Float64(-z))) - Float64(4.0 * i))); elseif (y <= 1.6e-17) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(t * 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 (y <= -8.5e+203)
tmp = (j * (k * -27.0)) + (18.0 * (z * (t * (x * y))));
elseif (y <= -6.2e+116)
tmp = x * ((-18.0 * ((y * t) * -z)) - (4.0 * i));
elseif (y <= 1.6e-17)
tmp = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
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[y, -8.5e+203], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(z * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.2e+116], N[(x * N[(N[(-18.0 * N[(N[(y * t), $MachinePrecision] * (-z)), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e-17], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(t * 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}\;y \leq -8.5 \cdot 10^{+203}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(z \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{+116}:\\
\;\;\;\;x \cdot \left(-18 \cdot \left(\left(y \cdot t\right) \cdot \left(-z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-17}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if y < -8.50000000000000025e203Initial program 86.2%
Simplified73.5%
Taylor expanded in y around inf 57.1%
associate-*r*57.0%
Simplified57.0%
Taylor expanded in t around 0 57.1%
associate-*r*70.0%
associate-*r*73.2%
Simplified73.2%
if -8.50000000000000025e203 < y < -6.19999999999999992e116Initial program 71.3%
Simplified77.1%
associate-*r*77.1%
distribute-rgt-out--71.3%
associate-+l-71.3%
associate-*l*76.9%
fmm-def82.8%
associate-*l*82.8%
*-commutative82.8%
Applied egg-rr82.8%
fmm-undef76.9%
*-commutative76.9%
Simplified76.9%
associate-*r*71.5%
fmm-def71.5%
Applied egg-rr71.5%
fmm-undef71.5%
*-commutative71.5%
associate-*r*71.5%
*-commutative71.5%
associate-*r*71.5%
Simplified71.5%
Taylor expanded in x around -inf 65.7%
associate-*r*65.7%
neg-mul-165.7%
cancel-sign-sub-inv65.7%
associate-*r*71.3%
metadata-eval71.3%
*-commutative71.3%
Simplified71.3%
if -6.19999999999999992e116 < y < 1.6000000000000001e-17Initial program 91.1%
Taylor expanded in y around 0 82.7%
distribute-lft-out82.7%
*-commutative82.7%
Simplified82.7%
if 1.6000000000000001e-17 < y Initial program 70.1%
Simplified78.3%
Taylor expanded in t around inf 57.0%
Final simplification74.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))))
(if (<= (* b c) -2e+132)
t_1
(if (<= (* b c) -7e-61)
(+ (* a (* t -4.0)) (* -27.0 (* j k)))
(if (<= (* b c) 4.8e-82) (- (* (* x i) -4.0) (* (* j 27.0) 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) + (j * (k * -27.0));
double tmp;
if ((b * c) <= -2e+132) {
tmp = t_1;
} else if ((b * c) <= -7e-61) {
tmp = (a * (t * -4.0)) + (-27.0 * (j * k));
} else if ((b * c) <= 4.8e-82) {
tmp = ((x * i) * -4.0) - ((j * 27.0) * 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) + (j * (k * (-27.0d0)))
if ((b * c) <= (-2d+132)) then
tmp = t_1
else if ((b * c) <= (-7d-61)) then
tmp = (a * (t * (-4.0d0))) + ((-27.0d0) * (j * k))
else if ((b * c) <= 4.8d-82) then
tmp = ((x * i) * (-4.0d0)) - ((j * 27.0d0) * 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) + (j * (k * -27.0));
double tmp;
if ((b * c) <= -2e+132) {
tmp = t_1;
} else if ((b * c) <= -7e-61) {
tmp = (a * (t * -4.0)) + (-27.0 * (j * k));
} else if ((b * c) <= 4.8e-82) {
tmp = ((x * i) * -4.0) - ((j * 27.0) * 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) + (j * (k * -27.0)) tmp = 0 if (b * c) <= -2e+132: tmp = t_1 elif (b * c) <= -7e-61: tmp = (a * (t * -4.0)) + (-27.0 * (j * k)) elif (b * c) <= 4.8e-82: tmp = ((x * i) * -4.0) - ((j * 27.0) * 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(Float64(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (Float64(b * c) <= -2e+132) tmp = t_1; elseif (Float64(b * c) <= -7e-61) tmp = Float64(Float64(a * Float64(t * -4.0)) + Float64(-27.0 * Float64(j * k))); elseif (Float64(b * c) <= 4.8e-82) tmp = Float64(Float64(Float64(x * i) * -4.0) - Float64(Float64(j * 27.0) * 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) + (j * (k * -27.0));
tmp = 0.0;
if ((b * c) <= -2e+132)
tmp = t_1;
elseif ((b * c) <= -7e-61)
tmp = (a * (t * -4.0)) + (-27.0 * (j * k));
elseif ((b * c) <= 4.8e-82)
tmp = ((x * i) * -4.0) - ((j * 27.0) * 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[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+132], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -7e-61], N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.8e-82], N[(N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -7 \cdot 10^{-61}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right) + -27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 4.8 \cdot 10^{-82}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4 - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -1.99999999999999998e132 or 4.80000000000000017e-82 < (*.f64 b c) Initial program 85.0%
Simplified86.9%
Taylor expanded in b around inf 62.4%
if -1.99999999999999998e132 < (*.f64 b c) < -7.0000000000000006e-61Initial program 88.7%
Simplified91.0%
Taylor expanded in a around inf 51.3%
metadata-eval51.3%
distribute-lft-neg-in51.3%
*-commutative51.3%
associate-*l*51.3%
distribute-lft-neg-in51.3%
distribute-lft-neg-in51.3%
metadata-eval51.3%
Simplified51.3%
Taylor expanded in j around 0 51.4%
if -7.0000000000000006e-61 < (*.f64 b c) < 4.80000000000000017e-82Initial program 81.0%
Taylor expanded in x around 0 81.0%
Taylor expanded in i around inf 55.5%
*-commutative55.5%
Simplified55.5%
Final simplification57.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ (* b c) t_1)))
(if (<= (* b c) -3.1e+127)
t_2
(if (<= (* b c) -5.9e-58)
(+ (* a (* t -4.0)) (* -27.0 (* j k)))
(if (<= (* b c) 1.15e-79) (+ t_1 (* (* x i) -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) + t_1;
double tmp;
if ((b * c) <= -3.1e+127) {
tmp = t_2;
} else if ((b * c) <= -5.9e-58) {
tmp = (a * (t * -4.0)) + (-27.0 * (j * k));
} else if ((b * c) <= 1.15e-79) {
tmp = t_1 + ((x * i) * -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) + t_1
if ((b * c) <= (-3.1d+127)) then
tmp = t_2
else if ((b * c) <= (-5.9d-58)) then
tmp = (a * (t * (-4.0d0))) + ((-27.0d0) * (j * k))
else if ((b * c) <= 1.15d-79) then
tmp = t_1 + ((x * i) * (-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) + t_1;
double tmp;
if ((b * c) <= -3.1e+127) {
tmp = t_2;
} else if ((b * c) <= -5.9e-58) {
tmp = (a * (t * -4.0)) + (-27.0 * (j * k));
} else if ((b * c) <= 1.15e-79) {
tmp = t_1 + ((x * i) * -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) + t_1 tmp = 0 if (b * c) <= -3.1e+127: tmp = t_2 elif (b * c) <= -5.9e-58: tmp = (a * (t * -4.0)) + (-27.0 * (j * k)) elif (b * c) <= 1.15e-79: tmp = t_1 + ((x * i) * -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(Float64(b * c) + t_1) tmp = 0.0 if (Float64(b * c) <= -3.1e+127) tmp = t_2; elseif (Float64(b * c) <= -5.9e-58) tmp = Float64(Float64(a * Float64(t * -4.0)) + Float64(-27.0 * Float64(j * k))); elseif (Float64(b * c) <= 1.15e-79) tmp = Float64(t_1 + Float64(Float64(x * i) * -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) + t_1;
tmp = 0.0;
if ((b * c) <= -3.1e+127)
tmp = t_2;
elseif ((b * c) <= -5.9e-58)
tmp = (a * (t * -4.0)) + (-27.0 * (j * k));
elseif ((b * c) <= 1.15e-79)
tmp = t_1 + ((x * i) * -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[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.1e+127], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -5.9e-58], N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.15e-79], N[(t$95$1 + N[(N[(x * i), $MachinePrecision] * -4.0), $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 c + t\_1\\
\mathbf{if}\;b \cdot c \leq -3.1 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -5.9 \cdot 10^{-58}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right) + -27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{-79}:\\
\;\;\;\;t\_1 + \left(x \cdot i\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -3.1000000000000002e127 or 1.15000000000000006e-79 < (*.f64 b c) Initial program 85.0%
Simplified86.9%
Taylor expanded in b around inf 62.4%
if -3.1000000000000002e127 < (*.f64 b c) < -5.9e-58Initial program 88.7%
Simplified91.0%
Taylor expanded in a around inf 51.3%
metadata-eval51.3%
distribute-lft-neg-in51.3%
*-commutative51.3%
associate-*l*51.3%
distribute-lft-neg-in51.3%
distribute-lft-neg-in51.3%
metadata-eval51.3%
Simplified51.3%
Taylor expanded in j around 0 51.4%
if -5.9e-58 < (*.f64 b c) < 1.15000000000000006e-79Initial program 81.0%
Simplified84.3%
Taylor expanded in i around inf 55.5%
Final simplification57.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)) (t_2 (* j (* k -27.0))))
(if (<= t_1 -1e+98)
(+ (* 18.0 (* (* y z) (* x t))) t_2)
(if (<= t_1 1e+191)
(- (* b c) (* 4.0 (+ (* x i) (* t a))))
(+ (* b c) 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 * 27.0) * k;
double t_2 = j * (k * -27.0);
double tmp;
if (t_1 <= -1e+98) {
tmp = (18.0 * ((y * z) * (x * t))) + t_2;
} else if (t_1 <= 1e+191) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = (b * c) + t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 * 27.0d0) * k
t_2 = j * (k * (-27.0d0))
if (t_1 <= (-1d+98)) then
tmp = (18.0d0 * ((y * z) * (x * t))) + t_2
else if (t_1 <= 1d+191) then
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
else
tmp = (b * c) + t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = j * (k * -27.0);
double tmp;
if (t_1 <= -1e+98) {
tmp = (18.0 * ((y * z) * (x * t))) + t_2;
} else if (t_1 <= 1e+191) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = (b * c) + t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = j * (k * -27.0) tmp = 0 if t_1 <= -1e+98: tmp = (18.0 * ((y * z) * (x * t))) + t_2 elif t_1 <= 1e+191: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) else: tmp = (b * c) + t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (t_1 <= -1e+98) tmp = Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) + t_2); elseif (t_1 <= 1e+191) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); else tmp = Float64(Float64(b * c) + t_2); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = j * (k * -27.0);
tmp = 0.0;
if (t_1 <= -1e+98)
tmp = (18.0 * ((y * z) * (x * t))) + t_2;
elseif (t_1 <= 1e+191)
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
else
tmp = (b * c) + t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+98], N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t$95$1, 1e+191], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+98}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+191}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.99999999999999998e97Initial program 79.2%
Simplified86.2%
Taylor expanded in y around inf 84.4%
associate-*r*84.2%
Simplified84.2%
if -9.99999999999999998e97 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000007e191Initial program 84.7%
Taylor expanded in x around 0 84.7%
Taylor expanded in y around 0 67.7%
distribute-lft-out67.7%
*-commutative67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in j around 0 66.3%
if 1.00000000000000007e191 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 87.9%
Simplified87.8%
Taylor expanded in b around inf 95.8%
Final simplification72.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -1e+98)
(- (* (* x i) -4.0) t_1)
(if (<= t_1 1e+191)
(- (* b c) (* 4.0 (+ (* x i) (* t a))))
(+ (* b c) (* j (* k -27.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -1e+98) {
tmp = ((x * i) * -4.0) - t_1;
} else if (t_1 <= 1e+191) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-1d+98)) then
tmp = ((x * i) * (-4.0d0)) - t_1
else if (t_1 <= 1d+191) then
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -1e+98) {
tmp = ((x * i) * -4.0) - t_1;
} else if (t_1 <= 1e+191) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -1e+98: tmp = ((x * i) * -4.0) - t_1 elif t_1 <= 1e+191: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -1e+98) tmp = Float64(Float64(Float64(x * i) * -4.0) - t_1); elseif (t_1 <= 1e+191) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -1e+98)
tmp = ((x * i) * -4.0) - t_1;
elseif (t_1 <= 1e+191)
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+98], N[(N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 1e+191], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+98}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4 - t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{+191}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.99999999999999998e97Initial program 79.2%
Taylor expanded in x around 0 79.2%
Taylor expanded in i around inf 79.7%
*-commutative79.7%
Simplified79.7%
if -9.99999999999999998e97 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000007e191Initial program 84.7%
Taylor expanded in x around 0 84.7%
Taylor expanded in y around 0 67.7%
distribute-lft-out67.7%
*-commutative67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in j around 0 66.3%
if 1.00000000000000007e191 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 87.9%
Simplified87.8%
Taylor expanded in b around inf 95.8%
Final simplification71.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 (<= t -4.3e+99) (not (<= t 1.1e+69)))
(- (* 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 ((t <= -4.3e+99) || !(t <= 1.1e+69)) {
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 ((t <= (-4.3d+99)) .or. (.not. (t <= 1.1d+69))) 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 ((t <= -4.3e+99) || !(t <= 1.1e+69)) {
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 (t <= -4.3e+99) or not (t <= 1.1e+69): 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 ((t <= -4.3e+99) || !(t <= 1.1e+69)) tmp = Float64(Float64(t * Float64(Float64(-18.0 * Float64(z * Float64(x * Float64(-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 ((t <= -4.3e+99) || ~((t <= 1.1e+69)))
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[t, -4.3e+99], N[Not[LessEqual[t, 1.1e+69]], $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}\;t \leq -4.3 \cdot 10^{+99} \lor \neg \left(t \leq 1.1 \cdot 10^{+69}\right):\\
\;\;\;\;t \cdot \left(-18 \cdot \left(z \cdot \left(x \cdot \left(-y\right)\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 t < -4.3000000000000001e99 or 1.1000000000000001e69 < t Initial program 80.4%
Taylor expanded in x around 0 80.4%
Taylor expanded in t around -inf 85.4%
associate-*r*85.4%
neg-mul-185.4%
cancel-sign-sub-inv85.4%
metadata-eval85.4%
*-commutative85.4%
associate-*r*85.3%
*-commutative85.3%
*-commutative85.3%
Simplified85.3%
if -4.3000000000000001e99 < t < 1.1000000000000001e69Initial program 86.2%
Taylor expanded in y around 0 79.1%
distribute-lft-out79.1%
*-commutative79.1%
Simplified79.1%
Final simplification81.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* 18.0 (* x (* y z))))))
(if (<= y -3.5e+116)
t_1
(if (<= y -1.9e+57)
(* b c)
(if (<= y -4.8e-111)
(* x (* i -4.0))
(if (<= y 2.75e-89) (* 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 = t * (18.0 * (x * (y * z)));
double tmp;
if (y <= -3.5e+116) {
tmp = t_1;
} else if (y <= -1.9e+57) {
tmp = b * c;
} else if (y <= -4.8e-111) {
tmp = x * (i * -4.0);
} else if (y <= 2.75e-89) {
tmp = j * (k * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * (18.0d0 * (x * (y * z)))
if (y <= (-3.5d+116)) then
tmp = t_1
else if (y <= (-1.9d+57)) then
tmp = b * c
else if (y <= (-4.8d-111)) then
tmp = x * (i * (-4.0d0))
else if (y <= 2.75d-89) then
tmp = j * (k * (-27.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (18.0 * (x * (y * z)));
double tmp;
if (y <= -3.5e+116) {
tmp = t_1;
} else if (y <= -1.9e+57) {
tmp = b * c;
} else if (y <= -4.8e-111) {
tmp = x * (i * -4.0);
} else if (y <= 2.75e-89) {
tmp = j * (k * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (18.0 * (x * (y * z))) tmp = 0 if y <= -3.5e+116: tmp = t_1 elif y <= -1.9e+57: tmp = b * c elif y <= -4.8e-111: tmp = x * (i * -4.0) elif y <= 2.75e-89: tmp = j * (k * -27.0) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(18.0 * Float64(x * Float64(y * z)))) tmp = 0.0 if (y <= -3.5e+116) tmp = t_1; elseif (y <= -1.9e+57) tmp = Float64(b * c); elseif (y <= -4.8e-111) tmp = Float64(x * Float64(i * -4.0)); elseif (y <= 2.75e-89) tmp = Float64(j * Float64(k * -27.0)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * (18.0 * (x * (y * z)));
tmp = 0.0;
if (y <= -3.5e+116)
tmp = t_1;
elseif (y <= -1.9e+57)
tmp = b * c;
elseif (y <= -4.8e-111)
tmp = x * (i * -4.0);
elseif (y <= 2.75e-89)
tmp = j * (k * -27.0);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e+116], t$95$1, If[LessEqual[y, -1.9e+57], N[(b * c), $MachinePrecision], If[LessEqual[y, -4.8e-111], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.75e-89], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{+57}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-111}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{-89}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.49999999999999997e116 or 2.75000000000000006e-89 < y Initial program 76.0%
Simplified78.0%
Taylor expanded in t around inf 55.5%
Taylor expanded in x around inf 43.6%
if -3.49999999999999997e116 < y < -1.8999999999999999e57Initial program 75.0%
Simplified79.8%
associate-*r*75.0%
distribute-rgt-out--75.1%
associate-+l-75.1%
associate-*l*75.0%
fmm-def75.0%
associate-*l*75.0%
*-commutative75.0%
Applied egg-rr75.0%
fmm-undef75.0%
*-commutative75.0%
Simplified75.0%
associate-*r*75.1%
fmm-def75.1%
Applied egg-rr75.1%
fmm-undef75.1%
*-commutative75.1%
associate-*r*75.1%
*-commutative75.1%
associate-*r*75.0%
Simplified75.0%
Taylor expanded in b around inf 36.7%
if -1.8999999999999999e57 < y < -4.8000000000000001e-111Initial program 92.8%
Simplified92.7%
associate-*r*92.7%
distribute-rgt-out--92.7%
associate-+l-92.7%
associate-*l*92.8%
fmm-def92.8%
associate-*l*92.7%
*-commutative92.7%
Applied egg-rr92.7%
fmm-undef92.7%
*-commutative92.7%
Simplified92.7%
associate-*r*89.3%
fmm-def89.3%
Applied egg-rr89.3%
fmm-undef89.3%
*-commutative89.3%
associate-*r*89.3%
*-commutative89.3%
associate-*r*89.3%
Simplified89.3%
Taylor expanded in i around inf 26.9%
*-commutative26.9%
*-commutative26.9%
metadata-eval26.9%
distribute-rgt-neg-in26.9%
associate-*r*26.9%
distribute-rgt-neg-in26.9%
distribute-rgt-neg-in26.9%
metadata-eval26.9%
Simplified26.9%
if -4.8000000000000001e-111 < y < 2.75000000000000006e-89Initial program 95.2%
Simplified97.6%
Taylor expanded in j around inf 29.5%
associate-*r*29.5%
Simplified29.5%
Taylor expanded in j around 0 29.5%
metadata-eval29.5%
distribute-lft-neg-in29.5%
*-commutative29.5%
associate-*r*29.5%
distribute-rgt-neg-in29.5%
distribute-rgt-neg-in29.5%
metadata-eval29.5%
*-commutative29.5%
Simplified29.5%
Final simplification36.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -1.9e-74)
t_1
(if (<= x 1.08e-131)
(+ (* a (* t -4.0)) (* -27.0 (* j k)))
(if (<= x 2.4e-25) (+ (* 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 <= -1.9e-74) {
tmp = t_1;
} else if (x <= 1.08e-131) {
tmp = (a * (t * -4.0)) + (-27.0 * (j * k));
} else if (x <= 2.4e-25) {
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 <= (-1.9d-74)) then
tmp = t_1
else if (x <= 1.08d-131) then
tmp = (a * (t * (-4.0d0))) + ((-27.0d0) * (j * k))
else if (x <= 2.4d-25) 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 <= -1.9e-74) {
tmp = t_1;
} else if (x <= 1.08e-131) {
tmp = (a * (t * -4.0)) + (-27.0 * (j * k));
} else if (x <= 2.4e-25) {
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 <= -1.9e-74: tmp = t_1 elif x <= 1.08e-131: tmp = (a * (t * -4.0)) + (-27.0 * (j * k)) elif x <= 2.4e-25: 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 <= -1.9e-74) tmp = t_1; elseif (x <= 1.08e-131) tmp = Float64(Float64(a * Float64(t * -4.0)) + Float64(-27.0 * Float64(j * k))); elseif (x <= 2.4e-25) 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 <= -1.9e-74)
tmp = t_1;
elseif (x <= 1.08e-131)
tmp = (a * (t * -4.0)) + (-27.0 * (j * k));
elseif (x <= 2.4e-25)
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, -1.9e-74], t$95$1, If[LessEqual[x, 1.08e-131], N[(N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e-25], 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 -1.9 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.08 \cdot 10^{-131}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right) + -27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-25}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.8999999999999998e-74 or 2.40000000000000009e-25 < x Initial program 78.5%
Simplified83.9%
Taylor expanded in x around inf 68.9%
if -1.8999999999999998e-74 < x < 1.07999999999999996e-131Initial program 92.7%
Simplified88.5%
Taylor expanded in a around inf 59.2%
metadata-eval59.2%
distribute-lft-neg-in59.2%
*-commutative59.2%
associate-*l*59.2%
distribute-lft-neg-in59.2%
distribute-lft-neg-in59.2%
metadata-eval59.2%
Simplified59.2%
Taylor expanded in j around 0 59.3%
if 1.07999999999999996e-131 < x < 2.40000000000000009e-25Initial program 88.0%
Simplified91.9%
Taylor expanded in b around inf 72.6%
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
(if (<= (* b c) -6.8e+161)
(* b c)
(if (<= (* b c) -1.55e-60)
(* a (* t -4.0))
(if (<= (* b c) 1.15e-79) (* x (* i -4.0)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -6.8e+161) {
tmp = b * c;
} else if ((b * c) <= -1.55e-60) {
tmp = a * (t * -4.0);
} else if ((b * c) <= 1.15e-79) {
tmp = x * (i * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-6.8d+161)) then
tmp = b * c
else if ((b * c) <= (-1.55d-60)) then
tmp = a * (t * (-4.0d0))
else if ((b * c) <= 1.15d-79) then
tmp = x * (i * (-4.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -6.8e+161) {
tmp = b * c;
} else if ((b * c) <= -1.55e-60) {
tmp = a * (t * -4.0);
} else if ((b * c) <= 1.15e-79) {
tmp = x * (i * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -6.8e+161: tmp = b * c elif (b * c) <= -1.55e-60: tmp = a * (t * -4.0) elif (b * c) <= 1.15e-79: tmp = x * (i * -4.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -6.8e+161) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.55e-60) tmp = Float64(a * Float64(t * -4.0)); elseif (Float64(b * c) <= 1.15e-79) tmp = Float64(x * Float64(i * -4.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -6.8e+161)
tmp = b * c;
elseif ((b * c) <= -1.55e-60)
tmp = a * (t * -4.0);
elseif ((b * c) <= 1.15e-79)
tmp = x * (i * -4.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -6.8e+161], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.55e-60], N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.15e-79], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -6.8 \cdot 10^{+161}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.55 \cdot 10^{-60}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{-79}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -6.79999999999999986e161 or 1.15000000000000006e-79 < (*.f64 b c) Initial program 84.3%
Simplified85.3%
associate-*r*87.0%
distribute-rgt-out--84.3%
associate-+l-84.3%
associate-*l*85.2%
fmm-def85.2%
associate-*l*84.2%
*-commutative84.2%
Applied egg-rr84.2%
fmm-undef84.2%
*-commutative84.2%
Simplified84.2%
associate-*r*85.2%
fmm-def86.2%
Applied egg-rr86.2%
fmm-undef85.2%
*-commutative85.2%
associate-*r*86.1%
*-commutative86.1%
associate-*r*86.1%
Simplified86.1%
Taylor expanded in b around inf 51.5%
if -6.79999999999999986e161 < (*.f64 b c) < -1.54999999999999994e-60Initial program 89.9%
Simplified91.9%
associate-*r*89.9%
distribute-rgt-out--89.9%
associate-+l-89.9%
associate-*l*87.7%
fmm-def87.7%
associate-*l*87.7%
*-commutative87.7%
Applied egg-rr87.7%
fmm-undef87.7%
*-commutative87.7%
Simplified87.7%
associate-*r*88.0%
fmm-def88.0%
Applied egg-rr88.0%
fmm-undef88.0%
*-commutative88.0%
associate-*r*88.0%
*-commutative88.0%
associate-*r*88.0%
Simplified88.0%
Taylor expanded in a around inf 30.4%
metadata-eval30.4%
*-commutative30.4%
distribute-lft-neg-in30.4%
associate-*r*30.4%
*-commutative30.4%
distribute-rgt-neg-in30.4%
distribute-lft-neg-in30.4%
metadata-eval30.4%
*-commutative30.4%
Simplified30.4%
if -1.54999999999999994e-60 < (*.f64 b c) < 1.15000000000000006e-79Initial program 81.0%
Simplified84.3%
associate-*r*85.1%
distribute-rgt-out--81.1%
associate-+l-81.1%
associate-*l*79.0%
fmm-def80.0%
associate-*l*80.0%
*-commutative80.0%
Applied egg-rr80.0%
fmm-undef79.0%
*-commutative79.0%
Simplified79.0%
associate-*r*82.9%
fmm-def83.9%
Applied egg-rr83.9%
fmm-undef82.9%
*-commutative82.9%
associate-*r*82.9%
*-commutative82.9%
associate-*r*82.9%
Simplified82.9%
Taylor expanded in i around inf 33.0%
*-commutative33.0%
*-commutative33.0%
metadata-eval33.0%
distribute-rgt-neg-in33.0%
associate-*r*33.0%
distribute-rgt-neg-in33.0%
distribute-rgt-neg-in33.0%
metadata-eval33.0%
Simplified33.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (or (<= (* b c) -6e+60) (not (<= (* b c) 1.15e-79)))
(+ (* b c) t_1)
(+ t_1 (* (* 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 t_1 = j * (k * -27.0);
double tmp;
if (((b * c) <= -6e+60) || !((b * c) <= 1.15e-79)) {
tmp = (b * c) + t_1;
} else {
tmp = t_1 + ((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) :: t_1
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
if (((b * c) <= (-6d+60)) .or. (.not. ((b * c) <= 1.15d-79))) then
tmp = (b * c) + t_1
else
tmp = t_1 + ((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 t_1 = j * (k * -27.0);
double tmp;
if (((b * c) <= -6e+60) || !((b * c) <= 1.15e-79)) {
tmp = (b * c) + t_1;
} else {
tmp = t_1 + ((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): t_1 = j * (k * -27.0) tmp = 0 if ((b * c) <= -6e+60) or not ((b * c) <= 1.15e-79): tmp = (b * c) + t_1 else: tmp = t_1 + ((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) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if ((Float64(b * c) <= -6e+60) || !(Float64(b * c) <= 1.15e-79)) tmp = Float64(Float64(b * c) + t_1); else tmp = Float64(t_1 + 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)
t_1 = j * (k * -27.0);
tmp = 0.0;
if (((b * c) <= -6e+60) || ~(((b * c) <= 1.15e-79)))
tmp = (b * c) + t_1;
else
tmp = t_1 + ((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_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(b * c), $MachinePrecision], -6e+60], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.15e-79]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -6 \cdot 10^{+60} \lor \neg \left(b \cdot c \leq 1.15 \cdot 10^{-79}\right):\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if (*.f64 b c) < -5.9999999999999997e60 or 1.15000000000000006e-79 < (*.f64 b c) Initial program 85.4%
Simplified87.1%
Taylor expanded in b around inf 58.4%
if -5.9999999999999997e60 < (*.f64 b c) < 1.15000000000000006e-79Initial program 82.9%
Simplified86.1%
Taylor expanded in i around inf 53.0%
Final simplification55.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -1.22e+76)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= x 9.8e-23)
(- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))
(* x (- (* -18.0 (* (* y t) (- 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 tmp;
if (x <= -1.22e+76) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= 9.8e-23) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = x * ((-18.0 * ((y * t) * -z)) - (4.0 * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-1.22d+76)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (x <= 9.8d-23) then
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
else
tmp = x * (((-18.0d0) * ((y * t) * -z)) - (4.0d0 * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.22e+76) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= 9.8e-23) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = x * ((-18.0 * ((y * t) * -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): tmp = 0 if x <= -1.22e+76: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif x <= 9.8e-23: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) else: tmp = x * ((-18.0 * ((y * t) * -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) tmp = 0.0 if (x <= -1.22e+76) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (x <= 9.8e-23) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(x * Float64(Float64(-18.0 * Float64(Float64(y * t) * Float64(-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)
tmp = 0.0;
if (x <= -1.22e+76)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif (x <= 9.8e-23)
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
else
tmp = x * ((-18.0 * ((y * t) * -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_] := If[LessEqual[x, -1.22e+76], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.8e-23], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-18.0 * N[(N[(y * t), $MachinePrecision] * (-z)), $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}
\mathbf{if}\;x \leq -1.22 \cdot 10^{+76}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{-23}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-18 \cdot \left(\left(y \cdot t\right) \cdot \left(-z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -1.22000000000000002e76Initial program 71.4%
Simplified78.0%
Taylor expanded in x around inf 80.4%
if -1.22000000000000002e76 < x < 9.7999999999999996e-23Initial program 92.2%
Taylor expanded in x around 0 72.8%
if 9.7999999999999996e-23 < x Initial program 75.4%
Simplified82.6%
associate-*r*79.7%
distribute-rgt-out--75.3%
associate-+l-75.3%
associate-*l*76.7%
fmm-def78.2%
associate-*l*78.1%
*-commutative78.1%
Applied egg-rr78.1%
fmm-undef76.7%
*-commutative76.7%
Simplified76.7%
associate-*r*76.8%
fmm-def76.8%
Applied egg-rr76.8%
fmm-undef76.8%
*-commutative76.8%
associate-*r*76.8%
*-commutative76.8%
associate-*r*76.8%
Simplified76.8%
Taylor expanded in x around -inf 71.5%
associate-*r*71.5%
neg-mul-171.5%
cancel-sign-sub-inv71.5%
associate-*r*73.6%
metadata-eval73.6%
*-commutative73.6%
Simplified73.6%
Final simplification74.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 (<= t -7.2e-65) (not (<= t 2.8e-76))) (* t (+ (* 18.0 (* z (* x y))) (* a -4.0))) (+ (* j (* k -27.0)) (* (* 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 ((t <= -7.2e-65) || !(t <= 2.8e-76)) {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
} else {
tmp = (j * (k * -27.0)) + ((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 ((t <= (-7.2d-65)) .or. (.not. (t <= 2.8d-76))) then
tmp = t * ((18.0d0 * (z * (x * y))) + (a * (-4.0d0)))
else
tmp = (j * (k * (-27.0d0))) + ((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 ((t <= -7.2e-65) || !(t <= 2.8e-76)) {
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
} else {
tmp = (j * (k * -27.0)) + ((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 (t <= -7.2e-65) or not (t <= 2.8e-76): tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0)) else: tmp = (j * (k * -27.0)) + ((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 ((t <= -7.2e-65) || !(t <= 2.8e-76)) tmp = Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) + Float64(a * -4.0))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + 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 ((t <= -7.2e-65) || ~((t <= 2.8e-76)))
tmp = t * ((18.0 * (z * (x * y))) + (a * -4.0));
else
tmp = (j * (k * -27.0)) + ((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[t, -7.2e-65], N[Not[LessEqual[t, 2.8e-76]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x * i), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{-65} \lor \neg \left(t \leq 2.8 \cdot 10^{-76}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + \left(x \cdot i\right) \cdot -4\\
\end{array}
\end{array}
if t < -7.1999999999999996e-65 or 2.8000000000000001e-76 < t Initial program 84.2%
Simplified86.6%
Taylor expanded in t around inf 63.9%
cancel-sign-sub-inv63.9%
associate-*r*65.1%
metadata-eval65.1%
Applied egg-rr65.1%
if -7.1999999999999996e-65 < t < 2.8000000000000001e-76Initial program 84.0%
Simplified85.7%
Taylor expanded in i around inf 58.8%
Final simplification62.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 (<= y -3.5e+118) (not (<= y 2.4e-34))) (* t (* 18.0 (* x (* y z)))) (+ (* b c) (* j (* k -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((y <= -3.5e+118) || !(y <= 2.4e-34)) {
tmp = t * (18.0 * (x * (y * z)));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((y <= (-3.5d+118)) .or. (.not. (y <= 2.4d-34))) then
tmp = t * (18.0d0 * (x * (y * z)))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((y <= -3.5e+118) || !(y <= 2.4e-34)) {
tmp = t * (18.0 * (x * (y * z)));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (y <= -3.5e+118) or not (y <= 2.4e-34): tmp = t * (18.0 * (x * (y * z))) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((y <= -3.5e+118) || !(y <= 2.4e-34)) tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z)))); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((y <= -3.5e+118) || ~((y <= 2.4e-34)))
tmp = t * (18.0 * (x * (y * z)));
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[y, -3.5e+118], N[Not[LessEqual[y, 2.4e-34]], $MachinePrecision]], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+118} \lor \neg \left(y \leq 2.4 \cdot 10^{-34}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if y < -3.50000000000000016e118 or 2.39999999999999991e-34 < y Initial program 75.7%
Simplified77.8%
Taylor expanded in t around inf 57.6%
Taylor expanded in x around inf 45.6%
if -3.50000000000000016e118 < y < 2.39999999999999991e-34Initial program 90.8%
Simplified92.9%
Taylor expanded in b around inf 53.3%
Final simplification49.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) -3.8e+193) (not (<= (* b c) 3.3e+90))) (* 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) <= -3.8e+193) || !((b * c) <= 3.3e+90)) {
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) <= (-3.8d+193)) .or. (.not. ((b * c) <= 3.3d+90))) 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) <= -3.8e+193) || !((b * c) <= 3.3e+90)) {
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) <= -3.8e+193) or not ((b * c) <= 3.3e+90): 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) <= -3.8e+193) || !(Float64(b * c) <= 3.3e+90)) 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) <= -3.8e+193) || ~(((b * c) <= 3.3e+90)))
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], -3.8e+193], N[Not[LessEqual[N[(b * c), $MachinePrecision], 3.3e+90]], $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 -3.8 \cdot 10^{+193} \lor \neg \left(b \cdot c \leq 3.3 \cdot 10^{+90}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -3.79999999999999972e193 or 3.30000000000000008e90 < (*.f64 b c) Initial program 84.3%
Simplified84.5%
associate-*r*86.7%
distribute-rgt-out--84.3%
associate-+l-84.3%
associate-*l*85.5%
fmm-def85.5%
associate-*l*84.3%
*-commutative84.3%
Applied egg-rr84.3%
fmm-undef84.3%
*-commutative84.3%
Simplified84.3%
associate-*r*84.4%
fmm-def85.6%
Applied egg-rr85.6%
fmm-undef84.4%
*-commutative84.4%
associate-*r*85.5%
*-commutative85.5%
associate-*r*85.5%
Simplified85.5%
Taylor expanded in b around inf 60.5%
if -3.79999999999999972e193 < (*.f64 b c) < 3.30000000000000008e90Initial program 84.0%
Simplified87.0%
Taylor expanded in j around inf 26.1%
Final simplification37.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.1%
Simplified86.2%
associate-*r*86.8%
distribute-rgt-out--84.1%
associate-+l-84.1%
associate-*l*83.3%
fmm-def83.7%
associate-*l*83.3%
*-commutative83.3%
Applied egg-rr83.3%
fmm-undef82.9%
*-commutative82.9%
Simplified82.9%
associate-*r*84.9%
fmm-def85.6%
Applied egg-rr85.6%
fmm-undef84.9%
*-commutative84.9%
associate-*r*85.2%
*-commutative85.2%
associate-*r*85.2%
Simplified85.2%
Taylor expanded in b around inf 24.5%
(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 2024150
(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)))