Go (Golang) Math Library for Integer Operations
Any Math operations that not support integer, can used this library
You can also email iman.tumorang@gmail.com or file an Issue. See documentation in Godoc
go get -u github.com/bxcodec/saint
package main
import (
"fmt"
"github.com/bxcodec/saint"
)
func main() {
arr:=[] int {2,1,3,5,6}
var x int
x= saint.Max(arr...)
fmt.Println(x) // 6
x= saint.Max(4,3,1,5,7)
fmt.Println(x) // 7
x= saint.Min(arr...)
fmt.Println(x) // 1
x= saint.Min(4,3,5,5,7)
fmt.Println(x) // 3
x= saint.Sum(arr...)
fmt.Println(x) // 17
x = saint.Sum(4,5)
fmt.Println(x) // 9
}