Skip to content

Commit

Permalink
Don't use static const with log10
Browse files Browse the repository at this point in the history
  • Loading branch information
texnokrates committed Apr 10, 2020
1 parent 16bb81e commit 19e7ae8
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 8 deletions.
6 changes: 5 additions & 1 deletion zbessel/zairy.x
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

int camos_zairy(double zr, double zi, int id, int kode, double *restrict air, double *restrict aii,
int *restrict nz) {
static const double r1m5 = log10(FLT_RADIX);
#if (FLT_RADIX == 2)
static const double r1m5 = 0.301029995663981195213738894724493026768189L;
#else
const double r1m5 = log10(FLT_RADIX);
#endif

/* Initialized data */

Expand Down
6 changes: 5 additions & 1 deletion zbessel/zbesh.x
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

int camos_zbesh(double zr, double zi, double fnu, int kode, int m,
int n, double *restrict cyr, double *restrict cyi, int *restrict nz) {
static const double r1m5 = log10(FLT_RADIX);
#if (FLT_RADIX == 2)
static const double r1m5 = 0.301029995663981195213738894724493026768189L;
#else
const double r1m5 = log10(FLT_RADIX);
#endif

/* Initialized data */

Expand Down
6 changes: 5 additions & 1 deletion zbessel/zbesi.x
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

int camos_zbesi(double zr, double zi, double fnu, int kode, int n, double *restrict cyr,
double *restrict cyi, int *restrict nz) {
static const double r1m5 = log10(FLT_RADIX);
#if (FLT_RADIX == 2)
static const double r1m5 = 0.301029995663981195213738894724493026768189L;
#else
const double r1m5 = log10(FLT_RADIX);
#endif

/* Initialized data */

Expand Down
6 changes: 5 additions & 1 deletion zbessel/zbesj.x
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

int camos_zbesj(double zr, double zi, double fnu, int kode, int n, double *restrict cyr,
double *restrict cyi, int *restrict nz) {
static const double r1m5 = log10(FLT_RADIX);
#if (FLT_RADIX == 2)
static const double r1m5 = 0.301029995663981195213738894724493026768189L;
#else
const double r1m5 = log10(FLT_RADIX);
#endif

/* Initialized data */

Expand Down
6 changes: 5 additions & 1 deletion zbessel/zbesk.x
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

int camos_zbesk(double zr, double zi, double fnu, int kode, int n, double *restrict cyr,
double *restrict cyi, int *restrict nz) {
static const double r1m5 = log10(FLT_RADIX);
#if (FLT_RADIX == 2)
static const double r1m5 = 0.301029995663981195213738894724493026768189L;
#else
const double r1m5 = log10(FLT_RADIX);
#endif

/* Local variables */
int ierr;
Expand Down
6 changes: 5 additions & 1 deletion zbessel/zbesy.x
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

int camos_zbesy(double zr, double zi, double fnu, int kode, int n, double *restrict cyr,
double *restrict cyi, int *restrict nz, double *restrict cwrkr, double *restrict cwrki) {
static const double r1m5 = log10(FLT_RADIX);
#if (FLT_RADIX == 2)
static const double r1m5 = 0.301029995663981195213738894724493026768189L;
#else
const double r1m5 = log10(FLT_RADIX);
#endif

/* Local variables */
int ierr;
Expand Down
6 changes: 5 additions & 1 deletion zbessel/zbiry.x
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@


int camos_zbiry(double zr, double zi, int id, int kode, double *restrict bir, double *restrict bii) {
static const double r1m5 = log10(FLT_RADIX);
#if (FLT_RADIX == 2)
static const double r1m5 = 0.301029995663981195213738894724493026768189L;
#else
const double r1m5 = log10(FLT_RADIX);
#endif

/* Initialized data */

Expand Down
6 changes: 5 additions & 1 deletion zbessel/zbknu.x
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@

static void zbknu(double zr, double zi, double fnu, int kode, int n, double *restrict yr,
double *restrict yi, int *restrict nz, double tol, double elim, double alim) {
static const double r1m5 = log10(FLT_RADIX);
#if (FLT_RADIX == 2)
static const double r1m5 = 0.301029995663981195213738894724493026768189L;
#else
const double r1m5 = log10(FLT_RADIX);
#endif

/* Initialized data */

Expand Down

0 comments on commit 19e7ae8

Please sign in to comment.