code: func SamplePercentiles(values int64Slice, ps []float64) []float64 {
  	scores := make([]float64, len(ps))
  	size := len(values)
  	if size > 0 {
  		sort.Sort(values)
  		for i, p := range ps {
  			pos := p * float64(size+1)
  			if pos < 1.0 {
  				scores[i] = float64(values[0])
  			} else if pos >= float64(size) {
  				scores[i] = float64(values[size-1])
  			} else {
  				lower := float64(values[int(pos)-1])
  				upper := float64(values[int(pos)])
  				scores[i] = lower + (pos-math.Floor(pos))*(upper-lower)
  			}
  		}
  	}
  	return scores
  }
docs: // SamplePercentiles returns a slice of arbitrary percentiles of the slice of
  // int64.