- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 267 for newInt (0.12 sec)
-
test/fixedbugs/issue9604b.go
a = append(a, r.Lsh(r, t.bits-1).Sub(r, big.NewInt(1))) r = big.NewInt(1) a = append(a, r.Lsh(r, t.bits-1).Sub(r, big.NewInt(2))) r = big.NewInt(1) a = append(a, r.Lsh(r, t.bits-1).Neg(r)) r = big.NewInt(1) a = append(a, r.Lsh(r, t.bits-1).Neg(r).Add(r, big.NewInt(1))) } else { r := big.NewInt(1) a = append(a, r.Lsh(r, t.bits).Sub(r, big.NewInt(1))) r = big.NewInt(1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 4.8K bytes - Viewed (0) -
misc/cgo/gmp/pi.go
//go:build ignore package main import ( big "." "fmt" "runtime" ) var ( tmp1 = big.NewInt(0) tmp2 = big.NewInt(0) numer = big.NewInt(1) accum = big.NewInt(0) denom = big.NewInt(1) ten = big.NewInt(10) ) func extractDigit() int64 { if big.CmpInt(numer, accum) > 0 { return -1 } tmp1.Lsh(numer, 1).Add(tmp1, numer).Add(tmp1, accum)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 10 22:32:35 UTC 2023 - 1.3K bytes - Viewed (0) -
src/crypto/internal/nistec/p256_ordinv_test.go
} // Check inv(1) and inv(N+1) against math/big exp := new(big.Int).ModInverse(big.NewInt(1), N).FillBytes(make([]byte, 32)) big.NewInt(1).FillBytes(input) out, err = nistec.P256OrdInverse(input) if err != nil { t.Fatal(err) } if !bytes.Equal(out, exp) { t.Error("unexpected output for inv(1)") } new(big.Int).Add(N, big.NewInt(1)).FillBytes(input) out, err = nistec.P256OrdInverse(input) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:29:44 UTC 2024 - 2.3K bytes - Viewed (0) -
src/crypto/x509/oid.go
var ( first = big.NewInt(0) second = big.NewInt(0) ) if _, ok := first.SetString(firstNum, 10); !ok { return errInvalidOID } if _, ok := second.SetString(secondNum, 10); !ok { return errInvalidOID } if first.Cmp(big.NewInt(2)) > 0 || (first.Cmp(big.NewInt(2)) < 0 && second.Cmp(big.NewInt(40)) >= 0) { return errInvalidOID }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 19:10:38 UTC 2024 - 8.3K bytes - Viewed (0) -
src/math/big/int_test.go
z, x, y *Int } var sumZZ = []argZZ{ {NewInt(0), NewInt(0), NewInt(0)}, {NewInt(1), NewInt(1), NewInt(0)}, {NewInt(1111111110), NewInt(123456789), NewInt(987654321)}, {NewInt(-1), NewInt(-1), NewInt(0)}, {NewInt(864197532), NewInt(-123456789), NewInt(987654321)}, {NewInt(-1111111110), NewInt(-123456789), NewInt(-987654321)}, } var prodZZ = []argZZ{ {NewInt(0), NewInt(0), NewInt(0)}, {NewInt(0), NewInt(1), NewInt(0)},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 58.5K bytes - Viewed (0) -
src/crypto/x509/platform_test.go
{ name: "valid", cert: &Certificate{ SerialNumber: big.NewInt(1), DNSNames: []string{"valid.testing.golang.invalid"}, NotBefore: now.Add(-time.Hour), NotAfter: now.Add(time.Hour), ExtKeyUsage: []ExtKeyUsage{ExtKeyUsageServerAuth}, }, }, { name: "valid (with name)", cert: &Certificate{ SerialNumber: big.NewInt(1), DNSNames: []string{"valid.testing.golang.invalid"},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 20 17:18:29 UTC 2024 - 7.2K bytes - Viewed (0) -
src/crypto/internal/mlkem768/mlkem768_test.go
} func TestZetas(t *testing.T) { ζ := big.NewInt(17) q := big.NewInt(q) for k, zeta := range zetas { // ζ^BitRev7(k) mod q exp := new(big.Int).Exp(ζ, big.NewInt(int64(BitRev7(uint8(k)))), q) if big.NewInt(int64(zeta)).Cmp(exp) != 0 { t.Errorf("zetas[%d] = %v, expected %v", k, zeta, exp) } } } func TestGammas(t *testing.T) { ζ := big.NewInt(17) q := big.NewInt(q)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 15:27:18 UTC 2024 - 10.3K bytes - Viewed (0) -
test/fixedbugs/issue62360.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 30 15:15:28 UTC 2023 - 414 bytes - Viewed (0) -
src/cmd/compile/internal/walk/compare.go
step = 1 } if step == 1 { comp( ir.NewIndexExpr(base.Pos, cmpl, ir.NewInt(base.Pos, i)), ir.NewIndexExpr(base.Pos, cmpr, ir.NewInt(base.Pos, i)), ) i++ remains -= t.Elem().Size() } else { elemType := t.Elem().ToUnsigned() cmplw := ir.Node(ir.NewIndexExpr(base.Pos, cmpl, ir.NewInt(base.Pos, i))) cmplw = typecheck.Conv(cmplw, elemType) // convert to unsigned
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 24 21:55:14 UTC 2023 - 16.2K bytes - Viewed (0) -
src/crypto/internal/nistec/nistec_test.go
t.Run("1", func(t *testing.T) { checkScalar(t, big.NewInt(1).FillBytes(make([]byte, byteLen))) }) t.Run("N-1", func(t *testing.T) { checkScalar(t, new(big.Int).Sub(c.Params().N, big.NewInt(1)).Bytes()) }) t.Run("N", func(t *testing.T) { checkScalar(t, c.Params().N.Bytes()) }) t.Run("N+1", func(t *testing.T) { checkScalar(t, new(big.Int).Add(c.Params().N, big.NewInt(1)).Bytes()) }) t.Run("all1s", func(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 12 18:48:23 UTC 2023 - 8.4K bytes - Viewed (0)