function [y] = pfun(x,alpha)
%  Find p(x,alpha), for a column vector x

n=length(x);
y =zeros(n,1);
for i=1:n
	if(x(i)>0.0)
		y(i)=x(i)+log(1+exp(-alpha*x(i)))/alpha;
	else
		y(i)=log(1+exp(alpha*x(i)))/alpha;
	end;
end;

return;
