function z = utqnorm(p)
%UTQNORM Upper tail quantile for standard normal distribution.
%
%   Z = UTQNORM(P) returns the upper tail quantile for the standard normal
%   distribution function.  I.e., it returns the Z satisfying Pr{X > Z} = P,
%   where X has a standard normal distribution.
%
%   UTQNORM(P) is the same as SQRT(2) * ERFINV(1-2*P), but the former returns a
%   more accurate value when P is close to zero.

%   Author:      Peter J. Acklam
%   Time-stamp:  2003-04-13 11:45:37 +0200
%   E-mail:      pjacklam@online.no
%   URL:         http://home.online.no/~pjacklam

   z = -ltqnorm(p);
