Math Functions
math.cbrt()
Compute a real cube root, including negative inputs. Added in 3.11.
Formal Syntax & Structure
python syntaxpython
math.cbrt(x, /)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | real number | Input real value. |
Return Value
float
Floating-point result; finite precision and domain restrictions apply.
Working Example
Example Snippetpython
import mathprint(round(math.cbrt(-27), 8))