
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z 4e+35)
(+
(fma t (fma x (* 18.0 (* z y)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
(* j (* k -27.0)))
(*
z
(-
(/
(- (+ (* -4.0 (* t a)) (* b c)) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
z)
(* -18.0 (* t (* x y)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 4e+35) {
tmp = fma(t, fma(x, (18.0 * (z * y)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
} else {
tmp = z * (((((-4.0 * (t * a)) + (b * c)) - ((4.0 * (x * i)) + (27.0 * (j * k)))) / z) - (-18.0 * (t * (x * y))));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 4e+35) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(z * y)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(z * Float64(Float64(Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b * c)) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))) / z) - Float64(-18.0 * Float64(t * Float64(x * y))))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, 4e+35], N[(N[(t * N[(x * N[(18.0 * N[(z * y), $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], N[(z * N[(N[(N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(-18.0 * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 4 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(z \cdot y\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)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{\left(-4 \cdot \left(t \cdot a\right) + b \cdot c\right) - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)}{z} - -18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if z < 3.9999999999999999e35Initial program 83.2%
Simplified88.9%
if 3.9999999999999999e35 < z Initial program 81.0%
Simplified79.6%
Taylor expanded in z around -inf 91.9%
Final simplification89.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (* b c) (- (* t (* z (* y (* x 18.0)))) (* t (* a 4.0))))
(* i (* x 4.0)))
(* k (* j 27.0)))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* t (* z y))) (* i 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (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 * (z * y))) - (i * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(t * Float64(z * Float64(y * Float64(x * 18.0)))) - Float64(t * Float64(a * 4.0)))) - 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(z * y))) - 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((b * c) + ((t * (z * (y * (x * 18.0)))) - (t * (a * 4.0)))) - (i * (x * 4.0))) - (k * (j * 27.0));
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * N[(z * N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $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[(z * y), $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])\\
\\
\begin{array}{l}
t_1 := \left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\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(z \cdot y\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 92.4%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified25.9%
Taylor expanded in x around inf 63.7%
Final simplification89.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* j (* k -27.0)) (* i (* x -4.0)))) (t_2 (* k (* j 27.0))))
(if (<= t_2 -2e+64)
t_1
(if (<= t_2 -1e-34)
(* t (- (* 18.0 (* x (* z y))) (* a 4.0)))
(if (or (<= t_2 -1e-99) (not (<= t_2 1e+117)))
t_1
(- (* b c) (* (* t a) 4.0)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * (k * -27.0)) + (i * (x * -4.0));
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -2e+64) {
tmp = t_1;
} else if (t_2 <= -1e-34) {
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
} else if ((t_2 <= -1e-99) || !(t_2 <= 1e+117)) {
tmp = t_1;
} else {
tmp = (b * c) - ((t * a) * 4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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))) + (i * (x * (-4.0d0)))
t_2 = k * (j * 27.0d0)
if (t_2 <= (-2d+64)) then
tmp = t_1
else if (t_2 <= (-1d-34)) then
tmp = t * ((18.0d0 * (x * (z * y))) - (a * 4.0d0))
else if ((t_2 <= (-1d-99)) .or. (.not. (t_2 <= 1d+117))) then
tmp = t_1
else
tmp = (b * c) - ((t * a) * 4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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)) + (i * (x * -4.0));
double t_2 = k * (j * 27.0);
double tmp;
if (t_2 <= -2e+64) {
tmp = t_1;
} else if (t_2 <= -1e-34) {
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
} else if ((t_2 <= -1e-99) || !(t_2 <= 1e+117)) {
tmp = t_1;
} else {
tmp = (b * c) - ((t * a) * 4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * (k * -27.0)) + (i * (x * -4.0)) t_2 = k * (j * 27.0) tmp = 0 if t_2 <= -2e+64: tmp = t_1 elif t_2 <= -1e-34: tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0)) elif (t_2 <= -1e-99) or not (t_2 <= 1e+117): tmp = t_1 else: tmp = (b * c) - ((t * a) * 4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(i * Float64(x * -4.0))) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -2e+64) tmp = t_1; elseif (t_2 <= -1e-34) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(z * y))) - Float64(a * 4.0))); elseif ((t_2 <= -1e-99) || !(t_2 <= 1e+117)) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(Float64(t * a) * 4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * (k * -27.0)) + (i * (x * -4.0));
t_2 = k * (j * 27.0);
tmp = 0.0;
if (t_2 <= -2e+64)
tmp = t_1;
elseif (t_2 <= -1e-34)
tmp = t * ((18.0 * (x * (z * y))) - (a * 4.0));
elseif ((t_2 <= -1e-99) || ~((t_2 <= 1e+117)))
tmp = t_1;
else
tmp = (b * c) - ((t * a) * 4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+64], t$95$1, If[LessEqual[t$95$2, -1e-34], N[(t * N[(N[(18.0 * N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$2, -1e-99], N[Not[LessEqual[t$95$2, 1e+117]], $MachinePrecision]], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-34}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(z \cdot y\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-99} \lor \neg \left(t\_2 \leq 10^{+117}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(t \cdot a\right) \cdot 4\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000004e64 or -9.99999999999999928e-35 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e-99 or 1.00000000000000005e117 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 81.6%
Simplified87.3%
Taylor expanded in i around inf 73.8%
metadata-eval73.8%
distribute-lft-neg-in73.8%
*-commutative73.8%
associate-*r*73.8%
distribute-rgt-neg-in73.8%
distribute-rgt-neg-in73.8%
metadata-eval73.8%
*-commutative73.8%
Simplified73.8%
if -2.00000000000000004e64 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.99999999999999928e-35Initial program 70.6%
Simplified75.7%
Taylor expanded in t around inf 71.1%
Taylor expanded in t around inf 70.9%
if -1e-99 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000005e117Initial program 85.3%
Taylor expanded in x around 0 57.4%
Taylor expanded in j around 0 55.3%
Final simplification64.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (<= t_1 -1e+152)
(+ (* j (* k -27.0)) (* i (* x -4.0)))
(if (<= t_1 1e+70)
(-
(+ (* b c) (* t (- (* (* z y) (* x 18.0)) (* a 4.0))))
(* i (* x 4.0)))
(- (- (* b c) (* (* t a) 4.0)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -1e+152) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} else if (t_1 <= 1e+70) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - (i * (x * 4.0));
} else {
tmp = ((b * c) - ((t * a) * 4.0)) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (j * 27.0d0)
if (t_1 <= (-1d+152)) then
tmp = (j * (k * (-27.0d0))) + (i * (x * (-4.0d0)))
else if (t_1 <= 1d+70) then
tmp = ((b * c) + (t * (((z * y) * (x * 18.0d0)) - (a * 4.0d0)))) - (i * (x * 4.0d0))
else
tmp = ((b * c) - ((t * a) * 4.0d0)) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if (t_1 <= -1e+152) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} else if (t_1 <= 1e+70) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - (i * (x * 4.0));
} else {
tmp = ((b * c) - ((t * a) * 4.0)) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if t_1 <= -1e+152: tmp = (j * (k * -27.0)) + (i * (x * -4.0)) elif t_1 <= 1e+70: tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - (i * (x * 4.0)) else: tmp = ((b * c) - ((t * a) * 4.0)) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_1 <= -1e+152) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(i * Float64(x * -4.0))); elseif (t_1 <= 1e+70) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(z * y) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))); else tmp = Float64(Float64(Float64(b * c) - Float64(Float64(t * a) * 4.0)) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
tmp = 0.0;
if (t_1 <= -1e+152)
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
elseif (t_1 <= 1e+70)
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - (i * (x * 4.0));
else
tmp = ((b * c) - ((t * a) * 4.0)) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+152], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+70], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(z * y), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+152}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+70}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(z \cdot y\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - i \cdot \left(x \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - \left(t \cdot a\right) \cdot 4\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e152Initial program 76.9%
Simplified84.5%
Taylor expanded in i around inf 82.2%
metadata-eval82.2%
distribute-lft-neg-in82.2%
*-commutative82.2%
associate-*r*82.2%
distribute-rgt-neg-in82.2%
distribute-rgt-neg-in82.2%
metadata-eval82.2%
*-commutative82.2%
Simplified82.2%
if -1e152 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000007e70Initial program 83.0%
Simplified87.3%
Taylor expanded in x around inf 84.5%
*-commutative84.5%
associate-*r*84.5%
Simplified84.5%
if 1.00000000000000007e70 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 86.0%
Taylor expanded in x around 0 80.4%
Final simplification83.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z 2e-59)
(-
(+ (* b c) (* t (- (* (* z y) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(*
z
(-
(/
(- (+ (* -4.0 (* t a)) (* b c)) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
z)
(* -18.0 (* t (* x y)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 2e-59) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = z * (((((-4.0 * (t * a)) + (b * c)) - ((4.0 * (x * i)) + (27.0 * (j * k)))) / z) - (-18.0 * (t * (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.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (z <= 2d-59) then
tmp = ((b * c) + (t * (((z * y) * (x * 18.0d0)) - (a * 4.0d0)))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
else
tmp = z * ((((((-4.0d0) * (t * a)) + (b * c)) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))) / z) - ((-18.0d0) * (t * (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;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (z <= 2e-59) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = z * (((((-4.0 * (t * a)) + (b * c)) - ((4.0 * (x * i)) + (27.0 * (j * k)))) / z) - (-18.0 * (t * (x * y))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= 2e-59: tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = z * (((((-4.0 * (t * a)) + (b * c)) - ((4.0 * (x * i)) + (27.0 * (j * k)))) / z) - (-18.0 * (t * (x * y)))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 2e-59) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(z * y) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(z * Float64(Float64(Float64(Float64(Float64(-4.0 * Float64(t * a)) + Float64(b * c)) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))) / z) - Float64(-18.0 * Float64(t * Float64(x * y))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (z <= 2e-59)
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = z * (((((-4.0 * (t * a)) + (b * c)) - ((4.0 * (x * i)) + (27.0 * (j * k)))) / z) - (-18.0 * (t * (x * y))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, 2e-59], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(z * y), $MachinePrecision] * N[(x * 18.0), $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], N[(z * N[(N[(N[(N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - N[(-18.0 * N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2 \cdot 10^{-59}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(z \cdot y\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{\left(-4 \cdot \left(t \cdot a\right) + b \cdot c\right) - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)}{z} - -18 \cdot \left(t \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if z < 2.0000000000000001e-59Initial program 83.0%
Simplified88.5%
if 2.0000000000000001e-59 < z Initial program 81.8%
Simplified80.7%
Taylor expanded in z around -inf 90.7%
Final simplification89.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -2.3e-35)
(- (+ (* b c) (* t (- (* (* z y) (* x 18.0)) (* a 4.0)))) (* i (* x 4.0)))
(if (<= t 1.15e+44)
(-
(+ (* b c) (* y (* z (* 18.0 (* t x)))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))
(- (* t (- (* a (- 4.0)) (* (* z y) (* x -18.0)))) (* k (* j 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -2.3e-35) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - (i * (x * 4.0));
} else if (t <= 1.15e+44) {
tmp = ((b * c) + (y * (z * (18.0 * (t * x))))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = (t * ((a * -4.0) - ((z * y) * (x * -18.0)))) - (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.
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 <= (-2.3d-35)) then
tmp = ((b * c) + (t * (((z * y) * (x * 18.0d0)) - (a * 4.0d0)))) - (i * (x * 4.0d0))
else if (t <= 1.15d+44) then
tmp = ((b * c) + (y * (z * (18.0d0 * (t * x))))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
else
tmp = (t * ((a * -4.0d0) - ((z * y) * (x * (-18.0d0))))) - (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;
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 <= -2.3e-35) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - (i * (x * 4.0));
} else if (t <= 1.15e+44) {
tmp = ((b * c) + (y * (z * (18.0 * (t * x))))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
} else {
tmp = (t * ((a * -4.0) - ((z * y) * (x * -18.0)))) - (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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -2.3e-35: tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - (i * (x * 4.0)) elif t <= 1.15e+44: tmp = ((b * c) + (y * (z * (18.0 * (t * x))))) - ((x * (i * 4.0)) + (j * (k * 27.0))) else: tmp = (t * ((a * -4.0) - ((z * y) * (x * -18.0)))) - (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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -2.3e-35) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(z * y) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(i * Float64(x * 4.0))); elseif (t <= 1.15e+44) tmp = Float64(Float64(Float64(b * c) + Float64(y * Float64(z * Float64(18.0 * Float64(t * x))))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); else tmp = Float64(Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(z * y) * Float64(x * -18.0)))) - 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -2.3e-35)
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - (i * (x * 4.0));
elseif (t <= 1.15e+44)
tmp = ((b * c) + (y * (z * (18.0 * (t * x))))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
else
tmp = (t * ((a * -4.0) - ((z * y) * (x * -18.0)))) - (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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -2.3e-35], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(z * y), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+44], N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(z * N[(18.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(z * y), $MachinePrecision] * N[(x * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{-35}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(z \cdot y\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - i \cdot \left(x \cdot 4\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+44}:\\
\;\;\;\;\left(b \cdot c + y \cdot \left(z \cdot \left(18 \cdot \left(t \cdot x\right)\right)\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot y\right) \cdot \left(x \cdot -18\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if t < -2.2999999999999999e-35Initial program 89.9%
Simplified92.9%
Taylor expanded in x around inf 78.1%
*-commutative78.1%
associate-*r*78.1%
Simplified78.1%
if -2.2999999999999999e-35 < t < 1.15000000000000002e44Initial program 82.0%
Simplified82.9%
Taylor expanded in y around inf 88.6%
Taylor expanded in a around 0 84.9%
associate-*r*88.7%
associate-*r*88.7%
Simplified88.7%
if 1.15000000000000002e44 < t Initial program 75.1%
Taylor expanded in t around -inf 87.9%
associate-*r*87.9%
neg-mul-187.9%
cancel-sign-sub-inv87.9%
metadata-eval87.9%
*-commutative87.9%
associate-*r*87.9%
Simplified87.9%
Final simplification85.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* x (* i 4.0)) (* j (* k 27.0)))))
(if (<= y 1.5e+29)
(- (+ (* b c) (* t (- (* (* z y) (* x 18.0)) (* a 4.0)))) t_1)
(- (+ (* b c) (* y (* z (* 18.0 (* t x))))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (i * 4.0)) + (j * (k * 27.0));
double tmp;
if (y <= 1.5e+29) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (y * (z * (18.0 * (t * x))))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (x * (i * 4.0d0)) + (j * (k * 27.0d0))
if (y <= 1.5d+29) then
tmp = ((b * c) + (t * (((z * y) * (x * 18.0d0)) - (a * 4.0d0)))) - t_1
else
tmp = ((b * c) + (y * (z * (18.0d0 * (t * x))))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (i * 4.0)) + (j * (k * 27.0));
double tmp;
if (y <= 1.5e+29) {
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - t_1;
} else {
tmp = ((b * c) + (y * (z * (18.0 * (t * x))))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * (i * 4.0)) + (j * (k * 27.0)) tmp = 0 if y <= 1.5e+29: tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - t_1 else: tmp = ((b * c) + (y * (z * (18.0 * (t * x))))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0))) tmp = 0.0 if (y <= 1.5e+29) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(z * y) * Float64(x * 18.0)) - Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(y * Float64(z * Float64(18.0 * Float64(t * x))))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * (i * 4.0)) + (j * (k * 27.0));
tmp = 0.0;
if (y <= 1.5e+29)
tmp = ((b * c) + (t * (((z * y) * (x * 18.0)) - (a * 4.0)))) - t_1;
else
tmp = ((b * c) + (y * (z * (18.0 * (t * x))))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.5e+29], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(z * y), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(y * N[(z * N[(18.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\\
\mathbf{if}\;y \leq 1.5 \cdot 10^{+29}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(z \cdot y\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + y \cdot \left(z \cdot \left(18 \cdot \left(t \cdot x\right)\right)\right)\right) - t\_1\\
\end{array}
\end{array}
if y < 1.5e29Initial program 87.2%
Simplified90.9%
if 1.5e29 < y Initial program 70.3%
Simplified73.4%
Taylor expanded in y around inf 87.0%
Taylor expanded in a around 0 83.8%
associate-*r*85.6%
associate-*r*85.6%
Simplified85.6%
Final simplification89.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j 27.0))))
(if (or (<= t_1 -1e+46) (not (<= t_1 1e+117)))
(+ (* j (* k -27.0)) (* i (* x -4.0)))
(- (* b c) (* (* t a) 4.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if ((t_1 <= -1e+46) || !(t_1 <= 1e+117)) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} else {
tmp = (b * c) - ((t * a) * 4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (j * 27.0d0)
if ((t_1 <= (-1d+46)) .or. (.not. (t_1 <= 1d+117))) then
tmp = (j * (k * (-27.0d0))) + (i * (x * (-4.0d0)))
else
tmp = (b * c) - ((t * a) * 4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * 27.0);
double tmp;
if ((t_1 <= -1e+46) || !(t_1 <= 1e+117)) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} else {
tmp = (b * c) - ((t * a) * 4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * 27.0) tmp = 0 if (t_1 <= -1e+46) or not (t_1 <= 1e+117): tmp = (j * (k * -27.0)) + (i * (x * -4.0)) else: tmp = (b * c) - ((t * a) * 4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if ((t_1 <= -1e+46) || !(t_1 <= 1e+117)) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(i * Float64(x * -4.0))); else tmp = Float64(Float64(b * c) - Float64(Float64(t * a) * 4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * 27.0);
tmp = 0.0;
if ((t_1 <= -1e+46) || ~((t_1 <= 1e+117)))
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
else
tmp = (b * c) - ((t * a) * 4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+46], N[Not[LessEqual[t$95$1, 1e+117]], $MachinePrecision]], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+46} \lor \neg \left(t\_1 \leq 10^{+117}\right):\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(t \cdot a\right) \cdot 4\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.9999999999999999e45 or 1.00000000000000005e117 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 82.6%
Simplified86.8%
Taylor expanded in i around inf 75.0%
metadata-eval75.0%
distribute-lft-neg-in75.0%
*-commutative75.0%
associate-*r*75.0%
distribute-rgt-neg-in75.0%
distribute-rgt-neg-in75.0%
metadata-eval75.0%
*-commutative75.0%
Simplified75.0%
if -9.9999999999999999e45 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000005e117Initial program 82.7%
Taylor expanded in x around 0 54.2%
Taylor expanded in j around 0 51.9%
Final simplification60.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* z y))) (* i 4.0)))))
(if (<= x -2.3e+48)
t_1
(if (<= x 3.1e-201)
(- (* b c) (* (* t a) 4.0))
(if (<= x 1.65e-11) (- (* b c) (* 27.0 (* j k))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (z * y))) - (i * 4.0));
double tmp;
if (x <= -2.3e+48) {
tmp = t_1;
} else if (x <= 3.1e-201) {
tmp = (b * c) - ((t * a) * 4.0);
} else if (x <= 1.65e-11) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (z * y))) - (i * 4.0d0))
if (x <= (-2.3d+48)) then
tmp = t_1
else if (x <= 3.1d-201) then
tmp = (b * c) - ((t * a) * 4.0d0)
else if (x <= 1.65d-11) then
tmp = (b * c) - (27.0d0 * (j * k))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (z * y))) - (i * 4.0));
double tmp;
if (x <= -2.3e+48) {
tmp = t_1;
} else if (x <= 3.1e-201) {
tmp = (b * c) - ((t * a) * 4.0);
} else if (x <= 1.65e-11) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (z * y))) - (i * 4.0)) tmp = 0 if x <= -2.3e+48: tmp = t_1 elif x <= 3.1e-201: tmp = (b * c) - ((t * a) * 4.0) elif x <= 1.65e-11: tmp = (b * c) - (27.0 * (j * k)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 4.0))) tmp = 0.0 if (x <= -2.3e+48) tmp = t_1; elseif (x <= 3.1e-201) tmp = Float64(Float64(b * c) - Float64(Float64(t * a) * 4.0)); elseif (x <= 1.65e-11) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (z * y))) - (i * 4.0));
tmp = 0.0;
if (x <= -2.3e+48)
tmp = t_1;
elseif (x <= 3.1e-201)
tmp = (b * c) - ((t * a) * 4.0);
elseif (x <= 1.65e-11)
tmp = (b * c) - (27.0 * (j * k));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.3e+48], t$95$1, If[LessEqual[x, 3.1e-201], N[(N[(b * c), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.65e-11], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{-201}:\\
\;\;\;\;b \cdot c - \left(t \cdot a\right) \cdot 4\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{-11}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.3e48 or 1.6500000000000001e-11 < x Initial program 73.4%
Simplified84.6%
Taylor expanded in x around inf 70.5%
if -2.3e48 < x < 3.0999999999999999e-201Initial program 93.1%
Taylor expanded in x around 0 76.1%
Taylor expanded in j around 0 59.4%
if 3.0999999999999999e-201 < x < 1.6500000000000001e-11Initial program 87.4%
Taylor expanded in x around 0 85.2%
Taylor expanded in a around 0 76.2%
Final simplification67.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -3.1e+92)
(* b c)
(if (<= (* b c) 1.4e-79)
(* 18.0 (* y (* x (* z t))))
(if (<= (* b c) 6.2e+179) (* -4.0 (* x i)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -3.1e+92) {
tmp = b * c;
} else if ((b * c) <= 1.4e-79) {
tmp = 18.0 * (y * (x * (z * t)));
} else if ((b * c) <= 6.2e+179) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-3.1d+92)) then
tmp = b * c
else if ((b * c) <= 1.4d-79) then
tmp = 18.0d0 * (y * (x * (z * t)))
else if ((b * c) <= 6.2d+179) then
tmp = (-4.0d0) * (x * i)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -3.1e+92) {
tmp = b * c;
} else if ((b * c) <= 1.4e-79) {
tmp = 18.0 * (y * (x * (z * t)));
} else if ((b * c) <= 6.2e+179) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -3.1e+92: tmp = b * c elif (b * c) <= 1.4e-79: tmp = 18.0 * (y * (x * (z * t))) elif (b * c) <= 6.2e+179: tmp = -4.0 * (x * i) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -3.1e+92) tmp = Float64(b * c); elseif (Float64(b * c) <= 1.4e-79) tmp = Float64(18.0 * Float64(y * Float64(x * Float64(z * t)))); elseif (Float64(b * c) <= 6.2e+179) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -3.1e+92)
tmp = b * c;
elseif ((b * c) <= 1.4e-79)
tmp = 18.0 * (y * (x * (z * t)));
elseif ((b * c) <= 6.2e+179)
tmp = -4.0 * (x * i);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -3.1e+92], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.4e-79], N[(18.0 * N[(y * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.2e+179], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -3.1 \cdot 10^{+92}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{-79}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 6.2 \cdot 10^{+179}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.1000000000000002e92 or 6.2e179 < (*.f64 b c) Initial program 81.4%
Simplified83.0%
Taylor expanded in y around inf 78.5%
Taylor expanded in b around inf 64.5%
if -3.1000000000000002e92 < (*.f64 b c) < 1.40000000000000006e-79Initial program 81.0%
Simplified85.4%
Taylor expanded in z around -inf 72.7%
Taylor expanded in z around inf 30.2%
associate-*r*29.6%
Simplified29.6%
Taylor expanded in t around 0 30.2%
associate-*r*30.2%
*-commutative30.2%
associate-*r*33.8%
associate-*r*35.0%
*-commutative35.0%
associate-*l*35.6%
Simplified35.6%
if 1.40000000000000006e-79 < (*.f64 b c) < 6.2e179Initial program 89.4%
Simplified93.6%
Taylor expanded in y around inf 81.4%
Taylor expanded in i around inf 41.9%
*-commutative41.9%
Simplified41.9%
Final simplification45.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -1.56e+155)
(* b c)
(if (<= (* b c) 1.05e-58)
(* k (* j -27.0))
(if (<= (* b c) 6.4e+178) (* -4.0 (* x i)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.56e+155) {
tmp = b * c;
} else if ((b * c) <= 1.05e-58) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 6.4e+178) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-1.56d+155)) then
tmp = b * c
else if ((b * c) <= 1.05d-58) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 6.4d+178) then
tmp = (-4.0d0) * (x * i)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.56e+155) {
tmp = b * c;
} else if ((b * c) <= 1.05e-58) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 6.4e+178) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1.56e+155: tmp = b * c elif (b * c) <= 1.05e-58: tmp = k * (j * -27.0) elif (b * c) <= 6.4e+178: tmp = -4.0 * (x * i) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1.56e+155) tmp = Float64(b * c); elseif (Float64(b * c) <= 1.05e-58) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 6.4e+178) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -1.56e+155)
tmp = b * c;
elseif ((b * c) <= 1.05e-58)
tmp = k * (j * -27.0);
elseif ((b * c) <= 6.4e+178)
tmp = -4.0 * (x * i);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1.56e+155], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.05e-58], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.4e+178], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.56 \cdot 10^{+155}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 1.05 \cdot 10^{-58}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 6.4 \cdot 10^{+178}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.5600000000000001e155 or 6.4e178 < (*.f64 b c) Initial program 84.4%
Simplified83.2%
Taylor expanded in y around inf 79.5%
Taylor expanded in b around inf 72.0%
if -1.5600000000000001e155 < (*.f64 b c) < 1.04999999999999994e-58Initial program 79.6%
Simplified85.6%
Taylor expanded in j around inf 29.5%
associate-*r*29.5%
Simplified29.5%
if 1.04999999999999994e-58 < (*.f64 b c) < 6.4e178Initial program 90.8%
Simplified95.3%
Taylor expanded in y around inf 84.2%
Taylor expanded in i around inf 43.2%
*-commutative43.2%
Simplified43.2%
Final simplification42.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -2.6e+155)
(* b c)
(if (<= (* b c) 2.6e-58)
(* -27.0 (* j k))
(if (<= (* b c) 1.05e+180) (* -4.0 (* x i)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -2.6e+155) {
tmp = b * c;
} else if ((b * c) <= 2.6e-58) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 1.05e+180) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-2.6d+155)) then
tmp = b * c
else if ((b * c) <= 2.6d-58) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 1.05d+180) then
tmp = (-4.0d0) * (x * i)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -2.6e+155) {
tmp = b * c;
} else if ((b * c) <= 2.6e-58) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 1.05e+180) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -2.6e+155: tmp = b * c elif (b * c) <= 2.6e-58: tmp = -27.0 * (j * k) elif (b * c) <= 1.05e+180: tmp = -4.0 * (x * i) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -2.6e+155) tmp = Float64(b * c); elseif (Float64(b * c) <= 2.6e-58) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 1.05e+180) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -2.6e+155)
tmp = b * c;
elseif ((b * c) <= 2.6e-58)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 1.05e+180)
tmp = -4.0 * (x * i);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -2.6e+155], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.6e-58], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.05e+180], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.6 \cdot 10^{+155}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 2.6 \cdot 10^{-58}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 1.05 \cdot 10^{+180}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.6000000000000002e155 or 1.05e180 < (*.f64 b c) Initial program 84.4%
Simplified83.2%
Taylor expanded in y around inf 79.5%
Taylor expanded in b around inf 72.0%
if -2.6000000000000002e155 < (*.f64 b c) < 2.60000000000000007e-58Initial program 79.6%
Simplified85.6%
Taylor expanded in j around inf 29.5%
if 2.60000000000000007e-58 < (*.f64 b c) < 1.05e180Initial program 90.8%
Simplified95.3%
Taylor expanded in y around inf 84.2%
Taylor expanded in i around inf 43.2%
*-commutative43.2%
Simplified43.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -1.4e+48) (not (<= x 3.6e+111))) (* x (- (* 18.0 (* t (* z y))) (* i 4.0))) (- (- (* b c) (* (* t a) 4.0)) (* k (* j 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.4e+48) || !(x <= 3.6e+111)) {
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
} else {
tmp = ((b * c) - ((t * a) * 4.0)) - (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.
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.4d+48)) .or. (.not. (x <= 3.6d+111))) then
tmp = x * ((18.0d0 * (t * (z * y))) - (i * 4.0d0))
else
tmp = ((b * c) - ((t * a) * 4.0d0)) - (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;
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.4e+48) || !(x <= 3.6e+111)) {
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
} else {
tmp = ((b * c) - ((t * a) * 4.0)) - (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]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -1.4e+48) or not (x <= 3.6e+111): tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0)) else: tmp = ((b * c) - ((t * a) * 4.0)) - (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]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -1.4e+48) || !(x <= 3.6e+111)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - Float64(i * 4.0))); else tmp = Float64(Float64(Float64(b * c) - Float64(Float64(t * a) * 4.0)) - 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -1.4e+48) || ~((x <= 3.6e+111)))
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
else
tmp = ((b * c) - ((t * a) * 4.0)) - (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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -1.4e+48], N[Not[LessEqual[x, 3.6e+111]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{+48} \lor \neg \left(x \leq 3.6 \cdot 10^{+111}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - \left(t \cdot a\right) \cdot 4\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if x < -1.40000000000000006e48 or 3.6000000000000002e111 < x Initial program 69.7%
Simplified81.3%
Taylor expanded in x around inf 74.0%
if -1.40000000000000006e48 < x < 3.6000000000000002e111Initial program 91.1%
Taylor expanded in x around 0 76.5%
Final simplification75.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= a -2.4e+197)
(* t (- (/ (* b c) t) (* a 4.0)))
(if (<= a 32000.0)
(- (* b c) (* k (* j 27.0)))
(if (<= a 8.8e+94)
(* z (* -18.0 (* (* t y) (- x))))
(- (* b c) (* (* t a) 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (a <= -2.4e+197) {
tmp = t * (((b * c) / t) - (a * 4.0));
} else if (a <= 32000.0) {
tmp = (b * c) - (k * (j * 27.0));
} else if (a <= 8.8e+94) {
tmp = z * (-18.0 * ((t * y) * -x));
} else {
tmp = (b * c) - ((t * a) * 4.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (a <= (-2.4d+197)) then
tmp = t * (((b * c) / t) - (a * 4.0d0))
else if (a <= 32000.0d0) then
tmp = (b * c) - (k * (j * 27.0d0))
else if (a <= 8.8d+94) then
tmp = z * ((-18.0d0) * ((t * y) * -x))
else
tmp = (b * c) - ((t * a) * 4.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (a <= -2.4e+197) {
tmp = t * (((b * c) / t) - (a * 4.0));
} else if (a <= 32000.0) {
tmp = (b * c) - (k * (j * 27.0));
} else if (a <= 8.8e+94) {
tmp = z * (-18.0 * ((t * y) * -x));
} else {
tmp = (b * c) - ((t * a) * 4.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if a <= -2.4e+197: tmp = t * (((b * c) / t) - (a * 4.0)) elif a <= 32000.0: tmp = (b * c) - (k * (j * 27.0)) elif a <= 8.8e+94: tmp = z * (-18.0 * ((t * y) * -x)) else: tmp = (b * c) - ((t * a) * 4.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (a <= -2.4e+197) tmp = Float64(t * Float64(Float64(Float64(b * c) / t) - Float64(a * 4.0))); elseif (a <= 32000.0) tmp = Float64(Float64(b * c) - Float64(k * Float64(j * 27.0))); elseif (a <= 8.8e+94) tmp = Float64(z * Float64(-18.0 * Float64(Float64(t * y) * Float64(-x)))); else tmp = Float64(Float64(b * c) - Float64(Float64(t * a) * 4.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (a <= -2.4e+197)
tmp = t * (((b * c) / t) - (a * 4.0));
elseif (a <= 32000.0)
tmp = (b * c) - (k * (j * 27.0));
elseif (a <= 8.8e+94)
tmp = z * (-18.0 * ((t * y) * -x));
else
tmp = (b * c) - ((t * a) * 4.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[a, -2.4e+197], N[(t * N[(N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 32000.0], N[(N[(b * c), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.8e+94], N[(z * N[(-18.0 * N[(N[(t * y), $MachinePrecision] * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{+197}:\\
\;\;\;\;t \cdot \left(\frac{b \cdot c}{t} - a \cdot 4\right)\\
\mathbf{elif}\;a \leq 32000:\\
\;\;\;\;b \cdot c - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{+94}:\\
\;\;\;\;z \cdot \left(-18 \cdot \left(\left(t \cdot y\right) \cdot \left(-x\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(t \cdot a\right) \cdot 4\\
\end{array}
\end{array}
if a < -2.3999999999999999e197Initial program 82.7%
Taylor expanded in x around 0 86.3%
Taylor expanded in t around inf 86.3%
Taylor expanded in j around 0 83.0%
if -2.3999999999999999e197 < a < 32000Initial program 85.4%
Taylor expanded in x around 0 58.1%
Taylor expanded in t around inf 52.6%
Taylor expanded in t around 0 53.2%
if 32000 < a < 8.80000000000000047e94Initial program 71.6%
Simplified71.2%
Taylor expanded in z around -inf 71.0%
Taylor expanded in z around inf 48.1%
associate-*r*42.7%
Simplified42.7%
mul-1-neg42.7%
associate-*r*48.1%
associate-*r*48.1%
*-commutative48.1%
associate-*r*42.7%
Applied egg-rr42.7%
if 8.80000000000000047e94 < a Initial program 75.6%
Taylor expanded in x around 0 66.0%
Taylor expanded in j around 0 66.4%
Final simplification58.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* (* t a) 4.0))))
(if (<= a -8.2e+188)
t_1
(if (<= a 21000.0)
(- (* b c) (* k (* j 27.0)))
(if (<= a 5.5e+94) (* z (* -18.0 (* (* t y) (- x)))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((t * a) * 4.0);
double tmp;
if (a <= -8.2e+188) {
tmp = t_1;
} else if (a <= 21000.0) {
tmp = (b * c) - (k * (j * 27.0));
} else if (a <= 5.5e+94) {
tmp = z * (-18.0 * ((t * y) * -x));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - ((t * a) * 4.0d0)
if (a <= (-8.2d+188)) then
tmp = t_1
else if (a <= 21000.0d0) then
tmp = (b * c) - (k * (j * 27.0d0))
else if (a <= 5.5d+94) then
tmp = z * ((-18.0d0) * ((t * y) * -x))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((t * a) * 4.0);
double tmp;
if (a <= -8.2e+188) {
tmp = t_1;
} else if (a <= 21000.0) {
tmp = (b * c) - (k * (j * 27.0));
} else if (a <= 5.5e+94) {
tmp = z * (-18.0 * ((t * y) * -x));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - ((t * a) * 4.0) tmp = 0 if a <= -8.2e+188: tmp = t_1 elif a <= 21000.0: tmp = (b * c) - (k * (j * 27.0)) elif a <= 5.5e+94: tmp = z * (-18.0 * ((t * y) * -x)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(Float64(t * a) * 4.0)) tmp = 0.0 if (a <= -8.2e+188) tmp = t_1; elseif (a <= 21000.0) tmp = Float64(Float64(b * c) - Float64(k * Float64(j * 27.0))); elseif (a <= 5.5e+94) tmp = Float64(z * Float64(-18.0 * Float64(Float64(t * y) * Float64(-x)))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - ((t * a) * 4.0);
tmp = 0.0;
if (a <= -8.2e+188)
tmp = t_1;
elseif (a <= 21000.0)
tmp = (b * c) - (k * (j * 27.0));
elseif (a <= 5.5e+94)
tmp = z * (-18.0 * ((t * y) * -x));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.2e+188], t$95$1, If[LessEqual[a, 21000.0], N[(N[(b * c), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e+94], N[(z * N[(-18.0 * N[(N[(t * y), $MachinePrecision] * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - \left(t \cdot a\right) \cdot 4\\
\mathbf{if}\;a \leq -8.2 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 21000:\\
\;\;\;\;b \cdot c - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{+94}:\\
\;\;\;\;z \cdot \left(-18 \cdot \left(\left(t \cdot y\right) \cdot \left(-x\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.2e188 or 5.4999999999999997e94 < a Initial program 78.6%
Taylor expanded in x around 0 74.5%
Taylor expanded in j around 0 73.4%
if -8.2e188 < a < 21000Initial program 85.4%
Taylor expanded in x around 0 58.1%
Taylor expanded in t around inf 52.6%
Taylor expanded in t around 0 53.2%
if 21000 < a < 5.4999999999999997e94Initial program 71.6%
Simplified71.2%
Taylor expanded in z around -inf 71.0%
Taylor expanded in z around inf 48.1%
associate-*r*42.7%
Simplified42.7%
mul-1-neg42.7%
associate-*r*48.1%
associate-*r*48.1%
*-commutative48.1%
associate-*r*42.7%
Applied egg-rr42.7%
Final simplification58.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -1.25e+48)
(* z (* x (- (* 4.0 (- (/ i z))) (* -18.0 (* t y)))))
(if (<= x 1.02e+103)
(- (- (* b c) (* (* t a) 4.0)) (* k (* j 27.0)))
(* x (- (* 18.0 (* t (* z y))) (* i 4.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.25e+48) {
tmp = z * (x * ((4.0 * -(i / z)) - (-18.0 * (t * y))));
} else if (x <= 1.02e+103) {
tmp = ((b * c) - ((t * a) * 4.0)) - (k * (j * 27.0));
} else {
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-1.25d+48)) then
tmp = z * (x * ((4.0d0 * -(i / z)) - ((-18.0d0) * (t * y))))
else if (x <= 1.02d+103) then
tmp = ((b * c) - ((t * a) * 4.0d0)) - (k * (j * 27.0d0))
else
tmp = x * ((18.0d0 * (t * (z * y))) - (i * 4.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.25e+48) {
tmp = z * (x * ((4.0 * -(i / z)) - (-18.0 * (t * y))));
} else if (x <= 1.02e+103) {
tmp = ((b * c) - ((t * a) * 4.0)) - (k * (j * 27.0));
} else {
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -1.25e+48: tmp = z * (x * ((4.0 * -(i / z)) - (-18.0 * (t * y)))) elif x <= 1.02e+103: tmp = ((b * c) - ((t * a) * 4.0)) - (k * (j * 27.0)) else: tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -1.25e+48) tmp = Float64(z * Float64(x * Float64(Float64(4.0 * Float64(-Float64(i / z))) - Float64(-18.0 * Float64(t * y))))); elseif (x <= 1.02e+103) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(t * a) * 4.0)) - Float64(k * Float64(j * 27.0))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(z * y))) - 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -1.25e+48)
tmp = z * (x * ((4.0 * -(i / z)) - (-18.0 * (t * y))));
elseif (x <= 1.02e+103)
tmp = ((b * c) - ((t * a) * 4.0)) - (k * (j * 27.0));
else
tmp = x * ((18.0 * (t * (z * y))) - (i * 4.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -1.25e+48], N[(z * N[(x * N[(N[(4.0 * (-N[(i / z), $MachinePrecision])), $MachinePrecision] - N[(-18.0 * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.02e+103], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(z * y), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{+48}:\\
\;\;\;\;z \cdot \left(x \cdot \left(4 \cdot \left(-\frac{i}{z}\right) - -18 \cdot \left(t \cdot y\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{+103}:\\
\;\;\;\;\left(b \cdot c - \left(t \cdot a\right) \cdot 4\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(z \cdot y\right)\right) - i \cdot 4\right)\\
\end{array}
\end{array}
if x < -1.24999999999999993e48Initial program 67.0%
Simplified78.0%
Taylor expanded in z around -inf 67.5%
Taylor expanded in x around inf 75.2%
if -1.24999999999999993e48 < x < 1.01999999999999991e103Initial program 91.1%
Taylor expanded in x around 0 76.5%
if 1.01999999999999991e103 < x Initial program 72.7%
Simplified85.1%
Taylor expanded in x around inf 74.7%
Final simplification75.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* (* t a) 4.0))))
(if (<= a -1.4e+189)
t_1
(if (<= a 66000.0)
(- (* b c) (* k (* j 27.0)))
(if (<= a 5.5e+94) (* 18.0 (* y (* x (* z t)))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((t * a) * 4.0);
double tmp;
if (a <= -1.4e+189) {
tmp = t_1;
} else if (a <= 66000.0) {
tmp = (b * c) - (k * (j * 27.0));
} else if (a <= 5.5e+94) {
tmp = 18.0 * (y * (x * (z * t)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - ((t * a) * 4.0d0)
if (a <= (-1.4d+189)) then
tmp = t_1
else if (a <= 66000.0d0) then
tmp = (b * c) - (k * (j * 27.0d0))
else if (a <= 5.5d+94) then
tmp = 18.0d0 * (y * (x * (z * t)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((t * a) * 4.0);
double tmp;
if (a <= -1.4e+189) {
tmp = t_1;
} else if (a <= 66000.0) {
tmp = (b * c) - (k * (j * 27.0));
} else if (a <= 5.5e+94) {
tmp = 18.0 * (y * (x * (z * t)));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - ((t * a) * 4.0) tmp = 0 if a <= -1.4e+189: tmp = t_1 elif a <= 66000.0: tmp = (b * c) - (k * (j * 27.0)) elif a <= 5.5e+94: tmp = 18.0 * (y * (x * (z * t))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(Float64(t * a) * 4.0)) tmp = 0.0 if (a <= -1.4e+189) tmp = t_1; elseif (a <= 66000.0) tmp = Float64(Float64(b * c) - Float64(k * Float64(j * 27.0))); elseif (a <= 5.5e+94) tmp = Float64(18.0 * Float64(y * Float64(x * Float64(z * t)))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - ((t * a) * 4.0);
tmp = 0.0;
if (a <= -1.4e+189)
tmp = t_1;
elseif (a <= 66000.0)
tmp = (b * c) - (k * (j * 27.0));
elseif (a <= 5.5e+94)
tmp = 18.0 * (y * (x * (z * t)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e+189], t$95$1, If[LessEqual[a, 66000.0], N[(N[(b * c), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e+94], N[(18.0 * N[(y * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - \left(t \cdot a\right) \cdot 4\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{+189}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 66000:\\
\;\;\;\;b \cdot c - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{+94}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.40000000000000003e189 or 5.4999999999999997e94 < a Initial program 78.6%
Taylor expanded in x around 0 74.5%
Taylor expanded in j around 0 73.4%
if -1.40000000000000003e189 < a < 66000Initial program 85.4%
Taylor expanded in x around 0 58.1%
Taylor expanded in t around inf 52.6%
Taylor expanded in t around 0 53.2%
if 66000 < a < 5.4999999999999997e94Initial program 71.6%
Simplified71.2%
Taylor expanded in z around -inf 71.0%
Taylor expanded in z around inf 48.1%
associate-*r*42.7%
Simplified42.7%
Taylor expanded in t around 0 48.1%
associate-*r*37.1%
*-commutative37.1%
associate-*r*48.2%
associate-*r*59.4%
*-commutative59.4%
associate-*l*59.4%
Simplified59.4%
Final simplification59.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* (* t a) 4.0))))
(if (<= a -8e+188)
t_1
(if (<= a 75000.0)
(+ (* j (* k -27.0)) (* b c))
(if (<= a 5.5e+94) (* 18.0 (* y (* x (* z t)))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((t * a) * 4.0);
double tmp;
if (a <= -8e+188) {
tmp = t_1;
} else if (a <= 75000.0) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (a <= 5.5e+94) {
tmp = 18.0 * (y * (x * (z * t)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - ((t * a) * 4.0d0)
if (a <= (-8d+188)) then
tmp = t_1
else if (a <= 75000.0d0) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else if (a <= 5.5d+94) then
tmp = 18.0d0 * (y * (x * (z * t)))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((t * a) * 4.0);
double tmp;
if (a <= -8e+188) {
tmp = t_1;
} else if (a <= 75000.0) {
tmp = (j * (k * -27.0)) + (b * c);
} else if (a <= 5.5e+94) {
tmp = 18.0 * (y * (x * (z * t)));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - ((t * a) * 4.0) tmp = 0 if a <= -8e+188: tmp = t_1 elif a <= 75000.0: tmp = (j * (k * -27.0)) + (b * c) elif a <= 5.5e+94: tmp = 18.0 * (y * (x * (z * t))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(Float64(t * a) * 4.0)) tmp = 0.0 if (a <= -8e+188) tmp = t_1; elseif (a <= 75000.0) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); elseif (a <= 5.5e+94) tmp = Float64(18.0 * Float64(y * Float64(x * Float64(z * t)))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - ((t * a) * 4.0);
tmp = 0.0;
if (a <= -8e+188)
tmp = t_1;
elseif (a <= 75000.0)
tmp = (j * (k * -27.0)) + (b * c);
elseif (a <= 5.5e+94)
tmp = 18.0 * (y * (x * (z * t)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(N[(t * a), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8e+188], t$95$1, If[LessEqual[a, 75000.0], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e+94], N[(18.0 * N[(y * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - \left(t \cdot a\right) \cdot 4\\
\mathbf{if}\;a \leq -8 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 75000:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{+94}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.0000000000000002e188 or 5.4999999999999997e94 < a Initial program 78.6%
Taylor expanded in x around 0 74.5%
Taylor expanded in j around 0 73.4%
if -8.0000000000000002e188 < a < 75000Initial program 85.4%
Simplified87.9%
Taylor expanded in b around inf 53.3%
if 75000 < a < 5.4999999999999997e94Initial program 71.6%
Simplified71.2%
Taylor expanded in z around -inf 71.0%
Taylor expanded in z around inf 48.1%
associate-*r*42.7%
Simplified42.7%
Taylor expanded in t around 0 48.1%
associate-*r*37.1%
*-commutative37.1%
associate-*r*48.2%
associate-*r*59.4%
*-commutative59.4%
associate-*l*59.4%
Simplified59.4%
Final simplification59.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= i -8.4e+111) (not (<= i 2.2e+130))) (* -4.0 (* x i)) (+ (* j (* k -27.0)) (* b c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((i <= -8.4e+111) || !(i <= 2.2e+130)) {
tmp = -4.0 * (x * i);
} else {
tmp = (j * (k * -27.0)) + (b * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((i <= (-8.4d+111)) .or. (.not. (i <= 2.2d+130))) then
tmp = (-4.0d0) * (x * i)
else
tmp = (j * (k * (-27.0d0))) + (b * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((i <= -8.4e+111) || !(i <= 2.2e+130)) {
tmp = -4.0 * (x * i);
} else {
tmp = (j * (k * -27.0)) + (b * c);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (i <= -8.4e+111) or not (i <= 2.2e+130): tmp = -4.0 * (x * i) else: tmp = (j * (k * -27.0)) + (b * c) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((i <= -8.4e+111) || !(i <= 2.2e+130)) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((i <= -8.4e+111) || ~((i <= 2.2e+130)))
tmp = -4.0 * (x * i);
else
tmp = (j * (k * -27.0)) + (b * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[i, -8.4e+111], N[Not[LessEqual[i, 2.2e+130]], $MachinePrecision]], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;i \leq -8.4 \cdot 10^{+111} \lor \neg \left(i \leq 2.2 \cdot 10^{+130}\right):\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\end{array}
\end{array}
if i < -8.3999999999999998e111 or 2.19999999999999993e130 < i Initial program 74.1%
Simplified76.7%
Taylor expanded in y around inf 75.2%
Taylor expanded in i around inf 55.8%
*-commutative55.8%
Simplified55.8%
if -8.3999999999999998e111 < i < 2.19999999999999993e130Initial program 86.8%
Simplified90.9%
Taylor expanded in b around inf 53.2%
Final simplification54.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.8e+155) (not (<= (* b c) 2.5e+41))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.8e+155) || !((b * c) <= 2.5e+41)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.8d+155)) .or. (.not. ((b * c) <= 2.5d+41))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.8e+155) || !((b * c) <= 2.5e+41)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.8e+155) or not ((b * c) <= 2.5e+41): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.8e+155) || !(Float64(b * c) <= 2.5e+41)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.8e+155) || ~(((b * c) <= 2.5e+41)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.8e+155], N[Not[LessEqual[N[(b * c), $MachinePrecision], 2.5e+41]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.8 \cdot 10^{+155} \lor \neg \left(b \cdot c \leq 2.5 \cdot 10^{+41}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.80000000000000004e155 or 2.50000000000000011e41 < (*.f64 b c) Initial program 87.4%
Simplified86.5%
Taylor expanded in y around inf 80.4%
Taylor expanded in b around inf 59.2%
if -1.80000000000000004e155 < (*.f64 b c) < 2.50000000000000011e41Initial program 80.3%
Simplified86.7%
Taylor expanded in j around inf 29.2%
Final simplification39.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 82.7%
Simplified86.2%
Taylor expanded in y around inf 80.8%
Taylor expanded in b around inf 24.0%
(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 2024130
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))