Sqrt returns the square root of x.
package main import ( "fmt" "math" ) func main() { const ( a = 3 b = 4 ) c := math.Sqrt(a*a + b*b) fmt.Printf("%.1f", c) }