LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
slabad.f
Go to the documentation of this file.
00001 *> \brief \b SLABAD
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download SLABAD + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slabad.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slabad.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slabad.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       SUBROUTINE SLABAD( SMALL, LARGE )
00022 * 
00023 *       .. Scalar Arguments ..
00024 *       REAL               LARGE, SMALL
00025 *       ..
00026 *  
00027 *
00028 *> \par Purpose:
00029 *  =============
00030 *>
00031 *> \verbatim
00032 *>
00033 *> SLABAD takes as input the values computed by SLAMCH for underflow and
00034 *> overflow, and returns the square root of each of these values if the
00035 *> log of LARGE is sufficiently large.  This subroutine is intended to
00036 *> identify machines with a large exponent range, such as the Crays, and
00037 *> redefine the underflow and overflow limits to be the square roots of
00038 *> the values computed by SLAMCH.  This subroutine is needed because
00039 *> SLAMCH does not compensate for poor arithmetic in the upper half of
00040 *> the exponent range, as is found on a Cray.
00041 *> \endverbatim
00042 *
00043 *  Arguments:
00044 *  ==========
00045 *
00046 *> \param[in,out] SMALL
00047 *> \verbatim
00048 *>          SMALL is REAL
00049 *>          On entry, the underflow threshold as computed by SLAMCH.
00050 *>          On exit, if LOG10(LARGE) is sufficiently large, the square
00051 *>          root of SMALL, otherwise unchanged.
00052 *> \endverbatim
00053 *>
00054 *> \param[in,out] LARGE
00055 *> \verbatim
00056 *>          LARGE is REAL
00057 *>          On entry, the overflow threshold as computed by SLAMCH.
00058 *>          On exit, if LOG10(LARGE) is sufficiently large, the square
00059 *>          root of LARGE, otherwise unchanged.
00060 *> \endverbatim
00061 *
00062 *  Authors:
00063 *  ========
00064 *
00065 *> \author Univ. of Tennessee 
00066 *> \author Univ. of California Berkeley 
00067 *> \author Univ. of Colorado Denver 
00068 *> \author NAG Ltd. 
00069 *
00070 *> \date November 2011
00071 *
00072 *> \ingroup auxOTHERauxiliary
00073 *
00074 *  =====================================================================
00075       SUBROUTINE SLABAD( SMALL, LARGE )
00076 *
00077 *  -- LAPACK auxiliary routine (version 3.4.0) --
00078 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00079 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00080 *     November 2011
00081 *
00082 *     .. Scalar Arguments ..
00083       REAL               LARGE, SMALL
00084 *     ..
00085 *
00086 *  =====================================================================
00087 *
00088 *     .. Intrinsic Functions ..
00089       INTRINSIC          LOG10, SQRT
00090 *     ..
00091 *     .. Executable Statements ..
00092 *
00093 *     If it looks like we're on a Cray, take the square root of
00094 *     SMALL and LARGE to avoid overflow and underflow problems.
00095 *
00096       IF( LOG10( LARGE ).GT.2000. ) THEN
00097          SMALL = SQRT( SMALL )
00098          LARGE = SQRT( LARGE )
00099       END IF
00100 *
00101       RETURN
00102 *
00103 *     End of SLABAD
00104 *
00105       END
 All Files Functions