# GoLang – Find Gamma – Gamma() Function – Examples & Explanation

`Gamma()` function is used to find the Gamma function of the given input (`x` – parameter) in Go language. The standard math package of Go programming language has `Gamma()` function.

## Syntax of `Gamma()` Function in Go

The syntax of `Gamma()` function in Go Language is:

```func Gamma(x float64) float64
```

Note: `float64` is a data type in Go language which has IEEE-754 64-bit floating-point numbers.
Special cases are:
```Gamma(+Inf) = +Inf Gamma(+0) = +Inf Gamma(-0) = -Inf Gamma(x) = NaN for integer x < 0 Gamma(-Inf) = NaN Gamma(NaN) = NaN```

## Parameters of `Gamma()` Function in Go Programming

`x ` – Where `x` is any Valid `float64` Input value. This parameter is required.

## Error Handling

If the `x ` parameter is not a number (numeric value) `Gamma()` function returns an `error `.
If there is no argument (`x` – input value) passes to the function, then the compiler will produce an `error`.

## Return Value of `Gamma()` Function in Go Programming

`Gamma()` function will return the Gamma function of the given input(`x ` – parameter).

## GoLang `Gamma()` Function Example 1

```package main

import "fmt"
import "math"

func main() {
var x float64
x = math.Gamma(21.7)
fmt.Println(x)
}
```

Output:
` 2.0394530598642573e+19 `

## GoLang `Gamma()` Function Example 2

```package main

import "fmt"
import "math"

func main() {
var x float64
x = math.Gamma(6.71)
fmt.Println(x)
}
```

Output:
` 421.0275017591933`

## GoLang `Gamma() ` Function Example 3

```package main

import "fmt"
import "math"

func main() {
var x float64
x = math.Gamma(3698.75689)
fmt.Println(x)
}
```

Output:
` +Inf `