least squares fitting—logarithmic