File r37/lisp/csl/html/r37_0106.html artifact 60ddc9c450 part of check-in 808e24217a



<A NAME=SQRT>

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



<B>SQRT</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
 <P>
<P>
The <em>sqrt</em> operator returns the square root of its argument. 
 <P> <H3> 
syntax: </H3>
<P>
<P>
<em>sqrt</em>(&lt;expression&gt;) 
<P>
<P>
<P>
&lt;expression&gt; can be any REDUCE scalar expression. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
sqrt(16*a^3); 

  4*SQRT(A)*A 


sqrt(17); 

  SQRT(17) 


on rounded; 

sqrt(17); 

  4.12310562562 


off rounded; 

sqrt(a*b*c^5*d^3*27); 

                                             2
  3*SQRT(D)*SQRT(C)*SQRT(B)*SQRT(A)*SQRT(3)*C *D

</TT></PRE><P><em>sqrt</em>checks its argument for squared factors and removes t
hem. 
<P>
<P>
Numeric values for square roots that are not exact integers are given only 
when 
<A HREF=r37_0330.html>rounded</A> is on. 
<P>
<P>
Please note that <em>sqrt(a**2)</em> is given as <em>a</em>, which may be 
incorrect if <em>a</em> eventually has a negative value. If you are 
programming a calculation in which this is a concern, you can turn on the 

<A HREF=r37_0317.html>precise</A> switch, which causes the absolute value of the
 square root 
to be returned. 
<P>
<P>
<P>


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