pEXP2 <-
function(q, alpha=1, lower.tail=TRUE, log.p=FALSE)
{
if(alpha<0) stop("alpha must be less than 0")
Fy<-log1p(-(1-q)^alpha)
Fy <- ifelse(q <= 0, -Inf, Fy)
Fy <- ifelse(q >= 1, 0, Fy)
if(log.p == FALSE) Fy <- exp(Fy)
if(lower.tail==FALSE) Fy<-1-Fy
Fy
}
