Cbrt()
Published Jul 25, 2023
Contribute to Docs
The Cbrt()
function returns the cube root of a given number of type float64
.
Syntax
import math
cbrt = math.Cbrt(x)
Where Cbrt()
function takes a single argument of type float64
.
Example
package mainimport ("fmt""math")func main() {fmt.Printf("Cube root of 27 = %f", math.Sqrt(27))}
The output will be:
Cube root of 27 = 5.196152
Codebyte Example
The following example is runnable and demonstrates the usage of Cbrt()
in several different cases:
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.