DIR Return Create A Forum - Home
---------------------------------------------------------
gworld
HTML https://gworld.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: C++PROGRAMMING LANGUAGE
*****************************************************
#Post#: 130--------------------------------------------------
COMPLEX NUMBERS
By: eba95 Date: July 30, 2010, 8:53 pm
---------------------------------------------------------
C++ Complex Numbers
The c o m p l e x class provides a
useful way to deal with complex
numbers. It is defined as a basic
template class in the s t d
namespace in the < c o m p l e x >
header file.
t e m p l a t e < t y pe na m e N u m >
s t r u c t c o m p l e x ;
The type parameter N u m is the
type that is used for each of the
real and imaginary components
of the complex number. It must
be one of: f l oa t , doub l e , or
l ong doub l e .
Constructors
create complex
numbers from the
real and imaginary
parts or other
complex numbers
Operators
arithmetic of
complex numbers,
equality of
complex numbers,
IO of complex
numbers
abs absolute value of a
complex number
arg
argument (angle)
of a complex
number
conj conjugate of a
complex number
cos cosine of a
complex number
cosh
hyperbolic cosine
of a complex
number
exp exponential of a
complex number
imag imaginary part of
a complex number
log
natural logarithm
of a complex
number
log10
base-10 logarithm
of a complex
number
norm
square of the
absolute value of a
complex number
polar
constructs a
complex number
from polar
coordinates
pow
raising a complex
number to a
power, raising to a
complex number
power, or both
real real part of a
complex number
sin sine of a complex
number
sinh hyperbolic sine of
a complex number
sqrt square root of a
complex number
tan tangent of a
complex number
tanh
hyperbolic tangent
of a complex
number
*****************************************************