Cookies management by TermsFeed Cookie Consent

🧊 Cube root in Go

shorts numbers math

Use the Cbrt() function from the math package to find the cube root of a given number in Go.

package main

import (
    "fmt"
    "math"
)

func main() {
    fmt.Println(math.Cbrt(8))
}

Output:

2

Thank you for being on our site 😊. If you like our tutorials and examples, please consider supporting us with a cup of coffee and we'll turn it into more great Go examples.

Have a great day!

Buy Me A Coffee

🟦 Square 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