#C 语言标准库函数 acosl
#include <math.h>
long double acosl(long double x);
说明
求反余弦的主值。
有限参数范围为 [-1, 1],超出范围发生定义域错误。
自 C99 起提供。
参数
x- 参与运算的实浮点值。
返回值
- 返回以弧度表示的角,范围为 [0, π]。
#示例
使用 GCC 时,在链接命令末尾添加 -lm。
#include <math.h>
#include <stdio.h>
int main(void)
{
printf("%.9Lg\n", (long double)acosl(0.5L));
return 0;
}
#相关接口
- 接口变体 acos、acosf、acosd32、acosd64、acosd128
- 类型通用分派 acos(类型通用宏)
- 相关操作 acospil、asinl、atanl、cacosl、cosl、cospil