Skip to content
mtbeek32 edited this page Jan 12, 2023 · 17 revisions

Arithmetic functions subtract(-)

syntax

  • sub(a, b)
  • a - b

definition

sub(a, b) or a - b results in the element-by-element subtraction of the values of data item b from the corresponding values of data item a.

applies to

Data items with Numeric or Point Value Type

conditions

  1. Domain units of the arguments must match or be void (literals or parameters can be subtracted from data items of any domain).
  2. Arguments must have matching:

example

attribute<float32> AminB (ADomain) := sub(A, B);
attribute<float32> AminB (ADomain) := A - B;
A B AminB
0 1 -1
1 -1 2
-2 2 -4
3.6 1.44 2.16
999 111 888

ADomain, nr of rows = 5

See also

Clone this wiki locally