Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for mostNegative (1.62 sec)

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

    		{-2, -2, -4, true},
    
    		{mostNegative, -1, 0, false},
    		{mostNegative, 1, mostNegative + 1, true},
    		{mostPositive, -1, mostPositive - 1, true},
    		{mostPositive, 1, 0, false},
    
    		{mostNegative, mostPositive, -1, true},
    		{mostPositive, mostNegative, -1, true},
    		{mostPositive, mostPositive, 0, false},
    		{mostNegative, mostNegative, 0, false},
    
    		{-mostPositive, mostNegative, 0, false},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 29 20:41:44 UTC 2017
    - 5.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/resource/math.go

    )
    
    const mostNegative = -(mostPositive + 1)
    const mostPositive = 1<<63 - 1
    
    // int64Add returns a+b, or false if that would overflow int64.
    func int64Add(a, b int64) (int64, bool) {
    	c := a + b
    	switch {
    	case a > 0 && b > 0:
    		if c < 0 {
    			return 0, false
    		}
    	case a < 0 && b < 0:
    		if c > 0 {
    			return 0, false
    		}
    		if a == mostNegative && b == mostNegative {
    			return 0, false
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 23 13:07:14 UTC 2020
    - 7.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/api/resource/amount_test.go

    		{int64Amount{value: mostNegative, scale: 0}, 1, int64Amount{value: mostNegative, scale: 0}, true},
    		{int64Amount{value: mostNegative, scale: 1}, 0, int64Amount{value: 0, scale: 0}, true},
    		{int64Amount{value: mostNegative, scale: 1}, 1, int64Amount{value: mostNegative, scale: 1}, false},
    	} {
    		c := test.a
    		ok := c.Mul(test.b)
    		if ok && !test.ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 13 20:54:15 UTC 2023
    - 7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

    		{decQuantity(mostNegative/-2, 0, DecimalSI), -2, decQuantity(mostNegative, 0, DecimalSI), true},
    		{decQuantity(mostNegative, 0, DecimalSI), 2,
    			bigDecQuantity(big.NewInt(0).Mul(bigMostNegative, big.NewInt(2)), 0, DecimalSI), false},
    		{decQuantity(mostNegative, 0, DecimalSI), 10, decQuantity(mostNegative, 1, DecimalSI), false},
    		{decQuantity(mostNegative, 0, DecimalSI), -10,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 49.4K bytes
    - Viewed (0)
Back to top