Syntax
#include <math.h> double tan(double x);Description
tan calculates the tangent of x, where x is expressed in radians. If x is too large, a partial loss of significance in the result can occur.
tan returns the value of the tangent of x.
This example computes x as the tangent of pi/4.
#include <math.h> int main(void) { double pi,x; pi = 3.1415926; x = tan(pi/4.0); printf("tan( %lf ) is %lf\n", pi/4, x); return 0; /**************************************************************************** The output should be: tan( 0.785398 ) is 1.000000 ****************************************************************************/ }Related Information