On the approximate computation of singular and hypersingular integrals