⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 complex_.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
📖 第 1 页 / 共 3 页
字号:
:SMTICS.
The &fn. computes the hyperbolic cosine of
:ARG.num
:PERIOD.
:RSLTS.
The &fn. returns the hyperbolic cosine of
:ARG.num
:PERIOD.
:SALSO.
:SAL typ='fun'.acosh
:SAL typ='fun'.sinh
:SAL typ='fun'.tanh
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.exp
:SNPL.
:SNPFLF          .#include <complex.h>
:SNPR index='exp'.Complex exp( Complex const &amp.num );
:eSNPL.
:SMTICS.
The &fn. computes the value of
:HILITE.e
raised to the power
:ARG.num
:PERIOD.
:RSLTS.
The &fn. returns the value of
:HILITE.e
raised to the power
:ARG.num
:PERIOD.
:SALSO.
:SAL typ='fun'.log
:SAL typ='fun'.log10
:SAL typ='fun'.pow
:SAL typ='fun'.sqrt
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.imag
:SNPL.
:SNPFLF           .#include <complex.h>
:SNPFLF           .public:
:SNPF index='imag'.double Complex::imag();
:eSNPL.
:SMTICS.
The &fn. extracts the imaginary component of the &obj.:PERIOD.
:RSLTS.
The &fn. returns the imaginary component of the &obj.:PERIOD.
:SALSO.
:SAL typ='fun'.imag
:SAL typ='fun'.real
:SAL typ='mfun'.real
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.imag
:SNPL.
:SNPFLF           .#include <complex.h>
:SNPR index='imag'.double imag( Complex const &amp.num );
:eSNPL.
:SMTICS.
The &fn. extracts the imaginary component of
:ARG.num
:PERIOD.
:RSLTS.
The &fn. returns the imaginary component of
:ARG.num
:PERIOD.
:SALSO.
:SAL typ='fun'.real
:SAL typ='mfun'.imag
:SAL typ='mfun'.real
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.log
:SNPL.
:SNPFLF          .#include <complex.h>
:SNPR index='num'.Complex log( Complex const &amp.num );
:eSNPL.
:SMTICS.
The &fn. computes the natural, or base
:HILITE.e
:CONT.,
logarithm of
:ARG.num
:PERIOD.
:RSLTS.
The &fn. returns the natural, or base
:HILITE.e
:CONT.,
logarithm of
:ARG.num
:PERIOD.
:SALSO.
:SAL typ='fun'.exp
:SAL typ='fun'.log10
:SAL typ='fun'.pow
:SAL typ='fun'.sqrt
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.log10
:SNPL.
:SNPFLF            .#include <complex.h>
:SNPR index='log10'.Complex log10( Complex const &amp.num );
:eSNPL.
:SMTICS.
The &fn. computes the base 10 logarithm of
:ARG.num
:PERIOD.
:RSLTS.
The &fn. returns the base 10 logarithm of
:ARG.num
:PERIOD.
:SALSO.
:SAL typ='fun'.exp
:SAL typ='fun'.log
:SAL typ='fun'.pow
:SAL typ='fun'.sqrt
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.norm
:SNPL.
:SNPFLF           .#include <complex.h>
:SNPR index='norm'.double norm( Complex const &amp.num );
:eSNPL.
:SMTICS.
The &fn. computes the square of the magnitude of
:ARG.num
:CONT.,
which is equivalent to the square of the length (magnitude) of the vector when
:ARG.num
is represented in polar coordinates.
:RSLTS.
The &fn. returns the square of the magnitude of
:ARG.num
:PERIOD.
:SALSO.
:SAL typ='fun'.arg
:SAL typ='fun'.polar
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.operator !=
:SNPL.
:SNPFLF                  .#include <complex.h>
:SNPR index='operator !='.int operator !=( Complex const &amp.num1, Complex const &amp.num2 );
:SNPR index='operator !='.int operator !=( Complex const &amp.num1, double         num2 );
:SNPR index='operator !='.int operator !=( double         num1, Complex const &amp.num2 );
:eSNPL.
:SMTICS.
The &fn. compares
:ARG.num1
and
:ARG.num2
for inequality.
At least one of the parameters must be a &obj. for this function to be called.
:P.
Two &obj.s are not equal if either of their
corresponding real or imaginary components are not equal.
:INCLUDE file='cpx_op'.
:RSLTS.
The &fn. returns a non-zero value if
:ARG.num1
is not equal to
:ARG.num2
:CONT., otherwise zero is returned.
:SALSO.
:SAL typ='fun'.operator~b==
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.operator *
:SNPL.
:SNPFLF                 .#include <complex.h>
:SNPR index='operator *'.Complex operator *( Complex const &amp.num1,
:SNPFLF                 .                    Complex const &amp.num2 );
:SNPR index='operator *'.Complex operator *( Complex const &amp.num1,
:SNPFLF                 .                    double         num2 );
:SNPR index='operator *'.Complex operator *( double         num1,
:SNPFLF                 .                    Complex const &amp.num2 );
:eSNPL.
:SMTICS.
The &fn. is used to multiply
:ARG.num1
by
:ARG.num2
yielding a &obj.:PERIOD.
:P.
The first &fn. multiplies two &obj.s.
:P.
The second &fn. multiplies a &obj. and a floating-point value.
In effect, the real and imaginary components of the &obj.
are multiplied by the floating-point value.
:P.
The third &fn. multiplies a floating-point value and a &obj.:PERIOD.
In effect, the real and imaginary components of the &obj.
are multiplied by the floating-point value.
:INCLUDE file='cpx_op'.
:RSLTS.
The &fn. returns a &obj. that is the product of
:ARG.num1
and
:ARG.num2
:PERIOD.
:SALSO.
:SAL typ='fun'.operator~b+
:SAL typ='fun'.operator~b-
:SAL typ='fun'.operator~b/
:SAL typ='mfun'.operator~b*=
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.operator *=
:SNPL.
:SNPFLF                  .#include <complex.h>
:SNPFLF                  .public:
:SNPF index='operator *='.Complex &amp.Complex::operator *=( Complex const &amp.num );
:SNPF index='operator *='.Complex &amp.Complex::operator *=( double num );
:eSNPL.
:SMTICS.
The &fn. is used to multiply the
:ARG.num
argument into the &obj.:PERIOD.
:P.
The first form of the &fn. multiplies the &obj. by the
:MONO.Complex
parameter.
:P.
The second form of the &fn. multiplies the real and imaginary
components of the &obj. by
:ARG.num
:PERIOD.
:INCLUDE file='cpx_asgn'.
:RSLTS.
The &fn. returns a reference to the target of the assignment.
:SALSO.
:SAL typ='fun'.operator~b*
:SAL typ='mfun'.operator~b+=
:SAL typ='mfun'.operator~b-=
:SAL typ='mfun'.operator~b/=
:SAL typ='mfun'.operator~b=
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.operator +
:SNPL.
:SNPFLF                 .#include <complex.h>
:SNPFLF                 .public:
:SNPF index='operator +'.Complex Complex::operator +();
:eSNPL.
:SMTICS.
The unary &fn. is provided for completeness.
It performs no operation on the &obj.:PERIOD.
:RSLTS.
The unary &fn. returns a &obj. with the same value as the original
&obj.:PERIOD.
:SALSO.
:SAL typ='fun'.operator~b+
:SAL typ='mfun'.operator~b+=
:SAL typ='mfun'.operator~b-
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.operator +
:SNPL.
:SNPFLF                 .#include <complex.h>
:SNPR index='operator +'.Complex operator +( Complex const &amp.num1,
:SNPFLF                 .                    Complex const &amp.num2 );
:SNPR index='operator +'.Complex operator +( Complex const &amp.num1,
:SNPFLF                 .                    double         num2 );
:SNPR index='operator +'.Complex operator +( double         num1,
:SNPFLF                 .                    Complex const &amp.num2 );
:eSNPL.
:SMTICS.
The &fn. is used to add
:ARG.num1
to
:ARG.num2
yielding a &obj.:PERIOD.
:P.
The first &fn. adds two &obj.s.
:P.
The second &fn. adds a &obj. and a floating-point value.
In effect, the floating-point value is added to the real component
of the &obj.:PERIOD.
:P.
The third &fn. adds a floating-point value and a &obj.:PERIOD.
In effect, the floating-point value is added to the real component
of the &obj.:PERIOD.
:INCLUDE file='cpx_op'.
:RSLTS.
The &fn. returns a &obj. that is the sum of
:ARG.num1
and
:ARG.num2
:PERIOD.
:SALSO.
:SAL typ='fun'.operator~b*
:SAL typ='fun'.operator~b-
:SAL typ='fun'.operator~b/
:SAL typ='mfun'.operator~b+
:SAL typ='mfun'.operator~b+=
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.operator +=
:SNPL.
:SNPFLF                  .#include <complex.h>
:SNPFLF                  .public:
:SNPF index='operator +='.Complex &amp.Complex::operator +=( Complex const &amp.num );
:SNPF index='operator +='.Complex &amp.Complex::operator +=( double num );
:eSNPL.
:SMTICS.
The &fn. is used to add
:ARG.num
to the value of the &obj.:PERIOD.
The second form of the &fn. adds
:ARG.num
to the real component of the &obj.:PERIOD.
:INCLUDE file='cpx_asgn'.
:RSLTS.
The &fn. returns a reference to the target of the assignment.
:SALSO.
:SAL typ='fun'.operator~b+
:SAL typ='mfun'.operator~b*=
:SAL typ='mfun'.operator~b+
:SAL typ='mfun'.operator~b/=
:SAL typ='mfun'.operator~b-=
:SAL typ='mfun'.operator~b=
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.operator -
:SNPL.
:SNPFLF                 .#include <complex.h>
:SNPFLF                 .public:
:SNPF index='operator -'.Complex Complex::operator -();
:eSNPL.
:SMTICS.
The unary &fn. yields a &obj. with the real and imaginary components having
the same magnitude as those of the original object, but with opposite sign.
:RSLTS.
The unary &fn. returns a &obj. with the same magnitude
as the original &obj. and with opposite sign.
:SALSO.
:SAL typ='fun'.operator~b-
:SAL typ='mfun'.operator~b+
:SAL typ='mfun'.operator~b-=
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='fun'.operator -
:SNPL.
:SNPFLF                 .#include <complex.h>
:SNPR index='operator -'.Complex operator -( Complex const &amp.num1,
:SNPFLF                 .                    Complex const &amp.num2 );
:SNPR index='operator -'.Complex operator -( Complex const &amp.num1,
:SNPFLF                 .                    double         num2 );
:SNPR index='operator -'.Complex operator -( double         num1,
:SNPFLF                 .                    Complex const &amp.num2 );
:eSNPL.
:SMTICS.
The &fn. is used to subtract
:ARG.num2
from
:ARG.num1
yielding a &obj.:PERIOD.
:P.
The first &fn. computes the difference between two &obj.s.
:P.
The second &fn. computes the difference between a &obj.
and a floating-point value.
In effect, the floating-point value is subtracted from the real component
of the &obj.:PERIOD.
:P.
The third &fn. computes the difference between a floating-point value and a
&obj.:PERIOD.
In effect, the real component of the result is
:ARG.num1
minus the real component of
:ARG.num2
:CONT,
and the imaginary component of the result is the negative of the imaginary
component of
:ARG.num2
:PERIOD.
:INCLUDE file='cpx_op'.
:RSLTS.
The &fn. returns a &obj. that is the difference between
:ARG.num1
and
:ARG.num2
:PERIOD.
:SALSO.
:SAL typ='fun'.operator~b*
:SAL typ='fun'.operator~b+
:SAL typ='fun'.operator~b/
:SAL typ='mfun'.operator~b-
:SAL typ='mfun'.operator~b-=
:eSALSO.
:eLIBF.
:CMT.========================================================================
:LIBF fmt='mfun' prot='public'.operator -=
:SNPL.
:SNPFLF                  .#include <complex.h>
:SNPFLF                  .public:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -