ReactOS 0.4.15-dev-8127-g6338913
complex< long double > Struct Reference

#include <_complex.h>

Public Types

typedef long double value_type
 
typedef complex< long double_Self
 

Public Member Functions

 complex (value_type __x=0.0l, value_type __y=0.0l)
 
 complex (const complex< long double > &__z)
 
 complex (const complex< float > &__z)
 
 complex (const complex< double > &__z)
 
value_type real () const
 
value_type imag () const
 
_Selfoperator= (value_type __x)
 
_Selfoperator+= (value_type __x)
 
_Selfoperator-= (value_type __x)
 
_Selfoperator*= (value_type __x)
 
_Selfoperator/= (value_type __x)
 
_Selfoperator= (const _Self &__z)
 
_Selfoperator+= (const _Self &__z)
 
_Selfoperator-= (const _Self &__z)
 
_Selfoperator*= (const _Self &__z)
 
_Selfoperator/= (const _Self &__z)
 

Static Public Member Functions

static void _STLP_CALL _div (const long double &__z1_r, const long double &__z1_i, const long double &__z2_r, const long double &__z2_i, long double &__res_r, long double &__res_i)
 
static void _STLP_CALL _div (const long double &__z1_r, const long double &__z2_r, const long double &__z2_i, long double &__res_r, long double &__res_i)
 

Public Attributes

value_type _M_re
 
value_type _M_im
 

Detailed Description

Definition at line 458 of file _complex.h.

Member Typedef Documentation

◆ _Self

typedef complex<long double> complex< long double >::_Self

Definition at line 460 of file _complex.h.

◆ value_type

typedef long double complex< long double >::value_type

Definition at line 459 of file _complex.h.

Constructor & Destructor Documentation

◆ complex() [1/4]

complex< long double >::complex ( value_type  __x = 0.0l,
value_type  __y = 0.0l 
)
inline

Definition at line 463 of file _complex.h.

464 : _M_re(__x), _M_im(__y) {}

◆ complex() [2/4]

complex< long double >::complex ( const complex< long double > &  __z)
inline

Definition at line 466 of file _complex.h.

467 : _M_re(__z._M_re), _M_im(__z._M_im) {}

◆ complex() [3/4]

complex< long double >::complex ( const complex< float > &  __z)
inline

◆ complex() [4/4]

complex< long double >::complex ( const complex< double > &  __z)
inline

Member Function Documentation

◆ _div() [1/2]

static void _STLP_CALL complex< long double >::_div ( const long double __z1_r,
const long double __z1_i,
const long double __z2_r,
const long double __z2_i,
long double __res_r,
long double __res_i 
)
static

◆ _div() [2/2]

static void _STLP_CALL complex< long double >::_div ( const long double __z1_r,
const long double __z2_r,
const long double __z2_i,
long double __res_r,
long double __res_i 
)
static

◆ imag()

value_type complex< long double >::imag ( ) const
inline

Definition at line 473 of file _complex.h.

473{ return _M_im; }

◆ operator*=() [1/2]

_Self & complex< long double >::operator*= ( const _Self __z)
inline

Definition at line 573 of file _complex.h.

573 {
574 value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
575 value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
576 _M_re = __r;
577 _M_im = __i;
578 return *this;
579 }
long double value_type
Definition: _complex.h:459

◆ operator*=() [2/2]

_Self & complex< long double >::operator*= ( value_type  __x)
inline

Definition at line 490 of file _complex.h.

490 {
491 _M_re *= __x;
492 _M_im *= __x;
493 return *this;
494 }

◆ operator+=() [1/2]

_Self & complex< long double >::operator+= ( const _Self __z)
inline

Definition at line 561 of file _complex.h.

561 {
562 _M_re += __z._M_re;
563 _M_im += __z._M_im;
564 return *this;
565 }

◆ operator+=() [2/2]

_Self & complex< long double >::operator+= ( value_type  __x)
inline

Definition at line 482 of file _complex.h.

482 {
483 _M_re += __x;
484 return *this;
485 }

◆ operator-=() [1/2]

_Self & complex< long double >::operator-= ( const _Self __z)
inline

Definition at line 567 of file _complex.h.

567 {
568 _M_re -= __z._M_re;
569 _M_im -= __z._M_im;
570 return *this;
571 }

◆ operator-=() [2/2]

_Self & complex< long double >::operator-= ( value_type  __x)
inline

Definition at line 486 of file _complex.h.

486 {
487 _M_re -= __x;
488 return *this;
489 }

◆ operator/=() [1/2]

_Self & complex< long double >::operator/= ( const _Self __z)
inline

Definition at line 581 of file _complex.h.

581 {
582 value_type __r;
583 value_type __i;
584 _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
585 _M_re = __r;
586 _M_im = __i;
587 return *this;
588 }
static void _STLP_CALL _div(const long double &__z1_r, const long double &__z1_i, const long double &__z2_r, const long double &__z2_i, long double &__res_r, long double &__res_i)

◆ operator/=() [2/2]

_Self & complex< long double >::operator/= ( value_type  __x)
inline

Definition at line 495 of file _complex.h.

495 {
496 _M_re /= __x;
497 _M_im /= __x;
498 return *this;
499 }

◆ operator=() [1/2]

_Self & complex< long double >::operator= ( const _Self __z)
inline

Definition at line 555 of file _complex.h.

555 {
556 _M_re = __z._M_re;
557 _M_im = __z._M_im;
558 return *this;
559 }

◆ operator=() [2/2]

_Self & complex< long double >::operator= ( value_type  __x)
inline

Definition at line 477 of file _complex.h.

477 {
478 _M_re = __x;
479 _M_im = 0.0l;
480 return *this;
481 }

◆ real()

value_type complex< long double >::real ( ) const
inline

Definition at line 472 of file _complex.h.

472{ return _M_re; }

Member Data Documentation

◆ _M_im

Definition at line 592 of file _complex.h.

Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and operator=().

◆ _M_re

Definition at line 591 of file _complex.h.

Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and operator=().


The documentation for this struct was generated from the following file: