Calculates the tangent of an angle that is entered in radians.
A number; the tangent of an angle.
Tan(number) |
Parameter |
Description |
|---|---|
number |
Angle, in radians, for which to calculate the tangent. |
To convert degrees to radians, multiply degrees by p/180. To convert radians to degrees, multiply radians by 180/p.
Note: Because the function uses floating point arithmetic, it can return a small number (such as 6.12323399574E-017) for angles that must produce 0 and can return a 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. |
<cfscript>
val=0.5
writeOutput("The tan of " & val & " is: " & tan(val))
</cfscript>
Output
The tan of 0.5 is: 0.546302489844
Sign in to your account