in reply to Re^2: Can It Be Written In Base X With Only 1s And 0s
in thread Can It Be Written In Base X With Only 1s And 0s
return Math::BigInt->new( $num->as_bin() =~ s/^0?b//r );
It seems to be taking the binary representation, and making a new object in base 10, and returning that?
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Can It Be Written In Base X With Only 1s And 0s
by ikegami (Patriarch) on Jun 16, 2015 at 12:30 UTC | |
by QM (Parson) on Jun 16, 2015 at 15:16 UTC | |
by ikegami (Patriarch) on Jun 16, 2015 at 15:41 UTC |