マニュアルページ cartpol.3




名前

     cartpol - C++ 複素数数学ライブラリの直角座標 / 極座標関数


形式

     #include <complex.h>
     class complex {
     public:
         friend double  abs(const complex);
         friend double  norm(const complex);
         friend double  arg(const complex);
         friend complex conj(const complex);
         friend double  imag(const complex&);
         friend double  real(const complex&);
         friend complex polar(double magnitude, double angle= 0.0);
          ... // 以下省略
     };


機能説明

     これらの関数により、いくつかのアプリケーションに必要な、実装
     の直角座標と極座標との間の変換が可能になります。

     double mag = abs(x)
          複素数 x の絶対値 (大きさ) を返します。

     double mag = norm(x)
          複素数 x の絶対値の 2 乗を返します。この関数は平方根 を
          計算しないために abs よりも高速で、複素数の大きさを比較
          するときに便利です。

     double ang = arg(x)
          複素数 x を極座標で表したときの角度 (偏角) を、 -n から
          +n の範囲のラジアンで返します。

     complex z = conj(x)
          複素数 x の共役複素数を返します。x の値が  (r,i)  の と
          き、共役複素数の値は (r,-i) になります。

     double i = imag(x)
          複素数 x の虚部を返します。

     double r = real(x)
          複素数 x の実部を返します。

     complex x = polar(mag, ang)
          極座標 mag (大きさ) と、 -n から +n までの範囲のラジ ア
          ン で表された ang (角度または偏角) の対から、同じ値の複
          素数を返します。


関連項目

     cplx.intro(3C++)、 cplxerr(3C++)、 cplxexp(3C++)、
     cplxops(3C++)、 cplxtrig(3C++)