00001 /* DLABAD.F -- translated by f2c (version 19941215). 00002 You must link the resulting object file with the libraries: 00003 -lf2c -lm (in that order) 00004 */ 00005 00006 #include "f2c.h" 00007 00008 /* Subroutine */ int dlabad_(small, large) 00009 doublereal *small, *large; 00010 { 00011 /* Builtin functions */ 00012 double d_lg10(), sqrt(); 00013 00014 00015 /* -- LAPACK auxiliary routine (version 1.1) -- */ 00016 /* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., */ 00017 /* Courant Institute, Argonne National Lab, and Rice University */ 00018 /* October 31, 1992 */ 00019 00020 /* .. Scalar Arguments .. */ 00021 /* .. */ 00022 00023 /* Purpose */ 00024 /* ======= */ 00025 00026 /* DLABAD takes as input the values computed by SLAMCH for underflow and 00027 */ 00028 /* overflow, and returns the square root of each of these values if the 00029 */ 00030 /* log of LARGE is sufficiently large. This subroutine is intended to */ 00031 /* identify machines with a large exponent range, such as the Crays, and 00032 */ 00033 /* redefine the underflow and overflow limits to be the square roots of 00034 */ 00035 /* the values computed by DLAMCH. This subroutine is needed because */ 00036 /* DLAMCH does not compensate for poor arithmetic in the upper half of */ 00037 /* the exponent range, as is found on a Cray. */ 00038 00039 /* Arguments */ 00040 /* ========= */ 00041 00042 /* SMALL (input/output) DOUBLE PRECISION */ 00043 /* On entry, the underflow threshold as computed by DLAMCH. */ 00044 /* On exit, if LOG10(LARGE) is sufficiently large, the square */ 00045 /* root of SMALL, otherwise unchanged. */ 00046 00047 /* LARGE (input/output) DOUBLE PRECISION */ 00048 /* On entry, the overflow threshold as computed by DLAMCH. */ 00049 /* On exit, if LOG10(LARGE) is sufficiently large, the square */ 00050 /* root of LARGE, otherwise unchanged. */ 00051 00052 /* ===================================================================== 00053 */ 00054 00055 /* .. Intrinsic Functions .. */ 00056 /* .. */ 00057 /* .. Executable Statements .. */ 00058 00059 /* If it looks like we're on a Cray, take the square root of */ 00060 /* SMALL and LARGE to avoid overflow and underflow problems. */ 00061 00062 if (d_lg10(large) > 2e3) { 00063 *small = sqrt(*small); 00064 *large = sqrt(*large); 00065 } 00066 00067 return 0; 00068 00069 /* End of DLABAD */ 00070 00071 } /* dlabad_ */ 00072