20.09.2015 Views

Programming in C

Kochan - ProgramminginC

Kochan - ProgramminginC

SHOW MORE
SHOW LESS

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

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

Math Functions<br />

487<br />

double remquo (x, y, quo)<br />

Returns the rema<strong>in</strong>der of x divided by y, stor<strong>in</strong>g the quotient <strong>in</strong>to the <strong>in</strong>teger po<strong>in</strong>ted<br />

to by quo.<br />

double r<strong>in</strong>t (x)<br />

Returns the nearest <strong>in</strong>teger to x <strong>in</strong> float<strong>in</strong>g-po<strong>in</strong>t format. Might raise a float<strong>in</strong>g-po<strong>in</strong>t<br />

exception if the value of the result is not equal to the argument x.<br />

double round (x)<br />

Returns the value of x rounded to the nearest <strong>in</strong>teger <strong>in</strong> float<strong>in</strong>g-po<strong>in</strong>t format.<br />

Halfway values are always rounded away from zero (so 0.5 always rounds to 1.0).<br />

double scalbln (x, n)<br />

Returns x × FLT_RADIX n , where n is a long <strong>in</strong>t.<br />

double scalbn (x, n)<br />

Returns x × FLT_RADIX n .<br />

double s<strong>in</strong> (r)<br />

Returns the s<strong>in</strong>e of r.<br />

double s<strong>in</strong>h (x)<br />

Returns the hyperbolic s<strong>in</strong>e of x.<br />

double sqrt (x)<br />

Returns the square root of x, x ≥ 0.<br />

double tan (r)<br />

Returns the tangent of r.<br />

double tanh (x)<br />

Returns the hyperbolic tangent of x.<br />

double tgamma (x)<br />

Returns the gamma of x.<br />

double trunc (x)<br />

Truncates the argument x to an <strong>in</strong>teger value, return<strong>in</strong>g the result as a double.

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

Saved successfully!

Ooh no, something went wrong!