eliminated use of pow

This commit is contained in:
Dave Goodwin 2004-10-09 18:55:40 +00:00
parent 7770f790a0
commit c260148c01

View file

@ -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;