跳轉到內容

C 程式設計/math.h/acos

來自華夏公益教科書,自由的教學資源

acos() 函式(代表 arc cosine,即反餘弦)在 math.h 中定義。它接受一個變數,返回該變數的反餘弦值。該函式期望值在 -11 之間,返回值在 0 到 PI(3.1415927)之間。如果傳入的值大於 1,則會輸出 NAN。

float acos(float x);

需要返回反餘弦值的浮點數。

返回值

[編輯 | 編輯原始碼]

浮點數(變數的反餘弦值)。

參考文獻

[編輯 | 編輯原始碼]
  • The C Programming Language, Second Edition, By Brian W. Kernighan and Dennis M. Ritchie, Page no. 251
  • Programming With C, Second Edition, By Gottfried, Page no 487

[編輯 | 編輯原始碼]
華夏公益教科書