When I corrected the code to the following, it worked:
d_CB = 0.375 * dens_liq / (dens_liq - dens_gas) * f_M * pow(V_M, 2) / (g * cos(slope));
All of my variables were assigned as doubles. Can anyone provide input as to what the error related to? I need to find out to be able to check that I don't have any other similar errors in my code.