[Previous]
[Contents]
[Next]

tan()

calculate the tangent of an angle

Synopsis:

#include <math.h>
double tan( double x );

Description:

The tan() function computes the tangent of x (measured in radians). A large magnitude argument may yield a result with little or no significance.

Returns:

The tangent value. When an error has occurred, errno indicates the type of error detected.

Examples:

#include <stdio.h>
#include <math.h>

void main()
  {
    printf( "%f\n", tan(.5) );
  }

produces the output:

0.546302

Classification:

ANSI

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

atan(), atan2(), cos(), sin()


[Previous]
[Contents]
[Next]