slabad.c
Go to the documentation of this file.
00001 /* slabad.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015 
00016 /* Subroutine */ int slabad_(real *small, real *large)
00017 {
00018     /* Builtin functions */
00019     double r_lg10(real *), sqrt(doublereal);
00020 
00021 
00022 /*  -- LAPACK auxiliary routine (version 3.2) -- */
00023 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00024 /*     November 2006 */
00025 
00026 /*     .. Scalar Arguments .. */
00027 /*     .. */
00028 
00029 /*  Purpose */
00030 /*  ======= */
00031 
00032 /*  SLABAD takes as input the values computed by SLAMCH for underflow and */
00033 /*  overflow, and returns the square root of each of these values if the */
00034 /*  log of LARGE is sufficiently large.  This subroutine is intended to */
00035 /*  identify machines with a large exponent range, such as the Crays, and */
00036 /*  redefine the underflow and overflow limits to be the square roots of */
00037 /*  the values computed by SLAMCH.  This subroutine is needed because */
00038 /*  SLAMCH does not compensate for poor arithmetic in the upper half of */
00039 /*  the exponent range, as is found on a Cray. */
00040 
00041 /*  Arguments */
00042 /*  ========= */
00043 
00044 /*  SMALL   (input/output) REAL */
00045 /*          On entry, the underflow threshold as computed by SLAMCH. */
00046 /*          On exit, if LOG10(LARGE) is sufficiently large, the square */
00047 /*          root of SMALL, otherwise unchanged. */
00048 
00049 /*  LARGE   (input/output) REAL */
00050 /*          On entry, the overflow threshold as computed by SLAMCH. */
00051 /*          On exit, if LOG10(LARGE) is sufficiently large, the square */
00052 /*          root of LARGE, otherwise unchanged. */
00053 
00054 /*  ===================================================================== */
00055 
00056 /*     .. Intrinsic Functions .. */
00057 /*     .. */
00058 /*     .. Executable Statements .. */
00059 
00060 /*     If it looks like we're on a Cray, take the square root of */
00061 /*     SMALL and LARGE to avoid overflow and underflow problems. */
00062 
00063     if (r_lg10(large) > 2e3f) {
00064         *small = sqrt(*small);
00065         *large = sqrt(*large);
00066     }
00067 
00068     return 0;
00069 
00070 /*     End of SLABAD */
00071 
00072 } /* slabad_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:09