asin,asinl
math.h:インデックス への移動
ヘッダーファイル
math.h
カテゴリ
演算ルーチン
プロトタイプ
double asin(double x);
long double asinl(long double x);
説明
アークサインを計算します。
実引数の asin は,入力値のアークサインを返します。
asinl は long double バージョンです。long double 引数を受け取り,long double の結果を返します。
asin および asinl の実引数は,-1 ~ 1 の範囲である必要があります。範囲外の場合,asin および asinl は NAN を返し,グローバル変数 errno を EDOM に設定します。
EDOM - 定義域エラーです。
戻り値
実引数の asin および asinl は,-pi/2 ~ pi/2 の範囲の値を返します。これらの関数のエラー処理は,_matherr および _matherrl 関数を使って変更できます。
例
#include <stdio.h>
#include <math.h>
int main(void)
{
double result;
double x = 0.5;
result = asin(x);
printf("The arc sin of %lf is %lf\n", x, result);
return(0);
}
移植性
POSIX | Win32 | ANSI C | ANSI C++ | |
---|---|---|---|---|
asin |
+ |
+ |
+ |
+ |
asinl |
+ |
+ |
+ |