.\" Copyright (c) 2020-2022 by Alejandro Colomar .\" and Copyright (c) 2020 by Michael Kerrisk .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" .TH INTMAX_T 3 2021-11-02 Linux "Linux Programmer's Manual" .SH NAME intmax_t, uintmax_t \- greatest-width basic integer types .SH SYNOPSIS .nf .B #include .PP .BR typedef " /* ... */ " intmax_t; .BR typedef " /* ... */ " uintmax_t; .PP .BR "#define INTMAX_WIDTH " "/* ... */" .B "#define UINTMAX_WIDTH INTMAX_WIDTH" .PP .BR "#define INTMAX_MAX " "/* 2**(INTMAX_WIDTH - 1) - 1 */" .BR "#define INTMAX_MIN " "/* - 2**(INTMAX_WIDTH - 1) */" .BR "#define UINTMAX_MAX " "/* 2**UINTMAX_WIDTH - 1 */" .PP .BI "#define INTMAX_C(" c ) " c " ## " \fR/* ... */\fP" .BI "#define UINTMAX_C(" c ) " c " ## " \fR/* ... */\fP" .fi .SH DESCRIPTION .I intmax_t is a signed integer type capable of representing any value of any basic signed integer type supported by the implementation. According to the C language standard, it shall be capable of storing values in the range .RB [ INTMAX_MIN , .BR INTMAX_MAX ]. .PP .I uintmax_t is an unsigned integer type capable of representing any value of any basic unsigned integer type supported by the implementation. According to the C language standard, it shall be capable of storing values in the range [0, .BR UINTMAX_MAX ]. .PP The macros .RB [ U ] INTMAX_WIDTH expand to the width in bits of these types. .PP The macros .RB [ U ] INTMAX_MAX expand to the maximum value that these types can hold. .PP The macro .B INTMAX_MIN expands to the minimum value that .I intmax_t can hold. .PP The macros .RB [ U ] INTMAX_C () expand their argument to an integer constant of type .RI [ u ] intmax_t . .PP The length modifier for .RI [ u ] intmax_t for the .BR printf (3) and the .BR scanf (3) families of functions is .BR j ; resulting commonly in .BR %jd , .BR %ji , .BR %ju , or .B %jx for printing .RI [ u ] intmax_t values. .SH CONFORMING TO C99 and later; POSIX.1-2001 and later. .SH NOTES The following header also provides these types: .IR . .SH BUGS These types may not be as large as extended integer types, such as .I __int128 .SH SEE ALSO .BR int64_t (3), .BR intptr_t (3), .BR printf (3), .BR strtoimax (3)