MCPcopy Create free account
hub / github.com/JeanLucPons/VanitySearch / GetBitLength

Method GetBitLength

Int.cpp:695–706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693// ------------------------------------------------
694
695int Int::GetBitLength() {
696
697 Int t(this);
698 if(IsNegative())
699 t.Neg();
700
701 int i=NB32BLOCK-1;
702 while(i>=0 && t.bits[i]==0) i--;
703 if(i<0) return 0;
704 return (32-bitLength(t.bits[i])) + i*32;
705
706}
707
708// ------------------------------------------------
709

Callers 3

RandMethod · 0.80
ModExpMethod · 0.80
ModSqrtMethod · 0.80

Calls 2

bitLengthFunction · 0.85
NegMethod · 0.80

Tested by

no test coverage detected