Standard library / math
math.Sqrt2
Square root of two. Expected stdout: '1.414214\n'.
Formal Syntax & Structure
go syntaxgo
const Sqrt2 = 1.41421356237309504880168872420969807856967187537694807317667974Working Example
Example Snippetgo
package main
import ( "fmt" "math")
func main() { fmt.Printf("%.6f\n", math.Sqrt2)}