On this page
  1. math.cbrt
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

math.cbrt

Prev: math.atanh | Up: math | Next: math.ceil
Rel: math.acos, math.acosh, math.asin, math.asinh
Ref: docs.python.org — math.cbrt
Tags: #public #python3 #stdlib #math


Import

import math
from math import cbrt

Signature & Overview

math.cbrt(x, /)

Return the cube root of x.

Usage

import math

assert math.isclose(math.cbrt(27.0), 3.0)
assert math.isclose(math.cbrt(-8.0), -2.0)

Gotchas

REPL Inspect

from math import cbrt
help(cbrt)

Linked from

Related notes