Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

math cbrt for math

Returns the real-valued cube root of the input number.

Signature

> math cbrt {flags} ...rest

Parameters

  • ...rest: The cell-paths/columns to operate on.

Input/output types:

inputoutput
numberfloat
list<number>list<float>
rangelist<number>
recordrecord

Examples

Compute the cube root of each number in a list.

> [8 -27] | math cbrt
╭───┬───────╮
│ 0 │  2.00 │
│ 1 │ -3.00 │
╰───┴───────╯

Compute the cube root of list-valued columns in a record.

> {alice: [8 27 64], bob: [125 216]} | math cbrt
╭───────┬──────────────╮
│       │ ╭───┬──────╮ │
│ alice │ │ 0 │ 2.00 │ │
│       │ │ 1 │ 3.00 │ │
│       │ │ 2 │ 4.00 │ │
│       │ ╰───┴──────╯ │
│       │ ╭───┬──────╮ │
│ bob   │ │ 0 │ 5.00 │ │
│       │ │ 1 │ 6.00 │ │
│       │ ╰───┴──────╯ │
╰───────┴──────────────╯

Compute the cube root of a single column using a cell path.

> {alice: [8 27 64], bob: [125 216]} | math cbrt alice
╭───────┬──────────────╮
│       │ ╭───┬──────╮ │
│ alice │ │ 0 │ 2.00 │ │
│       │ │ 1 │ 3.00 │ │
│       │ │ 2 │ 4.00 │ │
│       │ ╰───┴──────╯ │
│       │ ╭───┬─────╮  │
│ bob   │ │ 0 │ 125 │  │
│       │ │ 1 │ 216 │  │
│       │ ╰───┴─────╯  │
╰───────┴──────────────╯