| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Calculates the tangent.
Tan( <nAngle> ) --> nTangent
The function returns the tangent in the range of plus and minus Infinity().
| See also: | Cos(), Cot(), DtoR(), RtoD(), Sin(), TanH() |
| Category: | CT:Math , Mathematical functions , Trigonometric functions |
| Source: | ct\trig.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example display results of Tan(). Note that there is a numeric overflow.
PROCEDURE Main
? Str( Tan( -Pi()*1.0 ), 18, 15) // result: 0.000000000000000
? Str( Tan( -Pi()*0.5 ), 18, 15) // result: ******************
? Str( Tan( -Pi()*0.3 ), 18, 15) // result: -1.376381920471174
? Str( Tan( Pi()*0.0 ), 18, 15) // result: 0.000000000000000
? Str( Tan( Pi()*0.3 ), 18, 15) // result: 1.376381920471174
? Str( Tan( Pi()*0.5 ), 18, 15) // result: ******************
? Str( Tan( Pi()*1.0 ), 18, 15) // result: 0.000000000000000
RETURN
http://www.xHarbour.com