uTools-Manuals/docs/c/frexp.html

36 lines
800 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1>数学函数 - frexp</h1>
<p>原型extern float frexp(float x, int *exp);</p>
<p>用法:#include &lt;math.h></p>
<p>功能把浮点数x分解成尾数和指数。</p>
<p>说明x=m*2^expm为规格化小数。返回尾数m并将指数存入exp中。</p>
举例:<pre><code class="language-c">
// frexp.c
#include &lt;syslib.h>
#include &lt;math.h>
main()
{
float x;
int exp;
clrscr(); // clear screen
textmode(0x00); // 6 lines per LCD screen
x=frexp(64.0,&exp);
printf("64=%.2f*2^%d",x,exp);
getchar();
return 0;
}
</code></pre>相关函数:<a href="ldexp.html">ldexp</a>,<a href="modf.html">modf</a>