Cookies management by TermsFeed Cookie Consent
Russia has invaded Ukraine and already killed tens of thousands of civilians, with many more raped or tortured. It's a genocide. We need your help. Let's fight back against the Russian regime.
Help Ukraine! Fight the Russian regime!

🟦 Square root in Go

shorts numbers math

Please consider supporting us by disabling your ad blocker

To find the square root of a specified number in Go, use the Sqrt() function from the math package.

package main

import (
    "fmt"
    "math"
)

func main() {
    fmt.Println(math.Sqrt(2))
}

Output:

1.4142135623730951

🧊 Cube root in Go

shorts numbers math

🍰 The maximum and minimum value of the int types in Go

shorts numbers math

📊 The maximum and minimum value of the float types in Go

shorts numbers math