1#include <inttypes.h>
2
3intmax_t imaxabs(intmax_t a) {
4    return a > 0 ? a : -a;
5}
6