Jump to content

C++ Language/Std/CRuntime/Math/ComplexNumbers

From Wikibooks, open books for an open world

Standard C++ defines a complex number as std::complex<float> ffVar(3.0F, 4.0F);. Compute its "phase" using std::arg(), compute its "magnitude" using std::abs(), and compute its "complex conjugate" using std::conj().

Additional information about complex number functions (includes interactive examples)