func mergedCapacity(compression float64) int {
	return int(math.Ceil(math.Pi*compression + 0.5))
}
mergedCapacity computes the capacity of the merged centroid slice.
package tdigest
import (
	"math"
	"sort"
)
var (
	nan              = math.NaN()
	positiveInfinity = math.Inf(1)
	negativeInfinity = math.Inf(-1)
	sentinelCentroid = Centroid{Mean: positiveInfinity, Weight: 0.0}
)
type centroidsByMeanAsc []Centroid
func (c centroidsByMeanAsc) Len() int           { return len(c) }
func (c centroidsByMeanAsc) Less(i, j int) bool { return c[i].Mean < c[j].Mean }
func (c centroidsByMeanAsc) Swap(i, j int)      { c[i], c[j] = c[j], c[i] }
type mergeCentroidFn func(
	currIndex float64,
	currWeight float64,
	totalWeight float64,
	c Centroid,
	mergeResult []Centroid,
) (float64, []Centroid)
type tDigest struct {
	compression      float64          
	mergedCapacity   int              
	unmergedCapacity int              
	multiplier       int64            
	mergeCentroidFn  mergeCentroidFn  
	centroidsPool    CentroidsPool    
	closed         bool        
	merged         []Centroid  
	mergedWeight   float64     
	unmerged       []Centroid  
	unmergedWeight float64     
	minValue       float64     
	maxValue       float64     
}