W3cubDocs

/Nushell

math abs for math

Returns the absolute value of a number.

Signature

> math abs {flags}

Input/output types:

input output
duration duration
list<duration> list<duration>
list<number> list<number>
number number

Examples

Compute absolute value of each number in a list of numbers

> [-50-100.025] |math abs
╭───┬────────╮
050
1100.00
225
╰───┴────────╯

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/math_abs.html