power INDEX

** _ _ _ POWER _ _ _ _ _ _ _ _ _ _ _ _ operator

The ** operator is a prefix or infix binary exponentiation operator.

syntax:

<expression> **<expression> or **(<expression>,<expression>)

<expression> may be any valid REDUCE expression.

examples:


x**15; 

   15
  X   


x**y**z; 

   Y*Z
  X    


x**(y**z); 

    Z
   Y
  X   


 **(y,4); 

   4
  Y  


on rounded; 

2**pi; 

  8.82497782708

The exponentiation operator is left associative, so that a**b* *c is equivalent to (a**b)**c, as shown in the second example. Note that this is not a**(b**c), which would be right associative.

When nat is on (the default), REDUCE output produces raised exponents, as shown. The symbol ^, which is the upper-case 6 on most keyboards, may be used in the place of **.

A square matrix may also be raised to positive and negative pow ers with the exponentiation operator (negative powers require the matrix to be invertible). Scalar expressions and equations may be raised to fractional and floating-point powers.