17.05.2015 Views

TMS34010 C Compiler - Al Kossow's Bitsavers

TMS34010 C Compiler - Al Kossow's Bitsavers

TMS34010 C Compiler - Al Kossow's Bitsavers

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.

Fraction and Exponent<br />

frexp<br />

Syntax #include <br />

Defined in<br />

Description<br />

Example<br />

double frexp(value, exp)<br />

double value; /* input floating-point number */<br />

int *exp; /* pointer to exponent */<br />

frexp.obj in rts.lib<br />

The frexp function breaks a floating-point number into a normalized fraction<br />

and an integer power of 2. The function returns a value with a magnitude<br />

in the range [~,1} or 0, so that value = x x 2(**exp). The frexp function<br />

stores the power in the int pointed to by expo If value is 0, both parts of<br />

the result are 0.<br />

double fraction;<br />

int exp;<br />

fraction = frexp(3.0, &exp);<br />

/* after execution, fraction is .75 and exp is 2 */<br />

6-41

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

Saved successfully!

Ooh no, something went wrong!