#C 语言标准库函数 atanpid64
#include <math.h>
_Decimal64 atanpid64(_Decimal64 x);
说明
求反正切的主值,再用 π 作为单位表示角度。
接受任意有限实数。在 IEC 60559 实现中,无穷参数得到带相应符号的 0.5。
自 C23 起提供。需要实现定义 __STDC_IEC_60559_DFP__ 并提供对应的十进制浮点接口。
参数
x- 参与运算的实浮点值。
返回值
- 返回以 π 为单位的角,范围为 [-0.5, 0.5]。
#示例
使用 GCC 时,在链接命令末尾添加 -lm。
#include <math.h>
#include <stdio.h>
int main(void)
{
printf("%.9Lg\n", (long double)atanpid64(1.0dd));
return 0;
}
#相关接口
- 接口变体 atanpi、atanpif、atanpil、atanpid32、atanpid128
- 类型通用分派 atanpi(类型通用宏)
- 相关操作 atand64、atan2d64、atan2pid64、tand64、tanpid64