public static float Fractile(Narray <float> a, double f) { Floatarray temp = new Floatarray(); if (!(f >= 0 && f <= 1)) { throw new Exception("CHECK: f >= 0 && f <= 1"); } temp.Copy(a); temp.Reshape(temp.Length1d()); Quicksort(temp); return(temp[(int)(f * temp.Length())]); }