MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / hi0bits

Function hi0bits

strings/dtoa.c:830–861  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

828
829
830static int hi0bits(register ULong x)
831{
832 register int k= 0;
833
834 if (!(x & 0xffff0000))
835 {
836 k= 16;
837 x<<= 16;
838 }
839 if (!(x & 0xff000000))
840 {
841 k+= 8;
842 x<<= 8;
843 }
844 if (!(x & 0xf0000000))
845 {
846 k+= 4;
847 x<<= 4;
848 }
849 if (!(x & 0xc0000000))
850 {
851 k+= 2;
852 x<<= 2;
853 }
854 if (!(x & 0x80000000))
855 {
856 k++;
857 if (!(x & 0x40000000))
858 return 32;
859 }
860 return k;
861}
862
863
864static int lo0bits(ULong *y)

Callers 3

b2dFunction · 0.85
d2bFunction · 0.85
dtoaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected