
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* t (* y z))) (* i 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (i * 4.0));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (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]) [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 * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(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])){:}
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 * (z * (y * (x * 18.0)))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 97.0%
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%
Simplified24.0%
Taylor expanded in x around inf 60.3%
Final simplification93.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (+ (fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i)))) (* j (* k -27.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))) end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)
\end{array}
Initial program 87.5%
Simplified92.3%
Final simplification92.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))) (t_2 (* t (* a -4.0))))
(if (<= (* b c) -1.1e+136)
(* b c)
(if (<= (* b c) -1.15e+84)
(* j (* k -27.0))
(if (<= (* b c) -2.75e-17)
(* b c)
(if (<= (* b c) -1.45e-75)
t_2
(if (<= (* b c) 1.06e-212)
t_1
(if (<= (* b c) 1.25e-9)
t_2
(if (<= (* b c) 3e+61)
t_1
(if (<= (* b c) 3e+151)
(* 18.0 (* t (* x (* y z))))
(* b c)))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = t * (a * -4.0);
double tmp;
if ((b * c) <= -1.1e+136) {
tmp = b * c;
} else if ((b * c) <= -1.15e+84) {
tmp = j * (k * -27.0);
} else if ((b * c) <= -2.75e-17) {
tmp = b * c;
} else if ((b * c) <= -1.45e-75) {
tmp = t_2;
} else if ((b * c) <= 1.06e-212) {
tmp = t_1;
} else if ((b * c) <= 1.25e-9) {
tmp = t_2;
} else if ((b * c) <= 3e+61) {
tmp = t_1;
} else if ((b * c) <= 3e+151) {
tmp = 18.0 * (t * (x * (y * z)));
} 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
t_2 = t * (a * (-4.0d0))
if ((b * c) <= (-1.1d+136)) then
tmp = b * c
else if ((b * c) <= (-1.15d+84)) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= (-2.75d-17)) then
tmp = b * c
else if ((b * c) <= (-1.45d-75)) then
tmp = t_2
else if ((b * c) <= 1.06d-212) then
tmp = t_1
else if ((b * c) <= 1.25d-9) then
tmp = t_2
else if ((b * c) <= 3d+61) then
tmp = t_1
else if ((b * c) <= 3d+151) then
tmp = 18.0d0 * (t * (x * (y * z)))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = t * (a * -4.0);
double tmp;
if ((b * c) <= -1.1e+136) {
tmp = b * c;
} else if ((b * c) <= -1.15e+84) {
tmp = j * (k * -27.0);
} else if ((b * c) <= -2.75e-17) {
tmp = b * c;
} else if ((b * c) <= -1.45e-75) {
tmp = t_2;
} else if ((b * c) <= 1.06e-212) {
tmp = t_1;
} else if ((b * c) <= 1.25e-9) {
tmp = t_2;
} else if ((b * c) <= 3e+61) {
tmp = t_1;
} else if ((b * c) <= 3e+151) {
tmp = 18.0 * (t * (x * (y * z)));
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) t_2 = t * (a * -4.0) tmp = 0 if (b * c) <= -1.1e+136: tmp = b * c elif (b * c) <= -1.15e+84: tmp = j * (k * -27.0) elif (b * c) <= -2.75e-17: tmp = b * c elif (b * c) <= -1.45e-75: tmp = t_2 elif (b * c) <= 1.06e-212: tmp = t_1 elif (b * c) <= 1.25e-9: tmp = t_2 elif (b * c) <= 3e+61: tmp = t_1 elif (b * c) <= 3e+151: tmp = 18.0 * (t * (x * (y * z))) 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) t_2 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (Float64(b * c) <= -1.1e+136) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.15e+84) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= -2.75e-17) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.45e-75) tmp = t_2; elseif (Float64(b * c) <= 1.06e-212) tmp = t_1; elseif (Float64(b * c) <= 1.25e-9) tmp = t_2; elseif (Float64(b * c) <= 3e+61) tmp = t_1; elseif (Float64(b * c) <= 3e+151) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
t_2 = t * (a * -4.0);
tmp = 0.0;
if ((b * c) <= -1.1e+136)
tmp = b * c;
elseif ((b * c) <= -1.15e+84)
tmp = j * (k * -27.0);
elseif ((b * c) <= -2.75e-17)
tmp = b * c;
elseif ((b * c) <= -1.45e-75)
tmp = t_2;
elseif ((b * c) <= 1.06e-212)
tmp = t_1;
elseif ((b * c) <= 1.25e-9)
tmp = t_2;
elseif ((b * c) <= 3e+61)
tmp = t_1;
elseif ((b * c) <= 3e+151)
tmp = 18.0 * (t * (x * (y * z)));
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.1e+136], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.15e+84], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.75e-17], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.45e-75], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.06e-212], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.25e-9], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 3e+61], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 3e+151], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -1.1 \cdot 10^{+136}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.15 \cdot 10^{+84}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq -2.75 \cdot 10^{-17}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.45 \cdot 10^{-75}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.06 \cdot 10^{-212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.25 \cdot 10^{-9}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{+151}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.1e136 or -1.1499999999999999e84 < (*.f64 b c) < -2.75e-17 or 2.9999999999999999e151 < (*.f64 b c) Initial program 84.7%
Simplified86.9%
associate-*r*86.7%
distribute-rgt-out--84.7%
cancel-sign-sub-inv84.7%
associate-*l*82.7%
fma-define82.7%
associate-*l*82.6%
Applied egg-rr82.6%
Taylor expanded in b around inf 57.9%
if -1.1e136 < (*.f64 b c) < -1.1499999999999999e84Initial program 85.7%
Simplified85.7%
Taylor expanded in j around inf 72.5%
*-commutative72.5%
associate-*r*72.7%
*-commutative72.7%
Simplified72.7%
if -2.75e-17 < (*.f64 b c) < -1.4500000000000001e-75 or 1.06000000000000004e-212 < (*.f64 b c) < 1.25e-9Initial program 87.7%
Simplified87.8%
associate-*r*90.1%
distribute-rgt-out--87.6%
cancel-sign-sub-inv87.6%
associate-*l*85.0%
fma-define85.0%
associate-*l*85.0%
Applied egg-rr85.0%
fma-undefine85.0%
*-commutative85.0%
distribute-rgt-neg-in85.0%
metadata-eval85.0%
Applied egg-rr85.0%
associate-*r*87.6%
*-commutative87.6%
*-commutative87.6%
distribute-rgt-out90.1%
Simplified90.1%
Taylor expanded in a around inf 46.0%
associate-*r*46.0%
*-commutative46.0%
Simplified46.0%
if -1.4500000000000001e-75 < (*.f64 b c) < 1.06000000000000004e-212 or 1.25e-9 < (*.f64 b c) < 3e61Initial program 89.8%
Simplified95.6%
Taylor expanded in j around inf 41.5%
if 3e61 < (*.f64 b c) < 2.9999999999999999e151Initial program 90.8%
Simplified95.5%
associate-*r*95.5%
distribute-rgt-out--90.9%
cancel-sign-sub-inv90.9%
associate-*l*90.9%
fma-define90.9%
associate-*l*90.9%
Applied egg-rr90.9%
fma-undefine90.9%
*-commutative90.9%
distribute-rgt-neg-in90.9%
metadata-eval90.9%
Applied egg-rr90.9%
associate-*r*90.9%
*-commutative90.9%
*-commutative90.9%
distribute-rgt-out95.5%
Simplified95.5%
Taylor expanded in y around inf 55.4%
Final simplification50.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* t a)))
(t_2 (+ t_1 (* -27.0 (* j k))))
(t_3 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_4 (- (* b c) (* 4.0 (* x i))))
(t_5 (* j (* k -27.0))))
(if (<= x -5e+212)
(+ t_5 (* x (* -4.0 i)))
(if (<= x -1.08e+83)
t_4
(if (<= x -8.8e+46)
t_3
(if (<= x -1.15e-46)
t_2
(if (<= x -5e-88)
(+ t_5 (* b c))
(if (<= x -4e-159)
t_2
(if (<= x 1e-231)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 8.8e-190)
t_3
(if (<= x 6.5e-176)
t_4
(if (<= x 250000.0)
(+ t_5 t_1)
(* x (- (* 18.0 (* t (* y z))) (* i 4.0)))))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = t_1 + (-27.0 * (j * k));
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_4 = (b * c) - (4.0 * (x * i));
double t_5 = j * (k * -27.0);
double tmp;
if (x <= -5e+212) {
tmp = t_5 + (x * (-4.0 * i));
} else if (x <= -1.08e+83) {
tmp = t_4;
} else if (x <= -8.8e+46) {
tmp = t_3;
} else if (x <= -1.15e-46) {
tmp = t_2;
} else if (x <= -5e-88) {
tmp = t_5 + (b * c);
} else if (x <= -4e-159) {
tmp = t_2;
} else if (x <= 1e-231) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 8.8e-190) {
tmp = t_3;
} else if (x <= 6.5e-176) {
tmp = t_4;
} else if (x <= 250000.0) {
tmp = t_5 + t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = (-4.0d0) * (t * a)
t_2 = t_1 + ((-27.0d0) * (j * k))
t_3 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_4 = (b * c) - (4.0d0 * (x * i))
t_5 = j * (k * (-27.0d0))
if (x <= (-5d+212)) then
tmp = t_5 + (x * ((-4.0d0) * i))
else if (x <= (-1.08d+83)) then
tmp = t_4
else if (x <= (-8.8d+46)) then
tmp = t_3
else if (x <= (-1.15d-46)) then
tmp = t_2
else if (x <= (-5d-88)) then
tmp = t_5 + (b * c)
else if (x <= (-4d-159)) then
tmp = t_2
else if (x <= 1d-231) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 8.8d-190) then
tmp = t_3
else if (x <= 6.5d-176) then
tmp = t_4
else if (x <= 250000.0d0) then
tmp = t_5 + t_1
else
tmp = x * ((18.0d0 * (t * (y * z))) - (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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = t_1 + (-27.0 * (j * k));
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_4 = (b * c) - (4.0 * (x * i));
double t_5 = j * (k * -27.0);
double tmp;
if (x <= -5e+212) {
tmp = t_5 + (x * (-4.0 * i));
} else if (x <= -1.08e+83) {
tmp = t_4;
} else if (x <= -8.8e+46) {
tmp = t_3;
} else if (x <= -1.15e-46) {
tmp = t_2;
} else if (x <= -5e-88) {
tmp = t_5 + (b * c);
} else if (x <= -4e-159) {
tmp = t_2;
} else if (x <= 1e-231) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 8.8e-190) {
tmp = t_3;
} else if (x <= 6.5e-176) {
tmp = t_4;
} else if (x <= 250000.0) {
tmp = t_5 + t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (t * a) t_2 = t_1 + (-27.0 * (j * k)) t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) t_4 = (b * c) - (4.0 * (x * i)) t_5 = j * (k * -27.0) tmp = 0 if x <= -5e+212: tmp = t_5 + (x * (-4.0 * i)) elif x <= -1.08e+83: tmp = t_4 elif x <= -8.8e+46: tmp = t_3 elif x <= -1.15e-46: tmp = t_2 elif x <= -5e-88: tmp = t_5 + (b * c) elif x <= -4e-159: tmp = t_2 elif x <= 1e-231: tmp = (b * c) - (27.0 * (j * k)) elif x <= 8.8e-190: tmp = t_3 elif x <= 6.5e-176: tmp = t_4 elif x <= 250000.0: tmp = t_5 + t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) t_2 = Float64(t_1 + Float64(-27.0 * Float64(j * k))) t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) t_4 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) t_5 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (x <= -5e+212) tmp = Float64(t_5 + Float64(x * Float64(-4.0 * i))); elseif (x <= -1.08e+83) tmp = t_4; elseif (x <= -8.8e+46) tmp = t_3; elseif (x <= -1.15e-46) tmp = t_2; elseif (x <= -5e-88) tmp = Float64(t_5 + Float64(b * c)); elseif (x <= -4e-159) tmp = t_2; elseif (x <= 1e-231) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 8.8e-190) tmp = t_3; elseif (x <= 6.5e-176) tmp = t_4; elseif (x <= 250000.0) tmp = Float64(t_5 + t_1); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (t * a);
t_2 = t_1 + (-27.0 * (j * k));
t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
t_4 = (b * c) - (4.0 * (x * i));
t_5 = j * (k * -27.0);
tmp = 0.0;
if (x <= -5e+212)
tmp = t_5 + (x * (-4.0 * i));
elseif (x <= -1.08e+83)
tmp = t_4;
elseif (x <= -8.8e+46)
tmp = t_3;
elseif (x <= -1.15e-46)
tmp = t_2;
elseif (x <= -5e-88)
tmp = t_5 + (b * c);
elseif (x <= -4e-159)
tmp = t_2;
elseif (x <= 1e-231)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 8.8e-190)
tmp = t_3;
elseif (x <= 6.5e-176)
tmp = t_4;
elseif (x <= 250000.0)
tmp = t_5 + t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e+212], N[(t$95$5 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.08e+83], t$95$4, If[LessEqual[x, -8.8e+46], t$95$3, If[LessEqual[x, -1.15e-46], t$95$2, If[LessEqual[x, -5e-88], N[(t$95$5 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4e-159], t$95$2, If[LessEqual[x, 1e-231], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.8e-190], t$95$3, If[LessEqual[x, 6.5e-176], t$95$4, If[LessEqual[x, 250000.0], N[(t$95$5 + t$95$1), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := t\_1 + -27 \cdot \left(j \cdot k\right)\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_4 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_5 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -5 \cdot 10^{+212}:\\
\;\;\;\;t\_5 + x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;x \leq -1.08 \cdot 10^{+83}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x \leq -8.8 \cdot 10^{+46}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -1.15 \cdot 10^{-46}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-88}:\\
\;\;\;\;t\_5 + b \cdot c\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-159}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 10^{-231}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{-190}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-176}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x \leq 250000:\\
\;\;\;\;t\_5 + t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -4.99999999999999992e212Initial program 56.6%
Simplified69.0%
Taylor expanded in i around inf 87.3%
associate-*r*87.3%
*-commutative87.3%
Simplified87.3%
if -4.99999999999999992e212 < x < -1.08e83 or 8.80000000000000017e-190 < x < 6.5e-176Initial program 86.9%
Taylor expanded in t around 0 79.0%
Taylor expanded in j around 0 67.7%
if -1.08e83 < x < -8.8000000000000001e46 or 9.9999999999999999e-232 < x < 8.80000000000000017e-190Initial program 85.6%
Simplified92.5%
Taylor expanded in t around inf 72.4%
if -8.8000000000000001e46 < x < -1.15e-46 or -5.00000000000000009e-88 < x < -3.99999999999999995e-159Initial program 88.4%
Simplified91.3%
Taylor expanded in a around inf 60.8%
Taylor expanded in a around 0 60.9%
if -1.15e-46 < x < -5.00000000000000009e-88Initial program 88.7%
Simplified100.0%
Taylor expanded in b around inf 67.2%
if -3.99999999999999995e-159 < x < 9.9999999999999999e-232Initial program 95.8%
Taylor expanded in t around 0 78.8%
Taylor expanded in i around 0 77.0%
if 6.5e-176 < x < 2.5e5Initial program 97.1%
Simplified94.6%
Taylor expanded in a around inf 69.2%
if 2.5e5 < x Initial program 84.0%
Simplified89.3%
Taylor expanded in x around inf 78.8%
Final simplification73.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* t a)))
(t_2 (* x (* y z)))
(t_3 (- (* b c) (* 4.0 (* x i))))
(t_4 (* j (* k -27.0))))
(if (<= x -2.4e+215)
(+ t_4 (* x (* -4.0 i)))
(if (<= x -3.5e+84)
t_3
(if (<= x -2.7e-44)
(+ t_4 (* 18.0 (* t t_2)))
(if (<= x -2.8e-89)
(+ t_4 (* b c))
(if (<= x -2.05e-160)
(+ t_1 (* -27.0 (* j k)))
(if (<= x 1.16e-231)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 6.8e-189)
(* t (- (* 18.0 t_2) (* a 4.0)))
(if (<= x 4.8e-184)
t_3
(if (<= x 1120000.0)
(+ t_4 t_1)
(* x (- (* 18.0 (* t (* y z))) (* i 4.0))))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = x * (y * z);
double t_3 = (b * c) - (4.0 * (x * i));
double t_4 = j * (k * -27.0);
double tmp;
if (x <= -2.4e+215) {
tmp = t_4 + (x * (-4.0 * i));
} else if (x <= -3.5e+84) {
tmp = t_3;
} else if (x <= -2.7e-44) {
tmp = t_4 + (18.0 * (t * t_2));
} else if (x <= -2.8e-89) {
tmp = t_4 + (b * c);
} else if (x <= -2.05e-160) {
tmp = t_1 + (-27.0 * (j * k));
} else if (x <= 1.16e-231) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 6.8e-189) {
tmp = t * ((18.0 * t_2) - (a * 4.0));
} else if (x <= 4.8e-184) {
tmp = t_3;
} else if (x <= 1120000.0) {
tmp = t_4 + t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (-4.0d0) * (t * a)
t_2 = x * (y * z)
t_3 = (b * c) - (4.0d0 * (x * i))
t_4 = j * (k * (-27.0d0))
if (x <= (-2.4d+215)) then
tmp = t_4 + (x * ((-4.0d0) * i))
else if (x <= (-3.5d+84)) then
tmp = t_3
else if (x <= (-2.7d-44)) then
tmp = t_4 + (18.0d0 * (t * t_2))
else if (x <= (-2.8d-89)) then
tmp = t_4 + (b * c)
else if (x <= (-2.05d-160)) then
tmp = t_1 + ((-27.0d0) * (j * k))
else if (x <= 1.16d-231) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 6.8d-189) then
tmp = t * ((18.0d0 * t_2) - (a * 4.0d0))
else if (x <= 4.8d-184) then
tmp = t_3
else if (x <= 1120000.0d0) then
tmp = t_4 + t_1
else
tmp = x * ((18.0d0 * (t * (y * z))) - (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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = x * (y * z);
double t_3 = (b * c) - (4.0 * (x * i));
double t_4 = j * (k * -27.0);
double tmp;
if (x <= -2.4e+215) {
tmp = t_4 + (x * (-4.0 * i));
} else if (x <= -3.5e+84) {
tmp = t_3;
} else if (x <= -2.7e-44) {
tmp = t_4 + (18.0 * (t * t_2));
} else if (x <= -2.8e-89) {
tmp = t_4 + (b * c);
} else if (x <= -2.05e-160) {
tmp = t_1 + (-27.0 * (j * k));
} else if (x <= 1.16e-231) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 6.8e-189) {
tmp = t * ((18.0 * t_2) - (a * 4.0));
} else if (x <= 4.8e-184) {
tmp = t_3;
} else if (x <= 1120000.0) {
tmp = t_4 + t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (t * a) t_2 = x * (y * z) t_3 = (b * c) - (4.0 * (x * i)) t_4 = j * (k * -27.0) tmp = 0 if x <= -2.4e+215: tmp = t_4 + (x * (-4.0 * i)) elif x <= -3.5e+84: tmp = t_3 elif x <= -2.7e-44: tmp = t_4 + (18.0 * (t * t_2)) elif x <= -2.8e-89: tmp = t_4 + (b * c) elif x <= -2.05e-160: tmp = t_1 + (-27.0 * (j * k)) elif x <= 1.16e-231: tmp = (b * c) - (27.0 * (j * k)) elif x <= 6.8e-189: tmp = t * ((18.0 * t_2) - (a * 4.0)) elif x <= 4.8e-184: tmp = t_3 elif x <= 1120000.0: tmp = t_4 + t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) t_2 = Float64(x * Float64(y * z)) t_3 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) t_4 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (x <= -2.4e+215) tmp = Float64(t_4 + Float64(x * Float64(-4.0 * i))); elseif (x <= -3.5e+84) tmp = t_3; elseif (x <= -2.7e-44) tmp = Float64(t_4 + Float64(18.0 * Float64(t * t_2))); elseif (x <= -2.8e-89) tmp = Float64(t_4 + Float64(b * c)); elseif (x <= -2.05e-160) tmp = Float64(t_1 + Float64(-27.0 * Float64(j * k))); elseif (x <= 1.16e-231) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 6.8e-189) tmp = Float64(t * Float64(Float64(18.0 * t_2) - Float64(a * 4.0))); elseif (x <= 4.8e-184) tmp = t_3; elseif (x <= 1120000.0) tmp = Float64(t_4 + t_1); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (t * a);
t_2 = x * (y * z);
t_3 = (b * c) - (4.0 * (x * i));
t_4 = j * (k * -27.0);
tmp = 0.0;
if (x <= -2.4e+215)
tmp = t_4 + (x * (-4.0 * i));
elseif (x <= -3.5e+84)
tmp = t_3;
elseif (x <= -2.7e-44)
tmp = t_4 + (18.0 * (t * t_2));
elseif (x <= -2.8e-89)
tmp = t_4 + (b * c);
elseif (x <= -2.05e-160)
tmp = t_1 + (-27.0 * (j * k));
elseif (x <= 1.16e-231)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 6.8e-189)
tmp = t * ((18.0 * t_2) - (a * 4.0));
elseif (x <= 4.8e-184)
tmp = t_3;
elseif (x <= 1120000.0)
tmp = t_4 + t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.4e+215], N[(t$95$4 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.5e+84], t$95$3, If[LessEqual[x, -2.7e-44], N[(t$95$4 + N[(18.0 * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.8e-89], N[(t$95$4 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.05e-160], N[(t$95$1 + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.16e-231], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.8e-189], N[(t * N[(N[(18.0 * t$95$2), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e-184], t$95$3, If[LessEqual[x, 1120000.0], N[(t$95$4 + t$95$1), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := x \cdot \left(y \cdot z\right)\\
t_3 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_4 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -2.4 \cdot 10^{+215}:\\
\;\;\;\;t\_4 + x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{+84}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-44}:\\
\;\;\;\;t\_4 + 18 \cdot \left(t \cdot t\_2\right)\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-89}:\\
\;\;\;\;t\_4 + b \cdot c\\
\mathbf{elif}\;x \leq -2.05 \cdot 10^{-160}:\\
\;\;\;\;t\_1 + -27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 1.16 \cdot 10^{-231}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-189}:\\
\;\;\;\;t \cdot \left(18 \cdot t\_2 - a \cdot 4\right)\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-184}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 1120000:\\
\;\;\;\;t\_4 + t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -2.4000000000000001e215Initial program 56.6%
Simplified69.0%
Taylor expanded in i around inf 87.3%
associate-*r*87.3%
*-commutative87.3%
Simplified87.3%
if -2.4000000000000001e215 < x < -3.4999999999999999e84 or 6.8000000000000002e-189 < x < 4.80000000000000049e-184Initial program 86.9%
Taylor expanded in t around 0 79.0%
Taylor expanded in j around 0 67.7%
if -3.4999999999999999e84 < x < -2.6999999999999999e-44Initial program 76.0%
Simplified85.3%
Taylor expanded in y around inf 65.8%
*-commutative65.8%
Simplified65.8%
if -2.6999999999999999e-44 < x < -2.7999999999999999e-89Initial program 89.8%
Simplified100.0%
Taylor expanded in b around inf 60.9%
if -2.7999999999999999e-89 < x < -2.05000000000000001e-160Initial program 94.3%
Simplified94.4%
Taylor expanded in a around inf 67.3%
Taylor expanded in a around 0 67.4%
if -2.05000000000000001e-160 < x < 1.16e-231Initial program 95.8%
Taylor expanded in t around 0 78.8%
Taylor expanded in i around 0 77.0%
if 1.16e-231 < x < 6.8000000000000002e-189Initial program 100.0%
Simplified99.8%
Taylor expanded in t around inf 78.1%
if 4.80000000000000049e-184 < x < 1.12e6Initial program 97.1%
Simplified94.6%
Taylor expanded in a around inf 69.2%
if 1.12e6 < x Initial program 84.0%
Simplified89.3%
Taylor expanded in x around inf 78.8%
Final simplification74.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ (* -4.0 (* t a)) (* -27.0 (* j k))))
(t_3 (- (* b c) (* 4.0 (* x i))))
(t_4 (+ t_1 (* x (* -4.0 i)))))
(if (<= (* b c) -6.2e+83)
(+ t_1 (* b c))
(if (<= (* b c) -4.4e-19)
t_3
(if (<= (* b c) -2e-205)
t_2
(if (<= (* b c) 8.2e-283)
t_4
(if (<= (* b c) 8e-10)
t_2
(if (<= (* b c) 5.5e+104)
t_4
(if (<= (* b c) 1.1e+151)
(* 18.0 (* t (* x (* y z))))
t_3)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (-4.0 * (t * a)) + (-27.0 * (j * k));
double t_3 = (b * c) - (4.0 * (x * i));
double t_4 = t_1 + (x * (-4.0 * i));
double tmp;
if ((b * c) <= -6.2e+83) {
tmp = t_1 + (b * c);
} else if ((b * c) <= -4.4e-19) {
tmp = t_3;
} else if ((b * c) <= -2e-205) {
tmp = t_2;
} else if ((b * c) <= 8.2e-283) {
tmp = t_4;
} else if ((b * c) <= 8e-10) {
tmp = t_2;
} else if ((b * c) <= 5.5e+104) {
tmp = t_4;
} else if ((b * c) <= 1.1e+151) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = ((-4.0d0) * (t * a)) + ((-27.0d0) * (j * k))
t_3 = (b * c) - (4.0d0 * (x * i))
t_4 = t_1 + (x * ((-4.0d0) * i))
if ((b * c) <= (-6.2d+83)) then
tmp = t_1 + (b * c)
else if ((b * c) <= (-4.4d-19)) then
tmp = t_3
else if ((b * c) <= (-2d-205)) then
tmp = t_2
else if ((b * c) <= 8.2d-283) then
tmp = t_4
else if ((b * c) <= 8d-10) then
tmp = t_2
else if ((b * c) <= 5.5d+104) then
tmp = t_4
else if ((b * c) <= 1.1d+151) then
tmp = 18.0d0 * (t * (x * (y * z)))
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (-4.0 * (t * a)) + (-27.0 * (j * k));
double t_3 = (b * c) - (4.0 * (x * i));
double t_4 = t_1 + (x * (-4.0 * i));
double tmp;
if ((b * c) <= -6.2e+83) {
tmp = t_1 + (b * c);
} else if ((b * c) <= -4.4e-19) {
tmp = t_3;
} else if ((b * c) <= -2e-205) {
tmp = t_2;
} else if ((b * c) <= 8.2e-283) {
tmp = t_4;
} else if ((b * c) <= 8e-10) {
tmp = t_2;
} else if ((b * c) <= 5.5e+104) {
tmp = t_4;
} else if ((b * c) <= 1.1e+151) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (-4.0 * (t * a)) + (-27.0 * (j * k)) t_3 = (b * c) - (4.0 * (x * i)) t_4 = t_1 + (x * (-4.0 * i)) tmp = 0 if (b * c) <= -6.2e+83: tmp = t_1 + (b * c) elif (b * c) <= -4.4e-19: tmp = t_3 elif (b * c) <= -2e-205: tmp = t_2 elif (b * c) <= 8.2e-283: tmp = t_4 elif (b * c) <= 8e-10: tmp = t_2 elif (b * c) <= 5.5e+104: tmp = t_4 elif (b * c) <= 1.1e+151: tmp = 18.0 * (t * (x * (y * z))) else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(-4.0 * Float64(t * a)) + Float64(-27.0 * Float64(j * k))) t_3 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) t_4 = Float64(t_1 + Float64(x * Float64(-4.0 * i))) tmp = 0.0 if (Float64(b * c) <= -6.2e+83) tmp = Float64(t_1 + Float64(b * c)); elseif (Float64(b * c) <= -4.4e-19) tmp = t_3; elseif (Float64(b * c) <= -2e-205) tmp = t_2; elseif (Float64(b * c) <= 8.2e-283) tmp = t_4; elseif (Float64(b * c) <= 8e-10) tmp = t_2; elseif (Float64(b * c) <= 5.5e+104) tmp = t_4; elseif (Float64(b * c) <= 1.1e+151) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (-4.0 * (t * a)) + (-27.0 * (j * k));
t_3 = (b * c) - (4.0 * (x * i));
t_4 = t_1 + (x * (-4.0 * i));
tmp = 0.0;
if ((b * c) <= -6.2e+83)
tmp = t_1 + (b * c);
elseif ((b * c) <= -4.4e-19)
tmp = t_3;
elseif ((b * c) <= -2e-205)
tmp = t_2;
elseif ((b * c) <= 8.2e-283)
tmp = t_4;
elseif ((b * c) <= 8e-10)
tmp = t_2;
elseif ((b * c) <= 5.5e+104)
tmp = t_4;
elseif ((b * c) <= 1.1e+151)
tmp = 18.0 * (t * (x * (y * z)));
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.2e+83], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -4.4e-19], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], -2e-205], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 8.2e-283], t$95$4, If[LessEqual[N[(b * c), $MachinePrecision], 8e-10], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 5.5e+104], t$95$4, If[LessEqual[N[(b * c), $MachinePrecision], 1.1e+151], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := -4 \cdot \left(t \cdot a\right) + -27 \cdot \left(j \cdot k\right)\\
t_3 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_4 := t\_1 + x \cdot \left(-4 \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+83}:\\
\;\;\;\;t\_1 + b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -4.4 \cdot 10^{-19}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-205}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{-283}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{-10}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 5.5 \cdot 10^{+104}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;b \cdot c \leq 1.1 \cdot 10^{+151}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 b c) < -6.19999999999999984e83Initial program 77.9%
Simplified86.0%
Taylor expanded in b around inf 65.4%
if -6.19999999999999984e83 < (*.f64 b c) < -4.3999999999999997e-19 or 1.10000000000000003e151 < (*.f64 b c) Initial program 91.0%
Taylor expanded in t around 0 77.2%
Taylor expanded in j around 0 75.2%
if -4.3999999999999997e-19 < (*.f64 b c) < -2e-205 or 8.19999999999999973e-283 < (*.f64 b c) < 8.00000000000000029e-10Initial program 89.0%
Simplified93.3%
Taylor expanded in a around inf 60.9%
Taylor expanded in a around 0 60.9%
if -2e-205 < (*.f64 b c) < 8.19999999999999973e-283 or 8.00000000000000029e-10 < (*.f64 b c) < 5.50000000000000017e104Initial program 89.6%
Simplified94.2%
Taylor expanded in i around inf 63.3%
associate-*r*63.3%
*-commutative63.3%
Simplified63.3%
if 5.50000000000000017e104 < (*.f64 b c) < 1.10000000000000003e151Initial program 90.8%
Simplified100.0%
associate-*r*100.0%
distribute-rgt-out--90.9%
cancel-sign-sub-inv90.9%
associate-*l*90.9%
fma-define90.9%
associate-*l*90.9%
Applied egg-rr90.9%
fma-undefine90.9%
*-commutative90.9%
distribute-rgt-neg-in90.9%
metadata-eval90.9%
Applied egg-rr90.9%
associate-*r*90.9%
*-commutative90.9%
*-commutative90.9%
distribute-rgt-out100.0%
Simplified100.0%
Taylor expanded in y around inf 55.4%
Final simplification65.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ (* -4.0 (* t a)) (* -27.0 (* j k))))
(t_3 (- (* b c) (* 4.0 (* x i)))))
(if (<= (* b c) -5.2e+83)
(+ t_1 (* b c))
(if (<= (* b c) -1.22e-17)
t_3
(if (<= (* b c) -1.5e-205)
t_2
(if (<= (* b c) 8e-283)
(+ t_1 (* x (* -4.0 i)))
(if (<= (* b c) 9e-10)
t_2
(if (<= (* b c) 1.3e+151)
(* j (+ (* k -27.0) (* -4.0 (/ (* x i) j))))
t_3))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (-4.0 * (t * a)) + (-27.0 * (j * k));
double t_3 = (b * c) - (4.0 * (x * i));
double tmp;
if ((b * c) <= -5.2e+83) {
tmp = t_1 + (b * c);
} else if ((b * c) <= -1.22e-17) {
tmp = t_3;
} else if ((b * c) <= -1.5e-205) {
tmp = t_2;
} else if ((b * c) <= 8e-283) {
tmp = t_1 + (x * (-4.0 * i));
} else if ((b * c) <= 9e-10) {
tmp = t_2;
} else if ((b * c) <= 1.3e+151) {
tmp = j * ((k * -27.0) + (-4.0 * ((x * i) / j)));
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = ((-4.0d0) * (t * a)) + ((-27.0d0) * (j * k))
t_3 = (b * c) - (4.0d0 * (x * i))
if ((b * c) <= (-5.2d+83)) then
tmp = t_1 + (b * c)
else if ((b * c) <= (-1.22d-17)) then
tmp = t_3
else if ((b * c) <= (-1.5d-205)) then
tmp = t_2
else if ((b * c) <= 8d-283) then
tmp = t_1 + (x * ((-4.0d0) * i))
else if ((b * c) <= 9d-10) then
tmp = t_2
else if ((b * c) <= 1.3d+151) then
tmp = j * ((k * (-27.0d0)) + ((-4.0d0) * ((x * i) / j)))
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (-4.0 * (t * a)) + (-27.0 * (j * k));
double t_3 = (b * c) - (4.0 * (x * i));
double tmp;
if ((b * c) <= -5.2e+83) {
tmp = t_1 + (b * c);
} else if ((b * c) <= -1.22e-17) {
tmp = t_3;
} else if ((b * c) <= -1.5e-205) {
tmp = t_2;
} else if ((b * c) <= 8e-283) {
tmp = t_1 + (x * (-4.0 * i));
} else if ((b * c) <= 9e-10) {
tmp = t_2;
} else if ((b * c) <= 1.3e+151) {
tmp = j * ((k * -27.0) + (-4.0 * ((x * i) / j)));
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (-4.0 * (t * a)) + (-27.0 * (j * k)) t_3 = (b * c) - (4.0 * (x * i)) tmp = 0 if (b * c) <= -5.2e+83: tmp = t_1 + (b * c) elif (b * c) <= -1.22e-17: tmp = t_3 elif (b * c) <= -1.5e-205: tmp = t_2 elif (b * c) <= 8e-283: tmp = t_1 + (x * (-4.0 * i)) elif (b * c) <= 9e-10: tmp = t_2 elif (b * c) <= 1.3e+151: tmp = j * ((k * -27.0) + (-4.0 * ((x * i) / j))) else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(-4.0 * Float64(t * a)) + Float64(-27.0 * Float64(j * k))) t_3 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (Float64(b * c) <= -5.2e+83) tmp = Float64(t_1 + Float64(b * c)); elseif (Float64(b * c) <= -1.22e-17) tmp = t_3; elseif (Float64(b * c) <= -1.5e-205) tmp = t_2; elseif (Float64(b * c) <= 8e-283) tmp = Float64(t_1 + Float64(x * Float64(-4.0 * i))); elseif (Float64(b * c) <= 9e-10) tmp = t_2; elseif (Float64(b * c) <= 1.3e+151) tmp = Float64(j * Float64(Float64(k * -27.0) + Float64(-4.0 * Float64(Float64(x * i) / j)))); else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = (-4.0 * (t * a)) + (-27.0 * (j * k));
t_3 = (b * c) - (4.0 * (x * i));
tmp = 0.0;
if ((b * c) <= -5.2e+83)
tmp = t_1 + (b * c);
elseif ((b * c) <= -1.22e-17)
tmp = t_3;
elseif ((b * c) <= -1.5e-205)
tmp = t_2;
elseif ((b * c) <= 8e-283)
tmp = t_1 + (x * (-4.0 * i));
elseif ((b * c) <= 9e-10)
tmp = t_2;
elseif ((b * c) <= 1.3e+151)
tmp = j * ((k * -27.0) + (-4.0 * ((x * i) / j)));
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5.2e+83], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.22e-17], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], -1.5e-205], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 8e-283], N[(t$95$1 + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9e-10], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.3e+151], N[(j * N[(N[(k * -27.0), $MachinePrecision] + N[(-4.0 * N[(N[(x * i), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := -4 \cdot \left(t \cdot a\right) + -27 \cdot \left(j \cdot k\right)\\
t_3 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -5.2 \cdot 10^{+83}:\\
\;\;\;\;t\_1 + b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.22 \cdot 10^{-17}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \cdot c \leq -1.5 \cdot 10^{-205}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{-283}:\\
\;\;\;\;t\_1 + x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{-10}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.3 \cdot 10^{+151}:\\
\;\;\;\;j \cdot \left(k \cdot -27 + -4 \cdot \frac{x \cdot i}{j}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 b c) < -5.2000000000000002e83Initial program 77.9%
Simplified86.0%
Taylor expanded in b around inf 65.4%
if -5.2000000000000002e83 < (*.f64 b c) < -1.22e-17 or 1.30000000000000007e151 < (*.f64 b c) Initial program 91.0%
Taylor expanded in t around 0 77.2%
Taylor expanded in j around 0 75.2%
if -1.22e-17 < (*.f64 b c) < -1.5e-205 or 7.99999999999999957e-283 < (*.f64 b c) < 8.9999999999999999e-10Initial program 89.0%
Simplified93.3%
Taylor expanded in a around inf 60.9%
Taylor expanded in a around 0 60.9%
if -1.5e-205 < (*.f64 b c) < 7.99999999999999957e-283Initial program 88.7%
Simplified93.4%
Taylor expanded in i around inf 62.1%
associate-*r*62.1%
*-commutative62.1%
Simplified62.1%
if 8.9999999999999999e-10 < (*.f64 b c) < 1.30000000000000007e151Initial program 91.1%
Simplified97.0%
Taylor expanded in i around inf 54.4%
associate-*r*54.4%
*-commutative54.4%
Simplified54.4%
Taylor expanded in j around inf 51.6%
Final simplification63.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))) (t_2 (* t (* a -4.0))))
(if (<= (* b c) -1e+136)
(* b c)
(if (<= (* b c) -6e+85)
(* j (* k -27.0))
(if (<= (* b c) -2.5e-17)
(* b c)
(if (<= (* b c) -6e-69)
t_2
(if (<= (* b c) 1.7e-211)
t_1
(if (<= (* b c) 8.2e-10)
t_2
(if (<= (* b c) 1.75e+150) t_1 (* b c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = t * (a * -4.0);
double tmp;
if ((b * c) <= -1e+136) {
tmp = b * c;
} else if ((b * c) <= -6e+85) {
tmp = j * (k * -27.0);
} else if ((b * c) <= -2.5e-17) {
tmp = b * c;
} else if ((b * c) <= -6e-69) {
tmp = t_2;
} else if ((b * c) <= 1.7e-211) {
tmp = t_1;
} else if ((b * c) <= 8.2e-10) {
tmp = t_2;
} else if ((b * c) <= 1.75e+150) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
t_2 = t * (a * (-4.0d0))
if ((b * c) <= (-1d+136)) then
tmp = b * c
else if ((b * c) <= (-6d+85)) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= (-2.5d-17)) then
tmp = b * c
else if ((b * c) <= (-6d-69)) then
tmp = t_2
else if ((b * c) <= 1.7d-211) then
tmp = t_1
else if ((b * c) <= 8.2d-10) then
tmp = t_2
else if ((b * c) <= 1.75d+150) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = t * (a * -4.0);
double tmp;
if ((b * c) <= -1e+136) {
tmp = b * c;
} else if ((b * c) <= -6e+85) {
tmp = j * (k * -27.0);
} else if ((b * c) <= -2.5e-17) {
tmp = b * c;
} else if ((b * c) <= -6e-69) {
tmp = t_2;
} else if ((b * c) <= 1.7e-211) {
tmp = t_1;
} else if ((b * c) <= 8.2e-10) {
tmp = t_2;
} else if ((b * c) <= 1.75e+150) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) t_2 = t * (a * -4.0) tmp = 0 if (b * c) <= -1e+136: tmp = b * c elif (b * c) <= -6e+85: tmp = j * (k * -27.0) elif (b * c) <= -2.5e-17: tmp = b * c elif (b * c) <= -6e-69: tmp = t_2 elif (b * c) <= 1.7e-211: tmp = t_1 elif (b * c) <= 8.2e-10: tmp = t_2 elif (b * c) <= 1.75e+150: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) t_2 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (Float64(b * c) <= -1e+136) tmp = Float64(b * c); elseif (Float64(b * c) <= -6e+85) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= -2.5e-17) tmp = Float64(b * c); elseif (Float64(b * c) <= -6e-69) tmp = t_2; elseif (Float64(b * c) <= 1.7e-211) tmp = t_1; elseif (Float64(b * c) <= 8.2e-10) tmp = t_2; elseif (Float64(b * c) <= 1.75e+150) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -27.0 * (j * k);
t_2 = t * (a * -4.0);
tmp = 0.0;
if ((b * c) <= -1e+136)
tmp = b * c;
elseif ((b * c) <= -6e+85)
tmp = j * (k * -27.0);
elseif ((b * c) <= -2.5e-17)
tmp = b * c;
elseif ((b * c) <= -6e-69)
tmp = t_2;
elseif ((b * c) <= 1.7e-211)
tmp = t_1;
elseif ((b * c) <= 8.2e-10)
tmp = t_2;
elseif ((b * c) <= 1.75e+150)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e+136], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -6e+85], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.5e-17], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -6e-69], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.7e-211], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 8.2e-10], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.75e+150], t$95$1, N[(b * c), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+136}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -6 \cdot 10^{+85}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq -2.5 \cdot 10^{-17}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -6 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.7 \cdot 10^{-211}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{-10}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.75 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.00000000000000006e136 or -6.0000000000000001e85 < (*.f64 b c) < -2.4999999999999999e-17 or 1.74999999999999992e150 < (*.f64 b c) Initial program 84.9%
Simplified87.0%
associate-*r*86.9%
distribute-rgt-out--84.8%
cancel-sign-sub-inv84.8%
associate-*l*82.8%
fma-define82.8%
associate-*l*82.8%
Applied egg-rr82.8%
Taylor expanded in b around inf 57.4%
if -1.00000000000000006e136 < (*.f64 b c) < -6.0000000000000001e85Initial program 85.7%
Simplified85.7%
Taylor expanded in j around inf 72.5%
*-commutative72.5%
associate-*r*72.7%
*-commutative72.7%
Simplified72.7%
if -2.4999999999999999e-17 < (*.f64 b c) < -5.99999999999999978e-69 or 1.7e-211 < (*.f64 b c) < 8.1999999999999996e-10Initial program 87.7%
Simplified87.8%
associate-*r*90.1%
distribute-rgt-out--87.6%
cancel-sign-sub-inv87.6%
associate-*l*85.0%
fma-define85.0%
associate-*l*85.0%
Applied egg-rr85.0%
fma-undefine85.0%
*-commutative85.0%
distribute-rgt-neg-in85.0%
metadata-eval85.0%
Applied egg-rr85.0%
associate-*r*87.6%
*-commutative87.6%
*-commutative87.6%
distribute-rgt-out90.1%
Simplified90.1%
Taylor expanded in a around inf 46.0%
associate-*r*46.0%
*-commutative46.0%
Simplified46.0%
if -5.99999999999999978e-69 < (*.f64 b c) < 1.7e-211 or 8.1999999999999996e-10 < (*.f64 b c) < 1.74999999999999992e150Initial program 89.9%
Simplified96.4%
Taylor expanded in j around inf 38.5%
Final simplification47.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* j (* k -27.0)) (* x (* -4.0 i))))
(t_2 (- (* b c) (* 27.0 (* j k))))
(t_3 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -5.2e+174)
t_3
(if (<= t -5.3e+95)
(- (* b c) (* 4.0 (* x i)))
(if (<= t -1320000000.0)
t_3
(if (<= t -3.1e-122)
t_2
(if (<= t -4.1e-261)
t_1
(if (<= t 1.66e+71)
t_2
(if (<= t 2.5e+117) t_1 (if (<= t 6.6e+130) t_2 t_3))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (x * (-4.0 * i));
double t_2 = (b * c) - (27.0 * (j * k));
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -5.2e+174) {
tmp = t_3;
} else if (t <= -5.3e+95) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t <= -1320000000.0) {
tmp = t_3;
} else if (t <= -3.1e-122) {
tmp = t_2;
} else if (t <= -4.1e-261) {
tmp = t_1;
} else if (t <= 1.66e+71) {
tmp = t_2;
} else if (t <= 2.5e+117) {
tmp = t_1;
} else if (t <= 6.6e+130) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + (x * ((-4.0d0) * i))
t_2 = (b * c) - (27.0d0 * (j * k))
t_3 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-5.2d+174)) then
tmp = t_3
else if (t <= (-5.3d+95)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (t <= (-1320000000.0d0)) then
tmp = t_3
else if (t <= (-3.1d-122)) then
tmp = t_2
else if (t <= (-4.1d-261)) then
tmp = t_1
else if (t <= 1.66d+71) then
tmp = t_2
else if (t <= 2.5d+117) then
tmp = t_1
else if (t <= 6.6d+130) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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)) + (x * (-4.0 * i));
double t_2 = (b * c) - (27.0 * (j * k));
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -5.2e+174) {
tmp = t_3;
} else if (t <= -5.3e+95) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t <= -1320000000.0) {
tmp = t_3;
} else if (t <= -3.1e-122) {
tmp = t_2;
} else if (t <= -4.1e-261) {
tmp = t_1;
} else if (t <= 1.66e+71) {
tmp = t_2;
} else if (t <= 2.5e+117) {
tmp = t_1;
} else if (t <= 6.6e+130) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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)) + (x * (-4.0 * i)) t_2 = (b * c) - (27.0 * (j * k)) t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -5.2e+174: tmp = t_3 elif t <= -5.3e+95: tmp = (b * c) - (4.0 * (x * i)) elif t <= -1320000000.0: tmp = t_3 elif t <= -3.1e-122: tmp = t_2 elif t <= -4.1e-261: tmp = t_1 elif t <= 1.66e+71: tmp = t_2 elif t <= 2.5e+117: tmp = t_1 elif t <= 6.6e+130: tmp = t_2 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(x * Float64(-4.0 * i))) t_2 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -5.2e+174) tmp = t_3; elseif (t <= -5.3e+95) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (t <= -1320000000.0) tmp = t_3; elseif (t <= -3.1e-122) tmp = t_2; elseif (t <= -4.1e-261) tmp = t_1; elseif (t <= 1.66e+71) tmp = t_2; elseif (t <= 2.5e+117) tmp = t_1; elseif (t <= 6.6e+130) tmp = t_2; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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)) + (x * (-4.0 * i));
t_2 = (b * c) - (27.0 * (j * k));
t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -5.2e+174)
tmp = t_3;
elseif (t <= -5.3e+95)
tmp = (b * c) - (4.0 * (x * i));
elseif (t <= -1320000000.0)
tmp = t_3;
elseif (t <= -3.1e-122)
tmp = t_2;
elseif (t <= -4.1e-261)
tmp = t_1;
elseif (t <= 1.66e+71)
tmp = t_2;
elseif (t <= 2.5e+117)
tmp = t_1;
elseif (t <= 6.6e+130)
tmp = t_2;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+174], t$95$3, If[LessEqual[t, -5.3e+95], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1320000000.0], t$95$3, If[LessEqual[t, -3.1e-122], t$95$2, If[LessEqual[t, -4.1e-261], t$95$1, If[LessEqual[t, 1.66e+71], t$95$2, If[LessEqual[t, 2.5e+117], t$95$1, If[LessEqual[t, 6.6e+130], t$95$2, t$95$3]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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) + x \cdot \left(-4 \cdot i\right)\\
t_2 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+174}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -5.3 \cdot 10^{+95}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq -1320000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-122}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-261}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.66 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -5.1999999999999997e174 or -5.3000000000000002e95 < t < -1.32e9 or 6.6e130 < t Initial program 85.6%
Simplified90.1%
Taylor expanded in t around inf 76.2%
if -5.1999999999999997e174 < t < -5.3000000000000002e95Initial program 70.5%
Taylor expanded in t around 0 65.2%
Taylor expanded in j around 0 53.8%
if -1.32e9 < t < -3.0999999999999998e-122 or -4.10000000000000015e-261 < t < 1.65999999999999995e71 or 2.49999999999999992e117 < t < 6.6e130Initial program 92.3%
Taylor expanded in t around 0 82.1%
Taylor expanded in i around 0 67.2%
if -3.0999999999999998e-122 < t < -4.10000000000000015e-261 or 1.65999999999999995e71 < t < 2.49999999999999992e117Initial program 84.5%
Simplified88.0%
Taylor expanded in i around inf 75.3%
associate-*r*75.3%
*-commutative75.3%
Simplified75.3%
Final simplification70.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k)))))
(if (<= x -1.95e+229)
(* x (* -4.0 i))
(if (<= x 6.5e-64)
t_1
(if (<= x 7.5e-39)
(* t (* a -4.0))
(if (<= x 5e+74)
t_1
(if (<= x 3.4e+111)
(* x (* 18.0 (* t (* y z))))
(if (<= x 2.25e+191)
(- (* b c) (* 4.0 (* x i)))
(* z (* t (* 18.0 (* x y))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double tmp;
if (x <= -1.95e+229) {
tmp = x * (-4.0 * i);
} else if (x <= 6.5e-64) {
tmp = t_1;
} else if (x <= 7.5e-39) {
tmp = t * (a * -4.0);
} else if (x <= 5e+74) {
tmp = t_1;
} else if (x <= 3.4e+111) {
tmp = x * (18.0 * (t * (y * z)));
} else if (x <= 2.25e+191) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = z * (t * (18.0 * (x * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - (27.0d0 * (j * k))
if (x <= (-1.95d+229)) then
tmp = x * ((-4.0d0) * i)
else if (x <= 6.5d-64) then
tmp = t_1
else if (x <= 7.5d-39) then
tmp = t * (a * (-4.0d0))
else if (x <= 5d+74) then
tmp = t_1
else if (x <= 3.4d+111) then
tmp = x * (18.0d0 * (t * (y * z)))
else if (x <= 2.25d+191) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = z * (t * (18.0d0 * (x * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double tmp;
if (x <= -1.95e+229) {
tmp = x * (-4.0 * i);
} else if (x <= 6.5e-64) {
tmp = t_1;
} else if (x <= 7.5e-39) {
tmp = t * (a * -4.0);
} else if (x <= 5e+74) {
tmp = t_1;
} else if (x <= 3.4e+111) {
tmp = x * (18.0 * (t * (y * z)));
} else if (x <= 2.25e+191) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = z * (t * (18.0 * (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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (27.0 * (j * k)) tmp = 0 if x <= -1.95e+229: tmp = x * (-4.0 * i) elif x <= 6.5e-64: tmp = t_1 elif x <= 7.5e-39: tmp = t * (a * -4.0) elif x <= 5e+74: tmp = t_1 elif x <= 3.4e+111: tmp = x * (18.0 * (t * (y * z))) elif x <= 2.25e+191: tmp = (b * c) - (4.0 * (x * i)) else: tmp = z * (t * (18.0 * (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (x <= -1.95e+229) tmp = Float64(x * Float64(-4.0 * i)); elseif (x <= 6.5e-64) tmp = t_1; elseif (x <= 7.5e-39) tmp = Float64(t * Float64(a * -4.0)); elseif (x <= 5e+74) tmp = t_1; elseif (x <= 3.4e+111) tmp = Float64(x * Float64(18.0 * Float64(t * Float64(y * z)))); elseif (x <= 2.25e+191) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(z * Float64(t * Float64(18.0 * 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (27.0 * (j * k));
tmp = 0.0;
if (x <= -1.95e+229)
tmp = x * (-4.0 * i);
elseif (x <= 6.5e-64)
tmp = t_1;
elseif (x <= 7.5e-39)
tmp = t * (a * -4.0);
elseif (x <= 5e+74)
tmp = t_1;
elseif (x <= 3.4e+111)
tmp = x * (18.0 * (t * (y * z)));
elseif (x <= 2.25e+191)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = z * (t * (18.0 * (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.95e+229], N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e-64], t$95$1, If[LessEqual[x, 7.5e-39], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e+74], t$95$1, If[LessEqual[x, 3.4e+111], N[(x * N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.25e+191], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(t * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{+229}:\\
\;\;\;\;x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-39}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+111}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{+191}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t \cdot \left(18 \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.9499999999999999e229Initial program 58.9%
Simplified58.9%
associate-*r*58.8%
distribute-rgt-out--58.8%
cancel-sign-sub-inv58.8%
associate-*l*58.8%
fma-define58.8%
associate-*l*58.8%
Applied egg-rr58.8%
Taylor expanded in i around inf 67.2%
metadata-eval67.2%
distribute-lft-neg-in67.2%
associate-*r*67.2%
*-commutative67.2%
distribute-rgt-neg-in67.2%
distribute-lft-neg-in67.2%
metadata-eval67.2%
Simplified67.2%
if -1.9499999999999999e229 < x < 6.5000000000000004e-64 or 7.49999999999999971e-39 < x < 4.99999999999999963e74Initial program 91.6%
Taylor expanded in t around 0 66.4%
Taylor expanded in i around 0 57.8%
if 6.5000000000000004e-64 < x < 7.49999999999999971e-39Initial program 85.7%
Simplified100.0%
associate-*r*100.0%
distribute-rgt-out--85.7%
cancel-sign-sub-inv85.7%
associate-*l*85.7%
fma-define85.7%
associate-*l*85.7%
Applied egg-rr85.7%
fma-undefine85.7%
*-commutative85.7%
distribute-rgt-neg-in85.7%
metadata-eval85.7%
Applied egg-rr85.7%
associate-*r*85.7%
*-commutative85.7%
*-commutative85.7%
distribute-rgt-out100.0%
Simplified100.0%
Taylor expanded in a around inf 78.8%
associate-*r*78.8%
*-commutative78.8%
Simplified78.8%
if 4.99999999999999963e74 < x < 3.4000000000000001e111Initial program 84.2%
Simplified84.3%
Taylor expanded in x around inf 75.5%
Taylor expanded in t around inf 75.4%
if 3.4000000000000001e111 < x < 2.2500000000000001e191Initial program 72.0%
Taylor expanded in t around 0 76.6%
Taylor expanded in j around 0 71.8%
if 2.2500000000000001e191 < x Initial program 86.4%
Simplified95.5%
associate-*r*90.9%
distribute-rgt-out--86.4%
cancel-sign-sub-inv86.4%
associate-*l*86.4%
fma-define86.4%
associate-*l*86.4%
Applied egg-rr86.4%
fma-undefine86.4%
*-commutative86.4%
distribute-rgt-neg-in86.4%
metadata-eval86.4%
Applied egg-rr86.4%
associate-*r*86.4%
*-commutative86.4%
*-commutative86.4%
distribute-rgt-out90.9%
Simplified90.9%
Taylor expanded in y around inf 68.9%
*-commutative68.9%
associate-*r*68.9%
associate-*l*68.9%
associate-*r*68.9%
*-commutative68.9%
associate-*l*68.9%
*-commutative68.9%
associate-*l*68.9%
*-commutative68.9%
associate-*r*68.9%
associate-*r*68.9%
*-commutative68.9%
associate-*r*68.9%
*-commutative68.9%
associate-*l*68.9%
Simplified68.9%
Final simplification61.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* j (* k -27.0)) (* b c))))
(if (<= x -4.9e+230)
(* x (* -4.0 i))
(if (<= x 3.4e-65)
t_1
(if (<= x 6.2e-39)
(* t (* a -4.0))
(if (<= x 5.8e+71)
t_1
(if (<= x 1.8e+111)
(* x (* 18.0 (* t (* y z))))
(if (<= x 1e+191)
(- (* b c) (* 4.0 (* x i)))
(* z (* t (* 18.0 (* x y))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (b * c);
double tmp;
if (x <= -4.9e+230) {
tmp = x * (-4.0 * i);
} else if (x <= 3.4e-65) {
tmp = t_1;
} else if (x <= 6.2e-39) {
tmp = t * (a * -4.0);
} else if (x <= 5.8e+71) {
tmp = t_1;
} else if (x <= 1.8e+111) {
tmp = x * (18.0 * (t * (y * z)));
} else if (x <= 1e+191) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = z * (t * (18.0 * (x * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + (b * c)
if (x <= (-4.9d+230)) then
tmp = x * ((-4.0d0) * i)
else if (x <= 3.4d-65) then
tmp = t_1
else if (x <= 6.2d-39) then
tmp = t * (a * (-4.0d0))
else if (x <= 5.8d+71) then
tmp = t_1
else if (x <= 1.8d+111) then
tmp = x * (18.0d0 * (t * (y * z)))
else if (x <= 1d+191) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = z * (t * (18.0d0 * (x * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (b * c);
double tmp;
if (x <= -4.9e+230) {
tmp = x * (-4.0 * i);
} else if (x <= 3.4e-65) {
tmp = t_1;
} else if (x <= 6.2e-39) {
tmp = t * (a * -4.0);
} else if (x <= 5.8e+71) {
tmp = t_1;
} else if (x <= 1.8e+111) {
tmp = x * (18.0 * (t * (y * z)));
} else if (x <= 1e+191) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = z * (t * (18.0 * (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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (k * -27.0)) + (b * c) tmp = 0 if x <= -4.9e+230: tmp = x * (-4.0 * i) elif x <= 3.4e-65: tmp = t_1 elif x <= 6.2e-39: tmp = t * (a * -4.0) elif x <= 5.8e+71: tmp = t_1 elif x <= 1.8e+111: tmp = x * (18.0 * (t * (y * z))) elif x <= 1e+191: tmp = (b * c) - (4.0 * (x * i)) else: tmp = z * (t * (18.0 * (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)) tmp = 0.0 if (x <= -4.9e+230) tmp = Float64(x * Float64(-4.0 * i)); elseif (x <= 3.4e-65) tmp = t_1; elseif (x <= 6.2e-39) tmp = Float64(t * Float64(a * -4.0)); elseif (x <= 5.8e+71) tmp = t_1; elseif (x <= 1.8e+111) tmp = Float64(x * Float64(18.0 * Float64(t * Float64(y * z)))); elseif (x <= 1e+191) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(z * Float64(t * Float64(18.0 * 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (k * -27.0)) + (b * c);
tmp = 0.0;
if (x <= -4.9e+230)
tmp = x * (-4.0 * i);
elseif (x <= 3.4e-65)
tmp = t_1;
elseif (x <= 6.2e-39)
tmp = t * (a * -4.0);
elseif (x <= 5.8e+71)
tmp = t_1;
elseif (x <= 1.8e+111)
tmp = x * (18.0 * (t * (y * z)));
elseif (x <= 1e+191)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = z * (t * (18.0 * (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.9e+230], N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.4e-65], t$95$1, If[LessEqual[x, 6.2e-39], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e+71], t$95$1, If[LessEqual[x, 1.8e+111], N[(x * N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e+191], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(t * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{if}\;x \leq -4.9 \cdot 10^{+230}:\\
\;\;\;\;x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-39}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+111}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 10^{+191}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t \cdot \left(18 \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if x < -4.89999999999999969e230Initial program 58.9%
Simplified58.9%
associate-*r*58.8%
distribute-rgt-out--58.8%
cancel-sign-sub-inv58.8%
associate-*l*58.8%
fma-define58.8%
associate-*l*58.8%
Applied egg-rr58.8%
Taylor expanded in i around inf 67.2%
metadata-eval67.2%
distribute-lft-neg-in67.2%
associate-*r*67.2%
*-commutative67.2%
distribute-rgt-neg-in67.2%
distribute-lft-neg-in67.2%
metadata-eval67.2%
Simplified67.2%
if -4.89999999999999969e230 < x < 3.39999999999999987e-65 or 6.1999999999999994e-39 < x < 5.80000000000000014e71Initial program 91.6%
Simplified92.9%
Taylor expanded in b around inf 57.7%
if 3.39999999999999987e-65 < x < 6.1999999999999994e-39Initial program 85.7%
Simplified100.0%
associate-*r*100.0%
distribute-rgt-out--85.7%
cancel-sign-sub-inv85.7%
associate-*l*85.7%
fma-define85.7%
associate-*l*85.7%
Applied egg-rr85.7%
fma-undefine85.7%
*-commutative85.7%
distribute-rgt-neg-in85.7%
metadata-eval85.7%
Applied egg-rr85.7%
associate-*r*85.7%
*-commutative85.7%
*-commutative85.7%
distribute-rgt-out100.0%
Simplified100.0%
Taylor expanded in a around inf 78.8%
associate-*r*78.8%
*-commutative78.8%
Simplified78.8%
if 5.80000000000000014e71 < x < 1.8000000000000001e111Initial program 84.2%
Simplified84.3%
Taylor expanded in x around inf 75.5%
Taylor expanded in t around inf 75.4%
if 1.8000000000000001e111 < x < 1.00000000000000007e191Initial program 72.0%
Taylor expanded in t around 0 76.6%
Taylor expanded in j around 0 71.8%
if 1.00000000000000007e191 < x Initial program 86.4%
Simplified95.5%
associate-*r*90.9%
distribute-rgt-out--86.4%
cancel-sign-sub-inv86.4%
associate-*l*86.4%
fma-define86.4%
associate-*l*86.4%
Applied egg-rr86.4%
fma-undefine86.4%
*-commutative86.4%
distribute-rgt-neg-in86.4%
metadata-eval86.4%
Applied egg-rr86.4%
associate-*r*86.4%
*-commutative86.4%
*-commutative86.4%
distribute-rgt-out90.9%
Simplified90.9%
Taylor expanded in y around inf 68.9%
*-commutative68.9%
associate-*r*68.9%
associate-*l*68.9%
associate-*r*68.9%
*-commutative68.9%
associate-*l*68.9%
*-commutative68.9%
associate-*l*68.9%
*-commutative68.9%
associate-*r*68.9%
associate-*r*68.9%
*-commutative68.9%
associate-*r*68.9%
*-commutative68.9%
associate-*l*68.9%
Simplified68.9%
Final simplification61.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* j (* k -27.0)) (* b c))) (t_2 (* x (* -4.0 i))))
(if (<= x -1.05e+227)
t_2
(if (<= x 6.1e-64)
t_1
(if (<= x 6e-39)
(* t (* a -4.0))
(if (<= x 3.4e+72)
t_1
(if (<= x 2.2e+123)
(* x (* (* y z) (* t 18.0)))
(if (<= x 1.1e+182) t_2 (* z (* t (* 18.0 (* x y))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (b * c);
double t_2 = x * (-4.0 * i);
double tmp;
if (x <= -1.05e+227) {
tmp = t_2;
} else if (x <= 6.1e-64) {
tmp = t_1;
} else if (x <= 6e-39) {
tmp = t * (a * -4.0);
} else if (x <= 3.4e+72) {
tmp = t_1;
} else if (x <= 2.2e+123) {
tmp = x * ((y * z) * (t * 18.0));
} else if (x <= 1.1e+182) {
tmp = t_2;
} else {
tmp = z * (t * (18.0 * (x * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + (b * c)
t_2 = x * ((-4.0d0) * i)
if (x <= (-1.05d+227)) then
tmp = t_2
else if (x <= 6.1d-64) then
tmp = t_1
else if (x <= 6d-39) then
tmp = t * (a * (-4.0d0))
else if (x <= 3.4d+72) then
tmp = t_1
else if (x <= 2.2d+123) then
tmp = x * ((y * z) * (t * 18.0d0))
else if (x <= 1.1d+182) then
tmp = t_2
else
tmp = z * (t * (18.0d0 * (x * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (b * c);
double t_2 = x * (-4.0 * i);
double tmp;
if (x <= -1.05e+227) {
tmp = t_2;
} else if (x <= 6.1e-64) {
tmp = t_1;
} else if (x <= 6e-39) {
tmp = t * (a * -4.0);
} else if (x <= 3.4e+72) {
tmp = t_1;
} else if (x <= 2.2e+123) {
tmp = x * ((y * z) * (t * 18.0));
} else if (x <= 1.1e+182) {
tmp = t_2;
} else {
tmp = z * (t * (18.0 * (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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (k * -27.0)) + (b * c) t_2 = x * (-4.0 * i) tmp = 0 if x <= -1.05e+227: tmp = t_2 elif x <= 6.1e-64: tmp = t_1 elif x <= 6e-39: tmp = t * (a * -4.0) elif x <= 3.4e+72: tmp = t_1 elif x <= 2.2e+123: tmp = x * ((y * z) * (t * 18.0)) elif x <= 1.1e+182: tmp = t_2 else: tmp = z * (t * (18.0 * (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)) t_2 = Float64(x * Float64(-4.0 * i)) tmp = 0.0 if (x <= -1.05e+227) tmp = t_2; elseif (x <= 6.1e-64) tmp = t_1; elseif (x <= 6e-39) tmp = Float64(t * Float64(a * -4.0)); elseif (x <= 3.4e+72) tmp = t_1; elseif (x <= 2.2e+123) tmp = Float64(x * Float64(Float64(y * z) * Float64(t * 18.0))); elseif (x <= 1.1e+182) tmp = t_2; else tmp = Float64(z * Float64(t * Float64(18.0 * 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (k * -27.0)) + (b * c);
t_2 = x * (-4.0 * i);
tmp = 0.0;
if (x <= -1.05e+227)
tmp = t_2;
elseif (x <= 6.1e-64)
tmp = t_1;
elseif (x <= 6e-39)
tmp = t * (a * -4.0);
elseif (x <= 3.4e+72)
tmp = t_1;
elseif (x <= 2.2e+123)
tmp = x * ((y * z) * (t * 18.0));
elseif (x <= 1.1e+182)
tmp = t_2;
else
tmp = z * (t * (18.0 * (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+227], t$95$2, If[LessEqual[x, 6.1e-64], t$95$1, If[LessEqual[x, 6e-39], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.4e+72], t$95$1, If[LessEqual[x, 2.2e+123], N[(x * N[(N[(y * z), $MachinePrecision] * N[(t * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.1e+182], t$95$2, N[(z * N[(t * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + b \cdot c\\
t_2 := x \cdot \left(-4 \cdot i\right)\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+227}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 6.1 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-39}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+123}:\\
\;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(t \cdot 18\right)\right)\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+182}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t \cdot \left(18 \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.0500000000000001e227 or 2.19999999999999992e123 < x < 1.09999999999999998e182Initial program 63.1%
Simplified67.0%
associate-*r*63.0%
distribute-rgt-out--63.0%
cancel-sign-sub-inv63.0%
associate-*l*62.7%
fma-define62.7%
associate-*l*62.7%
Applied egg-rr62.7%
Taylor expanded in i around inf 75.6%
metadata-eval75.6%
distribute-lft-neg-in75.6%
associate-*r*75.6%
*-commutative75.6%
distribute-rgt-neg-in75.6%
distribute-lft-neg-in75.6%
metadata-eval75.6%
Simplified75.6%
if -1.0500000000000001e227 < x < 6.0999999999999996e-64 or 6.00000000000000055e-39 < x < 3.3999999999999998e72Initial program 91.6%
Simplified92.9%
Taylor expanded in b around inf 57.7%
if 6.0999999999999996e-64 < x < 6.00000000000000055e-39Initial program 85.7%
Simplified100.0%
associate-*r*100.0%
distribute-rgt-out--85.7%
cancel-sign-sub-inv85.7%
associate-*l*85.7%
fma-define85.7%
associate-*l*85.7%
Applied egg-rr85.7%
fma-undefine85.7%
*-commutative85.7%
distribute-rgt-neg-in85.7%
metadata-eval85.7%
Applied egg-rr85.7%
associate-*r*85.7%
*-commutative85.7%
*-commutative85.7%
distribute-rgt-out100.0%
Simplified100.0%
Taylor expanded in a around inf 78.8%
associate-*r*78.8%
*-commutative78.8%
Simplified78.8%
if 3.3999999999999998e72 < x < 2.19999999999999992e123Initial program 83.2%
Simplified83.3%
Taylor expanded in x around inf 71.1%
Taylor expanded in t around inf 65.3%
associate-*r*65.3%
*-commutative65.3%
*-commutative65.3%
Simplified65.3%
if 1.09999999999999998e182 < x Initial program 84.6%
Simplified92.3%
associate-*r*88.5%
distribute-rgt-out--84.6%
cancel-sign-sub-inv84.6%
associate-*l*84.6%
fma-define84.6%
associate-*l*84.6%
Applied egg-rr84.6%
fma-undefine84.6%
*-commutative84.6%
distribute-rgt-neg-in84.6%
metadata-eval84.6%
Applied egg-rr84.6%
associate-*r*84.6%
*-commutative84.6%
*-commutative84.6%
distribute-rgt-out88.5%
Simplified88.5%
Taylor expanded in y around inf 66.1%
*-commutative66.1%
associate-*r*66.1%
associate-*l*66.1%
associate-*r*66.1%
*-commutative66.1%
associate-*l*66.1%
*-commutative66.1%
associate-*l*66.1%
*-commutative66.1%
associate-*r*66.1%
associate-*r*66.1%
*-commutative66.1%
associate-*r*66.1%
*-commutative66.1%
associate-*l*66.1%
Simplified66.1%
Final simplification61.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* i 4.0))))
(t_2 (- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))))
(if (<= x -3.7e+199)
(+ (* j (* k -27.0)) (* x (* -4.0 i)))
(if (<= x 4800000.0)
t_2
(if (<= x 8.5e+44)
t_1
(if (<= x 1.04e+74)
t_2
(if (<= x 2.2e+94)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double t_2 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
double tmp;
if (x <= -3.7e+199) {
tmp = (j * (k * -27.0)) + (x * (-4.0 * i));
} else if (x <= 4800000.0) {
tmp = t_2;
} else if (x <= 8.5e+44) {
tmp = t_1;
} else if (x <= 1.04e+74) {
tmp = t_2;
} else if (x <= 2.2e+94) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
t_2 = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
if (x <= (-3.7d+199)) then
tmp = (j * (k * (-27.0d0))) + (x * ((-4.0d0) * i))
else if (x <= 4800000.0d0) then
tmp = t_2
else if (x <= 8.5d+44) then
tmp = t_1
else if (x <= 1.04d+74) then
tmp = t_2
else if (x <= 2.2d+94) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double t_2 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
double tmp;
if (x <= -3.7e+199) {
tmp = (j * (k * -27.0)) + (x * (-4.0 * i));
} else if (x <= 4800000.0) {
tmp = t_2;
} else if (x <= 8.5e+44) {
tmp = t_1;
} else if (x <= 1.04e+74) {
tmp = t_2;
} else if (x <= 2.2e+94) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0)) t_2 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) tmp = 0 if x <= -3.7e+199: tmp = (j * (k * -27.0)) + (x * (-4.0 * i)) elif x <= 4800000.0: tmp = t_2 elif x <= 8.5e+44: tmp = t_1 elif x <= 1.04e+74: tmp = t_2 elif x <= 2.2e+94: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))) t_2 = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (x <= -3.7e+199) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(x * Float64(-4.0 * i))); elseif (x <= 4800000.0) tmp = t_2; elseif (x <= 8.5e+44) tmp = t_1; elseif (x <= 1.04e+74) tmp = t_2; elseif (x <= 2.2e+94) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
t_2 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
tmp = 0.0;
if (x <= -3.7e+199)
tmp = (j * (k * -27.0)) + (x * (-4.0 * i));
elseif (x <= 4800000.0)
tmp = t_2;
elseif (x <= 8.5e+44)
tmp = t_1;
elseif (x <= 1.04e+74)
tmp = t_2;
elseif (x <= 2.2e+94)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.7e+199], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4800000.0], t$95$2, If[LessEqual[x, 8.5e+44], t$95$1, If[LessEqual[x, 1.04e+74], t$95$2, If[LessEqual[x, 2.2e+94], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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) - i \cdot 4\right)\\
t_2 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;x \leq -3.7 \cdot 10^{+199}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;x \leq 4800000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.04 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+94}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.70000000000000021e199Initial program 61.4%
Simplified72.4%
Taylor expanded in i around inf 83.5%
associate-*r*83.5%
*-commutative83.5%
Simplified83.5%
if -3.70000000000000021e199 < x < 4.8e6 or 8.5e44 < x < 1.04e74Initial program 92.3%
Simplified93.1%
Taylor expanded in x around 0 76.3%
if 4.8e6 < x < 8.5e44 or 2.20000000000000012e94 < x Initial program 81.8%
Simplified88.3%
Taylor expanded in x around inf 85.3%
if 1.04e74 < x < 2.20000000000000012e94Initial program 85.3%
Simplified85.3%
Taylor expanded in t around inf 85.3%
Final simplification79.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* j 27.0) -5e+221)
(- (- (* b c) (* 4.0 (* x i))) (* k (* j 27.0)))
(-
(+ (* b c) (* t (+ (* z (* x (* 18.0 y))) (* a -4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 ((j * 27.0) <= -5e+221) {
tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
} else {
tmp = ((b * c) + (t * ((z * (x * (18.0 * y))) + (a * -4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 ((j * 27.0d0) <= (-5d+221)) then
tmp = ((b * c) - (4.0d0 * (x * i))) - (k * (j * 27.0d0))
else
tmp = ((b * c) + (t * ((z * (x * (18.0d0 * y))) + (a * (-4.0d0))))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 ((j * 27.0) <= -5e+221) {
tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
} else {
tmp = ((b * c) + (t * ((z * (x * (18.0 * y))) + (a * -4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [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 (j * 27.0) <= -5e+221: tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0)) else: tmp = ((b * c) + (t * ((z * (x * (18.0 * y))) + (a * -4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) 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(j * 27.0) <= -5e+221) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(k * Float64(j * 27.0))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(z * Float64(x * Float64(18.0 * y))) + Float64(a * -4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
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 ((j * 27.0) <= -5e+221)
tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
else
tmp = ((b * c) + (t * ((z * (x * (18.0 * y))) + (a * -4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. 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[(j * 27.0), $MachinePrecision], -5e+221], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(z * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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}\;j \cdot 27 \leq -5 \cdot 10^{+221}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(z \cdot \left(x \cdot \left(18 \cdot y\right)\right) + a \cdot -4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\end{array}
\end{array}
if (*.f64 j #s(literal 27 binary64)) < -5.0000000000000002e221Initial program 69.2%
Taylor expanded in t around 0 76.9%
if -5.0000000000000002e221 < (*.f64 j #s(literal 27 binary64)) Initial program 88.5%
Simplified90.7%
associate-*r*91.0%
distribute-rgt-out--88.5%
cancel-sign-sub-inv88.5%
associate-*l*85.3%
fma-define85.3%
associate-*l*85.2%
Applied egg-rr85.2%
fma-undefine85.2%
*-commutative85.2%
distribute-rgt-neg-in85.2%
metadata-eval85.2%
Applied egg-rr85.2%
associate-*r*88.5%
*-commutative88.5%
*-commutative88.5%
distribute-rgt-out91.0%
Simplified91.0%
Final simplification90.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -6.9e+264)
(* t (* a -4.0))
(if (<= t -700000000.0)
(* z (* t (* 18.0 (* x y))))
(if (<= t -6.8e-122)
(* b c)
(if (<= t -5e-222)
(* x (* -4.0 i))
(if (<= t 2.9e+128)
(* j (* k -27.0))
(* x (* z (* 18.0 (* t y))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -6.9e+264) {
tmp = t * (a * -4.0);
} else if (t <= -700000000.0) {
tmp = z * (t * (18.0 * (x * y)));
} else if (t <= -6.8e-122) {
tmp = b * c;
} else if (t <= -5e-222) {
tmp = x * (-4.0 * i);
} else if (t <= 2.9e+128) {
tmp = j * (k * -27.0);
} else {
tmp = x * (z * (18.0 * (t * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-6.9d+264)) then
tmp = t * (a * (-4.0d0))
else if (t <= (-700000000.0d0)) then
tmp = z * (t * (18.0d0 * (x * y)))
else if (t <= (-6.8d-122)) then
tmp = b * c
else if (t <= (-5d-222)) then
tmp = x * ((-4.0d0) * i)
else if (t <= 2.9d+128) then
tmp = j * (k * (-27.0d0))
else
tmp = x * (z * (18.0d0 * (t * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -6.9e+264) {
tmp = t * (a * -4.0);
} else if (t <= -700000000.0) {
tmp = z * (t * (18.0 * (x * y)));
} else if (t <= -6.8e-122) {
tmp = b * c;
} else if (t <= -5e-222) {
tmp = x * (-4.0 * i);
} else if (t <= 2.9e+128) {
tmp = j * (k * -27.0);
} else {
tmp = x * (z * (18.0 * (t * y)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -6.9e+264: tmp = t * (a * -4.0) elif t <= -700000000.0: tmp = z * (t * (18.0 * (x * y))) elif t <= -6.8e-122: tmp = b * c elif t <= -5e-222: tmp = x * (-4.0 * i) elif t <= 2.9e+128: tmp = j * (k * -27.0) else: tmp = x * (z * (18.0 * (t * y))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -6.9e+264) tmp = Float64(t * Float64(a * -4.0)); elseif (t <= -700000000.0) tmp = Float64(z * Float64(t * Float64(18.0 * Float64(x * y)))); elseif (t <= -6.8e-122) tmp = Float64(b * c); elseif (t <= -5e-222) tmp = Float64(x * Float64(-4.0 * i)); elseif (t <= 2.9e+128) tmp = Float64(j * Float64(k * -27.0)); else tmp = Float64(x * Float64(z * Float64(18.0 * Float64(t * 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -6.9e+264)
tmp = t * (a * -4.0);
elseif (t <= -700000000.0)
tmp = z * (t * (18.0 * (x * y)));
elseif (t <= -6.8e-122)
tmp = b * c;
elseif (t <= -5e-222)
tmp = x * (-4.0 * i);
elseif (t <= 2.9e+128)
tmp = j * (k * -27.0);
else
tmp = x * (z * (18.0 * (t * 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. 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[t, -6.9e+264], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -700000000.0], N[(z * N[(t * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.8e-122], N[(b * c), $MachinePrecision], If[LessEqual[t, -5e-222], N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+128], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(z * N[(18.0 * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.9 \cdot 10^{+264}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;t \leq -700000000:\\
\;\;\;\;z \cdot \left(t \cdot \left(18 \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{-122}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-222}:\\
\;\;\;\;x \cdot \left(-4 \cdot i\right)\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+128}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot \left(18 \cdot \left(t \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if t < -6.90000000000000041e264Initial program 100.0%
Simplified100.0%
associate-*r*100.0%
distribute-rgt-out--100.0%
cancel-sign-sub-inv100.0%
associate-*l*90.9%
fma-define90.9%
associate-*l*90.9%
Applied egg-rr90.9%
fma-undefine90.9%
*-commutative90.9%
distribute-rgt-neg-in90.9%
metadata-eval90.9%
Applied egg-rr90.9%
associate-*r*100.0%
*-commutative100.0%
*-commutative100.0%
distribute-rgt-out100.0%
Simplified100.0%
Taylor expanded in a around inf 73.5%
associate-*r*73.5%
*-commutative73.5%
Simplified73.5%
if -6.90000000000000041e264 < t < -7e8Initial program 83.2%
Simplified85.0%
associate-*r*88.2%
distribute-rgt-out--83.2%
cancel-sign-sub-inv83.2%
associate-*l*76.8%
fma-define76.8%
associate-*l*76.8%
Applied egg-rr76.8%
fma-undefine76.8%
*-commutative76.8%
distribute-rgt-neg-in76.8%
metadata-eval76.8%
Applied egg-rr76.8%
associate-*r*83.2%
*-commutative83.2%
*-commutative83.2%
distribute-rgt-out88.2%
Simplified88.2%
Taylor expanded in y around inf 38.2%
*-commutative38.2%
associate-*r*36.5%
associate-*l*36.5%
associate-*r*39.7%
*-commutative39.7%
associate-*l*39.7%
*-commutative39.7%
associate-*l*44.3%
*-commutative44.3%
associate-*r*44.3%
associate-*r*42.6%
*-commutative42.6%
associate-*r*42.6%
*-commutative42.6%
associate-*l*42.6%
Simplified42.6%
if -7e8 < t < -6.7999999999999996e-122Initial program 89.4%
Simplified92.1%
associate-*r*89.4%
distribute-rgt-out--89.4%
cancel-sign-sub-inv89.4%
associate-*l*91.8%
fma-define91.8%
associate-*l*91.8%
Applied egg-rr91.8%
Taylor expanded in b around inf 46.9%
if -6.7999999999999996e-122 < t < -5.00000000000000008e-222Initial program 94.1%
Simplified88.9%
associate-*r*94.0%
distribute-rgt-out--94.0%
cancel-sign-sub-inv94.0%
associate-*l*94.0%
fma-define94.0%
associate-*l*94.0%
Applied egg-rr94.0%
Taylor expanded in i around inf 49.0%
metadata-eval49.0%
distribute-lft-neg-in49.0%
associate-*r*49.0%
*-commutative49.0%
distribute-rgt-neg-in49.0%
distribute-lft-neg-in49.0%
metadata-eval49.0%
Simplified49.0%
if -5.00000000000000008e-222 < t < 2.9e128Initial program 90.3%
Simplified92.6%
Taylor expanded in j around inf 41.7%
*-commutative41.7%
associate-*r*42.7%
*-commutative42.7%
Simplified42.7%
if 2.9e128 < t Initial program 78.9%
Simplified86.8%
Taylor expanded in x around inf 56.2%
Taylor expanded in z around inf 53.6%
Taylor expanded in i around 0 51.3%
*-commutative51.3%
Simplified51.3%
Final simplification46.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= (* b c) -1.45e+137)
(and (not (<= (* b c) -1.25e+85))
(or (<= (* b c) -2e-16) (not (<= (* b c) 2.7e+149)))))
(* 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.45e+137) || (!((b * c) <= -1.25e+85) && (((b * c) <= -2e-16) || !((b * c) <= 2.7e+149)))) {
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.45d+137)) .or. (.not. ((b * c) <= (-1.25d+85))) .and. ((b * c) <= (-2d-16)) .or. (.not. ((b * c) <= 2.7d+149))) 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.45e+137) || (!((b * c) <= -1.25e+85) && (((b * c) <= -2e-16) || !((b * c) <= 2.7e+149)))) {
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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.45e+137) or (not ((b * c) <= -1.25e+85) and (((b * c) <= -2e-16) or not ((b * c) <= 2.7e+149))): 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.45e+137) || (!(Float64(b * c) <= -1.25e+85) && ((Float64(b * c) <= -2e-16) || !(Float64(b * c) <= 2.7e+149)))) 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.45e+137) || (~(((b * c) <= -1.25e+85)) && (((b * c) <= -2e-16) || ~(((b * c) <= 2.7e+149)))))
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. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.45e+137], And[N[Not[LessEqual[N[(b * c), $MachinePrecision], -1.25e+85]], $MachinePrecision], Or[LessEqual[N[(b * c), $MachinePrecision], -2e-16], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.7e+149]], $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.45 \cdot 10^{+137} \lor \neg \left(b \cdot c \leq -1.25 \cdot 10^{+85}\right) \land \left(b \cdot c \leq -2 \cdot 10^{-16} \lor \neg \left(b \cdot c \leq 2.7 \cdot 10^{+149}\right)\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.44999999999999992e137 or -1.25e85 < (*.f64 b c) < -2e-16 or 2.7000000000000001e149 < (*.f64 b c) Initial program 84.7%
Simplified86.9%
associate-*r*86.7%
distribute-rgt-out--84.7%
cancel-sign-sub-inv84.7%
associate-*l*82.7%
fma-define82.7%
associate-*l*82.6%
Applied egg-rr82.6%
Taylor expanded in b around inf 57.9%
if -1.44999999999999992e137 < (*.f64 b c) < -1.25e85 or -2e-16 < (*.f64 b c) < 2.7000000000000001e149Initial program 89.2%
Simplified93.8%
Taylor expanded in j around inf 34.4%
Final simplification43.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -2.9e+137)
(* b c)
(if (<= (* b c) -1.2e+84)
(* j (* k -27.0))
(if (or (<= (* b c) -6.4e-16) (not (<= (* b c) 2.8e+149)))
(* 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);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -2.9e+137) {
tmp = b * c;
} else if ((b * c) <= -1.2e+84) {
tmp = j * (k * -27.0);
} else if (((b * c) <= -6.4e-16) || !((b * c) <= 2.8e+149)) {
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-2.9d+137)) then
tmp = b * c
else if ((b * c) <= (-1.2d+84)) then
tmp = j * (k * (-27.0d0))
else if (((b * c) <= (-6.4d-16)) .or. (.not. ((b * c) <= 2.8d+149))) 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -2.9e+137) {
tmp = b * c;
} else if ((b * c) <= -1.2e+84) {
tmp = j * (k * -27.0);
} else if (((b * c) <= -6.4e-16) || !((b * c) <= 2.8e+149)) {
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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -2.9e+137: tmp = b * c elif (b * c) <= -1.2e+84: tmp = j * (k * -27.0) elif ((b * c) <= -6.4e-16) or not ((b * c) <= 2.8e+149): 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -2.9e+137) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.2e+84) tmp = Float64(j * Float64(k * -27.0)); elseif ((Float64(b * c) <= -6.4e-16) || !(Float64(b * c) <= 2.8e+149)) 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -2.9e+137)
tmp = b * c;
elseif ((b * c) <= -1.2e+84)
tmp = j * (k * -27.0);
elseif (((b * c) <= -6.4e-16) || ~(((b * c) <= 2.8e+149)))
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. 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], -2.9e+137], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.2e+84], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(b * c), $MachinePrecision], -6.4e-16], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.8e+149]], $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.9 \cdot 10^{+137}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.2 \cdot 10^{+84}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq -6.4 \cdot 10^{-16} \lor \neg \left(b \cdot c \leq 2.8 \cdot 10^{+149}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.89999999999999985e137 or -1.2e84 < (*.f64 b c) < -6.40000000000000046e-16 or 2.7999999999999999e149 < (*.f64 b c) Initial program 84.7%
Simplified86.9%
associate-*r*86.7%
distribute-rgt-out--84.7%
cancel-sign-sub-inv84.7%
associate-*l*82.7%
fma-define82.7%
associate-*l*82.6%
Applied egg-rr82.6%
Taylor expanded in b around inf 57.9%
if -2.89999999999999985e137 < (*.f64 b c) < -1.2e84Initial program 85.7%
Simplified85.7%
Taylor expanded in j around inf 72.5%
*-commutative72.5%
associate-*r*72.7%
*-commutative72.7%
Simplified72.7%
if -6.40000000000000046e-16 < (*.f64 b c) < 2.7999999999999999e149Initial program 89.4%
Simplified94.2%
Taylor expanded in j around inf 32.6%
Final simplification43.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (* x i))))
(if (or (<= t -2.2e-22) (not (<= t 1.3e+53)))
(- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) t_1)
(- (- (* b c) t_1) (* k (* j 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if ((t <= -2.2e-22) || !(t <= 1.3e+53)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) - t_1) - (k * (j * 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
if ((t <= (-2.2d-22)) .or. (.not. (t <= 1.3d+53))) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - t_1
else
tmp = ((b * c) - t_1) - (k * (j * 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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double tmp;
if ((t <= -2.2e-22) || !(t <= 1.3e+53)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) - t_1) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) tmp = 0 if (t <= -2.2e-22) or not (t <= 1.3e+53): tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1 else: tmp = ((b * c) - t_1) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if ((t <= -2.2e-22) || !(t <= 1.3e+53)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) - t_1) - Float64(k * Float64(j * 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
tmp = 0.0;
if ((t <= -2.2e-22) || ~((t <= 1.3e+53)))
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
else
tmp = ((b * c) - t_1) - (k * (j * 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -2.2e-22], N[Not[LessEqual[t, 1.3e+53]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{-22} \lor \neg \left(t \leq 1.3 \cdot 10^{+53}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - t\_1\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if t < -2.2000000000000001e-22 or 1.29999999999999999e53 < t Initial program 84.7%
Simplified88.0%
Taylor expanded in j around 0 80.5%
if -2.2000000000000001e-22 < t < 1.29999999999999999e53Initial program 90.4%
Taylor expanded in t around 0 85.5%
Final simplification82.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -6e+83)
(+ (* j (* k -27.0)) (* b c))
(if (or (<= (* b c) -5.2e-17) (not (<= (* b c) 2.8e+149)))
(- (* b c) (* 4.0 (* x i)))
(+ (* -4.0 (* t a)) (* -27.0 (* j k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -6e+83) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (((b * c) <= -5.2e-17) || !((b * c) <= 2.8e+149)) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (-4.0 * (t * a)) + (-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.
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) <= (-6d+83)) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else if (((b * c) <= (-5.2d-17)) .or. (.not. ((b * c) <= 2.8d+149))) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = ((-4.0d0) * (t * a)) + ((-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;
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) <= -6e+83) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (((b * c) <= -5.2e-17) || !((b * c) <= 2.8e+149)) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (-4.0 * (t * a)) + (-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]) [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) <= -6e+83: tmp = (j * (k * -27.0)) + (b * c) elif ((b * c) <= -5.2e-17) or not ((b * c) <= 2.8e+149): tmp = (b * c) - (4.0 * (x * i)) else: tmp = (-4.0 * (t * a)) + (-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]) 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) <= -6e+83) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); elseif ((Float64(b * c) <= -5.2e-17) || !(Float64(b * c) <= 2.8e+149)) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(-4.0 * Float64(t * a)) + 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])){:}
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) <= -6e+83)
tmp = (j * (k * -27.0)) + (b * c);
elseif (((b * c) <= -5.2e-17) || ~(((b * c) <= 2.8e+149)))
tmp = (b * c) - (4.0 * (x * i));
else
tmp = (-4.0 * (t * a)) + (-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. 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], -6e+83], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(b * c), $MachinePrecision], -5.2e-17], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.8e+149]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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 \cdot 10^{+83}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5.2 \cdot 10^{-17} \lor \neg \left(b \cdot c \leq 2.8 \cdot 10^{+149}\right):\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + -27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -5.9999999999999999e83Initial program 77.9%
Simplified86.0%
Taylor expanded in b around inf 65.4%
if -5.9999999999999999e83 < (*.f64 b c) < -5.20000000000000006e-17 or 2.7999999999999999e149 < (*.f64 b c) Initial program 91.1%
Taylor expanded in t around 0 75.9%
Taylor expanded in j around 0 74.0%
if -5.20000000000000006e-17 < (*.f64 b c) < 2.7999999999999999e149Initial program 89.3%
Simplified94.1%
Taylor expanded in a around inf 54.3%
Taylor expanded in a around 0 54.4%
Final simplification60.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -2.3e+85)
(- (* x (- (/ (* b c) x) (* i 4.0))) (* k (* j 27.0)))
(if (<= x 2300000.0)
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))
(* x (- (* 18.0 (* t (* y z))) (* i 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.3e+85) {
tmp = (x * (((b * c) / x) - (i * 4.0))) - (k * (j * 27.0));
} else if (x <= 2300000.0) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-2.3d+85)) then
tmp = (x * (((b * c) / x) - (i * 4.0d0))) - (k * (j * 27.0d0))
else if (x <= 2300000.0d0) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
else
tmp = x * ((18.0d0 * (t * (y * z))) - (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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.3e+85) {
tmp = (x * (((b * c) / x) - (i * 4.0))) - (k * (j * 27.0));
} else if (x <= 2300000.0) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -2.3e+85: tmp = (x * (((b * c) / x) - (i * 4.0))) - (k * (j * 27.0)) elif x <= 2300000.0: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) else: tmp = x * ((18.0 * (t * (y * z))) - (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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -2.3e+85) tmp = Float64(Float64(x * Float64(Float64(Float64(b * c) / x) - Float64(i * 4.0))) - Float64(k * Float64(j * 27.0))); elseif (x <= 2300000.0) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -2.3e+85)
tmp = (x * (((b * c) / x) - (i * 4.0))) - (k * (j * 27.0));
elseif (x <= 2300000.0)
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
else
tmp = x * ((18.0 * (t * (y * z))) - (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. 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, -2.3e+85], N[(N[(x * N[(N[(N[(b * c), $MachinePrecision] / x), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2300000.0], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+85}:\\
\;\;\;\;x \cdot \left(\frac{b \cdot c}{x} - i \cdot 4\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;x \leq 2300000:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -2.2999999999999999e85Initial program 73.1%
Taylor expanded in t around 0 78.8%
Taylor expanded in x around inf 78.8%
if -2.2999999999999999e85 < x < 2.3e6Initial program 93.0%
Simplified91.8%
Taylor expanded in x around 0 77.7%
if 2.3e6 < x Initial program 84.0%
Simplified89.3%
Taylor expanded in x around inf 78.8%
Final simplification78.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -1.75e+84)
(- (- (* b c) (* 4.0 (* x i))) (* k (* j 27.0)))
(if (<= x 4800000.0)
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))
(* x (- (* 18.0 (* t (* y z))) (* i 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.75e+84) {
tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
} else if (x <= 4800000.0) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (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.
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.75d+84)) then
tmp = ((b * c) - (4.0d0 * (x * i))) - (k * (j * 27.0d0))
else if (x <= 4800000.0d0) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
else
tmp = x * ((18.0d0 * (t * (y * z))) - (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;
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.75e+84) {
tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
} else if (x <= 4800000.0) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (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]) [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.75e+84: tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0)) elif x <= 4800000.0: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) else: tmp = x * ((18.0 * (t * (y * z))) - (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]) 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.75e+84) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(k * Float64(j * 27.0))); elseif (x <= 4800000.0) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(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])){:}
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.75e+84)
tmp = ((b * c) - (4.0 * (x * i))) - (k * (j * 27.0));
elseif (x <= 4800000.0)
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
else
tmp = x * ((18.0 * (t * (y * z))) - (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. 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.75e+84], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4800000.0], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 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])\\\\
[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.75 \cdot 10^{+84}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;x \leq 4800000:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -1.7499999999999999e84Initial program 73.1%
Taylor expanded in t around 0 78.8%
if -1.7499999999999999e84 < x < 4.8e6Initial program 93.0%
Simplified91.8%
Taylor expanded in x around 0 77.7%
if 4.8e6 < x Initial program 84.0%
Simplified89.3%
Taylor expanded in x around inf 78.8%
Final simplification78.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(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])){:}
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. 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])\\\\
[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 87.5%
Simplified89.6%
associate-*r*89.8%
distribute-rgt-out--87.5%
cancel-sign-sub-inv87.5%
associate-*l*84.4%
fma-define84.4%
associate-*l*84.4%
Applied egg-rr84.4%
Taylor expanded in b around inf 25.4%
(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 2024091
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))