<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>TAN</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">TAN</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
Calculates the tangent of an angle that is entered in radians. 
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Returns</span>
<p>
A number; the tangent of an angle.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
Mathematical functions
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Function syntax</span><pre>Tan(number)
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">See also</span>
<p>
Atn, Cos, ACos, Sin, ASin, Pi
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Parameters</span>
<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Usage</span>
<p>
To convert degrees to radians, multiply degrees by <font face="Symbol">p</font>/180. To convert radians to degrees, multiply radians by 180/<font face="Symbol">p</font>.
</p>
<table>
  <tr valign="top">
    <td width="30"><strong>Note: </strong></td>
    <td>Because the function uses floating point arithmetic, it can return a very small number (such as 6.12323399574E-017) for angles that should produce 0 and can return a very large number (such as 1.63312393532E+016) for infinity or not a number. To test for a 0 value, check whether the value is less than 0.0000000000001. To test for an infinite value, check whether the value is more than 1E15.</td>
  </tr>
</table>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span><pre>&lt;h3&gt;Tan Example&lt;/h3&gt;
&lt;!--- Calculate tangent if form has been submitted ---&gt;
&lt;cfif IsDefined(&quot;FORM.tanNum&quot;)&gt;
&lt;!--- Make sure input is a number ---&gt;
   &lt;cfif IsNumeric(#FORM.tanNum#)&gt;
&lt;!--- Convert degrees to radians, call the Tan function. ---&gt;
        &lt;cfset tanValue=#Tan((Form.tanNum * PI()) / 180)#&gt;
&lt;!--- 0.0000000000001 is the function&#39;s precision limit.
     If absolute value of returned value is 
     less, set result to 0 ---&gt;
        &lt;cfif Abs(tanValue) LT 0.0000000000001&gt;
           &lt;cfset tanValue=0&gt;
        &lt;/cfif&gt;
        &lt;cfoutput&gt;
          Tan(#FORM.tanNum#) = #tanValue#&lt;br&gt;&lt;br&gt;
        &lt;/cfoutput&gt;
   &lt;cfelse&gt;
&lt;!--- If input is not a number, show an error message ---&gt;
      &lt;h4&gt;You must enter a numeric angle in degrees.&lt;/h4&gt;
   &lt;/cfif&gt;
&lt;/cfif&gt;
&lt;form action = &quot;#CGI.script_name#&quot; method=&quot;post&quot;&gt;
    Enter an angle in degrees to get its tangent:
    &lt;br&gt;&lt;input type = &quot;Text&quot; name = &quot;tanNum&quot; size = &quot;15&quot;&gt;
    &lt;br&gt;&lt;br&gt;
    &lt;input type = &quot;Submit&quot; name = &quot;&quot;&gt;&amp;nbsp;&amp;nbsp;
    &lt;input type = &quot;RESET&quot;
&lt;/form&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="NUMBER">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">NUMBER</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>


<p>Angle, in radians, for which to calculate the tangent.</p>

  </td>
  </tr>
  </table>
</div>

  </body>
</html>
