用户工具

站点工具


reference:language:ldexp

差别

这里会显示出您选择的修订版和当前版本之间的差别。


前一修订版
reference:language:ldexp [2023/06/07 04:23] (当前版本) – 外部编辑 127.0.0.1
行 1: 行 1:
 +====== ldexp() ======
 +
 +===== 例子 =====
 +<code cpp>
 +double c = ldexp(3, 2);  // Sets c to 12 = 3 * 2 ^ 2
 +double d = ldexp(2, 4);  // Sets d to 32 = 2 * 2 ^ 4
 +</code>
 +==== 描述 ====
 +计算x乘以2的exp次幂 ( x * ( 2^exp ) )
 +
 +==== 语法 ====
 +
 +ldexp(x, exp)
 +=== 参数 ===
 +
 +x double, float or int
 +
 +exp double, float or int
 +
 +返回 double