Computation of the diffracted field of a toothed occulter by the semi-infinite rectangle method