We explain how one can dispense with the numerical computation of approximations to the transcendental integral functions involved when computing class numbers of quadratic number fields. We therefore end up with a simpler and faster method for computing class numbers of quadratic number fields. We also explain how to end up with a simpler and faster method for computing relative class numbers of imaginary abelian number fields.