use logs for each part of the acceptance prob computation to avoid exp() overflowing