List of sizes of data types

Numbers

Integers

GoRust/ZigOdinC#JavaScalaKotlinC
boolboolboolboolbooleanBooleanBooleanbool
int8i8i8sbytebyteByteBytesigned char
int16i16i16shortshortShortShort(signed) short
int32i32i32intintIntInt(signed) long
int64i64i64longlongLongLong(signed) long long
-i128i128-----
intisizeintnint----
uint8u8u8byte--UByteunsigned char
uint16u16u16ushortcharCharUShortunsighed short
uint32u32u32uint--UIntunsigned long
uint64u64u64ulong--ULongunsigned long long
-u128u128-----
uintusizeuintnuint----
uintptr-uintptr-----
  • Aliases for certain integer types:
    • u8: byte (Go)
    • i32: rune (Go, Odin)
    • bool: _Bool (C)
  • Odin has endian-specific types.
  • GNU libc offers alternative types for intergers. Read more

Floats and more

GoRust/ZigOdinJavaScala/KotlinC#C
-f16f16----
float32f32f32floatFloatfloatfloat
float64f64f64doubleDoubledoubledouble
-f128---__float128
--complex32----
complex64-complex64---float _Complex
complex128-complex128---double _Complex
--quaternion64---
--quaternion128---
--quaternion256---
  • Odin has endian-specific types.
  • The C# decimal type occupies 128 bits, but is different from f128.
  • long double in C varies in compiler implementations.
  • Some C implementations may use _Float128 for f128.