Home Index classes Index static functions Index enumerations Index structure types

{Complex|_numbers}


CLASS {Complex|_numbers} , OPERATORS, TESTED(99):


Class to work with complex numbers in very near to its natural mathimatical form (e.i. such type variables can be used in expressions like usual numeric operands, and combined with usual mathimatical operations like +, -, *, /). But functions using operations with complex operands, should be marked with the modifiers OPERATORS({Complex}).


IMPORT : {Mathematics} .


STRUCTURE {complex|_number}

      REAL Re|al_part

      REAL Im|aginable .


The complex number instance type.


FUNCTION To_complex|_from_REAL_or_INT (
     
REAL X|_parameter ) ==> {complex}


Getting a complex number from a real or integer.


FUNCTION Complex|_from_Re_Im (
     
REAL Re|al_part ,
     
REAL Im|agine_part ) ==> {complex}


Creating a complex number from a real and imagine parts represented by REAL numbers.


FUNCTION Complement|_to_complex (
     
{complex} X|_original_value ) ==> {complex}


Complementary value for a complex number: Re' = Re, Im' = -Im


FUNCTION Cmod|ule_of_complex_number (
     
{complex} X|_argument ) ==> REAL


A module of a complex number (a square root from a sum of squares of components).


FUNCTION Carg|ument_of_complex (
     
{complex} X|_parameter ) ==> REAL


An argument of a complex number (in radians).


FUNCTION I|_imagine_one ==> {complex}


Imagine one (mathematical i). It is possible to write: 5 + 3 * I to represent the number 5+3i, for example.


FUNCTION C_from_mod_arg (
     
REAL R|_module ,
     
REAL Arg|ument ) ==> {complex}


Creating a complex number from its module and argument.


FUNCTION Csame|_complex_number (
     
{complex} A|_argument ,
     
{complex} B|_argument ) ==> BOOL


Comparing two complex numbers for an equality. Returns TRUE if these are very near.


----------------------------------------------------------------------- '+'


OPERATOR {complex} + {complex} ==> {complex}


Adding two complex numbers.


OPERATOR {complex} + REAL ==> {complex} , OPERATORS


Adding a complex and a real (or integer still it can be converted to a real implicitly) number.


OPERATOR REAL + {complex} ==> {complex} , OPERATORS


Addign a real and a complex numbers.


----------------------------------------------------------------------- '-'


OPERATOR - {complex} ==> {complex}


Negate of a complex number.


OPERATOR {complex} - {complex} ==> {complex} , OPERATORS


Subtracting one complex number from another complex number.


OPERATOR {complex} - REAL ==> {complex} , OPERATORS


Subtracting a real number from a complex number.


OPERATOR REAL - {complex} ==> {complex} , OPERATORS


Subtracting a complex number from a real number.


----------------------------------------------------------------------- '*'


OPERATOR {complex} * {complex} ==> {complex}


Multiplying of two complex numbers.


OPERATOR {complex} * REAL ==> {complex} , OPERATORS


Multiplying of a complex and a real numbers.


OPERATOR REAL * {complex} ==> {complex} , OPERATORS


Multiplying of a real and a complex numberrs.


FUNCTION Cmul_i|_multimply_by_i (
     
{complex} X|_parameter ) ==> {complex}


Multiplying a complex value by i (imaginary one).


----------------------------------------------------------------------- '/'


OPERATOR {complex} / REAL ==> {complex} , OPERATORS


Dividing a complex number by a real divider.


OPERATOR {complex} / {complex} ==> {complex} , OPERATORS


Dividing one complex number by another complex number.


OPERATOR REAL / {complex} ==> {complex} , OPERATORS


Dividing a real number by a complex divider.


------------------------------------------------------------ 'exponent, ln'


FUNCTION Cexp|onent ( {complex} X|_base_of_exponent ) ==> {complex}


Exponent function for a complex argument.


FUNCTION Cln|atural_logarithm ( {complex} X|_parameter ) ==> {complex}


A natural logaritm of a complex argument.


------------------------------------------------------------- 'power, sqrt'


FUNCTION Cpow|er|_complex_by_real (
     
{complex} X|_base_to_power ,
     
INT,REAL,{complex} E|xponent ) ==> {complex} , OPERATORS


Power of a complex number (with a real or a complex exponent).


FUNCTION Csqrt|_square_root_of_complex (
     
{complex} X|_root_value ) ==> {complex}


Square root from a complex number.


------------------------------------------------------------ 'trigonometry'


FUNCTION Ccos|inus_trigonometric (
     
{complex} X|_radians ) ==> {complex} , OPERATORS


Trigonometric cosinus of a complex number argument.


FUNCTION Csin|us_trigonometric (
     
{complex} X|_radians ) ==> {complex} , OPERATORS


Trigonometric sinus of a complex number argument.


FUNCTION Ccosh|iperbolic (
     
{complex} X|_parameter ) ==> {complex} , OPERATORS


Hyperbolic cosinus of a complex number argument.


FUNCTION Csinh|iperbolic (
     
{complex} X|_parameter ) ==> {complex} , OPERATORS


Hyperbolic sinus of a complex number argument.


FUNCTION Carcsin|us_trigonometric (
     
{complex} X|_parameter ) ==> {complex} , OPERATORS


Trigonometric arcsinus of a complex number argument.


FUNCTION Carccos|inus_trigonometric (
     
{complex} X|_parameter ) ==> {complex} , OPERATORS


Trigonometric arccosinus of a complex number argument.


FUNCTION Carctan|gens_trigonometetric (
     
{complex} X|_parameter ) ==> {complex} , OPERATORS


Trigonometric arctangens of a complex number argument.


FUNCTION Carccotan|gens_trigonometetric (
     
{complex} X|_parameter ) ==> {complex} , OPERATORS


Trigonometric arccotangens of a complex number argument.


FUNCTION Carcsinh (
     
{complex} X|_parameter ) ==> {complex} , OPERATORS


Hyperbolic arcsinus of a complex number argument.


FUNCTION Carccosh (
     
{complex} X|_parameter ) ==> {complex} , OPERATORS


Hyperbolic arccosinus of a complex number argument.


FUNCTION Carcth|iperbolic (
     
{complex} X|_parameter ) ==> {complex} , OPERATORS


Hyperbolic arctangens of a complex number argument.


------------------------------------------------------------------ 'to STR'


FUNCTION Cstr|ing_from_complex_number (
     
{complex} X|_complex_number ) ==> STR


Representing a complex number as a string like "5+3.1415926535799i".


FUN S_complex ( {complex} X|_parameter ) ==> STR


Same as above.

END