Merge pull request #268 from 0xmohit/i8-upper-bound

fix upper bound for i8
This commit is contained in:
Carol (Nichols || Goulding)
2016-09-25 10:38:09 -04:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -319,7 +319,7 @@ outside the scope of this text).
Each signed variant can store numbers from -(2<sup>n - 1</sup>) to 2<sup>n - Each signed variant can store numbers from -(2<sup>n - 1</sup>) to 2<sup>n -
1</sup> - 1 inclusive, where `n` is the number of bits that variant uses. So an 1</sup> - 1 inclusive, where `n` is the number of bits that variant uses. So an
`i8` can store from -(2<sup>7</sup>) to 2<sup>7</sup>, which equals -128 `i8` can store from -(2<sup>7</sup>) to 2<sup>7</sup> - 1, which equals -128
to 127. Unsigned variants can store numbers from 0 to 2<sup>n</sup> - 1, so a to 127. Unsigned variants can store numbers from 0 to 2<sup>n</sup> - 1, so a
`u8` can store from 0 to 2<sup>8</sup> - 1, which equals 0 to 255. `u8` can store from 0 to 2<sup>8</sup> - 1, which equals 0 to 255.
+1 -1
View File
@@ -71,7 +71,7 @@ outside the scope of this text).
Each signed variant can store numbers from -(2<sup>n - 1</sup>) to 2<sup>n - Each signed variant can store numbers from -(2<sup>n - 1</sup>) to 2<sup>n -
1</sup> - 1 inclusive, where `n` is the number of bits that variant uses. So an 1</sup> - 1 inclusive, where `n` is the number of bits that variant uses. So an
`i8` can store from -(2<sup>7</sup>) to 2<sup>7</sup>, which equals -128 `i8` can store from -(2<sup>7</sup>) to 2<sup>7</sup> - 1, which equals -128
to 127. Unsigned variants can store numbers from 0 to 2<sup>n</sup> - 1, so a to 127. Unsigned variants can store numbers from 0 to 2<sup>n</sup> - 1, so a
`u8` can store from 0 to 2<sup>8</sup> - 1, which equals 0 to 255. `u8` can store from 0 to 2<sup>8</sup> - 1, which equals 0 to 255.