Returns the value of the Beta function, defined in terms of the completegamma function, G, as: G(z)G(w)/G(z+w). The implementation follows NumericalRecipes in C, section 6.1.