fix parameter sampling
use log1p() where possible

log1p(-x) should be more accurate and faster than log(1-x)
Merge branch 'alyst-fixes'

It contains two commits of Pull request #3.