Skip to content
Maarten Hilferink edited this page Sep 27, 2026 · 11 revisions

Arithmetic functions negative (-)

syntax

  • neg(a)
  • - a

definition

neg(a) or - a results in the negative values of data item a.

applies to

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.

example

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

see also

Clone this wiki locally