November 2017
Beginner
316 pages
6h 40m
English
Integers, bits, bytes, bools, and floating point numbers are used in arithmetic operations. Built-in representations of them are called as numeric primitives, and numeric literals are their representations as values in code.
Let’s understand Julia’s primitive numeric types. The following is a table of Integer types, which includes bits, bytes, and bool:
| Type | Number of bits | Smallest value | Largest value |
| Int8 | 8 | -2^7 | 2^7 - 1 |
| UInt8 | 8 | 0 | 2^8 - 1 |
| Int16 | 16 | -2^15 | 2^15 - 1 |
| UInt16 | 16 | 0 | 2^16 - 1 |
| Int32 | 32 | -2^31 | 2^31 - 1 |
| UInt32 | 32 | 0 | 2^32 - 1 |
| Int64 | 64 | -2^63 | 2^63 - 1 |
| UInt64 | 64 | 0 | 2^64 - 1 |
| Int128 | 128 | -2^127 | 2^127 - 1 |
| UInt128 | 128 | 0 | 2^128 - 1 |
| Bool | 8 | false (0) | true (1) |
The UInt type refers to unsigned ...
Read now
Unlock full access