These functions operate on the largest integer types, intmax_t and uintmax_t.
#include <inttypes.h>
intmax_t imaxabs(intmax_t j);
typedef struct {
intmax_t quot;
intmax_t rem;
} imaxdiv_t;
imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
intmax_t strtoimax(const char * restrict nptr,
char ** restrict endptr, int base);
uintmax_t strtoumax(const char * restrict nptr,
char ** restrict endptr, int base);
intmax_t wcstoimax(const wchar_t * restrict nptr,
wchar_t ** restrict endptr, int base);
uintmax_t wcstoumax(const wchar_t * restrict nptr,
wchar_t ** restrict endptr, int base);
| Function | Greatest-width Integer Equivalent Function |
|---|---|
| imaxabs() | abs() |
| imaxdiv() | div() |
| strtoimax() | strtol() |
| strtoumax() | strtoul() |
| wcstoimax() | wcstol() |
| wcstoumax() | wcstoul() |