Integers v0.1.0
int
extend int
A target pointer-sized signed integer.
Constants
Bits
pub const Bits: uint = sizeof(int) * 8u;
The target representation width in bits.
Bytes
pub const Bytes: uint = sizeof(int);
The target representation size in bytes.
Min
pub const Min: int = -(((~0u) >> 1u) as int) - 1;
The smallest representable value.
Max
pub const Max: int = ((~0u) >> 1u) as int;
The largest representable value.
int8
extend int8
A signed integer in 8 bits, two's complement.
Constants
Bits
pub const Bits: uint = 8;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 1;
The number of bytes in the representation.
Min
pub const Min: int8 = -128;
The smallest representable value.
Max
pub const Max: int8 = 127;
The largest representable value.
int16
extend int16
A signed integer in 16 bits, two's complement.
Constants
Bits
pub const Bits: uint = 16;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 2;
The number of bytes in the representation.
Min
pub const Min: int16 = -32768;
The smallest representable value.
Max
pub const Max: int16 = 32767;
The largest representable value.
int32
extend int32
A signed integer in 32 bits, two's complement.
Constants
Bits
pub const Bits: uint = 32;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 4;
The number of bytes in the representation.
Min
pub const Min: int32 = -2147483648;
The smallest representable value.
Max
pub const Max: int32 = 2147483647;
The largest representable value.
int64
extend int64
A signed integer in 64 bits, two's complement.
Constants
Bits
pub const Bits: uint = 64;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 8;
The number of bytes in the representation.
Min
pub const Min: int64 = -9223372036854775808;
The smallest representable value.
Max
pub const Max: int64 = 9223372036854775807;
The largest representable value.
int128
extend int128
A signed integer in 128 bits, two's complement.
Constants
Bits
pub const Bits: uint = 128u;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 16u;
The number of bytes in the representation.
Min
pub const Min: int128 = -170141183460469231731687303715884105728i128;
The smallest representable value.
Max
pub const Max: int128 = 170141183460469231731687303715884105727i128;
The largest representable value.
int256
extend int256
A signed integer in 256 bits, two's complement.
Constants
Bits
pub const Bits: uint = 256u;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 32u;
The number of bytes in the representation.
Min
pub const Min: int256 = -57896044618658097711785492504343953926634992332820282019728792003956564819968i256;
The smallest representable value.
Max
pub const Max: int256 = 57896044618658097711785492504343953926634992332820282019728792003956564819967i256;
The largest representable value.
int512
extend int512
A signed integer in 512 bits, two's complement.
Constants
Bits
pub const Bits: uint = 512u;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 64u;
The number of bytes in the representation.
Min
pub const Min: int512 = …;
The smallest representable value.
Max
pub const Max: int512 = …;
The largest representable value.
uint
extend uint
A target pointer-sized unsigned integer.
Constants
Bits
pub const Bits: uint = sizeof(uint) * 8u;
The target representation width in bits.
Bytes
pub const Bytes: uint = sizeof(uint);
The target representation size in bytes.
Min
pub const Min: uint = 0u;
The smallest representable value.
Max
pub const Max: uint = ~0u;
The largest representable value.
uint8
extend uint8
An unsigned integer in 8 bits.
Constants
Bits
pub const Bits: uint = 8;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 1;
The number of bytes in the representation.
Min
pub const Min: uint8 = 0;
The smallest representable value.
Max
pub const Max: uint8 = 255;
The largest representable value.
uint16
extend uint16
An unsigned integer in 16 bits.
Constants
Bits
pub const Bits: uint = 16;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 2;
The number of bytes in the representation.
Min
pub const Min: uint16 = 0;
The smallest representable value.
Max
pub const Max: uint16 = 65535;
The largest representable value.
uint32
extend uint32
An unsigned integer in 32 bits.
Constants
Bits
pub const Bits: uint = 32;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 4;
The number of bytes in the representation.
Min
pub const Min: uint32 = 0;
The smallest representable value.
Max
pub const Max: uint32 = 4294967295;
The largest representable value.
uint64
extend uint64
An unsigned integer in 64 bits.
Constants
Bits
pub const Bits: uint = 64;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 8;
The number of bytes in the representation.
Min
pub const Min: uint64 = 0;
The smallest representable value.
Max
pub const Max: uint64 = 18446744073709551615;
The largest representable value.
uint128
extend uint128
An unsigned integer in 128 bits.
Constants
Bits
pub const Bits: uint = 128u;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 16u;
The number of bytes in the representation.
Min
pub const Min: uint128 = 0u128;
The smallest representable value.
Max
pub const Max: uint128 = 340282366920938463463374607431768211455u128;
The largest representable value.
uint256
extend uint256
An unsigned integer in 256 bits.
Constants
Bits
pub const Bits: uint = 256u;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 32u;
The number of bytes in the representation.
Min
pub const Min: uint256 = 0u256;
The smallest representable value.
Max
pub const Max: uint256 = 115792089237316195423570985008687907853269984665640564039457584007913129639935u256;
The largest representable value.
uint512
extend uint512
An unsigned integer in 512 bits.
Constants
Bits
pub const Bits: uint = 512u;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 64u;
The number of bytes in the representation.
Min
pub const Min: uint512 = 0u512;
The smallest representable value.
Max
pub const Max: uint512 = …;
The largest representable value.