subroutine aptrfps (xmin, xmax, xran)

ccbeg.
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
c                             SUBROUTINE APTRFPS
c
c     call aptrfps (xmin, xmax, xran)
c
c     Version:  aptrfps  Updated    1990 December 12 12:00.
c               aptrfps  Originated 1990 December 12 12:00.
c
c     Author:   Arthur L. Edwards, LLNL, L-298, Telephone (925) 422-4123.
c
c
c     Purpose:  To randomly sample a value uniformly between xmin and xmax,
c               and store the result in xran.  All are floating-point.
c
c     Input:    xmin, xmax.
c
c     Output:   xran.
c
c     Glossary:
c
c     xmin      Input    The minimum floating-point value to be sampled.
c
c     xmax      Input    The maximum floating-point value to be sampled.
c
c     xran      Output   The randomly sampled floating-point value.
c
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccend.
cbugc***DEBUG begins.
cbug 9901 format (/ 'aptrfps sampling from integers.' /
cbug     &  '  xmin=',1pe22.14,' xmax=',1pe22.14)
cbug      write ( 3, 9901) xmin, xmax
cbugc***DEBUG ends.

c.... Randomly sample a floating-point value.

      xran = xmin + ranf( ) * (xmax - xmin)
cbugc***DEBUG begins.
cbug 9904 format (/ 'aptrfps results:  xran=',1pe22.14)
cbug      write ( 3, 9904) xran
cbugc***DEBUG ends.

      return

c.... End of subroutine aptrfps.      (+1 line.)
      end

UCRL-WEB-209832