Go to the source code of this file.
◆ cpow()
Complex number raised to a power.
Definition at line 42 of file cpow.c.
References atan2(), cabs(), cimag(), cos(), cpack(), creal(), exp(), log(), pow(), and sin().
Referenced by ComplexNumber::Raise().
45 double x, y, r, theta, absa, arga;
52 return cpack(0.0, + 0.0);
60 r = r *
exp(-y * arga);
61 theta = theta + y *
log(absa);
double sin(double x)
Sine function.
complex cpack(double x, double y)
Pack two real numbers into a complex number.
double cimag(complex z)
Imaginary part of complex number.
double cos(double x)
Cosine function.
double atan2(double y, double x)
Inverse tangent function.
double creal(complex z)
Real part of complex number.
double pow(double x, double y)
Expontation function.
double exp(double x)
Returns the exponential of x.
double log(double x)
Natural logarithm function (base e)
double cabs(complex z)
Absolute value of complex number.