Skip to content

Commit

Permalink
Merge pull request #1230 from mark-i-m/i128
Browse files Browse the repository at this point in the history
Add 128-bit ints to ch3
  • Loading branch information
carols10cents authored Mar 21, 2018
2 parents d2ee2fc + ce3eb47 commit d77c067
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions second-edition/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ CPUs
cratesio
CRLF
cryptocurrencies
cryptographic
cryptographically
CStr
CString
Expand Down Expand Up @@ -227,6 +228,7 @@ libreoffice
libstd
lifecycle
LimitTracker
LLVM
lobally
locators
LockResult
Expand Down Expand Up @@ -272,6 +274,7 @@ namespace
namespaced
namespaces
namespacing
natively
newfound
NewJob
NewsArticle
Expand Down
15 changes: 15 additions & 0 deletions second-edition/src/appendix-06-newest-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,18 @@ fn main() {

The `...` syntax is still accepted in matches, but it is not accepted in
expressions. `..=` should be preferred.

## 128-bit integers

Rust 1.26.0 added 128-bit integer primitives:

- `u128`: A 128-bit unsigned integer with range [0, 2^128 - 1]
- `i128`: A 128-bit signed integer with range [-(2^127), 2^127 - 1]

These primitive are implemented efficiently via LLVM support. They
are available even on platforms that don't natively support 128-bit
integers and can be used like the other integer types.

These primitives can be very useful for algorithms that need to use
very large integers efficiently, such as certain cryptographic
algorithms.

0 comments on commit d77c067

Please sign in to comment.