A generalized equation for computer calculation of liquid densities