Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for MinInt64 (0.28 sec)

  1. src/math/big/float_test.go

    func TestFloatInt64(t *testing.T) {
    	for _, test := range []struct {
    		x   string
    		out int64
    		acc Accuracy
    	}{
    		{"-Inf", math.MinInt64, Above},
    		{"-1e10000", math.MinInt64, Above},
    		{"-9223372036854775809", math.MinInt64, Above},
    		{"-9223372036854775808.000000000000000000001", math.MinInt64, Above},
    		{"-9223372036854775808", -9223372036854775808, Exact},
    		{"-9223372036854775807.000000000000000000001", -9223372036854775807, Above},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 51.9K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/prove.go

    			fallthrough
    		case d == unsigned && !w.Args[0].Type.IsSigned():
    			ft.update(parent, v, w.Args[0], d, r)
    		}
    	}
    }
    
    var opMin = map[Op]int64{
    	OpAdd64: math.MinInt64, OpSub64: math.MinInt64,
    	OpAdd32: math.MinInt32, OpSub32: math.MinInt32,
    }
    
    var opMax = map[Op]int64{
    	OpAdd64: math.MaxInt64, OpSub64: math.MaxInt64,
    	OpAdd32: math.MaxInt32, OpSub32: math.MaxInt32,
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:30:21 UTC 2024
    - 48.9K bytes
    - Viewed (0)
  3. src/math/big/int_test.go

    					t.Errorf("expected panic for small buffer and value %x", x)
    				}
    			}
    		})
    	}
    }
    
    func TestNewIntMinInt64(t *testing.T) {
    	// Test for uint64 cast in NewInt.
    	want := int64(math.MinInt64)
    	if got := NewInt(want).Int64(); got != want {
    		t.Fatalf("wanted %d, got %d", want, got)
    	}
    }
    
    func TestNewIntAllocs(t *testing.T) {
    	testenv.SkipIfOptimizationOff(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 58.5K bytes
    - Viewed (0)
  4. src/encoding/json/decode_test.go

    	},
    	{
    		CaseName: Name(""),
    		in:       `{"-9223372036854775808":"min","9223372036854775807":"max"}`,
    		ptr:      new(map[int64]string),
    		out:      map[int64]string{math.MinInt64: "min", math.MaxInt64: "max"},
    	},
    	{
    		CaseName: Name(""),
    		in:       `{"18446744073709551615":"max"}`,
    		ptr:      new(map[uint64]string),
    		out:      map[uint64]string{math.MaxUint64: "max"},
    	},
    	{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 16:40:14 UTC 2024
    - 67.6K bytes
    - Viewed (0)
  5. src/time/time_test.go

    	max1, err := ParseDuration(max0.String())
    	if err != nil || max0 != max1 {
    		t.Errorf("round-trip failed: %d => %q => %d, %v", max0, max0.String(), max1, err)
    	}
    
    	min0 := Duration(math.MinInt64)
    	min1, err := ParseDuration(min0.String())
    	if err != nil || min0 != min1 {
    		t.Errorf("round-trip failed: %d => %q => %d, %v", min0, min0.String(), min1, err)
    	}
    
    	for i := 0; i < 100; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:13:47 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  6. src/time/time.go

    	if lessThanHalf(r, m) {
    		return d - r
    	}
    	if d1 := d + m - r; d1 > d {
    		return d1
    	}
    	return maxDuration // overflow
    }
    
    // Abs returns the absolute value of d.
    // As a special case, [math.MinInt64] is converted to [math.MaxInt64].
    func (d Duration) Abs() Duration {
    	switch {
    	case d >= 0:
    		return d
    	case d == minDuration:
    		return maxDuration
    	default:
    		return -d
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 50.7K bytes
    - Viewed (0)
Back to top