Condensing logarithmic expressions