File r37/lisp/csl/html/r37_0261.html artifact 91f3b9660d part of check-in 9992369dd3



<A NAME=TAN>

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



<B>TAN</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
The <em>tan</em> operator returns the tangent of its argument. 
 <P> <H3> 
syntax: </H3>
<P>
<P>
<em>tan</em>(&lt;expression&gt;) or <em>tan</em> &lt;simple\_expression&gt; 
<P>
<P>
<P>
<P>
&lt;expression&gt; is any valid scalar REDUCE expression, 
&lt;simple\_expression&gt; is a single identifier or begins with a prefix 
operator name. 
<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
tan a; 

  TAN(A) 


tan(pi/5); 

      PI
  TAN(--) 
      5


on rounded;
tan(pi/5); 

  0.726542528005

</TT></PRE><P><em>tan</em>returns a numeric value only if <em>rounded</em> is on
. Then the 
tangent is calculated to the current degree of floating point accuracy. 
<P>
<P>
When 
<A HREF=r37_0330.html>rounded</A> is on, 
no check is made to see if the argument of <em>tan</em> is a multiple of 
pi/2, for which the tangent goes to positive or negative infinity. 
(Of course, since REDUCE uses a fixed-point representation of pi/2, 
it produces a large but not infinite number.) You need to make a check for 
multiples of pi/2 in any program you use that might possibly ask 
for the tangent of such a quantity. 
<P>
<P>
<P>


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