-
Notifications
You must be signed in to change notification settings - Fork 1
Neg
Maarten Hilferink edited this page Sep 27, 2026
·
11 revisions
Arithmetic functions negative (-)
- neg(a)
- - a
neg(a) or - a results in the negative values of data item a.
Data item or unit with Numeric value type
Since GeoDMS 20.22.0 the negation of an unsigned value that is larger than the largest signed value of the same width, the value type of the result, is an error. Before, it wrapped around: neg(uint8(200)) resulted in 56. A null remains null.
1. attribute<float32> negA (ADomain) := neg(A);
2. attribute<float32> negA (ADomain) := - A;
| A | negA |
|---|---|
| 0 | 0 |
| 1 | -1 |
| -2 | 2 |
| 3.6 | -3.6 |
| 999 | -999 |
ADomain, nr of rows = 5
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.