List of sizes of data types

Numbers

Integers

GoRust/ZigJavaScalaKotlinC#C
boolboolbooleanBooleanBooleanboolbool
int8i8byteByteBytesbytesigned char
int16i16shortShortShortshort(signed) short
int32i32intIntIntint(signed) long
int64i64longLongLonglong(signed) long long
-i128-----
intisize---nint-
uint8u8--UBytebyteunsigned char
uint16u16charCharUShortushortunsighed short
uint32u32--UIntuintunsigned long
uint64u64--ULongulongunsigned long long
-u128-----
uintusize---nuint-
uintptr------
  • Aliases for certain integer types:
    • u8: byte (Go)
    • i32: rune (Go)
    • bool: _Bool (C)
  • GNU libc offers alternative types for intergers. Read more

Floats and more

GoRust/ZigJavaScala/KotlinC#C
-f16----
float32f32floatFloatfloatfloat
float64f64doubleDoubledoubledouble
-f128---__float128
complex64----float _Complex
complex128----double _Complex
  • 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.