Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for MinInt (0.1 sec)

  1. api/go1.17.txt

    pkg math (darwin-arm64), const MinInt = -9223372036854775808
    pkg math (darwin-arm64-cgo), const MaxInt = 9223372036854775807
    pkg math (darwin-arm64-cgo), const MaxUint = 18446744073709551615
    pkg math (darwin-arm64-cgo), const MinInt = -9223372036854775808
    pkg math (freebsd-386), const MaxInt = 2147483647
    pkg math (freebsd-386), const MaxUint = 4294967295
    pkg math (freebsd-386), const MinInt = -2147483648
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 20:31:46 UTC 2023
    - 18K bytes
    - Viewed (0)
  2. src/internal/types/testdata/check/const1.go

    	_ = int64(smallestFloat64 /* ERROR "cannot convert" */)
    )
    
    const (
    	_ int = minInt /* ERROR "overflows" */ - 1
    	_ int = minInt
    	_ int = maxInt
    	_ int = maxInt /* ERROR "overflows" */ + 1
    	_ int = smallestFloat64 /* ERROR "truncated" */
    
    	_ = int(minInt /* ERROR "overflows" */ - 1)
    	_ = int(minInt)
    	_ = int(maxInt)
    	_ = int(maxInt /* ERROR "overflows" */ + 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 16:11:16 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  3. src/math/const_test.go

    	}
    	if v := uint64(MaxUint64); v+1 != 0 {
    		t.Errorf("MaxUint64 should wrap around to zero: %d", v+1)
    	}
    }
    
    func TestMaxInt(t *testing.T) {
    	if v := int(MaxInt); v+1 != MinInt {
    		t.Errorf("MaxInt should wrap around to MinInt: %d", v+1)
    	}
    	if v := int8(MaxInt8); v+1 != MinInt8 {
    		t.Errorf("MaxInt8 should wrap around to MinInt8: %d", v+1)
    	}
    	if v := int16(MaxInt16); v+1 != MinInt16 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 03 22:44:33 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  4. src/math/const.go

    )
    
    // Integer limit values.
    const (
    	intSize = 32 << (^uint(0) >> 63) // 32 or 64
    
    	MaxInt    = 1<<(intSize-1) - 1  // MaxInt32 or MaxInt64 depending on intSize.
    	MinInt    = -1 << (intSize - 1) // MinInt32 or MinInt64 depending on intSize.
    	MaxInt8   = 1<<7 - 1            // 127
    	MinInt8   = -1 << 7             // -128
    	MaxInt16  = 1<<15 - 1           // 32767
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 21 14:07:39 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/loopbce.go

    			if step > 0 {
    				if limit.isGenericIntConst() {
    					// Figure out the actual largest value.
    					v := limit.AuxInt
    					if !inclusive {
    						if v == minSignedValue(limit.Type) {
    							return false // < minint is never satisfiable.
    						}
    						v--
    					}
    					if init.isGenericIntConst() {
    						// Use stride to compute a better lower limit.
    						if init.AuxInt > v {
    							return false
    						}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 07 17:37:47 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  6. test/divmod.go

    		if x >= y {
    			x -= y
    			q |= 1
    		}
    		y >>= 1
    	}
    	return q, x	
    }
    
    // signed divide and mod: do unsigned and adjust signs.
    func idiv(x, y int64) (q, r int64) {
    	// special case for minint / -1 = minint
    	if x-1 > x && y == -1 {
    		return x, 0
    	}
    	ux := uint64(x)
    	uy := uint64(y)
    	if x < 0 {
    		ux = -ux
    	}
    	if y < 0 {
    		uy = -uy
    	}
    	uq, ur := udiv(ux, uy)
    	q = int64(uq)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 9.3K bytes
    - Viewed (0)
  7. 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()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 14:15:38 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  8. internal/s3select/sql/value_test.go

    			wantOK: true,
    		},
    		{
    			name: "maxint",
    			fields: fields{
    				value: []byte(strconv.FormatInt(math.MaxInt64, 10)),
    			},
    			want:   math.MaxInt64,
    			wantOK: true,
    		},
    		{
    			name: "minint",
    			fields: fields{
    				value: []byte(strconv.FormatInt(math.MinInt64, 10)),
    			},
    			want:   math.MinInt64,
    			wantOK: true,
    		},
    		{
    			name: "max-overflow-int",
    			fields: fields{
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Mar 06 16:56:10 UTC 2023
    - 12.5K bytes
    - Viewed (0)
  9. test/loopbce.go

    		useString(a[i:]) // ERROR "(\([0-9]+\) )?Proved IsSliceInBounds$"
    	}
    	for i := int64(0); i < j+122+int64(-1<<63); i++ { // ERROR "Induction variable: limits \[0,\?\), increment 1$"
    		// len(a)-123+122+MinInt overflows when len(a) == 0, so a bound check is needed here
    		useString(a[i:])
    	}
    }
    
    func nobce3(a [100]int64) [100]int64 {
    	min := int64((-1) << 63)
    	max := int64((1 << 63) - 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  10. src/encoding/gob/dec_helpers.go

    		}
    		if i >= len(slice) {
    			// This is a slice that we only partially allocated.
    			growSlice(v, &slice, length)
    		}
    		x := state.decodeInt()
    		// MinInt and MaxInt
    		if x < ^int64(^uint(0)>>1) || int64(^uint(0)>>1) < x {
    			error_(ovfl)
    		}
    		slice[i] = int(x)
    	}
    	return true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 24 19:28:46 UTC 2023
    - 15.4K bytes
    - Viewed (0)
Back to top