A code for the boundary element method (BEM) for two-dimensional acoustic radiation and scattering problems is developed. To overcome the singularity problem of the integral equations at characteristic frequencies, the Burton–Miller method is employed in the formulation. The integral equations are then discretized by using the two-nodal constant elements and a collocation procedure. The hyper and weakly singular integrals in each element containing the collocation points are computed analytically and numerically respectively (stark singularity does not appear). In outdoor acoustic, the ground surface can be seen occasionally as an infinite surface with a given constant impedance. In this case the ground surface can either be discretized by using finite and infinite boundary elements or simulated by using the Green functions for impedance half space. The method to compute such Green functions presented in Ref. 1, is improved and used in the code. A formulation of the infinite boundary element is proposed. The two BEM approaches for the impedance half space problems are tested by means of examples and the agreement is found to be good.