
(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 30 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(- (* b c) (- (* t (* a 4.0)) (* (* (* (* x 18.0) y) z) t)))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY)
t_1
(- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(b * c) - Float64(Float64(t * Float64(a * 4.0)) - Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((b * c) - ((t * (a * 4.0)) - ((((x * 18.0) * y) * z) * t))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(b * c), $MachinePrecision] - N[(N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(b \cdot c - \left(t \cdot \left(a \cdot 4\right) - \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 97.0%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified25.9%
Taylor expanded in t around 0 55.7%
Final simplification92.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* x i) (* t a)))) (t_2 (* (* j 27.0) k)))
(if (<= (* b c) -1.95e+83)
(- (* b c) (* 4.0 (* t a)))
(if (<= (* b c) 1.85e-261)
(- (* -4.0 (* t a)) t_2)
(if (<= (* b c) 9e-105)
(- (* i (* x -4.0)) t_2)
(if (<= (* b c) 3.05e-16)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= (* b c) 1.7e+90)
t_1
(if (<= (* b c) 7.4e+152)
(- (* b c) t_2)
(if (<= (* b c) 9.6e+225)
t_1
(+ (* b c) (* j (* k -27.0))))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((x * i) + (t * a));
double t_2 = (j * 27.0) * k;
double tmp;
if ((b * c) <= -1.95e+83) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= 1.85e-261) {
tmp = (-4.0 * (t * a)) - t_2;
} else if ((b * c) <= 9e-105) {
tmp = (i * (x * -4.0)) - t_2;
} else if ((b * c) <= 3.05e-16) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if ((b * c) <= 1.7e+90) {
tmp = t_1;
} else if ((b * c) <= 7.4e+152) {
tmp = (b * c) - t_2;
} else if ((b * c) <= 9.6e+225) {
tmp = t_1;
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * ((x * i) + (t * a))
t_2 = (j * 27.0d0) * k
if ((b * c) <= (-1.95d+83)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if ((b * c) <= 1.85d-261) then
tmp = ((-4.0d0) * (t * a)) - t_2
else if ((b * c) <= 9d-105) then
tmp = (i * (x * (-4.0d0))) - t_2
else if ((b * c) <= 3.05d-16) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if ((b * c) <= 1.7d+90) then
tmp = t_1
else if ((b * c) <= 7.4d+152) then
tmp = (b * c) - t_2
else if ((b * c) <= 9.6d+225) then
tmp = t_1
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((x * i) + (t * a));
double t_2 = (j * 27.0) * k;
double tmp;
if ((b * c) <= -1.95e+83) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= 1.85e-261) {
tmp = (-4.0 * (t * a)) - t_2;
} else if ((b * c) <= 9e-105) {
tmp = (i * (x * -4.0)) - t_2;
} else if ((b * c) <= 3.05e-16) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if ((b * c) <= 1.7e+90) {
tmp = t_1;
} else if ((b * c) <= 7.4e+152) {
tmp = (b * c) - t_2;
} else if ((b * c) <= 9.6e+225) {
tmp = t_1;
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((x * i) + (t * a)) t_2 = (j * 27.0) * k tmp = 0 if (b * c) <= -1.95e+83: tmp = (b * c) - (4.0 * (t * a)) elif (b * c) <= 1.85e-261: tmp = (-4.0 * (t * a)) - t_2 elif (b * c) <= 9e-105: tmp = (i * (x * -4.0)) - t_2 elif (b * c) <= 3.05e-16: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif (b * c) <= 1.7e+90: tmp = t_1 elif (b * c) <= 7.4e+152: tmp = (b * c) - t_2 elif (b * c) <= 9.6e+225: tmp = t_1 else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (Float64(b * c) <= -1.95e+83) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (Float64(b * c) <= 1.85e-261) tmp = Float64(Float64(-4.0 * Float64(t * a)) - t_2); elseif (Float64(b * c) <= 9e-105) tmp = Float64(Float64(i * Float64(x * -4.0)) - t_2); elseif (Float64(b * c) <= 3.05e-16) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (Float64(b * c) <= 1.7e+90) tmp = t_1; elseif (Float64(b * c) <= 7.4e+152) tmp = Float64(Float64(b * c) - t_2); elseif (Float64(b * c) <= 9.6e+225) tmp = t_1; else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((x * i) + (t * a));
t_2 = (j * 27.0) * k;
tmp = 0.0;
if ((b * c) <= -1.95e+83)
tmp = (b * c) - (4.0 * (t * a));
elseif ((b * c) <= 1.85e-261)
tmp = (-4.0 * (t * a)) - t_2;
elseif ((b * c) <= 9e-105)
tmp = (i * (x * -4.0)) - t_2;
elseif ((b * c) <= 3.05e-16)
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
elseif ((b * c) <= 1.7e+90)
tmp = t_1;
elseif ((b * c) <= 7.4e+152)
tmp = (b * c) - t_2;
elseif ((b * c) <= 9.6e+225)
tmp = t_1;
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.95e+83], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.85e-261], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9e-105], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.05e-16], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.7e+90], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 7.4e+152], N[(N[(b * c), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.6e+225], t$95$1, N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+83}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq 1.85 \cdot 10^{-261}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - t\_2\\
\mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{-105}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) - t\_2\\
\mathbf{elif}\;b \cdot c \leq 3.05 \cdot 10^{-16}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;b \cdot c \leq 1.7 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 7.4 \cdot 10^{+152}:\\
\;\;\;\;b \cdot c - t\_2\\
\mathbf{elif}\;b \cdot c \leq 9.6 \cdot 10^{+225}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.9500000000000001e83Initial program 77.6%
Simplified75.3%
associate-*r*80.1%
distribute-rgt-out--77.6%
associate-+l-77.6%
associate-*l*75.0%
fma-neg75.0%
associate-*l*75.0%
associate-*l*75.0%
fma-neg77.5%
Applied egg-rr77.5%
fma-undefine77.5%
unsub-neg77.5%
associate-*r*77.5%
*-commutative77.5%
associate-*r*77.5%
fma-undefine75.0%
unsub-neg75.0%
Simplified75.0%
Taylor expanded in x around 0 82.8%
Taylor expanded in j around 0 78.0%
distribute-lft-out78.0%
*-commutative78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in x around 0 78.2%
if -1.9500000000000001e83 < (*.f64 b c) < 1.8500000000000001e-261Initial program 89.8%
Taylor expanded in t around -inf 89.1%
associate-*r*89.1%
neg-mul-189.1%
cancel-sign-sub-inv89.1%
metadata-eval89.1%
*-commutative89.1%
associate-*r*89.1%
Simplified89.1%
Taylor expanded in x around 0 79.9%
metadata-eval79.9%
*-commutative79.9%
distribute-lft-neg-in79.9%
*-commutative79.9%
associate-*r*79.9%
distribute-rgt-neg-in79.9%
distribute-rgt-neg-in79.9%
metadata-eval79.9%
Simplified79.9%
Taylor expanded in t around inf 60.0%
if 1.8500000000000001e-261 < (*.f64 b c) < 8.9999999999999995e-105Initial program 92.2%
Taylor expanded in t around -inf 84.8%
associate-*r*84.8%
neg-mul-184.8%
cancel-sign-sub-inv84.8%
metadata-eval84.8%
*-commutative84.8%
associate-*r*81.0%
Simplified81.0%
Taylor expanded in x around 0 81.0%
metadata-eval81.0%
*-commutative81.0%
distribute-lft-neg-in81.0%
*-commutative81.0%
associate-*r*81.0%
distribute-rgt-neg-in81.0%
distribute-rgt-neg-in81.0%
metadata-eval81.0%
Simplified81.0%
Taylor expanded in x around inf 73.8%
*-commutative73.8%
*-commutative73.8%
*-commutative73.8%
associate-*r*73.8%
Simplified73.8%
if 8.9999999999999995e-105 < (*.f64 b c) < 3.04999999999999976e-16Initial program 92.3%
Simplified92.3%
Taylor expanded in x around inf 85.8%
if 3.04999999999999976e-16 < (*.f64 b c) < 1.70000000000000009e90 or 7.39999999999999992e152 < (*.f64 b c) < 9.6000000000000004e225Initial program 85.2%
Simplified85.2%
associate-*r*85.2%
distribute-rgt-out--85.2%
associate-+l-85.2%
associate-*l*85.2%
fma-neg85.2%
associate-*l*85.2%
associate-*l*85.2%
fma-neg85.2%
Applied egg-rr85.2%
fma-undefine85.2%
unsub-neg85.2%
associate-*r*85.2%
*-commutative85.2%
associate-*r*85.2%
fma-undefine85.2%
unsub-neg85.2%
Simplified85.2%
Taylor expanded in x around 0 96.3%
Taylor expanded in j around 0 81.9%
distribute-lft-out81.9%
*-commutative81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in b around 0 71.4%
if 1.70000000000000009e90 < (*.f64 b c) < 7.39999999999999992e152Initial program 76.7%
Taylor expanded in t around -inf 84.2%
associate-*r*84.2%
neg-mul-184.2%
cancel-sign-sub-inv84.2%
metadata-eval84.2%
*-commutative84.2%
associate-*r*84.2%
Simplified84.2%
Taylor expanded in x around 0 67.4%
metadata-eval67.4%
*-commutative67.4%
distribute-lft-neg-in67.4%
*-commutative67.4%
associate-*r*67.4%
distribute-rgt-neg-in67.4%
distribute-rgt-neg-in67.4%
metadata-eval67.4%
Simplified67.4%
Taylor expanded in b around inf 53.3%
if 9.6000000000000004e225 < (*.f64 b c) Initial program 86.6%
Simplified89.9%
Taylor expanded in b around inf 89.9%
Final simplification70.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* -4.0 (+ (* x i) (* t a))))
(t_3 (* (* j 27.0) k)))
(if (<= (* b c) -1.6e+83)
(- (* b c) (* 4.0 (* t a)))
(if (<= (* b c) 1.8e-261)
(- (* -4.0 (* t a)) t_3)
(if (<= (* b c) 1.85e-94)
(+ t_1 (* x (* i -4.0)))
(if (<= (* b c) 2.3e-63)
(* x (* 18.0 (* z (* y t))))
(if (<= (* b c) 1.35e+92)
t_2
(if (<= (* b c) 6.4e+154)
(- (* b c) t_3)
(if (<= (* b c) 9.6e+225) t_2 (+ (* b c) t_1))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * ((x * i) + (t * a));
double t_3 = (j * 27.0) * k;
double tmp;
if ((b * c) <= -1.6e+83) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= 1.8e-261) {
tmp = (-4.0 * (t * a)) - t_3;
} else if ((b * c) <= 1.85e-94) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 2.3e-63) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= 1.35e+92) {
tmp = t_2;
} else if ((b * c) <= 6.4e+154) {
tmp = (b * c) - t_3;
} else if ((b * c) <= 9.6e+225) {
tmp = t_2;
} else {
tmp = (b * c) + 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (-4.0d0) * ((x * i) + (t * a))
t_3 = (j * 27.0d0) * k
if ((b * c) <= (-1.6d+83)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if ((b * c) <= 1.8d-261) then
tmp = ((-4.0d0) * (t * a)) - t_3
else if ((b * c) <= 1.85d-94) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if ((b * c) <= 2.3d-63) then
tmp = x * (18.0d0 * (z * (y * t)))
else if ((b * c) <= 1.35d+92) then
tmp = t_2
else if ((b * c) <= 6.4d+154) then
tmp = (b * c) - t_3
else if ((b * c) <= 9.6d+225) then
tmp = t_2
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * ((x * i) + (t * a));
double t_3 = (j * 27.0) * k;
double tmp;
if ((b * c) <= -1.6e+83) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= 1.8e-261) {
tmp = (-4.0 * (t * a)) - t_3;
} else if ((b * c) <= 1.85e-94) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 2.3e-63) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= 1.35e+92) {
tmp = t_2;
} else if ((b * c) <= 6.4e+154) {
tmp = (b * c) - t_3;
} else if ((b * c) <= 9.6e+225) {
tmp = t_2;
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = -4.0 * ((x * i) + (t * a)) t_3 = (j * 27.0) * k tmp = 0 if (b * c) <= -1.6e+83: tmp = (b * c) - (4.0 * (t * a)) elif (b * c) <= 1.8e-261: tmp = (-4.0 * (t * a)) - t_3 elif (b * c) <= 1.85e-94: tmp = t_1 + (x * (i * -4.0)) elif (b * c) <= 2.3e-63: tmp = x * (18.0 * (z * (y * t))) elif (b * c) <= 1.35e+92: tmp = t_2 elif (b * c) <= 6.4e+154: tmp = (b * c) - t_3 elif (b * c) <= 9.6e+225: tmp = t_2 else: tmp = (b * c) + 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(j * Float64(k * -27.0)) t_2 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) t_3 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (Float64(b * c) <= -1.6e+83) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (Float64(b * c) <= 1.8e-261) tmp = Float64(Float64(-4.0 * Float64(t * a)) - t_3); elseif (Float64(b * c) <= 1.85e-94) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (Float64(b * c) <= 2.3e-63) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (Float64(b * c) <= 1.35e+92) tmp = t_2; elseif (Float64(b * c) <= 6.4e+154) tmp = Float64(Float64(b * c) - t_3); elseif (Float64(b * c) <= 9.6e+225) tmp = t_2; else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = -4.0 * ((x * i) + (t * a));
t_3 = (j * 27.0) * k;
tmp = 0.0;
if ((b * c) <= -1.6e+83)
tmp = (b * c) - (4.0 * (t * a));
elseif ((b * c) <= 1.8e-261)
tmp = (-4.0 * (t * a)) - t_3;
elseif ((b * c) <= 1.85e-94)
tmp = t_1 + (x * (i * -4.0));
elseif ((b * c) <= 2.3e-63)
tmp = x * (18.0 * (z * (y * t)));
elseif ((b * c) <= 1.35e+92)
tmp = t_2;
elseif ((b * c) <= 6.4e+154)
tmp = (b * c) - t_3;
elseif ((b * c) <= 9.6e+225)
tmp = t_2;
else
tmp = (b * c) + 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.6e+83], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.8e-261], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.85e-94], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.3e-63], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.35e+92], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 6.4e+154], N[(N[(b * c), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.6e+225], t$95$2, N[(N[(b * c), $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 := j \cdot \left(k \cdot -27\right)\\
t_2 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
t_3 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;b \cdot c \leq -1.6 \cdot 10^{+83}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq 1.8 \cdot 10^{-261}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - t\_3\\
\mathbf{elif}\;b \cdot c \leq 1.85 \cdot 10^{-94}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{-63}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 1.35 \cdot 10^{+92}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 6.4 \cdot 10^{+154}:\\
\;\;\;\;b \cdot c - t\_3\\
\mathbf{elif}\;b \cdot c \leq 9.6 \cdot 10^{+225}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -1.5999999999999999e83Initial program 77.6%
Simplified75.3%
associate-*r*80.1%
distribute-rgt-out--77.6%
associate-+l-77.6%
associate-*l*75.0%
fma-neg75.0%
associate-*l*75.0%
associate-*l*75.0%
fma-neg77.5%
Applied egg-rr77.5%
fma-undefine77.5%
unsub-neg77.5%
associate-*r*77.5%
*-commutative77.5%
associate-*r*77.5%
fma-undefine75.0%
unsub-neg75.0%
Simplified75.0%
Taylor expanded in x around 0 82.8%
Taylor expanded in j around 0 78.0%
distribute-lft-out78.0%
*-commutative78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in x around 0 78.2%
if -1.5999999999999999e83 < (*.f64 b c) < 1.79999999999999999e-261Initial program 89.8%
Taylor expanded in t around -inf 89.1%
associate-*r*89.1%
neg-mul-189.1%
cancel-sign-sub-inv89.1%
metadata-eval89.1%
*-commutative89.1%
associate-*r*89.1%
Simplified89.1%
Taylor expanded in x around 0 79.9%
metadata-eval79.9%
*-commutative79.9%
distribute-lft-neg-in79.9%
*-commutative79.9%
associate-*r*79.9%
distribute-rgt-neg-in79.9%
distribute-rgt-neg-in79.9%
metadata-eval79.9%
Simplified79.9%
Taylor expanded in t around inf 60.0%
if 1.79999999999999999e-261 < (*.f64 b c) < 1.8499999999999999e-94Initial program 92.5%
Simplified85.4%
Taylor expanded in i around inf 74.8%
*-commutative74.8%
*-commutative74.8%
associate-*l*74.8%
*-commutative74.8%
Simplified74.8%
if 1.8499999999999999e-94 < (*.f64 b c) < 2.3e-63Initial program 83.3%
Simplified83.3%
Taylor expanded in x around inf 100.0%
Taylor expanded in t around inf 100.0%
associate-*r*100.0%
Simplified100.0%
if 2.3e-63 < (*.f64 b c) < 1.35e92 or 6.4e154 < (*.f64 b c) < 9.6000000000000004e225Initial program 86.7%
Simplified86.7%
associate-*r*86.7%
distribute-rgt-out--86.7%
associate-+l-86.7%
associate-*l*83.3%
fma-neg83.3%
associate-*l*83.3%
associate-*l*83.3%
fma-neg83.3%
Applied egg-rr83.3%
fma-undefine83.3%
unsub-neg83.3%
associate-*r*83.3%
*-commutative83.3%
associate-*r*83.3%
fma-undefine83.3%
unsub-neg83.3%
Simplified83.3%
Taylor expanded in x around 0 93.3%
Taylor expanded in j around 0 80.7%
distribute-lft-out80.7%
*-commutative80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in b around 0 71.2%
if 1.35e92 < (*.f64 b c) < 6.4e154Initial program 81.3%
Taylor expanded in t around -inf 87.4%
associate-*r*87.4%
neg-mul-187.4%
cancel-sign-sub-inv87.4%
metadata-eval87.4%
*-commutative87.4%
associate-*r*87.4%
Simplified87.4%
Taylor expanded in x around 0 73.9%
metadata-eval73.9%
*-commutative73.9%
distribute-lft-neg-in73.9%
*-commutative73.9%
associate-*r*73.9%
distribute-rgt-neg-in73.9%
distribute-rgt-neg-in73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in b around inf 56.3%
if 9.6000000000000004e225 < (*.f64 b c) Initial program 86.6%
Simplified89.9%
Taylor expanded in b around inf 89.9%
Final simplification69.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 (* j (* k -27.0))) (t_2 (* -4.0 (+ (* x i) (* t a)))))
(if (<= (* b c) -3.1e+83)
(- (* b c) (* 4.0 (* t a)))
(if (<= (* b c) -1e-323)
(+ (* -4.0 (* t a)) (* (* j k) -27.0))
(if (<= (* b c) 1.85e-94)
(+ t_1 (* x (* i -4.0)))
(if (<= (* b c) 1.2e-62)
(* x (* 18.0 (* z (* y t))))
(if (<= (* b c) 2.9e+85)
t_2
(if (<= (* b c) 5.1e+154)
(- (* b c) (* (* j 27.0) k))
(if (<= (* b c) 9.6e+225) t_2 (+ (* b c) t_1))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -3.1e+83) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= -1e-323) {
tmp = (-4.0 * (t * a)) + ((j * k) * -27.0);
} else if ((b * c) <= 1.85e-94) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 1.2e-62) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= 2.9e+85) {
tmp = t_2;
} else if ((b * c) <= 5.1e+154) {
tmp = (b * c) - ((j * 27.0) * k);
} else if ((b * c) <= 9.6e+225) {
tmp = t_2;
} else {
tmp = (b * c) + 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) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (-4.0d0) * ((x * i) + (t * a))
if ((b * c) <= (-3.1d+83)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if ((b * c) <= (-1d-323)) then
tmp = ((-4.0d0) * (t * a)) + ((j * k) * (-27.0d0))
else if ((b * c) <= 1.85d-94) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if ((b * c) <= 1.2d-62) then
tmp = x * (18.0d0 * (z * (y * t)))
else if ((b * c) <= 2.9d+85) then
tmp = t_2
else if ((b * c) <= 5.1d+154) then
tmp = (b * c) - ((j * 27.0d0) * k)
else if ((b * c) <= 9.6d+225) then
tmp = t_2
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -3.1e+83) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= -1e-323) {
tmp = (-4.0 * (t * a)) + ((j * k) * -27.0);
} else if ((b * c) <= 1.85e-94) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 1.2e-62) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= 2.9e+85) {
tmp = t_2;
} else if ((b * c) <= 5.1e+154) {
tmp = (b * c) - ((j * 27.0) * k);
} else if ((b * c) <= 9.6e+225) {
tmp = t_2;
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = -4.0 * ((x * i) + (t * a)) tmp = 0 if (b * c) <= -3.1e+83: tmp = (b * c) - (4.0 * (t * a)) elif (b * c) <= -1e-323: tmp = (-4.0 * (t * a)) + ((j * k) * -27.0) elif (b * c) <= 1.85e-94: tmp = t_1 + (x * (i * -4.0)) elif (b * c) <= 1.2e-62: tmp = x * (18.0 * (z * (y * t))) elif (b * c) <= 2.9e+85: tmp = t_2 elif (b * c) <= 5.1e+154: tmp = (b * c) - ((j * 27.0) * k) elif (b * c) <= 9.6e+225: tmp = t_2 else: tmp = (b * c) + 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(j * Float64(k * -27.0)) t_2 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) tmp = 0.0 if (Float64(b * c) <= -3.1e+83) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (Float64(b * c) <= -1e-323) tmp = Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(j * k) * -27.0)); elseif (Float64(b * c) <= 1.85e-94) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (Float64(b * c) <= 1.2e-62) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (Float64(b * c) <= 2.9e+85) tmp = t_2; elseif (Float64(b * c) <= 5.1e+154) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); elseif (Float64(b * c) <= 9.6e+225) tmp = t_2; else tmp = Float64(Float64(b * c) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = -4.0 * ((x * i) + (t * a));
tmp = 0.0;
if ((b * c) <= -3.1e+83)
tmp = (b * c) - (4.0 * (t * a));
elseif ((b * c) <= -1e-323)
tmp = (-4.0 * (t * a)) + ((j * k) * -27.0);
elseif ((b * c) <= 1.85e-94)
tmp = t_1 + (x * (i * -4.0));
elseif ((b * c) <= 1.2e-62)
tmp = x * (18.0 * (z * (y * t)));
elseif ((b * c) <= 2.9e+85)
tmp = t_2;
elseif ((b * c) <= 5.1e+154)
tmp = (b * c) - ((j * 27.0) * k);
elseif ((b * c) <= 9.6e+225)
tmp = t_2;
else
tmp = (b * c) + 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.1e+83], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1e-323], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.85e-94], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.2e-62], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.9e+85], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 5.1e+154], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.6e+225], t$95$2, N[(N[(b * c), $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 := j \cdot \left(k \cdot -27\right)\\
t_2 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -3.1 \cdot 10^{+83}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-323}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + \left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;b \cdot c \leq 1.85 \cdot 10^{-94}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.2 \cdot 10^{-62}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2.9 \cdot 10^{+85}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 5.1 \cdot 10^{+154}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;b \cdot c \leq 9.6 \cdot 10^{+225}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -3.09999999999999992e83Initial program 77.6%
Simplified75.3%
associate-*r*80.1%
distribute-rgt-out--77.6%
associate-+l-77.6%
associate-*l*75.0%
fma-neg75.0%
associate-*l*75.0%
associate-*l*75.0%
fma-neg77.5%
Applied egg-rr77.5%
fma-undefine77.5%
unsub-neg77.5%
associate-*r*77.5%
*-commutative77.5%
associate-*r*77.5%
fma-undefine75.0%
unsub-neg75.0%
Simplified75.0%
Taylor expanded in x around 0 82.8%
Taylor expanded in j around 0 78.0%
distribute-lft-out78.0%
*-commutative78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in x around 0 78.2%
if -3.09999999999999992e83 < (*.f64 b c) < -9.88131e-324Initial program 88.8%
Simplified87.7%
Taylor expanded in t around inf 71.7%
Taylor expanded in x around 0 58.9%
if -9.88131e-324 < (*.f64 b c) < 1.8499999999999999e-94Initial program 92.0%
Simplified87.6%
Taylor expanded in i around inf 65.9%
*-commutative65.9%
*-commutative65.9%
associate-*l*65.9%
*-commutative65.9%
Simplified65.9%
if 1.8499999999999999e-94 < (*.f64 b c) < 1.19999999999999992e-62Initial program 83.3%
Simplified83.3%
Taylor expanded in x around inf 100.0%
Taylor expanded in t around inf 100.0%
associate-*r*100.0%
Simplified100.0%
if 1.19999999999999992e-62 < (*.f64 b c) < 2.89999999999999997e85 or 5.0999999999999999e154 < (*.f64 b c) < 9.6000000000000004e225Initial program 86.7%
Simplified86.7%
associate-*r*86.7%
distribute-rgt-out--86.7%
associate-+l-86.7%
associate-*l*83.3%
fma-neg83.3%
associate-*l*83.3%
associate-*l*83.3%
fma-neg83.3%
Applied egg-rr83.3%
fma-undefine83.3%
unsub-neg83.3%
associate-*r*83.3%
*-commutative83.3%
associate-*r*83.3%
fma-undefine83.3%
unsub-neg83.3%
Simplified83.3%
Taylor expanded in x around 0 93.3%
Taylor expanded in j around 0 80.7%
distribute-lft-out80.7%
*-commutative80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in b around 0 71.2%
if 2.89999999999999997e85 < (*.f64 b c) < 5.0999999999999999e154Initial program 81.3%
Taylor expanded in t around -inf 87.4%
associate-*r*87.4%
neg-mul-187.4%
cancel-sign-sub-inv87.4%
metadata-eval87.4%
*-commutative87.4%
associate-*r*87.4%
Simplified87.4%
Taylor expanded in x around 0 73.9%
metadata-eval73.9%
*-commutative73.9%
distribute-lft-neg-in73.9%
*-commutative73.9%
associate-*r*73.9%
distribute-rgt-neg-in73.9%
distribute-rgt-neg-in73.9%
metadata-eval73.9%
Simplified73.9%
Taylor expanded in b around inf 56.3%
if 9.6000000000000004e225 < (*.f64 b c) Initial program 86.6%
Simplified89.9%
Taylor expanded in b around inf 89.9%
Final simplification69.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 (* (* j 27.0) k)) (t_2 (- (* b c) t_1)))
(if (<= t_1 -1e+66)
t_2
(if (<= t_1 -1e-156)
(* -4.0 (+ (* x i) (* t a)))
(if (<= t_1 -1e-175)
(* y (* -18.0 (* t (* x (- z)))))
(if (<= t_1 2e+94) (- (* b c) (* 4.0 (* t a))) t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (b * c) - t_1;
double tmp;
if (t_1 <= -1e+66) {
tmp = t_2;
} else if (t_1 <= -1e-156) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (t_1 <= -1e-175) {
tmp = y * (-18.0 * (t * (x * -z)));
} else if (t_1 <= 2e+94) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = (b * c) - t_1
if (t_1 <= (-1d+66)) then
tmp = t_2
else if (t_1 <= (-1d-156)) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else if (t_1 <= (-1d-175)) then
tmp = y * ((-18.0d0) * (t * (x * -z)))
else if (t_1 <= 2d+94) then
tmp = (b * c) - (4.0d0 * (t * a))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (b * c) - t_1;
double tmp;
if (t_1 <= -1e+66) {
tmp = t_2;
} else if (t_1 <= -1e-156) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (t_1 <= -1e-175) {
tmp = y * (-18.0 * (t * (x * -z)));
} else if (t_1 <= 2e+94) {
tmp = (b * c) - (4.0 * (t * a));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = (b * c) - t_1 tmp = 0 if t_1 <= -1e+66: tmp = t_2 elif t_1 <= -1e-156: tmp = -4.0 * ((x * i) + (t * a)) elif t_1 <= -1e-175: tmp = y * (-18.0 * (t * (x * -z))) elif t_1 <= 2e+94: tmp = (b * c) - (4.0 * (t * a)) else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(b * c) - t_1) tmp = 0.0 if (t_1 <= -1e+66) tmp = t_2; elseif (t_1 <= -1e-156) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); elseif (t_1 <= -1e-175) tmp = Float64(y * Float64(-18.0 * Float64(t * Float64(x * Float64(-z))))); elseif (t_1 <= 2e+94) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
t_2 = (b * c) - t_1;
tmp = 0.0;
if (t_1 <= -1e+66)
tmp = t_2;
elseif (t_1 <= -1e-156)
tmp = -4.0 * ((x * i) + (t * a));
elseif (t_1 <= -1e-175)
tmp = y * (-18.0 * (t * (x * -z)));
elseif (t_1 <= 2e+94)
tmp = (b * c) - (4.0 * (t * a));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+66], t$95$2, If[LessEqual[t$95$1, -1e-156], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-175], N[(y * N[(-18.0 * N[(t * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+94], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := b \cdot c - t\_1\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+66}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-156}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-175}:\\
\;\;\;\;y \cdot \left(-18 \cdot \left(t \cdot \left(x \cdot \left(-z\right)\right)\right)\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+94}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -9.99999999999999945e65 or 2e94 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.5%
Taylor expanded in t around -inf 85.6%
associate-*r*85.6%
neg-mul-185.6%
cancel-sign-sub-inv85.6%
metadata-eval85.6%
*-commutative85.6%
associate-*r*85.6%
Simplified85.6%
Taylor expanded in x around 0 85.6%
metadata-eval85.6%
*-commutative85.6%
distribute-lft-neg-in85.6%
*-commutative85.6%
associate-*r*85.6%
distribute-rgt-neg-in85.6%
distribute-rgt-neg-in85.6%
metadata-eval85.6%
Simplified85.6%
Taylor expanded in b around inf 70.8%
if -9.99999999999999945e65 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000004e-156Initial program 90.7%
Simplified86.1%
associate-*r*90.7%
distribute-rgt-out--90.7%
associate-+l-90.7%
associate-*l*83.7%
fma-neg83.7%
associate-*l*86.0%
associate-*l*86.0%
fma-neg86.0%
Applied egg-rr86.0%
fma-undefine86.0%
unsub-neg86.0%
associate-*r*83.7%
*-commutative83.7%
associate-*r*86.0%
fma-undefine86.0%
unsub-neg86.0%
Simplified86.0%
Taylor expanded in x around 0 90.9%
Taylor expanded in j around 0 86.3%
distribute-lft-out86.3%
*-commutative86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in b around 0 61.7%
if -1.00000000000000004e-156 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e-175Initial program 72.9%
Simplified59.1%
associate-*r*72.9%
distribute-rgt-out--72.9%
associate-+l-72.9%
associate-*l*86.3%
fma-neg86.3%
associate-*l*86.3%
associate-*l*86.3%
fma-neg86.3%
Applied egg-rr86.3%
fma-undefine86.3%
unsub-neg86.3%
associate-*r*86.3%
*-commutative86.3%
associate-*r*86.3%
fma-undefine86.3%
unsub-neg86.3%
Simplified86.3%
Taylor expanded in t around -inf 31.4%
mul-1-neg31.4%
cancel-sign-sub-inv31.4%
*-commutative31.4%
associate-*r*45.2%
metadata-eval45.2%
Simplified45.2%
Taylor expanded in y around inf 85.5%
Taylor expanded in x around inf 85.5%
if -1e-175 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e94Initial program 88.2%
Simplified86.5%
associate-*r*90.0%
distribute-rgt-out--88.2%
associate-+l-88.2%
associate-*l*87.1%
fma-neg87.1%
associate-*l*87.1%
associate-*l*87.1%
fma-neg88.0%
Applied egg-rr88.0%
fma-undefine88.0%
unsub-neg88.0%
associate-*r*88.0%
*-commutative88.0%
associate-*r*88.0%
fma-undefine87.1%
unsub-neg87.1%
Simplified87.1%
Taylor expanded in x around 0 76.5%
Taylor expanded in j around 0 74.1%
distribute-lft-out74.1%
*-commutative74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in x around 0 56.3%
Final simplification63.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= (* b c) -2.4e+83)
(- (* b c) (* 4.0 (* t a)))
(if (<= (* b c) 1e-260)
(- (* -4.0 (* t a)) t_1)
(if (<= (* b c) 1e-94)
(- (* i (* x -4.0)) t_1)
(if (<= (* b c) 1.9e-63)
(* x (* 18.0 (* z (* y t))))
(if (<= (* b c) 7.6e+90)
(* -4.0 (+ (* x i) (* t a)))
(- (* b c) t_1))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((b * c) <= -2.4e+83) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= 1e-260) {
tmp = (-4.0 * (t * a)) - t_1;
} else if ((b * c) <= 1e-94) {
tmp = (i * (x * -4.0)) - t_1;
} else if ((b * c) <= 1.9e-63) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= 7.6e+90) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if ((b * c) <= (-2.4d+83)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if ((b * c) <= 1d-260) then
tmp = ((-4.0d0) * (t * a)) - t_1
else if ((b * c) <= 1d-94) then
tmp = (i * (x * (-4.0d0))) - t_1
else if ((b * c) <= 1.9d-63) then
tmp = x * (18.0d0 * (z * (y * t)))
else if ((b * c) <= 7.6d+90) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else
tmp = (b * c) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((b * c) <= -2.4e+83) {
tmp = (b * c) - (4.0 * (t * a));
} else if ((b * c) <= 1e-260) {
tmp = (-4.0 * (t * a)) - t_1;
} else if ((b * c) <= 1e-94) {
tmp = (i * (x * -4.0)) - t_1;
} else if ((b * c) <= 1.9e-63) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= 7.6e+90) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if (b * c) <= -2.4e+83: tmp = (b * c) - (4.0 * (t * a)) elif (b * c) <= 1e-260: tmp = (-4.0 * (t * a)) - t_1 elif (b * c) <= 1e-94: tmp = (i * (x * -4.0)) - t_1 elif (b * c) <= 1.9e-63: tmp = x * (18.0 * (z * (y * t))) elif (b * c) <= 7.6e+90: tmp = -4.0 * ((x * i) + (t * a)) else: tmp = (b * c) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (Float64(b * c) <= -2.4e+83) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (Float64(b * c) <= 1e-260) tmp = Float64(Float64(-4.0 * Float64(t * a)) - t_1); elseif (Float64(b * c) <= 1e-94) tmp = Float64(Float64(i * Float64(x * -4.0)) - t_1); elseif (Float64(b * c) <= 1.9e-63) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (Float64(b * c) <= 7.6e+90) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); else tmp = Float64(Float64(b * c) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if ((b * c) <= -2.4e+83)
tmp = (b * c) - (4.0 * (t * a));
elseif ((b * c) <= 1e-260)
tmp = (-4.0 * (t * a)) - t_1;
elseif ((b * c) <= 1e-94)
tmp = (i * (x * -4.0)) - t_1;
elseif ((b * c) <= 1.9e-63)
tmp = x * (18.0 * (z * (y * t)));
elseif ((b * c) <= 7.6e+90)
tmp = -4.0 * ((x * i) + (t * a));
else
tmp = (b * c) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.4e+83], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e-260], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e-94], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.9e-63], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7.6e+90], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;b \cdot c \leq -2.4 \cdot 10^{+83}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{-260}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - t\_1\\
\mathbf{elif}\;b \cdot c \leq 10^{-94}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) - t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.9 \cdot 10^{-63}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 7.6 \cdot 10^{+90}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -2.39999999999999991e83Initial program 77.6%
Simplified75.3%
associate-*r*80.1%
distribute-rgt-out--77.6%
associate-+l-77.6%
associate-*l*75.0%
fma-neg75.0%
associate-*l*75.0%
associate-*l*75.0%
fma-neg77.5%
Applied egg-rr77.5%
fma-undefine77.5%
unsub-neg77.5%
associate-*r*77.5%
*-commutative77.5%
associate-*r*77.5%
fma-undefine75.0%
unsub-neg75.0%
Simplified75.0%
Taylor expanded in x around 0 82.8%
Taylor expanded in j around 0 78.0%
distribute-lft-out78.0%
*-commutative78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in x around 0 78.2%
if -2.39999999999999991e83 < (*.f64 b c) < 9.99999999999999961e-261Initial program 89.8%
Taylor expanded in t around -inf 89.1%
associate-*r*89.1%
neg-mul-189.1%
cancel-sign-sub-inv89.1%
metadata-eval89.1%
*-commutative89.1%
associate-*r*89.1%
Simplified89.1%
Taylor expanded in x around 0 79.9%
metadata-eval79.9%
*-commutative79.9%
distribute-lft-neg-in79.9%
*-commutative79.9%
associate-*r*79.9%
distribute-rgt-neg-in79.9%
distribute-rgt-neg-in79.9%
metadata-eval79.9%
Simplified79.9%
Taylor expanded in t around inf 60.0%
if 9.99999999999999961e-261 < (*.f64 b c) < 9.9999999999999996e-95Initial program 92.5%
Taylor expanded in t around -inf 85.4%
associate-*r*85.4%
neg-mul-185.4%
cancel-sign-sub-inv85.4%
metadata-eval85.4%
*-commutative85.4%
associate-*r*81.7%
Simplified81.7%
Taylor expanded in x around 0 81.7%
metadata-eval81.7%
*-commutative81.7%
distribute-lft-neg-in81.7%
*-commutative81.7%
associate-*r*81.7%
distribute-rgt-neg-in81.7%
distribute-rgt-neg-in81.7%
metadata-eval81.7%
Simplified81.7%
Taylor expanded in x around inf 74.8%
*-commutative74.8%
*-commutative74.8%
*-commutative74.8%
associate-*r*74.8%
Simplified74.8%
if 9.9999999999999996e-95 < (*.f64 b c) < 1.90000000000000009e-63Initial program 83.3%
Simplified83.3%
Taylor expanded in x around inf 100.0%
Taylor expanded in t around inf 100.0%
associate-*r*100.0%
Simplified100.0%
if 1.90000000000000009e-63 < (*.f64 b c) < 7.6000000000000002e90Initial program 81.0%
Simplified81.0%
associate-*r*81.0%
distribute-rgt-out--81.0%
associate-+l-81.0%
associate-*l*81.0%
fma-neg81.0%
associate-*l*81.0%
associate-*l*81.0%
fma-neg81.0%
Applied egg-rr81.0%
fma-undefine81.0%
unsub-neg81.0%
associate-*r*81.0%
*-commutative81.0%
associate-*r*81.0%
fma-undefine81.0%
unsub-neg81.0%
Simplified81.0%
Taylor expanded in x around 0 90.5%
Taylor expanded in j around 0 77.1%
distribute-lft-out77.1%
*-commutative77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in b around 0 68.0%
if 7.6000000000000002e90 < (*.f64 b c) Initial program 87.4%
Taylor expanded in t around -inf 89.1%
associate-*r*89.1%
neg-mul-189.1%
cancel-sign-sub-inv89.1%
metadata-eval89.1%
*-commutative89.1%
associate-*r*89.1%
Simplified89.1%
Taylor expanded in x around 0 87.2%
metadata-eval87.2%
*-commutative87.2%
distribute-lft-neg-in87.2%
*-commutative87.2%
associate-*r*87.2%
distribute-rgt-neg-in87.2%
distribute-rgt-neg-in87.2%
metadata-eval87.2%
Simplified87.2%
Taylor expanded in b around inf 69.9%
Final simplification68.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 (* 4.0 (* x i))) (t_2 (* (* j 27.0) k)))
(if (or (<= t_2 -1e-115) (not (<= t_2 4e+68)))
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 27.0 (* j k)) t_1))
(- (- (* b c) (* t (- (* a 4.0) (* 18.0 (* x (* y z)))))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = (j * 27.0) * k;
double tmp;
if ((t_2 <= -1e-115) || !(t_2 <= 4e+68)) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + t_1);
} else {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - 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) :: t_2
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
t_2 = (j * 27.0d0) * k
if ((t_2 <= (-1d-115)) .or. (.not. (t_2 <= 4d+68))) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((27.0d0 * (j * k)) + t_1)
else
tmp = ((b * c) - (t * ((a * 4.0d0) - (18.0d0 * (x * (y * z)))))) - 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 = 4.0 * (x * i);
double t_2 = (j * 27.0) * k;
double tmp;
if ((t_2 <= -1e-115) || !(t_2 <= 4e+68)) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + t_1);
} else {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - 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 = 4.0 * (x * i) t_2 = (j * 27.0) * k tmp = 0 if (t_2 <= -1e-115) or not (t_2 <= 4e+68): tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + t_1) else: tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - 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(4.0 * Float64(x * i)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((t_2 <= -1e-115) || !(t_2 <= 4e+68)) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(27.0 * Float64(j * k)) + t_1)); else tmp = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(18.0 * Float64(x * Float64(y * z)))))) - 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 = 4.0 * (x * i);
t_2 = (j * 27.0) * k;
tmp = 0.0;
if ((t_2 <= -1e-115) || ~((t_2 <= 4e+68)))
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + t_1);
else
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * (x * (y * z)))))) - 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[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -1e-115], N[Not[LessEqual[t$95$2, 4e+68]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $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 := 4 \cdot \left(x \cdot i\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-115} \lor \neg \left(t\_2 \leq 4 \cdot 10^{+68}\right):\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(27 \cdot \left(j \cdot k\right) + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.0000000000000001e-115 or 3.99999999999999981e68 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 87.2%
Simplified85.2%
Taylor expanded in y around 0 88.1%
if -1.0000000000000001e-115 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.99999999999999981e68Initial program 86.3%
Simplified84.7%
Taylor expanded in j around 0 83.9%
Final simplification86.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* x (* 4.0 i)) (* j (* 27.0 k)))))
(if (<= t -5e-15)
(- (+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0)))) t_1)
(if (<= t 2e-17)
(- (+ (* (* 18.0 (* x y)) (* z t)) (- (* b c) (* a (* t 4.0)))) t_1)
(-
(-
(- (* b c) (* t (+ (* a 4.0) (* (* y z) (* x -18.0)))))
(* (* x 4.0) i))
(* (* j 27.0) k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if (t <= -5e-15) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
} else if (t <= 2e-17) {
tmp = (((18.0 * (x * y)) * (z * t)) + ((b * c) - (a * (t * 4.0)))) - t_1;
} else {
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (x * (4.0d0 * i)) + (j * (27.0d0 * k))
if (t <= (-5d-15)) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - t_1
else if (t <= 2d-17) then
tmp = (((18.0d0 * (x * y)) * (z * t)) + ((b * c) - (a * (t * 4.0d0)))) - t_1
else
tmp = (((b * c) - (t * ((a * 4.0d0) + ((y * z) * (x * (-18.0d0)))))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
double tmp;
if (t <= -5e-15) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
} else if (t <= 2e-17) {
tmp = (((18.0 * (x * y)) * (z * t)) + ((b * c) - (a * (t * 4.0)))) - t_1;
} else {
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * (4.0 * i)) + (j * (27.0 * k)) tmp = 0 if t <= -5e-15: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1 elif t <= 2e-17: tmp = (((18.0 * (x * y)) * (z * t)) + ((b * c) - (a * (t * 4.0)))) - t_1 else: tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k))) tmp = 0.0 if (t <= -5e-15) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - t_1); elseif (t <= 2e-17) tmp = Float64(Float64(Float64(Float64(18.0 * Float64(x * y)) * Float64(z * t)) + Float64(Float64(b * c) - Float64(a * Float64(t * 4.0)))) - t_1); else tmp = Float64(Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) + Float64(Float64(y * z) * Float64(x * -18.0))))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * (4.0 * i)) + (j * (27.0 * k));
tmp = 0.0;
if (t <= -5e-15)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_1;
elseif (t <= 2e-17)
tmp = (((18.0 * (x * y)) * (z * t)) + ((b * c) - (a * (t * 4.0)))) - t_1;
else
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-15], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 2e-17], N[(N[(N[(N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(a * N[(t * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] * N[(x * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;t \leq -5 \cdot 10^{-15}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - t\_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-17}:\\
\;\;\;\;\left(\left(18 \cdot \left(x \cdot y\right)\right) \cdot \left(z \cdot t\right) + \left(b \cdot c - a \cdot \left(t \cdot 4\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c - t \cdot \left(a \cdot 4 + \left(y \cdot z\right) \cdot \left(x \cdot -18\right)\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -4.99999999999999999e-15Initial program 83.4%
Simplified84.8%
if -4.99999999999999999e-15 < t < 2.00000000000000014e-17Initial program 86.5%
Simplified78.7%
associate-*r*86.5%
distribute-rgt-out--86.5%
associate-+l-86.5%
associate-*l*89.9%
fma-neg89.9%
associate-*l*90.8%
associate-*l*90.8%
fma-neg90.8%
Applied egg-rr90.8%
fma-undefine90.8%
unsub-neg90.8%
associate-*r*89.9%
*-commutative89.9%
associate-*r*90.8%
fma-undefine90.8%
unsub-neg90.8%
Simplified90.8%
if 2.00000000000000014e-17 < t Initial program 89.9%
Taylor expanded in t around -inf 95.0%
associate-*r*95.0%
neg-mul-195.0%
cancel-sign-sub-inv95.0%
metadata-eval95.0%
*-commutative95.0%
associate-*r*95.0%
Simplified95.0%
Final simplification90.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) (* 4.0 (* t a)))) (t_2 (+ (* b c) (* j (* k -27.0)))))
(if (<= k -300000000.0)
t_2
(if (<= k -8.5e-298)
t_1
(if (<= k 4.6e-229)
(* -4.0 (+ (* x i) (* t a)))
(if (<= k 7e-19)
t_1
(if (<= k 1.3e+22)
(* x (* i -4.0))
(if (<= k 9e+117) t_1 t_2))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double t_2 = (b * c) + (j * (k * -27.0));
double tmp;
if (k <= -300000000.0) {
tmp = t_2;
} else if (k <= -8.5e-298) {
tmp = t_1;
} else if (k <= 4.6e-229) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (k <= 7e-19) {
tmp = t_1;
} else if (k <= 1.3e+22) {
tmp = x * (i * -4.0);
} else if (k <= 9e+117) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (t * a))
t_2 = (b * c) + (j * (k * (-27.0d0)))
if (k <= (-300000000.0d0)) then
tmp = t_2
else if (k <= (-8.5d-298)) then
tmp = t_1
else if (k <= 4.6d-229) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else if (k <= 7d-19) then
tmp = t_1
else if (k <= 1.3d+22) then
tmp = x * (i * (-4.0d0))
else if (k <= 9d+117) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (t * a));
double t_2 = (b * c) + (j * (k * -27.0));
double tmp;
if (k <= -300000000.0) {
tmp = t_2;
} else if (k <= -8.5e-298) {
tmp = t_1;
} else if (k <= 4.6e-229) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (k <= 7e-19) {
tmp = t_1;
} else if (k <= 1.3e+22) {
tmp = x * (i * -4.0);
} else if (k <= 9e+117) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (t * a)) t_2 = (b * c) + (j * (k * -27.0)) tmp = 0 if k <= -300000000.0: tmp = t_2 elif k <= -8.5e-298: tmp = t_1 elif k <= 4.6e-229: tmp = -4.0 * ((x * i) + (t * a)) elif k <= 7e-19: tmp = t_1 elif k <= 1.3e+22: tmp = x * (i * -4.0) elif k <= 9e+117: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) t_2 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) tmp = 0.0 if (k <= -300000000.0) tmp = t_2; elseif (k <= -8.5e-298) tmp = t_1; elseif (k <= 4.6e-229) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); elseif (k <= 7e-19) tmp = t_1; elseif (k <= 1.3e+22) tmp = Float64(x * Float64(i * -4.0)); elseif (k <= 9e+117) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (4.0 * (t * a));
t_2 = (b * c) + (j * (k * -27.0));
tmp = 0.0;
if (k <= -300000000.0)
tmp = t_2;
elseif (k <= -8.5e-298)
tmp = t_1;
elseif (k <= 4.6e-229)
tmp = -4.0 * ((x * i) + (t * a));
elseif (k <= 7e-19)
tmp = t_1;
elseif (k <= 1.3e+22)
tmp = x * (i * -4.0);
elseif (k <= 9e+117)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -300000000.0], t$95$2, If[LessEqual[k, -8.5e-298], t$95$1, If[LessEqual[k, 4.6e-229], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7e-19], t$95$1, If[LessEqual[k, 1.3e+22], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9e+117], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
t_2 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;k \leq -300000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;k \leq -8.5 \cdot 10^{-298}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq 4.6 \cdot 10^{-229}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{elif}\;k \leq 7 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq 1.3 \cdot 10^{+22}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;k \leq 9 \cdot 10^{+117}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if k < -3e8 or 9e117 < k Initial program 84.6%
Simplified83.7%
Taylor expanded in b around inf 59.3%
if -3e8 < k < -8.49999999999999957e-298 or 4.59999999999999992e-229 < k < 7.00000000000000031e-19 or 1.3e22 < k < 9e117Initial program 87.4%
Simplified84.6%
associate-*r*90.4%
distribute-rgt-out--87.4%
associate-+l-87.4%
associate-*l*86.5%
fma-neg86.5%
associate-*l*87.3%
associate-*l*87.3%
fma-neg88.0%
Applied egg-rr88.0%
fma-undefine88.0%
unsub-neg88.0%
associate-*r*87.3%
*-commutative87.3%
associate-*r*88.0%
fma-undefine87.3%
unsub-neg87.3%
Simplified87.3%
Taylor expanded in x around 0 80.2%
Taylor expanded in j around 0 74.3%
distribute-lft-out74.3%
*-commutative74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in x around 0 60.8%
if -8.49999999999999957e-298 < k < 4.59999999999999992e-229Initial program 88.7%
Simplified88.7%
associate-*r*88.7%
distribute-rgt-out--88.7%
associate-+l-88.7%
associate-*l*83.2%
fma-neg83.2%
associate-*l*83.1%
associate-*l*83.1%
fma-neg83.1%
Applied egg-rr83.1%
fma-undefine83.1%
unsub-neg83.1%
associate-*r*83.2%
*-commutative83.2%
associate-*r*83.1%
fma-undefine83.1%
unsub-neg83.1%
Simplified83.1%
Taylor expanded in x around 0 83.2%
Taylor expanded in j around 0 83.2%
distribute-lft-out83.2%
*-commutative83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in b around 0 67.0%
if 7.00000000000000031e-19 < k < 1.3e22Initial program 100.0%
Simplified99.8%
associate-*r*99.8%
distribute-rgt-out--99.8%
associate-+l-99.8%
associate-*l*99.8%
fma-neg99.8%
associate-*l*99.8%
associate-*l*99.8%
fma-neg99.8%
Applied egg-rr99.8%
fma-undefine99.8%
unsub-neg99.8%
associate-*r*99.8%
*-commutative99.8%
associate-*r*99.8%
fma-undefine99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in i around inf 44.8%
associate-*r*44.8%
*-commutative44.8%
Simplified44.8%
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
(if (or (<= t -5.2e-172) (not (<= t 1.2e-45)))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5.2e-172) || !(t <= 1.2e-45)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-5.2d-172)) .or. (.not. (t <= 1.2d-45))) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5.2e-172) || !(t <= 1.2e-45)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -5.2e-172) or not (t <= 1.2e-45): tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -5.2e-172) || !(t <= 1.2e-45)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -5.2e-172) || ~((t <= 1.2e-45)))
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -5.2e-172], N[Not[LessEqual[t, 1.2e-45]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $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}\;t \leq -5.2 \cdot 10^{-172} \lor \neg \left(t \leq 1.2 \cdot 10^{-45}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if t < -5.1999999999999996e-172 or 1.19999999999999995e-45 < t Initial program 87.2%
Simplified88.4%
if -5.1999999999999996e-172 < t < 1.19999999999999995e-45Initial program 85.7%
Simplified76.8%
Taylor expanded in y around 0 94.3%
Final simplification90.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -2.7e-174)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(if (<= t 1.25e-45)
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))
(-
(-
(- (* b c) (* t (+ (* a 4.0) (* (* y z) (* x -18.0)))))
(* (* x 4.0) i))
(* (* j 27.0) k)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -2.7e-174) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else if (t <= 1.25e-45) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else {
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-2.7d-174)) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else if (t <= 1.25d-45) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
else
tmp = (((b * c) - (t * ((a * 4.0d0) + ((y * z) * (x * (-18.0d0)))))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -2.7e-174) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else if (t <= 1.25e-45) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else {
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -2.7e-174: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) elif t <= 1.25e-45: tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i))) else: tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -2.7e-174) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); elseif (t <= 1.25e-45) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); else tmp = Float64(Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) + Float64(Float64(y * z) * Float64(x * -18.0))))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -2.7e-174)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
elseif (t <= 1.25e-45)
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
else
tmp = (((b * c) - (t * ((a * 4.0) + ((y * z) * (x * -18.0))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -2.7e-174], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-45], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] * N[(x * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-174}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-45}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c - t \cdot \left(a \cdot 4 + \left(y \cdot z\right) \cdot \left(x \cdot -18\right)\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -2.69999999999999988e-174Initial program 84.3%
Simplified84.3%
if -2.69999999999999988e-174 < t < 1.24999999999999994e-45Initial program 85.7%
Simplified76.8%
Taylor expanded in y around 0 94.3%
if 1.24999999999999994e-45 < t Initial program 90.5%
Taylor expanded in t around -inf 94.1%
associate-*r*94.1%
neg-mul-194.1%
cancel-sign-sub-inv94.1%
metadata-eval94.1%
*-commutative94.1%
associate-*r*94.1%
Simplified94.1%
Final simplification90.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* j (* k -27.0)))) (t_2 (* -4.0 (+ (* x i) (* t a)))))
(if (<= (* b c) -7e+30)
t_1
(if (<= (* b c) -4.8e-51)
t_2
(if (<= (* b c) -1.55e-176)
(* x (* (* y z) (* 18.0 t)))
(if (<= (* b c) 7e+91) t_2 t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -7e+30) {
tmp = t_1;
} else if ((b * c) <= -4.8e-51) {
tmp = t_2;
} else if ((b * c) <= -1.55e-176) {
tmp = x * ((y * z) * (18.0 * t));
} else if ((b * c) <= 7e+91) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (b * c) + (j * (k * (-27.0d0)))
t_2 = (-4.0d0) * ((x * i) + (t * a))
if ((b * c) <= (-7d+30)) then
tmp = t_1
else if ((b * c) <= (-4.8d-51)) then
tmp = t_2
else if ((b * c) <= (-1.55d-176)) then
tmp = x * ((y * z) * (18.0d0 * t))
else if ((b * c) <= 7d+91) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (j * (k * -27.0));
double t_2 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -7e+30) {
tmp = t_1;
} else if ((b * c) <= -4.8e-51) {
tmp = t_2;
} else if ((b * c) <= -1.55e-176) {
tmp = x * ((y * z) * (18.0 * t));
} else if ((b * c) <= 7e+91) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (j * (k * -27.0)) t_2 = -4.0 * ((x * i) + (t * a)) tmp = 0 if (b * c) <= -7e+30: tmp = t_1 elif (b * c) <= -4.8e-51: tmp = t_2 elif (b * c) <= -1.55e-176: tmp = x * ((y * z) * (18.0 * t)) elif (b * c) <= 7e+91: tmp = t_2 else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))) t_2 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) tmp = 0.0 if (Float64(b * c) <= -7e+30) tmp = t_1; elseif (Float64(b * c) <= -4.8e-51) tmp = t_2; elseif (Float64(b * c) <= -1.55e-176) tmp = Float64(x * Float64(Float64(y * z) * Float64(18.0 * t))); elseif (Float64(b * c) <= 7e+91) tmp = t_2; else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (j * (k * -27.0));
t_2 = -4.0 * ((x * i) + (t * a));
tmp = 0.0;
if ((b * c) <= -7e+30)
tmp = t_1;
elseif ((b * c) <= -4.8e-51)
tmp = t_2;
elseif ((b * c) <= -1.55e-176)
tmp = x * ((y * z) * (18.0 * t));
elseif ((b * c) <= 7e+91)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -7e+30], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -4.8e-51], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -1.55e-176], N[(x * N[(N[(y * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7e+91], t$95$2, t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
t_2 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -7 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -4.8 \cdot 10^{-51}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -1.55 \cdot 10^{-176}:\\
\;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(18 \cdot t\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 7 \cdot 10^{+91}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -7.00000000000000042e30 or 7.00000000000000001e91 < (*.f64 b c) Initial program 85.0%
Simplified85.9%
Taylor expanded in b around inf 69.7%
if -7.00000000000000042e30 < (*.f64 b c) < -4.8e-51 or -1.54999999999999996e-176 < (*.f64 b c) < 7.00000000000000001e91Initial program 91.1%
Simplified88.1%
associate-*r*92.0%
distribute-rgt-out--90.4%
associate-+l-90.4%
associate-*l*87.1%
fma-neg87.1%
associate-*l*87.9%
associate-*l*87.9%
fma-neg87.9%
Applied egg-rr87.9%
fma-undefine87.9%
unsub-neg87.9%
associate-*r*87.1%
*-commutative87.1%
associate-*r*87.9%
fma-undefine87.9%
unsub-neg87.9%
Simplified87.9%
Taylor expanded in x around 0 81.8%
Taylor expanded in j around 0 60.4%
distribute-lft-out60.4%
*-commutative60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in b around 0 56.7%
if -4.8e-51 < (*.f64 b c) < -1.54999999999999996e-176Initial program 73.3%
Simplified73.9%
Taylor expanded in x around inf 47.5%
Taylor expanded in t around inf 47.3%
associate-*r*47.4%
*-commutative47.4%
Simplified47.4%
Final simplification61.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* x i) (* t a)))))
(if (<= (* b c) -1.95e+114)
(* b c)
(if (<= (* b c) -1.05e-51)
t_1
(if (<= (* b c) -3.2e-180)
(* x (* (* y z) (* 18.0 t)))
(if (<= (* b c) 2.2e+300) t_1 (* 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 t_1 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -1.95e+114) {
tmp = b * c;
} else if ((b * c) <= -1.05e-51) {
tmp = t_1;
} else if ((b * c) <= -3.2e-180) {
tmp = x * ((y * z) * (18.0 * t));
} else if ((b * c) <= 2.2e+300) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * ((x * i) + (t * a))
if ((b * c) <= (-1.95d+114)) then
tmp = b * c
else if ((b * c) <= (-1.05d-51)) then
tmp = t_1
else if ((b * c) <= (-3.2d-180)) then
tmp = x * ((y * z) * (18.0d0 * t))
else if ((b * c) <= 2.2d+300) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -1.95e+114) {
tmp = b * c;
} else if ((b * c) <= -1.05e-51) {
tmp = t_1;
} else if ((b * c) <= -3.2e-180) {
tmp = x * ((y * z) * (18.0 * t));
} else if ((b * c) <= 2.2e+300) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((x * i) + (t * a)) tmp = 0 if (b * c) <= -1.95e+114: tmp = b * c elif (b * c) <= -1.05e-51: tmp = t_1 elif (b * c) <= -3.2e-180: tmp = x * ((y * z) * (18.0 * t)) elif (b * c) <= 2.2e+300: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) tmp = 0.0 if (Float64(b * c) <= -1.95e+114) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.05e-51) tmp = t_1; elseif (Float64(b * c) <= -3.2e-180) tmp = Float64(x * Float64(Float64(y * z) * Float64(18.0 * t))); elseif (Float64(b * c) <= 2.2e+300) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((x * i) + (t * a));
tmp = 0.0;
if ((b * c) <= -1.95e+114)
tmp = b * c;
elseif ((b * c) <= -1.05e-51)
tmp = t_1;
elseif ((b * c) <= -3.2e-180)
tmp = x * ((y * z) * (18.0 * t));
elseif ((b * c) <= 2.2e+300)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.95e+114], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.05e-51], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -3.2e-180], N[(x * N[(N[(y * z), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.2e+300], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+114}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.05 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -3.2 \cdot 10^{-180}:\\
\;\;\;\;x \cdot \left(\left(y \cdot z\right) \cdot \left(18 \cdot t\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2.2 \cdot 10^{+300}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.95e114 or 2.2000000000000001e300 < (*.f64 b c) Initial program 78.8%
Simplified77.3%
associate-*r*80.4%
distribute-rgt-out--78.8%
associate-+l-78.8%
associate-*l*75.4%
fma-neg75.4%
associate-*l*75.4%
associate-*l*75.4%
fma-neg78.7%
Applied egg-rr78.7%
fma-undefine78.7%
unsub-neg78.7%
associate-*r*78.7%
*-commutative78.7%
associate-*r*78.7%
fma-undefine75.4%
unsub-neg75.4%
Simplified75.4%
Taylor expanded in b around inf 79.3%
if -1.95e114 < (*.f64 b c) < -1.05000000000000001e-51 or -3.20000000000000015e-180 < (*.f64 b c) < 2.2000000000000001e300Initial program 91.8%
Simplified89.5%
associate-*r*92.4%
distribute-rgt-out--91.2%
associate-+l-91.2%
associate-*l*88.8%
fma-neg88.8%
associate-*l*89.3%
associate-*l*89.3%
fma-neg89.3%
Applied egg-rr89.3%
fma-undefine89.3%
unsub-neg89.3%
associate-*r*88.8%
*-commutative88.8%
associate-*r*89.3%
fma-undefine89.3%
unsub-neg89.3%
Simplified89.3%
Taylor expanded in x around 0 83.0%
Taylor expanded in j around 0 58.8%
distribute-lft-out58.8%
*-commutative58.8%
*-commutative58.8%
Simplified58.8%
Taylor expanded in b around 0 52.0%
if -1.05000000000000001e-51 < (*.f64 b c) < -3.20000000000000015e-180Initial program 73.3%
Simplified73.9%
Taylor expanded in x around inf 47.5%
Taylor expanded in t around inf 47.3%
associate-*r*47.4%
*-commutative47.4%
Simplified47.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 (* -4.0 (+ (* x i) (* t a)))))
(if (<= (* b c) -5.4e+121)
(* b c)
(if (<= (* b c) -9.5e-52)
t_1
(if (<= (* b c) -5.9e-154)
(* x (* y (* z (* 18.0 t))))
(if (<= (* b c) 2.2e+300) t_1 (* 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 t_1 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -5.4e+121) {
tmp = b * c;
} else if ((b * c) <= -9.5e-52) {
tmp = t_1;
} else if ((b * c) <= -5.9e-154) {
tmp = x * (y * (z * (18.0 * t)));
} else if ((b * c) <= 2.2e+300) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * ((x * i) + (t * a))
if ((b * c) <= (-5.4d+121)) then
tmp = b * c
else if ((b * c) <= (-9.5d-52)) then
tmp = t_1
else if ((b * c) <= (-5.9d-154)) then
tmp = x * (y * (z * (18.0d0 * t)))
else if ((b * c) <= 2.2d+300) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -5.4e+121) {
tmp = b * c;
} else if ((b * c) <= -9.5e-52) {
tmp = t_1;
} else if ((b * c) <= -5.9e-154) {
tmp = x * (y * (z * (18.0 * t)));
} else if ((b * c) <= 2.2e+300) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((x * i) + (t * a)) tmp = 0 if (b * c) <= -5.4e+121: tmp = b * c elif (b * c) <= -9.5e-52: tmp = t_1 elif (b * c) <= -5.9e-154: tmp = x * (y * (z * (18.0 * t))) elif (b * c) <= 2.2e+300: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) tmp = 0.0 if (Float64(b * c) <= -5.4e+121) tmp = Float64(b * c); elseif (Float64(b * c) <= -9.5e-52) tmp = t_1; elseif (Float64(b * c) <= -5.9e-154) tmp = Float64(x * Float64(y * Float64(z * Float64(18.0 * t)))); elseif (Float64(b * c) <= 2.2e+300) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((x * i) + (t * a));
tmp = 0.0;
if ((b * c) <= -5.4e+121)
tmp = b * c;
elseif ((b * c) <= -9.5e-52)
tmp = t_1;
elseif ((b * c) <= -5.9e-154)
tmp = x * (y * (z * (18.0 * t)));
elseif ((b * c) <= 2.2e+300)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5.4e+121], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -9.5e-52], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -5.9e-154], N[(x * N[(y * N[(z * N[(18.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.2e+300], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -5.4 \cdot 10^{+121}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -9.5 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -5.9 \cdot 10^{-154}:\\
\;\;\;\;x \cdot \left(y \cdot \left(z \cdot \left(18 \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2.2 \cdot 10^{+300}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -5.4000000000000004e121 or 2.2000000000000001e300 < (*.f64 b c) Initial program 78.8%
Simplified77.3%
associate-*r*80.4%
distribute-rgt-out--78.8%
associate-+l-78.8%
associate-*l*75.4%
fma-neg75.4%
associate-*l*75.4%
associate-*l*75.4%
fma-neg78.7%
Applied egg-rr78.7%
fma-undefine78.7%
unsub-neg78.7%
associate-*r*78.7%
*-commutative78.7%
associate-*r*78.7%
fma-undefine75.4%
unsub-neg75.4%
Simplified75.4%
Taylor expanded in b around inf 79.3%
if -5.4000000000000004e121 < (*.f64 b c) < -9.50000000000000007e-52 or -5.9000000000000003e-154 < (*.f64 b c) < 2.2000000000000001e300Initial program 91.9%
Simplified88.6%
associate-*r*92.5%
distribute-rgt-out--91.4%
associate-+l-91.4%
associate-*l*88.4%
fma-neg88.4%
associate-*l*88.9%
associate-*l*88.9%
fma-neg88.9%
Applied egg-rr88.9%
fma-undefine88.9%
unsub-neg88.9%
associate-*r*88.4%
*-commutative88.4%
associate-*r*88.9%
fma-undefine88.9%
unsub-neg88.9%
Simplified88.9%
Taylor expanded in x around 0 82.8%
Taylor expanded in j around 0 58.4%
distribute-lft-out58.4%
*-commutative58.4%
*-commutative58.4%
Simplified58.4%
Taylor expanded in b around 0 51.7%
if -9.50000000000000007e-52 < (*.f64 b c) < -5.9000000000000003e-154Initial program 69.8%
Simplified78.5%
Taylor expanded in x around inf 48.7%
Taylor expanded in t around inf 48.4%
associate-*r*48.6%
*-commutative48.6%
Simplified48.6%
Taylor expanded in y around 0 48.4%
*-commutative48.4%
*-commutative48.4%
associate-*r*48.6%
associate-*l*48.4%
Simplified48.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 (* -4.0 (+ (* x i) (* t a)))))
(if (<= (* b c) -1.9e+123)
(* b c)
(if (<= (* b c) -2.15e-51)
t_1
(if (<= (* b c) -5.5e-154)
(* x (* y (* 18.0 (* z t))))
(if (<= (* b c) 2.2e+300) t_1 (* 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 t_1 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -1.9e+123) {
tmp = b * c;
} else if ((b * c) <= -2.15e-51) {
tmp = t_1;
} else if ((b * c) <= -5.5e-154) {
tmp = x * (y * (18.0 * (z * t)));
} else if ((b * c) <= 2.2e+300) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * ((x * i) + (t * a))
if ((b * c) <= (-1.9d+123)) then
tmp = b * c
else if ((b * c) <= (-2.15d-51)) then
tmp = t_1
else if ((b * c) <= (-5.5d-154)) then
tmp = x * (y * (18.0d0 * (z * t)))
else if ((b * c) <= 2.2d+300) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -1.9e+123) {
tmp = b * c;
} else if ((b * c) <= -2.15e-51) {
tmp = t_1;
} else if ((b * c) <= -5.5e-154) {
tmp = x * (y * (18.0 * (z * t)));
} else if ((b * c) <= 2.2e+300) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((x * i) + (t * a)) tmp = 0 if (b * c) <= -1.9e+123: tmp = b * c elif (b * c) <= -2.15e-51: tmp = t_1 elif (b * c) <= -5.5e-154: tmp = x * (y * (18.0 * (z * t))) elif (b * c) <= 2.2e+300: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) tmp = 0.0 if (Float64(b * c) <= -1.9e+123) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.15e-51) tmp = t_1; elseif (Float64(b * c) <= -5.5e-154) tmp = Float64(x * Float64(y * Float64(18.0 * Float64(z * t)))); elseif (Float64(b * c) <= 2.2e+300) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((x * i) + (t * a));
tmp = 0.0;
if ((b * c) <= -1.9e+123)
tmp = b * c;
elseif ((b * c) <= -2.15e-51)
tmp = t_1;
elseif ((b * c) <= -5.5e-154)
tmp = x * (y * (18.0 * (z * t)));
elseif ((b * c) <= 2.2e+300)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.9e+123], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.15e-51], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -5.5e-154], N[(x * N[(y * N[(18.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.2e+300], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.9 \cdot 10^{+123}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.15 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -5.5 \cdot 10^{-154}:\\
\;\;\;\;x \cdot \left(y \cdot \left(18 \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2.2 \cdot 10^{+300}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.89999999999999997e123 or 2.2000000000000001e300 < (*.f64 b c) Initial program 78.8%
Simplified77.3%
associate-*r*80.4%
distribute-rgt-out--78.8%
associate-+l-78.8%
associate-*l*75.4%
fma-neg75.4%
associate-*l*75.4%
associate-*l*75.4%
fma-neg78.7%
Applied egg-rr78.7%
fma-undefine78.7%
unsub-neg78.7%
associate-*r*78.7%
*-commutative78.7%
associate-*r*78.7%
fma-undefine75.4%
unsub-neg75.4%
Simplified75.4%
Taylor expanded in b around inf 79.3%
if -1.89999999999999997e123 < (*.f64 b c) < -2.1499999999999999e-51 or -5.50000000000000002e-154 < (*.f64 b c) < 2.2000000000000001e300Initial program 91.9%
Simplified88.6%
associate-*r*92.5%
distribute-rgt-out--91.4%
associate-+l-91.4%
associate-*l*88.4%
fma-neg88.4%
associate-*l*88.9%
associate-*l*88.9%
fma-neg88.9%
Applied egg-rr88.9%
fma-undefine88.9%
unsub-neg88.9%
associate-*r*88.4%
*-commutative88.4%
associate-*r*88.9%
fma-undefine88.9%
unsub-neg88.9%
Simplified88.9%
Taylor expanded in x around 0 82.8%
Taylor expanded in j around 0 58.4%
distribute-lft-out58.4%
*-commutative58.4%
*-commutative58.4%
Simplified58.4%
Taylor expanded in b around 0 51.7%
if -2.1499999999999999e-51 < (*.f64 b c) < -5.50000000000000002e-154Initial program 69.8%
Simplified78.5%
Taylor expanded in x around inf 48.7%
Taylor expanded in t around inf 48.4%
associate-*r*48.6%
*-commutative48.6%
Simplified48.6%
Taylor expanded in y around 0 48.4%
*-commutative48.4%
*-commutative48.4%
associate-*r*48.6%
associate-*l*48.4%
Simplified48.4%
Taylor expanded in z around 0 48.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 (* -4.0 (+ (* x i) (* t a)))))
(if (<= (* b c) -1.05e+116)
(* b c)
(if (<= (* b c) -2.6e-50)
t_1
(if (<= (* b c) -5.1e-154)
(* x (* 18.0 (* z (* y t))))
(if (<= (* b c) 2.2e+300) t_1 (* 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 t_1 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -1.05e+116) {
tmp = b * c;
} else if ((b * c) <= -2.6e-50) {
tmp = t_1;
} else if ((b * c) <= -5.1e-154) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= 2.2e+300) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * ((x * i) + (t * a))
if ((b * c) <= (-1.05d+116)) then
tmp = b * c
else if ((b * c) <= (-2.6d-50)) then
tmp = t_1
else if ((b * c) <= (-5.1d-154)) then
tmp = x * (18.0d0 * (z * (y * t)))
else if ((b * c) <= 2.2d+300) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -1.05e+116) {
tmp = b * c;
} else if ((b * c) <= -2.6e-50) {
tmp = t_1;
} else if ((b * c) <= -5.1e-154) {
tmp = x * (18.0 * (z * (y * t)));
} else if ((b * c) <= 2.2e+300) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((x * i) + (t * a)) tmp = 0 if (b * c) <= -1.05e+116: tmp = b * c elif (b * c) <= -2.6e-50: tmp = t_1 elif (b * c) <= -5.1e-154: tmp = x * (18.0 * (z * (y * t))) elif (b * c) <= 2.2e+300: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) tmp = 0.0 if (Float64(b * c) <= -1.05e+116) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.6e-50) tmp = t_1; elseif (Float64(b * c) <= -5.1e-154) tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); elseif (Float64(b * c) <= 2.2e+300) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((x * i) + (t * a));
tmp = 0.0;
if ((b * c) <= -1.05e+116)
tmp = b * c;
elseif ((b * c) <= -2.6e-50)
tmp = t_1;
elseif ((b * c) <= -5.1e-154)
tmp = x * (18.0 * (z * (y * t)));
elseif ((b * c) <= 2.2e+300)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.05e+116], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.6e-50], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -5.1e-154], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.2e+300], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.05 \cdot 10^{+116}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.6 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -5.1 \cdot 10^{-154}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2.2 \cdot 10^{+300}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.0500000000000001e116 or 2.2000000000000001e300 < (*.f64 b c) Initial program 78.8%
Simplified77.3%
associate-*r*80.4%
distribute-rgt-out--78.8%
associate-+l-78.8%
associate-*l*75.4%
fma-neg75.4%
associate-*l*75.4%
associate-*l*75.4%
fma-neg78.7%
Applied egg-rr78.7%
fma-undefine78.7%
unsub-neg78.7%
associate-*r*78.7%
*-commutative78.7%
associate-*r*78.7%
fma-undefine75.4%
unsub-neg75.4%
Simplified75.4%
Taylor expanded in b around inf 79.3%
if -1.0500000000000001e116 < (*.f64 b c) < -2.6000000000000001e-50 or -5.0999999999999998e-154 < (*.f64 b c) < 2.2000000000000001e300Initial program 91.9%
Simplified88.6%
associate-*r*92.5%
distribute-rgt-out--91.4%
associate-+l-91.4%
associate-*l*88.4%
fma-neg88.4%
associate-*l*88.9%
associate-*l*88.9%
fma-neg88.9%
Applied egg-rr88.9%
fma-undefine88.9%
unsub-neg88.9%
associate-*r*88.4%
*-commutative88.4%
associate-*r*88.9%
fma-undefine88.9%
unsub-neg88.9%
Simplified88.9%
Taylor expanded in x around 0 82.8%
Taylor expanded in j around 0 58.4%
distribute-lft-out58.4%
*-commutative58.4%
*-commutative58.4%
Simplified58.4%
Taylor expanded in b around 0 51.7%
if -2.6000000000000001e-50 < (*.f64 b c) < -5.0999999999999998e-154Initial program 69.8%
Simplified78.5%
Taylor expanded in x around inf 48.7%
Taylor expanded in t around inf 48.4%
associate-*r*48.4%
Simplified48.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 (* -4.0 (+ (* x i) (* t a)))))
(if (<= (* b c) -1.3e+115)
(* b c)
(if (<= (* b c) -5.4e-63)
t_1
(if (<= (* b c) -1.9e-197)
(* (* j k) -27.0)
(if (<= (* b c) 2.3e+300) t_1 (* 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 t_1 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -1.3e+115) {
tmp = b * c;
} else if ((b * c) <= -5.4e-63) {
tmp = t_1;
} else if ((b * c) <= -1.9e-197) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 2.3e+300) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * ((x * i) + (t * a))
if ((b * c) <= (-1.3d+115)) then
tmp = b * c
else if ((b * c) <= (-5.4d-63)) then
tmp = t_1
else if ((b * c) <= (-1.9d-197)) then
tmp = (j * k) * (-27.0d0)
else if ((b * c) <= 2.3d+300) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((x * i) + (t * a));
double tmp;
if ((b * c) <= -1.3e+115) {
tmp = b * c;
} else if ((b * c) <= -5.4e-63) {
tmp = t_1;
} else if ((b * c) <= -1.9e-197) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 2.3e+300) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((x * i) + (t * a)) tmp = 0 if (b * c) <= -1.3e+115: tmp = b * c elif (b * c) <= -5.4e-63: tmp = t_1 elif (b * c) <= -1.9e-197: tmp = (j * k) * -27.0 elif (b * c) <= 2.3e+300: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) tmp = 0.0 if (Float64(b * c) <= -1.3e+115) tmp = Float64(b * c); elseif (Float64(b * c) <= -5.4e-63) tmp = t_1; elseif (Float64(b * c) <= -1.9e-197) tmp = Float64(Float64(j * k) * -27.0); elseif (Float64(b * c) <= 2.3e+300) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((x * i) + (t * a));
tmp = 0.0;
if ((b * c) <= -1.3e+115)
tmp = b * c;
elseif ((b * c) <= -5.4e-63)
tmp = t_1;
elseif ((b * c) <= -1.9e-197)
tmp = (j * k) * -27.0;
elseif ((b * c) <= 2.3e+300)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.3e+115], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.4e-63], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1.9e-197], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.3e+300], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.3 \cdot 10^{+115}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5.4 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -1.9 \cdot 10^{-197}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+300}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.3e115 or 2.30000000000000012e300 < (*.f64 b c) Initial program 78.8%
Simplified77.3%
associate-*r*80.4%
distribute-rgt-out--78.8%
associate-+l-78.8%
associate-*l*75.4%
fma-neg75.4%
associate-*l*75.4%
associate-*l*75.4%
fma-neg78.7%
Applied egg-rr78.7%
fma-undefine78.7%
unsub-neg78.7%
associate-*r*78.7%
*-commutative78.7%
associate-*r*78.7%
fma-undefine75.4%
unsub-neg75.4%
Simplified75.4%
Taylor expanded in b around inf 79.3%
if -1.3e115 < (*.f64 b c) < -5.4000000000000004e-63 or -1.8999999999999999e-197 < (*.f64 b c) < 2.30000000000000012e300Initial program 91.2%
Simplified89.5%
associate-*r*92.4%
distribute-rgt-out--90.7%
associate-+l-90.7%
associate-*l*88.8%
fma-neg88.8%
associate-*l*89.4%
associate-*l*89.4%
fma-neg89.4%
Applied egg-rr89.4%
fma-undefine89.4%
unsub-neg89.4%
associate-*r*88.8%
*-commutative88.8%
associate-*r*89.4%
fma-undefine89.4%
unsub-neg89.4%
Simplified89.4%
Taylor expanded in x around 0 81.9%
Taylor expanded in j around 0 58.5%
distribute-lft-out58.5%
*-commutative58.5%
*-commutative58.5%
Simplified58.5%
Taylor expanded in b around 0 51.7%
if -5.4000000000000004e-63 < (*.f64 b c) < -1.8999999999999999e-197Initial program 76.1%
Simplified72.7%
Taylor expanded in j around inf 45.5%
Final simplification57.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 (* (* j 27.0) k)))
(if (or (<= t_1 -2e+78) (not (<= t_1 2e+94)))
(- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x i))))
(- (* b c) (* 4.0 (+ (* x i) (* t a)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -2e+78) || !(t_1 <= 2e+94)) {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if ((t_1 <= (-2d+78)) .or. (.not. (t_1 <= 2d+94))) then
tmp = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
else
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -2e+78) || !(t_1 <= 2e+94)) {
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if (t_1 <= -2e+78) or not (t_1 <= 2e+94): tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i))) else: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((t_1 <= -2e+78) || !(t_1 <= 2e+94)) tmp = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if ((t_1 <= -2e+78) || ~((t_1 <= 2e+94)))
tmp = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
else
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+78], N[Not[LessEqual[t$95$1, 2e+94]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+78} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+94}\right):\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000002e78 or 2e94 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.1%
Simplified84.3%
Taylor expanded in t around 0 78.6%
if -2.00000000000000002e78 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e94Initial program 88.4%
Simplified85.4%
associate-*r*89.6%
distribute-rgt-out--88.3%
associate-+l-88.3%
associate-*l*86.3%
fma-neg86.3%
associate-*l*86.9%
associate-*l*86.9%
fma-neg87.5%
Applied egg-rr87.5%
fma-undefine87.5%
unsub-neg87.5%
associate-*r*86.9%
*-commutative86.9%
associate-*r*87.5%
fma-undefine86.9%
unsub-neg86.9%
Simplified86.9%
Taylor expanded in x around 0 79.2%
Taylor expanded in j around 0 76.4%
distribute-lft-out76.4%
*-commutative76.4%
*-commutative76.4%
Simplified76.4%
Final simplification77.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 (* 27.0 (* j k))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -2e+78)
(- (* b c) (+ t_1 (* 4.0 (* x i))))
(if (<= t_2 2e+76)
(- (* b c) (* 4.0 (+ (* x i) (* t a))))
(- (+ (* b c) (* -4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+78) {
tmp = (b * c) - (t_1 + (4.0 * (x * i)));
} else if (t_2 <= 2e+76) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
t_2 = (j * 27.0d0) * k
if (t_2 <= (-2d+78)) then
tmp = (b * c) - (t_1 + (4.0d0 * (x * i)))
else if (t_2 <= 2d+76) then
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+78) {
tmp = (b * c) - (t_1 + (4.0 * (x * i)));
} else if (t_2 <= 2e+76) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 27.0 * (j * k) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -2e+78: tmp = (b * c) - (t_1 + (4.0 * (x * i))) elif t_2 <= 2e+76: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) else: tmp = ((b * c) + (-4.0 * (t * a))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(27.0 * Float64(j * k)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -2e+78) tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(4.0 * Float64(x * i)))); elseif (t_2 <= 2e+76) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 27.0 * (j * k);
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -2e+78)
tmp = (b * c) - (t_1 + (4.0 * (x * i)));
elseif (t_2 <= 2e+76)
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
else
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+78], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+76], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $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 := 27 \cdot \left(j \cdot k\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+78}:\\
\;\;\;\;b \cdot c - \left(t\_1 + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+76}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000002e78Initial program 94.0%
Simplified92.6%
Taylor expanded in t around 0 81.9%
if -2.00000000000000002e78 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e76Initial program 88.1%
Simplified85.6%
associate-*r*89.3%
distribute-rgt-out--88.0%
associate-+l-88.0%
associate-*l*86.6%
fma-neg86.6%
associate-*l*87.2%
associate-*l*87.2%
fma-neg87.9%
Applied egg-rr87.9%
fma-undefine87.9%
unsub-neg87.9%
associate-*r*87.2%
*-commutative87.2%
associate-*r*87.9%
fma-undefine87.2%
unsub-neg87.2%
Simplified87.2%
Taylor expanded in x around 0 78.7%
Taylor expanded in j around 0 76.2%
distribute-lft-out76.2%
*-commutative76.2%
*-commutative76.2%
Simplified76.2%
if 2.0000000000000001e76 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 74.5%
Simplified74.4%
Taylor expanded in x around 0 78.7%
Final simplification77.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -2e+160)
(- (* -4.0 (* t a)) t_1)
(if (<= t_1 2e+167)
(- (* b c) (* 4.0 (+ (* x i) (* t a))))
(- (* b c) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -2e+160) {
tmp = (-4.0 * (t * a)) - t_1;
} else if (t_1 <= 2e+167) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = (b * c) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-2d+160)) then
tmp = ((-4.0d0) * (t * a)) - t_1
else if (t_1 <= 2d+167) then
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
else
tmp = (b * c) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -2e+160) {
tmp = (-4.0 * (t * a)) - t_1;
} else if (t_1 <= 2e+167) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else {
tmp = (b * c) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -2e+160: tmp = (-4.0 * (t * a)) - t_1 elif t_1 <= 2e+167: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) else: tmp = (b * c) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -2e+160) tmp = Float64(Float64(-4.0 * Float64(t * a)) - t_1); elseif (t_1 <= 2e+167) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); else tmp = Float64(Float64(b * c) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -2e+160)
tmp = (-4.0 * (t * a)) - t_1;
elseif (t_1 <= 2e+167)
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
else
tmp = (b * c) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+160], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 2e+167], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+160}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+167}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000001e160Initial program 94.0%
Taylor expanded in t around -inf 94.4%
associate-*r*94.4%
neg-mul-194.4%
cancel-sign-sub-inv94.4%
metadata-eval94.4%
*-commutative94.4%
associate-*r*94.4%
Simplified94.4%
Taylor expanded in x around 0 91.1%
metadata-eval91.1%
*-commutative91.1%
distribute-lft-neg-in91.1%
*-commutative91.1%
associate-*r*91.1%
distribute-rgt-neg-in91.1%
distribute-rgt-neg-in91.1%
metadata-eval91.1%
Simplified91.1%
Taylor expanded in t around inf 84.7%
if -2.00000000000000001e160 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e167Initial program 87.7%
Simplified85.7%
associate-*r*89.7%
distribute-rgt-out--87.6%
associate-+l-87.6%
associate-*l*85.4%
fma-neg85.4%
associate-*l*86.0%
associate-*l*86.0%
fma-neg86.5%
Applied egg-rr86.5%
fma-undefine86.5%
unsub-neg86.5%
associate-*r*86.0%
*-commutative86.0%
associate-*r*86.5%
fma-undefine85.9%
unsub-neg85.9%
Simplified85.9%
Taylor expanded in x around 0 79.1%
Taylor expanded in j around 0 72.5%
distribute-lft-out72.5%
*-commutative72.5%
*-commutative72.5%
Simplified72.5%
if 2.0000000000000001e167 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 71.7%
Taylor expanded in t around -inf 71.4%
associate-*r*71.4%
neg-mul-171.4%
cancel-sign-sub-inv71.4%
metadata-eval71.4%
*-commutative71.4%
associate-*r*71.4%
Simplified71.4%
Taylor expanded in x around 0 85.7%
metadata-eval85.7%
*-commutative85.7%
distribute-lft-neg-in85.7%
*-commutative85.7%
associate-*r*85.7%
distribute-rgt-neg-in85.7%
distribute-rgt-neg-in85.7%
metadata-eval85.7%
Simplified85.7%
Taylor expanded in b around inf 85.9%
Final simplification75.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))) (t_2 (* (* j k) -27.0)))
(if (<= b -2.6e+117)
(* b c)
(if (<= b -1.5e-131)
t_1
(if (<= b 5.8e-249)
t_2
(if (<= b 1.8e-64) t_1 (if (<= b 9e+19) t_2 (* 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 t_1 = t * (a * -4.0);
double t_2 = (j * k) * -27.0;
double tmp;
if (b <= -2.6e+117) {
tmp = b * c;
} else if (b <= -1.5e-131) {
tmp = t_1;
} else if (b <= 5.8e-249) {
tmp = t_2;
} else if (b <= 1.8e-64) {
tmp = t_1;
} else if (b <= 9e+19) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
t_2 = (j * k) * (-27.0d0)
if (b <= (-2.6d+117)) then
tmp = b * c
else if (b <= (-1.5d-131)) then
tmp = t_1
else if (b <= 5.8d-249) then
tmp = t_2
else if (b <= 1.8d-64) then
tmp = t_1
else if (b <= 9d+19) then
tmp = t_2
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 t_1 = t * (a * -4.0);
double t_2 = (j * k) * -27.0;
double tmp;
if (b <= -2.6e+117) {
tmp = b * c;
} else if (b <= -1.5e-131) {
tmp = t_1;
} else if (b <= 5.8e-249) {
tmp = t_2;
} else if (b <= 1.8e-64) {
tmp = t_1;
} else if (b <= 9e+19) {
tmp = t_2;
} 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): t_1 = t * (a * -4.0) t_2 = (j * k) * -27.0 tmp = 0 if b <= -2.6e+117: tmp = b * c elif b <= -1.5e-131: tmp = t_1 elif b <= 5.8e-249: tmp = t_2 elif b <= 1.8e-64: tmp = t_1 elif b <= 9e+19: tmp = t_2 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) t_1 = Float64(t * Float64(a * -4.0)) t_2 = Float64(Float64(j * k) * -27.0) tmp = 0.0 if (b <= -2.6e+117) tmp = Float64(b * c); elseif (b <= -1.5e-131) tmp = t_1; elseif (b <= 5.8e-249) tmp = t_2; elseif (b <= 1.8e-64) tmp = t_1; elseif (b <= 9e+19) tmp = t_2; 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)
t_1 = t * (a * -4.0);
t_2 = (j * k) * -27.0;
tmp = 0.0;
if (b <= -2.6e+117)
tmp = b * c;
elseif (b <= -1.5e-131)
tmp = t_1;
elseif (b <= 5.8e-249)
tmp = t_2;
elseif (b <= 1.8e-64)
tmp = t_1;
elseif (b <= 9e+19)
tmp = t_2;
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_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]}, If[LessEqual[b, -2.6e+117], N[(b * c), $MachinePrecision], If[LessEqual[b, -1.5e-131], t$95$1, If[LessEqual[b, 5.8e-249], t$95$2, If[LessEqual[b, 1.8e-64], t$95$1, If[LessEqual[b, 9e+19], t$95$2, 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}
t_1 := t \cdot \left(a \cdot -4\right)\\
t_2 := \left(j \cdot k\right) \cdot -27\\
\mathbf{if}\;b \leq -2.6 \cdot 10^{+117}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \leq -1.5 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5.8 \cdot 10^{-249}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 9 \cdot 10^{+19}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if b < -2.5999999999999999e117 or 9e19 < b Initial program 87.3%
Simplified85.3%
associate-*r*88.3%
distribute-rgt-out--87.3%
associate-+l-87.3%
associate-*l*85.2%
fma-neg85.2%
associate-*l*85.2%
associate-*l*85.2%
fma-neg87.3%
Applied egg-rr87.3%
fma-undefine87.3%
unsub-neg87.3%
associate-*r*87.3%
*-commutative87.3%
associate-*r*87.3%
fma-undefine85.2%
unsub-neg85.2%
Simplified85.2%
Taylor expanded in b around inf 51.8%
if -2.5999999999999999e117 < b < -1.49999999999999998e-131 or 5.80000000000000044e-249 < b < 1.7999999999999999e-64Initial program 89.5%
Simplified89.6%
associate-*r*91.7%
distribute-rgt-out--89.6%
associate-+l-89.6%
associate-*l*87.3%
fma-neg87.3%
associate-*l*87.3%
associate-*l*87.3%
fma-neg87.3%
Applied egg-rr87.3%
fma-undefine87.3%
unsub-neg87.3%
associate-*r*87.3%
*-commutative87.3%
associate-*r*87.3%
fma-undefine87.3%
unsub-neg87.3%
Simplified87.3%
Taylor expanded in a around inf 32.6%
*-commutative32.6%
*-commutative32.6%
associate-*r*32.6%
Simplified32.6%
if -1.49999999999999998e-131 < b < 5.80000000000000044e-249 or 1.7999999999999999e-64 < b < 9e19Initial program 82.1%
Simplified79.3%
Taylor expanded in j around inf 39.9%
Final simplification41.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 (* (* j 27.0) k)))
(if (or (<= t_1 -2e+78) (not (<= t_1 2e+94)))
(- (* b c) t_1)
(- (* b c) (* 4.0 (* t a))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -2e+78) || !(t_1 <= 2e+94)) {
tmp = (b * c) - t_1;
} else {
tmp = (b * c) - (4.0 * (t * a));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if ((t_1 <= (-2d+78)) .or. (.not. (t_1 <= 2d+94))) then
tmp = (b * c) - t_1
else
tmp = (b * c) - (4.0d0 * (t * a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -2e+78) || !(t_1 <= 2e+94)) {
tmp = (b * c) - t_1;
} else {
tmp = (b * c) - (4.0 * (t * a));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if (t_1 <= -2e+78) or not (t_1 <= 2e+94): tmp = (b * c) - t_1 else: tmp = (b * c) - (4.0 * (t * a)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((t_1 <= -2e+78) || !(t_1 <= 2e+94)) tmp = Float64(Float64(b * c) - t_1); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if ((t_1 <= -2e+78) || ~((t_1 <= 2e+94)))
tmp = (b * c) - t_1;
else
tmp = (b * c) - (4.0 * (t * a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+78], N[Not[LessEqual[t$95$1, 2e+94]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+78} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+94}\right):\\
\;\;\;\;b \cdot c - t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000002e78 or 2e94 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.1%
Taylor expanded in t around -inf 85.3%
associate-*r*85.3%
neg-mul-185.3%
cancel-sign-sub-inv85.3%
metadata-eval85.3%
*-commutative85.3%
associate-*r*85.3%
Simplified85.3%
Taylor expanded in x around 0 85.3%
metadata-eval85.3%
*-commutative85.3%
distribute-lft-neg-in85.3%
*-commutative85.3%
associate-*r*85.3%
distribute-rgt-neg-in85.3%
distribute-rgt-neg-in85.3%
metadata-eval85.3%
Simplified85.3%
Taylor expanded in b around inf 70.2%
if -2.00000000000000002e78 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e94Initial program 88.4%
Simplified85.4%
associate-*r*89.6%
distribute-rgt-out--88.3%
associate-+l-88.3%
associate-*l*86.3%
fma-neg86.3%
associate-*l*86.9%
associate-*l*86.9%
fma-neg87.5%
Applied egg-rr87.5%
fma-undefine87.5%
unsub-neg87.5%
associate-*r*86.9%
*-commutative86.9%
associate-*r*87.5%
fma-undefine86.9%
unsub-neg86.9%
Simplified86.9%
Taylor expanded in x around 0 79.2%
Taylor expanded in j around 0 76.4%
distribute-lft-out76.4%
*-commutative76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in x around 0 57.1%
Final simplification61.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -4.8e+124)
(* b c)
(if (<= (* b c) 0.0)
(* k (* j -27.0))
(if (<= (* b c) 8e+120) (* x (* i -4.0)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -4.8e+124) {
tmp = b * c;
} else if ((b * c) <= 0.0) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 8e+120) {
tmp = x * (i * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-4.8d+124)) then
tmp = b * c
else if ((b * c) <= 0.0d0) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 8d+120) then
tmp = x * (i * (-4.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -4.8e+124) {
tmp = b * c;
} else if ((b * c) <= 0.0) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 8e+120) {
tmp = x * (i * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -4.8e+124: tmp = b * c elif (b * c) <= 0.0: tmp = k * (j * -27.0) elif (b * c) <= 8e+120: tmp = x * (i * -4.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -4.8e+124) tmp = Float64(b * c); elseif (Float64(b * c) <= 0.0) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 8e+120) tmp = Float64(x * Float64(i * -4.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -4.8e+124)
tmp = b * c;
elseif ((b * c) <= 0.0)
tmp = k * (j * -27.0);
elseif ((b * c) <= 8e+120)
tmp = x * (i * -4.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -4.8e+124], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 0.0], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8e+120], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.8 \cdot 10^{+124}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{+120}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -4.80000000000000013e124 or 7.9999999999999998e120 < (*.f64 b c) Initial program 84.6%
Simplified83.5%
associate-*r*85.8%
distribute-rgt-out--84.6%
associate-+l-84.6%
associate-*l*82.1%
fma-neg82.1%
associate-*l*82.1%
associate-*l*82.1%
fma-neg84.5%
Applied egg-rr84.5%
fma-undefine84.5%
unsub-neg84.5%
associate-*r*84.5%
*-commutative84.5%
associate-*r*84.5%
fma-undefine82.1%
unsub-neg82.1%
Simplified82.1%
Taylor expanded in b around inf 64.3%
if -4.80000000000000013e124 < (*.f64 b c) < 0.0Initial program 88.8%
Simplified87.2%
associate-*r*90.7%
distribute-rgt-out--87.9%
associate-+l-87.9%
associate-*l*85.9%
fma-neg85.9%
associate-*l*85.9%
associate-*l*85.9%
fma-neg85.9%
Applied egg-rr85.9%
fma-undefine85.9%
unsub-neg85.9%
associate-*r*85.9%
*-commutative85.9%
associate-*r*85.9%
fma-undefine85.9%
unsub-neg85.9%
Simplified85.9%
Taylor expanded in j around inf 32.8%
associate-*r*33.7%
*-commutative33.7%
Simplified33.7%
if 0.0 < (*.f64 b c) < 7.9999999999999998e120Initial program 86.3%
Simplified83.2%
associate-*r*87.8%
distribute-rgt-out--86.3%
associate-+l-86.3%
associate-*l*83.2%
fma-neg83.2%
associate-*l*84.8%
associate-*l*84.8%
fma-neg84.8%
Applied egg-rr84.8%
fma-undefine84.8%
unsub-neg84.8%
associate-*r*83.2%
*-commutative83.2%
associate-*r*84.8%
fma-undefine84.8%
unsub-neg84.8%
Simplified84.8%
Taylor expanded in i around inf 37.0%
associate-*r*37.0%
*-commutative37.0%
Simplified37.0%
Final simplification44.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -3.1e+123)
(* b c)
(if (<= (* b c) 0.0)
(* (* j k) -27.0)
(if (<= (* b c) 1.02e+121) (* x (* i -4.0)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -3.1e+123) {
tmp = b * c;
} else if ((b * c) <= 0.0) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 1.02e+121) {
tmp = x * (i * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-3.1d+123)) then
tmp = b * c
else if ((b * c) <= 0.0d0) then
tmp = (j * k) * (-27.0d0)
else if ((b * c) <= 1.02d+121) then
tmp = x * (i * (-4.0d0))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -3.1e+123) {
tmp = b * c;
} else if ((b * c) <= 0.0) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 1.02e+121) {
tmp = x * (i * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -3.1e+123: tmp = b * c elif (b * c) <= 0.0: tmp = (j * k) * -27.0 elif (b * c) <= 1.02e+121: tmp = x * (i * -4.0) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -3.1e+123) tmp = Float64(b * c); elseif (Float64(b * c) <= 0.0) tmp = Float64(Float64(j * k) * -27.0); elseif (Float64(b * c) <= 1.02e+121) tmp = Float64(x * Float64(i * -4.0)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -3.1e+123)
tmp = b * c;
elseif ((b * c) <= 0.0)
tmp = (j * k) * -27.0;
elseif ((b * c) <= 1.02e+121)
tmp = x * (i * -4.0);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -3.1e+123], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 0.0], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.02e+121], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -3.1 \cdot 10^{+123}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;b \cdot c \leq 1.02 \cdot 10^{+121}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.10000000000000006e123 or 1.02000000000000005e121 < (*.f64 b c) Initial program 84.6%
Simplified83.5%
associate-*r*85.8%
distribute-rgt-out--84.6%
associate-+l-84.6%
associate-*l*82.1%
fma-neg82.1%
associate-*l*82.1%
associate-*l*82.1%
fma-neg84.5%
Applied egg-rr84.5%
fma-undefine84.5%
unsub-neg84.5%
associate-*r*84.5%
*-commutative84.5%
associate-*r*84.5%
fma-undefine82.1%
unsub-neg82.1%
Simplified82.1%
Taylor expanded in b around inf 64.3%
if -3.10000000000000006e123 < (*.f64 b c) < 0.0Initial program 88.8%
Simplified87.2%
Taylor expanded in j around inf 32.8%
if 0.0 < (*.f64 b c) < 1.02000000000000005e121Initial program 86.3%
Simplified83.2%
associate-*r*87.8%
distribute-rgt-out--86.3%
associate-+l-86.3%
associate-*l*83.2%
fma-neg83.2%
associate-*l*84.8%
associate-*l*84.8%
fma-neg84.8%
Applied egg-rr84.8%
fma-undefine84.8%
unsub-neg84.8%
associate-*r*83.2%
*-commutative83.2%
associate-*r*84.8%
fma-undefine84.8%
unsub-neg84.8%
Simplified84.8%
Taylor expanded in i around inf 37.0%
associate-*r*37.0%
*-commutative37.0%
Simplified37.0%
Final simplification44.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 1.48e+88) (- (- (+ (* b c) (* t (* a -4.0))) (* (* x 4.0) i)) (* (* j 27.0) k)) (+ (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))) (* j (* k -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
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 <= 1.48e+88) {
tmp = (((b * c) + (t * (a * -4.0))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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 <= 1.48d+88) then
tmp = (((b * c) + (t * (a * (-4.0d0)))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
else
tmp = (t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
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 <= 1.48e+88) {
tmp = (((b * c) + (t * (a * -4.0))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= 1.48e+88: tmp = (((b * c) + (t * (a * -4.0))) - ((x * 4.0) * i)) - ((j * 27.0) * k) else: tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= 1.48e+88) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(t * Float64(a * -4.0))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0))) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= 1.48e+88)
tmp = (((b * c) + (t * (a * -4.0))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
else
tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, 1.48e+88], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.48 \cdot 10^{+88}:\\
\;\;\;\;\left(\left(b \cdot c + t \cdot \left(a \cdot -4\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if t < 1.48000000000000001e88Initial program 87.6%
Taylor expanded in t around -inf 84.4%
associate-*r*84.4%
neg-mul-184.4%
cancel-sign-sub-inv84.4%
metadata-eval84.4%
*-commutative84.4%
associate-*r*83.9%
Simplified83.9%
Taylor expanded in x around 0 85.2%
metadata-eval85.2%
*-commutative85.2%
distribute-lft-neg-in85.2%
*-commutative85.2%
associate-*r*85.2%
distribute-rgt-neg-in85.2%
distribute-rgt-neg-in85.2%
metadata-eval85.2%
Simplified85.2%
if 1.48000000000000001e88 < t Initial program 83.2%
Simplified91.7%
Taylor expanded in t around inf 73.8%
Final simplification83.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 (<= t 7.5e+86) (- (+ (* b c) (* -4.0 (* t a))) (+ (* 27.0 (* j k)) (* 4.0 (* x i)))) (+ (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))) (* j (* k -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= 7.5e+86) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else {
tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= 7.5d+86) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
else
tmp = (t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= 7.5e+86) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
} else {
tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= 7.5e+86: tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i))) else: tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= 7.5e+86) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))); else tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0))) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= 7.5e+86)
tmp = ((b * c) + (-4.0 * (t * a))) - ((27.0 * (j * k)) + (4.0 * (x * i)));
else
tmp = (t * ((18.0 * (x * (y * z))) + (a * -4.0))) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, 7.5e+86], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.5 \cdot 10^{+86}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if t < 7.4999999999999997e86Initial program 87.6%
Simplified83.9%
Taylor expanded in y around 0 85.3%
if 7.4999999999999997e86 < t Initial program 83.2%
Simplified91.7%
Taylor expanded in t around inf 73.8%
Final simplification83.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 (<= c -1.75e-45)
(- (* b c) (* 4.0 (* t a)))
(if (<= c 3.8e+143)
(+ (* -4.0 (* t a)) (* (* j k) -27.0))
(+ (* b c) (* j (* k -27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -1.75e-45) {
tmp = (b * c) - (4.0 * (t * a));
} else if (c <= 3.8e+143) {
tmp = (-4.0 * (t * a)) + ((j * k) * -27.0);
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (c <= (-1.75d-45)) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (c <= 3.8d+143) then
tmp = ((-4.0d0) * (t * a)) + ((j * k) * (-27.0d0))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -1.75e-45) {
tmp = (b * c) - (4.0 * (t * a));
} else if (c <= 3.8e+143) {
tmp = (-4.0 * (t * a)) + ((j * k) * -27.0);
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= -1.75e-45: tmp = (b * c) - (4.0 * (t * a)) elif c <= 3.8e+143: tmp = (-4.0 * (t * a)) + ((j * k) * -27.0) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= -1.75e-45) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (c <= 3.8e+143) tmp = Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(j * k) * -27.0)); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (c <= -1.75e-45)
tmp = (b * c) - (4.0 * (t * a));
elseif (c <= 3.8e+143)
tmp = (-4.0 * (t * a)) + ((j * k) * -27.0);
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -1.75e-45], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.8e+143], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.75 \cdot 10^{-45}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;c \leq 3.8 \cdot 10^{+143}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + \left(j \cdot k\right) \cdot -27\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if c < -1.75e-45Initial program 90.1%
Simplified84.6%
associate-*r*90.1%
distribute-rgt-out--90.1%
associate-+l-90.1%
associate-*l*87.2%
fma-neg87.2%
associate-*l*88.6%
associate-*l*88.6%
fma-neg88.6%
Applied egg-rr88.6%
fma-undefine88.6%
unsub-neg88.6%
associate-*r*87.2%
*-commutative87.2%
associate-*r*88.6%
fma-undefine88.6%
unsub-neg88.6%
Simplified88.6%
Taylor expanded in x around 0 88.8%
Taylor expanded in j around 0 79.3%
distribute-lft-out79.3%
*-commutative79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in x around 0 69.6%
if -1.75e-45 < c < 3.8e143Initial program 90.0%
Simplified87.5%
Taylor expanded in t around inf 64.9%
Taylor expanded in x around 0 52.3%
if 3.8e143 < c Initial program 67.0%
Simplified80.8%
Taylor expanded in b around inf 72.7%
Final simplification59.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= k -3.4e-20) (not (<= k 6.8e+110))) (* (* 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 ((k <= -3.4e-20) || !(k <= 6.8e+110)) {
tmp = (j * k) * -27.0;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= (-3.4d-20)) .or. (.not. (k <= 6.8d+110))) then
tmp = (j * k) * (-27.0d0)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -3.4e-20) || !(k <= 6.8e+110)) {
tmp = (j * k) * -27.0;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (k <= -3.4e-20) or not (k <= 6.8e+110): tmp = (j * k) * -27.0 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((k <= -3.4e-20) || !(k <= 6.8e+110)) tmp = Float64(Float64(j * k) * -27.0); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((k <= -3.4e-20) || ~((k <= 6.8e+110)))
tmp = (j * k) * -27.0;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -3.4e-20], N[Not[LessEqual[k, 6.8e+110]], $MachinePrecision]], N[(N[(j * k), $MachinePrecision] * -27.0), $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}\;k \leq -3.4 \cdot 10^{-20} \lor \neg \left(k \leq 6.8 \cdot 10^{+110}\right):\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if k < -3.3999999999999997e-20 or 6.8000000000000003e110 < k Initial program 83.7%
Simplified82.0%
Taylor expanded in j around inf 47.4%
if -3.3999999999999997e-20 < k < 6.8000000000000003e110Initial program 89.1%
Simplified87.2%
associate-*r*91.2%
distribute-rgt-out--89.1%
associate-+l-89.1%
associate-*l*87.6%
fma-neg87.6%
associate-*l*88.3%
associate-*l*88.3%
fma-neg89.0%
Applied egg-rr89.0%
fma-undefine89.0%
unsub-neg89.0%
associate-*r*88.3%
*-commutative88.3%
associate-*r*89.0%
fma-undefine88.3%
unsub-neg88.3%
Simplified88.3%
Taylor expanded in b around inf 34.7%
Final simplification40.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 (<= k -5.5e-21) (* j (* k -27.0)) (if (<= k 6.8e+110) (* b c) (* (* j k) -27.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -5.5e-21) {
tmp = j * (k * -27.0);
} else if (k <= 6.8e+110) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-5.5d-21)) then
tmp = j * (k * (-27.0d0))
else if (k <= 6.8d+110) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -5.5e-21) {
tmp = j * (k * -27.0);
} else if (k <= 6.8e+110) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -5.5e-21: tmp = j * (k * -27.0) elif k <= 6.8e+110: tmp = b * c else: tmp = (j * k) * -27.0 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -5.5e-21) tmp = Float64(j * Float64(k * -27.0)); elseif (k <= 6.8e+110) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -5.5e-21)
tmp = j * (k * -27.0);
elseif (k <= 6.8e+110)
tmp = b * c;
else
tmp = (j * k) * -27.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -5.5e-21], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.8e+110], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -5.5 \cdot 10^{-21}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;k \leq 6.8 \cdot 10^{+110}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if k < -5.49999999999999977e-21Initial program 86.9%
Taylor expanded in t around -inf 82.9%
associate-*r*82.9%
neg-mul-182.9%
cancel-sign-sub-inv82.9%
metadata-eval82.9%
*-commutative82.9%
associate-*r*82.9%
Simplified82.9%
Taylor expanded in j around inf 40.1%
metadata-eval40.1%
distribute-lft-neg-in40.1%
associate-*r*40.1%
*-commutative40.1%
associate-*l*40.1%
distribute-rgt-neg-in40.1%
distribute-lft-neg-in40.1%
metadata-eval40.1%
*-commutative40.1%
Simplified40.1%
if -5.49999999999999977e-21 < k < 6.8000000000000003e110Initial program 89.1%
Simplified87.2%
associate-*r*91.2%
distribute-rgt-out--89.1%
associate-+l-89.1%
associate-*l*87.6%
fma-neg87.6%
associate-*l*88.3%
associate-*l*88.3%
fma-neg89.0%
Applied egg-rr89.0%
fma-undefine89.0%
unsub-neg89.0%
associate-*r*88.3%
*-commutative88.3%
associate-*r*89.0%
fma-undefine88.3%
unsub-neg88.3%
Simplified88.3%
Taylor expanded in b around inf 34.7%
if 6.8000000000000003e110 < k Initial program 78.3%
Simplified80.6%
Taylor expanded in j around inf 59.8%
Final simplification40.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 (* 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 86.8%
Simplified85.0%
associate-*r*88.4%
distribute-rgt-out--86.4%
associate-+l-86.4%
associate-*l*84.0%
fma-neg84.0%
associate-*l*84.4%
associate-*l*84.4%
fma-neg85.1%
Applied egg-rr85.1%
fma-undefine85.1%
unsub-neg85.1%
associate-*r*84.8%
*-commutative84.8%
associate-*r*85.1%
fma-undefine84.4%
unsub-neg84.4%
Simplified84.4%
Taylor expanded in b around inf 25.7%
(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 2024086
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))