http://qs1969.pair.com?node_id=127134


in reply to bigint - float?

If I understand your problem, then this works with the newest version of Math::BigInt. I'm fairly certain that it won't work with some earlier versions. I seem to remember having trouble with this sort of thing in the past.
$x = Math::BigInt->bstr( $bigint ); $bits = int( log( $x ) / log( 2 ) ) + 1;
___________________
Kurt