Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 6,074 for case1 (0.36 sec)

  1. src/math/asinh.go

    		Large    = 1 << 28                    // 2**28
    	)
    	// special cases
    	if IsNaN(x) || IsInf(x, 0) {
    		return x
    	}
    	sign := false
    	if x < 0 {
    		x = -x
    		sign = true
    	}
    	var temp float64
    	switch {
    	case x > Large:
    		temp = Log(x) + Ln2 // |x| > 2**28
    	case x > 2:
    		temp = Log(2*x + 1/(Sqrt(x*x+1)+x)) // 2**28 > |x| > 2.0
    	case x < NearZero:
    		temp = x // |x| < 2**-28
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 13 20:02:49 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  2. src/cmp/cmp_test.go

    }
    
    func TestLess(t *testing.T) {
    	for _, test := range tests {
    		var b bool
    		switch test.x.(type) {
    		case int:
    			b = cmp.Less(test.x.(int), test.y.(int))
    		case string:
    			b = cmp.Less(test.x.(string), test.y.(string))
    		case float64:
    			b = cmp.Less(test.x.(float64), test.y.(float64))
    		case uintptr:
    			b = cmp.Less(test.x.(uintptr), test.y.(uintptr))
    		}
    		if b != (test.compare < 0) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 23:39:07 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  3. src/math/pow.go

    func pow(x, y float64) float64 {
    	switch {
    	case y == 0 || x == 1:
    		return 1
    	case y == 1:
    		return x
    	case IsNaN(x) || IsNaN(y):
    		return NaN()
    	case x == 0:
    		switch {
    		case y < 0:
    			if Signbit(x) && isOddInt(y) {
    				return Inf(-1)
    			}
    			return Inf(1)
    		case y > 0:
    			if Signbit(x) && isOddInt(y) {
    				return x
    			}
    			return 0
    		}
    	case IsInf(y, 0):
    		switch {
    		case x == -1:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 24 19:10:58 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  4. test/switch.go

    	switch x := 5; true {
    	case i5 < x:
    		assert(false, "<")
    	case i5 == x:
    		assert(true, "!")
    	case i5 > x:
    		assert(false, ">")
    	}
    
    	switch i5 {
    	case 0:
    		assert(false, "0")
    	case 1:
    		assert(false, "1")
    	case 2:
    		assert(false, "2")
    	case 3:
    		assert(false, "3")
    	case 4:
    		assert(false, "4")
    	case 5:
    		assert(true, "5")
    	case 6:
    		assert(false, "6")
    	case 7:
    		assert(false, "7")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 19 23:30:49 UTC 2022
    - 6.5K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/preflight/utils_test.go

    				},
    			}
    			ver, err := GetKubeletVersion(fexec)
    			switch {
    			case err != nil && tc.valid:
    				t.Errorf("GetKubeletVersion: unexpected error for %q. Error: %v", tc.output, err)
    			case err == nil && !tc.valid:
    				t.Errorf("GetKubeletVersion: error expected for key %q, but result is %q", tc.output, ver)
    			case ver != nil && ver.String() != tc.expected:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 23 11:33:44 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  6. test/switch5.go

    	}
    }
    
    func f2(s string) {
    	switch s {
    	case "":
    	case "": // ERROR "duplicate case (.. in switch)?"
    	case "abc":
    	case "abc": // ERROR "duplicate case (.abc. in switch)?"
    	}
    }
    
    func f3(e interface{}) {
    	switch e {
    	case 0:
    	case 0: // ERROR "duplicate case (0 in switch)?"
    	case int64(0):
    	case float32(10):
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 14 21:28:48 UTC 2020
    - 2.3K bytes
    - Viewed (0)
  7. cmd/xl-storage_test.go

    		expectedErr error
    	}{
    		// TestXLStorage case - 1.
    		// A valid case, volume creation is expected to succeed.
    		{
    			volName:     "success-vol",
    			expectedErr: nil,
    		},
    		// TestXLStorage case - 2.
    		// Case where a file exists by the name of the volume to be created.
    		{
    			volName:     "vol-as-file",
    			expectedErr: errVolumeExists,
    		},
    		// TestXLStorage case - 3.
    		{
    			volName:     "existing-vol",
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 11 17:45:28 UTC 2024
    - 66.7K bytes
    - Viewed (0)
  8. cmd/erasure-sets_test.go

    	"github.com/google/uuid"
    )
    
    var testUUID = uuid.MustParse("f5c58c61-7175-4018-ab5e-a94fe9c2de4e")
    
    func BenchmarkCrcHash(b *testing.B) {
    	cases := []struct {
    		key int
    	}{
    		{16},
    		{64},
    		{128},
    		{256},
    		{512},
    		{1024},
    	}
    	for _, testCase := range cases {
    		testCase := testCase
    		key := randString(testCase.key)
    		b.Run("", func(b *testing.B) {
    			b.SetBytes(1024)
    			b.ReportAllocs()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 12 07:21:56 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/stmt.go

    			continue
    		}
    		end := s.Rbrace
    		if i+1 < len(s.Body) {
    			end = s.Body[i+1].Pos()
    		}
    		// Check each type in this type switch case.
    		cases := syntax.UnpackListExpr(clause.Cases)
    		T := check.caseTypes(sx, cases, seen)
    		check.openScopeUntil(clause, end, "case")
    		// If lhs exists, declare a corresponding variable in the case-local scope.
    		if lhs != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  10. operator/cmd/mesh/profile-diff_test.go

    			expectedString: "Profiles are identical",
    		},
    	}
    
    	for i, c := range cases {
    		t.Run(fmt.Sprintf("case %d %q", i, c.args), func(t *testing.T) {
    			output, fErr := runCommand(c.args)
    			verifyProfileDiffCommandCaseOutput(t, c, output, fErr)
    		})
    	}
    }
    
    func TestProfileDiffDirect(t *testing.T) {
    	cases := []profileDiffTestcase{
    		{
    			// We won't be parsing with Cobra, but this is the command equivalent
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jan 10 05:10:03 UTC 2024
    - 3.6K bytes
    - Viewed (0)
Back to top