📄 scalb.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>scalb</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_008_153"> </a>NAME</h4><blockquote>scalb - load exponent of a radix-independent floating-point number</blockquote><h4><a name = "tag_000_008_154"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="math.h.html">math.h</a>>double scalb(double <i>x</i>, double <i>n</i>);</code></pre></blockquote><h4><a name = "tag_000_008_155"> </a>DESCRIPTION</h4><blockquote>The<i>scalb()</i>function computes <i>x</i> * <i>r<small><sup>n</sup></small></i>,where <i>r</i> is the radix of the machine's floating point arithmetic.When <i>r</i> is 2,<i>scalb()</i>is equivalent to<i><a href="ldexp.html">ldexp()</a></i>.<p>An application wishing to check for error situations should set<i>errno</i>to 0 before calling<i>scalb()</i>.If<i>errno</i>is non-zero on return, or the return value is NaN, an error has occurred.</blockquote><h4><a name = "tag_000_008_156"> </a>RETURN VALUE</h4><blockquote>Upon successful completion, the<i>scalb()</i>function returns <i>x</i> * <i>r<small><sup>n</sup></small></i>.<p>If the correct value would overflow,<i>scalb()</i>returns ±HUGE_VAL(according to the sign of x</i>) and sets <i>errno</i> to [ERANGE].<p>If the correct value would underflow,<i>scalb()</i>returns 0 and sets <i>errno</i> to [ERANGE].<p>The<i>scalb()</i>function returns <i>x</i> when <i>x</i> is ±Inf.<p>If <i>x</i> or <i>n</i> is NaN, then<i>scalb()</i>returns NaN and may set <i>errno</i> to [EDOM].</blockquote><h4><a name = "tag_000_008_157"> </a>ERRORS</h4><blockquote>The<i>scalb()</i>function will fail if:<dl compact><dt>[ERANGE]<dd>The correct value would overflow or underflow.</dl><p>The<i>scalb()</i>function may fail if:<dl compact><dt>[EDOM]<dd>The <i>x</i> or <i>n</i> argument is NaN.</dl></blockquote><h4><a name = "tag_000_008_158"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_008_159"> </a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_008_160"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_008_161"> </a>SEE ALSO</h4><blockquote><i><a href="ldexp.html">ldexp()</a></i>,<i><a href="math.h.html"><math.h></a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -