cpp/numeric/math/log2

@1-3@ Computes the of. @A@ Additional overloads are provided for all integer types, which are treated as.

Return value
If no errors occur, the base-2 logarithm of ($log 2(num)$ or $lb(num)$) is returned.

If a domain error occurs, an implementation-defined value is returned (NaN where supported).

If a pole error occurs, huge_val,, or is returned.

Error handling
Errors are reported as specified in math_errhandling.

Domain error occurs if is less than zero.

Pole error may occur if is zero.

If the implementation supports IEEE floating-point arithmetic (IEC 60559),
 * If the argument is ±0, -∞ is returned and fe_divbyzero is raised
 * If the argument is 1, +0 is returned
 * If the argument is negative, NaN is returned and fe_invalid is raised
 * If the argument is +∞, +∞ is returned
 * If the argument is NaN, NaN is returned