Skip to content

Commit

Permalink
Merge pull request rust-lang#273 from mark-i-m/i128
Browse files Browse the repository at this point in the history
Add 128-bit to types
  • Loading branch information
matthewjasper authored Mar 26, 2018
2 parents 671be06 + 0eb59f7 commit f298be6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/type-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ u8 | 1
u16 | 2
u32 | 4
u64 | 8
u128 | 16
i8 | 1
i16 | 2
i32 | 4
i64 | 8
i128 | 16
f32 | 4
f64 | 8
char | 4
Expand Down
16 changes: 8 additions & 8 deletions src/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ language:

The machine types are the following:

* The unsigned word types `u8`, `u16`, `u32` and `u64`, with values drawn from
the integer intervals [0, 2^8 - 1], [0, 2^16 - 1], [0, 2^32 - 1] and
[0, 2^64 - 1] respectively.

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

* The signed two's complement word types `i8`, `i16`, `i32`, `i64`, and `i128`, with
values drawn from the integer intervals [-(2^7), 2^7 - 1],
[-(2^15), 2^15 - 1], [-(2^31), 2^31 - 1], [-(2^63), 2^63 - 1], and
[-(2^127), 2^127 - 1] respectively.

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

0 comments on commit f298be6

Please sign in to comment.