Coverage Report

Created: 2023-09-25 06:05

/src/igraph/vendor/lapack/dlabad.c
Line
Count
Source (jump to first uncovered line)
1
/*  -- translated by f2c (version 20191129).
2
   You must link the resulting object file with libf2c:
3
  on Microsoft Windows system, link with libf2c.lib;
4
  on Linux or Unix systems, link with .../path/to/libf2c.a -lm
5
  or, if you install libf2c.a in a standard place, with -lf2c -lm
6
  -- in that order, at the end of the command line, as in
7
    cc *.o -lf2c -lm
8
  Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
9
10
    http://www.netlib.org/f2c/libf2c.zip
11
*/
12
13
#include "f2c.h"
14
15
/* > \brief \b DLABAD   
16
17
    =========== DOCUMENTATION ===========   
18
19
   Online html documentation available at   
20
              http://www.netlib.org/lapack/explore-html/   
21
22
   > \htmlonly   
23
   > Download DLABAD + dependencies   
24
   > <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlabad.
25
f">   
26
   > [TGZ]</a>   
27
   > <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlabad.
28
f">   
29
   > [ZIP]</a>   
30
   > <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlabad.
31
f">   
32
   > [TXT]</a>   
33
   > \endhtmlonly   
34
35
    Definition:   
36
    ===========   
37
38
         SUBROUTINE DLABAD( SMALL, LARGE )   
39
40
         DOUBLE PRECISION   LARGE, SMALL   
41
42
43
   > \par Purpose:   
44
    =============   
45
   >   
46
   > \verbatim   
47
   >   
48
   > DLABAD takes as input the values computed by DLAMCH for underflow and   
49
   > overflow, and returns the square root of each of these values if the   
50
   > log of LARGE is sufficiently large.  This subroutine is intended to   
51
   > identify machines with a large exponent range, such as the Crays, and   
52
   > redefine the underflow and overflow limits to be the square roots of   
53
   > the values computed by DLAMCH.  This subroutine is needed because   
54
   > DLAMCH does not compensate for poor arithmetic in the upper half of   
55
   > the exponent range, as is found on a Cray.   
56
   > \endverbatim   
57
58
    Arguments:   
59
    ==========   
60
61
   > \param[in,out] SMALL   
62
   > \verbatim   
63
   >          SMALL is DOUBLE PRECISION   
64
   >          On entry, the underflow threshold as computed by DLAMCH.   
65
   >          On exit, if LOG10(LARGE) is sufficiently large, the square   
66
   >          root of SMALL, otherwise unchanged.   
67
   > \endverbatim   
68
   >   
69
   > \param[in,out] LARGE   
70
   > \verbatim   
71
   >          LARGE is DOUBLE PRECISION   
72
   >          On entry, the overflow threshold as computed by DLAMCH.   
73
   >          On exit, if LOG10(LARGE) is sufficiently large, the square   
74
   >          root of LARGE, otherwise unchanged.   
75
   > \endverbatim   
76
77
    Authors:   
78
    ========   
79
80
   > \author Univ. of Tennessee   
81
   > \author Univ. of California Berkeley   
82
   > \author Univ. of Colorado Denver   
83
   > \author NAG Ltd.   
84
85
   > \date November 2011   
86
87
   > \ingroup auxOTHERauxiliary   
88
89
    =====================================================================   
90
   Subroutine */ int igraphdlabad_(doublereal *small, doublereal *large)
91
0
{
92
    /* Builtin functions */
93
0
    double d_lg10(doublereal *), sqrt(doublereal);
94
95
96
/*  -- LAPACK auxiliary routine (version 3.4.0) --   
97
    -- LAPACK is a software package provided by Univ. of Tennessee,    --   
98
    -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--   
99
       November 2011   
100
101
102
    =====================================================================   
103
104
105
       If it looks like we're on a Cray, take the square root of   
106
       SMALL and LARGE to avoid overflow and underflow problems. */
107
108
0
    if (d_lg10(large) > 2e3) {
109
0
  *small = sqrt(*small);
110
0
  *large = sqrt(*large);
111
0
    }
112
113
0
    return 0;
114
115
/*     End of DLABAD */
116
117
0
} /* igraphdlabad_ */
118