Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 244 for ROUND (0.04 sec)

  1. src/time/example_test.go

    	if err != nil {
    		panic(err)
    	}
    
    	round := []time.Duration{
    		time.Nanosecond,
    		time.Microsecond,
    		time.Millisecond,
    		time.Second,
    		2 * time.Second,
    		time.Minute,
    		10 * time.Minute,
    		time.Hour,
    	}
    
    	for _, r := range round {
    		fmt.Printf("d.Round(%6s) = %s\n", r, d.Round(r).String())
    	}
    	// Output:
    	// d.Round(   1ns) = 1h15m30.918273645s
    	// d.Round(   1µs) = 1h15m30.918274s
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 13 01:05:00 UTC 2024
    - 22.4K bytes
    - Viewed (0)
  2. src/net/netip/fuzz_test.go

    		if ip.IsValid() && ip.Next().IsValid() && ip.Next().Prev() != ip {
    			t.Errorf(".Next.Prev did not round trip: ip=%q .next=%q .next.prev=%q", ip, ip.Next(), ip.Next().Prev())
    		}
    		if ip.IsValid() && ip.Prev().IsValid() && ip.Prev().Next() != ip {
    			t.Errorf(".Prev.Next did not round trip: ip=%q .prev=%q .prev.next=%q", ip, ip.Prev(), ip.Prev().Next())
    		}
    
    		port, err := ParseAddrPort(s)
    		if err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 20 23:46:23 UTC 2021
    - 10.5K bytes
    - Viewed (0)
  3. src/math/big/ftoa.go

    			prec = len(d.mant)
    		}
    	} else {
    		// round appropriately
    		switch fmt {
    		case 'e', 'E':
    			// one digit before and number of digits after decimal point
    			d.round(1 + prec)
    		case 'f':
    			// number of digits before and after decimal point
    			d.round(d.exp + prec)
    		case 'g', 'G':
    			if prec == 0 {
    				prec = 1
    			}
    			d.round(prec)
    		}
    	}
    
    	// 3) read digits out and format
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 13.5K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/roundtrip.go

    //	    })
    //	}
    func GlobalNonRoundTrippableTypes() sets.String {
    	return sets.NewString(globalNonRoundTrippableTypes.List()...)
    }
    
    // RoundTripTypesWithoutProtobuf applies the round-trip test to all round-trippable Kinds
    // in the scheme.  It will skip all the GroupVersionKinds in the skip list.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 16.8K bytes
    - Viewed (0)
  5. cmd/metrics-resource.go

    				cpuUserVal := math.Round(ts.User/tot*100*100) / 100
    				updateResourceMetrics(cpuSubsystem, cpuUser, cpuUserVal, labels, false)
    				cpuSystemVal := math.Round(ts.System/tot*100*100) / 100
    				updateResourceMetrics(cpuSubsystem, cpuSystem, cpuSystemVal, labels, false)
    				cpuIdleVal := math.Round(ts.Idle/tot*100*100) / 100
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 17 15:15:13 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  6. src/strconv/ftoa.go

    		case 'f':
    			prec = max(digs.nd-digs.dp, 0)
    		case 'g', 'G':
    			prec = digs.nd
    		}
    	} else {
    		// Round appropriately.
    		switch fmt {
    		case 'e', 'E':
    			d.Round(prec + 1)
    		case 'f':
    			d.Round(d.dp + prec)
    		case 'g', 'G':
    			if prec == 0 {
    				prec = 1
    			}
    			d.Round(prec)
    		}
    		digs = decimalSlice{d: d.d[:], nd: d.nd, dp: d.dp}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  7. src/strconv/decimal.go

    		}
    		rightShift(a, uint(-k))
    	}
    }
    
    // If we chop a at nd digits, should we round up?
    func shouldRoundUp(a *decimal, nd int) bool {
    	if nd < 0 || nd >= a.nd {
    		return false
    	}
    	if a.d[nd] == '5' && nd+1 == a.nd { // exactly halfway - round to even
    		// if we truncated, a little higher than what's recorded - always round up
    		if a.trunc {
    			return true
    		}
    		return nd > 0 && (a.d[nd-1]-'0')%2 != 0
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jul 15 19:41:25 UTC 2017
    - 11K bytes
    - Viewed (0)
  8. src/strconv/ftoaryu.go

    	for m >= max {
    		a, b := m/10, m%10
    		m = a
    		trimmed++
    		if b > 5 {
    			roundUp = true
    		} else if b < 5 {
    			roundUp = false
    		} else { // b == 5
    			// round up if there are trailing digits,
    			// or if the new value of m is odd (round-to-even convention)
    			roundUp = trunc || m&1 == 1
    		}
    		if b != 0 {
    			trunc = true
    		}
    	}
    	if roundUp {
    		m++
    	}
    	if m >= max {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 09 00:28:56 UTC 2022
    - 15.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantized_function_library.mlir

        %clamp_min = "tf.Minimum"(%clamp_max, %i8_max) : (tensor<*xf32>, tensor<f32>) -> tensor<*xf32>
        %round = "tf.Round"(%clamp_min) : (tensor<*xf32>) -> tensor<*xf32>
        %cast = "tf.Cast"(%round) {Truncate = false} : (tensor<*xf32>) -> tensor<*xi8>
        func.return %cast : tensor<*xi8>
      }
    
      // Requantizes and applies quantized Relu by clipping.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jan 08 01:16:10 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go

    			return apierrors.NewInternalError(err)
    		}
    
    		t := time.Now()
    		round := 0
    		if reinvokeCtx.IsReinvoke() {
    			round = 1
    		}
    
    		annotator := newWebhookAnnotator(versionedAttr, round, i, hook.Name, invocation.Webhook.GetConfigurationName())
    		changed, err := a.callAttrMutatingHook(ctx, hook, invocation, versionedAttr, annotator, o, round, i)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 19.6K bytes
    - Viewed (0)
Back to top