Skip to content
class method

Math.cbrt

(::Math::double x) -> ::Float
Math.cbrt(x) → float

Returns the cube root of x.

  • Domain: [-INFINITY, INFINITY].

  • Range: [-INFINITY, INFINITY].

Examples:

Example
cbrt(-INFINITY) # => -Infinity
cbrt(-27.0)     # => -3.0
cbrt(-8.0)      # => -2.0
cbrt(-2.0)      # => -1.2599210498948732
cbrt(1.0)       # => 1.0
cbrt(0.0)       # => 0.0
cbrt(1.0)       # => 1.0
cbrt(2.0)       # => 1.2599210498948732
cbrt(8.0)       # => 2.0
cbrt(27.0)      # => 3.0
cbrt(INFINITY)  # => Infinity
See also .atanh .cos .atan2 .cosh also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0