We refer to the set of all integers as $\mathbb{Z}$. Now suppose we have a set of integers that can be held within a computer variable of $n$ bits width. Clearly they can only be of $2^{n}$ range, signed or not. How would we symbolise that? Is there something that is done to the zed, or does it remain simply $\mathbb{Z}$?
-
$\begingroup$ You could always represent it as integers in the appropriate range, $\{i \mid i \in [0, 2^n] \land i \in \mathbb{Z}\}$. Or even more concisely: $[0, 2^n] \cap \mathbb{Z}$. Apparently wikipedia also mentions a notation for integer ranges: $[0 .. 2^n]$. $\endgroup$ – ryan Apr 20 '19 at 1:47
-
$\begingroup$ I guess technically it would only go from 0 to $2^n-1$ but you get the idea. Also see here. $\endgroup$ – ryan Apr 20 '19 at 1:56
For bounded sets, the usual convention is to use interval notation.
Specifically, $[a,b]$ means "real numbers between $a$ and $b$, inclusive", while $[a\mathinner{\ldotp \ldotp}b]$ means "integers between $a$ and $b$, inclusive". Changing any of the square brackets to curved means that endpoint is not included: $a \not\in (a,b]$, for example.
In this case, you'd want the interval $[0\mathinner{\ldotp \ldotp}2^n)$. Or, if you think the delimiters look mismatched and weird, you can use $[0\mathinner{\ldotp \ldotp}2^n-1]$.
P.S. LaTeX doesn't have a builtin for "two dots", so I used \mathinner{\ldotp \ldotp}
from this answer.
-
-
$\begingroup$ @ryan Ah, good find! And yeah, I'm surprised
\ldotdot
isn't a standard symbol, since I've seen this in more papers than many of the other mathfont symbols. But, it's not too hard to fake, thankfully. $\endgroup$ – Draconis Apr 20 '19 at 2:32 -
$\begingroup$ Actually yes,
\enleadertwodots
works perfect (well, maybe not perfect, but close) if you use thestix
package. However, the name is not very appealing. $\endgroup$ – ryan Apr 20 '19 at 2:40 -
$\begingroup$ Here, you can see for yourself: tex.stackexchange.com/a/485694/138833. $\endgroup$ – ryan Apr 20 '19 at 2:48