Condense logarithmic expressions (#505)