func Singular(number float64) bool {
	n := number / 2
	return float64(int(n)) != n
}
Singular is to get whether a number is singular or not.
package GoStats
import (
	"math"
	"sort"
)
const (
	MaxFloat64 = math.MaxFloat64
	MinFloat64 = -(MaxFloat64)
)
func Mean(numbers []float64) float64 {
	return Total(numbers) / float64(len(numbers))
}
func Mode(numbers []float64) (mode float64, r int) {
	r = math.MinInt64
	for i, n := range Repeats(numbers) {
		if n > r {
			mode = i
			r = n
		}
	}
	return
}
func Repeats(numbers []float64) (r map[float64]int) {
	r = make(map[float64]int)
	for _, n := range numbers {
		r[n]++
	}
	return
}
func Total(numbers []float64) (total float64) {
	for _, n := range numbers {
		total += n
	}
	return
}
func Median(numbers []float64, sort bool) float64 {
	if sort {
		numbers = Sort(numbers)
	}
	if len(numbers) == 0 {
		return 0
	}
	if Singular(float64(len(numbers))) {
		return numbers[len(numbers)/2]
	}
	return (numbers[len(numbers)/2] + numbers[len(numbers)/2-1]) / 2
}