©
Ce document utiliseManuel du site Web PHP chinoisLibérer
在头文件 |
|
|
---|---|---|
float complex cexpf( float complex z ); |
(1) |
(since C99) |
double complex cexp( double complex z ); |
(2) |
(since C99) |
long double complex cexpl( long double complex z ); |
(3) |
(since C99) |
Defined in header |
|
|
#define exp( z ) |
(4) |
(since C99) |
1-3)计算复杂碱基Ë指数的z
。
4)类型 - 通用宏:如果z
有类型long
double
complex
,cexpl
被调用。如果z
有类型double
complex
,cexp
称为,如果z
有类型float
complex
,cexpf
称为。如果z
是真实的或整数,则宏调用相应的实函数(expf
,exp
,expl
)。如果z
是虚构的,则调用相应的复杂参数版本。
z |
- |
复杂的论点 |
---|
如果没有出现错误,e提高到电源z
, ez
返回。
报告的错误与math_errhandling一致。
如果实现支持IEEE浮点运算,
cexp(conj(z))
==
conj(cexp(z))
Ifz
is±0+0i
, the result is1+0i
Ifz
isx+∞i
(for any finite x), the result isNaN+NaNi
andFE_INVALID
is raised.
Ifz
isx+NaNi
(for any finite x), the result isNaN+NaNi
andFE_INVALID
may be raised.
Ifz
is+∞+0i
, the result is+∞+0i
Ifz
is-∞+yi
(for any finite y), the result is+0+cis(y)
Ifz
is+∞+yi
(for any finite nonzero y), the result is+∞+cis(y)
Ifz
is-∞+∞i
, the result is±0±0i
(signs are unspecified)
Ifz
is+∞+∞i
, the result is±∞+NaNi
andFE_INVALID
is raised (the sign of the real part is unspecified)
Ifz
is-∞+NaNi
, the result is±0±0i
(signs are unspecified)
Ifz
is+∞+NaNi
, the result is±∞+NaNi
(the sign of the real part is unspecified)
Ifz
isNaN+0i
, the result isNaN+0i
Ifz
isNaN+yi
(for any nonzero y), the result isNaN+NaNi
andFE_INVALID
may be raised
Ifz
isNaN+NaNi
, the result isNaN+NaNi
其中cis(y)是cos(y)+ i sin(y)。
复指数函数ez
对于z = x + iy等于ex
cis(y), or, ex
(cos(y) + i sin(y)).
指数函数是复平面中的一个完整函数,并且没有分支切割。
#include#include #include int main(void){ double PI = acos(-1); double complex z = cexp(I * PI); // Euler's formula printf("exp(i*pi) = %.1f%+.1fi\n", creal(z), cimag(z)); }
输出:
exp(i*pi) = -1.0+0.0i
C11标准(ISO / IEC 9899:2011):
7.3.7.1 cexp函数(p:194)
7.25类型通用数学
G.6.3.1 cexp函数(p:543)
G.7类型 - 通用数学
C99标准(ISO / IEC 9899:1999):
7.3.7.1 cexp函数(p:176)
7.22类型通用数学
G.6.3.1 cexp函数(p:478)
G.7类型 - 通用数学