Skip to content

Commit f298be6

Browse files
Merge pull request #273 from mark-i-m/i128
Add 128-bit to types
2 parents 671be06 + 0eb59f7 commit f298be6

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/type-layout.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ u8 | 1
4141
u16 | 2
4242
u32 | 4
4343
u64 | 8
44+
u128 | 16
4445
i8 | 1
4546
i16 | 2
4647
i32 | 4
4748
i64 | 8
49+
i128 | 16
4850
f32 | 4
4951
f64 | 8
5052
char | 4

src/types.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ language:
4848

4949
The machine types are the following:
5050

51-
* The unsigned word types `u8`, `u16`, `u32` and `u64`, with values drawn from
52-
the integer intervals [0, 2^8 - 1], [0, 2^16 - 1], [0, 2^32 - 1] and
53-
[0, 2^64 - 1] respectively.
54-
55-
* The signed two's complement word types `i8`, `i16`, `i32` and `i64`, with
56-
values drawn from the integer intervals [-(2^(7)), 2^7 - 1],
57-
[-(2^(15)), 2^15 - 1], [-(2^(31)), 2^31 - 1], [-(2^(63)), 2^63 - 1]
58-
respectively.
51+
* The unsigned word types `u8`, `u16`, `u32`, `u64`, and `u128` with values drawn from
52+
the integer intervals [0, 2^8 - 1], [0, 2^16 - 1], [0, 2^32 - 1],
53+
[0, 2^64 - 1], and [0, 2^128 - 1] respectively.
54+
55+
* The signed two's complement word types `i8`, `i16`, `i32`, `i64`, and `i128`, with
56+
values drawn from the integer intervals [-(2^7), 2^7 - 1],
57+
[-(2^15), 2^15 - 1], [-(2^31), 2^31 - 1], [-(2^63), 2^63 - 1], and
58+
[-(2^127), 2^127 - 1] respectively.
5959

6060
* The IEEE 754-2008 `binary32` and `binary64` floating-point types: `f32` and
6161
`f64`, respectively.

0 commit comments

Comments
 (0)