- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestTrailingZeroBits (0.18 sec)
-
lib/fips140/v1.0.0.zip
checkNot(n.IsOne(), "-1 is one") checkYes(n.IsOdd(), "-1 mod 4 is not odd") mTwoLimbs := maxModulus(2) n, err = NewNat().SetBytes([]byte{0x01}, mTwoLimbs) if err != nil { t.Fatal(err) } if n.IsOne() != 1 { t.Errorf("1 is not one") } } func TestTrailingZeroBits(t *testing.T) { nb := new(big.Int).SetBytes([]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7e}) nb.Lsh(nb, 128) expected := 129 for expected >= 0 { n := NewNat().setBig(nb) if n.TrailingZeroBitsVarT() != uint(expected) { t.Errorf("%d...
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed Jan 29 15:10:35 UTC 2025 - 635K bytes - Viewed (0)