複素数計算用クラスライブラリに対応するヘッダファイルは以下のとおりです。
float_complexクラス、double_complexクラスを定義します。
 
これらのクラスには派生関係はありません。
| 
 | 
 | 
 | 
| 
 
型 
 | 
 
value_type 
 | 
 
float型です。 
 | 
| 
 
変数 
 | 
 
_re 
 | 
 
float精度の実数部を定義します。 
 | 
| 
 
_im 
 | 
 
float精度の虚数部を定義します。 
 | 
| 
 
関数 
 | 
 
float_complex(float re = 0.0f, float im = 0.0f) 
 | 
 
コンストラクタです。 
 | 
| 
 
float_complex(const double_complex& rhs) 
 | 
| 
 
float real() const 
 | 
 
実数部(_re)を求めます。 
 | 
| 
 
float imag() const 
 | 
 
虚数部(_im)を求めます。 
 | 
| 
 
float_complex& operator=(float rhs) 
 | 
 
rhsを実数部にコピーします。虚数部は0.0fを設定します。 
 | 
| 
 
float_complex& operator+=(float rhs) 
 | 
 
rhsを実数部に加算し、和を*thisに格納します。 
 | 
| 
 
float_complex& operator-=(float rhs) 
 | 
 
rhsを実数部から減算し、差を*thisに格納します。 
 | 
| 
 
float_complex& operator*=(float rhs) 
 | 
 
rhsを乗算し、積を*thisに格納します。 
 | 
| 
 
float_complex& operator/=(float rhs) 
 | 
 
rhsで除算し、商を*thisに格納します。 
 | 
| 
 
float_complex& operator=( 
  const float_complex& rhs) 
 | 
 
rhsをコピーします。 
 | 
| 
 
float_complex& operator+=( 
  const float_complex& rhs) 
 | 
 
rhsを加算し、和を*thisに格納します。 
 | 
| 
 
float_complex& operator-=( 
  const float_complex& rhs) 
 | 
 
rhsを減算し、差を*thisに格納します。 
 | 
| 
 
float_complex& operator*=( 
  const float_complex& rhs) 
 | 
 
rhsを乗算し、積を*thisに格納します。 
 | 
| 
 
float_complex& operator/=( 
  const float_complex& rhs) 
 | 
 
rhsで除算し、商を*thisに格納します。 
 | 
 
 
| 
 
float_complex::float_complex(float re = 0.0f, float im = 0.0f) 
 | 
 
クラスfloat_complexのコンストラクタです。
以下の値で初期化します。
_re = re;
_im = im;
 
| 
 
float_complex::float_complex(const double_complex& rhs) 
 | 
 
クラスfloat_complexのコンストラクタです。
以下の値で初期化します。
_re = (float)rhs.real();
_im = (float)rhs.imag();
 
| 
 
float float_complex::real() const 
 | 
 
実数部を求めます。
リターン値は、this->_reです。
 
| 
 
float float_complex::imag() const 
 | 
 
虚数部を求めます。
リターン値は、this->_imです。
 
| 
 
float_complex& float_complex::operator=(float rhs) 
 | 
 
rhsを実数部(_re)にコピーします。虚数部(_im)は0.0fを設定します。
リターン値は*thisです。
 
| 
 
float_complex& float_complex::operator+=(float rhs) 
 | 
 
rhsを実数部(_re)に加算し、結果を実数部(_re)に格納します。虚数部(_im)の値は変わりません。
リターン値は*thisです。
 
| 
 
float_complex& float_complex::operator-=(float rhs) 
 | 
 
rhsを実数部(_re)から減算し、結果を実数部(_re)に格納します。虚数部(_im)の値は変わりません。
リターン値は*thisです。
 
| 
 
float_complex& float_complex::operator*=(float rhs) 
 | 
 
rhsと乗算し、結果を*thisに格納します。
(_re=_re*rhs, _im=_im*rhs)
リターン値は*thisです。
 
| 
 
float_complex& float_complex::operator/=(float rhs) 
 | 
 
rhsで除算し、結果を*thisに格納します。
(_re=_re/rhs, _im=_im/rhs)
リターン値は*thisです。
 
| 
 
float_complex& float_complex::operator=(const float_complex& rhs) 
 | 
 
rhsをコピーします。
リターン値は*thisです。
 
| 
 
float_complex& float_complex::operator+=(const float_complex& rhs) 
 | 
 
rhsを加算し、結果を*thisに格納します。
リターン値は*thisです。
 
| 
 
float_complex& float_complex::operator-=(const float_complex& rhs) 
 | 
 
rhsを減算し、結果を*thisに格納します。
リターン値は*thisです。
 
| 
 
float_complex& float_complex::operator*=(const float_complex& rhs) 
 | 
 
rhsと乗算し、結果を*thisに格納します。
リターン値は*thisです。
 
| 
 
float_complex& float_complex::operator/=(const float_complex& rhs) 
 | 
 
rhsで除算し、結果を*thisに格納します。
リターン値は*thisです。
| 
 | 
 | 
 | 
| 
 
関数 
 | 
 
float_complex operator+( 
  const float_complex& lhs) 
 | 
 
lhsの単項+演算を行います。 
 | 
| 
 
float_complex operator+( 
  const float_complex& lhs, 
  const float_complex& rhs) 
 | 
 
lhsとrhsを加算した結果を返却します。 
 | 
| 
 
float_complex operator+( 
  const float_complex& lhs, 
  const float& rhs) 
 | 
| 
 
float_complex operator+( 
  const float& lhs, 
  const float_complex& rhs) 
 | 
| 
 
float_complex operator-( 
  const float_complex& lhs) 
 | 
 
lhsの単項-演算を行います。 
 | 
| 
 
float_complex operator-( 
  const float_complex& lhs, 
  const float_complex& rhs) 
 | 
 
lhsからrhsを減算した結果を返却します。 
 | 
| 
 
float_complex operator-( 
  const float_complex& lhs, 
  const float& rhs) 
 | 
| 
 
float_complex operator-( 
  const float& lhs, 
  const float_complex& rhs) 
 | 
| 
 
float_complex operator*( 
  const float_complex& lhs, 
  const float_complex& rhs) 
 | 
 
lhsとrhsを乗算した結果を返却します。 
 | 
| 
 
float_complex operator*( 
  const float_complex& lhs, 
  const float& rhs) 
 | 
| 
 
float_complex operator*( 
  const float& lhs, 
  const float_complex& rhs) 
 | 
| 
 
float_complex operator/( 
  const float_complex& lhs, 
  const float_complex& rhs) 
 | 
 
lhsをrhsで除算した結果を返却します。 
 | 
| 
 
float_complex operator/( 
  const float_complex& lhs, 
  const float& rhs) 
 | 
| 
 
float_complex operator/( 
  const float& lhs, 
  const float_complex& rhs) 
 | 
| 
 
関数 
 | 
 
bool operator==( 
  const float_complex& lhs, 
  const float_complex& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。 
 | 
| 
 
bool operator==( 
  const float_complex& lhs, 
  const float& rhs) 
 | 
| 
 
bool operator==( 
  const float& lhs, 
  const float_complex& rhs) 
 | 
| 
 
bool operator!=( 
  const float_complex& lhs, 
  const float_complex& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。 
 | 
| 
 
bool operator!=( 
  const float_complex& lhs, 
  const float& rhs) 
 | 
| 
 
bool operator!=( 
  const float& lhs, 
  const float_complex& rhs) 
 | 
| 
 
istream& operator>>( 
  istream& is, 
  float_complex& x) 
 | 
 
u,(u),または(u,v) (u:実数部、v:虚数部)形式のxを入力します。 
 | 
| 
 
ostream& operator<<( 
  ostream& os, 
  float_complex& x) 
 | 
 
xをu,(u)または (u,v) (u:実数部、v:虚数部)形式で出力します。 
 | 
| 
 
float real(const float_complex& x) 
 | 
 
実数部を求めます。 
 | 
| 
 
float imag(const float_complex& x) 
 | 
 
虚数部を求めます。 
 | 
| 
 
float abs(const float_comlex& x) 
 | 
 
絶対値を求めます。 
 | 
| 
 
float arg(const float_complex& x) 
 | 
 
位相角度を求めます。 
 | 
| 
 
float norm(const float_complex& x) 
 | 
 
2乗の絶対値を求めます。 
 | 
| 
 
float_complex conj(const float_complex& x) 
 | 
 
共役複素数を求めます。 
 | 
| 
 
float_complex polar( 
  const float& rho, 
  const float& theta) 
 | 
 
大きさがrhoで位相角度がthetaの複素数に対応するfloat_complex値を求めます。 
 | 
| 
 
float_complex cos(const float_complex& x) 
 | 
 
複素余弦を求めます。 
 | 
| 
 
float_complex cosh(const float_complex& x) 
 | 
 
複素双曲余弦を求めます。 
 | 
| 
 
float_complex exp(const float_complex& x) 
 | 
 
指数関数を求めます。 
 | 
| 
 
float_complex log(const float_complex& x) 
 | 
 
自然対数を求めます。 
 | 
| 
 
float_complex log10(const float_complex& x) 
 | 
 
常用対数を求めます。 
 | 
| 
 
関数 
 | 
 
float_complex pow( 
  const float_complex& x, 
  int y) 
 | 
 
xのy乗を求めます。 
 | 
| 
 
float_complex pow( 
  const float_complex& x, 
  const float& y) 
 | 
| 
 
float_complex pow( 
  const float_complex& x, 
  const float_complex& y) 
 | 
| 
 
float_complex pow( 
  const float& x, 
  const float_complex& y) 
 | 
| 
 
float_complex sin(const float_complex& x) 
 | 
 
複素正弦を求めます。 
 | 
| 
 
float_complex sinh(const float_complex& x) 
 | 
 
複素双曲正弦を求めます。 
 | 
| 
 
float_complex sqrt(const float_complex& x) 
 | 
 
右半空間における範囲での平方根を求めます。 
 | 
| 
 
float_complex tan(const float_complex& x) 
 | 
 
複素正接を求めます。 
 | 
| 
 
float_complex tanh(const float_complex& x) 
 | 
 
複素双曲正接を求めます。 
 | 
 
 
| 
 
float_complex operator+(const float_complex& lhs) 
 | 
 
lhsの単項+演算を行います。
リターン値はlhsです。
 
| 
 
float_complex operator+(const float_complex& lhs, const float_complex& rhs) 
 | 
 
lhsとrhsを加算した結果を返却します。
リターン値は、float_complex(lhs)+=rhsです。
 
| 
 
float_complex operator+(const float_complex& lhs, const float& rhs) 
 | 
 
lhsとrhsを加算した結果を返却します。
リターン値は、float_complex(lhs)+=rhsです。
 
| 
 
float_complex operator+(const float& lhs, const float_complex& rhs) 
 | 
 
lhsとrhsを加算した結果を返却します。
リターン値は、float_complex(lhs)+=rhsです。
 
| 
 
float_complex operator-(const float_complex& lhs) 
 | 
 
lhsの単項-演算を行います。
リターン値は、float_complex(-lhs.real(),-lhs.imag())です。
 
| 
 
float_complex operator-(const float_complex& lhs, const float_complex& rhs) 
 | 
 
lhsからrhsを減算した結果を返却します。
リターン値は、float_complex(lhs)-=rhsです。
 
| 
 
float_complex operator-(const float_complex& lhs, const float& rhs) 
 | 
 
lhsからrhsを減算した結果を返却します。
リターン値は、float_complex(lhs)-=rhsです。
 
| 
 
float_complex operator-(const float& lhs, const float_complex& rhs) 
 | 
 
lhsからrhsを減算した結果を返却します。
リターン値は、float_complex(lhs)-=rhsです。
 
| 
 
float_complex operator*(const float_complex& lhs, const float_complex& rhs) 
 | 
 
lhsとrhsを乗算した結果を返却します。
リターン値は、float_complex(lhs)*=rhsです。
 
| 
 
float_complex operator*(const float_complex& lhs, const float& rhs) 
 | 
 
lhsとrhsを乗算した結果を返却します。
リターン値は、float_complex(lhs)*=rhsです。
 
| 
 
float_complex operator*(const float& lhs, const float_complex& rhs) 
 | 
 
lhsとrhsを乗算した結果を返却します。
リターン値は、float_complex(lhs)*=rhsです。
 
| 
 
float_complex operator/(const float_complex& lhs, const float_complex& rhs) 
 | 
 
lhsをrhsで除算した結果を返却します。
リターン値は、float_complex(lhs)/=rhsです。
 
| 
 
float_complex operator/(const float_complex& lhs, const float& rhs) 
 | 
 
lhsをrhsで除算した結果を返却します。
リターン値は、float_complex(lhs)/=rhsです。
 
| 
 
float_complex operator/(const float& lhs, const float_complex& rhs) 
 | 
 
lhsをrhsで除算した結果を返却します。
リターン値は、float_complex(lhs)/=rhsです。
 
| 
 
bool operator==(const float_complex& lhs, const float_complex& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。float型引数の場合、虚数部はfloat型の0.0fと仮定されます。
リターン値は、lhs.real()==rhs.real() && lhs.imag()==rhs.imag()です。
 
| 
 
bool operator==(const float_complex& lhs, const float& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。float型引数の場合、虚数部はfloat型の0.0fと仮定されます。
リターン値は、lhs.real()==rhs.real() && lhs.imag()==rhs.imag()です。
 
| 
 
bool operator==(const float& lhs, const float_complex& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。float型引数の場合、虚数部はfloat型の0.0fと仮定されます。
リターン値は、lhs.real()==rhs.real() && lhs.imag()==rhs.imag()です。
 
| 
 
bool operator!=(const float_complex& lhs, const float_complex& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。float型引数の場合、虚数部はfloat型の0.0fと仮定されます。
リターン値は、lhs.real()!=rhs.real() || lhs.imag()!=rhs.imag()です。
 
| 
 
bool operator!=(const float_complex& lhs, const float& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。float型引数の場合、虚数部はfloat型の0.0fと仮定されます。
リターン値は、lhs.real()!=rhs.real() || lhs.imag()!=rhs.imag()です。
 
| 
 
bool operator!=(const float& lhs, const float_complex& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。float型引数の場合、虚数部はfloat型の0.0fと仮定されます。
リターン値は、lhs.real()!=rhs.real() || lhs.imag()!=rhs.imag()です。
 
| 
 
istream& operator>>(istream& is, float_complex& x) 
 | 
 
u,(u), または(u,v) (uは実数部、vは虚数部)の形式のxを入力します。入力値はfloat_complexに変換されます。
u,(u),(u,v)形式以外が入力された場合は、is.setstate(ios_base::failbit)を呼びます。
リターン値はisです。
 
| 
 
ostream& operator<<(ostream& os, const float_complex& x) 
 | 
 
xをosに出力します。
出力形式はu,(u)または(u,v) (uは実数部、vは虚数部)です。
リターン値はosです。
 
| 
 
float real(const float_complex& x) 
 | 
 
実数部を求めます。
リターン値はx.real()です。
 
| 
 
float imag(const float_complex& x) 
 | 
 
虚数部を求めます。
リターン値はx.imag()です。
 
| 
 
float abs(const float_complex& x) 
 | 
 
絶対値を求めます。
リターン値は、(|x.real()|2 + |x.imag()|2)1/2です。
 
| 
 
float arg(const float_complex& x) 
 | 
 
位相角度を求めます。
リターン値は、atan2f( x.imag() , x.real())です。
 
| 
 
float norm(const float_complex& x) 
 | 
 
2乗の絶対値を求めます。
リターン値は、|x.real()|2 + |x.imag()|2です。
 
| 
 
float_complex conj(const float_complex& x) 
 | 
 
共役複素数を求めます。
リターン値は、float_complex(x.real(), (-1)*x.imag())です。
 
| 
 
float_complex polar(const float& rho, const float& theta) 
 | 
 
大きさがrhoで位相角度(偏角)がthetaの複素数に対応するfloat_complex値を求めます。
リターン値は、float_complex(rho*cosf(theta), rho*sinf(theta))です。
 
| 
 
float_complex cos(const float_complex& x) 
 | 
 
複素余弦を求めます。
リターン値は、float_complex(cosf(x.real())*coshf(x.imag()), (-1)*sinf(x.real())*sinhf(x.imag()))です。
 
| 
 
float_complex cosh(const float_complex& x) 
 | 
 
複素双曲余弦を求めます。
リターン値は、cos(float_complex((-1)*x.imag(), x.real()))です。
 
| 
 
float_complex exp(const float_complex& x) 
 | 
 
指数関数を求めます。
リターン値は、expf(x.real())*cosf(x.imag()),expf(x.real())*sinf(x.imag())です。
 
| 
 
float_complex log(const float_complex& x) 
 | 
 
(eを底とする)自然対数を求めます。
リターン値は、float_complex(logf(abs(x)), arg(x))です。
 
| 
 
float_complex log10(const float_complex& x) 
 | 
 
(10を底とする)常用対数を求めます。
リターン値は、float_complex(log10f(abs(x)), arg(x)/logf(10))です。
 
| 
 
float_complex pow(const float_complex& x, int y) 
 | 
 
xのy乗を求めます。
pow(0,0)のとき、定義域エラーになります。
リターン値は次のとおりです。
float_complex pow(const float_complex& x,const float_complex& y)の場合:exp(y*logf(x))
上記以外	:exp(y*log(x))
 
| 
 
float_complex pow(const float_complex& x, const float& y) 
 | 
 
xのy乗を求めます。
pow(0,0)のとき、定義域エラーになります。
リターン値は次のとおりです。
float_complex pow(const float_complex& x,const float_complex& y)の場合:exp(y*logf(x))
上記以外:exp(y*log(x))
 
| 
 
float_complex pow(const float_complex& x, const float_complex& y) 
 | 
 
xのy乗を求めます。
pow(0,0)のとき、定義域エラーになります。
リターン値は次のとおりです。
float_complex pow(const float_complex& x,const float_complex& y)の場合:exp(y*logf(x))
上記以外:exp(y*log(x))
 
| 
 
float_complex pow(const float& x, const float_complex& y) 
 | 
 
xのy乗を求めます。
pow(0,0)のとき、定義域エラーになります。
リターン値は次のとおりです。
float_complex pow(const float_complex& x,const float_complex& y)の場合:exp(y*logf(x))
上記以外:exp(y*log(x))
 
| 
 
float_complex sin(const float_complex& x) 
 | 
 
複素正弦を求めます。
リターン値は、float_complex(sinf(x.real())*coshf(x.imag()), cosf(x.real())*sinhf(x.imag()))です。
 
| 
 
float_complex sinh(const float_complex& x) 
 | 
 
複素双曲正弦を求めます。
リターン値は、float_complex(0,-1)*sin(float_complex((-1)*x.imag(),x.real())) です。
 
| 
 
float_complex sqrt(const float_complex& x) 
 | 
 
右半空間における範囲での平方根を求めます。
リターン値は、float_complex(sqrtf(abs(x))*cosf(arg(x)/2), sqrtf(abs(x))*sinf(arg(x)/2))です。
 
| 
 
float_complex tan(const float_complex& x) 
 | 
 
複素正接を求めます。
リターン値は、sin(x)/cos(x)です。
 
| 
 
float_complex tanh(const float_complex& x) 
 | 
 
複素双曲正接を求めます。
リターン値は、sinh(x)/cosh(x)です。
| 
 | 
 | 
 | 
| 
 
型 
 | 
 
value_type 
 | 
 
double型です。 
 | 
| 
 
変数 
 | 
 
_re 
 | 
 
double精度の実数部を定義します。 
 | 
| 
 
_im 
 | 
 
double精度の虚数部を定義します。 
 | 
| 
 
関数 
 | 
 
double_complex( 
  double re = 0.0, 
  double im = 0.0) 
 | 
 
コンストラクタです。 
 | 
| 
 
double_complex(const float_complex&) 
 | 
| 
 
double real() const 
 | 
 
実数部を求めます。 
 | 
| 
 
double imag() const 
 | 
 
虚数部を求めます。 
 | 
| 
 
double_complex& operator=(double rhs) 
 | 
 
rhsを実数部にコピーします。虚数部は0.0を設定します。 
 | 
| 
 
double_complex& operator+=(double rhs) 
 | 
 
rhsを実数部に加算し、和を*thisに格納します。 
 | 
| 
 
double_complex& operator-=(double rhs) 
 | 
 
rhsを実数部から減算し、差を*thisに格納します。 
 | 
| 
 
double_complex& operator*=(double rhs) 
 | 
 
rhsを乗算し、積を*thisに格納します。 
 | 
| 
 
double_complex& operator/=(double rhs) 
 | 
 
rhsで除算し、商を*thisに格納します。 
 | 
| 
 
double_complex& operator=( 
  const double_complex& rhs) 
 | 
 
rhsをコピーします。 
 | 
| 
 
double_complex& operator+=( 
  const double_complex& rhs) 
 | 
 
rhsを加算し、和を*thisに格納します。 
 | 
| 
 
double_complex& operator-=( 
  const double_complex& rhs) 
 | 
 
rhsを減算し、差を*thisに格納します。 
 | 
| 
 
double_complex& operator*=( 
  const double_complex& rhs) 
 | 
 
rhsを乗算し、積を*thisに格納します。 
 | 
| 
 
double_complex& operator/=( 
  const double_complex& rhs) 
 | 
 
rhsで除算し、商を*thisに格納します。 
 | 
 
 
| 
 
double_complex::double_complex(double re = 0.0, double im = 0.0) 
 | 
 
クラスdouble_complexのコンストラクタです。
以下の値で初期化します。
_re = re;
_im = im;
 
| 
 
double_complex::double_complex(const float_complex&) 
 | 
 
クラスdouble_complexのコンストラクタです。
以下の値で初期化します。
_re = (double)rhs.real();
_im = (double)rhs.imag();
 
| 
 
double double_complex::real() const 
 | 
 
実数部を求めます。
リターン値は、this->_reです。
 
| 
 
double double_complex::imag() const 
 | 
 
虚数部を求めます。
リターン値は、this->_imです。
 
| 
 
double_complex& double_complex::operator=(double rhs) 
 | 
 
rhsを実数部(_re)にコピーします。虚数部(_im)は0.0を設定します。
リターン値は*thisです。
 
| 
 
double_complex& double_complex::operator+=(double rhs) 
 | 
 
rhsを実数部(_re)に加算し、結果を実数部(_re)に格納します。虚数部(_im)の値は変わりません。
リターン値は*thisです。
 
| 
 
double_complex& double_complex::operator-=(double rhs) 
 | 
 
rhsを実数部(_re)から減算し、結果を実数部(_re)に格納します。虚数部(_im)の値は変わりません。
リターン値は*thisです。
 
| 
 
double_complex& double_complex::operator*=(double rhs) 
 | 
 
rhsと乗算し、結果を*thisに格納します。
(_re=_re*rhs, _im=_im*rhs)
リターン値は*thisです。
 
| 
 
double_complex& double_complex::operator/=(double rhs) 
 | 
 
rhsで除算し、結果を*thisに格納します。
(_re=_re/rhs, _im=_im/rhs)
リターン値は*thisです。
 
| 
 
double_complex& double_complex::operator=(const double_complex& rhs) 
 | 
 
rhsをコピーします。
リターン値は*thisです。
 
| 
 
double_complex& double_complex::operator+=(const double_complex& rhs) 
 | 
 
rhsを加算し、結果を*thisに格納します。
リターン値は*thisです。
 
| 
 
double_complex& double_complex::operator-=(const double_complex& rhs) 
 | 
 
rhsを減算し、結果を*thisに格納します。
リターン値は*thisです。
 
| 
 
double_complex& double_complex::operator*=(const double_complex& rhs) 
 | 
 
rhsと乗算し、結果を*thisに格納します。
リターン値は*thisです。
 
| 
 
double_complex& double_complex::operator/=(const double_complex& rhs) 
 | 
 
rhsで除算し、結果を*thisに格納します。
リターン値は*thisです。
| 
 | 
 | 
 | 
| 
 
関数 
 | 
 
double_complex operator+( 
  const double_complex& lhs) 
 | 
 
lhsの単項+演算を行います。 
 | 
| 
 
double_complex operator+( 
  const double_complex& lhs, 
  const double_complex& rhs) 
 | 
 
lhsとrhsを加算し、和をlhsに格納します。 
 | 
| 
 
double_complex operator+( 
  const double_complex& lhs, 
  const double& rhs) 
 | 
| 
 
double_complex operator+( 
  const double& lhs, 
  const double_complex& rhs) 
 | 
| 
 
double_complex operator-( 
  const double_complex& lhs) 
 | 
 
lhsの単項-演算を行います。 
 | 
| 
 
double_complex operator-( 
  const double_complex& lhs, 
  const double_complex& rhs) 
 | 
 
lhsからrhsを減算し、差をlhsに格納します。 
 | 
| 
 
double_complex operator-( 
  const double_complex& lhs, 
  const double& rhs) 
 | 
| 
 
double_complex operator-( 
  const double& lhs, 
  const double_complex& rhs) 
 | 
| 
 
double_complex operator*( 
  const double_complex& lhs, 
  const double_complex& rhs) 
 | 
 
lhsとrhsを乗算し、積をlhsに格納します。 
 | 
| 
 
double_complex operator*( 
  const double_complex& lhs, 
  const double& rhs) 
 | 
| 
 
double_complex operator*( 
  const double& lhs, 
  const double_complex& rhs) 
 | 
| 
 
double_complex operator/( 
  const double_complex& lhs, 
  const double_complex& rhs) 
 | 
 
lhsをrhsで除算し、商をlhsに格納します。 
 | 
| 
 
double_complex operator/( 
  const double_complex& lhs, 
  const double& rhs) 
 | 
| 
 
double_complex operator/( 
  const double& lhs, 
  const double_complex& rhs) 
 | 
| 
 
関数 
 | 
 
bool operator==( 
  const double_complex& lhs, 
  const double_complex& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。 
 | 
| 
 
bool operator==( 
  const double_complex& lhs, 
  const double& rhs) 
 | 
| 
 
bool operator==( 
  const double& lhs, 
  const double_complex& rhs) 
 | 
| 
 
bool operator!=( 
  const double_complex& lhs, 
  const double_complex& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。 
 | 
| 
 
bool operator!=( 
  const double_complex& lhs, 
  const double& rhs) 
 | 
| 
 
bool operator!=( 
  const double& lhs, 
  const double_complex& rhs) 
 | 
| 
 
istream& operator>>( 
  istream& is, 
  double_complex& x) 
 | 
 
u,(u)または(u,v) (u:実数部、v:虚数部)形式のxを入力します。 
 | 
| 
 
ostream& operator<<( 
  ostream& os, 
  const double_complex& x) 
 | 
 
xをu,(u)または (u,v) (u:実数部、v:虚数部)形式で出力します。 
 | 
| 
 
double real(const double_complex& x) 
 | 
 
実数部を求めます。 
 | 
| 
 
double imag(const double_complex& x) 
 | 
 
虚数部を求めます。 
 | 
| 
 
double abs(const double_comlex& x) 
 | 
 
絶対値を求めます。 
 | 
| 
 
double arg(const double_complex& x) 
 | 
 
位相角度を求めます。 
 | 
| 
 
double norm(const double_complex& x) 
 | 
 
2乗の絶対値を求めます。 
 | 
| 
 
double_complex conj( 
  const double_complex& x) 
 | 
 
共役複素数を求めます。 
 | 
| 
 
double_complex polar( 
  const double& rho, 
  const double& theta) 
 | 
 
大きさがrhoで位相角度がthetaの複素数に対応するdouble_complex値を求めます。 
 | 
| 
 
double_complex cos( 
  const double_complex& x) 
 | 
 
複素余弦を求めます。 
 | 
| 
 
double_complex cosh( 
  const double_complex& x) 
 | 
 
複素双曲余弦を求めます。 
 | 
| 
 
double_complex exp( 
  const double_complex&) 
 | 
 
指数関数を求めます。 
 | 
| 
 
double_complex log( 
  const double_complex& x) 
 | 
 
自然対数を求めます。 
 | 
| 
 
double_complex log10( 
  const double_complex& x) 
 | 
 
常用対数を求めます。 
 | 
| 
 
関数 
 | 
 
double_complex pow( 
  const double _complex& x, 
  int y) 
 | 
 
xのy乗を求めます。 
 | 
| 
 
double_complex pow( 
  const double _complex& x, 
  const double & y) 
 | 
| 
 
double_complex pow( 
  const double _complex& x, 
  const double _complex& y) 
 | 
| 
 
double_complex pow( 
  const double & x, 
  const double _complex& y) 
 | 
 
xのy乗を求めます。 
 | 
| 
 
double_complex sin( 
  const double_complex& x) 
 | 
 
複素正弦を求めます。 
 | 
| 
 
double_complex sinh( 
  const double_complex& x) 
 | 
 
複素双曲正弦を求めます。 
 | 
| 
 
double_complex sqrt( 
  const double_complex& x) 
 | 
 
右半空間における範囲での平方根を求めます。 
 | 
| 
 
double_complex tan( 
  const double_complex& x) 
 | 
 
複素正接を求めます。 
 | 
| 
 
double_complex tanh( 
  const double_complex& x) 
 | 
 
複素双曲正接を求めます。 
 | 
 
 
| 
 
double_complex operator+(const double_complex& lhs) 
 | 
 
lhsの単項+演算を行います。
リターン値はlhsです。
 
| 
 
double_complex operator+(const double_complex& lhs, const double_complex& rhs) 
 | 
 
lhsとrhsを加算し、結果をlhsに格納します。
リターン値は、double_complex(lhs)+=rhsです。
 
| 
 
double_complex operator+(const double_complex& lhs, const double& rhs) 
 | 
 
lhsとrhsを加算し、結果をlhsに格納します。
リターン値は、double_complex(lhs)+=rhsです。
 
| 
 
double_complex operator+(const double& lhs, const double_complex& rhs) 
 | 
 
lhsとrhsを加算し、結果をlhsに格納します。
リターン値は、double_complex(lhs)+=rhsです。
 
| 
 
double_complex operator-(const double_complex& lhs) 
 | 
 
lhsの単項-演算を行います。
リターン値は、double_complex(-lhs.real(), -lhs.imag())です。
 
| 
 
double_complex operator-(const double_complex& lhs, const double_complex& rhs) 
 | 
 
lhsからrhsを減算し、結果をlhsに格納します。
リターン値は、double_complex(lhs)-=rhsです。
 
| 
 
double_complex operator-(const double_complex& lhs, const double& rhs) 
 | 
 
lhsからrhsを減算し、結果をlhsに格納します。
リターン値は、double_complex(lhs)-=rhsです。
 
| 
 
double_complex operator-(const double& lhs, const double_complex& rhs) 
 | 
 
lhsからrhsを減算し、結果をlhsに格納します。
リターン値は、double_complex(lhs)-=rhsです。
 
| 
 
double_complex operator*(const double_complex& lhs, const double_complex& rhs) 
 | 
 
lhsとrhsを乗算し、結果をlhsに格納します。
リターン値は、double_complex(lhs)*=rhsです。
 
| 
 
double_complex operator*(const double_complex& lhs, const double& rhs) 
 | 
 
lhsとrhsを乗算し、結果をlhsに格納します。
リターン値は、double_complex(lhs)*=rhsです。
 
| 
 
double_complex operator*(const double& lhs, const double_complex& rhs) 
 | 
 
lhsとrhsを乗算し、結果をlhsに格納します。
リターン値は、double_complex(lhs)*=rhsです。
 
| 
 
double_complex operator/(const double_complex& lhs, const double_complex& rhs) 
 | 
 
lhsをrhsで除算し、結果をlhsに格納します。
リターン値は、double_complex(lhs)/=rhsです。
 
| 
 
double_complex operator/(const double_complex& lhs, const double& rhs) 
 | 
 
lhsをrhsで除算し、結果をlhsに格納します。
リターン値は、double_complex(lhs)/=rhsです。
 
| 
 
double_complex operator/(const double& lhs, const double_complex& rhs) 
 | 
 
lhsをrhsで除算し、結果をlhsに格納します。
リターン値は、double_complex(lhs)/=rhsです。
 
| 
 
bool operator==(const double_complex& lhs, const double_complex& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。double型引数の場合、虚数部はdouble型の0.0と仮定されます。
リターン値は、lhs.real()==rhs.real() && lhs.imag()==rhs.imag()です。
 
| 
 
bool operator==(const double_complex& lhs, const double& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。double型引数の場合、虚数部はdouble型の0.0と仮定されます。
リターン値は、lhs.real()==rhs.real() && lhs.imag()==rhs.imag()です。
 
| 
 
bool operator==(const double& lhs, const double_complex& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。double型引数の場合、虚数部はdouble型の0.0と仮定されます。
リターン値は、lhs.real()==rhs.real() && lhs.imag()==rhs.imag()です。
 
| 
 
bool operator!=(const double_complex& lhs, const double_complex& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。double型引数の場合、虚数部はdouble型の0.0と仮定されます。
リターン値は、lhs.real()!=rhs.real() || lhs.imag()!=rhs.imag()です。
 
| 
 
bool operator!=(const double_complex& lhs, const double& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。double型引数の場合、虚数部はdouble型の0.0と仮定されます。
リターン値は、lhs.real()!=rhs.real() || lhs.imag()!=rhs.imag()です。
 
| 
 
bool operator!=(const double& lhs, const double_complex& rhs) 
 | 
 
lhsとrhsの実数部どうし、虚数部どうしを比較します。double型引数の場合、虚数部はdouble型の0.0と仮定されます。
リターン値は、lhs.real()!=rhs.real() || lhs.imag()!=rhs.imag()です。
 
| 
 
istream& operator>>(istream& is, double_complex& x) 
 | 
 
u,(u)または(u,v) (uは実数部、vは虚数部)の形式の複素数xを入力します。入力値はdouble_complexに変換されます。
u,(u),(u,v)形式以外が入力された場合は、is.setstate(ios_base::failbit)を呼びます。
リターン値はisです。
 
| 
 
ostream& operator<<(ostream& os, const double_complex& x) 
 | 
 
xをosに出力します。
出力形式はu,(u)または(u,v) (uは実数部、vは虚数部)です。
リターン値はosです。
 
| 
 
double real(const double_complex& x) 
 | 
 
実数部を求めます。
リターン値はx.real()です。
 
| 
 
double imag(const double_complex& x) 
 | 
 
虚数部を求めます。
リターン値はx.imag()です。
 
| 
 
double abs(const double_complex& x) 
 | 
 
絶対値を求めます。
リターン値は、(|x.real()|2 + |x.imag()|2)1/2です。
 
| 
 
double arg(const double_complex& x) 
 | 
 
位相角度を求めます。
リターン値は、atan2( x.imag() , x.real())です。
 
| 
 
double norm(const double_complex& x) 
 | 
 
2乗の絶対値を求めます。
リターン値は、|x.real()|2 + |x.imag()|2です。
 
| 
 
double_complex conj(const double_complex& x) 
 | 
 
共役複素数を求めます。
リターン値は、double_complex(x.real(), (-1)*x.imag())です。
 
| 
 
double_complex polar(const double& rho, const double& theta) 
 | 
 
大きさがrhoで位相角度(偏角)がthetaの複素数に対応するdouble_complex値を求めます。
リターン値は、double_complex(rho*cos(theta), rho*sin(theta))です。
 
| 
 
double_complex cos(const double_complex& x) 
 | 
 
複素余弦を求めます。
リターン値は、double_complex(cos(x.real())*cosh(x.imag()), (-1)*sin(x.real())*sinh(x.imag()))です。
 
| 
 
double_complex cosh(const double_complex& x) 
 | 
 
複素双曲余弦を求めます。
リターン値は、cos(double_complex((-1)*x.imag(), x.real()))です。
 
| 
 
double_complex exp(const double_complex& x) 
 | 
 
指数関数を求めます。
リターン値は、exp(x.real())*cos(x.imag()),exp(x.real())*sin(x.imag())です。
 
| 
 
double_complex log(const double_complex& x) 
 | 
 
(eを底とする)自然対数を求めます。
リターン値は、double_complex(log(abs(x)), arg(x))です。
 
| 
 
double_complex log10(const double_complex& x) 
 | 
 
(10を底とする)常用対数を求めます。
リターン値は、double_complex(log10(abs(x)), arg(x)/log(10))です。
 
| 
 
double_complex pow(const double_complex& x, int y) 
 | 
 
xのy乗を求めます。
pow(0,0)のとき、定義域エラーになります。
リターン値は、exp(y*log(x))です。
 
| 
 
double_complex pow(const double_complex& x, const double& y) 
 | 
 
xのy乗を求めます。
pow(0,0)のとき、定義域エラーになります。
リターン値は、exp(y*log(x))です。
 
| 
 
double_complex pow(const double_complex& x, const double_complex& y) 
 | 
 
xのy乗を求めます。
pow(0,0)のとき、定義域エラーになります。
リターン値は、exp(y*log(x))です。
 
| 
 
double_complex pow(const double& x, const double_complex& y) 
 | 
 
xのy乗を求めます。
pow(0,0)のとき、定義域エラーになります。
リターン値は、exp(y*log(x))です。
 
| 
 
double_complex sin(const double_complex& x) 
 | 
 
複素正弦を求めます。
リターン値は、double_complex(sin(x.real())*cosh(x.imag()), cos(x.real())*sinh(x.imag()))です。
 
| 
 
double_complex sinh(const double_complex& x) 
 | 
 
複素双曲正弦を求めます。
リターン値は、double_complex(0,-1)*sin(double_complex((-1)*x.imag(),x.real()))です。
 
| 
 
double_complex sqrt(const double_complex& x) 
 | 
 
右半空間における範囲での平方根を求めます。
リターン値は、double_complex(sqrt(abs(x))*cos(arg(x)/2), sqrt(abs(x))*sin(arg(x)/2))です。
 
| 
 
double_complex tan(const double_complex& x) 
 | 
 
複素正接を求めます。
リターン値は、sin(x)/cos(x)です。
 
| 
 
double_complex tanh(const double_complex& x) 
 | 
 
複素双曲正接を求めます。
リターン値は、sinh(x)/cosh(x)です。