Fixed logaritm calculation