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

查看所有标签

TED Talks Storytelling: 23 Storytelling Techniques from the Best

TED Talks Storytelling: 23 Storytelling Techniques from the Best

Akash Karia / CreateSpace Independent Publishing Platform / 2015-1-11 / USD 6.99

"Every speaker can put these ideas into practice immediately -- and they should!" ~ Dr. Richard C. Harris, Certified World Class Speaking Coach "An insightful read" ~Dennis Waller, Top 500 Revie......一起来看看 《TED Talks Storytelling: 23 Storytelling Techniques from the Best》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

html转js在线工具
html转js在线工具

html转js在线工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具