~TOP
>Ex 1.36 ¸1994 by J.A.Wrotniak

To choose a topic, type its first letter
or two and press Enter.

>Topics
* characters        * numerical
* conversions       * operators
* data buffer       * plots
* errors            * settings
* expressions       * variables
* functions         
* keyboard
* menu              * registration
?
!DATA BUFFER
>DATA BUFFER
  Operations  on points in the data buf-
fer are performed from the DAT menu:
[Buf] - buffer settings, read/write ops
[Plt] - plot data: histogram or scatter
[Par] - show statistical parameters
[Cmp] - compute points in the buffer
[Edi] - enter data editor
[Pur] - purge points containing bad data
[Inf] - show  max. and current no.of pts
[Clr] - clear buffer
>Topics
* BUF menu   * data points  * parameters
* computing  * editor     
?
#BUF
>BUFFER SETTINGS, READ/WRITE OPS
 From the BUF menu  the following opera-
tions are accessible:
[Rea] - read data from an ASCII file
[Wri] - write data into an ASCII file
[Swp] - swap x# and y# columns
[Edi] - enter data editor
[NPt] - set new current no.of data pts
[Mod] - toggle mode between X and XY
[Clr] - clear buffer
 The [Edi] and [Clr] functions are iden-
tical to those in the DAT menu.
 [Mod]  allows to clear  or retain  data
(if applicable and possible).
.
#EDITOR
>DATA EDITOR

  [Dat|Edi] enters the editor to review,
add, delete and modify data.

- Up and Down arrows, PgUp, PgDn: scroll
- Home:  go to the top
- End:   go to the bottom
- Enter: edit the selected data point
- Del:   delete the selected data point
- Ins:   insert a point before selected
- Esc, F1..F10: exit data editor

  Bad data points are shown as "?".
.
#PARAMETERS
>STATISTICAL PARAMETERS
  [Dat|Par]  computes  and  displays the
sample parameters of data in the buffer:

- nn        number of data points
- mx, my    mean values
- vx, vy    sample variances
- sx, sy    standard deviations
- cov       covariance
- xmi, xmx, ymi, ymx - data ranges

  After these have been computed,  their
symbols can be used  in expressions like
"normal" variables (read-only mode).
.
#COMPUTING
>COMPUTING DATA POINTS
  [Dat|Com],  followed by  a choice from
the  COM  menu,  loops through  all data
points, using  the current expression to
compute all x, bad x, all y or bad y (if
applicable) depending on that choice.
  The variable  after "=" stands for the
point index.   E.g.,  Iý=I  followed  by
[Dat|Com|AlX]  will set every x#i to iý.
  The expression can use other x# and/or
y# values;  the buffer  will be  changed
only when the whole loop is completed.
  If an error  occurs during evaluation,
the current point will be marked as bad.
.
#DATA POINTS
>DATA POINTS
  Depending on mode, a data point is one
or two values (or bad data flags).
  The values can be used in  expressions
as x# or y# followed by an index, e.g.
            x#5+y#(i+j)=z
Here x# and y# behave like functions.
  An error will be reported  if an index
is out of range.
  [Dat|Buf|NPt] will set a new number of
points:  if this is larger than  the old
one, the extra points will be flagged as
bad data; if smaller - the points at the
end will be discarded.
.
!SETTINGS
>SETTINGS
  Settings available from the SET menu:

[Dig] - number of digits displayed
[Deg] - angular mode: deg/rad
[Scl] - autoscroll on/off
[Snd] - sound on/off
[Rsd] - reseeds the random no.generator

  An arrow  pointing to a menu entry in-
dicates (if applicable) the "ON" state.

>Topics
* autoscroll        * digits
?
#DIGITS
>DISPLAYED DIGITS
- [Set|Dig]  allows to set  the  display
  format  by choosing  from the DIG menu
  one of the following:
  - [Res] - Last Result
  - [Var] - Variable Fields
  - [Dat] - Data Window
  - [All] - all the above
- At prompt, enter  either the number of
  significant digits  (e.g."8"),  or the
  no. of digits  shown after the decimal
  point (include the dot, e.g.".6").
- This does not affect the accuracy with
  which the values are stored.
.
#AUTOSCROLL
>AUTOSCROLL

- With autoscroll  enabled by [Set|Scl],
  after  an  expression   evaluation  Ex
  moves to  the next line,  clearing it.
  Line 1 follows the last line.

- No scroll occurs  if an error has been
  detected.

- Enabled autoscroll  is indicated by an
  arrow next to the line number.
.
!FUNCTIONS
>FUNCTIONS
  Functions  accept  one,  two  or three
arguments.  Function  names  have  to be
entered in lowercase.

  The following  groups of functions are
supported:  standard,  conditional (if),
user-defined, Euler and statistical (di-
stributions).  Special kind of functions
are random number generators.
>Topics
* conditional funcs * random generators
* distributions     * standard functions
* Euler functions   * user functions
?
#CONDITIONAL
>CONDITIONAL FUNCTIONS

  With a, b and c being any expressions,
these functions return the value of b or
of c, depending on the sign of a:

 ifp(a,b,c) is b if a>0, otherwise c
 ifn(a,b,c)    b    a<0            c
 ifz(a,b,c)    b    a=0            c

  The discarded argument is not computed
so that  e.g.  ifz(X,1,sin X/X) will not
raise an arithmetic error at X=0.
.
#STANDARD
>STANDARD FUNCTIONS

- One argument:
  abs   int   ent   fra   inv  sgn
  sq    sqr   cu    cur
  sin   cos   tan   cot
  asin  acos  atan  acot
  sinh  cosh  tanh  coth
  asinh acosh atanh acoth
  ln    log   lg2   exp   ten  two

- Two arguments:
  min   max   mod   rou   rad  atn2
  ft    lb
.
#EULER
>EULER FUNCTIONS
  These are Euler functions supported:

- gam(a)    - complete Gamma function
- lgam(a)   - natural logarithm of Gamma
    (accepts larger arguments than gam)
- fac(a)    - factorial = gam(a-1) = a!
- com(a,b)  - combinations (a over b)
- bet(a,b)  - Beta function (complete)
- igam(a,x) - incomplete Gamma function
- ibet(a,b,x) - incomplete Beta function

  Functions fac() and com()  accept also
non-integer arguments.
.
#DISTRIBUTIONS
>STATISTICAL DISTRIBUTION FUNCTIONS
  The probability (or density) functions
are denoted as:

- fgau(x,m,s) - Gaussian (normal)   s>0
- fchi(x,r)   - chi-square          r>0
- fstu(x,r)   - Student (t)         r>0
- fsne(x,r,s) - Snedecor (F)    r>0 s>0
- fpoi(x,m)   - Poisson             m>0
- fbin(x,n,p) - binomial      0<p<1 n>0
- fgam(x,a)   - Gamma               a>0
- fbet(x,a,b) - Beta            a>0 b>0
>Topics
* types (of distribution functions)
?
$TYPES
>TYPES OF DISTRIBUTION FUNCTIONS
  For  the supported  distributions  the
following function types are available:

- Probability  density  (or probability)
  denoted with "f", like in the previous
  screen, e.g. fchi(X,R)
- Left  probability  integral  (or sum),
  "p", i.e. P(<=x), e.g. pgau(X,M,S)
- Central probability integral (Gaussian
  and Student only), "a", e.g. astu(x,r)
- Functions inverse to  integrals, shown
  as "ip", "iq" and "ia".   For example,
  if pchi(x,r)=p then ipchi(p,r)=x.
.
#USER FUNCTIONS
>USER FUNCTIONS
- [Usr|Def]  defines the current line as
  a user function, chosen from a menu.
- The variable after "=" is treated as a
  dummy  function argument;  it will not
  be affected  by function calls.  Other
  variables can be used as parameters.
- A user function  may refer  to others,
  but not to itself (directly or not).
- [Usr|Ren] renames a user function. The
  new name must be unique, 2 to 5 chars.
- [Usr|Rcl]  recalls  a user function to
  the Expression Line.
- [Usr|Del] deletes a user function.
.
#RANDOM
>RANDOM NUMBER GENERATORS

  Three  random  number  generators  are
provided, to be used as functions:

- ran(a,b) - from a uniform distribution
  over the interval (a,b)
- vgau(m,s) - from a Normal distribution
  with mean m and standard deviation s
- vpoi(m) - from a  Poisson distribution
  with mean value m

  Re-seeding the generators is done with
[Set|Rsd].
.
!CHARACTERS
>SPECIAL CHARACTERS
  Special  characters  are  entered with
use of the ALT key:

 ALT+p - enters  (pi)
 ALT+e -         (Euler's e)
 ALT+2 -        ý (square)
 ALT+3 -        ü (cube)
 ALT+d -        ø (degrees)
 ALT+m -        ' (minutes)
 ALS+s -        " (seconds)

  (In last two cases, a single or double
apostrophe may also be used.)
.
!CONVERSIONS
>CONVERSIONS
  Options available from the CON Menu:
[Ft]  - show the current result as feet/
        inches/fraction
[Lb]  - ...as pounds/ounces/fraction
[Fra] - ..as whole part and fraction
[Dms] - ..as degrees/minutes/seconds
[Uni] - convert it between units
[Rou] - round it to the nearest fraction
        with a given denominator.
  [Uni], [Rou]  modify the result varia-
ble; others only change display format.
>Topics
* angles            * units
?
#ANGLES
>ANGLE CONVERSIONS

- A value  entered  as degrees,  minutes
  and seconds  (using ø,' and ") will be
  translated to radians  or degrees, de-
  pending on the current angular mode.

- [Con|Dms] will display the last result
  in degrees, minutes and seconds trans-
  lated  from  radians  or from  degrees
  (depending on the current mode).
  The value itself will not be changed.
.
#UNITS
>UNIT CONVERSION
  [Con|Uni]  converts the current result
from one measurement unit to another.
  A sequence  of three pop-up menus will
query for the following information:
 - The quantity to convert (e.g. volume)
 - Units to convert from (e.g. gallons)
 - Units to convert to (e.g. liters)
  Inside a pop-up menu use arrow keys to
move around,  Return  to select,  Esc or
or F10 to abandon the operation.

  The conversion  result  will be stored
back in the result variable.
.
!ERRORS
>ERRORS
* Syntax errors  bring an error message,
  with cursor positioned at the error.
* If file  EX.ERR is found,  then also a
  brief error description will be given.
* Calculation  errors  (e.g. division by
  zero) cause a similar effect,  but the
  function  or operator where  the error
  occured will also be shown.
* Common reason: variables w/o value.
* The largest  absolute expression value
  is  9.99E999,  otherwise  an  overflow
  error will be reported.
* To remove the message, press any key.
.
!EXPRESSIONS
>ARITHMETIC EXPRESSIONS
  Typing "Expression=Variable" and pres-
sing Enter, like in
           2*log(8.5+A)=Y
computes the expression value and stores
it in Variable (here: in Y). If Variable
is not specified, @ will be assumed.

  Other operations on expressions,  like
integration or plotting, are also possi-
ble (see PLOTS, NUMERICAL).  In such ca-
ses Variable defines function argument.
>Topics
* examples          * syntax
?
#SYNTAX
>EXPRESSION SYNTAX
- A * can be skipped  between x and y if
  - x is  a constant,  variable, postfix
    operator (ý,ü,!) or a ")", and
  - y is a variable, function or a "(".
  This multiplication shows as "ú".
- Operation priority:
  - low:    +, -
  - medium: *, /
  - high:   ^, ú, ý, ü, !, functions
- ^,ú and  functions  execute from right
  to left, all others from left to right
- ^,ú,ý,ü and !  cannot be used  after a
  function argument in parentheses.
.
#EXAMPLES
>EXAMPLES OF EXPRESSIONS
 10/2+3.5*2       gives 12
 2+3)*(4+5        gives 45
 sqr 16+sq(2+2)   gives 20
 inv 5A           means inv(5*A)
 inv 5*A          means (inv 5)*A
 2^3^4            means 2^(3^4)
 ln 2A^3          means ln(2*(A^3))
 ln 5!ý           means ln((5!)ý)
 exp 2X ln A      means exp(2*X*ln(A))
 exp 2X*ln A      means exp(2*X)*ln(A)
 2e-3+X           means .002+X
 2 e-3+X          means 2*E-3+X
 2e -3+X          means 2*E-3+X
.
!MENU
>MENU
  The menu at the bottom contains mnemo-
nics for the ten function keys.  Some of
these keys bring up other menus.

- The F1 key  is always marked  with the
  current menu name (in caps, e.g. TOP).
- In any menu, pressing the F1 key calls
  the on-line help.
- F10  backs up  to the  previous  menu,
  except  in  TOP,  where it  exits  the
  program).
>Topics
* Top
?
#TOP
>THE TOP MENU
  The  TOP  menu  invokes  the following
operations:

[Set] - switch to the settings menu
[Plt] - switch to the plot menu
[Num] - switch to the numeric ops menu
[Dat] - switch to the data buffer menu
[Con] - switch to the conversion menu
[Usr] - define or show a user function
[Clr] - switch to the clear menu
[Exit]- save status, leave the program
.
!PLOTS
>PLOTS
  The PLT menu does the following:
[Sho] - show plot screen (if any)
[Plt] - plot the current expression line
        (erasing the old plot screen)
[Add] - plot  current line, adding it to
        the plot screen (w/o erasing)
[Axs] - axis visibility on/off
[Grd] - grid visibility on/off
[Acc] - high plot accuracy on/off
[LgX] - log X scale on/off
[LgY] - log Y scale on/off
  To interrupt plotting,  press any key.
Press any key to exit (F10 w/o saving).
.
!VARIABLES
>VARIABLES
- Variables  A..Z  and  @  (default) are
  used to store calculation results and/
  or as elements of expressions.
- Variable  specified after "="  is used
  - in expression  evalulation: to store
    the result
  - in user  function definition  and in
    plotting: as the argument (dummy)
  - in integration,  differentiation and
    finding zeros: as either of those
- Read-only:  (pi) and  (Euler's e)
- Accuracy: 18  decimal digits
- Absolute range: 1E1000.
.
!KEYBOARD
>KEYBOARD
- During Expression Line entry:
  - Enter  computes the current line
  - Arrows move cursor or scroll lines
  - Tab    checks syntax, reformat line
  - Esc    clears  the line  (storing it
           in a buffer);  if the line is
           empty,  it will  be  restored
           from the buffer
  - Ins    swaps the line with buffer
- Shift+F10 exits program w/o saving
- At any prompt Esc clears input (or, if
  empty, just exits), the original F-key
  proceeds with the operation.
.
!NUMERICAL
>NUMERICAL OPERATIONS
  These  operations  are applied  to the
current expression line treated as f(x),
with the variable after  "=" used as the
function argument.

* [Num|Sum]  finds  sum  of  f(x) with x
  stepping by dx from x1 to x2
* [Num|Der] - a derivative of f(x) at x0
* [Num|Int]  finds  an integral  of f(x)
  over (x1,x2) with accuracy dx
* [Num|Zer] - a zero of f(x)  in (x1,x2)
  with accuracy dx; needs f(x1)*f(x2)<0
To break any of the above, press a key.
.
!OPERATORS
>OPERATORS

* Infix (binary) operators stand between
  their arguments: +, -, *, /, ^ (power)

* Postfix operators follow  their single
  operands:  ! (factorial),  ý (square),
  ü (cube), like in Aý+Bý

* A "-" can also be used as a unary pre-
  fix operator, e.g. abs(-2.5X+3)
.
!REGISTRATION
>REGISTRATION AND SUPPORT
  Ex is shareware:  if you keep  and use
it, send a fee of $30 to the author:
     Dr. J. Andrzej Wrotniak
     2057 Happy Lane
     Crofton, MD 21114-1917
  You will receive an upgrade to the "R"
(registered)  version  on a  3.5"  disk,
with  a number of  enhanced  features, a
setup program and extra documentation.
  Comments,  questions,  suggestions and
problem  reports are  welcome and can be
also forwarded by e-mail:
  GEnie: J.WROTNIAK    CIS: 46511,2552
.
~