MCPcopy Create free account
hub / github.com/cockroachdb/apd / altBit

Function altBit

bigint_test.go:1862–1869  ·  view source on GitHub ↗
(x *BigInt, i int)

Source from the content-addressed store, hash-verified

1860}
1861
1862func altBit(x *BigInt, i int) uint {
1863 z := new(BigInt).Rsh(x, uint(i))
1864 z = z.And(z, NewBigInt(1))
1865 if z.Cmp(new(BigInt)) != 0 {
1866 return 1
1867 }
1868 return 0
1869}
1870
1871func altSetBit(z *BigInt, x *BigInt, i int, b uint) *BigInt {
1872 one := NewBigInt(1)

Callers 1

testBitsetFunction · 0.85

Calls 4

NewBigIntFunction · 0.85
RshMethod · 0.80
AndMethod · 0.80
CmpMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…