clipped sf, pmf and cdf funs to between 0 and 1

Fixes #2566