Help on calculator features
===========================

Constants
---------

  Expression can contain constants in the following number notations:

  Decimal        12
  Hexadecimal    12h, 0ABh, 0xAB, $AB
  Octal          12o, 012
  Binary         101b
  Real numbers   012., .12, 1e2, 1.2e-3

  Negative numbers can be written by using "unary minus" operator.

  There are two predefined symbolic constants:
  e = 2.71...
  pi = 3.14...

  Note:
  Maximal positive real number is 1.1e4932.


Operators
---------

  Common operators

    +    Addition                *    Multiplication
    -    Subtraction             /    Division
    +    (unary) Plus            **   Raising to power
    -    (unary) Minus

  Integer operators

    //   Integer division        &    Bitwise AND
    %    Remainder               |    Bitwise OR
    <<   Shift left              ^    Bitwise XOR
    >>   Shift right             ~    Bitwise NOT (unary)
    >>>  Signed shift right

  Logical operators (return false=0, true=1)

    = ,==  Equal                 &&   Logical AND = (a<>0) and (b<>0)
    <>,!=  Not equal             ||   Logical OR
    <    Less than               ^^   Logical XOR
    <=   Less or equal           !    Logical NOT (unary)
    >    Greater than
    >=   Greater or equal

  Precedence of operators

    1st (high)   + - ~ !                Unary operators
    2nd          **                     Raising to power
    3rd          * / // %               Multiplying operators
    4th          + -                    Adding operators
    5th          & | ^ && || ^^ << >>   Bitwise and logical operators
    6th (low)    = <> < > <= >=         Relational operators


Standard functions
------------------

  Please refer to Func.txt for the complete list of standard functions
  supported by calculator.

  Note that standard functions are realized by two plug-in libraries
  (see below): StdMath.dlc and StatFunc.dlc, so both plugins must be
  present in the same folder as calculator's executable.


User defined variables and functions
------------------------------------

  a. Variables

  You can define several temporary variables directly at the beginning
  of the input string using the following syntax:

    var1=<value1>, ... , varN=<valueN>, <final_expression>

  After processing variables from left to right the result of the
  final expression will be displayed. Several examples:

    z=1, (z+1/z)/2
    a=3, b=a+1, c=sqrt(a**2+b**2), c
    x=0xAB>>4, x=sqr(x), y=avg(x,x!=0), sum(x,y)


  b. Functions

  User functions can be defined in the same way as variables.
  Just use the full expression syntax shown above with the following
  form of definition:

    func(argument1,...,argumentN)=<expression_with_arguments>

    instead of

    var=<expression>

  Definitions of user variables and functions can be mixed in any
  order. Once a name is defined, it can be used in the next
  definitions. Redefinition of names is allowed. For example, you
  may redefine any of standard functions and symbolic constants.


  Frequently used definitions may be placed into ec_defs.ini text
  file, they will be read at the beginning of definitions processing.
  Variables and functions listed in this file will be defined
  permanently.

  Note:
  As a name of variable, function or function argument you may use
  any identifier that consists of letters ('a'..'z', '_') and digits
  ('0'..'9'); identifier must begin with a letter.


Plug-in functions
-----------------

  Calculator supports additional plug-in libraries of functions in
  the form of DLL modules. Only small part of mathematical functions
  can be realized by function definitions. By programming custom
  plug-in library, you can add to calculator any function in the form
  y=f(x) or y=f(x1,x2,...).

  Look into PlugDoc.zip archive for the sample plug-in source code.
  Example library contains several simple functions:

    fib(n) - Fibonacci numbers;
    gauss(a,d,x) - Gaussian distribution;
    rol(n,count), ror(n,count) - integer cyclic shifts.

  In that archive you will also find the source code of two plugins:
  StdMath and StatFunc, which realize all standard operators and
  functions used in calculator.

  You will need Borland Delphi(tm) compiler to compile all these sources.
  To use compiled DLL module, change its file extension to .dlc, then
  place module into the same folder as calculator's executable. Calculator
  considers all *.dlc files located in its directory as plugins. Note that
  presence of StdMath standard plugin is required.
