?
This document uses PHP Chinese website manual Release
在頭文件<math.h>中定義 | ||
---|---|---|
float complex catanf( float complex z ); | (1) | (since C99) |
double complex catan( double complex z ); | (2) | (since C99) |
long double complex catanl( long double complex z ); | (3) | (since C99) |
Defined in header <tgmath.h> | ||
#define atan( z ) | (4) | (since C99) |
1-3)計(jì)算在z
沿虛軸的間隔-i,+ i之外的分支切口的復(fù)數(shù)反正切。
4)類(lèi)型 - 通用宏:如果z
有類(lèi)型long
double
complex
,catanl
被調(diào)用。如果z
有類(lèi)型double
complex
,catan
稱(chēng)為,如果z
有類(lèi)型float
complex
,catanf
稱(chēng)為。如果z
是真實(shí)的或整數(shù),則宏調(diào)用相應(yīng)的實(shí)函數(shù)(atanf
,atan
,atanl
)。如果z
是虛構(gòu)的,那么宏調(diào)用函數(shù)的相應(yīng)實(shí)際版本atanh
,實(shí)現(xiàn)公式atan(iy)= i atanh(y),并且宏的返回類(lèi)型是虛構(gòu)的。
z | - | 復(fù)雜的論點(diǎn) |
---|
如果沒(méi)有出現(xiàn)錯(cuò)誤,z
則在沿虛軸無(wú)界且在-π/ 2區(qū)間內(nèi)的條帶范圍內(nèi)返回復(fù)正切正切; +π/ 2沿實(shí)軸。
錯(cuò)誤和特殊情況被處理,就像操作被執(zhí)行一樣-I *
catanh(I*z)
。
反正切(或反正切)是一種多值函數(shù),需要在復(fù)平面上進(jìn)行分支切割。通常將分支切口放置在虛軸的線(xiàn)段(-∞i,-i)和(+ i,+∞i)處。反正切的主值的數(shù)學(xué)定義是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.549306icatan(-0+2i) (the other side of the cut) = -1.570796+0.549306i2*catan(+0+i*Inf) = 3.141593+0.000000i
C11標(biāo)準(zhǔn)(ISO / IEC 9899:2011):
7.3.5.3 catan函數(shù)(p:191)
7.25類(lèi)型通用數(shù)學(xué)<tgmath.h>(p:373-375)
G.7類(lèi)型 - 通用數(shù)學(xué)<tgmath.h>(p:545)
C99標(biāo)準(zhǔn)(ISO / IEC 9899:1999):
7.3.5.3 catan函數(shù)(p:173)
7.22類(lèi)型通用數(shù)學(xué)<tgmath.h>(p:335-337)
G.7類(lèi)型 - 通用數(shù)學(xué)<tgmath.h>(p:480)