
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* x 4.0) i)) (t_2 (* (* j 27.0) k)))
(if (<=
(-
(- (+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c)) t_1)
t_2)
INFINITY)
(- (- (+ (* b c) (* t (- (* z (* x (* 18.0 y))) (* a 4.0)))) t_1) t_2)
(+ (* b c) (* t (+ (* a -4.0) (* 18.0 (* x (* y z)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * 4.0) * i;
double t_2 = (j * 27.0) * k;
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - t_1) - t_2) <= ((double) INFINITY)) {
tmp = (((b * c) + (t * ((z * (x * (18.0 * y))) - (a * 4.0)))) - t_1) - t_2;
} else {
tmp = (b * c) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * 4.0) * i;
double t_2 = (j * 27.0) * k;
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - t_1) - t_2) <= Double.POSITIVE_INFINITY) {
tmp = (((b * c) + (t * ((z * (x * (18.0 * y))) - (a * 4.0)))) - t_1) - t_2;
} else {
tmp = (b * c) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * 4.0) * i t_2 = (j * 27.0) * k tmp = 0 if ((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - t_1) - t_2) <= math.inf: tmp = (((b * c) + (t * ((z * (x * (18.0 * y))) - (a * 4.0)))) - t_1) - t_2 else: tmp = (b * c) + (t * ((a * -4.0) + (18.0 * (x * (y * z))))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * 4.0) * i) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - t_1) - t_2) <= Inf) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(z * Float64(x * Float64(18.0 * y))) - Float64(a * 4.0)))) - t_1) - t_2); else tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(x * Float64(y * z)))))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * 4.0) * i;
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - t_1) - t_2) <= Inf)
tmp = (((b * c) + (t * ((z * (x * (18.0 * y))) - (a * 4.0)))) - t_1) - t_2;
else
tmp = (b * c) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], Infinity], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(z * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], 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]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 4\right) \cdot i\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - t\_1\right) - t\_2 \leq \infty:\\
\;\;\;\;\left(\left(b \cdot c + t \cdot \left(z \cdot \left(x \cdot \left(18 \cdot y\right)\right) - a \cdot 4\right)\right) - t\_1\right) - t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t \cdot \left(a \cdot -4 + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 94.2%
distribute-rgt-out--94.2%
*-commutative94.2%
associate-*l*94.2%
Applied egg-rr94.2%
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%
Simplified45.5%
Taylor expanded in i around 0 59.1%
Taylor expanded in k around 0 54.8%
Final simplification90.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))) (t_2 (* -4.0 (* t a))))
(if (<= (* b c) -0.00128)
(* b c)
(if (<= (* b c) -5.5e-189)
t_1
(if (<= (* b c) 3.6e-290)
t_2
(if (<= (* b c) 1.75e-143)
t_1
(if (<= (* b c) 5.3e-44)
t_2
(if (<= (* b c) 6000.0)
t_1
(if (<= (* b c) 5.2e+127) t_2 (* b c))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = -4.0 * (t * a);
double tmp;
if ((b * c) <= -0.00128) {
tmp = b * c;
} else if ((b * c) <= -5.5e-189) {
tmp = t_1;
} else if ((b * c) <= 3.6e-290) {
tmp = t_2;
} else if ((b * c) <= 1.75e-143) {
tmp = t_1;
} else if ((b * c) <= 5.3e-44) {
tmp = t_2;
} else if ((b * c) <= 6000.0) {
tmp = t_1;
} else if ((b * c) <= 5.2e+127) {
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.
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 = (-4.0d0) * (t * a)
if ((b * c) <= (-0.00128d0)) then
tmp = b * c
else if ((b * c) <= (-5.5d-189)) then
tmp = t_1
else if ((b * c) <= 3.6d-290) then
tmp = t_2
else if ((b * c) <= 1.75d-143) then
tmp = t_1
else if ((b * c) <= 5.3d-44) then
tmp = t_2
else if ((b * c) <= 6000.0d0) then
tmp = t_1
else if ((b * c) <= 5.2d+127) 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;
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 = -4.0 * (t * a);
double tmp;
if ((b * c) <= -0.00128) {
tmp = b * c;
} else if ((b * c) <= -5.5e-189) {
tmp = t_1;
} else if ((b * c) <= 3.6e-290) {
tmp = t_2;
} else if ((b * c) <= 1.75e-143) {
tmp = t_1;
} else if ((b * c) <= 5.3e-44) {
tmp = t_2;
} else if ((b * c) <= 6000.0) {
tmp = t_1;
} else if ((b * c) <= 5.2e+127) {
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]) [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 = -4.0 * (t * a) tmp = 0 if (b * c) <= -0.00128: tmp = b * c elif (b * c) <= -5.5e-189: tmp = t_1 elif (b * c) <= 3.6e-290: tmp = t_2 elif (b * c) <= 1.75e-143: tmp = t_1 elif (b * c) <= 5.3e-44: tmp = t_2 elif (b * c) <= 6000.0: tmp = t_1 elif (b * c) <= 5.2e+127: 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]) 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(-4.0 * Float64(t * a)) tmp = 0.0 if (Float64(b * c) <= -0.00128) tmp = Float64(b * c); elseif (Float64(b * c) <= -5.5e-189) tmp = t_1; elseif (Float64(b * c) <= 3.6e-290) tmp = t_2; elseif (Float64(b * c) <= 1.75e-143) tmp = t_1; elseif (Float64(b * c) <= 5.3e-44) tmp = t_2; elseif (Float64(b * c) <= 6000.0) tmp = t_1; elseif (Float64(b * c) <= 5.2e+127) 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])){:}
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 = -4.0 * (t * a);
tmp = 0.0;
if ((b * c) <= -0.00128)
tmp = b * c;
elseif ((b * c) <= -5.5e-189)
tmp = t_1;
elseif ((b * c) <= 3.6e-290)
tmp = t_2;
elseif ((b * c) <= 1.75e-143)
tmp = t_1;
elseif ((b * c) <= 5.3e-44)
tmp = t_2;
elseif ((b * c) <= 6000.0)
tmp = t_1;
elseif ((b * c) <= 5.2e+127)
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.
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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -0.00128], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.5e-189], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 3.6e-290], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.75e-143], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5.3e-44], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 6000.0], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5.2e+127], 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])\\\\
[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 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -0.00128:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5.5 \cdot 10^{-189}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{-290}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.75 \cdot 10^{-143}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 5.3 \cdot 10^{-44}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 6000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 5.2 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -0.0012800000000000001 or 5.2000000000000004e127 < (*.f64 b c) Initial program 84.0%
Simplified87.0%
Taylor expanded in b around inf 53.1%
if -0.0012800000000000001 < (*.f64 b c) < -5.4999999999999999e-189 or 3.59999999999999979e-290 < (*.f64 b c) < 1.75000000000000003e-143 or 5.29999999999999971e-44 < (*.f64 b c) < 6e3Initial program 82.3%
Simplified86.8%
Taylor expanded in k around inf 40.6%
if -5.4999999999999999e-189 < (*.f64 b c) < 3.59999999999999979e-290 or 1.75000000000000003e-143 < (*.f64 b c) < 5.29999999999999971e-44 or 6e3 < (*.f64 b c) < 5.2000000000000004e127Initial program 91.2%
Simplified93.4%
Taylor expanded in a around inf 43.0%
Final simplification46.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* t a))) (t_2 (* -27.0 (* j k))))
(if (<= (* b c) -6.5e+58)
(* b c)
(if (<= (* b c) -4.2e-66)
(* 18.0 (* y (* z (* x t))))
(if (<= (* b c) -3.5e-190)
t_2
(if (<= (* b c) 2.05e-290)
t_1
(if (<= (* b c) 1.6e-143)
t_2
(if (<= (* b c) 4.5e+127) t_1 (* b c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = -27.0 * (j * k);
double tmp;
if ((b * c) <= -6.5e+58) {
tmp = b * c;
} else if ((b * c) <= -4.2e-66) {
tmp = 18.0 * (y * (z * (x * t)));
} else if ((b * c) <= -3.5e-190) {
tmp = t_2;
} else if ((b * c) <= 2.05e-290) {
tmp = t_1;
} else if ((b * c) <= 1.6e-143) {
tmp = t_2;
} else if ((b * c) <= 4.5e+127) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (t * a)
t_2 = (-27.0d0) * (j * k)
if ((b * c) <= (-6.5d+58)) then
tmp = b * c
else if ((b * c) <= (-4.2d-66)) then
tmp = 18.0d0 * (y * (z * (x * t)))
else if ((b * c) <= (-3.5d-190)) then
tmp = t_2
else if ((b * c) <= 2.05d-290) then
tmp = t_1
else if ((b * c) <= 1.6d-143) then
tmp = t_2
else if ((b * c) <= 4.5d+127) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = -27.0 * (j * k);
double tmp;
if ((b * c) <= -6.5e+58) {
tmp = b * c;
} else if ((b * c) <= -4.2e-66) {
tmp = 18.0 * (y * (z * (x * t)));
} else if ((b * c) <= -3.5e-190) {
tmp = t_2;
} else if ((b * c) <= 2.05e-290) {
tmp = t_1;
} else if ((b * c) <= 1.6e-143) {
tmp = t_2;
} else if ((b * c) <= 4.5e+127) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (t * a) t_2 = -27.0 * (j * k) tmp = 0 if (b * c) <= -6.5e+58: tmp = b * c elif (b * c) <= -4.2e-66: tmp = 18.0 * (y * (z * (x * t))) elif (b * c) <= -3.5e-190: tmp = t_2 elif (b * c) <= 2.05e-290: tmp = t_1 elif (b * c) <= 1.6e-143: tmp = t_2 elif (b * c) <= 4.5e+127: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) t_2 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (Float64(b * c) <= -6.5e+58) tmp = Float64(b * c); elseif (Float64(b * c) <= -4.2e-66) tmp = Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))); elseif (Float64(b * c) <= -3.5e-190) tmp = t_2; elseif (Float64(b * c) <= 2.05e-290) tmp = t_1; elseif (Float64(b * c) <= 1.6e-143) tmp = t_2; elseif (Float64(b * c) <= 4.5e+127) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (t * a);
t_2 = -27.0 * (j * k);
tmp = 0.0;
if ((b * c) <= -6.5e+58)
tmp = b * c;
elseif ((b * c) <= -4.2e-66)
tmp = 18.0 * (y * (z * (x * t)));
elseif ((b * c) <= -3.5e-190)
tmp = t_2;
elseif ((b * c) <= 2.05e-290)
tmp = t_1;
elseif ((b * c) <= 1.6e-143)
tmp = t_2;
elseif ((b * c) <= 4.5e+127)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.5e+58], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -4.2e-66], N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.5e-190], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 2.05e-290], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.6e-143], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 4.5e+127], t$95$1, N[(b * c), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;b \cdot c \leq -6.5 \cdot 10^{+58}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -4.2 \cdot 10^{-66}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -3.5 \cdot 10^{-190}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 2.05 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.6 \cdot 10^{-143}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 4.5 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -6.49999999999999998e58 or 4.50000000000000034e127 < (*.f64 b c) Initial program 84.6%
Simplified84.7%
Taylor expanded in b around inf 59.6%
if -6.49999999999999998e58 < (*.f64 b c) < -4.2000000000000001e-66Initial program 74.0%
Simplified93.4%
Taylor expanded in y around inf 45.5%
*-commutative45.5%
Applied egg-rr45.5%
associate-*r*45.5%
Simplified45.5%
Taylor expanded in t around 0 45.5%
associate-*r*45.4%
*-commutative45.4%
associate-*r*45.5%
associate-*r*45.5%
associate-*l*48.6%
*-commutative48.6%
associate-*r*48.6%
*-commutative48.6%
*-commutative48.6%
Simplified48.6%
if -4.2000000000000001e-66 < (*.f64 b c) < -3.4999999999999999e-190 or 2.0500000000000001e-290 < (*.f64 b c) < 1.5999999999999999e-143Initial program 92.5%
Simplified95.1%
Taylor expanded in k around inf 40.9%
if -3.4999999999999999e-190 < (*.f64 b c) < 2.0500000000000001e-290 or 1.5999999999999999e-143 < (*.f64 b c) < 4.50000000000000034e127Initial program 88.3%
Simplified89.4%
Taylor expanded in a around inf 39.6%
Final simplification47.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)) (t_2 (* x (* y z))))
(if (<= t_1 -1e+300)
(- (* -4.0 (* x i)) (* j (* 27.0 k)))
(if (or (<= t_1 -5e+53) (not (<= t_1 5e+40)))
(+ (* k (* j -27.0)) (+ (* b c) (* 18.0 (* t t_2))))
(+ (* b c) (* t (+ (* a -4.0) (* 18.0 t_2))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = x * (y * z);
double tmp;
if (t_1 <= -1e+300) {
tmp = (-4.0 * (x * i)) - (j * (27.0 * k));
} else if ((t_1 <= -5e+53) || !(t_1 <= 5e+40)) {
tmp = (k * (j * -27.0)) + ((b * c) + (18.0 * (t * t_2)));
} else {
tmp = (b * c) + (t * ((a * -4.0) + (18.0 * 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.
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 = x * (y * z)
if (t_1 <= (-1d+300)) then
tmp = ((-4.0d0) * (x * i)) - (j * (27.0d0 * k))
else if ((t_1 <= (-5d+53)) .or. (.not. (t_1 <= 5d+40))) then
tmp = (k * (j * (-27.0d0))) + ((b * c) + (18.0d0 * (t * t_2)))
else
tmp = (b * c) + (t * ((a * (-4.0d0)) + (18.0d0 * 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;
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 = x * (y * z);
double tmp;
if (t_1 <= -1e+300) {
tmp = (-4.0 * (x * i)) - (j * (27.0 * k));
} else if ((t_1 <= -5e+53) || !(t_1 <= 5e+40)) {
tmp = (k * (j * -27.0)) + ((b * c) + (18.0 * (t * t_2)));
} else {
tmp = (b * c) + (t * ((a * -4.0) + (18.0 * 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]) [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 = x * (y * z) tmp = 0 if t_1 <= -1e+300: tmp = (-4.0 * (x * i)) - (j * (27.0 * k)) elif (t_1 <= -5e+53) or not (t_1 <= 5e+40): tmp = (k * (j * -27.0)) + ((b * c) + (18.0 * (t * t_2))) else: tmp = (b * c) + (t * ((a * -4.0) + (18.0 * 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]) 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(x * Float64(y * z)) tmp = 0.0 if (t_1 <= -1e+300) tmp = Float64(Float64(-4.0 * Float64(x * i)) - Float64(j * Float64(27.0 * k))); elseif ((t_1 <= -5e+53) || !(t_1 <= 5e+40)) tmp = Float64(Float64(k * Float64(j * -27.0)) + Float64(Float64(b * c) + Float64(18.0 * Float64(t * t_2)))); else tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * 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])){:}
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 = x * (y * z);
tmp = 0.0;
if (t_1 <= -1e+300)
tmp = (-4.0 * (x * i)) - (j * (27.0 * k));
elseif ((t_1 <= -5e+53) || ~((t_1 <= 5e+40)))
tmp = (k * (j * -27.0)) + ((b * c) + (18.0 * (t * t_2)));
else
tmp = (b * c) + (t * ((a * -4.0) + (18.0 * 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.
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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+300], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -5e+53], N[Not[LessEqual[t$95$1, 5e+40]], $MachinePrecision]], N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+300}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+53} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+40}\right):\\
\;\;\;\;k \cdot \left(j \cdot -27\right) + \left(b \cdot c + 18 \cdot \left(t \cdot t\_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t \cdot \left(a \cdot -4 + 18 \cdot t\_2\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.0000000000000001e300Initial program 50.3%
distribute-rgt-out--55.8%
*-commutative55.8%
associate-*l*55.8%
Applied egg-rr55.8%
Taylor expanded in i around inf 83.6%
Taylor expanded in j around 0 88.9%
*-commutative88.9%
associate-*l*88.8%
*-commutative88.8%
*-commutative88.8%
Simplified88.8%
if -1.0000000000000001e300 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000004e53 or 5.00000000000000003e40 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 85.8%
Simplified91.6%
Taylor expanded in i around 0 85.0%
Taylor expanded in a around 0 78.1%
if -5.0000000000000004e53 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5.00000000000000003e40Initial program 90.4%
Simplified90.5%
Taylor expanded in i around 0 75.6%
Taylor expanded in k around 0 71.9%
Final simplification75.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i)))
(t_2 (* 18.0 (* t (* x (* y z)))))
(t_3 (* -4.0 (* t a))))
(if (<= t -5.6e+274)
t_3
(if (<= t -3.8e+89)
t_2
(if (<= t -1.15e-180)
(* -27.0 (* j k))
(if (<= t -9.5e-249)
(* b c)
(if (<= t 2.45e-201)
(* k (* j -27.0))
(if (<= t 0.00026)
t_1
(if (<= t 1.45e+34) t_2 (if (<= t 2.15e+111) t_1 t_3))))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double t_2 = 18.0 * (t * (x * (y * z)));
double t_3 = -4.0 * (t * a);
double tmp;
if (t <= -5.6e+274) {
tmp = t_3;
} else if (t <= -3.8e+89) {
tmp = t_2;
} else if (t <= -1.15e-180) {
tmp = -27.0 * (j * k);
} else if (t <= -9.5e-249) {
tmp = b * c;
} else if (t <= 2.45e-201) {
tmp = k * (j * -27.0);
} else if (t <= 0.00026) {
tmp = t_1;
} else if (t <= 1.45e+34) {
tmp = t_2;
} else if (t <= 2.15e+111) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
t_2 = 18.0d0 * (t * (x * (y * z)))
t_3 = (-4.0d0) * (t * a)
if (t <= (-5.6d+274)) then
tmp = t_3
else if (t <= (-3.8d+89)) then
tmp = t_2
else if (t <= (-1.15d-180)) then
tmp = (-27.0d0) * (j * k)
else if (t <= (-9.5d-249)) then
tmp = b * c
else if (t <= 2.45d-201) then
tmp = k * (j * (-27.0d0))
else if (t <= 0.00026d0) then
tmp = t_1
else if (t <= 1.45d+34) then
tmp = t_2
else if (t <= 2.15d+111) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double t_2 = 18.0 * (t * (x * (y * z)));
double t_3 = -4.0 * (t * a);
double tmp;
if (t <= -5.6e+274) {
tmp = t_3;
} else if (t <= -3.8e+89) {
tmp = t_2;
} else if (t <= -1.15e-180) {
tmp = -27.0 * (j * k);
} else if (t <= -9.5e-249) {
tmp = b * c;
} else if (t <= 2.45e-201) {
tmp = k * (j * -27.0);
} else if (t <= 0.00026) {
tmp = t_1;
} else if (t <= 1.45e+34) {
tmp = t_2;
} else if (t <= 2.15e+111) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (x * i) t_2 = 18.0 * (t * (x * (y * z))) t_3 = -4.0 * (t * a) tmp = 0 if t <= -5.6e+274: tmp = t_3 elif t <= -3.8e+89: tmp = t_2 elif t <= -1.15e-180: tmp = -27.0 * (j * k) elif t <= -9.5e-249: tmp = b * c elif t <= 2.45e-201: tmp = k * (j * -27.0) elif t <= 0.00026: tmp = t_1 elif t <= 1.45e+34: tmp = t_2 elif t <= 2.15e+111: tmp = t_1 else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) t_3 = Float64(-4.0 * Float64(t * a)) tmp = 0.0 if (t <= -5.6e+274) tmp = t_3; elseif (t <= -3.8e+89) tmp = t_2; elseif (t <= -1.15e-180) tmp = Float64(-27.0 * Float64(j * k)); elseif (t <= -9.5e-249) tmp = Float64(b * c); elseif (t <= 2.45e-201) tmp = Float64(k * Float64(j * -27.0)); elseif (t <= 0.00026) tmp = t_1; elseif (t <= 1.45e+34) tmp = t_2; elseif (t <= 2.15e+111) tmp = t_1; else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (x * i);
t_2 = 18.0 * (t * (x * (y * z)));
t_3 = -4.0 * (t * a);
tmp = 0.0;
if (t <= -5.6e+274)
tmp = t_3;
elseif (t <= -3.8e+89)
tmp = t_2;
elseif (t <= -1.15e-180)
tmp = -27.0 * (j * k);
elseif (t <= -9.5e-249)
tmp = b * c;
elseif (t <= 2.45e-201)
tmp = k * (j * -27.0);
elseif (t <= 0.00026)
tmp = t_1;
elseif (t <= 1.45e+34)
tmp = t_2;
elseif (t <= 2.15e+111)
tmp = t_1;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+274], t$95$3, If[LessEqual[t, -3.8e+89], t$95$2, If[LessEqual[t, -1.15e-180], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.5e-249], N[(b * c), $MachinePrecision], If[LessEqual[t, 2.45e-201], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.00026], t$95$1, If[LessEqual[t, 1.45e+34], t$95$2, If[LessEqual[t, 2.15e+111], t$95$1, t$95$3]]]]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
t_3 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+274}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{+89}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-180}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-249}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{-201}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;t \leq 0.00026:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -5.60000000000000017e274 or 2.14999999999999997e111 < t Initial program 93.4%
Simplified95.6%
Taylor expanded in a around inf 54.8%
if -5.60000000000000017e274 < t < -3.80000000000000023e89 or 2.59999999999999977e-4 < t < 1.4500000000000001e34Initial program 78.7%
Simplified93.3%
Taylor expanded in y around inf 62.9%
if -3.80000000000000023e89 < t < -1.14999999999999998e-180Initial program 88.3%
Simplified82.6%
Taylor expanded in k around inf 35.4%
if -1.14999999999999998e-180 < t < -9.4999999999999997e-249Initial program 95.8%
Simplified91.6%
Taylor expanded in b around inf 60.0%
if -9.4999999999999997e-249 < t < 2.4499999999999998e-201Initial program 80.1%
distribute-rgt-out--80.1%
*-commutative80.1%
associate-*l*80.1%
Applied egg-rr80.1%
Taylor expanded in j around inf 51.3%
*-commutative51.3%
*-commutative51.3%
associate-*r*51.3%
Simplified51.3%
if 2.4499999999999998e-201 < t < 2.59999999999999977e-4 or 1.4500000000000001e34 < t < 2.14999999999999997e111Initial program 83.7%
Simplified87.6%
Taylor expanded in i around inf 38.6%
Final simplification49.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* t (* y (* x z))))))
(if (<= (* b c) -2.4e+58)
(* b c)
(if (<= (* b c) -3.5e-65)
t_1
(if (<= (* b c) -1.12e-194)
(* -27.0 (* j k))
(if (<= (* b c) -3.7e-270)
t_1
(if (<= (* b c) 1.95e+127) (* -4.0 (* t a)) (* b c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (y * (x * z)));
double tmp;
if ((b * c) <= -2.4e+58) {
tmp = b * c;
} else if ((b * c) <= -3.5e-65) {
tmp = t_1;
} else if ((b * c) <= -1.12e-194) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= -3.7e-270) {
tmp = t_1;
} else if ((b * c) <= 1.95e+127) {
tmp = -4.0 * (t * a);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (t * (y * (x * z)))
if ((b * c) <= (-2.4d+58)) then
tmp = b * c
else if ((b * c) <= (-3.5d-65)) then
tmp = t_1
else if ((b * c) <= (-1.12d-194)) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= (-3.7d-270)) then
tmp = t_1
else if ((b * c) <= 1.95d+127) then
tmp = (-4.0d0) * (t * a)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (t * (y * (x * z)));
double tmp;
if ((b * c) <= -2.4e+58) {
tmp = b * c;
} else if ((b * c) <= -3.5e-65) {
tmp = t_1;
} else if ((b * c) <= -1.12e-194) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= -3.7e-270) {
tmp = t_1;
} else if ((b * c) <= 1.95e+127) {
tmp = -4.0 * (t * a);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (t * (y * (x * z))) tmp = 0 if (b * c) <= -2.4e+58: tmp = b * c elif (b * c) <= -3.5e-65: tmp = t_1 elif (b * c) <= -1.12e-194: tmp = -27.0 * (j * k) elif (b * c) <= -3.7e-270: tmp = t_1 elif (b * c) <= 1.95e+127: tmp = -4.0 * (t * a) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(t * Float64(y * Float64(x * z)))) tmp = 0.0 if (Float64(b * c) <= -2.4e+58) tmp = Float64(b * c); elseif (Float64(b * c) <= -3.5e-65) tmp = t_1; elseif (Float64(b * c) <= -1.12e-194) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= -3.7e-270) tmp = t_1; elseif (Float64(b * c) <= 1.95e+127) tmp = Float64(-4.0 * Float64(t * a)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (t * (y * (x * z)));
tmp = 0.0;
if ((b * c) <= -2.4e+58)
tmp = b * c;
elseif ((b * c) <= -3.5e-65)
tmp = t_1;
elseif ((b * c) <= -1.12e-194)
tmp = -27.0 * (j * k);
elseif ((b * c) <= -3.7e-270)
tmp = t_1;
elseif ((b * c) <= 1.95e+127)
tmp = -4.0 * (t * a);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.4e+58], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.5e-65], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1.12e-194], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.7e-270], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.95e+127], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -2.4 \cdot 10^{+58}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -3.5 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -1.12 \cdot 10^{-194}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq -3.7 \cdot 10^{-270}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.95 \cdot 10^{+127}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.4e58 or 1.94999999999999991e127 < (*.f64 b c) Initial program 84.6%
Simplified84.7%
Taylor expanded in b around inf 59.6%
if -2.4e58 < (*.f64 b c) < -3.50000000000000005e-65 or -1.12000000000000001e-194 < (*.f64 b c) < -3.7000000000000001e-270Initial program 74.7%
Simplified84.8%
Taylor expanded in y around inf 45.4%
*-commutative45.4%
Applied egg-rr45.4%
associate-*r*47.8%
Simplified47.8%
if -3.50000000000000005e-65 < (*.f64 b c) < -1.12000000000000001e-194Initial program 96.6%
Simplified96.7%
Taylor expanded in k around inf 38.7%
if -3.7000000000000001e-270 < (*.f64 b c) < 1.94999999999999991e127Initial program 88.6%
Simplified92.4%
Taylor expanded in a around inf 36.5%
Final simplification46.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* t a)))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))
(t_3 (* k (* j -27.0)))
(t_4 (+ t_3 t_1)))
(if (<= x -4.1e-38)
t_2
(if (<= x -2.7e-216)
t_4
(if (<= x 1.4e-113)
(+ (* b c) t_1)
(if (<= x 3.8e-9) t_4 (if (<= x 6.2e+46) (+ (* b c) t_3) t_2)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double t_3 = k * (j * -27.0);
double t_4 = t_3 + t_1;
double tmp;
if (x <= -4.1e-38) {
tmp = t_2;
} else if (x <= -2.7e-216) {
tmp = t_4;
} else if (x <= 1.4e-113) {
tmp = (b * c) + t_1;
} else if (x <= 3.8e-9) {
tmp = t_4;
} else if (x <= 6.2e+46) {
tmp = (b * c) + t_3;
} 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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (-4.0d0) * (t * a)
t_2 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
t_3 = k * (j * (-27.0d0))
t_4 = t_3 + t_1
if (x <= (-4.1d-38)) then
tmp = t_2
else if (x <= (-2.7d-216)) then
tmp = t_4
else if (x <= 1.4d-113) then
tmp = (b * c) + t_1
else if (x <= 3.8d-9) then
tmp = t_4
else if (x <= 6.2d+46) then
tmp = (b * c) + t_3
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double t_3 = k * (j * -27.0);
double t_4 = t_3 + t_1;
double tmp;
if (x <= -4.1e-38) {
tmp = t_2;
} else if (x <= -2.7e-216) {
tmp = t_4;
} else if (x <= 1.4e-113) {
tmp = (b * c) + t_1;
} else if (x <= 3.8e-9) {
tmp = t_4;
} else if (x <= 6.2e+46) {
tmp = (b * c) + t_3;
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (t * a) t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) t_3 = k * (j * -27.0) t_4 = t_3 + t_1 tmp = 0 if x <= -4.1e-38: tmp = t_2 elif x <= -2.7e-216: tmp = t_4 elif x <= 1.4e-113: tmp = (b * c) + t_1 elif x <= 3.8e-9: tmp = t_4 elif x <= 6.2e+46: tmp = (b * c) + t_3 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) t_3 = Float64(k * Float64(j * -27.0)) t_4 = Float64(t_3 + t_1) tmp = 0.0 if (x <= -4.1e-38) tmp = t_2; elseif (x <= -2.7e-216) tmp = t_4; elseif (x <= 1.4e-113) tmp = Float64(Float64(b * c) + t_1); elseif (x <= 3.8e-9) tmp = t_4; elseif (x <= 6.2e+46) tmp = Float64(Float64(b * c) + t_3); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (t * a);
t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
t_3 = k * (j * -27.0);
t_4 = t_3 + t_1;
tmp = 0.0;
if (x <= -4.1e-38)
tmp = t_2;
elseif (x <= -2.7e-216)
tmp = t_4;
elseif (x <= 1.4e-113)
tmp = (b * c) + t_1;
elseif (x <= 3.8e-9)
tmp = t_4;
elseif (x <= 6.2e+46)
tmp = (b * c) + t_3;
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + t$95$1), $MachinePrecision]}, If[LessEqual[x, -4.1e-38], t$95$2, If[LessEqual[x, -2.7e-216], t$95$4, If[LessEqual[x, 1.4e-113], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 3.8e-9], t$95$4, If[LessEqual[x, 6.2e+46], N[(N[(b * c), $MachinePrecision] + t$95$3), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
t_3 := k \cdot \left(j \cdot -27\right)\\
t_4 := t\_3 + t\_1\\
\mathbf{if}\;x \leq -4.1 \cdot 10^{-38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-216}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-113}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-9}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+46}:\\
\;\;\;\;b \cdot c + t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -4.0999999999999998e-38 or 6.1999999999999995e46 < x Initial program 77.6%
Taylor expanded in x around inf 64.8%
if -4.0999999999999998e-38 < x < -2.6999999999999999e-216 or 1.4e-113 < x < 3.80000000000000011e-9Initial program 95.1%
Simplified93.5%
Taylor expanded in a around inf 70.1%
*-commutative70.1%
Simplified70.1%
if -2.6999999999999999e-216 < x < 1.4e-113Initial program 93.7%
distribute-rgt-out--95.3%
*-commutative95.3%
associate-*l*95.3%
Applied egg-rr95.3%
Taylor expanded in x around 0 81.4%
Taylor expanded in j around 0 70.8%
if 3.80000000000000011e-9 < x < 6.1999999999999995e46Initial program 86.4%
Simplified93.5%
Taylor expanded in b around inf 65.4%
Final simplification67.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j -27.0)))
(t_2 (* -4.0 (* x i)))
(t_3 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -1e+88)
t_3
(if (<= t -2.65e-237)
(+ (* b c) t_1)
(if (<= t 3.2e-189)
(+ t_1 t_2)
(if (<= t 3.6e-157)
(+ (* b c) (* -4.0 (* t a)))
(if (<= t 2.9e-52) (- t_2 (* j (* 27.0 k))) t_3)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double t_2 = -4.0 * (x * i);
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1e+88) {
tmp = t_3;
} else if (t <= -2.65e-237) {
tmp = (b * c) + t_1;
} else if (t <= 3.2e-189) {
tmp = t_1 + t_2;
} else if (t <= 3.6e-157) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t <= 2.9e-52) {
tmp = t_2 - (j * (27.0 * k));
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
t_2 = (-4.0d0) * (x * i)
t_3 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-1d+88)) then
tmp = t_3
else if (t <= (-2.65d-237)) then
tmp = (b * c) + t_1
else if (t <= 3.2d-189) then
tmp = t_1 + t_2
else if (t <= 3.6d-157) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (t <= 2.9d-52) then
tmp = t_2 - (j * (27.0d0 * k))
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double t_2 = -4.0 * (x * i);
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1e+88) {
tmp = t_3;
} else if (t <= -2.65e-237) {
tmp = (b * c) + t_1;
} else if (t <= 3.2e-189) {
tmp = t_1 + t_2;
} else if (t <= 3.6e-157) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t <= 2.9e-52) {
tmp = t_2 - (j * (27.0 * k));
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) t_2 = -4.0 * (x * i) t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -1e+88: tmp = t_3 elif t <= -2.65e-237: tmp = (b * c) + t_1 elif t <= 3.2e-189: tmp = t_1 + t_2 elif t <= 3.6e-157: tmp = (b * c) + (-4.0 * (t * a)) elif t <= 2.9e-52: tmp = t_2 - (j * (27.0 * k)) else: tmp = t_3 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) t_2 = Float64(-4.0 * Float64(x * i)) t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1e+88) tmp = t_3; elseif (t <= -2.65e-237) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 3.2e-189) tmp = Float64(t_1 + t_2); elseif (t <= 3.6e-157) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (t <= 2.9e-52) tmp = Float64(t_2 - Float64(j * Float64(27.0 * k))); else tmp = t_3; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
t_2 = -4.0 * (x * i);
t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -1e+88)
tmp = t_3;
elseif (t <= -2.65e-237)
tmp = (b * c) + t_1;
elseif (t <= 3.2e-189)
tmp = t_1 + t_2;
elseif (t <= 3.6e-157)
tmp = (b * c) + (-4.0 * (t * a));
elseif (t <= 2.9e-52)
tmp = t_2 - (j * (27.0 * k));
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+88], t$95$3, If[LessEqual[t, -2.65e-237], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 3.2e-189], N[(t$95$1 + t$95$2), $MachinePrecision], If[LessEqual[t, 3.6e-157], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e-52], N[(t$95$2 - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := -4 \cdot \left(x \cdot i\right)\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1 \cdot 10^{+88}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -2.65 \cdot 10^{-237}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-189}:\\
\;\;\;\;t\_1 + t\_2\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-157}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-52}:\\
\;\;\;\;t\_2 - j \cdot \left(27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -9.99999999999999959e87 or 2.9000000000000002e-52 < t Initial program 85.5%
Taylor expanded in t around inf 71.2%
if -9.99999999999999959e87 < t < -2.64999999999999977e-237Initial program 90.2%
Simplified84.7%
Taylor expanded in b around inf 61.8%
if -2.64999999999999977e-237 < t < 3.2000000000000001e-189Initial program 80.5%
Simplified87.7%
Taylor expanded in i around inf 72.8%
if 3.2000000000000001e-189 < t < 3.6e-157Initial program 84.8%
distribute-rgt-out--84.8%
*-commutative84.8%
associate-*l*84.8%
Applied egg-rr84.8%
Taylor expanded in x around 0 83.9%
Taylor expanded in j around 0 83.9%
if 3.6e-157 < t < 2.9000000000000002e-52Initial program 86.9%
distribute-rgt-out--86.9%
*-commutative86.9%
associate-*l*86.9%
Applied egg-rr86.9%
Taylor expanded in i around inf 60.9%
Taylor expanded in j around 0 65.1%
*-commutative65.1%
associate-*l*65.1%
*-commutative65.1%
*-commutative65.1%
Simplified65.1%
Final simplification68.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -2e+117)
(- (* -4.0 (* x i)) (* j (* 27.0 k)))
(if (<= t_1 1e-34)
(+ (* b c) (* -4.0 (* t a)))
(if (<= t_1 1e+49)
(* 18.0 (* y (* z (* x t))))
(+ (* b c) (* k (* j -27.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -2e+117) {
tmp = (-4.0 * (x * i)) - (j * (27.0 * k));
} else if (t_1 <= 1e-34) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t_1 <= 1e+49) {
tmp = 18.0 * (y * (z * (x * t)));
} else {
tmp = (b * c) + (k * (j * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-2d+117)) then
tmp = ((-4.0d0) * (x * i)) - (j * (27.0d0 * k))
else if (t_1 <= 1d-34) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (t_1 <= 1d+49) then
tmp = 18.0d0 * (y * (z * (x * t)))
else
tmp = (b * c) + (k * (j * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -2e+117) {
tmp = (-4.0 * (x * i)) - (j * (27.0 * k));
} else if (t_1 <= 1e-34) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t_1 <= 1e+49) {
tmp = 18.0 * (y * (z * (x * t)));
} else {
tmp = (b * c) + (k * (j * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -2e+117: tmp = (-4.0 * (x * i)) - (j * (27.0 * k)) elif t_1 <= 1e-34: tmp = (b * c) + (-4.0 * (t * a)) elif t_1 <= 1e+49: tmp = 18.0 * (y * (z * (x * t))) else: tmp = (b * c) + (k * (j * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -2e+117) tmp = Float64(Float64(-4.0 * Float64(x * i)) - Float64(j * Float64(27.0 * k))); elseif (t_1 <= 1e-34) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (t_1 <= 1e+49) tmp = Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))); else tmp = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -2e+117)
tmp = (-4.0 * (x * i)) - (j * (27.0 * k));
elseif (t_1 <= 1e-34)
tmp = (b * c) + (-4.0 * (t * a));
elseif (t_1 <= 1e+49)
tmp = 18.0 * (y * (z * (x * t)));
else
tmp = (b * c) + (k * (j * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+117], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-34], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+49], N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+117}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-34}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+49}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.0000000000000001e117Initial program 74.0%
distribute-rgt-out--78.8%
*-commutative78.8%
associate-*l*78.8%
Applied egg-rr78.8%
Taylor expanded in i around inf 69.9%
Taylor expanded in j around 0 72.1%
*-commutative72.1%
associate-*l*72.2%
*-commutative72.2%
*-commutative72.2%
Simplified72.2%
if -2.0000000000000001e117 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999928e-35Initial program 89.2%
distribute-rgt-out--89.9%
*-commutative89.9%
associate-*l*89.9%
Applied egg-rr89.9%
Taylor expanded in x around 0 60.1%
Taylor expanded in j around 0 56.0%
if 9.99999999999999928e-35 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999946e48Initial program 94.0%
Simplified99.9%
Taylor expanded in y around inf 54.1%
*-commutative54.1%
Applied egg-rr54.1%
associate-*r*54.1%
Simplified54.1%
Taylor expanded in t around 0 54.1%
associate-*r*54.1%
*-commutative54.1%
associate-*r*54.1%
associate-*r*54.1%
associate-*l*48.6%
*-commutative48.6%
associate-*r*48.6%
*-commutative48.6%
*-commutative48.6%
Simplified48.6%
if 9.99999999999999946e48 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 83.6%
Simplified88.3%
Taylor expanded in b around inf 68.5%
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j -27.0))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -2e+117)
(+ t_1 (* -4.0 (* x i)))
(if (<= t_2 1e-34)
(+ (* b c) (* -4.0 (* t a)))
(if (<= t_2 1e+49) (* 18.0 (* y (* z (* x t)))) (+ (* b c) t_1))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+117) {
tmp = t_1 + (-4.0 * (x * i));
} else if (t_2 <= 1e-34) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t_2 <= 1e+49) {
tmp = 18.0 * (y * (z * (x * t)));
} 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.
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 = k * (j * (-27.0d0))
t_2 = (j * 27.0d0) * k
if (t_2 <= (-2d+117)) then
tmp = t_1 + ((-4.0d0) * (x * i))
else if (t_2 <= 1d-34) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (t_2 <= 1d+49) then
tmp = 18.0d0 * (y * (z * (x * t)))
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;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+117) {
tmp = t_1 + (-4.0 * (x * i));
} else if (t_2 <= 1e-34) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t_2 <= 1e+49) {
tmp = 18.0 * (y * (z * (x * t)));
} 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]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -2e+117: tmp = t_1 + (-4.0 * (x * i)) elif t_2 <= 1e-34: tmp = (b * c) + (-4.0 * (t * a)) elif t_2 <= 1e+49: tmp = 18.0 * (y * (z * (x * t))) 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]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -2e+117) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); elseif (t_2 <= 1e-34) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (t_2 <= 1e+49) tmp = Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))); 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])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -2e+117)
tmp = t_1 + (-4.0 * (x * i));
elseif (t_2 <= 1e-34)
tmp = (b * c) + (-4.0 * (t * a));
elseif (t_2 <= 1e+49)
tmp = 18.0 * (y * (z * (x * t)));
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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+117], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-34], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+49], N[(18.0 * N[(y * N[(z * N[(x * t), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+117}:\\
\;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t\_2 \leq 10^{-34}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+49}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.0000000000000001e117Initial program 74.0%
Simplified85.7%
Taylor expanded in i around inf 69.9%
if -2.0000000000000001e117 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999928e-35Initial program 89.2%
distribute-rgt-out--89.9%
*-commutative89.9%
associate-*l*89.9%
Applied egg-rr89.9%
Taylor expanded in x around 0 60.1%
Taylor expanded in j around 0 56.0%
if 9.99999999999999928e-35 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999946e48Initial program 94.0%
Simplified99.9%
Taylor expanded in y around inf 54.1%
*-commutative54.1%
Applied egg-rr54.1%
associate-*r*54.1%
Simplified54.1%
Taylor expanded in t around 0 54.1%
associate-*r*54.1%
*-commutative54.1%
associate-*r*54.1%
associate-*r*54.1%
associate-*l*48.6%
*-commutative48.6%
associate-*r*48.6%
*-commutative48.6%
*-commutative48.6%
Simplified48.6%
if 9.99999999999999946e48 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 83.6%
Simplified88.3%
Taylor expanded in b around inf 68.5%
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.
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+117)
(* j (* k -27.0))
(if (<= t_1 1e-34)
(+ (* b c) (* -4.0 (* t a)))
(if (<= t_1 1e+49)
(* 18.0 (* y (* z (* x t))))
(+ (* b c) (* k (* j -27.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -2e+117) {
tmp = j * (k * -27.0);
} else if (t_1 <= 1e-34) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t_1 <= 1e+49) {
tmp = 18.0 * (y * (z * (x * t)));
} else {
tmp = (b * c) + (k * (j * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-2d+117)) then
tmp = j * (k * (-27.0d0))
else if (t_1 <= 1d-34) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (t_1 <= 1d+49) then
tmp = 18.0d0 * (y * (z * (x * t)))
else
tmp = (b * c) + (k * (j * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -2e+117) {
tmp = j * (k * -27.0);
} else if (t_1 <= 1e-34) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t_1 <= 1e+49) {
tmp = 18.0 * (y * (z * (x * t)));
} else {
tmp = (b * c) + (k * (j * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -2e+117: tmp = j * (k * -27.0) elif t_1 <= 1e-34: tmp = (b * c) + (-4.0 * (t * a)) elif t_1 <= 1e+49: tmp = 18.0 * (y * (z * (x * t))) else: tmp = (b * c) + (k * (j * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -2e+117) tmp = Float64(j * Float64(k * -27.0)); elseif (t_1 <= 1e-34) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (t_1 <= 1e+49) tmp = Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))); else tmp = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (j * 27.0) * k;
tmp = 0.0;
if (t_1 <= -2e+117)
tmp = j * (k * -27.0);
elseif (t_1 <= 1e-34)
tmp = (b * c) + (-4.0 * (t * a));
elseif (t_1 <= 1e+49)
tmp = 18.0 * (y * (z * (x * t)));
else
tmp = (b * c) + (k * (j * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+117], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-34], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+49], N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+117}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t\_1 \leq 10^{-34}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+49}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.0000000000000001e117Initial program 74.0%
distribute-rgt-out--78.8%
*-commutative78.8%
associate-*l*78.8%
Applied egg-rr78.8%
Taylor expanded in a around inf 63.8%
Taylor expanded in a around 0 63.2%
metadata-eval63.2%
distribute-lft-neg-in63.2%
associate-*r*61.0%
*-commutative61.0%
associate-*r*63.3%
distribute-rgt-neg-in63.3%
distribute-lft-neg-in63.3%
metadata-eval63.3%
Simplified63.3%
if -2.0000000000000001e117 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999928e-35Initial program 89.2%
distribute-rgt-out--89.9%
*-commutative89.9%
associate-*l*89.9%
Applied egg-rr89.9%
Taylor expanded in x around 0 60.1%
Taylor expanded in j around 0 56.0%
if 9.99999999999999928e-35 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999946e48Initial program 94.0%
Simplified99.9%
Taylor expanded in y around inf 54.1%
*-commutative54.1%
Applied egg-rr54.1%
associate-*r*54.1%
Simplified54.1%
Taylor expanded in t around 0 54.1%
associate-*r*54.1%
*-commutative54.1%
associate-*r*54.1%
associate-*r*54.1%
associate-*l*48.6%
*-commutative48.6%
associate-*r*48.6%
*-commutative48.6%
*-commutative48.6%
Simplified48.6%
if 9.99999999999999946e48 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 83.6%
Simplified88.3%
Taylor expanded in b around inf 68.5%
Final simplification58.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -1.6e+176)
t_1
(if (<= x -1.08e+142)
(+ (* b c) (* t (+ (* a -4.0) (* 18.0 (* x (* y z))))))
(if (or (<= x -9.2e+75) (not (<= x 1.05e+47)))
t_1
(- (* b c) (+ (* 4.0 (* t a)) (* 27.0 (* j k)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -1.6e+176) {
tmp = t_1;
} else if (x <= -1.08e+142) {
tmp = (b * c) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
} else if ((x <= -9.2e+75) || !(x <= 1.05e+47)) {
tmp = t_1;
} else {
tmp = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-1.6d+176)) then
tmp = t_1
else if (x <= (-1.08d+142)) then
tmp = (b * c) + (t * ((a * (-4.0d0)) + (18.0d0 * (x * (y * z)))))
else if ((x <= (-9.2d+75)) .or. (.not. (x <= 1.05d+47))) then
tmp = t_1
else
tmp = (b * c) - ((4.0d0 * (t * a)) + (27.0d0 * (j * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -1.6e+176) {
tmp = t_1;
} else if (x <= -1.08e+142) {
tmp = (b * c) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
} else if ((x <= -9.2e+75) || !(x <= 1.05e+47)) {
tmp = t_1;
} else {
tmp = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -1.6e+176: tmp = t_1 elif x <= -1.08e+142: tmp = (b * c) + (t * ((a * -4.0) + (18.0 * (x * (y * z))))) elif (x <= -9.2e+75) or not (x <= 1.05e+47): tmp = t_1 else: tmp = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -1.6e+176) tmp = t_1; elseif (x <= -1.08e+142) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(x * Float64(y * z)))))); elseif ((x <= -9.2e+75) || !(x <= 1.05e+47)) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(27.0 * Float64(j * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -1.6e+176)
tmp = t_1;
elseif (x <= -1.08e+142)
tmp = (b * c) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
elseif ((x <= -9.2e+75) || ~((x <= 1.05e+47)))
tmp = t_1;
else
tmp = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.6e+176], t$95$1, If[LessEqual[x, -1.08e+142], 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], If[Or[LessEqual[x, -9.2e+75], N[Not[LessEqual[x, 1.05e+47]], $MachinePrecision]], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{+176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.08 \cdot 10^{+142}:\\
\;\;\;\;b \cdot c + t \cdot \left(a \cdot -4 + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq -9.2 \cdot 10^{+75} \lor \neg \left(x \leq 1.05 \cdot 10^{+47}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if x < -1.5999999999999999e176 or -1.08e142 < x < -9.1999999999999994e75 or 1.05e47 < x Initial program 76.4%
Taylor expanded in x around inf 70.3%
if -1.5999999999999999e176 < x < -1.08e142Initial program 60.4%
Simplified90.0%
Taylor expanded in i around 0 90.0%
Taylor expanded in k around 0 90.4%
if -9.1999999999999994e75 < x < 1.05e47Initial program 93.6%
Taylor expanded in x around 0 78.1%
Final simplification75.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= x -5e-37) (not (<= x 9.5e-25)))
(-
(- (+ (* b c) (* 18.0 (* t (* x (* y z))))) (* (* x 4.0) i))
(* (* j 27.0) k))
(+
(+ (* b c) (* t (+ (* a -4.0) (* 18.0 (* z (* x y))))))
(* k (* j -27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -5e-37) || !(x <= 9.5e-25)) {
tmp = (((b * c) + (18.0 * (t * (x * (y * z))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (z * (x * y)))))) + (k * (j * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-5d-37)) .or. (.not. (x <= 9.5d-25))) then
tmp = (((b * c) + (18.0d0 * (t * (x * (y * z))))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
else
tmp = ((b * c) + (t * ((a * (-4.0d0)) + (18.0d0 * (z * (x * y)))))) + (k * (j * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -5e-37) || !(x <= 9.5e-25)) {
tmp = (((b * c) + (18.0 * (t * (x * (y * z))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (z * (x * y)))))) + (k * (j * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -5e-37) or not (x <= 9.5e-25): tmp = (((b * c) + (18.0 * (t * (x * (y * z))))) - ((x * 4.0) * i)) - ((j * 27.0) * k) else: tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (z * (x * y)))))) + (k * (j * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -5e-37) || !(x <= 9.5e-25)) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(z * Float64(x * y)))))) + Float64(k * Float64(j * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -5e-37) || ~((x <= 9.5e-25)))
tmp = (((b * c) + (18.0 * (t * (x * (y * z))))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
else
tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (z * (x * y)))))) + (k * (j * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -5e-37], N[Not[LessEqual[x, 9.5e-25]], $MachinePrecision]], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-37} \lor \neg \left(x \leq 9.5 \cdot 10^{-25}\right):\\
\;\;\;\;\left(\left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4 + 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\right) + k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if x < -4.9999999999999997e-37 or 9.50000000000000065e-25 < x Initial program 78.6%
Taylor expanded in x around inf 80.4%
if -4.9999999999999997e-37 < x < 9.50000000000000065e-25Initial program 94.9%
Simplified90.0%
Taylor expanded in i around 0 86.0%
*-commutative86.0%
+-commutative86.0%
associate-*r*92.6%
*-commutative92.6%
Applied egg-rr92.6%
Final simplification86.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -1.3e+62)
(+
(+ (* b c) (* t (+ (* a -4.0) (* 18.0 (* z (* x y))))))
(* k (* j -27.0)))
(-
(+ (* b c) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))
(+ (* 4.0 (* t a)) (* 27.0 (* j k))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.3e+62) {
tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (z * (x * y)))))) + (k * (j * -27.0));
} else {
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - ((4.0 * (t * a)) + (27.0 * (j * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-1.3d+62)) then
tmp = ((b * c) + (t * ((a * (-4.0d0)) + (18.0d0 * (z * (x * y)))))) + (k * (j * (-27.0d0)))
else
tmp = ((b * c) + (x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i)))) - ((4.0d0 * (t * a)) + (27.0d0 * (j * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.3e+62) {
tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (z * (x * y)))))) + (k * (j * -27.0));
} else {
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - ((4.0 * (t * a)) + (27.0 * (j * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -1.3e+62: tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (z * (x * y)))))) + (k * (j * -27.0)) else: tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - ((4.0 * (t * a)) + (27.0 * (j * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -1.3e+62) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(z * Float64(x * y)))))) + Float64(k * Float64(j * -27.0))); else tmp = Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)))) - Float64(Float64(4.0 * Float64(t * a)) + Float64(27.0 * Float64(j * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -1.3e+62)
tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (z * (x * y)))))) + (k * (j * -27.0));
else
tmp = ((b * c) + (x * ((18.0 * (t * (y * z))) - (4.0 * i)))) - ((4.0 * (t * a)) + (27.0 * (j * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -1.3e+62], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[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.3 \cdot 10^{+62}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4 + 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\right) + k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - \left(4 \cdot \left(t \cdot a\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if t < -1.29999999999999992e62Initial program 83.5%
Simplified92.5%
Taylor expanded in i around 0 95.5%
*-commutative95.5%
+-commutative95.5%
associate-*r*93.9%
*-commutative93.9%
Applied egg-rr93.9%
if -1.29999999999999992e62 < t Initial program 86.8%
Taylor expanded in x around 0 89.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.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* (* j 27.0) k) -1e+300)
(- (* -4.0 (* x i)) (* j (* 27.0 k)))
(+
(+ (* b c) (* t (+ (* a -4.0) (* 18.0 (* x (* y z))))))
(* k (* j -27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((j * 27.0) * k) <= -1e+300) {
tmp = (-4.0 * (x * i)) - (j * (27.0 * k));
} else {
tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))))) + (k * (j * -27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((j * 27.0d0) * k) <= (-1d+300)) then
tmp = ((-4.0d0) * (x * i)) - (j * (27.0d0 * k))
else
tmp = ((b * c) + (t * ((a * (-4.0d0)) + (18.0d0 * (x * (y * z)))))) + (k * (j * (-27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((j * 27.0) * k) <= -1e+300) {
tmp = (-4.0 * (x * i)) - (j * (27.0 * k));
} else {
tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))))) + (k * (j * -27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((j * 27.0) * k) <= -1e+300: tmp = (-4.0 * (x * i)) - (j * (27.0 * k)) else: tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))))) + (k * (j * -27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(j * 27.0) * k) <= -1e+300) tmp = Float64(Float64(-4.0 * Float64(x * i)) - Float64(j * Float64(27.0 * k))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(x * Float64(y * z)))))) + Float64(k * Float64(j * -27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((j * 27.0) * k) <= -1e+300)
tmp = (-4.0 * (x * i)) - (j * (27.0 * k));
else
tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))))) + (k * (j * -27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision], -1e+300], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $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] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(j \cdot 27\right) \cdot k \leq -1 \cdot 10^{+300}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) - j \cdot \left(27 \cdot k\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) + k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.0000000000000001e300Initial program 50.3%
distribute-rgt-out--55.8%
*-commutative55.8%
associate-*l*55.8%
Applied egg-rr55.8%
Taylor expanded in i around inf 83.6%
Taylor expanded in j around 0 88.9%
*-commutative88.9%
associate-*l*88.8%
*-commutative88.8%
*-commutative88.8%
Simplified88.8%
if -1.0000000000000001e300 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 88.8%
Simplified90.9%
Taylor expanded in i around 0 78.9%
Final simplification79.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))) (t_2 (* -27.0 (* j k))))
(if (<= j -5.2e+124)
t_2
(if (<= j -2e+43)
t_1
(if (<= j -5e-27)
(* 18.0 (* t (* x (* y z))))
(if (<= j 0.00035) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double t_2 = -27.0 * (j * k);
double tmp;
if (j <= -5.2e+124) {
tmp = t_2;
} else if (j <= -2e+43) {
tmp = t_1;
} else if (j <= -5e-27) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (j <= 0.00035) {
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.
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 = (-27.0d0) * (j * k)
if (j <= (-5.2d+124)) then
tmp = t_2
else if (j <= (-2d+43)) then
tmp = t_1
else if (j <= (-5d-27)) then
tmp = 18.0d0 * (t * (x * (y * z)))
else if (j <= 0.00035d0) 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;
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 = -27.0 * (j * k);
double tmp;
if (j <= -5.2e+124) {
tmp = t_2;
} else if (j <= -2e+43) {
tmp = t_1;
} else if (j <= -5e-27) {
tmp = 18.0 * (t * (x * (y * z)));
} else if (j <= 0.00035) {
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]) [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 = -27.0 * (j * k) tmp = 0 if j <= -5.2e+124: tmp = t_2 elif j <= -2e+43: tmp = t_1 elif j <= -5e-27: tmp = 18.0 * (t * (x * (y * z))) elif j <= 0.00035: 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]) 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(-27.0 * Float64(j * k)) tmp = 0.0 if (j <= -5.2e+124) tmp = t_2; elseif (j <= -2e+43) tmp = t_1; elseif (j <= -5e-27) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); elseif (j <= 0.00035) 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])){:}
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 = -27.0 * (j * k);
tmp = 0.0;
if (j <= -5.2e+124)
tmp = t_2;
elseif (j <= -2e+43)
tmp = t_1;
elseif (j <= -5e-27)
tmp = 18.0 * (t * (x * (y * z)));
elseif (j <= 0.00035)
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.
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[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -5.2e+124], t$95$2, If[LessEqual[j, -2e+43], t$95$1, If[LessEqual[j, -5e-27], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 0.00035], 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])\\\\
[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 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;j \leq -5.2 \cdot 10^{+124}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq -2 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -5 \cdot 10^{-27}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;j \leq 0.00035:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if j < -5.2000000000000001e124 or 3.49999999999999996e-4 < j Initial program 83.2%
Simplified87.3%
Taylor expanded in k around inf 43.8%
if -5.2000000000000001e124 < j < -2.00000000000000003e43 or -5.0000000000000002e-27 < j < 3.49999999999999996e-4Initial program 88.0%
distribute-rgt-out--90.7%
*-commutative90.7%
associate-*l*90.7%
Applied egg-rr90.7%
Taylor expanded in x around 0 59.4%
Taylor expanded in j around 0 51.5%
if -2.00000000000000003e43 < j < -5.0000000000000002e-27Initial program 85.9%
Simplified99.9%
Taylor expanded in y around inf 50.9%
Final simplification48.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j -27.0))))
(if (<= i -3.5e+199)
(+ t_1 (* -4.0 (* x i)))
(+ (+ (* b c) (* t (+ (* a -4.0) (* 18.0 (* z (* x y)))))) t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double tmp;
if (i <= -3.5e+199) {
tmp = t_1 + (-4.0 * (x * i));
} else {
tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (z * (x * y)))))) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
if (i <= (-3.5d+199)) then
tmp = t_1 + ((-4.0d0) * (x * i))
else
tmp = ((b * c) + (t * ((a * (-4.0d0)) + (18.0d0 * (z * (x * y)))))) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double tmp;
if (i <= -3.5e+199) {
tmp = t_1 + (-4.0 * (x * i));
} else {
tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (z * (x * y)))))) + t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if i <= -3.5e+199: tmp = t_1 + (-4.0 * (x * i)) else: tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (z * (x * y)))))) + t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (i <= -3.5e+199) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(z * Float64(x * y)))))) + t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if (i <= -3.5e+199)
tmp = t_1 + (-4.0 * (x * i));
else
tmp = ((b * c) + (t * ((a * -4.0) + (18.0 * (z * (x * y)))))) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -3.5e+199], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(x * y), $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])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;i \leq -3.5 \cdot 10^{+199}:\\
\;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(a \cdot -4 + 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\right) + t\_1\\
\end{array}
\end{array}
if i < -3.49999999999999981e199Initial program 91.6%
Simplified95.8%
Taylor expanded in i around inf 75.9%
if -3.49999999999999981e199 < i Initial program 85.5%
Simplified88.5%
Taylor expanded in i around 0 80.0%
*-commutative80.0%
+-commutative80.0%
associate-*r*80.5%
*-commutative80.5%
Applied egg-rr80.5%
Final simplification80.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -9.5e+74) (not (<= x 1.5e+47))) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (- (* b c) (+ (* 4.0 (* t a)) (* 27.0 (* j k))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -9.5e+74) || !(x <= 1.5e+47)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-9.5d+74)) .or. (.not. (x <= 1.5d+47))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = (b * c) - ((4.0d0 * (t * a)) + (27.0d0 * (j * k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -9.5e+74) || !(x <= 1.5e+47)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -9.5e+74) or not (x <= 1.5e+47): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -9.5e+74) || !(x <= 1.5e+47)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(27.0 * Float64(j * k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((x <= -9.5e+74) || ~((x <= 1.5e+47)))
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
else
tmp = (b * c) - ((4.0 * (t * a)) + (27.0 * (j * k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -9.5e+74], N[Not[LessEqual[x, 1.5e+47]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+74} \lor \neg \left(x \leq 1.5 \cdot 10^{+47}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if x < -9.5000000000000006e74 or 1.5000000000000001e47 < x Initial program 74.8%
Taylor expanded in x around inf 67.6%
if -9.5000000000000006e74 < x < 1.5000000000000001e47Initial program 93.6%
Taylor expanded in x around 0 78.1%
Final simplification73.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -0.00088) (not (<= (* b c) 1.22e+107))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -0.00088) || !((b * c) <= 1.22e+107)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-0.00088d0)) .or. (.not. ((b * c) <= 1.22d+107))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -0.00088) || !((b * c) <= 1.22e+107)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -0.00088) or not ((b * c) <= 1.22e+107): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -0.00088) || !(Float64(b * c) <= 1.22e+107)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -0.00088) || ~(((b * c) <= 1.22e+107)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -0.00088], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.22e+107]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -0.00088 \lor \neg \left(b \cdot c \leq 1.22 \cdot 10^{+107}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -8.80000000000000031e-4 or 1.22e107 < (*.f64 b c) Initial program 84.5%
Simplified86.4%
Taylor expanded in b around inf 51.6%
if -8.80000000000000031e-4 < (*.f64 b c) < 1.22e107Initial program 87.2%
Simplified91.0%
Taylor expanded in k around inf 28.8%
Final simplification37.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) [x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 86.1%
Simplified89.2%
Taylor expanded in b around inf 22.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 2024097
(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)))