C함수 tan()
tan 값을 구합니다.
- 헤더: math.h
- 형태: double tan( double x)
- 인수: double x tan 값을 구하려는 값
- 반환: double x의 tan 값
변수 타입별 함수 목록입니다.
변수 타입 | 함수 | 헤더 파일 |
double | sin( double x) | math.h |
float | sinf( float x) | math.h |
long double | sinl( long double x) | math.h |
C언어 tan() 함수 예제
#include <stdio.h>
#include <math.h>
int main( void)
{
double rad_45;
rad_45 = 45. / 180. * 3.14159;
printf( "tan( %g) = %g\n", rad_45, tan( rad_45));
return 0;
}
C언어 tan() 예제 실행 결과
]$ ./a.out
tan( 0.785397) = 0.999999
]$
'컴퓨터 > 프로그래밍' 카테고리의 다른 글
C언어 e의 x제곱값 구하기 함수 exp() (0) | 2020.03.13 |
---|---|
C언어 cos 함수 cos() (0) | 2020.03.13 |
C언어 sin 함수 sin() (0) | 2020.03.13 |