Go Slices Float64 Slice Sort
package main/* ww w . ja va2 s .c om*/ import ( "fmt" "sort" ) func main() { val := []float64{2.5,6.3,1.35,9.8,8.7,1.2,5.2} fmt.Println(val) if sort.Float64sAreSorted(val)==false{ sort.Float64s(val) // Sort Float Array } fmt.Println(val) fmt.Println(sort.SearchFloat64s(val,5.2)) }