Standard library / math

math.Lgamma()

Returns natural log of absolute gamma value and its sign. Expected stdout: '0 1\n'.

Formal Syntax & Structure

go syntaxgo
func Lgamma(x float64) (lgamma float64, sign int)

Parameters & Attributes

NameTypeDescription
xfloat64First input operand (or sole input if unary).

Return Value

(lgamma float64, sign int)

Returns natural log of absolute gamma value and its sign.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math")
func main() {  v, s := math.Lgamma(1)  fmt.Println(v, s)}
Go Reference