File r37/lisp/csl/html/r37_0214.html artifact 158a31acfb part of check-in 3c4d7b69af



<A NAME=PRECISION>

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



<B>PRECISION</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>declaration</B><P>
<P>
 
 <P>
<P>
The <em>precision</em> declaration sets the number of decimal places used when 

<A HREF=r37_0330.html>rounded</A> is on. Default is system dependent, and normal
ly about 12. 
 <P> <H3> 
syntax: </H3>
<P>
<P>
<em>precision</em>(&lt;integer&gt;) or <em>precision</em> &lt;integer&gt; 
<P>
<P>
<P>
&lt;integer&gt; must be a positive integer. When &lt;integer&gt; is 0, the 
current precision is displayed, but not changed. There is no upper limit, 
but precision of greater than several hundred causes unpleasantly slow 
operation on numeric calculations. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
on rounded; 

7/9; 

  0.777777777778 


precision 20; 

  20 


7/9; 

  0.77777777777777777778 


sin(pi/4); 

  0.7071067811865475244

</TT></PRE><P>Trailing zeroes are dropped, so sometimes fewer than 20 decimal pl
aces are 
printed as in the last example. Turn on the switch 
<A HREF=r37_0291.html>fullprec</A> if 
you want to print all significant digits. The 
<A HREF=r37_0330.html>rounded</A> mode 
carries calculations to two more places than given by <em>precision</em>, and 
rounds off. 
<P>
<P>
<P>


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