LAPACK 3.3.0
|
00001 SUBROUTINE SLABAD( SMALL, LARGE ) 00002 * 00003 * -- LAPACK auxiliary routine (version 3.2) -- 00004 * -- LAPACK is a software package provided by Univ. of Tennessee, -- 00005 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 00006 * November 2006 00007 * 00008 * .. Scalar Arguments .. 00009 REAL LARGE, SMALL 00010 * .. 00011 * 00012 * Purpose 00013 * ======= 00014 * 00015 * SLABAD takes as input the values computed by SLAMCH for underflow and 00016 * overflow, and returns the square root of each of these values if the 00017 * log of LARGE is sufficiently large. This subroutine is intended to 00018 * identify machines with a large exponent range, such as the Crays, and 00019 * redefine the underflow and overflow limits to be the square roots of 00020 * the values computed by SLAMCH. This subroutine is needed because 00021 * SLAMCH does not compensate for poor arithmetic in the upper half of 00022 * the exponent range, as is found on a Cray. 00023 * 00024 * Arguments 00025 * ========= 00026 * 00027 * SMALL (input/output) REAL 00028 * On entry, the underflow threshold as computed by SLAMCH. 00029 * On exit, if LOG10(LARGE) is sufficiently large, the square 00030 * root of SMALL, otherwise unchanged. 00031 * 00032 * LARGE (input/output) REAL 00033 * On entry, the overflow threshold as computed by SLAMCH. 00034 * On exit, if LOG10(LARGE) is sufficiently large, the square 00035 * root of LARGE, otherwise unchanged. 00036 * 00037 * ===================================================================== 00038 * 00039 * .. Intrinsic Functions .. 00040 INTRINSIC LOG10, SQRT 00041 * .. 00042 * .. Executable Statements .. 00043 * 00044 * If it looks like we're on a Cray, take the square root of 00045 * SMALL and LARGE to avoid overflow and underflow problems. 00046 * 00047 IF( LOG10( LARGE ).GT.2000. ) THEN 00048 SMALL = SQRT( SMALL ) 00049 LARGE = SQRT( LARGE ) 00050 END IF 00051 * 00052 RETURN 00053 * 00054 * End of SLABAD 00055 * 00056 END