File r37/lisp/csl/html/r37_0031.html artifact e3111baaa7 part of check-in 3af273af29



<A NAME=power>

<TITLE>power</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>



<B>**</B> _ _ _ <B>POWER</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
The <em>**</em> operator is a prefix or infix binary exponentiation operator. 
<P>
<P>
 <P> <H3> 
syntax: </H3>
&lt;expression&gt; <em>**</em>&lt;expression&gt; 
 or <em>**</em>(&lt;expression&gt;,&lt;expression&gt;) 
<P>
<P>
<P>
&lt;expression&gt; may be any valid REDUCE expression. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
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

</TT></PRE><P>The exponentiation operator is left associative, so that <em>a**b*
*c</em> is 
equivalent to <em>(a**b)**c</em>, as shown in the second example. Note 
that this is not <em>a**(b**c)</em>, which would be right associative. 
<P>
<P>
When 
<A HREF=r37_0308.html>nat</A> is on (the default), REDUCE output produces raised
 
exponents, as shown. The symbol <em>^</em>, which is the upper-case 6 on 
most keyboards, may be used in the place of <em>**</em>. 
<P>
<P>
A square 
<A HREF=r37_0345.html>matrix</A> 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 
<A HREF=r37_0045.html>equation</A>s may be raised to 
fractional and floating-point powers. 
<P>
<P>
<P>


REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]