dSB <-
function(x, lambda=0, log=FALSE)
{
if(lambda< -1 | lambda>1) stop("lambda must be between -1 and 1")
delta=(1-lambda)/2
log.f<-log(2)+log1p(-x+delta*(2*x-1))
if(log == FALSE) fy <- exp(log.f)
else fy <- log.f
fy <- ifelse(x <= 0 | x>=1, 0, fy)
fy
}
