User Tools

Site Tools


c:math.h:tan

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

c:math.h:tan [2013/01/22 22:02] (current)
Line 1: Line 1:
 +{{keywords>wiki library source code example reference}}
 +===== tan =====
 +<code c>
 +    double tan(double);
 +</code>
 +Returns the tangent of a radian angle x. 
 +
 +
 +===== C Sourcecode Example =====
 +compile with gcc tan.c -o tan **-lm**
 +<code c>
 +#include <stdio.h> /* including standard library */
 +//#include <windows.h> /* uncomment this for Windows */
 +
 +#include <math.h> /* including math library */
 +
 +int main( void )
 +{
 +    double x;
 +    x = 42;
 +    
 +    printf ("tan of %lf° is %lf\n", x, tan (x*3.1415/180));
 +    return 0;
 +}
 +</code>
 +
 +==== output ====
 +   output:
 +   user@host:~$ ./tan 
 +   tan of 42.000000° is 0.900365
 +
  
advertising
c/math.h/tan.txt · Last modified: 2013/01/22 22:02 (external edit)

Impressum Datenschutz