Available on: all targets
✓ verified

POW

The POW instruction is short for "power" and is used to calculate the power of a number. In other words, it allows you to raise a base number to a certain exponent. It multiplies the base by itself a number of times equal to the exponent. For example, POW(2, 3) means to multiply 2 by itself 3 times: 2 * 2 * 2. The variables used for the base and exponent must be integer. So can be computationally expensive for very large exponents. In some cases, there may be more efficient algorithms for calculating powers.

SYNTAX

 = POW( base, exponent )
 = base ^ exponent


Legend
  • id : identifier
  • type : datatype
  • v : value
  • "..." : string
  • [...] : optional

EXAMPLE

 pitagora = POW(a,2) + b^2 + POW(c,2)


Used in:

Any problem?

If you have found a problem with this keyword, if you think there is a bug or, more simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!

open an issue BACK TO KEYWORDS