sampling in log space