Standard library / math
math.Cbrt()
Real cube root, including negative inputs. Expected stdout: '-3\n'.
Formal Syntax & Structure
go syntaxgo
func Cbrt(x float64) float64Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | float64 | First input operand (or sole input if unary). |
Return Value
float64
Real cube root, including negative inputs.
Working Example
Example Snippetgo
package main
import ( "fmt" "math")
func main() { fmt.Println(math.Cbrt(-27))}