dget06.c
Go to the documentation of this file.
00001 /* dget06.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 doublereal dget06_(doublereal *rcond, doublereal *rcondc)
00017 {
00018     /* System generated locals */
00019     doublereal ret_val;
00020 
00021     /* Local variables */
00022     doublereal rat, eps;
00023     extern doublereal dlamch_(char *);
00024 
00025 
00026 /*  -- LAPACK test routine (version 3.1) -- */
00027 /*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
00028 /*     November 2006 */
00029 
00030 /*     .. Scalar Arguments .. */
00031 /*     .. */
00032 
00033 /*  Purpose */
00034 /*  ======= */
00035 
00036 /*  DGET06 computes a test ratio to compare two values for RCOND. */
00037 
00038 /*  Arguments */
00039 /*  ========== */
00040 
00041 /*  RCOND   (input) DOUBLE PRECISION */
00042 /*          The estimate of the reciprocal of the condition number of A, */
00043 /*          as computed by DGECON. */
00044 
00045 /*  RCONDC  (input) DOUBLE PRECISION */
00046 /*          The reciprocal of the condition number of A, computed as */
00047 /*          ( 1/norm(A) ) / norm(inv(A)). */
00048 
00049 /*  ===================================================================== */
00050 
00051 /*     .. Parameters .. */
00052 /*     .. */
00053 /*     .. Local Scalars .. */
00054 /*     .. */
00055 /*     .. External Functions .. */
00056 /*     .. */
00057 /*     .. Intrinsic Functions .. */
00058 /*     .. */
00059 /*     .. Executable Statements .. */
00060 
00061     eps = dlamch_("Epsilon");
00062     if (*rcond > 0.) {
00063         if (*rcondc > 0.) {
00064             rat = max(*rcond,*rcondc) / min(*rcond,*rcondc) - (1. - eps);
00065         } else {
00066             rat = *rcond / eps;
00067         }
00068     } else {
00069         if (*rcondc > 0.) {
00070             rat = *rcondc / eps;
00071         } else {
00072             rat = 0.;
00073         }
00074     }
00075     ret_val = rat;
00076     return ret_val;
00077 
00078 /*     End of DGET06 */
00079 
00080 } /* dget06_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:44