C 库函数 - atan()
C 语言教程
· 2019-02-23 06:27:50
描述
C 库函数 double atan(double x) 返回以弧度表示的 x 的反正切。
声明
下面是 atan() 函数的声明。
double atan(double x)
参数
- x -- 浮点值。
返回值
该函数返回以弧度表示的 x 的反正切,弧度区间为 [-pi/2,+pi/2]。
实例
下面的实例演示了 atan() 函数的用法。
#include <stdio.h>
#include <math.h>
#define PI 3.14159265
int main ()
{
double x, ret, val;
x = 1.0;
val = 180.0 / PI;
ret = atan (x) * val;
printf("%lf 的反正切是 %lf 度", x, ret);
return(0);
}
让我们编译并运行上面的程序,这将产生以下结果:
1.000000 的反正切是 45.000000 度
点击查看所有 C 语言教程 文章: https://www.codercto.com/courses/l/17.html
Operating System Algorithms
Nathan Adams、Elisha Chirchir / CreateSpace Independent Publishing Platform / 2017-4-21 / USD 39.15
Operating System Algorithms will walk you through in depth examples of algorithms that you would find in an operating system. Selected algorithms include process and disk scheduling.一起来看看 《Operating System Algorithms》 这本书的介绍吧!
Base64 编码/解码
Base64 编码/解码
正则表达式在线测试
正则表达式在线测试