# Golang Float64s function – Math function

Today, We want to share with you Golang Float64s function – Math function.In this post we will show you Round float to 2 decimal places using Go, hear for Round float to integer value using GoLang we will give you demo and example for implement.In this post, we will learn about GoLang – Find the floating-point remainder – Mod() Function with an example.

## Golang Float64s function – Math function

Contents

There are the Following The simple About Golang Float64s function – Math function Full Information With Example and source code.

As I will cover this Post with live Working example to develop Math function – The Go Programming Language, so the sort string array alphabetically golang for this example is following below.

Also Read This 👉   VueJS conditionally Enable Disable button

### Top 7 Golang Program Golang Float64s function – Math function

### Golang Float64s function [ascending order]

Go program Syntax:

```func Float64s(floatingInputSlice []string)
```

Go program Example:

```package main

import (
"fmt"
"sort"
)

func main() {
floatingInputSlice := []float64{18787677.878716, 578782.692, 9856.545, 8787677.8716, 987654.656} // unsorted list in Golang
fmt.Println("Slice BEFORE sort: ",floatingInputSlice)

sort.Float64s(floatingInputSlice)

fmt.Println("Slice AFTER sort: ",floatingInputSlice)
}
```

When simple We execute the Go program, We can get the display following output:

Free Live Chat for Any Issue

```C:\golang>go run sort.go
Slice BEFORE sort:  [1.8787677878716e+07 578782.692 9856.545 8.7876778716e+06 987654.656]
Slice AFTER sort:  [9856.545 578782.692 987654.252 8.7876778716e+06 1.8787677878716e+07]

C:\golang>
```