Standard library / math
math.Pi
Ratio of circumference to diameter; radians per half turn. Expected stdout: '3.141593\n'.
Formal Syntax & Structure
go syntaxgo
const Pi = 3.14159265358979323846264338327950288419716939937510582097494459Working Example
Example Snippetgo
package main
import ( "fmt" "math")
func main() { fmt.Printf("%.6f\n", math.Pi)}