30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

y = atan (x);<br />

printf("The arctangent of%f is %f\n\n", x, y);<br />

x = -1.0;<br />

y = atan (x);<br />

printf("The arctangent of%f is %f\n\n", x, y);<br />

}<br />

Output:<br />

The arctangent of 2.000000 is 1.107149<br />

The arctangent of -1.000000 is -0.785398<br />

asinf (Continued)<br />

Standard C Libraries with Math Functions<br />

2004 Microchip Technology Inc. DS51456B-page 329<br />

atanf<br />

Description: Calculates the trigonometric arc tangent function of a single<br />

precision<br />

floating-point value.<br />

Include: <br />

Prototype: float atanf (float x);<br />

Argument: x value for which to return the arc tangent<br />

Return Value: Returns the arc tangent in radians in the range of -pi/2 to +pi/2<br />

(inclusive).<br />

Remarks: No domain or rangeerror will occur.<br />

Example: #include /* for atanf */<br />

#include /* for printf */<br />

int main(void)<br />

{<br />

float x, y;<br />

x = 2.0F;<br />

y = atanf (x);<br />

printf("The arctangent of%f is %f\n\n", x, y);<br />

x = -1.0F;<br />

y = atanf (x);<br />

printf("The arctangent of%f is %f\n\n", x, y);<br />

}<br />

Output:<br />

The arctangent of 2.000000 is 1.107149<br />

The arctangent of -1.000000 is -0.785398<br />

atan2<br />

Description: Calculates the trigonometric arc tangent function of y/x.<br />

Bình luận: Không có tên miền hoặc phạm vi lỗi sẽ xảy ra. Xem sàn.<br />

Ví dụ: # include / * Cho trần nhà * /<br />

# include / * Cho printf * /<br />

int main (void)<br />

{<br />

double x [8] = {2.0, 1.75, 1.5, 1.25, -2.0,<br />

-1.75, -1.5, -1.25};<br />

y kép;<br />

int i;<br />

for (i = 0; i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!