Binary Operator "**"

QuantScript's binary pow

**
operator implements arithmetic exponentiation.

Examples:

1 2 ** 3 # -> 8
2 2 ** 3 ** 2 # -> 64
3 2 ** 1.5 # -> 2.82842712475
4 2 ** 0 # -> 1
5 0 ** 0 # -> 0
6 0 ** -2 # -> unknown
7 -5 ** 0.5 # -> unknown

Table of Operands

Anything not listed here results in an Unknown.
This operator is not commutative -

x ** y
is not always the same as
y ** x
.
This operator is not type-commutative - the type of
x ** y
is not always the same as the type of
y ** x
.
This operator is left associative -
x ** y ** z
is the same as
(x ** y) ** z
.

Left OperandOperatorRight OperandResult
Number == 0**Negative NumberUnknown
Negative Number**Non-integer NumberUnknown
Number**NumberNumber
Number**Series<Number>Series<Number|Unknown>
Number == 0**Negative MultiDataset<Number>MultiDataset<Unknown>
Negative Number**Non-integer MultiDataset<Number>MultiDataset<Unknown>
Number**MultiDataset<Number>MultiDataset<Number>
Series<Number> == 0**Negative MultiDataset<Number>MultiDataset<Unknown>
Negative Series<Number>**Non-integer MultiDataset<Number>MultiDataset<Unknown>
Series<Number>**MultiDataset<Number>MultiDataset<Number>