make cast to double precision explicit
This commit is contained in:
@ -202,7 +202,7 @@ compute_fcoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_ftable[itable] + fraction*d_dftable[itable];
|
||||
F_FLOAT forcecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
@ -241,7 +241,7 @@ compute_ecoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_etable[itable] + fraction*d_detable[itable];
|
||||
F_FLOAT ecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
|
||||
@ -170,7 +170,7 @@ compute_fcoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_ftable[itable] + fraction*d_dftable[itable];
|
||||
F_FLOAT forcecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
@ -209,7 +209,7 @@ compute_ecoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_etable[itable] + fraction*d_detable[itable];
|
||||
F_FLOAT ecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
|
||||
@ -224,7 +224,7 @@ compute_fcoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_ftable[itable] + fraction*d_dftable[itable];
|
||||
F_FLOAT forcecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
@ -261,7 +261,7 @@ compute_ecoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_etable[itable] + fraction*d_detable[itable];
|
||||
F_FLOAT ecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
|
||||
@ -233,7 +233,7 @@ compute_fcoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_ftable[itable] + fraction*d_dftable[itable];
|
||||
F_FLOAT forcecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
@ -270,7 +270,7 @@ compute_ecoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_etable[itable] + fraction*d_detable[itable];
|
||||
F_FLOAT ecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
|
||||
@ -188,7 +188,7 @@ compute_fcoul(const F_FLOAT &rsq, const int &/*i*/, const int &j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_ftable[itable] + fraction*d_dftable[itable];
|
||||
F_FLOAT forcecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
@ -247,7 +247,7 @@ compute_ecoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_etable[itable] + fraction*d_detable[itable];
|
||||
F_FLOAT ecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
|
||||
@ -185,7 +185,7 @@ compute_fcoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_ftable[itable] + fraction*d_dftable[itable];
|
||||
F_FLOAT forcecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
@ -242,7 +242,7 @@ compute_ecoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_etable[itable] + fraction*d_detable[itable];
|
||||
F_FLOAT ecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
|
||||
@ -194,7 +194,7 @@ compute_fcoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_ftable[itable] + fraction*d_dftable[itable];
|
||||
F_FLOAT forcecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
@ -253,7 +253,7 @@ compute_ecoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_etable[itable] + fraction*d_detable[itable];
|
||||
F_FLOAT ecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
|
||||
@ -236,7 +236,7 @@ compute_fcoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_ftable[itable] + fraction*d_dftable[itable];
|
||||
F_FLOAT forcecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
@ -274,7 +274,7 @@ compute_ecoul(const F_FLOAT& rsq, const int& /*i*/, const int&j,
|
||||
union_int_float_t rsq_lookup;
|
||||
rsq_lookup.f = rsq;
|
||||
const int itable = (rsq_lookup.i & ncoulmask) >> ncoulshiftbits;
|
||||
const F_FLOAT fraction = (rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT fraction = ((F_FLOAT)rsq_lookup.f - d_rtable[itable]) * d_drtable[itable];
|
||||
const F_FLOAT table = d_etable[itable] + fraction*d_detable[itable];
|
||||
F_FLOAT ecoul = qtmp*q[j] * table;
|
||||
if (factor_coul < 1.0) {
|
||||
|
||||
@ -1231,7 +1231,7 @@ void PairLJLongTIP4PLong::compute_outer(int eflag, int vflag)
|
||||
union_int_float_t t;
|
||||
t.f = rsq;
|
||||
const int k = (t.i & ncoulmask) >> ncoulshiftbits;
|
||||
double f = (t.f-rtable[k])*drtable[k], qiqj = qtmp*q[j];
|
||||
double f = ((double)t.f-rtable[k])*drtable[k], qiqj = qtmp*q[j];
|
||||
if (ni == 0) {
|
||||
forcecoul = qiqj*(ftable[k]+f*dftable[k]);
|
||||
if (eflag) ecoul = qiqj*(etable[k]+f*detable[k]);
|
||||
|
||||
Reference in New Issue
Block a user