Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 266 for newInt (0.2 sec)

  1. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

    		expect string
    	}{
    		{bigDec(big.NewInt(1), 0), "1"},
    		{bigDec(big.NewInt(1), 1), "10"},
    		{bigDec(big.NewInt(5), 2), "500"},
    		{bigDec(big.NewInt(8), 3), "8000"},
    		{bigDec(big.NewInt(2), 0), "2"},
    		{bigDec(big.NewInt(1), -1), "0.1"},
    		{bigDec(big.NewInt(3), -2), "0.03"},
    		{bigDec(big.NewInt(4), -3), "0.004"},
    		{bigDec(big.NewInt(0).Add(bigMostPositive, big.NewInt(1)), 0), "9223372036854775808"},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/select.go

    	fn := typecheck.LookupRuntime("selectgo")
    	var fnInit ir.Nodes
    	r.Rhs = []ir.Node{mkcall1(fn, fn.Type().ResultsTuple(), &fnInit, bytePtrToIndex(selv, 0), bytePtrToIndex(order, 0), pc0, ir.NewInt(base.Pos, int64(nsends)), ir.NewInt(base.Pos, int64(nrecvs)), ir.NewBool(base.Pos, dflt == nil))}
    	init = append(init, fnInit...)
    	init = append(init, typecheck.Stmt(r))
    
    	// selv, order, and pcs (if race) are no longer alive after selectgo.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 01:53:41 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/coverage/cover.go

    	lenx := ir.NewInt(base.Pos, int64(mdlen)) // untyped
    
    	// Generate a call to runtime.addCovMeta, e.g.
    	//
    	//   pkgIdVar = runtime.addCovMeta(&sym, len, hash, pkgpath, pkid, cmode, cgran)
    	//
    	fn := typecheck.LookupRuntime("addCovMeta")
    	pkid := coverage.HardCodedPkgID(base.Ctxt.Pkgpath)
    	pkIdNode := ir.NewInt(base.Pos, int64(pkid))
    	cmodeNode := ir.NewInt(base.Pos, int64(cnames.CounterMode))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 21:55:46 UTC 2024
    - 6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/pkginit/initAsanGlobals.go

    		// Assign globals[i].size.
    		g := n.(*ir.Name)
    		size := g.Type().Size()
    		c = typecheck.DefaultLit(ir.NewInt(base.Pos, size), types.Types[types.TUINTPTR])
    		setField("size", c, i)
    		// Assign globals[i].sizeWithRedzone.
    		rzSize := GetRedzoneSizeForGlobal(size)
    		sizeWithRz := rzSize + size
    		c = typecheck.DefaultLit(ir.NewInt(base.Pos, sizeWithRz), types.Types[types.TUINTPTR])
    		setField("sizeWithRedzone", c, i)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 17 19:36:24 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  5. src/go/constant/value.go

    			if !is63bit(a) || !is63bit(b) {
    				return makeInt(newInt().Add(big.NewInt(a), big.NewInt(b)))
    			}
    			c = a + b
    		case token.SUB:
    			if !is63bit(a) || !is63bit(b) {
    				return makeInt(newInt().Sub(big.NewInt(a), big.NewInt(b)))
    			}
    			c = a - b
    		case token.MUL:
    			if !is32bit(a) || !is32bit(b) {
    				return makeInt(newInt().Mul(big.NewInt(a), big.NewInt(b)))
    			}
    			c = a * b
    		case token.QUO:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 34K bytes
    - Viewed (0)
  6. src/crypto/elliptic/elliptic_test.go

    	checkIsOnCurveFalse("x+P, y", xx, y)
    	yy.Add(y, p)
    	checkIsOnCurveFalse("x, y+P", x, yy)
    
    	// Check if the overflow is dropped.
    	xx.Add(x, new(big.Int).Lsh(big.NewInt(1), 535))
    	checkIsOnCurveFalse("x+2⁵³⁵, y", xx, y)
    	yy.Add(y, new(big.Int).Lsh(big.NewInt(1), 535))
    	checkIsOnCurveFalse("x, y+2⁵³⁵", x, yy)
    
    	// Check if P is treated like zero (if possible).
    	// y^2 = x^3 - 3x + B
    	// y = mod_sqrt(x^3 - 3x + B)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 27 02:00:03 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  7. src/crypto/internal/bigmod/nat_test.go

    	N, _ := NewModulusFromBig(n)
    	A := NewNat().setBig(a).ExpandFor(N)
    	B := NewNat().setBig(b).ExpandFor(N)
    
    	if A.Mul(B, N).IsZero() != 1 {
    		t.Error("a * b mod (a * b) != 0")
    	}
    
    	i := new(big.Int).ModInverse(a, b)
    	N, _ = NewModulusFromBig(b)
    	A = NewNat().setBig(a).ExpandFor(N)
    	I := NewNat().setBig(i).ExpandFor(N)
    	one := NewNat().setBig(big.NewInt(1)).ExpandFor(N)
    
    	if A.Mul(I, N).Equal(one) != 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 12 00:56:20 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  8. src/crypto/x509/x509_test.go

    	revokedCerts := []pkix.RevokedCertificate{
    		{
    			SerialNumber:   big.NewInt(1),
    			RevocationTime: nowUTC,
    		},
    		{
    			SerialNumber: big.NewInt(42),
    			// RevocationTime should be converted to UTC before marshaling.
    			RevocationTime: now,
    		},
    	}
    	expectedCerts := []pkix.RevokedCertificate{
    		{
    			SerialNumber:   big.NewInt(1),
    			RevocationTime: nowUTC,
    		},
    		{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:00:16 UTC 2024
    - 163.4K bytes
    - Viewed (0)
  9. src/math/big/ratconv_test.go

    	}
    }
    
    func BenchmarkFloatPrecInexact(b *testing.B) {
    	for _, n := range []int{1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6} {
    		// d := 5^n + 1
    		d := NewInt(5)
    		p := NewInt(int64(n))
    		d.Exp(d, p, nil)
    		d.Add(d, NewInt(1))
    
    		// r := 1/d
    		var r Rat
    		r.SetFrac(NewInt(1), d)
    
    		b.Run(fmt.Sprint(n), func(b *testing.B) {
    			for i := 0; i < b.N; i++ {
    				_, ok := r.FloatPrec()
    				if ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 15 22:16:34 UTC 2023
    - 19.3K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/range.go

    		// if hv2 < utf8.RuneSelf
    		nif := ir.NewIfStmt(base.Pos, nil, nil, nil)
    		nif.Cond = ir.NewBinaryExpr(base.Pos, ir.OLT, hv2, ir.NewInt(base.Pos, utf8.RuneSelf))
    
    		// hv1++
    		nif.Body = []ir.Node{ir.NewAssignStmt(base.Pos, hv1, ir.NewBinaryExpr(base.Pos, ir.OADD, hv1, ir.NewInt(base.Pos, 1)))}
    
    		// } else {
    		// hv2, hv1 = decoderune(ha, hv1)
    		fn := typecheck.LookupRuntime("decoderune")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:33 UTC 2023
    - 17.6K bytes
    - Viewed (0)
Back to top