Standard library / math
math.Phi
Golden ratio (1+sqrt(5))/2. Expected stdout: '1.618034\n'.
Formal Syntax & Structure
go syntaxgo
const Phi = 1.61803398874989484820458683436563811772030917980576286213544862Working Example
Example Snippetgo
package main
import ( "fmt" "math")
func main() { fmt.Printf("%.6f\n", math.Phi)}