Calculating the pH of a buffer