Performs various complex number operations. For double-type complex number functions, the definition names are used as function names without change. For float-type and long double-type function names, "f" and "l" are added to the end of definition names, respectively.
Calculates the arc cosine of a complex number.
#include <complex.h>
float complex cacosf(float complex z);
double complex cacos(double complex z);
long double complex cacosl(long double complex z);
z Complex number for which arc cosine is to be computed
Normal: Complex arc cosine of z
Abnormal: Domain error: Returns not-a-number.
A domain error occurs for a value of z not in the range [–1.0, 1.0].
The cacos function returns the arc cosine in the range [0, π] on the real axis and in the infinite range on the imaginary axis.
Calculates the arc sine of a complex number.
#include <complex.h>
float complex casinf(float complex z);
double complex casin(double complex z);
long double complex casinl(long double complex z);
z Complex number for which arc sine is to be computed
Abnormal: Domain error: Returns not-a-number.
A domain error occurs for a value of z not in the range [–1.0, 1.0].
The casin function returns the arc sine in the range [–π/2, π/2] on the real axis and in the infinite range on the imaginary axis.
Calculates the arc tangent of a complex number.
#include <complex.h>
float complex catanf(float complex z);
double complex catan(double complex z);
long double complex catanl(long double complex z);
z Complex number for which arc tangent is to be computed
Normal: Complex arc tangent of z
The catan function returns the arc tangent in the range [–π/2, π/2] on the real axis and in the infinite range on the imaginary axis.
Calculates the cosine of a complex number.
#include <complex.h>
float complex ccosf(float complex z);
double complex ccos(double complex z);
long double complex ccosl(long double complex z);
z Complex number for which cosine is to be computed
Calculates the sine of a complex number.
#include <complex.h>
float complex csinf(float complex z);
double complex csin(double complex z);
long double complex csinl(long double complex z);
z Complex number for which sine is to be computed
Calculates the tangent of a complex number.
#include <complex.h>
float complex ctanf(float complex z);
double complex ctan(double complex z);
long double complex ctanl(long double complex z);
z Complex number for which tangent is to be computed
Calculates the arc hyperbolic cosine of a complex number.
#include <complex.h>
float complex cacoshf(float complex z);
double complex cacosh(double complex z);
long double complex cacoshl(long double complex z);
z Complex number for which arc hyperbolic cosine is to be computed
Normal: Complex arc hyperbolic cosine of z
Abnormal: Domain error: Returns not-a-number.
A domain error occurs for a value of z not in the range [–1.0, 1.0].
The cacoshf function returns the arc hyperbolic cosine in the range [0, π].
Calculates the arc hyperbolic sine of a complex number.
#include <complex.h>
float complex casinhf(float complex z);
double complex casinh(double complex z);
long double complex casinhl(long double complex z);
z Complex number for which arc hyperbolic sine is to be computed
Complex arc hyperbolic sine of z
Calculates the arc hyperbolic tangent of a complex number.
#include <complex.h>
float complex catanhf(float complex z);
double complex catanh(double complex z);
long double complex catanhl(long double complex z);
z Complex number for which arc hyperbolic tangent is to be computed
Complex arc hyperbolic tangent of z
Calculates the hyperbolic cosine of a complex number.
#include <complex.h>
float complex ccoshf(float complex z);
double complex ccosh(double complex z);
long double complex ccoshl(long double complex z);
z Complex number for which hyperbolic cosine is to be computed
Complex hyperbolic cosine of z
Calculates the hyperbolic sine of a complex number.
#include <complex.h>
float complex csinhf(float complex z);
double complex csinh(double complex z);
long double complex csinhl(long double complex z);
z Complex number for which hyperbolic sine is to be computed
Calculates the hyperbolic tangent of a complex number.
#include <complex.h>
float complex ctanhf(float complex z);
double complex ctanh(double complex z);
long double complex ctanhl(long double complex z);
z Complex number for which hyperbolic tangent is to be computed
Complex hyperbolic tangent of z
Calculates the exponential function value of a complex number.
#include <complex.h>
float complex cexpf(float complex z);
double complex cexp(double complex z);
long double complex cexpl(long double complex z);
z Complex number for which exponential function is to be computed
Exponential function value of z
Calculates the natural logarithm of a complex number.
#include <complex.h>
float complex clogf(float complex z);
double complex clog(double complex z);
long double complex clogl(long double complex z);
z Complex number for which natural logarithm is to be computed
Normal: Natural logarithm of z
Abnormal: Domain error: Returns not-a-number.
A domain error occurs if z is negative.
A range error occurs if z is 0.0.
The clog function returns the natural logarithm in the infinite range on the real axis and in the range [–iπ, +iπ] on the imaginary axis.
Calculates the absolute value of a complex number.
#include <complex.h>
float cabsf(float complex z);
double cabs(double complex z);
long double cabsl(long double complex z);
z Complex number for which absolute value is to be computed
Calculates a power of a complex number.
#include <complex.h>
float complex cpowf(float complex x, float complex y);
double complex cpow(double complex x, double complex y);
long double complex cpowl(long double complex x, long double complex y);
x Value to be raised to a power
Normal: Value of x raised to the power y
Abnormal: Domain error: Returns not-a-number.
A domain error occurs if x is 0.0 and y is 0.0 or smaller, or if x is negative and y is not an integer.
The branch cut for the first parameter of the cpow function group is along the negative real axis.
Calculates the square root of a complex number.
#include <complex.h>
float complex csqrtf(float complex z);
double complex csqrt(double complex z);
long double complex csqrtl(long double complex z);
z Complex number for which the square root is to be computed
Normal: Complex square root of z
Abnormal: Domain error: Returns not-a-number.
A domain error occurs if z is negative.
The branch cut for the csqrt function group is along the negative real axis.
The range of the return value from the csqrt function group is the right halfplane including the imaginary axis.
#include <complex.h>
float cargf(float complex z);
double carg(double complex z);
long double cargl(long double complex z);
z Complex number for which the argument is to be computed
The branch cut for the carg function group is along the negative real axis.
The carg function group returns the argument in the range [–π, +π].
Calculates the imaginary part.
#include <complex.h>
float cimagf(float complex z);
double cimag(double complex z);
long double cimagl(long double complex z);
z Complex number for which the imaginary part is to be computed
Imaginary part value of z as a real number
Reverses the sign of the imaginary part of a complex number and calculates the complex conjugate.
#include <complex.h>
float complex conjf(float complex z);
double complex conj(double complex z);
long double complex conjl(long double complex z);
z Complex number for which the complex conjugate is to be computed
Calculates the projection of a complex number on the Riemann sphere.
#include <complex.h>
float complex cprojf(float complex z);
double complex cproj(double complex z);
long double complex cprojl(long double complex z);
z Complex number for which the projection on the Riemann sphere is to be computed
Projection of z on the Riemann sphere
Calculates the real part of a complex number.
#include <complex.h>
float crealf(float complex z);
double creal(double complex z);
long double creall(long double complex z);
z Complex number for which the real part value is to be computed