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

NameTypeDescription
xreal numberInput 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))
Python Reference