|
Contents | Previous | Next | Subchapters |
| Syntax |
base ^ exponent
|
| See Also | multiplication , division |
6^2
O-Matrix will respond
36
x = {[1, 2, 3], [4, 5, 6]}
y = {[2, 2, 2], [2, 2, 2]}
x^y
O-Matrix will print
{
[ 1 , 4 , 9 ]
[ 16 , 25 , 36 ]
}
x = {[1, 2, 3], [4, 5, 6]}
x^2
O-Matrix will respond
{
[ 1 , 4 , 9 ]
[ 16 , 25 , 36 ]
}
x = {[1, 2, 3], [4, 5, 6]}
2^x
O-Matrix will respond
{
[ 2 , 4 , 8 ]
[ 16 , 32 , 64]
}
Exponentiation to a fractional power can be ambiguous.
For example, both i and -i
are square roots of -1.
O-Matrix uses a polar representation of the
base when performing complex exponentiation.
Suppose that z is a complex base
and w is a real exponent.
O-Matrix expresses z as
i theta
z = r e
where r is real and -pi < theta < pi.
The result is defined by
w w i theta w
z = r e