intmax_t(3type)
β¨ intmax_t β the greatest-width basic integer types, bestie β¨
okay so real talk, this is from the intmax_t(3type) manual page and it's about the BIGGEST integer types C will give you. like, the widest ones. the main characters of integers. π
π«Ά NAME
intmax_t, uintmax_t β greatest-width basic integer types π
π LIBRARY
Standard C library (libc)
π¦ SYNOPSIS
#include <stdint.h>
typedef /* ... */ intmax_t;
typedef /* ... */ uintmax_t;
#define INTMAX_WIDTH /* ... */
#define UINTMAX_WIDTH INTMAX_WIDTH
#define INTMAX_MAX /* 2**(INTMAX_WIDTH - 1) - 1 */
#define INTMAX_MIN /* - 2**(INTMAX_WIDTH - 1) */
#define UINTMAX_MAX /* 2**UINTMAX_WIDTH - 1 */
#define INTMAX_C(c) c ## /* ... */
#define UINTMAX_C(c) c ## /* ... */
πΈ DESCRIPTION
okay so intmax_t is a signed integer type that can hold literally any value of any basic signed integer type your implementation supports. the range? it's giving [INTMAX_MIN, INTMAX_MAX]. π
uintmax_t is the unsigned sibling β an unsigned integer type that can hold literally any value of any basic unsigned integer type your implementation supports. its range is [0, UINTMAX_MAX]. bestie keeps it non-negative, no cap. β¨
The macros [U]INTMAX_WIDTH expand to the width in bits of these types. (yes, the [U] means "with or without the U", iykyk π§)
The macros [U]INTMAX_MAX expand to the maximum value that these types can hold.
The macro INTMAX_MIN expands to the minimum value that intmax_t can hold.
The macros [U]INTMAX_C() expand their argument to an integer constant of type [u]intmax_t. π
The length modifier for [u]intmax_t for the printf(3) and the scanf(3) families of functions is j; resulting commonly in %jd, %ji, %ju, or %jx for printing [u]intmax_t values. literally so easy to remember. j for "just use this one". π
π STANDARDS
C11, POSIX.1-2024. periodt. π
π HISTORY
C99, POSIX.1-2001. she's been iconic for a while. β
π NOTES
The following header also provides these types: <inttypes.h>. (so you got options, bestie π«Ά)
π BUGS
These types may not be as large as extended integer types, such as __int128. π like she's the widest basic type but the extended ones can absolutely eat her up. do not come for me, I'm just the messenger.
π SEE ALSO
int64_t(3type), intptr_t(3type), printf(3), strtoimax(3)
and that's the whole vibe check π this page came from Linux man-pages 6.20, dated 2026-02-08 β go off, man-pages team, we love to see it. πΈπ¦π
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 2020, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms