The following macros and functions are all implementation-defined.
Calculates the absolute value.
#include <inttypes.h>
intmax_t imaxabs(intmax_t a);
a Value for which the absolute value is to be computed
Performs a division operation.
#include <inttypes.h>
intmaxdiv_t imaxdiv(intmax_t n, intmax_t d);
Division result consisting of the quotient and remainder
Converts a number-representing string to an intmax_t type integer.
#include <inttypes.h>
intmax_t strtoimax( const char *nptr, char **endptr, long base);
uintmax_t strtoumax(const char *nptr, char **endptr, long base);
nptr Pointer to a number-representing string to be converted
endptr Pointer to the storage area containing a pointer to the first character that does not represent an integer
base Radix of conversion (0 or 2 to 36)
Normal: If the string pointed by nptr begins with a character that does not represent an integer: 0
If the string pointed by nptr begins with a character that represents an integer: Converted data as an intmax_t type integer
Abnormal: If the converted data overflows: INTMAX_MAX, INTMAX_MIN, or UINTMAX_MAX
If the converted result overflows, ERANGE is set in errno.
The strtoimax and strtoumax functions are equivalent to the strtol, strtoll, strtoul, and strtoull functions except that the initial part of the string is respectively converted to intmax_t and uintmax_t integers.
Converts a number-representing string to an intmax_t or uintmax_t type integer.
#include <stddef.h>
#include <inttypes.h>
intmax_t wcstoimax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, long base);
uintmax_t wcstoumax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, long base);
nptr Pointer to a number-representing string to be converted
endptr Pointer to the storage area containing a pointer to the first character that does not represent an integer
base Radix of conversion (0 or 2 to 36)
Normal: If the string pointed by nptr begins with a character that does not represent an integer: 0
If the string pointed by nptr begins with a character that represents an integer: Converted data as an intmax_t type integer
Abnormal: If the converted data overflows: INTMAX_MAX, INTMAX_MIN, or UINTMAX_MAX
If the converted result overflows, ERANGE is set in errno.
The wcstoimax and wcstoumax functions are equivalent to the wcstol, wcstoll, wcstoul, and wcstoull functions, except that the initial part of the string is respectively converted to intmax_t and uintmax_t integers.