Linux C function() 參考手冊:asin(取反正弦函數值)

Linux C function() 參考手冊:asin(取反正弦函數值)

Linux C function() 參考手冊:asin(取反正弦函數值)

 

資料來源:http://people.cs.nctu.edu.tw/~yslin/library/linuxc/main.htm
線上執行:http://www.tutorialspoint.com/compile_c_online.php
code2html:http://tohtml.com/

 

相關函數
acos , atan , atan2 , cos , sin , tan
表頭文件
#include <math.h>
定義函數
double asin (double x)
函數說明
asin()用來計算參數x的反正弦值,然後將結果返回。參數x範圍為-1至1之間,超過此範圍則會失敗。
返回值
返回-PI/2之PI/2之間的計算結果。
錯誤代碼
EDOM參數x超出範圍
附加說明
使用GCC編譯時請加入-lm
範例

 

#include <math.h>
#include <stdio.h>
int main()
{
double angle;
angle = asin (0.5);
printf("angle = %.2f\n",(angle/3.14159*180));
return 0;
}

 

 


發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *