#C 语言标准库函数 atanf
#include <math.h>
float atanf(float x);
说明
求反正切的主值。
接受任意有限实数。在 IEC 60559 实现中,无穷参数得到带相应符号的 π/2。
自 C99 起提供。
参数
x- 参与运算的实浮点值。
返回值
- 返回以弧度表示的角,范围为 [-π/2, π/2]。
#示例
使用 GCC 时,在链接命令末尾添加 -lm。
#include <math.h>
#include <stdio.h>
int main(void)
{
printf("%.9Lg\n", (long double)atanf(1.0f));
return 0;
}
#相关接口
- 接口变体 atan、atanl、atand32、atand64、atand128
- 类型通用分派 atan(类型通用宏)
- 相关操作 acosf、asinf、atan2f、atan2pif、atanpif、catanf、tanf、tanpif