ln3 Method - NumBits
Description
Return the number of bits needed to represent the current value of the large number.
More formally, let
X
be a variable of type
ln
. Then
n = X.NumBits( );
such that
2
n
< X <= 2
(n-1)
.
Signature
short NumBits( void ) const
Parameters
( none )
Returns
( short ) The number of bits, as described above.
Example
Print the number of bits in
X
:
ln X; ... cout << X.NumBits( ) << endl;