math abs for math
Returns the absolute value of a number.
Signature
> math abs {flags}
Input/output types:
| input | output |
|---|---|
| number | number |
| duration | duration |
| list<number> | list<number> |
| list<duration> | list<duration> |
| range | list<number> |
Examples
Compute absolute value of each number in a list of numbers.
> [-50 -100.0 25] | math abs ╭───┬────────╮ │ 0 │ 50 │ │ 1 │ 100.00 │ │ 2 │ 25 │ ╰───┴────────╯
Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/math_abs.html