Pow - ObjectVision/GeoDMS GitHub Wiki
Arithmetic functions power (^)
- pow(base, exp)
- base^exp
pow(base, exp) or base^exp results in the element-by-element exponentiation of the base values of data item base to the corresponding exponent values of data item exp.
The power operator can not (yet) be used associatively, expressions such as a^b^c are not allowed, use (a^b)^c instead.
Data items with float32 or float64 value type
On two polygon attributes, ^ gives their symmetric difference element by element: bp_xor for spoint and ipoint coordinates, geos_xor for fpoint and dpoint coordinates. See polygon operators.
- Domain of the arguments must match or be void (literals or parameters can be calculated with data items of any domain).
- Arguments must have matching:
1. attribute<float32> powAB (ADomain) := pow(A, B);
2. attribute<float32> powAB (ADomain) := A^B;
| A | B | powAB |
|---|---|---|
| 0 | 1 | 0 |
| 1 | 1 | 1 |
| 4 | 2 | 16 |
| 7 | 3 | 343 |
| -5 | -2 | 0.04 |
ADomain, nr of rows = 5
^ on fpoint and dpoint polygons since 20.29.0