From c260148c01c19d63522dcf2a7bfa6fd15f61a5eb Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Sat, 9 Oct 2004 18:55:40 +0000 Subject: [PATCH] eliminated use of pow --- ext/tpx/RedlichKwong.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/tpx/RedlichKwong.cpp b/ext/tpx/RedlichKwong.cpp index 17121f60b..6128d70aa 100644 --- a/ext/tpx/RedlichKwong.cpp +++ b/ext/tpx/RedlichKwong.cpp @@ -17,7 +17,7 @@ namespace tpx { double RedlichKwong::hresid(){ double hh = m_b * (Rho/m_mw); double hresid_mol_RT = z() - 1.0 - - (1.5*m_a/(m_b*8314.3*pow(T,1.5)))*log(1.0 + hh); + - (1.5*m_a/(m_b*8314.3*T*sqrt(T)))*log(1.0 + hh); return 8314.3*T*hresid_mol_RT/m_mw; } @@ -25,7 +25,7 @@ namespace tpx { double hh = m_b * (Rho/m_mw); //cout << "hh = " << hh << endl; double sresid_mol_R = log(z()*(1.0 - hh)) - - (0.5*m_a/(m_b*8314.3*pow(T,1.5)))*log(1.0 + hh); + - (0.5*m_a/(m_b*8314.3*T*sqrt(T)))*log(1.0 + hh); double sp = 8314.3*sresid_mol_R/m_mw; //cout << "sresid = " << sp << endl; return sp;