asin() – C函数

C库函数 double asin(double x)返回x的正弦弧线弧度。

声明

以下是 asin() 函数的声明。

double asin(double x)

参数

  • x --这是一个浮点值在区间 [-1,+1].

返回值

这个函数返回弧x的正弦,在区间 [-pi/2,+pi/2] 弧度。

实例

下面的例子显示asin()函数的用法。 

#include<stdio.h>#include<math.h>#define PI 3.14159265int main (){double x, ret, val;
x =0.9;
val =180.0/ PI;
ret = asin(x)* val;
printf("The arc sine of %lf is %lf degrees", x, ret);return(0);}

让我们编译和运行上面的程序,这将产生以下结果:

The arc sine of 0.900000 is 64.190609 degrees

以上是asin() – C函数的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>