{{fbdoc item="title" value="TAN"}}----
Returns the tangent of an angle

{{fbdoc item="syntax"}}##
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Tan** ( [[KeyPgByval|byval]] //angle// [[KeyPgAs|as]] [[KeyPgDouble|double]] ) [[KeyPgAs|as]] [[KeyPgDouble|double]]
##
{{fbdoc item="usage"}}##
	//result// = **Tan**( //angle// )
##
{{fbdoc item="param"}}
	##//angle//##
		the angle (in radians)

{{fbdoc item="ret"}}
	Returns the tangent of the argument ##//angle//## as a ##[[KeyPgDouble|Double]]## within the range of -infinity to infinity.

{{fbdoc item="desc"}}
	The argument ##//angle//## is measured in [[TutMathAngles|radians]] (not [[TutMathAngles|degrees]]).
	
	The value returned by this function is undefined for values of ##//angle//## with an absolute value of ##2 ^ 63## or greater.
	
	##**Tan**## can be overloaded as operator to accept user-defined types.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/math/tan.bas"}}%%(freebasic)
CONST PI AS DOUBLE = 3.1415926535897932
DIM a AS DOUBLE
DIM r AS DOUBLE
INPUT "Please enter an angle in degrees: ", a
r = a * PI / 180	'Convert the degrees to Radians
PRINT ""
PRINT "The tangent of a" ; a; " degree angle is"; TAN ( r ) 
SLEEP
%%

The output would look like:
%%
Please enter an angle in degrees: 75
The tangent of a 75 degree angle Is 3.732050807568878
%%

{{fbdoc item="diff"}}
	- None

{{fbdoc item="see"}}
	- ##[[KeyPgAtn|Atn]]##
	- ##[[KeyPgAtan2|Atan2]]##
	- ##[[KeyPgSin|Sin]]##
	- ##[[KeyPgCos|Cos]]##
	- [[TutMathIntroTrig|A Brief Introduction To Trigonometry]]

{{fbdoc item="back" value="CatPgMath|Math"}}