|
4512 | 4512 | \defnx{signed integer types}{signed integer type}. |
4513 | 4513 | The range of representable values for a signed integer type is |
4514 | 4514 | $-2^{N-1}$ to $2^{N-1}-1$ (inclusive), |
4515 | | -where \placeholder{N} is called the \defn{range exponent} of the type. |
| 4515 | +where \placeholder{N} is called the \defn{width} of the type. |
4516 | 4516 | \indextext{integral type!implementation-defined \tcode{sizeof}}% |
4517 | 4517 | \begin{note} |
4518 | 4518 | Plain \tcode{int}s are intended to have |
|
4540 | 4540 | there exists a corresponding \defn{extended unsigned integer type}. |
4541 | 4541 | The standard and extended unsigned integer types |
4542 | 4542 | are collectively called \defnx{unsigned integer types}{unsigned integer type}. |
4543 | | -An unsigned integer type has the same range exponent \placeholder{N} |
| 4543 | +An unsigned integer type has the same width \placeholder{N} |
4544 | 4544 | as the corresponding signed integer type. |
4545 | 4545 | \indextext{arithmetic!\idxcode{unsigned}}% |
4546 | 4546 | The range of representable values for the unsigned type is |
|
4568 | 4568 | the largest value of the corresponding unsigned type. |
4569 | 4569 | \end{example} |
4570 | 4570 |
|
4571 | | -\begin{floattable}{Minimum range exponent}{tab:range.exponent}{ll} |
| 4571 | +\begin{floattable}{Minimum width}{tab:width}{ll} |
4572 | 4572 | \topline |
4573 | | -\lhdr{Type} & \rhdr{Minimum range exponent $N$} \\ |
| 4573 | +\lhdr{Type} & \rhdr{Minimum width $N$} \\ |
4574 | 4574 | \capsep |
4575 | 4575 | \tcode{signed char} & 8 \\ |
4576 | 4576 | \tcode{short} & 16 \\ |
|
4580 | 4580 | \end{floattable} |
4581 | 4581 |
|
4582 | 4582 | \pnum |
4583 | | -The range exponent of each signed integer type |
4584 | | -shall not be less than the values specified in \tref{range.exponent}. |
| 4583 | +The width of each signed integer type |
| 4584 | +shall not be less than the values specified in \tref{width}. |
4585 | 4585 | The value representation of a signed or unsigned integer type |
4586 | | -comprises $N$ bits, where N is the respective range exponent. |
| 4586 | +comprises $N$ bits, where N is the respective width. |
4587 | 4587 | Each set of values for any padding bits\iref{basic.types} |
4588 | 4588 | in the object representation are |
4589 | 4589 | alternative representations of the value specified by the value representation. |
|
4596 | 4596 | the constraints given in ISO C 5.2.4.2.1. |
4597 | 4597 | \end{note} |
4598 | 4598 | Except as specified above, |
4599 | | -the range exponent of a signed or unsigned integer type is |
4600 | | -\impldef{range exponent of integral type}. |
| 4599 | +the width of a signed or unsigned integer type is |
| 4600 | +\impldef{width of integral type}. |
4601 | 4601 |
|
4602 | 4602 | \pnum |
4603 | | -Each value $x$ of an unsigned integer type with range exponent $N$ has |
| 4603 | +Each value $x$ of an unsigned integer type with width $N$ has |
4604 | 4604 | a unique representation $x = x_0 2^0 + x_1 2^1 + \ldots + x_{N-1} 2^{N-1}$, |
4605 | 4605 | where each coefficient $x_i$ is either 0 or 1; |
4606 | 4606 | this is called the \defn{base-2 representation} of $x$. |
|
4652 | 4652 | \end{note} |
4653 | 4653 | \begin{note} |
4654 | 4654 | A bit-field of narrow character type whose width is larger than |
4655 | | -the range exponent of that type has padding bits; see \ref{basic.types}. |
| 4655 | +the width of that type has padding bits; see \ref{basic.types}. |
4656 | 4656 | \end{note} |
4657 | 4657 |
|
4658 | 4658 | \pnum |
|
0 commit comments