C Reference function atan()

Usage of atan():

double atan(double x);


The value of x has no range.

Return value:

The returned value is in the range of -p/2 to +p/2 (inclusive).

Source code example of atan():


	#define PI 3.14159265

		double input, output;
		input = 0.5;
		output = atan (input) * 180 / PI;
		printf ("Arc tangent of %lf is %lf degrees\n", input, output );
		return 0;

Output of the atan example program above:

	Arc tangent of 0.500000 is 26.565051 degrees.

This entry was posted in C Reference math.h Functions. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed. Tweet This! Tweet This! or use to share this post with others.

Comments are closed.