- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 226 for newInt (0.27 sec)
-
src/cmd/compile/internal/walk/order.go
// of experiments showed that that decreases overall performance. o.append(ir.NewIfStmt(base.Pos, ir.NewBinaryExpr(base.Pos, ir.OEQ, counter, ir.NewInt(base.Pos, 0xff)), []ir.Node{ir.NewAssignStmt(base.Pos, counter, ir.NewInt(base.Pos, 1))}, []ir.Node{ir.NewAssignOpStmt(base.Pos, ir.OADD, counter, ir.NewInt(base.Pos, 1))})) } // orderBlock orders the block of statements in n into a new slice,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 02:00:33 UTC 2024 - 42.7K bytes - Viewed (0) -
src/expvar/expvar_test.go
vars.keys = nil } func TestNil(t *testing.T) { RemoveAll() val := Get("missing") if val != nil { t.Errorf("got %v, want nil", val) } } func TestInt(t *testing.T) { RemoveAll() reqs := NewInt("requests") if i := reqs.Value(); i != 0 { t.Errorf("reqs.Value() = %v, want 0", i) } if reqs != Get("requests").(*Int) { t.Errorf("Get() failed.") } reqs.Add(1) reqs.Add(3)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:46:19 UTC 2024 - 13.4K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/typecheck.go
base.Fatalf("stringtoarraylit %v", n) } var l []ir.Node i := 0 for _, r := range ir.StringVal(n.X) { l = append(l, ir.NewKeyExpr(base.Pos, ir.NewInt(base.Pos, int64(i)), ir.NewInt(base.Pos, int64(r)))) i++ } return Expr(ir.NewCompLitExpr(base.Pos, ir.OCOMPLIT, n.Type(), l)) } func checkmake(t *types.Type, arg string, np *ir.Node) bool { n := *np
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0) -
src/math/big/nat_test.go
"0x92fcad4b5c0d52f451aec609b15da8e5e5626c4eaa88723bdeac9d25ca9b961269400410ca208a16af9c2fb07d799c32fe2f3cc5422f9711078d51a3797eb18e691295293284d8f5e69caf6decddfe1df6", }, } func TestMontgomery(t *testing.T) { one := NewInt(1) _B := new(Int).Lsh(one, _W) for i, test := range montgomeryTests { x := natFromString(test.x) y := natFromString(test.y) m := natFromString(test.m) for len(x) < len(m) { x = append(x, 0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 09 15:29:36 UTC 2024 - 26.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/gen_test.go
if rng.Intn(2) == 1 { ri.Path = ri.Path + "/more" } ans = append(ans, ri) } return ans } func chooseInts(rng *rand.Rand, n, m int) []int { ans := sets.NewInt() for len(ans) < m { i := rng.Intn(n) if ans.Has(i) { continue } ans.Insert(i) } return ans.List() } // genNonResourceRule returns a randomly generated valid
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 30 12:18:40 UTC 2023 - 24.8K bytes - Viewed (0) -
src/math/big/int.go
z.neg = neg return z } // SetUint64 sets z to x and returns z. func (z *Int) SetUint64(x uint64) *Int { z.abs = z.abs.setUint64(x) z.neg = false return z } // NewInt allocates and returns a new [Int] set to x. func NewInt(x int64) *Int { // This code is arranged to be inlineable and produce // zero allocations when inlined. See issue 29951. u := uint64(x) if x < 0 { u = -u } var abs []Word
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 14 17:02:38 UTC 2024 - 33.1K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
if base == 10 { amount.SetScale(amount.Scale() + Scale(exponent).infScale()) } else if base == 2 { // numericSuffix = 2 ** exponent numericSuffix := big.NewInt(1).Lsh(bigOne, uint(exponent)) ub := amount.UnscaledBig() amount.SetUnscaledBig(ub.Mul(ub, numericSuffix)) } // Cap at min/max bounds. sign := amount.Sign() if sign == -1 { amount.Neg(amount)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 23.8K bytes - Viewed (0) -
src/vendor/golang.org/x/crypto/cryptobyte/asn1.go
return true } if bytes[0] == 0 && bytes[1]&0x80 == 0 || bytes[0] == 0xff && bytes[1]&0x80 == 0x80 { // Value is not minimally encoded. return false } return true } var bigOne = big.NewInt(1) func (s *String) readASN1BigInt(out *big.Int) bool { var bytes String if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) { return false } if bytes[0]&0x80 == 0x80 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 29 21:28:33 UTC 2023 - 21.5K bytes - Viewed (0) -
src/crypto/tls/tls_test.go
keyDER, err := x509.MarshalPKCS8PrivateKey(key) if err != nil { t.Fatal(err) } keyPEM := pem.EncodeToMemory(&pem.Block{Type: "PRIVATE KEY", Bytes: keyDER}) tmpl := &x509.Certificate{ SerialNumber: big.NewInt(1), Subject: pkix.Name{CommonName: "test"}, } certDER, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, key.Public(), key) if err != nil { t.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 60.5K bytes - Viewed (0) -
src/encoding/asn1/asn1.go
if err != nil { return 0, err } if ret64 != int64(int32(ret64)) { return 0, StructuralError{"integer too large"} } return int32(ret64), nil } var bigOne = big.NewInt(1) // parseBigInt treats the given bytes as a big-endian, signed integer and returns // the result. func parseBigInt(bytes []byte) (*big.Int, error) { if err := checkInteger(bytes); err != nil { return nil, err
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:04:28 UTC 2023 - 31.8K bytes - Viewed (0)