トップページ > キーワード検索 > tan()
C言語規格
C言語(その他)
プログラム
その他
tan()
機能 正接(タンジェント)を計算することを表す。
定義 #include <math.h>

double tan ( double x );
float tan ( float x );
long double tan ( long double x );

※C99規格では以下の定義となる
double tan ( double x );
float tanf ( float x );
long double tanl ( long double x );
引数
x角度(ラジアン値)
戻り値 計算結果を返す。
実装例
#include <math.h>
#include <stdio.h>

int main(void)
{
    double a = 3.1415926;
    
    printf("tan(%f) = %f\n", a, tan(a) );  /* tan(π) */

    return 0;
}
実行結果
tan(3.141593) = -0.000000





inserted by FC2 system