function
<cmath> <ctgmath>
tandouble tan (double x); float tanf (float x);long double tanl (long double x);
double tan (double x); float tan (float x);long double tan (long double x);
double tan (double x); float tan (float x);long double tan (long double x); double tan (T x); // additional overloads for integral types
Compute tangent
Returns the tangent of an angle of x radians.Header
<tgmath.h>provides a type-generic macro version of this function.
180/PI
degrees.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* tan example */
#include <stdio.h> /* printf */
#include <math.h> /* tan */
#define PI 3.14159265
int main ()
{
double param, result;
param = 45.0;
result = tan ( param * PI / 180.0 );
printf ("The tangent of %f degrees is %f.\n", param, result );
return 0;
}
The tangent of 45.000000 degrees is 1.000000.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4