#C 语言标准库函数 tan
#include <math.h>
double tan(double x);
说明
求弧度角的正切。
很大的有限角度由实现进行参数归约。IEC 60559 实现对无穷输入报告无效浮点异常。
自 C89 起提供。
参数
x- 以弧度度量的角。
返回值
- 返回结果,为正切值。
#示例
使用 GCC 时,在链接命令末尾添加 -lm。
#include <math.h>
#include <stdio.h>
int main(void)
{
printf("%.9Lg\n", (long double)tan(0.25));
return 0;
}