.. Author: kms, mailto: lionsgr@zmail.ru

.. include:: commonchm.txt

#########################################################################
Math
#########################################################################
..  <chminfo>
	<insert nodes="//common/maininfo/*"/>
        <klinks>
            
            Math
        </klinks>
    </chminfo>

.. contents:: 
	:backlinks: none

**  / Math**

  .
        .


=================================
..  <chminfo split="0" splitchild="1">
        <insert nodes="//common/propsmethods/*"/>
    </chminfo>

.. 

 / Long
-------------------------------------------------------------------------
    ::
        Long(,  =0)

    ::

        - **:   
              ,      Long
        - **:
             

    ::
        

    ::
        |      Long.
        |       :
        |
        | [whitespace] [{+ | -}] [0 [{ x | X }]] [digits]

        A whitespace may consist of space and tab characters,
        which are ignored; digits are one or more decimal digits.
        The first character that does not fit this form stops the scan.
        If base is between 2 and 36, then it is used as the base of the number.
        If base is 0, the initial characters of the string are used to determine the base.
        If the first character is 0 and the second character is not 'x' or 'X',
        the string is interpreted as an octal integer; otherwise, it is interpreted
        as a decimal number. If the first character is '0' and the second character
        is 'x' or 'X', the string is interpreted as a hexadecimal integer.
        If the first character is '1' through '9', the string is interpreted as a decimal integer.
        The letters 'a' through 'z' (or 'A' through 'Z') are assigned the values 10 through 35;
        only letters whose assigned values are less than base are permitted.

        | ..     ,    .
        |     ,   ,
        |    .      36.

    ::
    	| Long("0x100") == 256
    	| Long("100", 2) == 4

.. Double

Double
-------------------------------------------------------------------------
    ::
        Double()

    ::

        - **:   
              ,      Double

    ::
        

    ::
        |      Double.
        |       :
        |
        | [whitespace] [sign] [digits] [.digits] [ {d | D | e | E}[sign]digits]

        A whitespace may consist of space and tab characters,
        which are ignored; sign is either plus (+) or minus (-);
        and digits are one or more decimal digits. If no digits appear before
        the radix character, at least one must appear after the radix character.
        The decimal digits can be followed by an exponent,
        which consists of an introductory letter (d, D, e, or E)
        and an optionally signed integer. If neither an exponent part
        nor a radix character appears, a radix character is assumed to follow
        the last digit in the string. The first character that does not fit this form
        stops the scan.

                .

    ::
    	| Double("-1.5e+3") == -1500

.. ABS

ABS
-------------------------------------------------------------------------
    ::
        ABS()

    ::

        - **:   

    ::
        | 
        |   x

    ::
         abs(x)

.. ACOS

ACOS
-------------------------------------------------------------------------
    ::
        ACOS(x)

    ::

        - *x*:   

    ::
        | 
        |  x

    ::
         acos(x)
        
.. ASIN

ASIN
-------------------------------------------------------------------------
    ::
        ASIN(x)

    ::

        - *x*:   

    ::
        | 
        |  x

    ::
         asin(x)
    
.. ATAN

ATAN
-------------------------------------------------------------------------
    ::
        ATAN(x)

    ::

        - *x*:   

    ::
        | 
        |  x

    ::
         atan(x)

.. ATAN2

ATAN2
-------------------------------------------------------------------------
    ::
        ATAN2(y, x)

    ::

        - *y*:   
        - *x*:   

    ::
        | 
        |  y/x

    ::
         atan(y/x)

.. CEIL

CEIL
-------------------------------------------------------------------------
    ::
        CEIL(x)

    ::

        - *x*:   

    ::
        | 

    ::
          ,  x

.. COPYSIGN

COPYSIGN
-------------------------------------------------------------------------
    ::
        COPYSIGN(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 

    ::
          x    y

.. COS

COS
-------------------------------------------------------------------------
    ::
        COS(x)

    ::

        - *x*:   

    ::
        | 
        |  x

    ::
         cos(x)

.. COSH

COSH
-------------------------------------------------------------------------
    ::
        COSH(x)

    ::

        - *x*:   

    ::
        | 
        |   x

    ::
         cosh(x)

.. EXP

EXP
-------------------------------------------------------------------------
    ::
        EXP(x)

    ::

        - *x*:   

    ::
        | 
        |  x

    ::
         e^x

.. FLOOR

FLOOR
-------------------------------------------------------------------------
    ::
        FLOOR(x)

    ::

        - *x*:   

    ::
        | 

    ::
          ,  x

.. FMOD

FMOD
-------------------------------------------------------------------------
    ::
        FMOD(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 
        |    x/y

    ::
        The function calculates the floating-point remainder f of x / y
        such that x = i * y + f, where i is an integer, f has the same sign as x,
        and the absolute value of f is less than the absolute value of y.

             f,  x = i * y + f,  i - ,
        f -    x,    f    y.
	
.. FREXP

FREXP
-------------------------------------------------------------------------
    ::
        FREXP(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 
        |  x

    ::
        The function breaks down the floating-point value (x) into a mantissa (m)
        and an exponent (n), such that the absolute value of m is greater than or equal
        to 0.5 and less than 1.0, and x = m * 2^n.
        
           x   (m)   (n)  , 
        0.5 <= abs(m) < 1.0,  x = m * 2^n.
	
.. HYPOT

HYPOT
-------------------------------------------------------------------------
    ::
        HYPOT(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 
        |  

    ::
          SQRT(X^2 + y^2)

.. LDEXP

LDEXP
-------------------------------------------------------------------------
    ::
        LDEXP(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 

    ::
         x * 2^y
	
.. LDIV

LDIV
-------------------------------------------------------------------------
    ::
        LDIV(x, y, rem)

    ::

        - *x*:   
        - *y*:   
        - *rem*:  ()

    ::
        | 
        |     x/y

    ::
        |         x  y,
        |     rem

.. LOG

LOG
-------------------------------------------------------------------------
    ::
        LOG(x)

    ::

        - *x*:   

    ::
        | 
        |  x

    ::
        |     log(x)

.. LOG10

LOG10
-------------------------------------------------------------------------
    ::
        LOG10(x)

    ::

        - *x*:   

    ::
        | 
        |   x 

    ::
        |     log10(x)

.. MODF

MODF
-------------------------------------------------------------------------
    ::
        MODF(x, fract)

    ::

        - *x*:   
        - *fract*:  ()

    ::
        | 
        |   x

    ::
        |   x        ,   x,
        |      fract

.. PI

PI
-------------------------------------------------------------------------
    ::
        PI()

    ::
        

    ::
        | 

    ::
          PI

    
.. POW

POW
-------------------------------------------------------------------------
    ::
        POW(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 
        | x ^ y

.. RAND

RAND
-------------------------------------------------------------------------
    ::
        RAND()

    ::
        

    ::
        | 
        |  

    ::
        |       0  RAND_MAX (  0x7fff)
        |        0  1   RAND1_
        |      SRAND_

.. RAND1

RAND1
-------------------------------------------------------------------------
    ::
        RAND1()

    ::
        

    ::
        | 
        |  

    ::
        |       0  1
        |      SRAND_

.. ROTL

ROTL
-------------------------------------------------------------------------
    ::
        ROTL(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 

    ::
        |      x  y  

.. ROTR

ROTR
-------------------------------------------------------------------------
    ::
        ROTR(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 

    ::
        |      x  y  

.. SHL

SHL
-------------------------------------------------------------------------
    ::
        SHL(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 

    ::
        |     x  y  

.. SHR

SHR
-------------------------------------------------------------------------
    ::
        SHR(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 

    ::
        |     x  y  

.. SIN

SIN
-------------------------------------------------------------------------
    ::
        SIN(x)

    ::

        - *x*:   

    ::
        | 
        |  x

    ::
        |  sin(x)

.. SINH

SINH
-------------------------------------------------------------------------
    ::
        SINH(x)

    ::

        - *x*:   

    ::
        | 
        |   x

    ::
        |  sinh(x)

.. SQRT

SQRT
-------------------------------------------------------------------------
    ::
        SQRT(x)

    ::

        - *x*:   

    ::
        | 
        |   

    ::
        |  x ^ 0.5

.. SRAND

SRAND
-------------------------------------------------------------------------
    ::
        SRAND(x)

    ::

        - *x*:   
            seed 

    ::
        

    ::
           

.. TAN

TAN
-------------------------------------------------------------------------
    ::
        TAN(x)

    ::

        - *x*:   

    ::
        | 
        |  x

    ::
         tan(x)

.. TANH

TANH
-------------------------------------------------------------------------
    ::
        TANH(x)

    ::

        - *x*:   

    ::
        | 
        |   x

    ::
         tanh(x)

.. BITAND

BITAND
-------------------------------------------------------------------------
    ::
        BITAND(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 

    ::
         x & y

.. BITOR

BITOR
-------------------------------------------------------------------------
    ::
        BITOR(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 

    ::
         x | y

.. COMPL

COMPL
-------------------------------------------------------------------------
    ::
        COMPL(x)

    ::

        - *x*:   

    ::
        | 
        |  x

    ::
         ~x

.. XOR

XOR
-------------------------------------------------------------------------
    ::
        XOR(x, y)

    ::

        - *x*:   
        - *y*:   

    ::
        | 

    ::
         x ^ y
