Pow

arithmetic-functions power (^)

syntax

  • pow(base, exp)
  • base^exp

definition

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.

description

The power operator can not (yet) be used associative, expressions as: a^b^c are not allowed, use (a^b)^c instead.

applies to

Data items with float32 or float 64 value-type

conditions

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

example

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