quantile edit page

If n is in (0,1), then q is the n-th quantile of x (n*100 percent quantile) If n<0, then q is the (n+1)-th largest entry of x If n>1, then q is the n-th smallest entry of x

Syntax

q = quantile(x,n)

Input

x double
n double

Output

q double

Example