File r37/lisp/csl/html/r37_0032.html artifact a355b194d6 part of check-in d9e362f11e



<A NAME=caret>

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



<B>^</B> _ _ _ <B>CARET</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
The <em>^</em> operator is a prefix or infix binary exponentiation operator. 
It is equivalent to 
<A HREF=r37_0031.html>power</A> or **. 
<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 &lt;not&gt; <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. 
<P>
<P>
A square 
<A HREF=r37_0345.html>matrix</A> may also be raised to positive 
and negative powers 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 ]