ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all!
ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all!
ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all!
ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all!
ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all!
ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all!
ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all!
ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all!
Menu
Front page
Memberlist
Sign up

 
Log in



New profiles
hari
nichtssagend
zithromax
ven
Edwin

Partners & Sponsors
Rockwave Hyves
FlabberM
Festivalinfo
Goedkopewebhosting
Sitix Ontwerpbureau
Custom Stores
tan function
Related library: math.h

The tan function returns the tangent of number in radians.

Usage
double tan(double number)

Input Parameters
double number

Where number is the number that will be calculated.

Return Value
If number is NAN or INFINITY, tan will return NAN.

Note: For areas where the tangent should produce an error because of an asymptote, the tan function is not accurate and instead returns a large number. The variable errno does not change.

Example
#include <stdio.h>
#include <math.h>

#define PI 3.14159265358979

int main()
{
 double input;
 double output;

 printf("Please enter a double: ");
 scanf("%lf", &input);

 output = tan(input);
 printf("The tangent of %f is %f in radians\n", input, output);

 output = tan(input * PI / 180);
 printf("The tangent of %f is %f in degrees\n", input, output);

 return 0;
}

History
We have no records of the history of this function. Know a source? Contact us.

Notes and Warnings
Understanding the Code

  1. Ask user for a number.
  2. Find the tangent of the number, and output the results.
  3. Find the tangent of the number again, but converted to degrees, and output the results.

Example Runs
Please enter a double: 5
The tangent of 5.000000 is -3.380515 in radians
The tangent of 5.000000 is 0.087489 in degrees

Please enter a double: 180
The tangent of 180.000000 is 1.338690 in radians
The tangent of 180.000000 is -0.000000 in degrees

Please enter a double: 270
The tangent of 270.000000 is -0.178839 in radians
The tangent of 270.000000 is 216235426413811.593750 in degrees

Please enter a double: 1.5707963267948966192313216916398
The tangent of 1.570796 is 16331239353195370.000000 in radians
The tangent of 1.570796 is 0.027422 in degrees

Please enter a double: 0
The tangent of 0.000000 is 0.000000 in radians
The tangent of 0.000000 is 0.000000 in degrees




Er zijn nog geen reacties geplaatst!
Je bent niet ingelogd! Meld je hier aan of log je aan de rechterkant in!
ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all!
ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all!
ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all! ANSI C dot NET - C programming, C functions, C tutorials, function summary... we have it all!