PURPOSE:
=========

The purpose of this package is the computation of 
the Real Parabolic Cylinder Functions W(a,x), W(a,-x) and
their derivatives.
   a and x are real variables and x>=0. 

THIS PACKAGE CONTAINS THE FOLLOWING FILES: 
==========================================
 
1.  cons.f90        Includes the module Someconstants for internal 
                    global parameters

2.  constants       Data file for the module Someconstants 

3.  air.f90         Includes the module AiryFunction for the 
                    computation of real Airy functions

4.  parabw.f90      Includes the module Parabolw for the computation 
                    of the real Parabolic Cylinder Functions W(a,x),
                    W(a,-x) and their derivatives

5.  testw.f90       Test program for the module Parabolw

Here is an example set of compiler/linker commands for building
the programs using the GNU Fortran compiler g95. 
Options: -c compile to object code -- don't make executable
 
g95 -c cons.f90 
g95 -c air.f90 
g95 -c parabw.f90 
g95 -c testw.f90 
g95 cons.o air.o parabw.o testw.o -o testw

where testw is the name of the executable file.
Basically the first files are compiled as object code libraries, and
then a program using parabw (testw) is compiled and linked to those libraries.


DESCRIPTION OF THE MODULE PARABOLW
===================================

The public routine of the module Parabolw is parabw, which
computes the functions W(a,x), W(a,-x) and their first
derivatives.

 CALLING SEQUENCE
 ----------------

 The calling sequence for the routine parabw is the following

 SUBROUTINE parabw(a,x,mode,waxx,wamx,ierr)
 REAL(r8), INTENT(IN) :: a
 REAL(r8), INTENT(IN) :: x
 INTEGER,  INTENT(IN) :: mode
 REAL(r8), INTENT(OUT) :: waxx(2), wamx(2) 
 INTEGER,  INTENT(OUT) :: ierr
 where r8 represents the available double precision 
 arithmetics.

  Inputs and outputs
  ------------------
  
   INPUTS: 
           mode --> scaling factor. If mode=0, the routine
                    computes plain functions. If mode=1, 
                    the routine computes scaled functions
                                               (SEE BELOW). 
           a    -->  order of the function
           x    -->  argument of the function


   OUTPUTS:  
       

           waxx(1)   --> W(a,x)  function.
           waxx(2)   --> W'(a,x) function.
           wamx(1)   --> W(a,-x)  function
           wamx(2)   --> W'(a,-x) function
           ierr      --> error flag. 
                     + If ierr=0, the computation was
                       successful. 
                     + If ierr=1, the computation was
                       out of range. This flag suggests the use of
                       the scaling factor mode=1. 
                     + If ierr=2, the argument x of the function is
                       out of range (x<0). In this case the function 
                       values are set to zero.


Other routines included in the module Parabolw which are used by 
the routine parab are:

  waxsma:   computes the functions using Maclaurin series.
  taylor :  computes the functions using the Taylor method for 
            solving numerically the ODEs.
  expaelem: computes the functions using uniform asymptotic expansions 
              in terms of elementary functions (a>0, x<2a**(1/2)).
  expair:   computes the functions using uniform asymptotic expansions 
              in terms of Airy functions. 
  wammx:    computes the functions using uniform asymptotic expansions 
              in terms of elementary functions (a>0, x>2a**(1/2)).
  waxane:   computes the functions using asymptotic expansions 
              for a negative
  
The module air.f90 for the computation of Airy functions 
(scaled for x>0) uses a Fortran 90 version of the code by 
Fullerton (the Fortran 77 code is available at Netlib).

RANGE OF COMPUTATION
====================

 The codes compute the functions W(a,x), W(a,-x) and 
 their derivatives for real a and x >=0. 

 The range of computation for scaled functions is practically 
 unrestricted.
 For the plain (unscaled) functions the admissible
 range will depend on the machine overflow/underflow 
 parameters.

 
ACCURACY OF THE COMPUTED FUNCTION VALUES
=======================================

 The aimed relative accuracy for scaled functions is better than 
 5.0e-14. Exceptions to this accuracy are the evaluation of the 
 function near their zeros. The routines always produce values for which
 the Wronskian relation

   W(W(a,x),W(a,-x))=W(a,x)*W'(a,-x)+W'(a,x)*W(a,-x)=-1 

 is verified with a relative accuracy better that 5.0e-14. 
 For IEEE standard double precision arithmetic, the accuracy is better 
 than 5.0e-13 in the computable range of unscaled PCFs (except close to the zeros). 
  
SCALED FUNCTIONS
================

 The routines have the option of computing scaled
 functions. This scaling can be used to enlarge  
 the range of computation. 
 The scaled functions (SW) are defined as follows (t=x/(2*sqrt(a)):

         SW(a,x)  = exp(F(a,x))*W(a,x),

         SW'(a,x) = exp(F(a,x))*W'(a,x),  

         SW(a,-x) = W(a,-x)/exp(F(a,x)),

         SW'(a,x) = W'(a,-x)/exp(F(a,x)),

where
           
             a*arcsin(x/(2*sqrt(a)))+x/2*sqrt(a-x**2/4), if t<=1   
    F(a,x)=
             a*pi/2,                                     if t>1

METHODS OF COMPUTATION
====================== 

The present code uses different methods of computation
depending on the values of a and x:
   
For a>0:
    a) McLaurin series; b)Numerical solution of ODEs using Taylor 
      method; c) Asymptotic expansions in terms of elementary 
      functions; d) Airy-type asymptotic expansions.
For a<0:
    a) McLaurin series; b)Numerical solution of ODEs using Taylor 
       method; c) Asymptotic expansions