calculate the tangent of an angle
#include <math.h> double tan( double x );
The tan() function computes the tangent of x (measured in radians). A large magnitude argument may yield a result with little or no significance.
The tan() function returns the tangent value. When an error has occurred, errno contains a value that indicates the type of error that has been detected.
#include <stdio.h>
#include <math.h>
void main()
{
printf( "%f\n", tan(.5) );
}
produces the output:
0.546302
ANSI
Math