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.

(in magnitude) to be represented inthe target precision. When the<br />

printed result is +/- HUGE_VAL, it will be represented by +/- inf.<br />

acos<br />

Description: Calculates the trigonometric arc cosine function of a double<br />

precision<br />

floating-point value.<br />

Include: <br />

Prototype: double acos (double x);<br />

Argument: x value between -1 and 1 for which to return the arc cosine<br />

Return Value: Returns the arc cosine in radians in the range of 0 to pi<br />

(inclusive).<br />

Remarks: A domain error occurs if xis less than -1 or greater than 1.<br />

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

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

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

int main(void)<br />

{<br />

double x,y;<br />

errno = 0;<br />

x = -2.0;<br />

y = acos (x);<br />

if (errno)<br />

perror("Error");<br />

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

dsPIC<br />

®<br />

Language Tools Libraries<br />

Quay trở lại giá trị: Trả về tang cung trong radian trong khoảng -pi / 2 đến + pi<br />

2<br />

(Bao gồm).<br />

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

Ví dụ: # include / * Cho atan * /<br />

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

int main (void)<br />

{<br />

double x, y;<br />

x = 2,0;<br />

y = atan (x);<br />

printf ("arctangent của% f% f \ n \ n", x, y);<br />

x = -1,0;<br />

y = atan (x);<br />

printf ("arctangent của% f% f \ n \ n", x, y);<br />

}<br />

Đầu ra:<br />

Các arctangent của 2.000000 là 1.107149<br />

Các arctangent của -1,000000 là -,785398<br />

asinf (Tiếp theo)<br />

Thư viện chuẩn C với hàm toán học<br />

2004 Microchip Technology Inc DS51456B trang 329<br />

atanf<br />

Mô tả: Tính hàm hồ quang tang lượng giác của một độ chính xác đơn<br />

giá trị dấu chấm động.<br />

Bao gồm:<br />

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

DS51456B-page 326<br />

2004 Microchip Technology Inc.<br />

Đối số: x giá trị mà trả lại tang cung<br />

errno = 0;<br />

x = 0.10;<br />

y = acos (x);<br />

if (errno)<br />

perror("Error");<br />

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

}<br />

Output:<br />

Error: domain error<br />

The arccosine of -2.000000 is nan<br />

The arccosine of 0.100000 is 1.470629<br />

acosf<br />

Quay trở lại giá trị: Trả về tang cung trong radian trong khoảng -pi / 2 đến + pi<br />

2<br />

(Bao gồm).<br />

Bình luận: Không có tên miền hoặc rangeerror sẽ xảy ra.<br />

Ví dụ: # include / * Cho atanf * /<br />

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

int main (void)<br />

{<br />

float x, y;<br />

x = 2.0F;<br />

y = atanf (x);<br />

printf ("arctangent của% f% f \ n \ n", x, y);

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

Saved successfully!

Ooh no, something went wrong!