Calculation of logarithmic expressions