 a subroutin method calcul logarithm 