Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 627 for rounds (0.53 sec)

  1. src/time/time.go

    }
    
    // Round returns the result of rounding d to the nearest multiple of m.
    // The rounding behavior for halfway values is to round away from zero.
    // If the result exceeds the maximum (or minimum)
    // value that can be stored in a [Duration],
    // Round returns the maximum (or minimum) duration.
    // If m <= 0, Round returns d unchanged.
    func (d Duration) Round(m Duration) Duration {
    	if m <= 0 {
    		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)
  2. src/archive/tar/common.go

    func alignSparseEntries(src []sparseEntry, size int64) []sparseEntry {
    	dst := src[:0]
    	for _, s := range src {
    		pos, end := s.Offset, s.endOffset()
    		pos += blockPadding(+pos) // Round-up to nearest blockSize
    		if end != size {
    			end -= blockPadding(-end) // Round-down to nearest blockSize
    		}
    		if pos < end {
    			dst = append(dst, sparseEntry{Offset: pos, Length: end - pos})
    		}
    	}
    	return dst
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 15 16:01:50 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  3. src/runtime/proc_test.go

    	}
    
    	go func() {
    		e, i := runtime.LockOSCounts()
    		if e != 0 || i != 0 {
    			t.Errorf("want locked counts 0, 0; got %d, %d", e, i)
    			return
    		}
    		runtime.LockOSThread()
    		runtime.LockOSThread()
    		runtime.UnlockOSThread()
    		e, i = runtime.LockOSCounts()
    		if e != 1 || i != 0 {
    			t.Errorf("want locked counts 1, 0; got %d, %d", e, i)
    			return
    		}
    		runtime.UnlockOSThread()
    		e, i = runtime.LockOSCounts()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 25.8K bytes
    - Viewed (0)
  4. src/runtime/stack.go

    		adjustframe(&u.frame, &adjinfo)
    	}
    
    	// free old stack
    	if stackPoisonCopy != 0 {
    		fillstack(old, 0xfc)
    	}
    	stackfree(old)
    }
    
    // round x up to a power of 2.
    func round2(x int32) int32 {
    	s := uint(0)
    	for 1<<s < x {
    		s++
    	}
    	return 1 << s
    }
    
    // Called from runtime·morestack when more stack is needed.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/_gen/genericOps.go

    	// Round to integer, float64 only.
    	// Special cases:
    	//   ±∞  → ±∞ (sign preserved)
    	//   ±0  → ±0 (sign preserved)
    	//   NaN → NaN
    	{name: "Floor", argLength: 1},       // round arg0 toward -∞
    	{name: "Ceil", argLength: 1},        // round arg0 toward +∞
    	{name: "Trunc", argLength: 1},       // round arg0 toward 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 15:49:20 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  6. src/runtime/mgcpacer_test.go

    	return func() float64 {
    		sum := f()
    		for _, s := range fs {
    			sum += s()
    		}
    		return sum
    	}
    }
    
    // quantize returns a new stream that rounds f to a multiple
    // of mult at each step.
    func (f float64Stream) quantize(mult float64) float64Stream {
    	return func() float64 {
    		r := f() / mult
    		if r < 0 {
    			return math.Ceil(r) * mult
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 19 13:53:21 UTC 2023
    - 39.3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

    			}
    			expect := item.expect.DeepCopy()
    			if asDec {
    				got.AsDec()
    			}
    			if ok := got.RoundUp(item.scale); ok != item.ok {
    				t.Errorf("%s(%d,%t): unexpected ok: %t", item.in, item.scale, asDec, ok)
    			}
    			if got.Cmp(expect) != 0 {
    				t.Errorf("%s(%d,%t): unexpected round: %s vs %s", item.in, item.scale, asDec, got.String(), expect.String())
    			}
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  8. src/crypto/sha512/sha512block_amd64.s

    	COPY_YMM_AND_BSWAP(Y5, (1*32)(DI), Y9)
    	COPY_YMM_AND_BSWAP(Y6, (2*32)(DI), Y9)
    	COPY_YMM_AND_BSWAP(Y7, (3*32)(DI), Y9)
    
    	MOVQ DI, frame_INP(SP)
    
    	// schedule 64 input dwords, by doing 12 rounds of 4 each
    	MOVQ $4, frame_SRND(SP)
    
    loop1:
    	VPADDQ  (BP), Y4, Y0
    	VMOVDQU Y0, frame_YFER(SP)
    
    	MY_VPALIGNR(Y0, Y7, Y6, 8)
    
    	VPADDQ Y4, Y0, Y0
    
    	MY_VPALIGNR(Y1, Y5, Y4, 8)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 27K bytes
    - Viewed (0)
  9. src/runtime/map_test.go

    				break
    			}
    		}
    	}
    }
    
    // Issue 8410
    func TestMapSparseIterOrder(t *testing.T) {
    	// Run several rounds to increase the probability
    	// of failure. One is not enough.
    NextRound:
    	for round := 0; round < 10; round++ {
    		m := make(map[int]bool)
    		// Add 1000 items, remove 980.
    		for i := 0; i < 1000; i++ {
    			m[i] = true
    		}
    		for i := 20; i < 1000; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  10. src/go/constant/value.go

    	s := strconv.Quote(x.string())
    	if utf8.RuneCountInString(s) > maxLen {
    		// The string without the enclosing quotes is greater than maxLen-2 runes
    		// long. Remove the last 3 runes (including the closing '"') by keeping
    		// only the first maxLen-3 runes; then add "...".
    		i := 0
    		for n := 0; n < maxLen-3; n++ {
    			_, size := utf8.DecodeRuneInString(s[i:])
    			i += size
    		}
    		s = s[:i] + "..."
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 34K bytes
    - Viewed (0)
Back to top