Namespaces
Variants
Actions

tan, tanf, tanl

From cppreference.com
< c‎ | numeric‎ | math
 
 
 
Common mathematical functions
Functions
Basic operations
(C99)
(C99)
(C99)
(C99)(C99)(C99)(C23)
Maximum/minimum operations
(C99)
(C99)
Exponential functions
(C23)
(C99)
(C99)
(C23)
(C23)

(C99)
(C99)(C23)
(C23)
(C23)
Power functions
(C99)
(C23)
(C23)

(C99)
(C23)
(C23)
Trigonometric and hyperbolic functions
tan
(C23)
(C23)
(C23)
(C23)
(C23)
(C23)
(C23)
(C99)
(C99)
(C99)
Nearest integer floating-point
(C99)(C99)(C99)
(C99)

(C99)(C99)(C99)
(C23)(C23)(C23)(C23)
Floating-point manipulation
(C99)(C99)
(C99)(C23)
(C99)
Narrowing operations
(C23)
(C23)
(C23)
(C23)
(C23)
(C23)
Quantum and quantum exponent
Decimal re-encoding functions
Total order and payload functions
Classification
(C99)
(C99)
(C99)
(C23)
Error and gamma functions
(C99)
(C99)
(C99)
(C99)
Types
Macro constants
Special floating-point values
(C99)(C23)
Arguments and return values
Error handling
Fast operation indicators
 
Defined in header <math.h>
float       tanf( float arg );
(1) (since C99)
double      tan( double arg );
(2)
long double tanl( long double arg );
(3) (since C99)
_Decimal32  tand32( _Decimal32 arg );
(4) (since C23)
_Decimal64  tand64( _Decimal64 arg );
(5) (since C23)
_Decimal128 tand128( _Decimal128 arg );
(6) (since C23)
Defined in header <tgmath.h>
#define tan( arg )
(7) (since C99)
1-6) Computes the tangent of arg (measured in radians).
7) Type-generic macro: If the argument has type long double, (3) (tanl) is called. Otherwise, if the argument has integer type or the type double, (2) (tan) is called. Otherwise, (1) (tanf) is called. If the argument is complex, then the macro invokes the corresponding complex function (ctanf, ctan, ctanl).

The functions (4-6) are declared if and only if the implementation predefines __STDC_IEC_60559_DFP__ (i.e. the implementation supports decimal floating-point numbers).

(since C23)

Contents