EV(1)                                                                    EV(1)



NNAAMMEE
       ev - evaluate expressions

SSYYNNOOPPSSIISS
       eevv ''eexxpprr'' ....

DDEESSCCRRIIPPTTIIOONN
       _E_v  evaluates  expressions  given  on  the  command line, and sends the
       results to the standard output, one per line.  An  expression  contains
       real numbers, function calls, and the following operators:

            +  -  *  /  ^

       Operators are evaluated left to right, except '^', which is right asso-
       ciative.  Powers have the highest precedence; multiplication and  divi-
       sion are evaluated before addition and subtraction.  Expressions can be
       grouped with parentheses.  All values are double precision real.

       The following library of functions is available:

       iiff((ccoonndd,, tthheenn,, eellssee))
                 if cond is greater than zero, then  is  evaluated,  otherwise
                 else is evaluated.

       sseelleecctt((NN,, aa11,, aa22,, ....))
                 return  aN  (N  is  rounded to the nearest integer).  If _N is
                 zero, the number of available arguments is returned.

       rraanndd((xx))   compute a random number between 0 and 1 based on x.

       fflloooorr((xx))  return largest integer not greater than x.

       cceeiill((xx))   return smallest integer not less than x.

       ssqqrrtt((xx))   return square root of x.

       eexxpp((xx))    compute e to the power of x (e approx = 2.718281828).

       lloogg((xx))    compute the logarithm of x to the base e.

       lloogg1100((xx))  compute the logarithm of x to the base 10.

       ssiinn((xx)),, ccooss((xx)),, ttaann((xx))
                 trigonometric functions.

       aassiinn((xx)),, aaccooss((xx)),, aattaann((xx))
                 inverse trigonometric functions.

       aattaann22((yy,, xx))
                 inverse tangent of y/x (range -pi to pi).

EEXXAAMMPPLLEE
       To pass the square root of two and the sine of .5 to a program:

         program `ev 'sqrt(2)' 'sin(.5)'`

AAUUTTHHOORR
       Greg Ward

SSEEEE AALLSSOO
       icalc(1), rcalc(1)



RADIANCE                           10/28/96                              EV(1)
