GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing cplusplus.com — std::complex Reference
complex
class template
<complex>
std::complextemplate <class T> class complex; Complex number class
A complex number can be represented by the sum of a real number ( x) and an imaginary part (y*i):x + y * i The imaginary part ( y*i) is a factor of i, known as the imaginary unit, and which satisfies that:i2 = -1 In this class, complex numbers have two components: real (corresponding to x in the above example) and imag (corresponding to y). The class replicates certain functionality aspects of regular numerical types, allowing them to be assigned, compared, inserted and extracted, as well as supporting some arithmetical operators. It is a literal type internally organized as an array of two elements of type T: the first is the real part and the second its imaginary part. Template parameters
Member types
Member functions
Template specializationscomplex is specialized for the three fundamental floating-point types:float, double and long double.These specializations have the same members as the template, but optimize its implementation for these fundamental types, as well as allowing operations with the other specializations of complex (complex objects with a different template argument).
Home page | Privacy policy
© cplusplus.com, 2000-2026 - All rights reserved - v3.3.4s Spotted an error? contact us | ||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |