From fb7164a8110b06656945d400cb739fdc310078b6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 May 2017 16:16:01 -0400 Subject: [PATCH] replace pow(x,-0.5) with 1.0/sqrt(x) --- src/MANYBODY/pair_airebo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 95af9d9c4b..71c206883c 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -1335,7 +1335,7 @@ double PairAIREBO::bondorder(int i, int j, double rij[3], dN2[0] = 0.0; dN2[1] = 0.0; PijS = PijSpline(NijC,NijH,itype,jtype,dN2); - pij = pow(1.0+Etmp+PijS,-0.5); + pij = 1.0/sqrt(1.0+Etmp+PijS); tmp = -0.5*cube(pij); // pij forces @@ -1480,7 +1480,7 @@ double PairAIREBO::bondorder(int i, int j, double rij[3], dN2[0] = 0.0; dN2[1] = 0.0; PjiS = PijSpline(NjiC,NjiH,jtype,itype,dN2); - pji = pow(1.0+Etmp+PjiS,-0.5); + pji = 1.0/sqrt(1.0+Etmp+PjiS); tmp = -0.5*cube(pji); REBO_neighs = REBO_firstneigh[j]; @@ -2171,7 +2171,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, dN2PIJ[0] = 0.0; dN2PIJ[1] = 0.0; PijS = PijSpline(NijC,NijH,itype,jtype,dN2PIJ); - pij = pow(1.0+Etmp+PijS,-0.5); + pij = 1.0/sqrt(1.0+Etmp+PijS); tmppij = -.5*cube(pij); tmp3pij = tmp3; tmp = 0.0; @@ -2211,7 +2211,7 @@ double PairAIREBO::bondorderLJ(int i, int j, double rij[3], double rijmag, dN2PJI[0] = 0.0; dN2PJI[1] = 0.0; PjiS = PijSpline(NjiC,NjiH,jtype,itype,dN2PJI); - pji = pow(1.0+Etmp+PjiS,-0.5); + pji = 1.0/sqrt(1.0+Etmp+PjiS); tmppji = -.5*cube(pji); tmp3pji = tmp3;