整数的对应部分是1 << n,但它仅适用于整数n.@H_301_3@
std::exp2(double n)
Computes 2 raised to the given power n@H_301_3@
2
n
在特定环境中,exp2(x)可能不会比pow(2.0,x)快,但它比一般pow更具体.@H_301_3@