*** INTRODUCTION TO INTRINSIC PROCEDURES
 CATEGORY
 --------
 There are eight intrinsic procedure categories:
  (Array  ) -- operates on DIMENSION containers
  (Bit    ) -- perform bit operations
  (Char   ) -- operates on CHARACTER containers
  (Float  ) -- perform floating-point operations
  (Math   ) -- perform mathematical operations
  (Misc   ) -- miscellaneous
  (Numeric) -- perform numerical operations
  (Subr   ) -- a subroutine instead of a function

 CLASS
 -----
 Each intrinsic function or subroutine (referred to as
 intrinsic procedures) is in one of four classes:
     o  Elemental function.
     o  Transformational function.
     o  Inquiry function.
     o  Subroutine.
 An "elemental" function can be passed arrays as well as
  scalars.
 A "transformational" function is not "elemental" and
  usually returns results that have a different shape from
  the arguments.  In other words, the result is a
  transformation of the arguments.
 An "inquiry" function will answer an inquiry about
  its argument.
 A "subroutine" is referenced in a CALL statement as
  compared to a function which is referenced in an
  expression.

 KIND VALUES
 -----------
 Some of the intrinsic procedure examples use type kind
 parameters for which the following assumptions are made:
 1. The default real type has eight decimal digits of
    precision.
 2. The value of the integer named contant HIGH is a kind
    parameter value for a real data type with 14 decimal
    digits of precision and an exponent range of at least
    100.
 3. The value of the integer named contant SHORT is a kind
    parameter value for an integer data type with eight
    bits to represent integer values, that is, s in the
    bit model for this integer type is 8.

 REAL VALUES
 -----------
 All real values cannot be represented exactly in any
 processor; therefore, when the following description says
 something like
   acos(0.1_HIGH) has the value 1.4706289056333
 it means that the value is a processor approximation to
 1.4706289056333.

 REFERENCES
 ----------
 Many of the words found in the intrinsic procedures
 section of F_world come directly from

   ISO 1539 : 1991, Fortran Standard

***abs 13.13.1  ABS (A)
ABS (A)

  DESCRIPTION.  Absolute value.

  CLASS.  Elemental function.

  ARGUMENT.  A must be of type integer, real, or complex.

  RESULT TYPE AND TYPE PARAMETER.  The same as A except
  that if A is complex, the result is real.

  RESULT VALUE.  If A is of type integer or real, the
  value of the result is |A|; if A is complex with value
  (x, y), the result is equal to a processor-dependent
  approximation to sqrt((x**2)+(y**2))

  EXAMPLES.
  abs(-1) has the value 1.
  abs(-1.5) has the value 1.5.
  abs((3.0,4.0)) has the value 5.0.

***acos 13.13.3  ACOS (X)
ACOS (X)

  DESCRIPTION.  Arccosine (inverse cosine) function.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real with a value that
  satisfies the inequality |X| <= 1.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a
  processor-dependent approximation to arccos(X),
  expressed in radians.
  It lies in the range 0 <= ACOS (X) <= [pi].

  EXAMPLES.
  acos(0.54030231) has the value 1.0.
  acos(0.1_HIGH) has the value 1.4706289056333_HIGH.

***adjustl 13.13.4  ADJUSTL (STRING)
ADJUSTL (STRING)

  DESCRIPTION.  Adjust to the left, removing leading
  blanks and inserting trailing blanks.

  CLASS.  Elemental function.

  ARGUMENT.  STRING must be of type character.

  RESULT TYPE.  Character of the same length as STRING.

  RESULT VALUE.  The value of the result is the same as
  STRING except that any leading blanks have been deleted
  and the same number of trailing blanks have been
  inserted.

  EXAMPLES.
  adjustl("  WORD") has the value "WORD  ".
  adjustl("A WORD") has the value "A WORD".

***adjustr 13.13.5  ADJUSTR (STRING)
ADJUSTR (STRING)

  DESCRIPTION.  Adjust to the right, removing trailing
  blanks and inserting leading blanks.

  CLASS.  Elemental function.

  ARGUMENT.  STRING must be of type character.

  RESULT TYPE.  Character of the same length as STRING.

  RESULT VALUE.  The value of the result is the same as
  STRING except that any trailing blanks have been deleted
  and the same number of leading blanks have been
  inserted.

  EXAMPLES.
  adjustr("WORD  ") has the value "  WORD".
  adjustr("WORD 2") has the value "WORD 2".

***aimag 13.13.6  AIMAG (Z)
AIMAG (Z)

  DESCRIPTION.  Imaginary part of a complex number.

  CLASS.  Elemental function.

  ARGUMENT.  Z must be of type complex.

  RESULT TYPE AND TYPE PARAMETER.  Real with the same kind
  type parameter as Z.

  RESULT VALUE.  If Z has the value (x, y),
  the result has value y.

  EXAMPLES.
  aimag((2.0,3.0)) has the value 3.0.
  aimag((2.0_HIGH,3.0_HIGH)) has the value 3.0_HIGH

***aint 13.13.7  AINT (A, KIND)
AINT (A [, KIND])

  OPTIONAL ARGUMENT.  KIND

  DESCRIPTION.  Truncation to a whole number.

  CLASS.  Elemental function.

  ARGUMENTS.

  A must be of type real.

  KIND (optional) must be a scalar integer named constant.

  RESULT TYPE AND TYPE PARAMETER.  The result is of type
  real.  If KIND is present, the kind type parameter is
  that specified by KIND; otherwise, the kind type
  parameter is that of A.

  RESULT VALUE.  If |A| < 1, AINT (A) has the value 0;
  if |A| >= 1, AINT (A) has a value equal to the integer
  whose magnitude is the largest integer that does not
  exceed the magnitude of A and whose sign is the same as
  the sign of A.

  EXAMPLES.
  aint(2.783) has the value 2.0.
  aint(-2.783) has the value -2.0.
  aint(2.123_HIGH) has the value 2.0_HIGH.
  aint(2.123,HIGH) has the value 2.0_HIGH.

***all 13.13.8  ALL (MASK, DIM)
ALL (MASK [, DIM])

  OPTIONAL ARGUMENT.  DIM

  DESCRIPTION.  Determine whether all values are true in
  MASK along dimension DIM.

  CLASS.  Transformational function.

  ARGUMENTS.

  MASK must be of type logical.  It must not be scalar.

  DIM (optional) must be scalar and of type integer with
  value in the range 1 <= DIM <= n,  where n is the rank
  of MASK.  The corresponding actual argument must not be
  an optional dummy argument.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  of type logical with the same kind type parameter as
  MASK.  It is scalar if DIM is absent or MASK has rank
  one; otherwise, the result is an array of rank n-1 and
  of shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn)
     where (d1, d2, ..., dn) is the shape of MASK.

  RESULT VALUE.

  Case (i):  The result of all(MASK) has the value true if
  all elements of MASK are true or if MASK has size zero,
  and the result has value false if any element of MASK is
  false.

  Case (ii):  If MASK has rank one, all(MASK, DIM) has a
  value equal to that of all(MASK).  Otherwise, the value
  of element (s1, s2, ..., sDIM-1, sDIM+1, ..., sn) of
  all(MASK, DIM) is equal to
     all(MASK(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn)).

  EXAMPLES.

  Case (i):  The value of all((/.true., 1 > 2, .true./))
  is false.  The value of all((/.true., 2 > 1, .true./))
  is true.

  Case (ii):  If B is the array
                 1  3  5
                 2  4  6
              and C is the array
                 0  3  5
                 7  4  8
       all(B /= C, DIM=1) is (true, false, false) and
       all(B /= C, DIM=2) is (false, false)

***allocated 13.13.9  ALLOCATED (ARRAY)
ALLOCATED (ARRAY)

  DESCRIPTION.  Indicate whether or not an allocatable
  array is currently allocated.

  CLASS.  Inquiry function.

  ARGUMENT.  ARRAY must be an allocatable array.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.
  Default logical scalar.

  RESULT VALUE.  The result has the value true if ARRAY is
  currently allocated and has the value false if ARRAY is
  not currently allocated.  The result is undefined if the
  allocation status of the array is undefined.

  EXAMPLE.

  The following statements

   integer, allocatable :: square(:,:)
   integer :: square_side
    print *, "Enter the size of one side of your square:"
    read *, square_side
    allocate(square(square_side,square_side))
    print *, allocated(square)

  will print
   T

***anint 13.13.10  ANINT (A, KIND)
ANINT (A [, KIND])

  OPTIONAL ARGUMENT.  KIND

  DESCRIPTION.  Nearest whole number.

  CLASS.  Elemental function.

  ARGUMENTS.

  A must be of type real.

  KIND (optional) must be a scalar integer named constant.

  RESULT TYPE AND TYPE PARAMETER.  The result is of type
  real.  If KIND is present, the kind type parameter is
  that specified by KIND; otherwise, the kind type
  parameter is that of A.

  RESULT VALUE.
  If A > 0, anint(A) has the value aint(A + 0.5);
  if A <= 0, anint(A) has the value aint(A - 0.5).

  EXAMPLES.
  anint(2.783) has the value 3.0.
  anint(-2.783) has the value -3.0.
  anint(-2.7_HIGH) has the value -3.0_HIGH.

***any 13.13.11  ANY (MASK, DIM)
ANY (MASK [, DIM])

  OPTIONAL ARGUMENT.  DIM

  DESCRIPTION.  Determine whether any value is true in
  MASK along dimension DIM.

  CLASS.  Transformational function.

  ARGUMENTS.

  MASK must be of type logical.  It must not be scalar.

  DIM (optional) must be scalar and of type integer with a
  value in the range 1 <= DIM <= n, where n is the rank of
  MASK.  The corresponding actual argument must not be an
  optional dummy argument.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  of type logical with the same kind type parameter as
  MASK.  It is scalar if DIM is absent or MASK has rank
  one; otherwise, the result is an array of rank n-1 and
  of shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn)
     where (d1, d2, ..., dn) is the shape of MASK.

  RESULT VALUE.

  Case (i):  The result of any(MASK) has the value true if
  any element of MASK is true and has the value false if
  no elements are true or if MASK has size zero.

  Case (ii):  If MASK has rank one, any(MASK, DIM) has a
  value equal to that of any(MASK).  Otherwise, the value
  of element (s1, s2, ..., sDIM-1, sDIM+1, ..., sn) of
  any(MASK, DIM) is equal to
    any(MASK (s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn)).

  EXAMPLES.

  Case (i):  The value of any((/.false., 1 > 2, .false./))
  is false.  The value of any((/.false., 2 > 1, .false./))
  is true.

  Case (ii):  If B is the array
                 1  3  5
                 2  4  6
              and C is the array
                 0  3  5
                 7  4  8
       any(B /= C, DIM=1) is (true, false, true) and
       any(B /= C, DIM=2) is (true, true)

***asin 13.13.12  ASIN (X)
ASIN (X)

  DESCRIPTION.  Arcsine (inverse sine) function.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real.  Its value must
  satisfy the inequality |X| <= 1.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a
  processor-dependent approximation to arcsin(X),
  expressed in radians.  It lies in the range
  -[pi]/2 <= asin(X) <= [pi]/2.

  EXAMPLES.
  asin(0.84147098) has the value 1.0.
  asin(1.0_HIGH) has the value 1.5707963267949_HIGH.

***associated 13.13.13  ASSOCIATED (POINTER, TARGET)
ASSOCIATED (POINTER [, TARGET])

  OPTIONAL ARGUMENT.  TARGET

  DESCRIPTION.  Returns the association status of its
  pointer argument or indicates if the pointer is
  associated with the target.

  CLASS.  Inquiry function.

  ARGUMENTS.

  POINTER must be a pointer and may be of any type.  Its
  pointer association status must not be undefined.

  TARGET (optional) must be a pointer or target.  If it is
  a pointer, its pointer association status must not be
  undefined.

  RESULT TYPE.
  The result is of type default logical scalar.

  RESULT VALUE.

  Case (i):  If TARGET is absent, the result is true if
  POINTER is currently associated with a target and false
  if it is not.

  Case (ii):  If TARGET is present and is a target, the
  result is true if TARGET does not have size zero and
  POINTER is currently associated with TARGET.  Otherwise,
  the result is false.

  Case (iii):  If TARGET is present and is a pointer, the
  result is true if both POINTER and TARGET are currently
  associated with the same nonzero-sized target.
  Otherwise, the result is false.

  EXAMPLES.

  Case (i):  associated(PTR) is true if PTR is currently
  associated with a target.

  Case (ii): associated (PTR, TAR) is true after:

     real, pointer, dimension(:) :: PTR
     real, target, dimension(0:100) :: TAR
      PTR => TAR

  The subscript range for PTR is 0:100.

  If the pointer assignment statement is either
      PTR => TAR(:)
  or
      PTR => TAR(0:100)
  associated(PTR, TAR) is still true, but the
  subscript range for PTR is 1:101.

  If the pointer assignment statement is
      PTR => TAR(0:99)
  associated(PTR, TAR) is false because
  TAR(0:99) is not the same as TAR.

  Case (iii): associated (PTR1, PTR2) is true after:

     real, pointer, dimension(:) :: PTR1, PTR2
     allocate(PTR1(0:10))
     PTR2 => PTR1

  After the run of either statement
      nullify(PTR1)
  or
      nullify(PTR2)
  associated(PTR1, PTR2) is false.

***atan 13.13.14  ATAN (X)
ATAN (X)

  DESCRIPTION.  Arctangent (inverse tangent) function.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a
  processor-dependent approximation to arctan(X),
  expressed in radians, that lies in the range
   -[pi]/2 <= atan(X) <= [pi]/2.

  EXAMPLES.
  atan(1.5574077) has the value 1.0.
  atan(2.0_HIGH/3.0) has the value 0.58800260354757_HIGH

***atan2 13.13.15  ATAN2 (Y, X)
ATAN2 (Y, X)

  DESCRIPTION.  Arctangent (inverse tangent) function.
  The result is the principal value of the argument of
  the nonzero complex number (X,Y).

  CLASS.  Elemental function.

  ARGUMENTS.

  Y must be of type real.

  X must be of the same type and kind type parameter as Y.
  If Y has the value zero, X must not have the value zero.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a
  processor-dependent approximation to the principal value
  of the argument of the complex number (X,Y), expressed
  in radians.  It lies in the range
   -[pi] < atan2(Y,X) <= [pi]
  and is equal to a processor-dependent approximation to a
  value of arctan(Y/X) if X /= 0.
  If Y > 0, the result is positive.
  If Y = 0, the result is
   zero if X > 0 and the result is
   [pi] if X < 0.
  If Y < 0, the result is negative.
  If X = 0, the absolute value of the result is [pi]/2.

  EXAMPLES.
  atan2(1.5574077, 1.0) has the value 1.0.

  If Y has the value
        1  1
       -1 -1
  and X has the value
       -1  1
       -1  1
  the value of atan2(X,Y) is
        3[pi]/4   [pi]/4
       -3[pi]/4  -[pi]/4

***bit_size 13.13.16  BIT_SIZE (I)
 The below definition of the bit data type model is
 referenced in many of the intrinsic procedures.

 MODEL FOR BIT MANIPULATION AND INQUIRY PROCEDURES

 The bit manipulation procedures consist of a set of ten
 functions and one subroutine.  Logical operations on bits
 are provided by the functions IOR, IAND, NOT, and IEOR;
 shift operations are provided by the functions ISHFT and
 ISHFTC; bit subfields may be referenced by the function
 IBITS and by the subroutine MVBITS; single-bit processing
 is provided by the functions BTEST, IBSET, and IBCLR.

 For the purposes of these procedures, a bit is defined to
 be a binary digit w located at position k of a
 nonnegative integer scalar object based on a model
 nonnegative integer defined by

                   s - 1
        j  =      [SIGMA] wk * (2**k)
                   k = 0

 and for which wk may have the value 0 or 1.

 An inquiry function BIT_SIZE is available to determine
 the parameter s of the model.  The value of the argument
 of this function need not be defined.  It is not
 necessary for a processor to evaluate the argument of
 this function if the value of the function can be
 determined otherwise.

 Effectively, this model defines an integer object to
 consist of s bits in sequence numbered from right to left
 from 0 to s - 1.  This model is valid only in the context
 of the use of such an object as the argument or result of
 one of the bit manipulation procedures.
 ---------------------------------------------------------
BIT_SIZE (I)

  DESCRIPTION.  Returns the number of bits s, defined by
  the above model, for integers with the kind parameter of
  the argument.

  CLASS.  Inquiry function.

  ARGUMENT.  I must be of type integer.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  Scalar integer
  with the same kind type parameter as I.

  RESULT VALUE.  The result has the value of the number of
  bits s in the model integer defined for bit manipulation
  contexts defined above.

  EXAMPLES.
  bit_size(1) is 32 if s in the model is 32.
  bit_size(1_SHORT) is 8_SHORT.

***btest 13.13.17  BTEST (I, POS)
BTEST (I, POS)

  DESCRIPTION.  Tests a bit of an integer value.

  CLASS.  Elemental function.

  ARGUMENTS.

  I must be of type integer.

  POS must be of type integer.  It must be nonnegative and
  be less than bit_size(I).

  RESULT TYPE.  The result is of type default logical.

  RESULT VALUE.  The result has the value true if bit POS
  of I has the value 1 and has the value false if bit POS
  of I has the value 0.  The model for the interpretation
  of an integer value as a sequence of bits is in the
  description (MODEL FOR BIT MANIPULATION AND INQUIRY
  PROCEDURES) found in the BIT_SIZE intrinsic procedure.

  EXAMPLES.
  btest(8,3) has the value true.
  btest(8_SHORT,3) has the value true.
  If A has the value
        1  2
        3  4
  the value of btest(A,2) is
      false  false
      false  true
  and the value of btest(2,A) is
      true   false
      false  false

***ceiling 13.13.18  CEILING (A)
CEILING (A)

  DESCRIPTION.  Returns the least integer greater than or
  equal to its argument.

  CLASS.  Elemental function.

  ARGUMENT.  A must be of type real.

  RESULT TYPE AND TYPE PARAMETER.  Default integer.

  RESULT VALUE.  The result has a value equal to the least
  integer greater than or equal to A.  The result is
  undefined if the processor cannot represent this value
  in the default integer type.

  EXAMPLES.
  ceiling(3.7) has the value 4.
  ceiling(-3.7) has the value -3.
  ceiling(20.0_HIGH/3) has the value 7.

***char 13.13.19  CHAR (I)
CHAR (I)

  DESCRIPTION.  Returns the character in a given position
  of the ASCII collating sequence.  It is the inverse of
  the function ICHAR.

  CLASS.  Elemental function.

  ARGUMENT.  I must be of type integer with a value in the
  range 0 <= I <= n-1, where n is the number of characters
  in the ASCII collating sequence.

  RESULT TYPE AND TYPE PARAMETER. Character of length one.

  RESULT VALUE.  The result is the character in position I
  of the ASCII collating sequence.  ichar(char(I)) has the
  value I for 0 <= I <= n-1 and char(ichar(C)) has the
  value C for any character C capable of representation in
  ASCII.

  EXAMPLE.
  char(88) has the value "X".

***cmplx 13.13.20  CMPLX (X, Y, KIND)
CMPLX (X [, Y][, KIND])

  OPTIONAL ARGUMENTS.  Y, KIND

  DESCRIPTION.  Convert to complex type.

  CLASS.  Elemental function.

  ARGUMENTS.

  X must be of type integer, real, or complex.

  Y (optional) must be of type integer or real.
  It must not be present if X is of type complex.

  KIND (optional) must be a scalar integer named constant.

  RESULT TYPE AND TYPE PARAMETER.  The result is of type
  complex.  If KIND is present, the kind type parameter is
  that specified by KIND; otherwise, the kind type
  parameter is that of default real type.

  RESULT VALUE.  If Y is absent and X is not complex, it
  is as if Y were present with the value zero.  If Y is
  absent and X is complex, it is as if Y were present with
  the value aimag(X).  cmplx(X,Y,KIND) has the complex
  value whose real part is real(X,KIND) and whose
  imaginary part is real(Y,KIND).

  EXAMPLES.
  cmplx(-3) has the value (-3.0,0.0).
  cmplx(4.1,KIND=HIGH) has the value (4.1_HIGH,0.0_HIGH).
  cmplx((4.1,0.0),KIND=HIGH)) also has the value
                                     (4.1_HIGH,0.0_HIGH).

***conjg 13.13.21  CONJG (Z)
CONJG (Z)

  DESCRIPTION.  Conjugate of a complex number.

  CLASS.  Elemental function.

  ARGUMENT.  Z must be of type complex.

  RESULT TYPE AND TYPE PARAMETER.  Same as Z.

  RESULT VALUE.  If Z has the value (x,y),
  the result has the value (x,-y).

  EXAMPLE.
  conjg((2.0,3.0)) has the value (2.0,-3.0).

***cos 13.13.22  COS (X)
COS (X)

  DESCRIPTION.  Cosine function.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real or complex.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a
  processor-dependent approximation to cos(X).  If X is of
  type real, it is regarded as a value in radians.  If X
  is of type complex, its real part is regarded as a value
  in radians.

  EXAMPLE.
  cos(1.0) has the value 0.54030231.
  cos((1.0_HIGH,1.0_HIGH)) has the value
   (0.83373002513115_HIGH,-0.98889770576287_HIGH).

***cosh 13.13.23  COSH (X)
COSH (X)

  DESCRIPTION.  Hyperbolic cosine function.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a
  processor-dependent approximation to cosh(X).

  EXAMPLES.
  cosh(1.0) has the value 1.5430806.
  cosh(0.1_HIGH) has the value 1.0050041680558_HIGH.

***count 13.13.24  COUNT (MASK, DIM)
COUNT (MASK [, DIM])

  OPTIONAL ARGUMENT.  DIM

  DESCRIPTION.  Count the number of true elements of MASK
  along dimension DIM.

  CLASS.  Transformational function.

  ARGUMENTS.

  MASK must be of type logical.  It must not be scalar.

  DIM (optional) must be scalar and of type integer with a
  value in the range 1 <= DIM <= n, where n is the rank of
  MASK.  The corresponding actual argument must not be an
  optional dummy argument.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  of type default integer.  It is scalar if DIM is absent
  or MASK has rank one; otherwise, the result is an array
  of rank n-1 and of
  shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn)
  where (d1, d2, ..., dn) is the shape of MASK.

  RESULT VALUE.

  Case (i):  The result of count(MASK) has a value equal
  to the number of true elements of MASK or has the value
  zero if MASK has size zero.

  Case (ii): If MASK has rank one, count(MASK, DIM) has a
  value equal to that of count(MASK).  Otherwise, the
  value of element (s1, s2, ..., sDIM-1, sDIM+1, ..., sn)
  of count(MASK, DIM) is equal to
  count(MASK (s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn)).

  EXAMPLES.

  Case (i):  The value of count((/.true., .false./)) is 1.

  Case (ii):  If B is the array
        1  3  5
        2  4  6
  and C is the array
        0  3  5
        7  4  8
  the value of count(B/=C, DIM=1) is
        2  0  1
  and the value of count(B/=C, DIM=2) is
        1  2

***cshift 13.13.25  CSHIFT (ARRAY, SHIFT, DIM)
CSHIFT (ARRAY, SHIFT [, DIM])

  OPTIONAL ARGUMENT.  DIM

  DESCRIPTION.  Perform a circular shift on an array
  expression of rank one or perform circular shifts on all
  the complete rank one sections along a given dimension
  of an array expression of rank two or greater.  Elements
  shifted out at one end of a section are shifted in at
  the other end.  Different sections may be shifted by
  different amounts and in different directions.

  CLASS.  Transformational function.

  ARGUMENTS.

  ARRAY may be of any type.  It must not be scalar.

  SHIFT must be of type integer and must be scalar if
  ARRAY has rank one; otherwise, it must be scalar or of
  rank n-1 and of
  shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn)
  where (d1, d2, ..., dn) is the shape of ARRAY.

  DIM (optional) must be a scalar and of type integer with
  a value in the range 1 <= DIM <= n, where n is the rank
  of ARRAY.  If DIM is omitted, it is as if it were
  present with the value 1.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  of the type and type parameters of ARRAY, and has the
  shape of ARRAY.

  RESULT VALUE.

  Case (i):  If ARRAY has rank one, element i of the
  result is ARRAY(1 + modulo(i + SHIFT - 1, size(ARRAY))).

  Case (ii):  If ARRAY has rank greater than one, section
  (s1, s2, ..., sDIM-1, :, sDIM+1, ...., sn) of the result
  has a value equal to cshift(ARRAY
  (s1, s2, ..., sDIM-1, :, sDIM+1, ...., sn), sh, 1),
  where sh is SHIFT or
  SHIFT(s1, s2, ..., sDIM-1, sDIM+1, ..., sn).

  EXAMPLES.

  Case (i):  If V is the array
        1  2  3  4  5  6
  the effect of shifting V circularly to the left by two
  positions is achieved by cshift(V, SHIFT=2) which has
  the value
        3  4  5  6  1  2
  cshift(V, SHIFT=-2) achieves a circular shift to the
  right by two positions and has the value
        5  6  1  2  3  4

  Case (ii):  The rows of an array of rank two may all be
  shifted by the same amount or by different amounts.  If
  M is the array
        1  2  3
        4  5  6
        7  8  9
  the value of cshift(M, SHIFT=-1, DIM=2) is
        3  1  2
        6  4  5
        9  7  8
  and the value of cshift(M, SHIFT=(/-1,1,0/), DIM=2) is
        3  1  2
        5  6  4
        7  8  9

***date_and_time 13.13.26  DATE_AND_TIME (DATE, TIME, ZONE, VALUES)
DATE_AND_TIME ([DATE] [, TIME] [, ZONE] [, VALUES])

  OPTIONAL ARGUMENTS.  DATE, TIME, ZONE, VALUES

  DESCRIPTION.  Returns data on the real-time clock and
  date in a form compatible with the representations
  defined in ISO 8601:1988.

  CLASS.  Subroutine.

  ARGUMENTS.

  DATE (optional) must be scalar and of type character,
  and must be of length at least 8 in order to contain the
  complete value.  It is an intent(out) argument.  Its
  leftmost 8 characters are set to a value of the form
  CCYYMMDD, where CC is the century, YY the year within
  the century, MM the month within the year, and DD the
  day within the month.  If there is no date available,
  they are set to blank.

  TIME (optional) must be scalar and of type character,
  and must be of length at least 10 in order to contain
  the complete value.  It is an intent(out) argument.  Its
  leftmost 10 characters are set to a value of the form
  hhmmss.sss, where hh is the hour of the day, mm is the
  minutes of the hour, and ss.sss is the seconds and
  milliseconds of the minute.  If there is no clock
  available, they are set to blank.

  ZONE (optional) must be scalar and of type character,
  and must be of length at least 5 in order to contain the
  complete value.  It is an intent(out) argument.  Its
  leftmost 5 characters are set to a value of the form
  +-hhmm, where hh and mm are the time difference with
  respect to Coordinated Universal Time (UTC) in hours and
  parts of an hour expressed in minutes, respectively.  If
  there is no clock available, they are set to blank.

  VALUES (optional) must be of type default integer and
  of rank one.  It is an intent(out) argument.  Its size
  must be at least 8.  The values returned in VALUES are
  as follows:

  VALUES(1)  the year (for example, 1990), or -huge(0) if
  there is no date available;

  VALUES(2)  the month of the year, or -huge(0) if there
  is no date available;

  VALUES(3)  the day of the month, or -huge(0) if there
  is no date available;

  VALUES(4)  the time difference with respect to
  Coordinated Universal Time (UTC) in minutes, or -huge(0)
  if this information is not available;

  VALUES(5)  the hour of the day, in the range of 0 to 23,
  or -huge(0) if there is no clock;

  VALUES(6)  the minutes of the hour, in the range 0 to
  59, or -huge(0) if there is no clock;

  VALUES(7)  the seconds of the minute, in the range 0 to
  60, or -huge(0) if there is no clock;

  VALUES(8)  the milliseconds of the second, in the range
  0 to 999, or -huge(0) if there is no clock.

  EXAMPLE.

    integer, dimension(8) :: date_time
    character(len=10), dimension(3) :: big_ben
     call date_and_time(big_ben(1), big_ben(2), &
                        big_ben(3), date_time)

  If called in Geneva, Switzerland on 1985 April 12 at
  15:27:35.5 would have assigned the value "19850412  " to
  big_ben(1), the value "152735.500" to big_ben(2), and
  the value "+0100     " to big_ben(3), and the following
  values to date_time: 1985, 4, 12, 60, 15, 27, 35, 500.

  Note that UTC is defined by CCIR Recommendation 460-2
  (and is also known as Greenwich Mean Time).

***digits 13.13.28  DIGITS (X)
 The below definition of the integer and real data type
 model is referenced in many of the intrinsic procedures.

 MODELS FOR INTEGER AND REAL DATA

 The model set for integer i is defined by:

                   q - 1
        i  = s *  [SIGMA] wk * (r**k)
                   k = 0

 where r is an integer exceeding one, q is a positive
 integer, each wk is a nonnegative integer less than r,
 and s is +1 or -1.  The model set for real x is defined
 by:
        x  =  0 or
                             p  
        x  = s * (b**e) * [SIGMA] fk * (b**(-k))
                           k = 1

 where b and p are integers exceeding one; each fk is a
 nonnegative integer less than b, with f1 nonzero; s is
 +1 or -1; and e is an integer that lies between some
 integer maximum emax and some integer minimum emin
 inclusively.  For x = 0, its exponent e and digits fk
 are defined to be zero.  The integer parameters r and q
 determine the set of model integers and the integer
 parameters b, p, emin, and emax determine the set of
 model floating point numbers.  The parameters of the
 integer and real models are available for each integer
 and real data type implemented by the processor.  The
 parameters characterize the set of available numbers in
 the definition of the model.  The numeric manipulation
 and inquiry functions provide values related to the
 parameters and other constants related to them.

 Examples of these functions in the intrinsic procedures
 information use the models:

                    30  
        i  = s *  [SIGMA] wk * (2**k)
                   k = 0

 and

        x  =  0 or

        x  = s * (2**e) * 

                            24  
                    1/2 + [SIGMA] fk * (2**(-k))
                           k = 2

                 -126 <= e <= 127

 ---------------------------------------------------------
DIGITS (X)

  DESCRIPTION.  Returns the number of significant digits
  in the model representing numbers of the same type and
  kind type parameter as the argument.

  CLASS.  Inquiry function.

  ARGUMENT.  X must be of type integer or real.  It may be
  scalar or array valued.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.
  Default integer scalar.

  RESULT VALUE.  The result has the value q if X is of
  type integer and p if X is of type real, where q and p
  are as defined in the above section (MODELS FOR INTEGER
  AND REAL DATA) for the model representing numbers of the
  same type and kind type parameter as X.

  EXAMPLE.
  digits(X) has the value 24 for real X whose model
  is in the description (MODELS FOR INTEGER AND REAL DATA)
  found above.

***dot_product 13.13.30  DOT_PRODUCT (VECTOR_A, VECTOR_B)
 The below definition of the data type, type parameters
 and shape is referenced in many of the intrinsic
 procedures.

DATA TYPE, TYPE PARAMETERS, AND SHAPE OF AN EXPRESSION

The data type and shape of an expression depend on the
operators and on the data types and shapes of the
primaries used in the expression, and are determined
recursively from the syntactic form of the expression.

An expression whose type is intrinsic has a kind type
parameter.  In addition, an expression of type character
has a length type parameter.  The type parameters for an
expression are determined from the form of the expression.

DATA TYPE, TYPE PARAMETERS, AND SHAPE OF A PRIMARY

If a pointer appears as a primary in an intrinsic
operation or a defined operation in which it corresponds
to a nonpointer dummy argument, the associated target
object is referenced.  The type, type parameters, and
shape of the primary are those of the current target.  If
the pointer is not associated with a target, it may appear
as a primary only as an actual argument in a reference to
a procedure whose corresponding dummy argument is declared
to be a pointer.

DATA TYPE, TYPE PARAMETERS, AND SHAPE OF THE RESULT OF AN
OPERATION

The type of the result of an intrinsic operation
  [x1] op x2
is specified under the 'intermediate->EXPR' menu.
The type of the result of a defined operation
  [x1] op x2
is specified by the function defining the operation.

The shape of the result of an intrinsic operation is the
shape of x2 if op is unary or if x1 is scalar, and is the
shape of x1 otherwise.

An expression of an intrinsic type has a kind type
parameter.  An expression of type character also has a
length type parameter.

For an expression x1 // x2 where x1 and x2 are of type
character, the length type parameter is the sum of the
lengths of the operands.

For an expression op x2 where op is an intrinsic unary
operator and x2 is of type integer, real, complex, or
logical, the kind type parameter of the expression is that
of the operand.

For an expression x1 op x2 where op is a numeric intrinsic
binary operator with one operand of type integer and the
other of type real or complex, the kind type parameter of
the expression is that of the real or complex operand.

For an expression x1 op x2 where op is a numeric intrinsic
binary operator with both operands of the same type and
kind type parameters, or with one real and one complex
with the same kind type parameters, the kind type
parameter of the expression is identical to that of each
operand.  In the case where both operands are integer with
different kind type parameters, the kind type parameter of
the expression is that of the operand with the greater
decimal exponent range or is processor dependent if the
operands have the same decimal exponent range.  In the
case where both operands are any of type real or complex
with different kind type parameters, the kind type
parameter of the expression is that of the operand with
the greater decimal precision or is processor dependent if
the operands have the same decimal precision.

For an expression x1 op x2 where op is a logical intrinsic
binary operator with both operands of the same kind type
parameter, the kind type parameter of the expression is
identical to that of each operand.  In the case where both
operands are of type logical with different kind type
parameters, the kind type parameter of the expression is
processor dependent.

For an expression x1 op x2 where op is a relational
intrinsic operator, the expression has the default logical
kind type parameter.
----------------------------------------------------------
DOT_PRODUCT (VECTOR_A, VECTOR_B)

  DESCRIPTION.  Performs dot-product multiplication of
  numeric or logical vectors.

  CLASS.  Transformational function.

  ARGUMENTS.

  VECTOR_A must be of numeric type (integer, real, or
  complex) or of logical type.  It must be array valued
  and of rank one.

  VECTOR_B must be of numeric type if VECTOR_A is of
  numeric type or of type logical if VECTOR_A is of type
  logical.  It must be array valued and of rank one.  It
  must be of the same size as VECTOR_A.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  If the
  arguments are of numeric type, the type and kind type
  parameter of the result are those of the expression
  VECTOR_A * VECTOR_B determined by the types of the
  arguments according to the above section.  If the
  arguments are of type logical, the result is of type
  logical with the kind type parameter of the expression
  VECTOR_A .AND. VECTOR_B according to the above section.
  The result is scalar.

  RESULT VALUE.

  Case (i):  If VECTOR_A is of type integer or real, the
  result has the value sum((VECTOR_A*VECTOR_B).  If the
  vectors have size zero, the result has the value zero.

  Case (ii):  If VECTOR_A is of type complex, the result
  has the value sum(conjg(VECTOR_A)*VECTOR_B).  If the
  vectors have size zero, the result has the value zero.

  Case (iii):  If VECTOR_A is of type logical, the result
  has the value any(VECTOR_A .AND. VECTOR_B).  If the
  vectors have size zero, the result has the value false.

  EXAMPLES.
  Case (i):    dot_product((/1,2,3/), (/2,3,4/))
               has the value 20.
  Case (ii):   dot_product((/(1.0,2.0), (2.0,3.0)/), &
                           (/(1.0,1.0), (1.0,4.0)/))
               has the value (17,4)
  Case (iii):  dot_product((/.true.,.false./), &
                           (/.true.,.true./))
               has the value true.

***eoshift 13.13.32  EOSHIFT (ARRAY, SHIFT, BOUNDARY, DIM)
EOSHIFT (ARRAY, SHIFT [, BOUNDARY] [, DIM])

  OPTIONAL ARGUMENTS.  BOUNDARY, DIM

  DESCRIPTION.  Perform an end-off shift on an array
  expression of rank one or perform end-off shifts on all
  the complete rank-one sections along a given dimension
  of an array expression of rank two or greater.  Elements
  are shifted off at one end of a section and copies of a
  boundary value are shifted in at the other end.
  Different sections may have different boundary values
  and may be shifted by different amounts and in different
  directions.

  CLASS.  Transformational function.

  ARGUMENTS.

  ARRAY may be of any type.  It must not be scalar.

  SHIFT must be of type integer and must be scalar if
  ARRAY has rank one;
  otherwise, it must be scalar or of rank n-1 and of
  shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn)
  where (d1, d2, ..., dn) is the shape of ARRAY.

  BOUNDARY (optional) must be of the same type and type
  parameters as ARRAY and must be scalar if ARRAY has rank
  one; otherwise, it must be either scalar or of rank n-1
  and of shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn).
  BOUNDARY may be omitted for the data types in the
  following table and, in this case, it is as if it were
  present with the scalar value shown.

  Type of ARRAY     Value of BOUNDARY 
  ___________________________________

  integer           0  
  real              0.0  
  complex           (0.0, 0.0)  
  logical           false  
  character(len=X)  repeat(" ",X)

  DIM (optional) must be scalar and of type integer with a
  value in the range 1 <= DIM <= n, where n is the rank of
  ARRAY.  If DIM is omitted, it is as if it were present
  with the value 1.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result has
  the type, type parameters, and shape of ARRAY.

  Result  Value. Element (s1, s2, ..., sn) of the result
  has the value
  ARRAY (s1, s2, ..., sDIM-1, sDIM+sh, sDIM+1, ..., sn)
  where sh is SHIFT or
  SHIFT (s1, s2, ..., sDIM-1, sDIM+1, ..., sn) provided
  the inequality
  lbound(ARRAY, DIM) <= sDIM + sh <= ubound(ARRAY, DIM)
  holds and is otherwise BOUNDARY or
  BOUNDARY (s1, s2, ..., sDIM-1, sDIM+1, ..., sn).

  EXAMPLES.

  Case (i): If V is the array (1, 2, 3, 4, 5, 6), the
  effect of shifting V end-off to the left by 3 positions
  is achieved by eoshift(V, SHIFT=3) which has the value
  (4, 5, 6, 0, 0, 0); eoshift(V, SHIFT=-2, BOUNDARY=99)
  achieves an end-off shift to the right by 2 positions
  with the boundary value of 99 and has the value
  (99, 99, 1, 2, 3, 4).

  Case (ii):  The rows of an array of rank two may all be
  shifted by the same amount or by different amounts and
  the boundary elements can be the same or different.  If
  M is the array
        A  B  C
        D  E  F
        G  H  I
  the value of eoshift(M, SHIFT=-1, BOUNDARY="*", DIM=2) is
        *  A  B
        *  D  E
        *  G  H
  and the value of eoshift(M, SHIFT=(/-1,1,0/), &
                          BOUNDARY=(/"*","/","?"/), DIM=2)
  is
        *  A  B
        E  F  /
        G  H  I

***epsilon 13.13.33  EPSILON (X)
EPSILON (X)

  DESCRIPTION.  Returns a positive model number that is
  almost negligible compared to unity in the model
  representing numbers of the same type and kind type
  parameter as the argument.

  CLASS.  Inquiry function.

  ARGUMENT.  X must be of type real.  It may be scalar or
  array valued.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  Scalar of the
  same type and kind type parameter as X.

  RESULT VALUE.  The result has the value b**(1-p) where b
  and p are as defined in the description (MODELS FOR
  INTEGER AND REAL DATA) found in the DIGITS intrinsic
  procedure for the model representing numbers of the same
  type and kind type parameter as X.

  EXAMPLES.
  epsilon(X) has the value 2**(-23) for real X whose model
  is in the description (MODELS FOR INTEGER AND REAL DATA)
  found in the DIGITS intrinsic procedure.

***exp 13.13.34  EXP (X)
EXP (X)

  DESCRIPTION.  Exponential.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real or complex.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a
  processor-dependent approximation to e**X.  If X is of
  type complex, its imaginary part is regarded as a value
  in radians.

  EXAMPLES.
  exp(1.0) has the value 2.7182818.
  exp(2.0_HIGH/3) has the value 1.9477340410547_HIGH.

***exponent 13.13.35  EXPONENT (X)
EXPONENT (X)

  DESCRIPTION.  Returns the exponent part of the argument
  when represented as a model number.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real.

  RESULT TYPE.  Default integer.

  RESULT VALUE.  The result has a value equal to the
  exponent e of the model representation description
  (MODELS FOR INTEGER AND REAL DATA) found in the DIGITS
  intrinsic procedure for the value of X, provided X is
  nonzero and e is within the range for default integers.
  The result is undefined if the processor cannot
  represent e in the default integer type.  exponent(X)
  has the value zero if X is zero.

  EXAMPLES.
  exponent(1.0) has the value 1.
  exponent(4.1) has the value 3 for reals whose model is
  in the description (MODELS FOR INTEGER AND REAL DATA)
  found in the DIGITS intrinsic procedure.

***floor 13.13.36  FLOOR (A)
FLOOR (A)

  DESCRIPTION.  Returns the greatest integer less than or
  equal to its argument.

  CLASS.  Elemental function.

  ARGUMENT.  A must be of type real.

  RESULT TYPE AND TYPE PARAMETER.  Default integer.

  RESULT VALUE.  The result has value equal to the
  greatest integer less than or equal to A.  The result is
  undefined if the processor cannot represent this value
  in the default integer type.

  EXAMPLES.
  floor(3.7) has the value 3.
  floor(-3.7) has the value -4.
  floor(10.0_HIGH/3) has the value 3.

***fraction 13.13.37  FRACTION (X)
FRACTION (X)

  DESCRIPTION.  Returns the fractional part of the model
  representation of the argument value.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has the value X * b**(-e),
  where b and e are as defined in the model (MODELS FOR
  INTEGER AND REAL DATA) found in the DIGITS intrinsic
  procedure.  If X has the value zero, the result has the
  value zero.

  EXAMPLE.
  fraction(3.0) has the value 0.75 for reals whose model
  is in the description (MODELS FOR INTEGER AND REAL DATA)
  found in the DIGITS intrinsic procedure.

***huge 13.13.38  HUGE (X)
HUGE (X)

  DESCRIPTION.  Returns the largest number in the model
  representing numbers of the same type and kind type
  parameter as the argument.

  CLASS.  Inquiry function.

  ARGUMENT.  X must be of type integer or real.  It may be
  scalar or array valued.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  Scalar of the
  same type and kind type parameter as X.

  RESULT VALUE.  The result has the value (r**q)-1 if X is
  of type integer and (1-(b**(-p)))*(b**emax) if X is of
  type real, where r, q, b, p, and emax are as defined in
  the description (MODELS FOR INTEGER AND REAL DATA) found
  in the DIGITS intrinsic procedure for the model
  representing numbers of the same type and kind type
  parameter as X.

  EXAMPLE.
  huge(X) has the value (1-(2**(-24)))*(2**127) for real X
  whose model is in the description (MODELS FOR INTEGER
  AND REAL DATA) found in the DIGITS intrinsic procedure.

***iand 13.13.40  IAND (I, J)
IAND (I, J)

  DESCRIPTION.  Performs a logical AND.

  CLASS.  Elemental function.

  ARGUMENTS.

  I must be of type integer.

  J must be of type integer with the same kind type
  parameter as I.

  RESULT TYPE AND TYPE PARAMETER.  Same as I.

  RESULT VALUE.  The result has the value obtained by
  combining I and J bit-by-bit according to the following
  truth table:

  I  J  iand(I, J) 
  _________________

  1  1     1  
  1  0     0  
  0  1     0  
  0  0     0  

  The model for the interpretation of an integer value as
  a sequence of bits is in the description (MODEL FOR BIT
  MANIPULATION AND INQUIRY PROCEDURES) found in the
  BIT_SIZE intrinsic procedure.

  EXAMPLES.
  iand(1,3) has the value 1.
  iand(2_SHORT,10_SHORT) has the value 2_SHORT.

***ibclr 13.13.41  IBCLR (I, POS)
IBCLR (I, POS)

  DESCRIPTION.  Clears one bit to zero.

  CLASS.  Elemental function.

  ARGUMENTS.

  I must be of type integer.

  POS must be of type integer.  It must be nonnegative and
  less than bit_size(I).

  RESULT TYPE AND TYPE PARAMETER.  Same as I.

  RESULT VALUE.  The result has the value of the sequence
  of bits of I, except that bit POS of I is set to zero.
  The model for the interpretation of an integer value as
  a sequence of bits is in the description (MODEL FOR BIT
  MANIPULATION AND INQUIRY PROCEDURES) found in the
  BIT_SIZE intrinsic procedure.

  EXAMPLES.
  ibclr(14,1) has the result 12.
  If V has the value (1, 2, 3, 4), the value of
  ibclr(POS=V,I=31) is (29, 27, 23, 15).

***ibits 13.13.42  IBITS (I, POS, LEN)
IBITS (I, POS, LEN)

  DESCRIPTION.  Extracts a sequence of bits.

  CLASS.  Elemental function.

  ARGUMENTS.

  I must be of type integer.

  POS must be of type integer.  It must be nonnegative and
  POS + LEN must be less than or equal to bit_size(I).

  LEN must be of type integer and nonnegative.

  RESULT TYPE AND TYPE PARAMETER.  Same as I.

  RESULT VALUE.  The result has the value of the sequence
  of LEN bits in I beginning at bit POS right-adjusted and
  with all other bits zero.  The model for the
  interpretation of an integer value as a sequence of bits
  is in the description (MODEL FOR BIT MANIPULATION AND
  INQUIRY PROCEDURES) found in the BIT_SIZE intrinsic
  procedure.

  EXAMPLE.
  ibits(14, 1, 3) has the value 7.

***ibset 13.13.43  IBSET (I, POS)
IBSET (I, POS)

  DESCRIPTION.  Sets one bit to one.

  CLASS.  Elemental function.

  ARGUMENTS.

  I must be of type integer.

  POS must be of type integer.  It must be nonnegative and
  less than bit_size(I).

  RESULT TYPE AND TYPE PARAMETER.  Same as I.

  RESULT VALUE.  The result has the value of the sequence
  of bits of I, except that bit POS of I is set to one.
  The model for the interpretation of an integer value as
  a sequence of bits is in the description (MODEL FOR BIT
  MANIPULATION AND INQUIRY PROCEDURES) found in the
  BIT_SIZE intrinsic procedure.

  EXAMPLES.
  ibset(12, 1) has the value 14.
  If V has the value (1, 2, 3, 4), the value of
  ibset(POS=V,I=0) is (2, 4, 8, 16).

***ichar 13.13.44  ICHAR (C)
ICHAR (C)

  DESCRIPTION.  Returns the position of a character in the
  ASCII collating sequence.

  CLASS.  Elemental function.

  ARGUMENT.  C must be of type character and of length
  one.  Its value must be that of a character capable of
  representation in the processor.

  RESULT TYPE AND TYPE PARAMETER.  Default integer.

  RESULT VALUE.  The result is the position of C in the
  ASCII collating sequence associated with the kind type
  parameter of C and is in the range 0 <= ichar(C) <= n-1,
  where n is the number of characters in the ASCII
  collating sequence.  For any characters C and D capable
  of representation in the processor, C < D is true if and
  only if ichar(C) < ichar(D) is true and C == D is true
  if and only if ichar(C) == ichar(D) is true.

  EXAMPLE.  ichar("X") has the value 88.

***ieor 13.13.45  IEOR (I, J)
IEOR (I, J)

  DESCRIPTION.  Performs an exclusive OR.

  CLASS.  Elemental function.

  ARGUMENTS.

  I must be of type integer.

  J must be of type integer with the same kind type
  parameter as I.

  RESULT TYPE AND TYPE PARAMETER.  Same as I.

  RESULT VALUE.  The result has the value obtained by
  combining I and J bit-by-bit according to the following
  truth table:

  I  J  ieor(I, J) 
  _________________

  1  1     0  
  1  0     1  
  0  1     1  
  0  0     0  

  The model for the interpretation of an integer value as
  a sequence of bits is in the description (MODEL FOR BIT
  MANIPULATION AND INQUIRY PROCEDURES) found in the
  BIT_SIZE intrinsic procedure.

  EXAMPLE.
  ieor(1,3) has the value 2.

***index 13.13.46  INDEX (STRING, SUBSTRING, BACK)
INDEX (STRING, SUBSTRING [, BACK])

  OPTIONAL ARGUMENT.  BACK

  DESCRIPTION.  Returns the starting position of a
  substring within a string.

  CLASS.  Elemental function.

  ARGUMENTS.

  STRING must be of type character.

  SUBSTRING must be of type character.

  BACK (optional) must be of type logical.

  RESULT TYPE AND TYPE PARAMETER.  Default integer.

  RESULT VALUE.

  Case (i):  If BACK is absent or present with the value
  false, the result is the minimum positive value of I
  such that string(I:I+len(SUBSTRING)-1) = SUBSTRING or
  zero if there is no such value.  Zero is returned if
  len(STRING) < len(SUBSTRING) and one is returned if
  len(SUBSTRING) = 0.

  Case (ii):  If BACK is present with the value true, the
  result is the maximum value of I less than or equal to
  len(STRING) - len(SUBSTRING) + 1 such that
  STRING(I:I+len(SUBSTRING) - 1) = SUBSTRING or zero if
  there is no such value.  Zero is returned if
  len(STRING) < len(SUBSTRING) and
  len(STRING) + 1 is returned if len(SUBSTRING) = 0.

  EXAMPLES.
  index("F World", "r") has the value 5.
  index("Hello", "l", BACK=.true.) has the value 4.

***int 13.13.47  INT (A, KIND)
INT (A [, KIND])

  OPTIONAL ARGUMENT.  KIND

  DESCRIPTION.  Convert to integer type.

  CLASS.  Elemental function.

  ARGUMENTS.

  A must be of type integer, real, or complex.

  KIND (optional) must be a scalar integer named constant.

  Result Type and Type Parameter.  Integer.  If KIND is
  present, the kind type parameter is that specified by
  KIND; otherwise, the kind type parameter is that of
  default integer type.

  RESULT VALUE.

  Case (i):  If A is of type integer, int(A) = A.

  Case (ii):  If A is of type real, there are two cases:
   if |A| < 1, int(A) has the value 0;
   if |A| >= 1, int(A) is the integer whose magnitude is
   the largest integer that does not exceed the magnitude
   of A and whose sign is the same as the sign of A.

  Case (iii):  If A is of type complex, int(A) is the
  value obtained by applying the case (ii) rule to the
  real part of A.

  The result is undefined if the processor cannot
  represent the result in the specified integer type.

  EXAMPLE.
  int(-3.7) has the value -3.
  int(9.1_HIGH/4.0_HIGH,SHORT) has the value 2_SHORT.

***ior 13.13.48  IOR (I, J)
IOR (I, J)

  DESCRIPTION.  Performs an inclusive OR.

  CLASS.  Elemental function.

  ARGUMENTS.

  I must be of type integer.

  J must be of type integer with the same kind type
  parameter as I.

  RESULT TYPE AND TYPE PARAMETER.  Same as I.

  RESULT VALUE.  The result has the value obtained by
  combining I and J bit-by-bit according to the following
  truth table:

  I  J  ior(I, J) 
  _________________

  1  1     1  
  1  0     1  
  0  1     1  
  0  0     0  


  The model for the interpretation of an integer value as
  a sequence of bits is in the description (MODEL FOR BIT
  MANIPULATION AND INQUIRY PROCEDURES) found in the
  BIT_SIZE intrinsic procedure.

  EXAMPLE.
  ior(1,3) has the value 3.

***ishft 13.13.49  ISHFT (I, SHIFT)
ISHFT (I, SHIFT)

  DESCRIPTION.  Performs a logical shift.

  CLASS.  Elemental function.

  ARGUMENTS.

  I must be of type integer.

  SHIFT must be of type integer.  The absolute value of
  SHIFT must be less than or equal to bit_size(I).

  RESULT TYPE AND TYPE PARAMETER.  Same as I.

  RESULT VALUE.  The result has the value obtained by
  shifting the bits of I by SHIFT positions.  If SHIFT is
  positive, the shift is to the left; if SHIFT is
  negative, the shift is to the right; and if SHIFT is
  zero, no shift is performed.  Bits shifted out from the
  left or from the right, as appropriate, are lost.  Zeros
  are shifted in from the opposite end.  The model for the
  interpretation of an integer value as a sequence of bits
  is in the description (MODEL FOR BIT MANIPULATION AND
  INQUIRY PROCEDURES) found in the BIT_SIZE intrinsic
  procedure.

  EXAMPLE.
  ishft(3,1) has the result 6.

***ishftc 13.13.50  ISHFTC (I, SHIFT, SIZE)
ISHFTC (I, SHIFT [, SIZE])

  OPTIONAL ARGUMENT.  SIZE

  DESCRIPTION.  Performs a circular shift of the rightmost
  bits.

  CLASS.  Elemental function.

  ARGUMENTS.

  I must be of type integer.

  SHIFT must be of type integer.  The absolute value of
  SHIFT must be less than or equal to SIZE.

  SIZE (optional) must be of type integer.  The value of
  SIZE must be positive and must not exceed bit_size(I).
  If SIZE is absent, it is as if it were present with the
  value of bit_size(I).

  RESULT TYPE AND TYPE PARAMETER.  Same as I.

  RESULT VALUE.  The result has the value obtained by
  shifting the SIZE rightmost bits of I circularly by
  SHIFT positions.  If SHIFT is positive, the shift is to
  the left; if SHIFT is negative, the shift is to the
  right; and if SHIFT is zero, no shift is performed.  No
  bits are lost.  The unshifted bits are unaltered.  The
  model for the interpretation of an integer value as a
  sequence of bits is in the description (MODEL FOR BIT
  MANIPULATION AND INQUIRY PROCEDURES) found in the
  BIT_SIZE intrinsic procedure.

  EXAMPLE.
  ishftc(3,2,3) has the value 5.
  ishftc(3_SHORT,-2_SHORT) has the value 192_SHORT.

***kind 13.13.51  KIND (X)
KIND (X)

  DESCRIPTION.  Returns the value of the kind type
  parameter of X.

  CLASS.  Inquiry function.

  ARGUMENT.  X may be of any intrinsic type.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.
  Default integer scalar.

  RESULT VALUE.  The result has a value equal to the kind
  type parameter value of X.

  EXAMPLE.
  kind(0.0) has the kind type parameter value of default
  real.
  kind(1.0_HIGH) has the value of the named constant HIGH.

***lbound 13.13.52  LBOUND (ARRAY, DIM)
LBOUND (ARRAY [, DIM])

  OPTIONAL ARGUMENT.  DIM

  DESCRIPTION.  Returns all the lower bounds or a
  specified lower bound of an array.

  CLASS.  Inquiry function.

  ARGUMENTS.

  ARRAY may be of any type.  It must not be scalar.  It
  must not be a pointer that is disassociated or an
  allocatable array that is not allocated.

  DIM (optional) must be scalar and of type integer with a
  value in the range 1 <= DIM <= n, where n is the rank of
  ARRAY.  The corresponding actual argument must not be an
  optional dummy argument.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  of type default integer.  It is scalar if DIM is
  present; otherwise, the result is an array of rank one
  and size n, where n is the rank of ARRAY.

  RESULT VALUE.

  Case (i):  For an array section or for an array
  expression, other than a whole array or array structure
  component, lbound(ARRAY, DIM) has the value 1;
  otherwise, it has a value equal to the lower bound for
  subscript DIM of ARRAY if dimension DIM of ARRAY does
  not have size zero and has the value 1 if dimension DIM
  has size zero.
  Case (i):  For an array section or for an array
  expression, other than a whole array or array structure
  component, lbound(ARRAY, DIM) has the value 1.  For a
  whole array or array structure component, lbound(ARRAY,
  DIM) has the value:
   (a) equal to the lower bound for subscript DIM or ARRAY
       if dimension DIM of ARRAY does not have extent zero
       or if ARRAY is rank DIM, or
   (b) 1 otherwise.

  Case (ii):  lbound(ARRAY) has a value whose ith
  component is equal to lbound(ARRAY, i), for
  i = 1, 2, ..., n, where n is the rank of ARRAY.

  EXAMPLES.
  The following statements

   real, dimension(2:3, 7:10), target :: A
   real, pointer, dimension(:,:) :: B, C, D
    B => A
    C => A(:,:)
    allocate(D(-3:3,-7:7))
    print *, lbound(A)
    print *, lbound(A,DIM=2)
    print *, lbound(B)
    print *, lbound(C)
    print *, lbound(D)

  will print
    2   7
    7
    2   7
    1   1
    -3 -7

***len 13.13.53  LEN (STRING)
LEN (STRING)

  DESCRIPTION.  Returns the length of a character entity.

  CLASS.  Inquiry function.

  ARGUMENT.  STRING must be of type character.  It may be
  scalar or array valued.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.
  Default integer scalar.

  RESULT VALUE.  The result has a value equal to the
  number of characters in STRING if it is scalar or in an
  element of STRING if it is array valued.

  EXAMPLE.
  The following statements

   character(len=11), dimension(100) :: c
    print *, len(c)
    print *, len(c(4)(9:11))

  will print
   11
    2

***len_trim 13.13.54  LEN_TRIM (STRING)
LEN_TRIM (STRING)

  DESCRIPTION.  Returns the length of the character
  argument without counting trailing blank characters.

  CLASS.  Elemental function.

  ARGUMENT.  STRING must be of type character.

  RESULT TYPE AND TYPE PARAMETER.  Default integer.

  RESULT VALUE.  The result has a value equal to the
  number of characters remaining after any trailing blanks
  in STRING are removed.  If the argument contains no
  nonblank characters, the result is zero.

  EXAMPLES.
  len_trim(" A B  ") has the value 4.
  len_trim("  ") has the value 0.

***log 13.13.59  LOG (X)
LOG (X)

  DESCRIPTION.  Natural logarithm.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real or complex.  If X is
  real, its value must be greater than zero.  If X is
  complex, its value must not be zero.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a

  processor-dependent approximation to log X.  A result of
                                          e

  type complex is the principal value with imaginary part
  [omega] in the range -[pi] < [omega] <= [pi] .  The
  imaginary part of the result is [pi] only when the real
  part of the argument is less than zero and the imaginary
  part of the argument is zero.

  EXAMPLE.
  log(10.0) has the value 2.3025851.

***log10 13.13.60  LOG10 (X)
LOG10 (X)

  DESCRIPTION.  Common logarithm.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real.  The value of X must
  be greater than zero.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a

  processor-dependent approximation to log  X.
                                          10

  EXAMPLES.
  log10(10.0) has the value 1.0.
  log10(10.0e1000_HIGH) has the value 1001.0_HIGH


***logical 13.13.61  LOGICAL (L, KIND)
LOGICAL (L [, KIND])

  OPTIONAL ARGUMENT.  KIND

  DESCRIPTION.  Converts between kinds of logical.

  CLASS.  Elemental function.

  ARGUMENTS.

  L must be of type logical.

  KIND (optional) must be a scalar integer named constant.

  RESULT TYPE AND TYPE PARAMETER.  Logical.  If KIND is
  present, the kind type parameter is that specified by
  KIND; otherwise, the kind type parameter is that of
  default logical.

  RESULT VALUE.  The value is that of L.

  EXAMPLE.
  logical(L .or. .not. L) has the value true and is of
  type default logical, regardless of the kind type
  parameter of the logical container L.

***matmul 13.13.62  MATMUL (MATRIX_A, MATRIX_B)
MATMUL (MATRIX_A, MATRIX_B)

  DESCRIPTION.  Performs matrix multiplication of numeric
  or logical matrices.

  CLASS.  Transformational function.

  ARGUMENTS.

  MATRIX_A must be of numeric type (integer, real, or
  complex) or of logical type.  It must be array valued
  and of rank one or two.

  MATRIX_B must be of numeric type if MATRIX_A is of
  numeric type and of logical type if MATRIX_A is of
  logical type.  It must be array valued and of rank one
  or two.  If MATRIX_A has rank one, MATRIX_B must have
  rank two.  If MATRIX_B has rank one, MATRIX_A must have
  rank two.  The size of the first (or only) dimension of
  MATRIX_B must equal the size of the last (or only)
  dimension of MATRIX_A.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  If the
  arguments are of numeric type, the type and kind type
  parameter of the result are determined by the types of
  the arguments according to the section found in the
  DOT_PRODUCT intrinsic procedure.  If the arguments are
  of type logical, the result is of type logical with the
  kind type parameter of the arguments according to the
  section found in the DOT_PRODUCT intrinsic procedure.
  The shape of the result depends on the shapes of the
  arguments as follows:

  Case (i):  If MATRIX_A has shape (n, m) and
                MATRIX_B has shape (m, k),
              the result has shape (n, k).

  Case (ii):  If MATRIX_A has shape (m) and
                 MATRIX_B has shape (m, k),
               the result has shape (k).

  Case (iii):  If MATRIX_A has shape (n, m) and
                  MATRIX_B has shape (m),
                the result has shape (n).

  RESULT VALUE.

  Case (i):  Element (i,j) of the result has the value
  sum(MATRIX_A(i,:) * MATRIX_B(:,j)) if the arguments are
  of numeric type and has the value
  any(MATRIX_A(i,:) .and. MATRIX_B(:,j)) if the arguments
  are of logical type.

  Case (ii):  Element (j) of the result has the value
  sum(MATRIX_A(:) * MATRIX_B(:,j)) if the arguments are of
  numeric type and has the value
  any(MATRIX_A(:) .and. MATRIX_B(:,j)) if the arguments
  are of logical type.

  Case (iii):  Element (i) of the result has the value
  sum(MATRIX_A(i,:) * MATRIX_B(:)) if the arguments are of
  numeric type and has the value
  any(MATRIX_A(i,:) .and. MATRIX_B(:)) if the arguments
  are of logical type.

  EXAMPLES.
  If A is the array
        1  2  3
        2  3  4
  and B is the array
        1  2
        2  3
        3  4
  and X is the vector (1, 2) and Y is the vector (1, 2, 3)

  Case (i):  The result of matmul(A, B) is the
  matrix-matrix product AB with the value
        14  22
        20  29

  Case (ii):  The result of matmul(X, A) is the
  vector-matrix product XA with the value (5, 8, 11)

  Case (iii):  The result of matmul(A, Y) is the
  matrix-vector product AY with the value (14, 20)

***max 13.13.63  MAX (A1, A2, A3, ...)
MAX (A1, A2 [, A3, ...])

  OPTIONAL ARGUMENTS.  A3, ...

  DESCRIPTION.  Maximum value.

  CLASS.  Elemental function.

  ARGUMENTS.  The arguments must all have the same type
  which must be integer or real and they must all have the
  same kind type parameter.

  RESULT TYPE AND TYPE PARAMETER.  Same as the arguments.

  RESULT VALUE.  The value of the result is that of the
  largest argument.

  EXAMPLE.
  max(-9.0, 7.0, 2.0) has the value 7.0.
  max(-1.0_HIGH/3, -0.1_HIGH) has the value -0.1_HIGH.

***maxexponent 13.13.64  MAXEXPONENT (X)
MAXEXPONENT (X)

  DESCRIPTION.  Returns the maximum exponent in the model
  representing numbers of the same type and kind type
  parameter as the argument.

  CLASS.  Inquiry function.

  ARGUMENT.  X must be of type real.  It may be scalar or
  array valued.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.
  Default integer scalar.

  RESULT VALUE.  The result has the value emax, as defined
  in the description (MODELS FOR INTEGER AND REAL
  DATA) found in the DIGITS intrinsic procedure for the
  model representing numbers of the same type and kind
  type parameter as X.

  EXAMPLE.
  maxexponent(X) has the value 127 for real X whose model
  is as in the description (MODELS FOR INTEGER AND REAL
  DATA) found in the DIGITS intrinsic procedure.

***maxloc 13.13.65  MAXLOC (ARRAY, MASK)
MAXLOC (ARRAY [, MASK])

  OPTIONAL ARGUMENT.  MASK

  DESCRIPTION.  Determine the location of the first
  element of ARRAY having the maximum value of the
  elements identified by MASK.

  CLASS.  Transformational function.

  ARGUMENTS.

  ARRAY must be of type integer or real.  It must not be
  scalar.

  MASK (optional) must be of type logical and must be
  conformable with ARRAY.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  of type default integer; it is an array of rank one and
  of size equal to the rank of ARRAY.

  RESULT VALUE.

  Case (i):  If MASK is absent, the result is a rank-one
  array whose element values are the values of the
  subscripts of an element of ARRAY whose value equals the
  maximum value of all of the elements of ARRAY.  The ith
  subscript returned lies in the range 1 to ei, where ei
  is the extent of the ith dimension of ARRAY.  If more
  than one element has the maximum value, the element
  whose subscripts are returned is the first such element,
  taken in array element order.  If ARRAY has size zero,
  the value of the result is processor dependent.

  Case (ii):  If MASK is present, the result is a rank-one
  array whose element values are the values of the
  subscripts of an element of ARRAY, corresponding to a
  true element of MASK, whose value equals the maximum
  value of all such elements of ARRAY.  The ith subscript
  returned lies in the range 1 to ei, where ei is the
  extent of the ith dimension of ARRAY.  If more than one
  such element has the maximum value, the element whose
  subscripts are returned is the first such element taken
  in array element order.  If there are no such elements
  (that is, if ARRAY has size zero or every element of
  MASK has the value false), the value of the result is
  processor dependent.

  An element of the result is undefined if the processor
  cannot represent the value as a default integer.

  EXAMPLES.

  Case (i):  The value of maxloc((/2,6,4,6/)) is (2).
  If the array B is declared
   integer, dimension(4:7), parameter :: B = (/8,6,3,1/)
  the value of maxloc(B) is (1).

  Case (ii):  If A is the array
        0  -5   8  -3
        3   4  -1   2
        1   5   6  -4
  the value of maxloc(A,MASK=A<6) has the value (3,2).
  This is true even if A has a declared lower bound other
  than 1.

***maxval 13.13.66  MAXVAL (ARRAY, DIM, MASK)
MAXVAL (ARRAY [, DIM] [, MASK])

  OPTIONAL ARGUMENTS.  DIM, MASK

  DESCRIPTION.  Maximum value of the elements of ARRAY
  along dimension DIM corresponding to the true elements
  of MASK.

  CLASS.  Transformational function.

  ARGUMENTS.

  ARRAY must be of type integer or real.  It must not be
  scalar.

  DIM (optional) must be scalar and of type integer with
  a value in the range 1 <= DIM <= n, where n is the rank
  of ARRAY.  The corresponding actual argument must not be
  an optional dummy argument.

  MASK (optional) must be of type logical and must be
  conformable with ARRAY.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  of the same type and kind type parameter as ARRAY.  It
  is scalar if DIM is absent or ARRAY has rank one;
  otherwise, the result is an array of rank n-1 and of
  shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn)
  where (d1, d2, ..., dn) is the shape of ARRAY.

  RESULT VALUE.

  Case (i):  The result of maxval(ARRAY) has a value equal
  to the maximum value of all the elements of ARRAY or has
  the value of the negative number of the largest
  magnitude supported by the processor for numbers of the
  type and kind type parameter of ARRAY if ARRAY has size
  zero.

  Case (ii):  The result of maxval(ARRAY, MASK=MASK) has a
  value equal to the maximum value of the elements of
  ARRAY corresponding to true elements of MASK or has the
  value of the negative number of the largest magnitude
  supported by the processor for numbers of the type and
  kind type parameter of ARRAY if there are no true
  elements.

  Case (iii):  If ARRAY has rank one,
  maxval(ARRAY, DIM [,MASK]) has a value equal to that of
  maxval(ARRAY [,MASK = MASK]).
  Otherwise, the value of
  element (s1, s2, ..., sDIM-1, sDIM+1, ..., sn) of
  maxval(ARRAY, DIM [,MASK]) is equal to
  maxval(ARRAY(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn),
  [, MASK=MASK(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn)]).

  EXAMPLES.

  Case (i):  The value of maxval((/1,2,3/)) is 3.

  Case (ii):  maxval(C, MASK=C<0.0) forms the maximum of
  the negative elements of C.

  Case (ii):  If B is the array
        1  3  5
        2  4  6
  maxval(B,DIM=1) is (2, 4, 6) and
  maxval(B,DIM=2) is (5,6)

***merge 13.13.67  MERGE (TSOURCE, FSOURCE, MASK)
MERGE (TSOURCE, FSOURCE, MASK)

  DESCRIPTION.  Choose alternative value according to the
  value of a mask.

  CLASS.  Elemental function.

  ARGUMENTS.

  TSOURCE may be of any type.

  FSOURCE must be of the same type and type parameters as
  TSOURCE.

  MASK must be of type logical.

  RESULT TYPE AND TYPE PARAMETERS.  Same as TSOURCE.

  RESULT VALUE.  The result is TSOURCE if MASK is true and
  FSOURCE otherwise.

  EXAMPLES.  If TSOURCE is the array
        1  6  5
        2  4  6
  and FSOURCE is the array
        0  3  2
        7  4  8
  and MASK is the array
        .true.   .false.   .true.
        .false.  .false.   .true.
  merge(TSOURCE, FSOURCE, MASK) is
        1  3  5
        7  4  6
  The value of merge(1.0, 0.0, K>0) is 1.0 for K = 5 and
  0.0 for K = -2.

***min 13.13.68  MIN (A1, A2, A3, ...)
MIN (A1, A2 [, A3, ...])

  OPTIONAL ARGUMENTS.  A3, ...

  DESCRIPTION.  Minimum value.

  CLASS.  Elemental function.

  ARGUMENTS.  The arguments must all be of the same type
  which must be integer or real and they must all have the
  same kind type parameter.

  RESULT TYPE AND TYPE PARAMETER.  Same as the arguments.

  RESULT VALUE.  The value of the result is that of the
  smallest argument.

  EXAMPLE.
  min(-9.0, 7.0, 2.0) has the value -9.0.
  min(-0.4_HIGH,-1.0_HIGH/3) has the value -0.4_HIGH.

***minexponent 13.13.69  MINEXPONENT (X)
MINEXPONENT (X)

  DESCRIPTION.  Returns the minimum (most negative)
  exponent in the model representing numbers of the same
  type and kind type parameter as the argument.

  CLASS.  Inquiry function.

  ARGUMENT.  X must be of type real.  It may be scalar or
  array valued.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.
  Default integer scalar.

  RESULT VALUE.  The result has the value emin, as defined
  in the description (MODELS FOR INTEGER AND REAL
  DATA) found in the DIGITS intrinsic procedure for the
  model representing numbers of the same type and kind
  type parameter as X.

  EXAMPLE.
  minexponent(X) has the value -126 for real X whose model
  is as in the description (MODELS FOR INTEGER AND REAL
  DATA) found in the DIGITS intrinsic procedure.

***minloc 13.13.70  MINLOC (ARRAY, MASK)
MINLOC (ARRAY [, MASK])

  OPTIONAL ARGUMENT.  MASK

  DESCRIPTION.  Determine the location of the first
  element of ARRAY having the minimum value of the
  elements identified by MASK.

  CLASS.  Transformational function.

  ARGUMENTS.

  ARRAY must be of type integer or real.  It must not be
  scalar.

  MASK (optional) must be of type logical and must be
  conformable with ARRAY.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  of type default integer; it is an array of rank one and
  of size equal to the rank of ARRAY.

  RESULT VALUE.

  Case (i):  If MASK is absent, the result is a rank-one
  array whose element values are the values of the
  subscripts of an element of ARRAY whose value equals the
  minimum value of all the elements of ARRAY.  The ith
  subscript returned lies in the range 1 to ei, where ei
  is the extent of the ith dimension of ARRAY.  If more
  than one element has the minimum value, the element
  whose subscripts are returned is the first such element,
  taken in array element order.  If ARRAY has size zero,
  the value of the result is processor dependent.

  Case (ii):  If MASK is present, the result is a rank-one
  array whose element values are the values of the
  subscripts of an element of ARRAY, corresponding to a
  true element of MASK, whose value equals the minimum
  value of all such elements of ARRAY.  The ith subscript
  returned lies in the range 1 to ei, where ei is the
  extent of the ith dimension of ARRAY.  If more than one
  such element has the minimum value, the element whose
  subscripts are returned is the first such element taken
  in array element order.  If ARRAY has size zero or every
  element of MASK has the value false, the value of the
  result is processor dependent.

  An element of the result is undefined if the processor
  cannot represent the value as a default integer.

  EXAMPLES.

  Case (i):  The value of minloc((/4,3,6,3/)) is (2).
  If the array B is declared
   integer, dimension(4:7), parameter :: B = (/8,6,3,1/)
  the value of minloc(B) is (4).

  Case (ii):  If A is the array
        0  -5   8  -3
        3   4  -1   2
        1   5   6  -4
  the value of minloc(A,MASK=A>-4) has the value (1,4).
  This is true even if A has a declared lower bound other
  than 1.

***minval 13.13.71  MINVAL (ARRAY, DIM, MASK)
MINVAL (ARRAY [, DIM] [, MASK])

  OPTIONAL ARGUMENTS.  DIM, MASK

  DESCRIPTION.  Minimum value of all the elements of ARRAY
  along dimension DIM corresponding to true elements of
  MASK.

  CLASS.  Transformational function.

  ARGUMENTS.

  ARRAY must be of type integer or real.  It must not be
  scalar.

  DIM (optional) must be scalar and of type integer with a
  value in the range 1 <= DIM <= n, where n is the rank of
  ARRAY.  The corresponding actual argument must not be an
  optional dummy argument.

  MASK (optional) must be of type logical and must be
  conformable with ARRAY.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  of the same type and kind type parameter as ARRAY.  It
  is scalar if DIM is absent or ARRAY has rank one;
  otherwise, the result is an array of rank n-1 and of
  shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn)
  where (d1, d2, ..., dn) is the shape of ARRAY.

  RESULT VALUE.

  Case (i):  The result of minval(ARRAY) has a value equal
  to the minimum value of all the elements of ARRAY or has
  the value of the positive number of the largest
  magnitude supported by the processor for numbers of the
  type and kind type parameter of ARRAY if ARRAY has size
  zero.

  Case (ii):  The result of minval(ARRAY, MASK=MASK) has a
  value equal to the minimum value of the elements of
  ARRAY corresponding to true elements of MASK or has the
  value of the positive number of the largest magnitude
  supported by the processor for numbers of the type and
  kind type parameter of ARRAY if there are no true
  elements.

  Case (iii):  If ARRAY has rank one,
  minval(ARRAY, DIM [,MASK]) has a value equal to that of
  minval(ARRAY [,MASK = MASK]).
  Otherwise, the value of
  element (s1, s2, ..., sDIM-1, sDIM+1, ..., sn) of
  minval(ARRAY, DIM [,MASK]) is equal to
  minval(ARRAY(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn),
  [, MASK=MASK(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn)]).

  EXAMPLES.

  Case (i):  The value of minval((/1,2,3/)) is 1.

  Case (ii):  minval(C, MASK=C>0.0) forms the minimum of
  the positive elements of C.

  Case (ii):  If B is the array
        1  3  5
        2  4  6
  minval(B,DIM=1) is (1, 3, 5) and
  minval(B,DIM=2) is (1,2)

***modulo 13.13.73  MODULO (A, P)
MODULO (A, P)

  DESCRIPTION.  Modulo function.

  CLASS.  Elemental function.

  ARGUMENTS.

  A must be of type integer or real.

  P must be of the same type and kind type parameter as A.

  RESULT TYPE AND TYPE PARAMETER.  Same as A.

  RESULT VALUE.

  Case (i):  A is of type integer.
  If P /= 0, modulo(A,P) has the value R such that
  A = Q * P + R, where Q is an integer, the inequalities
  0 <= R < P hold if P > 0, and P < R <= 0 hold if P < 0.
  If P = 0, the result is processor dependent.

  Case (ii):  A is of type real.  If P /= 0, the value of
  the result is A - floor(A/P) * P.  If P = 0, the result
  is processor dependent.

  EXAMPLES.
  modulo(8,  5) has the value 3.
  modulo(-8, 5) has the value 2.
  modulo(8, -5) has the value -2.
  modulo(-8,-5) has the value -3.

***mvbits 13.13.74  MVBITS (FROM, FROMPOS, LEN, TO, TOPOS)
MVBITS (FROM, FROMPOS, LEN, TO, TOPOS)

  DESCRIPTION.  Copies a sequence of bits from one data
  object to another.

  CLASS.  Elemental subroutine.

  ARGUMENTS.

  FROM must be of type integer.
  It is an intent(in) argument.

  FROMPOS must be of type integer and nonnegative.
  It is an intent(in) argument.
  FROMPOS+LEN must be less than or equal to bit_size(FROM)
  The model for the interpretation of an integer value as
  a sequence of bits is in the description (MODEL FOR BIT
  MANIPULATION AND INQUIRY PROCEDURES) found in the
  BIT_SIZE intrinsic procedure.

  LEN must be of type integer and nonnegative.
  It is an intent(in) argument.

  TO must be a container of type integer with the same
  kind type parameter value as FROM and may be the same
  container as FROM.
  It is an intent(inout) argument.
  TO is set by copying the sequence of bits of length LEN,
  starting at position FROMPOS of FROM to position TOPOS
  of TO.  No other bits of TO are altered.  On return, the
  LEN bits of TO starting at TOPOS are equal to the value
  that the LEN bits of FROM starting at FROMPOS had on
  entry.  The model for the interpretation of an integer
  value as a sequence of bits is in the description (MODEL
  FOR BIT MANIPULATION AND INQUIRY PROCEDURES) found in
  the BIT_SIZE intrinsic procedure.

  TOPOS must be of type integer and nonnegative.
  It is an intent(in) argument.
  TOPOS + LEN must be less than or equal to bit_size(TO).

  EXAMPLE.
  If TO has the initial value 6, the value of TO after the
  statement
   call mvbuts(7, 2, 2, TO, 0)
  is 5.
  If PATTERN is of kind SHORT, then after
   call mvbuts(PATTERN, 0, 1, PATTERN, 7)
  is run, PATTERN has a leading bit that is identical to
  its terminal bit.

***nearest 13.13.75  NEAREST (X, S)
NEAREST (X, S)

  DESCRIPTION.  Returns the nearest different machine
  representable number in a given direction.

  CLASS.  Elemental function.

  ARGUMENTS.

  X must be of type real.

  S must be of type real and not equal to zero.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to the
  machine representable number distinct from X and nearest
  to it in the direction of the infinity with the same
  sign as S.

  EXAMPLE.
  nearest(3.0,2.0) has the value 3+(2**(-22)) on a machine
  whose model is in the description (MODELS FOR INTEGER
  AND REAL DATA) found in the DIGITS intrinsic procedure.

***nint 13.13.76  NINT (A, KIND)
NINT (A [, KIND])

  OPTIONAL ARGUMENT.  KIND

  DESCRIPTION.  Nearest integer.

  CLASS.  Elemental function.

  ARGUMENTS.

  A must be of type real.

  KIND (optional) must be a scalar integer named constant.

  Result Type and Type Parameter.  Integer.  If KIND is
  present, the kind type parameter is that specified by
  KIND; otherwise, the kind type parameter is that of
  default integer type.

  RESULT VALUE.
  If A > 0, nint(A) has the value int(A+0.5);
  if A <= 0, nint (A) has the value int(A-0.5).
  The result is undefined if the processor cannot
  represent the result in the specified integer type.

  EXAMPLE.
  nint(2.783) has the value 3.
  nint(-1.99999999999_HIGH) has the value -2.

***not 13.13.77  NOT (I)
NOT (I)

  DESCRIPTION.  Performs a logical complement.

  CLASS.  Elemental function.

  ARGUMENT.  I must be of type integer.

  RESULT TYPE AND TYPE PARAMETER.  Same as I.

  RESULT VALUE.  The result has the value obtained by
  complementing I bit-by-bit according to the following
  truth table:

  I  not(I) 

  __________

  1    0  
  0    1  

  The model for the interpretation of an integer value as
  a sequence of bits is in the description (MODEL FOR BIT
  MANIPULATION AND INQUIRY PROCEDURES) found in the
  BIT_SIZE intrinsic procedure.

  EXAMPLE.
  If I is an integer of kind SHORT and has a value that is
  equal to 01010101 (base 2), not(I) has the value which
  is equal to 10101010 (base 2).

***pack 13.13.78  PACK (ARRAY, MASK, VECTOR)
PACK (ARRAY, MASK [, VECTOR])

  OPTIONAL ARGUMENT.  VECTOR

  DESCRIPTION.  Pack an array into an array of rank one
  under the control of a mask.

  CLASS.  Transformational function.

  ARGUMENTS.

  ARRAY may be of any type.  It must not be scalar.

  MASK must be of type logical and must be conformable
  with ARRAY.

  VECTOR (optional) must be of the same type and type
  parameters as ARRAY and must have rank one.  VECTOR must
  have at least as many elements as there are true
  elements in MASK.  If MASK is scalar with the value
  true, VECTOR must have at least as many elements as
  there are in ARRAY.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  an array of rank one with the same type and type
  parameters as ARRAY.  If VECTOR is present, the result
  size is that of VECTOR; otherwise, the result size is
  the number t of true elements in MASK unless MASK is
  scalar with the value true, in which case the result
  size is the size of ARRAY.

  RESULT VALUE.  Element i of the result is the element of
  ARRAY that corresponds to the ith true element of MASK,
  taking elements in array element order,
  for i = 1, 2, ..., t.
  If VECTOR is present and has size n  > t, element i of
  the result has the value VECTOR (i),
  for i = t + 1, ..., n.

  EXAMPLES.
  The nonzero elements of an array M with the value
        0  0  0
        9  0  0
        0  0  7
  may be "gathered" by the function PACK.
  The result of pack(M, MASK=M/=0) is (9, 7).
  The result of pack(M, M/=0, VECTOR=(/2,4,6,8,10,12/)) is
  (9,7,6,8,10,12).

***precision 13.13.79  PRECISION (X)
PRECISION (X)

  DESCRIPTION.  Returns the decimal precision in the model
  representing real numbers with the same kind type
  parameter as the argument.

  CLASS.  Inquiry function.

  ARGUMENT.  X must be of type real or complex.  It may be
  scalar or array valued.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.
  Default integer scalar.

  RESULT VALUE.  The result has the value
  int((p -1) * log10(b)) + k, where b and p are as defined
  in the description (MODELS FOR INTEGER AND REAL DATA)
  found in the DIGITS intrinsic procedure for the model
  representing numbers of the same type and kind type
  parameter as X, and where k is 1 if b is an integral
  power of 10 and 0 otherwise.

  EXAMPLE.
  precision(X) has the value int(23 * log10(2.0))
  which has the value INT (6.92...)
  which has the value  6 for real X whose model is in the
  description (MODELS FOR INTEGER AND REAL DATA) found in
  the DIGITS intrinsic procedure.

***present 13.13.80  PRESENT (A)
PRESENT (A)

  DESCRIPTION.  Determine whether an optional argument is
  present.

  CLASS.  Inquiry function.

  ARGUMENT.  A must be an optional argument of the
  procedure in which the PRESENT function reference
  appears.

  RESULT TYPE AND TYPE PARAMETERS.
  Default logical scalar.

  RESULT VALUE.  The result has the value true if A is
  present and otherwise has the value false.

  EXAMPLE.

  The following statements

   subroutine sub(a, b, extra)
     real, intent(in) :: a,b
     real, intent(in), optional :: extra
     real :: c
      if (present(extra)) then
         c = extra
      else
         c = (a+b)/2
      endif
   endsubroutine sub

   The statement
    call sub(10.0, 20.0, extra=30.0)
   will set C to 30.0.
   The statement
    call sub(10.0, 20.0)
   will set C to 15.0.

   An optional argument that is not present must not be
   referenced or defined or supplied as a nonoptional
   actual argument, except as the argument of the PRESENT
   intrinsic procedure.

***product 13.13.81  PRODUCT (ARRAY, DIM, MASK)
PRODUCT (ARRAY [, DIM] [, MASK])

  OPTIONAL ARGUMENTS.  DIM, MASK

  DESCRIPTION.  Product of all the elements of ARRAY along
  dimension DIM corresponding to the true elements of
  MASK.

  CLASS.  Transformational function.

  ARGUMENTS.

  ARRAY must be of type integer, real, or complex.  It
  must not be scalar.

  DIM (optional) must be scalar and of type integer with a
  value in the range 1 <= DIM <= n, where n is the rank of
  ARRAY.  The corresponding actual argument must not be an
  optional dummy argument.

  MASK (optional) must be of type logical and must be
  conformable with ARRAY.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  of the same type and kind type parameter as ARRAY.  It
  is scalar if DIM is absent or ARRAY has rank one;
  otherwise, the result is an array of rank n-1 and of
  shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn)
  where (d1, d2, ..., dn) is the shape of ARRAY.

  RESULT VALUE.

  Case (i):  The result of product(ARRAY) has a value
  equal to a processor-dependent approximation to the
  product of all the elements of ARRAY or has the value
  one if ARRAY has size zero.

  Case (ii):  The result of product(ARRAY, MASK=MASK) has
  a value equal to a processor-dependent approximation to
  the product of the elements of ARRAY corresponding to
  the true elements of MASK or has the value one if there
  are no true elements.

  Case (iii):  If ARRAY has rank one,
  product(ARRAY, DIM [,MASK]) has a value equal to that of
  product(ARRAY [,MASK=MASK ]).  Otherwise, the value of
  element (s1, s2, ..., sDIM-1, sDIM+1, ..., sn) of
  product(ARRAY, DIM [,MASK]) is equal to
  product(ARRAY (s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn)
  [,MASK=MASK (s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn)]).

  EXAMPLES.

  Case (i):  The value of product((/1,2,3/)) is 6.

  Case (ii):  product(C, MASK=C>0.0) forms the product of
  the positive elements of C.

  Case (iii):  If B is the array
        1  3  5
        2  4  6
  product(B, DIM=1) is (2, 12, 30) and
  product(B, DIM=2) is (15, 48).

***radix 13.13.82  RADIX (X)
RADIX (X)

  DESCRIPTION.  Returns the base of the model representing
  numbers of the same type and kind type parameter as the
  argument.

  CLASS.  Inquiry function.

  ARGUMENT.  X must be of type integer or real.  It may be
  scalar or array valued.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.
  Default integer scalar.

  RESULT VALUE.  The result has the value r if X is of
  type integer and the value b if X is of type real, where
  r and b are as defined in the description (MODELS FOR
  INTEGER AND REAL DATA) found in the DIGITS intrinsic
  procedure for the model representing numbers of the same
  type and kind type parameter as X.

  EXAMPLE.
  radix(X) has the value 2 for real X whose model is in
  the description (MODELS FOR INTEGER AND REAL DATA) found
  in the DIGITS intrinsic procedure.

***random_number 13.13.83  RANDOM_NUMBER (HARVEST)
RANDOM_NUMBER (HARVEST)

  DESCRIPTION.  Returns one pseudorandom number or an
  array of pseudorandom numbers from the uniform
  distribution over the range 0 <= x < 1.

  CLASS.  Subroutine.

  ARGUMENT.  HARVEST must be of type real.
  It is an intent(out) argument.
  It may be a scalar or an array container.  It is set to
  contain pseudorandom numbers from the uniform
  distribution in the interval 0 <= x < 1.

  EXAMPLES.

  real, dimension(10,10) :: Y
  real                   :: X
   ! Initialize X with a pseudorandom number
   call random_number(X)
   call random_number(Y)

***random_seed 13.13.84  RANDOM_SEED (SIZE, PUT, GET)
RANDOM_SEED ([SIZE] [, PUT] [, GET])

  OPTIONAL ARGUMENTS.  SIZE, PUT, GET

  DESCRIPTION.  Restarts or queries the pseudorandom
  number generator used by RANDOM_NUMBER.

  CLASS.  Subroutine.

  ARGUMENTS.  There must either be exactly one or no
  arguments present.

  SIZE (optional) must be scalar and of type default
  integer.
  It is an intent(out) argument.
  It is set to the number N of integers that the processor
  uses to hold the value of the seed.

  PUT (optional) must be a default integer array of rank
  one and size >= N.
  It is an intent(in) argument.
  It is used by the processor to set the seed value.

  GET (optional) must be a default integer array of rank
  one and size >= N.
  It is an intent(out) argument.
  It is set by the processor to the current value of the
  seed.

  If no argument is present, the processor sets the seed
  to a processor-dependent value.

  EXAMPLES.

  call random_seed              ! Processor initialization
  call random_seed(SIZE=K)       ! Sets K = N
  call random_seed(PUT=SEED(1:K)) ! Set user seed
  call random_seed(GET=OLD(1:K))   ! Read current seed

***range 13.13.85  RANGE (X)
RANGE (X)

  DESCRIPTION.  Returns the decimal exponent range in the
  model representing integer or real numbers with the same
  kind type parameter as the argument.

  CLASS.  Inquiry function.

  ARGUMENT.  X must be of type integer, real, or complex.
  It may be scalar or array valued.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.
  Default integer scalar.

  RESULT VALUE.

  Case (i):  For an integer argument, the result has the
  value int(log10(huge)), where huge is the largest
  positive integer as defined in the description (MODELS
  FOR INTEGER AND REAL DATA) found in the DIGITS intrinsic
  procedure for the model representing numbers of the same
  type and kind type parameter as X.

  Case (ii):  For a real or complex argument, the result
  has the value int(min(log10(huge), -log10(tiny))), where
  huge and tiny are the largest and smallest positive
  numbers as defined in the description (MODELS FOR
  INTEGER AND REAL DATA) found in the DIGITS intrinsic
  procedure for the model representing numbers of the same
  type and kind type parameter as X.

  EXAMPLE.
  range(X) has the value 38 for real X whose model is in
  the description (MODELS FOR INTEGER AND REAL DATA) found
  in the DIGITS intrinsic procedure, because in this case
  huge = (1-(2**(-24)))*(2**127)

***real 13.13.86  REAL (A, KIND)
REAL (A [, KIND])

  OPTIONAL ARGUMENT.  KIND

  DESCRIPTION.  Convert to real type.

  CLASS.  Elemental function.

  ARGUMENTS.

  A must be of type integer, real, or complex.

  KIND (optional) must be a scalar integer named constant.

  RESULT TYPE AND TYPE PARAMETER.  Real.

  Case (i):  If A is of type integer or real and KIND is
  present, the kind type parameter is that specified by
  KIND.  If A is of type integer or real and KIND is not
  present, the kind type parameter is the
  processor-dependent kind type parameter for the default
  real type.

  Case (ii):  If A is of type complex and KIND is present,
  the kind type parameter is that specified by KIND.  If A
  is of type complex and KIND is not present, the kind
  type parameter is the kind type parameter of A.

  RESULT VALUE.

  Case (i):  If A is of type integer or real, the result
  is equal to a processor-dependent approximation to A.

  Case (ii):  If A is of type complex, the result is equal
  to a processor-dependent approximation to the real part
  of A.

  EXAMPLES.
  real(-3) has the value -3.0.
  real(Z) has the same kind type parameter and the same
  value as the real part of the complex container Z.

***repeat 13.13.87  REPEAT (STRING, NCOPIES)
REPEAT (STRING, NCOPIES)

  DESCRIPTION.  Concatenate several copies of a string.

  CLASS.  Transformational function.

  ARGUMENTS.

  STRING must be scalar and of type character.

  NCOPIES must be scalar and of type integer.  Its value
  must not be negative.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  Character
  scalar of length NCOPIES times that of STRING.

  RESULT VALUE.  The value of the result is the
  concatenation of NCOPIES copies of STRING.

  EXAMPLES.
  repeat("H",3) has the value HHH.
  repeat("XYZ",0) has the value of a zero-length string.

***reshape 13.13.88  RESHAPE (SOURCE, SHAPE, PAD, ORDER)
RESHAPE (SOURCE, SHAPE [, PAD] [, ORDER])

  OPTIONAL ARGUMENTS.  PAD, ORDER

  DESCRIPTION.  Constructs an array of a specified shape
  from the elements of a given array.

  CLASS.  Transformational function.

  ARGUMENTS.

  SOURCE may be of any type.  It must be array valued.
  If PAD is absent or of size zero, the size of SOURCE
  must be greater than or equal to product(SHAPE).  The
  size of the result is the product of the values of the
  elements of SHAPE.

  SHAPE must be of type integer, rank one, and constant
  size.  Its size must be positive and less than 8.  It
  must not have an element whose value is negative.

  PAD (optional) must be of the same type and type
  parameters as SOURCE.  PAD must be array valued.

  ORDER (optional) must be of type integer, must have the
  same shape as SHAPE, and its value must be a permutation
  of (1, 2, ..., n), where n is the size of SHAPE.  If
  absent, it is as if it were present with
  value (1, 2, ..., n).

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  an array of shape SHAPE
  (that is,
   shape(reshape(SOURCE, SHAPE, PAD, ORDER))
  is equal to SHAPE)
  with the same type and type parameters as SOURCE.

  RESULT VALUE.  The elements of the result, taken in
  permuted subscript order ORDER (1), ..., ORDER (n), are
  those of SOURCE in normal array element order followed
  if necessary by those of PAD in array element order,
  followed if necessary by additional copies of PAD in
  array element order.

  EXAMPLES.
  reshape((/1,2,3,4,5,6/), (/2,3/)) has the value
        1  3  5
        2  4  6
  reshape((/1,2,3,4,5,6/), (/2,4/), &
          PAD=(/0,0/), ORDER=(/2,1/))
  has the value
        1  2  3  4
        5  6  0  0

***rrspacing 13.13.89  RRSPACING (X)
RRSPACING (X)

  DESCRIPTION.  Returns the reciprocal of the relative
  spacing of model numbers near the argument value.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.
  The result has the value | X*(b**(-e)) | * (b**p)
  where b, e, and p are as defined in the description
  (MODELS FOR INTEGER AND REAL DATA) found in the DIGITS
  intrinsic procedure for the model represention of X.

  EXAMPLE.
  rrspacing(-3.0) has the value 0.75 * (2**24) for reals
  whose model is in the description (MODELS FOR INTEGER
  AND REAL DATA) found in the DIGITS intrinsic procedure.

***scale 13.13.90  SCALE (X, I)
SCALE (X, I)

  DESCRIPTION.  Returns X * (b**I) where b is the base in
  the model representation of X.

  CLASS.  Elemental function.

  ARGUMENTS.

  X must be of type real.

  I must be of type integer.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has the value X * (b**I),
  where b is defined in the description (MODELS FOR
  INTEGER AND REAL DATA) found in the DIGITS intrinsic
  procedure for the model representing values of X,
  provided this result is within range; if not, the result
  is processor dependent.

  EXAMPLE.
  scale(3.0, 2) has the value 12.0 for reals whose model
  is in the description (MODELS FOR INTEGER AND REAL DATA)
  found in the DIGITS intrinsic procedure.

***scan 13.13.91  SCAN (STRING, SET, BACK)
SCAN (STRING, SET [, BACK])

  OPTIONAL ARGUMENT.  BACK

  DESCRIPTION.  Scan a string for any one of the
  characters in a set of characters.

  CLASS.  Elemental function.

  ARGUMENTS.

  STRING must be of type character.

  SET must be of type character.

  BACK (optional) must be of type logical.

  RESULT TYPE AND TYPE PARAMETER.  Default integer.

  RESULT VALUE.

  Case (i):  If BACK is absent or is present with the
  value false and if STRING contains at least one
  character that is in SET, the value of the result is the
  position of the leftmost character of STRING that is in
  SET.

  Case (ii):  If BACK is present with the value true and
  if STRING contains at least one character that is in
  SET, the value of the result is the position of the
  rightmost character of STRING that is in SET.

  Case (iii):  The value of the result is zero if no
  character of STRING is in SET or if the length of STRING
  or SET is zero.

  EXAMPLES.

  Case (i):
  scan("F World", "or") has the value 4.

  Case (ii):
  scan("F World", "or", BACK=.true.) has the value 5.

  Case (iii):
  scan("F World", "abc") has the value 0.

***selected_int_kind 13.13.92  SELECTED_INT_KIND (R)
SELECTED_INT_KIND (R)

  DESCRIPTION.  Returns a value of the kind type parameter
  of an integer data type that represents all integer
  values n with -10**R < n < 10**R.

  CLASS.  Transformational function.

  ARGUMENT.  R must be scalar and of type integer.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.
  Default integer scalar.

  RESULT VALUE.  The result has a value equal to the value
  of the kind type parameter of an integer data type that
  represents all values n in the range of values n with
  -10**R < n < 10**R, or if no such kind type parameter is
  available on the processor, the result is -1.  If more
  than one kind type parameter meets the criteria, the
  value returned is the one with the smallest decimal
  exponent range, unless there are several such values, in
  which case the smallest of these kind values is
  returned.

  EXAMPLE.
  selected_int_kind(6) has the value kind(0) on a machine
  that supports a default integer representation method
  with r = 2 and q = 31 as defined in the description
  (MODELS FOR INTEGER AND REAL DATA) found in the DIGITS
  intrinsic procedure.
  selected_int_kind(2) has the value of SHORT on a
  machine that supports this integer kind.

***selected_real_kind 13.13.93  SELECTED_REAL_KIND (P, R)
SELECTED_REAL_KIND ([P] [, R])

  OPTIONAL ARGUMENTS.  P, R

  DESCRIPTION.  Returns a value of the kind type parameter
  of a real data type with decimal precision of at least P
  digits and a decimal exponent range of at least R.

  CLASS.  Transformational function.

  ARGUMENTS.  At least one argument must be present.

  P (optional) must be scalar and of type integer.

  R (optional) must be scalar and of type integer.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.
  Default integer scalar.

  RESULT VALUE.  The result has a value equal to a value
  of the kind type parameter of a real data type with
  decimal precision, as returned by the function
  PRECISION, of at least P digits and a decimal exponent
  range, as returned by the function RANGE, of at least R,
  or if no such kind type parameter is available on the
  processor, the result is -1 if the precision is not
  available, -2 if the exponent range is not available,
  and -3 if neither is available.  If more than one kind
  type parameter value meets the criteria, the value
  returned is the one with the smallest decimal precision,
  unless there are several such values, in which case the
  smallest of these kind values is returned.

  EXAMPLE.
  selected_real_kind(6, 70) has the value kind(0.0) on a
  machine that supports a default real approximation
  method with b = 16, p = 6, emin = -64, and emax = 63 as
  defined in the description (MODELS FOR INTEGER AND REAL
  DATA) found in the DIGITS intrinsic procedure.
  selected_real_kind(P=14) returns the value HIGH on a
  machine that supports this real kind.

***set_exponent 13.13.94  SET_EXPONENT (X, I)
SET_EXPONENT (X, I)

  DESCRIPTION.  Returns the model number whose fractional
  part is the fractional part of the model representation
  of X and whose exponent part is I.

  CLASS.  Elemental function.

  ARGUMENTS.

  X must be of type real.

  I must be of type integer.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has the value X * (b**(I-e)),
  where b and e are as defined in the description (MODELS
  FOR INTEGER AND REAL DATA) found in the DIGITS intrinsic
  procedure for the model representing values of X,
  provided this result is within range; if not, the result
  is processor dependent.  If X has value zero, the result
  has value zero.

  EXAMPLE.
  set_exponent(3.0, 1) has the value 1.5 for reals whose
  model is in the description (MODELS FOR INTEGER AND REAL
  DATA) found in the DIGITS intrinsic procedure.

***shape 13.13.95  SHAPE (SOURCE)
SHAPE (SOURCE)

  DESCRIPTION.  Returns the shape of an array or a scalar.

  CLASS.  Inquiry function.

  ARGUMENT.  SOURCE may be of any type.  It may be array
  valued or scalar.  It must not be a pointer that is
  disassociated or an allocatable array that is not
  allocated.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is a
  default integer array of rank one whose size is equal to
  the rank of SOURCE.

  RESULT VALUE.
  The value of the result is the shape of SOURCE.

  EXAMPLES.
  The value of shape(A(2:5,-1:1)) is (4, 3).
  The value of shape(3) is the rank-one array of size zero.

***sign 13.13.96  SIGN (A, B)
SIGN (A, B)

  DESCRIPTION.  Absolute value of A times the sign of B.

  CLASS.  Elemental function.

  ARGUMENTS.

  A must be of type integer or real.

  B must be of the same type and kind type parameter as A.

  RESULT TYPE AND TYPE PARAMETER.  Same as A.

  RESULT VALUE.  The value of the result is |A| if B >= 0
  and -|A| if B < 0.

  EXAMPLE.
  sign(-3.0,2.0) has the value 3.0.

***sin 13.13.97  SIN (X)
SIN (X)

  DESCRIPTION.  Sine function.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real or complex.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a
  processor-dependent approximation to sin(X).  If X is of
  type real, it is regarded as a value in radians.  If X
  is of type complex, its real part is regarded as a value
  in radians.

  EXAMPLE.
  sin(1.0) has the value 0.84147098.


***sinh 13.13.98  SINH (X)
SINH (X)

  DESCRIPTION.  Hyperbolic sine function.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a
  processor-dependent approximation to sinh(X).

  EXAMPLE.
  sinh(1.0) has the value 1.1752012.


***size 13.13.99  SIZE (ARRAY, DIM)
SIZE (ARRAY [, DIM])

  OPTIONAL ARGUMENT.  DIM

  DESCRIPTION.  Returns the extent of an array along a
  specified dimension or the total number of elements in
  the array.

  CLASS.  Inquiry function.

  ARGUMENTS.

  ARRAY may be of any type.  It must not be scalar.  It
  must not be a pointer that is disassociated or an
  allocatable array that is not allocated.

  DIM (optional) must be scalar and of type integer with a
  value in the range 1 <= DIM <= n, where n is the rank of
  ARRAY.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.
  Default integer scalar.

  RESULT VALUE.  The result has a value equal to the
  extent of dimension DIM of ARRAY or, if DIM is absent,
  the total number of elements of ARRAY.

  EXAMPLES.
  The value of size(A(2:5,-1:1), DIM=2) is 3.
  The value of size(A(2:5,-1:1)) is 12.

***spacing 13.13.100  SPACING (X)
SPACING (X)

  DESCRIPTION.  Returns the absolute spacing of model
  numbers near the argument value.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  If x is not zero, the result has the
  value b**(e-p), where b, e, and p are as defined in the
  description (MODELS FOR INTEGER AND REAL DATA) found in
  the DIGITS intrinsic procedure for the model
  representing values of X, provided this result is within
  range.  Otherwise, the result is the same as that of
  tiny(X).

  EXAMPLE.
  spacing(3.0) has the value 2**(-22) for reals whose
  model is in the description (MODELS FOR INTEGER AND REAL
  DATA) found in the DIGITS intrinsic procedure.

***spread 13.13.101  SPREAD (SOURCE, DIM, NCOPIES)
SPREAD (SOURCE, DIM, NCOPIES)

  DESCRIPTION.  Replicates an array by adding a dimension.
  Broadcasts several copies of SOURCE along a specified
  dimension (as in forming a book from copies of a single
  page) and thus forms an array of rank one greater.

  CLASS.  Transformational function.

  ARGUMENTS.

  SOURCE may be of any type.  It may be scalar or array
  valued.  The rank of SOURCE must be less than 7.

  DIM must be scalar and of type integer with value in the
  range 1 <= DIM <= n+1, where n is the rank of SOURCE.

  NCOPIES must be scalar and of type integer.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  an array of the same type and type parameters as SOURCE
  and of rank n+1, where n is the rank of SOURCE.

  Case (i):  If SOURCE is scalar, the shape of the result
  is (max(NCOPIES,0)).

  Case (ii):  If SOURCE is array valued with shape
  (d1, d2, ..., dn), the shape of the result is
  (d1, d2, ..., dDIM-1, max(NCOPIES,0), dDIM, ..., dn).

  RESULT VALUE.

  Case (i):  If SOURCE is scalar, each element of the
  result has a value equal to SOURCE.

  Case (ii):  If SOURCE is array valued, the element of
  the result with subscripts (r1, r2, ..., rn+1) has the
  value SOURCE (r1, r2, ..., rDIM-1, rDIM+1, ..., rn+1).

  EXAMPLE.
  Case (i):
  spread("A", 1, 3) has the value (/"A","A","A"/)

  Case (ii):  If A is the vector (2, 3, 4),
  spread(A, DIM=1, NCOPIES=NC) is the array
        2  3  4
        2  3  4
        2  3  4
  if NC has the value 3 and is a zero-sized array if NC
  has the value 0.

***sqrt 13.13.102  SQRT (X)
SQRT (X)

  DESCRIPTION.  Square root.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real or complex.  Unless X
  is complex, its value must be greater than or equal to
  zero.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a
  processor-dependent approximation to the square root of
  X.  A result of type complex is the principal value with
  the real part greater than or equal to zero.  When the
  real part of the result is zero, the imaginary part is
  greater than or equal to zero.

  EXAMPLE.
  sqrt(4.0) has the value 2.0.
  sqrt(5.0_HIGH) has the value 2.23606774998_HIGH.

***sum 13.13.103  SUM (ARRAY, DIM, MASK)
SUM (ARRAY [, DIM] [, MASK])

  OPTIONAL ARGUMENTS.  DIM, MASK

  DESCRIPTION.  Sum all the elements of ARRAY along
  dimension DIM corresponding to the true elements of
  MASK.

  CLASS.  Transformational function.

  ARGUMENTS.

  ARRAY must be of type integer, real, or complex.
  It must not be scalar.

  DIM (optional) must be scalar and of type integer with a
  value in the range 1 <= DIM <= n, where n is the rank of
  ARRAY.  The corresponding actual argument must not be an
  optional dummy argument.

  MASK (optional) must be of type logical and must be
  conformable with ARRAY.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  of the same type and kind type parameter as ARRAY.  It
  is scalar if DIM is absent or ARRAY has rank one;
  otherwise, the result is an array of rank n-1 and of
  shape (d1, d2, ..., dDIM-1, dDIM+1, ..., dn)
  where (d1, d2, ..., dn) is the shape of ARRAY.

  RESULT VALUE.

  Case (i):  The result of sum(ARRAY) has a value equal to
  a processor-dependent approximation to the sum of all
  the elements of ARRAY or has the value zero if ARRAY has
  size zero.

  Case (ii):  The result of sum(ARRAY, MASK=MASK) has a
  value equal to a processor-dependent approximation to
  the sum of the elements of ARRAY corresponding to the
  true elements of MASK or has the value zero if there are
  no true elements.

  Case (iii):  If ARRAY has rank one,
  sum(ARRAY, DIM [,MASK]) has a value equal to that of
  sum(ARRAY [,MASK=MASK]). Otherwise, the value of element
  (s1, s2, ..., sDIM-1, sDIM+1, ..., sn) of
  sum(ARRAY, DIM [,MASK]) is equal to
  sum(ARRAY(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn)
   [,MASK=MASK(s1, s2, ..., sDIM-1, :, sDIM+1, ..., sn)]).

  EXAMPLES.

  Case (i):  The value of sum((/1,2,3/)) is 6.

  Case (ii):  sum(C, MASK=C>0.0) forms the arithmetic sum
  of the positive elements of C.

  Case (iii):  If B is the array
        1  3  5
        2  4  6
  sum(B, DIM=1) is (3, 7, 11) and
  sum(B, DIM=2) is (9, 12)

***system_clock 13.13.104  SYSTEM_CLOCK (COUNT, COUNT_RATE, COUNT_MAX)
SYSTEM_CLOCK ([COUNT] [, COUNT_RATE] [, COUNT_MAX])

  OPTIONAL ARGUMENTS.  COUNT, COUNT_RATE, COUNT_MAX

  DESCRIPTION.  Returns integer data from a real-time
  clock.

  CLASS.  Subroutine.

  ARGUMENTS.

  COUNT (optional) must be scalar and of type default
  integer.  It is an intent(out) argument.
  It is set to a processor-dependent value based on the
  current value of the processor clock or to -huge(0) if
  there is no clock.  The processor-dependent value is
  incremented by one for each clock count until the value
  COUNT_MAX is reached and is reset to zero at the next
  count.  It lies in the range 0 to COUNT_MAX if there
  is a clock.

  COUNT_RATE (optional) must be scalar and of type default
  integer.  It is an intent(out) argument.
  It is set to the number of processor clock counts per
  second, or to zero if there is no clock.

  COUNT_MAX (optional) must be scalar and of type default
  integer.  It is an intent(out) argument.
  It is set to the maximum value that COUNT can have, or
  to zero if there is no clock.

  EXAMPLE.  If the processor clock is a 24-hour clock that
  registers time in 1-second intervals, at 11:30 A.M. the
  reference

  call system_clock(COUNT=C, COUNT_RATE=R, COUNT_MAX=M)

  sets C = 11 * 3600 + 30 * 60 = 41400
       R = 1
       M = 24 * 3600 - 1 = 86399

***tan 13.13.105  TAN (X)
TAN (X)

  DESCRIPTION.  Tangent function.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a
  processor-dependent approximation to tan(X), with X
  regarded as a value in radians.

  EXAMPLE.
  tan(1.0) has the value 1.5574077.
  tan(2.0_HIGH) has the value -2.1850398632615_HIGH.

***tanh 13.13.106  TANH (X)
TANH (X)

  DESCRIPTION.  Hyperbolic tangent function.

  CLASS.  Elemental function.

  ARGUMENT.  X must be of type real.

  RESULT TYPE AND TYPE PARAMETER.  Same as X.

  RESULT VALUE.  The result has a value equal to a
  processor-dependent approximation to tanh(X).

  EXAMPLE.
  tanh(1.0) has the value 0.76159416.

***tiny 13.13.107  TINY (X)
TINY (X)

  DESCRIPTION.  Returns the smallest positive number in
  the model representing numbers of the same type and
  kind type parameter as the argument.

  CLASS.  Inquiry function.

  ARGUMENT.  X must be of type real.  It may be scalar
  or array valued.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  Scalar with the
  same type and kind type parameter as X.

  RESULT VALUE.  The result has the value b**(emin-1)
  where b and emin are as defined in the description
  (MODELS FOR INTEGER AND REAL DATA) found in the DIGITS
  intrinsic procedure for the model representing numbers
  of the same type and kind type parameter as X.

  EXAMPLE.
  tiny(X) has the value 2**(-127) for real X whose model
  is in the description (MODELS FOR INTEGER AND REAL DATA)
  found in the DIGITS intrinsic procedure.

***transpose 13.13.109  TRANSPOSE (MATRIX)
TRANSPOSE (MATRIX)

  DESCRIPTION.  Transpose an array of rank two.

  CLASS.  Transformational function.

  ARGUMENT.
  MATRIX may be of any type and must have rank two.

  RESULT TYPE, TYPE PARAMETERS, AND SHAPE.  The result is
  an array of the same type and type parameters as MATRIX
  and with rank two and shape(n,m) where (m,n) is the
  shape of MATRIX.

  RESULT VALUE.  Element (i,j) of the result has the value
  MATRIX (j,i), i = 1, 2, ..., n; j = 1, 2, ..., m.

  EXAMPLE.
  If A is the array
        1  2  3
        4  5  6
        7  8  9
  transpose(A) has the value
        1  4  7
        2  5  8
        3  6  9

***trim 13.13.110  TRIM (STRING)
TRIM (STRING)

  DESCRIPTION.  Returns the argument with trailing blank
  characters removed.

  CLASS.  Transformational function.

  ARGUMENT.
  STRING must be of type character and must be a scalar.

  RESULT TYPE AND TYPE PARAMETERS.  Character with a
  length that is the length of STRING less the number of
  trailing blanks in STRING.

  RESULT VALUE.  The value of the result is the same as
  STRING except any trailing blanks are removed.  If
  STRING contains no nonblank characters, the result has
  zero length.

  EXAMPLE.
  trim(" A B  ") has the value " A B".
  trim("      ") has the value "".

***ubound 13.13.111  UBOUND (ARRAY, DIM)
UBOUND (ARRAY [, DIM])

  OPTIONAL ARGUMENT.  DIM

  DESCRIPTION.  Returns all the upper bounds of an array
  or a specified upper bound.

  CLASS.  Inquiry function.

  ARGUMENTS.

  ARRAY may be of any type.  It must not be scalar.  It
  must not be a pointer that is disassociated or an
  allocatable array that is not allocated.

  DIM (optional) must be scalar and of type integer with a
  value in the range 1 <= DIM <= n, where n is the rank of
  ARRAY.  The corresponding actual argument must not be an
  optional dummy argument.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  of type default integer.  It is scalar if DIM is
  present; otherwise, the result is an array of rank one
  and size n, where n is the rank of ARRAY.

  RESULT VALUE.

  Case (i):  For an array section or for an array
  expression, other than a whole array or array structure
  component, ubound(ARRAY, DIM) has a value equal to the
  number of elements in the given dimension; otherwise, it
  has a value equal to the upper bound for subscript DIM
  of ARRAY if dimension DIM of ARRAY does not have size
  zero and has the value zero if dimension DIM has size
  zero.

  Case (ii):  ubound(ARRAY) has a value whose ith
  component is equal to ubound(ARRAY, i), for
  i = 1, 2, ..., n, where n is the rank of ARRAY.

  EXAMPLES.
  The following statements

   real, dimension(2:3, 7:10), target :: A
   real, pointer, dimension(:,:) :: B, C, D
    B => A
    C => A(:,:)
    allocate(D(-3:3,-7:7))
    print *, ubound(A)
    print *, ubound(A,DIM=2)
    print *, ubound(B)
    print *, ubound(C)
    print *, ubound(D)

  will print
    3   10
    10
    3   10
    2   4
    3   7

***unpack 13.13.112  UNPACK (VECTOR, MASK, FIELD)
UNPACK (VECTOR, MASK, FIELD)

  DESCRIPTION.  Unpack an array of rank one into an array
  under the control of a mask.

  CLASS.  Transformational function.

  ARGUMENTS.

  VECTOR may be of any type.  It must have rank one.  Its
  size must be at least t where t is the number of true
  elements in MASK.

  MASK must be array valued and of type logical.

  FIELD must be of the same type and type parameters as
  VECTOR and must be conformable with MASK.

  RESULT TYPE, TYPE PARAMETER, AND SHAPE.  The result is
  an array of the same type and type parameters as VECTOR
  and the same shape as MASK.

  RESULT VALUE.  The element of the result that
  corresponds to the ith true element of MASK, in array
  element order, has the value VECTOR (i)
  for i = 1, 2, ..., t, where t is the number of true
  values in MASK.  Each other element has a value equal to
  FIELD if FIELD is scalar or to the corresponding element
  of FIELD if it is an array.

  EXAMPLES.  Specific values may be "scattered" to
  specific positions in an array by using UNPACK.
  If M is the array
        1  0  0
        0  1  0
        0  0  1
  and V is the vector (1, 2, 3)
  and Q is the logical mask
        .false.  .true.    .false.
        .true.   .false.   .false.
        .false.  .false.   .true.
  unpack(V, MASK=Q, FIELD=M) has the value
        1  2  0
        1  1  0
        0  0  3
  unpack(V, MASK=Q, FIELD=0) has the value
        0  2  0
        1  0  0
        0  0  3

***verify 13.13.113  VERIFY (STRING, SET, BACK)
VERIFY (STRING, SET [, BACK])

  OPTIONAL ARGUMENT.  BACK

  DESCRIPTION.  Verify that a set of characters contains
  all the characters in a string by identifying the
  position of the first character in a string of
  characters that does not appear in a given set of
  characters.

  CLASS.  Elemental function.

  ARGUMENTS.

  STRING must be of type character.

  SET must be of type character.

  BACK (optional) must be of type logical.

  RESULT TYPE AND TYPE PARAMETER.  Default integer.

  RESULT VALUE.

  Case (i):  If BACK is absent or present with the value
  false and if STRING contains at least one character that
  is not in SET, the value of the result is the position
  of the leftmost character of STRING that is not in SET.

  Case (ii):  If BACK is present with the value true and
  if STRING contains at least one character that is not in
  SET, the value of the result is the position of the
  rightmost character of STRING that is not in SET.

  Case (iii):  The value of the result is zero if each
  character in STRING is in SET or if STRING has zero
  length.

  EXAMPLES.

  Case (i):
  verify("EFFE", "E") has the value 2.

  Case (ii):
  verify("EFFE", "E", BACK=.true.) has the value 3.

  Case (iii):
  verify("EFFE", "EF") has the value 0.
***END
