30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The hyperbolic sine of 0.000000 is 0.000000<br />

Error: range error<br />

The hyperbolic sine of 720.000000 is inf<br />

dsPIC<br />

®<br />

Language Tools Libraries<br />

DS51456B-page 360<br />

sinhf<br />

2004 Microchip Technology Inc.<br />

Description: Calculates the hyperbolic sine function of a single precision<br />

floating<br />

point value.<br />

Include: <br />

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

Argument: x value for which to return the hyperbolic sine<br />

Return Value: Returns the hyperbolic sine of x<br />

Remarks: A range error will occur if the magnitude of xis too large.<br />

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

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

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

int main(void)<br />

{<br />

float x, y;<br />

errno = 0;<br />

x = -1.0F;<br />

y = sinhf (x);<br />

if (errno)<br />

perror("Error");<br />

printf("The hyperbolic sine of %f is %f\n\n",<br />

x, y);<br />

errno = 0;<br />

x = 0.0F;<br />

y = sinhf (x);<br />

if (errno)<br />

perror("Error");<br />

printf("The hyperbolic sine of %f is %f\n\n",<br />

x, y);<br />

}<br />

Output:<br />

The hyperbolic sine of -1.000000 is -1.175201<br />

x = -1.0F;<br />

y = TANF (x);<br />

if (errno)<br />

perror ("Lỗi");<br />

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

errno = 0;<br />

x = 0.0f;<br />

y = TANF (x);<br />

if (errno)<br />

perror ("Lỗi");<br />

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

}<br />

Đầu ra:<br />

Tang của -1,000000 là -1,557408<br />

Tang của 0.000000 là 0.000000<br />

tanh<br />

Mô tả: Tính hàm tang hyperbol của một độ chính xác gấp đôi nổi<br />

giá trị điểm.<br />

Bao gồm:<br />

Prototype: tanh kép (double x);<br />

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

Quay trở lại giá trị: Trả về tang hyperbol của xin các phạm vi của -1 đến 1 bao<br />

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 tanh * /<br />

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

int main (void)<br />

{<br />

double x, y;<br />

x = -1,0;<br />

y = tanh (x);<br />

printf ("tang hyperbol của% f% f \ n \ n",<br />

x, y);<br />

x = 2,0;<br />

y = tanh (x);<br />

printf ("tang hyperbol của% f% f \ n \ n",<br />

x, y);<br />

}<br />

Đầu ra:<br />

Tang hyperbol của -1,000000 là -,761594

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

Saved successfully!

Ooh no, something went wrong!