From 02f24fa02a9cb733e4ab54c2a23e41cc0494cfc0 Mon Sep 17 00:00:00 2001 From: Francois Gygi Date: Thu, 23 Jun 2016 19:42:43 +0000 Subject: [PATCH] Replaced pow(x,1.0/3.0) with cbrt(x) git-svn-id: http://qboxcode.org/svn/qb/trunk@1836 cba15fb0-1239-40c8-b417-11db7ca47a34 --- src/BLYPFunctional.C | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/BLYPFunctional.C b/src/BLYPFunctional.C index 721e62f..10b0cbc 100644 --- a/src/BLYPFunctional.C +++ b/src/BLYPFunctional.C @@ -170,7 +170,7 @@ void BLYPFunctional::excblyp(double rho, double grad, const double rha = 0.5 * rho; const double grada = 0.5 * grad; - const double rha13 = pow ( rha, third ); + const double rha13 = cbrt(rha); const double rha43 = rha * rha13; const double xa = grada / rha43; const double xa2 = xa*xa; @@ -189,7 +189,7 @@ void BLYPFunctional::excblyp(double rho, double grad, // LYP correlation // Phys. Rev. B 37, 785 (1988). // next lines specialized to the unpolarized case - const double rh13 = pow ( rho, third ); + const double rh13 = cbrt(rho); const double rhm13 = 1.0 / rh13; const double rhm43 = rhm13 / rho; const double e = exp ( - c * rhm13 ); @@ -273,8 +273,8 @@ void BLYPFunctional::excblyp_sp(double rho_up, double rho_dn, const double grada = sqrt(grad_up2); const double gradb = sqrt(grad_dn2); - const double rha13 = pow ( rha, third ); - const double rhb13 = pow ( rhb, third ); + const double rha13 = cbrt(rha); + const double rhb13 = cbrt(rhb); const double rha43 = rha * rha13; const double rhb43 = rhb * rhb13; const double rha83 = rha43 * rha43; @@ -326,7 +326,7 @@ void BLYPFunctional::excblyp_sp(double rho_up, double rho_dn, const double rhoinv = 1.0/rho; const double rhab = rha * rhb; const double rhabrhm = rhab * rhoinv; - const double rh13 = pow ( rho, third ); + const double rh13 = cbrt(rho); const double rhm13 = 1.0 / rh13; const double rhm43 = rhm13 / rho; const double rhm113 = rhm43 * rhm43 * rhm43 * rh13; -- libgit2 0.26.0