tan [C++ Reference]
Keywords: c,math,tan
Date: 2009-03-19T23:40:32-0700

[[tan]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

## tan

Syntax:

        #include <cmath>
        double tan( double arg );

The tan() function returns the tangent of arg, where arg is given in radians. If arg is infinite, tan() will return NAN and raise a floating-point exception.

C++ also provides the following overloaded forms:

        #include <cmath>
        float tan( float arg ); // same as tanf() in C99
        long double tan( long double arg ); // same as tanl() in C99

Related Topics: acos, asin, atan, atan2, cos, cosh, sin, sinh, tanh

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •