[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


tan

Compute tangent.

Compatibility:

This function is compatible with the following targets:

ANSI

BeOS

EMB/RTOS

Mac OS

Palm OS

Win32


Prototype:
#include <math.h>

double tan(double x);
float tanf(float x);
long double tanl(long double x);
Parameters:

Parameters for this function are:

x  
float, double or long double  
value to compute  

Return:

tan() returns the tangent of x. x is measured in radians.

Remarks:

A range error may occur if the argument is close to an odd multiple of pi divided by 2

See Also:

"Inlined Intrinsics Option"

"cos"

"sin"

Example of tan() usage.:
#include <math.h>
#include <stdio.h>

int main(void)
{
	double x = 0.5;

	printf("The tangent of %f is %f.\n", x, tan(x));

	return 0;
}

Output:
The tangent of 0.500000 is 0.546302.


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 16, 2000