Outdated Version

You are viewing an older version of this section. View current production version.

POW

Returns the given number exponentiated to the given power.

Syntax

POW ( number, power )
POWER ( number, power )

Arguments

  • expression: any valid numeric expression.
  • power: any valid numeric expression.

Return Type

Float or double. If either argument is null, returns NULL.

Examples

memsql> select pow(2, 8);
+-----------+
| pow(2, 8) |
+-----------+
|       256 |
+-----------+

memsql> select pow(2, 16);
+------------+
| pow(2, 16) |
+------------+
|      65536 |
+------------+

memsql> select pow(2, 24);
+------------+
| pow(2, 24) |
+------------+
|   16777216 |
+------------+

memsql> select pow(2, 2.5);
+-------------------+
| pow(2, 2.5)       |
+-------------------+
| 5.656854249492381 |
+-------------------+