mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 09:45:50 +02:00
Mathsqrt (#3239)
* Output error when ls into a file without permission * math sqrt * added test to check fails when ls into prohibited dir * fix lint * math sqrt with tests and doc * trigger wasm build * Update filesystem_shell.rs * always forgetting the linting * fix clippy complaining Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
This commit is contained in:
@ -13,6 +13,7 @@ Currently the following functions are implemented:
|
||||
* `math min`: Finds the minimum within a list of numbers or tables
|
||||
* `math mode`: Finds the most frequent element(s) within a list of numbers or tables
|
||||
* `math round`: Applies the round function to a list of numbers
|
||||
* `math sqrt`: Applies the square root function to a list of numbers
|
||||
* `math stddev`: Finds the standard deviation of a list of numbers or tables
|
||||
* `math sum`: Finds the sum of a list of numbers or tables
|
||||
* `math product`: Finds the product of a list of numbers or tables
|
||||
@ -148,6 +149,15 @@ To get the average of the file sizes in a directory, simply pipe the size column
|
||||
───┴────
|
||||
```
|
||||
|
||||
```shell
|
||||
> echo [4 16 0.25] | math sqrt
|
||||
───┬────
|
||||
0 │ 2
|
||||
1 │ 4
|
||||
2 │ 0.5
|
||||
───┴────
|
||||
```
|
||||
|
||||
```shell
|
||||
> echo [1 -2 -3.0] | math abs
|
||||
───┬────────
|
||||
|
Reference in New Issue
Block a user