Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for maxInt (0.23 sec)

  1. src/internal/types/testdata/spec/range_int.go

    }
    
    func issue65133() {
    	for range maxInt {
    	}
    	for range maxInt /* ERROR "cannot use maxInt + 1 (untyped int constant 9223372036854775808) as int value in range clause (overflows)" */ + 1 {
    	}
    	for range maxUint /* ERROR "cannot use maxUint (untyped int constant 18446744073709551615) as int value in range clause (overflows)" */ {
    	}
    
    	for i := range maxInt {
    		_ = i
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 18:56:00 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  2. src/slices/slices_test.go

    		{x: make([]struct{}, math.MaxInt/6-5), count: 6, want: make([]struct{}, 6*(math.MaxInt/6-5))},
    		{x: make([]struct{}, math.MaxInt/7-6), count: 7, want: make([]struct{}, 7*(math.MaxInt/7-6))},
    		{x: make([]struct{}, math.MaxInt/8-7), count: 8, want: make([]struct{}, 8*(math.MaxInt/8-7))},
    		{x: make([]struct{}, math.MaxInt/9-8), count: 9, want: make([]struct{}, 9*(math.MaxInt/9-8))},
    	} {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:06 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  3. src/internal/concurrent/hashtriemap_test.go

    				expectPresent(t, s, i)(m.Load(s))
    				expectLoaded(t, s, i)(m.LoadOrStore(s, 0))
    			}
    			for i, s := range testData {
    				expectPresent(t, s, i)(m.Load(s))
    				expectNotDeleted(t, s, math.MaxInt)(m.CompareAndDelete(s, math.MaxInt))
    				expectDeleted(t, s, i)(m.CompareAndDelete(s, i))
    				expectNotDeleted(t, s, i)(m.CompareAndDelete(s, i))
    				expectMissing(t, s, 0)(m.Load(s))
    			}
    			for _, s := range testData {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 16:01:55 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  4. src/encoding/base32/base32_test.go

    	switch strconv.IntSize {
    	case 32:
    		tests = append(tests, test{rawStdEncoding, (math.MaxInt-4)/8 + 1, 429496730})
    		tests = append(tests, test{rawStdEncoding, math.MaxInt/8*5 + 4, math.MaxInt})
    	case 64:
    		tests = append(tests, test{rawStdEncoding, (math.MaxInt-4)/8 + 1, 1844674407370955162})
    		tests = append(tests, test{rawStdEncoding, math.MaxInt/8*5 + 4, math.MaxInt})
    	}
    	for _, tt := range tests {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 16:25:54 UTC 2024
    - 26K bytes
    - Viewed (0)
  5. src/go/constant/example_test.go

    	// -1 (1 + -1i)
    	// -1 (-1 + 1i)
    	// -1 (-1 + -1i)
    	//  0 0
    	//  0 (0 + 0i)
    	//  1 1
    	//  1 (0 + 1i)
    	//  1 (1 + 1i)
    }
    
    func ExampleVal() {
    	maxint := constant.MakeInt64(math.MaxInt64)
    	fmt.Printf("%v\n", constant.Val(maxint))
    
    	e := constant.MakeFloat64(math.E)
    	fmt.Printf("%v\n", constant.Val(e))
    
    	b := constant.MakeBool(true)
    	fmt.Printf("%v\n", constant.Val(b))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  6. src/math/big/ratmarsh.go

    	}
    	b := buf[0]
    	if b>>1 != ratGobVersion {
    		return fmt.Errorf("Rat.GobDecode: encoding version %d not supported", b>>1)
    	}
    	const j = 1 + 4
    	ln := byteorder.BeUint32(buf[j-4 : j])
    	if uint64(ln) > math.MaxInt-j {
    		return errors.New("Rat.GobDecode: invalid length")
    	}
    	i := j + int(ln)
    	if len(buf) < i {
    		return errors.New("Rat.GobDecode: buffer too small")
    	}
    	z.a.neg = b&1 != 0
    	z.a.abs = z.a.abs.setBytes(buf[j:i])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:31:58 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  7. cmd/admin-server-info.go

    		props.PoolNumbers = append(props.PoolNumbers, poolNumber)
    	}
    	sort.Ints(props.PoolNumbers)
    	props.PoolNumber = func() int {
    		if len(props.PoolNumbers) == 1 {
    			return props.PoolNumbers[0]
    		}
    		return math.MaxInt // this indicates that its unset.
    	}()
    
    	sensitive := map[string]struct{}{
    		config.EnvAccessKey:         {},
    		config.EnvSecretKey:         {},
    		config.EnvRootUser:          {},
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  8. src/encoding/gob/decgen.go

    	},
    	{
    		"float64",
    		"Float64",
    		`slice[i] = float64FromBits(state.decodeUint())`,
    	},
    	{
    		"int",
    		"Int",
    		`x := state.decodeInt()
    		// MinInt and MaxInt
    		if x < ^int64(^uint(0)>>1) || int64(^uint(0)>>1) < x {
    			error_(ovfl)
    		}
    		slice[i] = int(x)`,
    	},
    	{
    		"int16",
    		"Int16",
    		`x := state.decodeInt()
    		if x < math.MinInt16 || math.MaxInt16 < x {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 14:15:38 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  9. src/slices/slices.go

    // overflows.
    func Repeat[S ~[]E, E any](x S, count int) S {
    	if count < 0 {
    		panic("cannot be negative")
    	}
    
    	const maxInt = ^uint(0) >> 1
    	if hi, lo := bits.Mul(uint(len(x)), uint(count)); hi > 0 || lo > maxInt {
    		panic("the result of (len(x) * count) overflows")
    	}
    
    	newslice := make(S, len(x)*count)
    	n := copy(newslice, x)
    	for n < len(newslice) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 29 14:01:59 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  10. src/strings/strings.go

    	case 0:
    		return ""
    	case 1:
    		return elems[0]
    	}
    
    	var n int
    	if len(sep) > 0 {
    		if len(sep) >= maxInt/(len(elems)-1) {
    			panic("strings: Join output length overflow")
    		}
    		n += len(sep) * (len(elems) - 1)
    	}
    	for _, elem := range elems {
    		if len(elem) > maxInt-n {
    			panic("strings: Join output length overflow")
    		}
    		n += len(elem)
    	}
    
    	var b Builder
    	b.Grow(n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:48:16 UTC 2024
    - 31.2K bytes
    - Viewed (0)
Back to top