##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::tan

From cppreference.com
< cpp‎ | numeric‎ | math

Defined in header `<cmath>` |  |
float tan( float arg ); |  |
double tan( double arg ); |  |
long double tan( long double arg ); |  |
double tan( Integral arg ); |  | (since C++11)

Computes tangent of `arg`.

### [edit] Parameters

arg | - | value representing angle in radians, of a floating-point or Integral type

### [edit] Return value

Tangent of `arg`.

Domain error occurs if `arg` is infinite. NAN is returned in that case.

### [edit] See also

sin | computes sine (sin(x)) (function) [edit]
cos | computes cosine (cos(x)) (function) [edit]
atan | computes arc tangent (arctan(x)) (function) [edit]
tan(std::complex) | computes tangent of a complex number (tan(z)) (function template) [edit]
tan(std::valarray) | applies the function std::tan to each element of valarray (function template) [edit]
C documentation for tan

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/numeric/math/tan&oldid=67135"