Namespaces
Variants

catanf, catan, catanl

From cppreference.net
헤더 파일에 정의됨 <complex.h>
float complex catanf ( float complex z ) ;
(1) (C99부터)
double complex catan ( double complex z ) ;
(2) (C99부터)
long double complex catanl ( long double complex z ) ;
(3) (C99부터)
헤더 파일에 정의됨 <tgmath.h>
#define atan( z )
(4) (C99부터)
1-3) 복소수 z 의 아크탄젠트를 계산하며, 허수축을 따라 [−i,+i] 구간 바깥쪽에 분기 절단(branch cut)이 설정됩니다.
4) 타입-제네릭 매크로: z 의 타입이 long double complex 인 경우 catanl 이 호출됩니다. z 의 타입이 double complex 인 경우 catan 이 호출되며, z 의 타입이 float complex 인 경우 catanf 이 호출됩니다. z 가 실수 또는 정수인 경우, 매크로는 해당하는 실수 함수( atanf , atan , atanl )를 호출합니다. z 가 허수인 경우, 매크로는 함수 atanh 의 해당 실수 버전을 호출하여 atan(iy) = i atanh(y) 공식을 구현하며, 매크로의 반환 타입은 허수입니다.

목차

매개변수

z - 복소 인수

반환값

오류가 발생하지 않으면, 복소수 아크 탄젠트가 z 에 대해 반환되며, 허수축을 따라 무한하고 실수축을 따라 [−π/2; +π/2] 구간 내에 있는 영역 내의 값을 가집니다.

오류 및 특수한 경우들은 이 연산이 다음과 같이 구현된 것처럼 처리됩니다: - I * catanh ( I * z ) .

참고 사항

역탄젠트(또는 아크 탄젠트)는 다가 함수이며 복소 평면에서 브랜치 절단이 필요합니다. 브랜치 절단은 일반적으로 허수축의 선분 (-∞i,-i) (+i,+∞i) 에 위치합니다.

The mathematical definition of the principal value of inverse tangent is atan z = -
1
2
i [ln(1 - iz) - ln (1 + iz)]

예제

#include <stdio.h>
#include <float.h>
#include <complex.h>
int main(void)
{
    double complex z = catan(2*I);
    printf("catan(+0+2i) = %f%+fi\n", creal(z), cimag(z));
    double complex z2 = catan(-conj(2*I)); // or CMPLX(-0.0, 2)
    printf("catan(-0+2i) (the other side of the cut) = %f%+fi\n", creal(z2), cimag(z2));
    double complex z3 = 2*catan(2*I*DBL_MAX); // or CMPLX(0, INFINITY)
    printf("2*catan(+0+i*Inf) = %f%+fi\n", creal(z3), cimag(z3));
}

출력:

catan(+0+2i) = 1.570796+0.549306i
catan(-0+2i) (the other side of the cut) = -1.570796+0.549306i
2*catan(+0+i*Inf) = 3.141593+0.000000i

참고문헌

  • C11 표준 (ISO/IEC 9899:2011):
  • 7.3.5.3 The catan functions (p: 191)
  • 7.25 Type-generic math <tgmath.h> (p: 373-375)
  • G.7 Type-generic math <tgmath.h> (p: 545)
  • C99 표준 (ISO/IEC 9899:1999):
  • 7.3.5.3 The catan functions (p: 173)
  • 7.22 Type-generic math <tgmath.h> (p: 335-337)
  • G.7 Type-generic math <tgmath.h> (p: 480)

참고 항목

(C99) (C99) (C99)
복소수 아크 사인 계산
(함수)
(C99) (C99) (C99)
복소수 아크 코사인 계산
(함수)
(C99) (C99) (C99)
복소수 탄젠트 계산
(함수)
(C99) (C99)
아크 탄젠트 계산 ( arctan(x) )
(함수)
C++ 문서 for atan