Calculation of Dirichlet -functions