math sqrt for math
Returns the square root of the input number.
Signature
> math sqrt {flags} ...rest
Parameters
...rest: The cell-paths/columns to operate on.
Input/output types:
| input | output |
|---|---|
| number | float |
| list<number> | list<float> |
| range | list<number> |
| record | record |
Examples
Compute the square root of each number in a list.
> [9 16] | math sqrt
╭───┬──────╮
│ 0 │ 3.00 │
│ 1 │ 4.00 │
╰───┴──────╯Apply square root to list-valued columns in a record.
> {alice: [1 4 9], bob: [16 25 36]} | math sqrt
╭───────┬──────────────╮
│ │ ╭───┬──────╮ │
│ alice │ │ 0 │ 1.00 │ │
│ │ │ 1 │ 2.00 │ │
│ │ │ 2 │ 3.00 │ │
│ │ ╰───┴──────╯ │
│ │ ╭───┬──────╮ │
│ bob │ │ 0 │ 4.00 │ │
│ │ │ 1 │ 5.00 │ │
│ │ │ 2 │ 6.00 │ │
│ │ ╰───┴──────╯ │
╰───────┴──────────────╯Apply square root to a single column using a cell path.
> {alice: [1 4 9], bob: [16 25 36]} | math sqrt alice
╭───────┬──────────────╮
│ │ ╭───┬──────╮ │
│ alice │ │ 0 │ 1.00 │ │
│ │ │ 1 │ 2.00 │ │
│ │ │ 2 │ 3.00 │ │
│ │ ╰───┴──────╯ │
│ │ ╭───┬────╮ │
│ bob │ │ 0 │ 16 │ │
│ │ │ 1 │ 25 │ │
│ │ │ 2 │ 36 │ │
│ │ ╰───┴────╯ │
╰───────┴──────────────╯