C Programming/complex.h/Function reference
cacos
editPrototype
editdouble complex cacos(double complex z);
float complex cacosf(float complex z);
long double complex cacosl(long double complex z);
Description
editThese functions compute and return the complex arc cosine value, in the range of a strip mathematically unbounded along the imaginary axis and in the interval [0, π] along the real axis.
casin
editPrototype
editdouble complex casin(double complex z);
float complex casinf(float complex z);
long double complex casinl(long double complex z);
Description
editThese functions compute and return the complex arc sine value, in the range of a strip mathematically unbounded along the imaginary axis and in the interval [-π/2, +π/2] along the real axis.
catan
editPrototype
editdouble complex catan(double complex z);
float complex catanf(float complex z);
long double complex catanl(long double complex z);
Description
editThese functions compute and return the complex arc tangent value, in the range of a strip mathematically unbounded along the imaginary axis and in the interval [-π/2, +π/2] along the real axis.
ccos
editPrototype
editdouble complex ccos(double complex z);
float complex ccosf(float complex z);
long double complex ccosl(long double complex z);
Description
editThe C library provides with the ccos
function which gives the cosine of a complex number.It is included in the header file complex.h. This function returns a double-precision floating point number.
The ccos function can be expressed as:
ccosz = (exp (i * z) + exp (-i * z))/2[1]
csin
editPrototype
editdouble complex csin(double complex z);
float complex csinf(float complex z);
long double complex csinl(long double complex z);
Description
editThese functions compute and return the complex sine value.
ctan
editPrototype
editdouble complex ctan(double complex z);
float complex ctanf(float complex z);
long double complex ctanl(long double complex z);
Description
editThese functions compute and return the complex tangent value.
cacosh
editPrototype
editdouble complex cacosh(double complex z);
float complex cacoshf(float complex z);
long double complex cacoshl(long double complex z);
Description
editThese functions shall return the complex arc hyperbolic cosine value, in the range of a half-strip of non-negative values along the real axis and in the interval [-iπ, +iπ] along the imaginary axis.
casinh
editPrototype
editdouble complex casinh(double complex z);
float complex casinhf(float complex z);
long double complex casinhl(long double complex z);
Description
editcasinh
is one of the Standard C library functions in the complex.h header file. It is used to calculate the complex and inverse hyperbolic sine of given angle or number. Just like sine operator has inverse as sin inverse, hyperbolic sine of complex number has this as an inverse function.
This function returns complex arc hyperbolic sine,in the range mathematically unbounded along real axis and in the interval along imaginary axis.
catanh
editPrototype
editdouble complex catanh(double complex z);
float complex catanhf(float complex z);
long double complex catanhl(long double complex z);
Description
editThese functions shall return the complex arc hyperbolic tangent value, in the range of a strip mathematically unbounded along the real axis and in the interval [-iπ/2, +iπ/2] along the imaginary axis.
ccosh
editPrototype
editdouble complex ccosh(double complex z);
float complex ccoshf(float complex z);
long double complex ccoshl(long double complex z);
Description
editThese functions compute and return the complex hyperbolic cosine value.
csinh
editPrototype
editdouble complex csinh(double complex z);
float complex csinhf(float complex z);
long double complex csinhl(long double complex z);
Description
editThese functions compute and return the complex hyperbolic sine value.
ctanh
editPrototype
editdouble complex ctanh(double complex z);
float complex ctanhf(float complex z);
long double complex ctanhl(long double complex z);
Description
editThese functions compute and return the complex hyperbolic tangent value.
cexp
editPrototype
editdouble complex cexp(double complex z);
float complex cexpf(float complex z);
long double complex cexpl(long double complex z);
Description
editThese functions compute and return the complex exponential value of z.
clog
editPrototype
editdouble complex clog(double complex z);
float complex clogf(float complex z);
long double complex clogl(long double complex z);
Description
editThese functions shall return the complex natural logarithm value, in the range of a strip mathematically unbounded along the real axis and in the interval [-iπ, +iπ] along the imaginary axis.
cabs
editPrototype
editdouble cabs(double complex z);
float cabsf(float complex z);
long double cabsl(long double complex z);
Description
editThese functions compute and return the complex absolute value.
cpow
editPrototype
editdouble complex cpow(double complex x, double complex y);
float complex cpowf(float complex x, float complex y);
long double complex cpowl(long double complex x, long double complex y);
Description
edit
Cpow is a library function in the C programming language, used to calculate powers in the field of complex numbers
It was added to the C programming language, together with complex number support, in the C99 standard.
double complex cpow(double complex x, double complex y);
This function calculates the power of real number 'x' raised to y-th power ,where y is a complex number .
In mathematics ,by Euler's formula, eia = (cos a +i sin a).Here,cos and sin are trigonometric functions.
For xia,
xi .a = ei .a ln(x) = ( cos(a ln(x)) + i sin(a ln(x)) ) ; ln : logarithmic function to the base e.
csqrt
editPrototype
editdouble complex csqrt(double complex z);
float complex csqrtf(float complex z);
long double complex csqrtl(long double complex z);
Description
editThese functions compute and return the complex square root value, in the range of the right half-plane (including the imaginary axis).
carg
editPrototype
editdouble carg(double complex z);
float cargf(float complex z);
long double cargl(long double complex z);
Description
editcarg is a standard library function which calculates the argument (phase angle) of a complex number. It takes a single parameter and returns the phase angle of that value (converted if necessary to a complex number) within the range [π, −π].
This function takes a single parameter of type complex and returns a result of type double.
A complex number can be represented:
- in rectangular co-ordinates as
- in polar co-ordinates as
where:
- A = creal(Z) is the real part
- B = cimag(Z) is the imaginary part
- r = cabs(z) is the radius
- a = carg(z) is the phase (angle or the argument)
Hence this function returns phase of complex number Z used in polar co-ordinates. The return value is in radians, in the range [π, -π]. When we use this function, we must include the <complex.h> header file.
cimag
editPrototype
editdouble cimag(double complex z);
float cimagf(float complex z);
long double cimagl(long double complex z);
Description
editcimag is a complex function in c programming. As complex numbers contain two parts, one real part and one imaginary part, this function is used to declare the imaginary part of a complex number. For example, let 'M' be any complex number which can be represented using c functions as follows:
- M = creal(M) + cimag(M) * i
- where creal(M) = real part of M.
- The function returns the imaginary part of the complex no.
conj
editPrototype
editdouble complex conj(double complex z);
float complex conjf(float complex z);
long double complex conjl(long double complex z);
Description
editThese functions compute and return the complex conjugate value.
cproj is a standard C programming language function.
cproj
editPrototype
editdouble complex cproj(double complex z);
float complex cprojf(float complex z);
long double complex cprojl(long double complex z);
Description
editUsed to compute complex projection functions. The values which have to be projected are specified by z. This is complex projection functions. these are available for integrity servers. The projection of complex floating point-number z onto the Riemann sphere is done by cproj(). But all complex infinities are projected to positive infinity on the real axis. The cproj() return the value of projection on Riemann sphere.
creal
editPrototype
editdouble creal(double complex z);
float crealf(float complex z);
long double creall(long double complex z);
Description
editThese functions compute and return the real part value.
References
edit- ↑ "ccos(3) - Linux man page". die.net. Retrieved 20 September 2011.