int8_t C / C++ 8 signed -128 127 INT8_MAX %hhd / PRId8 Signed overflow is UB in C/C++; unsigned wraps mod 2^N. uint8_t C / C++ 8 unsigned 0 255 UINT8_MAX %hhu / PRIu8 Unsigned arithmetic wraps mod 2^N (well-defined). int16_t C / C++ 16 signed -32_768 32_767 INT16_MAX %hd / PRId16 Signed overflow is UB in C/C++; unsigned wraps mod 2^N. uint16_t C / C++ 16 unsigned 0 65_535 UINT16_MAX %hu / PRIu16 Unsigned arithmetic wraps mod 2^N. int32_t C / C++ 32 signed -2_147_483_648 2_147_483_647 INT32_MAX %d / PRId32 Signed overflow is UB in C/C++; unsigned wraps mod 2^N. uint32_t C / C++ 32 unsigned 0 4_294_967_295 UINT32_MAX %u / PRIu32 Unsigned arithmetic wraps mod 2^N. int64_t C / C++ 64 signed -9_223_372_036_854_775_808 9_223_372_036_854_775_807 INT64_MAX %lld / PRId64 Signed overflow is UB in C/C++; unsigned wraps mod 2^N. uint64_t C / C++ 64 unsigned 0 18_446_744_073_709_551_615 UINT64_MAX %llu / PRIu64 Unsigned arithmetic wraps mod 2^N. char C / C++ 8 signed -128 127 SCHAR_MAX %c / %hhd Signedness of `char` is implementation-defined. Treated as signed here. unsigned char C / C++ 8 unsigned 0 255 UCHAR_MAX %hhu Wraps mod 2^N. short C / C++ 16 signed -32_768 32_767 SHRT_MAX %hd Signed overflow is UB in C/C++; unsigned wraps mod 2^N. unsigned short C / C++ 16 unsigned 0 65_535 USHRT_MAX %hu Wraps mod 2^N. int C / C++ 32 signed -2_147_483_648 2_147_483_647 INT_MAX %d Signed overflow is UB in C/C++; unsigned wraps mod 2^N. (Assumes 32-bit int.) unsigned int C / C++ 32 unsigned 0 4_294_967_295 UINT_MAX %u Wraps mod 2^N. (Assumes 32-bit int.) long C / C++ 64 signed -9_223_372_036_854_775_808 9_223_372_036_854_775_807 LONG_MAX %ld Signed overflow is UB in C/C++; unsigned wraps mod 2^N. (LP64: 64-bit long.) unsigned long C / C++ 64 unsigned 0 18_446_744_073_709_551_615 ULONG_MAX %lu Wraps mod 2^N. (LP64: 64-bit long.) long long C / C++ 64 signed -9_223_372_036_854_775_808 9_223_372_036_854_775_807 LLONG_MAX %lld Signed overflow is UB in C/C++; unsigned wraps mod 2^N. unsigned long long C / C++ 64 unsigned 0 18_446_744_073_709_551_615 ULLONG_MAX %llu Wraps mod 2^N. size_t C / C++ 64 unsigned 0 18_446_744_073_709_551_615 SIZE_MAX %zu Unsigned; wraps mod 2^N. (LP64: 64-bit.) intptr_t C / C++ 64 signed -9_223_372_036_854_775_808 9_223_372_036_854_775_807 INTPTR_MAX %ld / PRIdPTR Signed overflow is UB in C/C++; unsigned wraps mod 2^N. (LP64: 64-bit.) uintptr_t C / C++ 64 unsigned 0 18_446_744_073_709_551_615 UINTPTR_MAX %lu / PRIuPTR Unsigned; wraps mod 2^N. (LP64: 64-bit.) ptrdiff_t C / C++ 64 signed -9_223_372_036_854_775_808 9_223_372_036_854_775_807 PTRDIFF_MAX %td Signed overflow is UB in C/C++; unsigned wraps mod 2^N. (LP64: 64-bit.) i8 Rust 8 signed -128 127 i8::MAX — Debug: panics. Release: wraps mod 2^N. Use wrapping_* / checked_* / saturating_*. u8 Rust 8 unsigned 0 255 u8::MAX — Debug: panics. Release: wraps mod 2^N. i16 Rust 16 signed -32_768 32_767 i16::MAX — Debug: panics. Release: wraps mod 2^N. u16 Rust 16 unsigned 0 65_535 u16::MAX — Debug: panics. Release: wraps mod 2^N. i32 Rust 32 signed -2_147_483_648 2_147_483_647 i32::MAX — Debug: panics. Release: wraps mod 2^N. Default integer type. u32 Rust 32 unsigned 0 4_294_967_295 u32::MAX — Debug: panics. Release: wraps mod 2^N. i64 Rust 64 signed -9_223_372_036_854_775_808 9_223_372_036_854_775_807 i64::MAX — Debug: panics. Release: wraps mod 2^N. u64 Rust 64 unsigned 0 18_446_744_073_709_551_615 u64::MAX — Debug: panics. Release: wraps mod 2^N. i128 Rust 128 signed -170_141_183_460_469_231_731_687_303_715_884_105_728 170_141_183_460_469_231_731_687_303_715_884_105_727 i128::MAX — Debug: panics. Release: wraps mod 2^N. u128 Rust 128 unsigned 0 340_282_366_920_938_463_463_374_607_431_768_211_455 u128::MAX — Debug: panics. Release: wraps mod 2^N. isize Rust 64 signed -9_223_372_036_854_775_808 9_223_372_036_854_775_807 isize::MAX — Pointer-sized. 64-bit on 64-bit targets. Debug panics, release wraps. usize Rust 64 unsigned 0 18_446_744_073_709_551_615 usize::MAX — Pointer-sized. 64-bit on 64-bit targets. Debug panics, release wraps. int8 Go 8 signed -128 127 math.MaxInt8 — Always wraps mod 2^N (two's complement). Use math/bits Add/Sub/etc. for checked ops. uint8 / byte Go 8 unsigned 0 255 math.MaxUint8 — Always wraps mod 2^N. byte is an alias for uint8. int16 Go 16 signed -32_768 32_767 math.MaxInt16 — Always wraps mod 2^N. uint16 Go 16 unsigned 0 65_535 math.MaxUint16 — Always wraps mod 2^N. int32 / rune Go 32 signed -2_147_483_648 2_147_483_647 math.MaxInt32 — Always wraps mod 2^N. rune is an alias for int32. uint32 Go 32 unsigned 0 4_294_967_295 math.MaxUint32 — Always wraps mod 2^N. int64 Go 64 signed -9_223_372_036_854_775_808 9_223_372_036_854_775_807 math.MaxInt64 — Always wraps mod 2^N. uint64 Go 64 unsigned 0 18_446_744_073_709_551_615 math.MaxUint64 — Always wraps mod 2^N. int Go 64 signed -9_223_372_036_854_775_808 9_223_372_036_854_775_807 math.MaxInt — Platform-sized (64-bit on 64-bit targets). Wraps mod 2^N. uint Go 64 unsigned 0 18_446_744_073_709_551_615 math.MaxUint — Platform-sized (64-bit on 64-bit targets). Wraps mod 2^N. uintptr Go 64 unsigned 0 18_446_744_073_709_551_615 math.MaxUint64 — Unsigned pointer-sized. Wraps mod 2^N. byte Java 8 signed -128 127 Byte.MAX_VALUE %d Always wraps mod 2^N. No unsigned types in Java. Use Math.addExact for checked ops. short Java 16 signed -32_768 32_767 Short.MAX_VALUE %d Always wraps mod 2^N. int Java 32 signed -2_147_483_648 2_147_483_647 Integer.MAX_VALUE %d Always wraps mod 2^N. Use Math.*Exact for checked operations. long Java 64 signed -9_223_372_036_854_775_808 9_223_372_036_854_775_807 Long.MAX_VALUE %d Always wraps mod 2^N. char Java 16 unsigned 0 65_535 Character.MAX_VALUE %c Only unsigned 16-bit type in Java. Wraps mod 2^16. sbyte C# 8 signed -128 127 sbyte.MaxValue {0:d} unchecked: wraps mod 2^N. checked: throws OverflowException. byte C# 8 unsigned 0 255 byte.MaxValue {0:d} unchecked: wraps mod 2^N. checked: throws OverflowException. short C# 16 signed -32_768 32_767 short.MaxValue {0:d} unchecked: wraps. checked: throws OverflowException. ushort C# 16 unsigned 0 65_535 ushort.MaxValue {0:d} unchecked: wraps. checked: throws OverflowException. int C# 32 signed -2_147_483_648 2_147_483_647 int.MaxValue {0:d} unchecked: wraps. checked: throws OverflowException. uint C# 32 unsigned 0 4_294_967_295 uint.MaxValue {0:d} unchecked: wraps. checked: throws OverflowException. long C# 64 signed -9_223_372_036_854_775_808 9_223_372_036_854_775_807 long.MaxValue {0:d} unchecked: wraps. checked: throws OverflowException. ulong C# 64 unsigned 0 18_446_744_073_709_551_615 ulong.MaxValue {0:d} unchecked: wraps. checked: throws OverflowException. nint C# 64 signed -9_223_372_036_854_775_808 9_223_372_036_854_775_807 nint.MaxValue — Native-sized signed (64-bit on 64-bit). unchecked: wraps. checked: throws. nuint C# 64 unsigned 0 18_446_744_073_709_551_615 nuint.MaxValue — Native-sized unsigned (64-bit on 64-bit). unchecked: wraps. checked: throws. Number (safe int) JavaScript 53 signed -9_007_199_254_740_991 9_007_199_254_740_991 Number.MAX_SAFE_INTEGER — IEEE-754 double. Integers beyond ±2^53-1 lose precision (silently). Use BigInt instead. BigInt JavaScript ∞ signed −∞ +∞ — — Arbitrary-precision. No overflow; memory-limited only. int Python ∞ signed −∞ +∞ — — Arbitrary-precision. No overflow; memory-limited only.