ListSign
Qubes 9.0 Computes the sign of values in a list.
Syntax
ListSign(param1, param2, ...)
param1 = first parameter in the value set (value, range, or list)
param2 = second parameter in the value set (value, range, or list)
... = nth parameter in the value set (value, range, or list)
Remarks
Compute the sign of values as in the Sign function, but for all parameters and returns resulting list.
- strictly negative values are computed as -1
- strictly positive values are computed as +1
- zero or non-numbers are computed as zero
If lists are amongst the parameters, they are flattened.
Examples
ListSign(-3, 0, 4.5) = ( -1, 0, 1 ) ListSign('hello') = ( 0 ) non-numeric are computed as zero
ListSign(List(1, -2, 3), 0) = ( 1, -1, 1, 0 ) as the list was flattened