Skip to content

Commit

Permalink
Rename variable to avoid conflict with Windows keyword
Browse files Browse the repository at this point in the history
Renamed variable 'small' to 'small_val' to avoid conflict
with Windows keyword 'small'

Change-Id: I9c00c735d20bdf3f0d4f016242831c180214a5da
  • Loading branch information
pradeeptrgit committed Oct 22, 2021
1 parent edbc0c7 commit 65ccdb7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions src/base/flamec/util/lapack/mch/fla_slamch.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ real fla_slamch(char *cmach, ftnlen cmach_len)
static TLS_CLASS_SPEC logical lrnd;
static TLS_CLASS_SPEC real rmin, rmax, t, rmach;
extern logical fla_lsame(char *, char *, ftnlen, ftnlen);
static TLS_CLASS_SPEC real small, sfmin;
static TLS_CLASS_SPEC real small_val, sfmin;
extern /* Subroutine */ integer fla_slamc2(integer *, integer *, logical *, real
*, integer *, real *, integer *, real *);
static TLS_CLASS_SPEC integer it;
Expand Down Expand Up @@ -155,13 +155,13 @@ real fla_slamch(char *cmach, ftnlen cmach_len)
emin = (real) imin;
emax = (real) imax;
sfmin = rmin;
small = (float)1. / rmax;
if (small >= sfmin) {
small_val = (float)1. / rmax;
if (small_val >= sfmin) {

/* Use SMALL plus a bit, to avoid the possibility of rounding */
/* causing overflow when computing 1/sfmin. */

sfmin = small * (eps + (float)1.);
sfmin = small_val * (eps + (float)1.);
}
}

Expand Down Expand Up @@ -437,7 +437,7 @@ explicitly.\002,/)";
static TLS_CLASS_SPEC integer i__, lbeta;
static TLS_CLASS_SPEC real rbase;
static TLS_CLASS_SPEC integer lemin, lemax, gnmin;
static TLS_CLASS_SPEC real small;
static TLS_CLASS_SPEC real small_val;
static TLS_CLASS_SPEC integer gpmin;
static TLS_CLASS_SPEC real third, lrmin, lrmax, sixth;
static TLS_CLASS_SPEC logical lieee1;
Expand Down Expand Up @@ -600,13 +600,13 @@ explicitly.\002,/)";
/* is detected when we cannot recover the previous A. */

rbase = one / lbeta;
small = one;
small_val = one;
for (i__ = 1; i__ <= 3; ++i__) {
r__1 = small * rbase;
small = fla_slamc3(&r__1, &zero);
r__1 = small_val * rbase;
small_val = fla_slamc3(&r__1, &zero);
/* L20: */
}
a = fla_slamc3(&one, &small);
a = fla_slamc3(&one, &small_val);
fla_slamc4(&ngpmin, &one, &lbeta);
r__1 = -one;
fla_slamc4(&ngnmin, &r__1, &lbeta);
Expand Down
8 changes: 4 additions & 4 deletions src/map/lapack2flamec/f2c/install/static/slamch.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ real slamch_(char *cmach)

/* Local variables */
static TLS_CLASS_SPEC real eps, sfmin, base, prec, t, rnd, emin, rmin, emax, rmax;
real rmach, small;
real rmach, small_val;

extern logical lsame_(char *, char *);

Expand Down Expand Up @@ -81,9 +81,9 @@ real slamch_(char *cmach)
base = FLT_RADIX;
prec = eps * base;
sfmin = FLT_MIN;
small = one / FLT_MAX;
if ( small >= sfmin)
sfmin = small * (one + eps);
small_val = one / FLT_MAX;
if ( small_val >= sfmin)
sfmin = small_val * (one + eps);

// For t, we need the number of base-2 digits, not base-10 digits.
// Here, we hardcode the value obtained from netlib LAPACK.
Expand Down

0 comments on commit 65ccdb7

Please sign in to comment.