Evaluating logarithmic expressions