std::log2
From cppreference.com
Template:cpp/numeric/math/sidebar Template:ddcl list begin <tr class="t-dsc-header">
<td>Defined in header
</td>
<cmath>
<td></td> <td></td> </tr> <tr class="t-dcl ">
<td >float log2( float arg );
</td>
<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td >double log2( double arg );
</td>
<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td >long double log2( long double arg );
</td>
<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td >double log2( Integral arg );
</td>
<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> Template:ddcl list end
Computes the base Template:cpp logarithm of Template:cpp.
Parameters
arg | - | floating point value |
Return value
log2(arg)
Domain error occurs if arg
is negative. Template:cpp is returned in that case.
Range error occurs if arg
is Template:cpp. Template:cpp is returned in that case.