トップページ > キーワード検索 > acos()
C言語規格
C言語(その他)
プログラム
その他
acos()
機能 逆余弦(アークコサイン)を計算することを表す。

引数が-1.0〜1.0の範囲でない場合は定義域エラー(EDOM)が発生する。
定義 #include <math.h>

double acos ( double x );
float acos ( float x );
long double acos ( long double x );

※C99規格では以下の定義となる
double acos ( double x );
float acosf ( float x );
long double acosl ( long double x );
引数
x計算する値
戻り値 計算結果を返す。
実装例
#include <math.h>
#include <stdio.h>

int main(void)
{
    double a = 1.0;
    
    printf("acos(%f) = %f\n", a, acos(a) );

    return 0;
}
実行結果
acos(1.000000) = 0.000000





inserted by FC2 system