The Green function of the diffraction-radiation theory of time-harmonic waves under a moderate water depth is considered. The paper presents a newly developed enhanced algorithm based on Endo's approach, which employs a direct Gauss-Laguerre quadrature in the calculation of the principal value integrations. This methodology was firstly originated from Endo (1983), and had been subsequently improved by Liu et al. (2008) and Shan et al. (2019). Unfortunately, the latest version of Endo's approach still has two fatal problems with (1) incredibly large or small values at some “weird frequencies”, and (2) nonsense values in the high-frequency region under a large depth. The present algorithm proposes special techniques for the removal of the singularities at these “weird frequencies”, and provides special treatments to avoid exceeding hardware's limitation when the input parameter k0h is overlarge. The developed algorithm is thereafter tested against a variety of sea conditions, via a comparison with Newman's polynomial algorithm (Newman, 1985), certifying its good accuracy in various circumstances. By carrying out a benchmark test on the DeepCwind semisubmersible, through a comparison with Shan's algorithm (Shan et al., 2019) and the commericial software Hydrostar®, the cause of the occurrence of the “weird frequencies” is found, in association with other important findings. The computations demonstrate that the present enhanced algorithm is free from the preceding problems and is sufficiently accurate to compute wave loads in practice.