imaxabs函数
概要:
#include <inttypes.h> intmax_t imaxabs(intmax_t j);
描述:
该函数计算参数j的绝对值。如果结果无法表示(注:最小负数的绝对值不能使用二进制补码表示。),其行为是未定义的。
参数:
intmax_t j
参数为一个intmax_t类型的整数。
返回值:
函数返回参数j的绝对值。
范例:
|
|
输出:
Absolute value of a:5.
相关内容:
imaxdiv | 计算商和余数的函数。 |