Namespaces
Variants
Views
Actions

Template:cpp/language/types/range of values

From cppreference.com
Type Size in bits Format Value range
Approximate Exact
character 8 signed −128 to 127
unsigned 0 to 255
16 UTF-16 0 to 65535
32 UTF-32 0 to 1114111 (0x10ffff)
integer 16 signed ± 3.27 · 104 −32768 to 32767
unsigned 0 to 6.55 · 104 0 to 65535
32 signed ± 2.14 · 109 −2,147,483,648 to 2,147,483,647
unsigned 0 to 4.29 · 109 0 to 4,294,967,295
64 signed ± 9.22 · 1018 −9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
unsigned 0 to 1.84 · 1019 0 to 18,446,744,073,709,551,615
binary
floating-
point
32 IEEE-754
  • min subnormal:
    ± 1.401,298,4 · 10−45
  • min normal:
    ± 1.175,494,3 · 10−38
  • max:
    ± 3.402,823,4 · 1038
  • min subnormal:
    ±0x1p−149
  • min normal:
    ±0x1p−126
  • max:
    ±0x1.fffffep+127
64 IEEE-754
  • min subnormal:
    ± 4.940,656,458,412 · 10−324
  • min normal:
    ± 2.225,073,858,507,201,4 · 10−308
  • max:
    ± 1.797,693,134,862,315,7 · 10308
  • min subnormal:
    ±0x1p−1074
  • min normal:
    ±0x1p−1022
  • max:
    ±0x1.fffffffffffffp+1023
80[note 1] x86
  • min subnormal:
    ± 3.645,199,531,882,474,602,528
     · 10−4951
  • min normal:
    ± 3.362,103,143,112,093,506,263
     · 10−4932
  • max:
    ± 1.189,731,495,357,231,765,021
     · 104932
  • min subnormal:
    ±0x1p−16445
  • min normal:
    ±0x1p−16382
  • max:
    ±0x1.fffffffffffffffep+16383
128 IEEE-754
  • min subnormal:
    ± 6.475,175,119,438,025,110,924,
    438,958,227,646,552,5 · 10−4966
  • min normal:
    ± 3.362,103,143,112,093,506,262,
    677,817,321,752,602,6 · 10−4932
  • max:
    ± 1.189,731,495,357,231,765,085,
    759,326,628,007,016,2 · 104932
  • min subnormal:
    ±0x1p−16494
  • min normal:
    ±0x1p−16382
  • max:
    ±0x1.ffffffffffffffffffffffffffff
    p+16383
  1. The object representation usually occupies 96/128 bits on 32/64-bit platforms respectively.