- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for TestTrailingZeroBits (0.35 sec)
-
lib/fips140/v1.0.0-c2097c7c.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 Dec 30 11:13:12 UTC 2025 - Last Modified: Thu Sep 25 19:53:19 UTC 2025 - 642.7K bytes - Viewed (0) -
lib/fips140/v1.1.0-rc1.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 Dec 30 11:13:12 UTC 2025 - Last Modified: Thu Dec 11 16:27:41 UTC 2025 - 663K bytes - Viewed (0)