Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,873 for complex1 (0.1 sec)

  1. test/typeparam/absdiff2.go

    type orderedNumeric interface {
    	~int | ~int8 | ~int16 | ~int32 | ~int64 |
    		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
    		~float32 | ~float64
    }
    
    // Complex matches the two complex types, which do not have a < operator.
    type Complex interface {
    	~complex64 | ~complex128
    }
    
    // orderedAbs is a helper type that defines an Abs method for
    // a struct containing an ordered numeric type.
    type orderedAbs[T orderedNumeric] struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 09 21:26:42 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/syntax/testdata/linalg.go

    	~int | ~int8 | ~int16 | ~int32 | ~int64 |
    		uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
    		float32 | ~float64
    }
    
    // Complex is a type bound that matches the two complex types, which do not have a < operator.
    type Complex interface {
    	~complex64 | ~complex128
    }
    
    // OrderedAbs is a helper type that defines an Abs method for
    // ordered numeric types.
    type OrderedAbs[T OrderedNumeric] T
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 30 18:02:18 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/builtins_test.go

    	{"complex", `_ = complex(1, 0)`, `invalid type`}, // constant
    	{"complex", `var re float32; _ = complex(re, 1.0)`, `func(float32, float32) complex64`},
    	{"complex", `var im float64; _ = complex(1, im)`, `func(float64, float64) complex128`},
    	{"complex", `type F32 float32; var re, im F32; _ = complex(re, im)`, `func(p.F32, p.F32) complex64`},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 18:06:31 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  4. test/typeparam/absdiff3.go

    		return -a
    	}
    	return a
    }
    
    // Complex matches the two complex types, which do not have a < operator.
    type Complex interface {
    	~complex64 | ~complex128
    }
    
    func realimag(x any) (re, im float64) {
    	switch z := x.(type) {
    	case complex64:
    		re = float64(real(z))
    		im = float64(imag(z))
    	case complex128:
    		re = real(z)
    		im = imag(z)
    	default:
    		panic("unknown complex type")
    	}
    	return
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  5. test/cmplxdivide.c

    	printf("\n");
    	printf("var tests = []struct {\n");
    	printf("\tf, g complex128\n");
    	printf("\tout  complex128\n");
    	printf("}{\n");
    
    	for(i=0; i<nelem(f); i++)
    	for(j=0; j<nelem(f); j++)
    	for(k=0; k<nelem(f); k++)
    	for(l=0; l<nelem(f); l++) {
    		n = f[i] + f[j]*I;
    		d = f[k] + f[l]*I;
    		q = n/d;
    
    		printf("\t{complex(%s, %s), complex(%s, %s), complex(%s, %s)},\n",
    			fmt(creal(n)), fmt(cimag(n)),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 15 22:45:17 UTC 2017
    - 2.1K bytes
    - Viewed (0)
  6. src/strconv/atoc.go

    		if x.Err == ErrRange {
    			return nil, x
    		}
    	}
    	return err, nil
    }
    
    // ParseComplex converts the string s to a complex number
    // with the precision specified by bitSize: 64 for complex64, or 128 for complex128.
    // When bitSize=64, the result still has type complex128, but it will be
    // convertible to complex64 without changing its value.
    //
    // The number represented by s must be of the form N, Ni, or N±Ni, where N stands
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 05 00:24:26 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  7. src/math/cmplx/sqrt.go

    func Sqrt(x complex128) complex128 {
    	if imag(x) == 0 {
    		// Ensure that imag(r) has the same sign as imag(x) for imag(x) == signed zero.
    		if real(x) == 0 {
    			return complex(0, imag(x))
    		}
    		if real(x) < 0 {
    			return complex(0, math.Copysign(math.Sqrt(-real(x)), imag(x)))
    		}
    		return complex(math.Sqrt(real(x)), imag(x))
    	} else if math.IsInf(imag(x), 0) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 03:16:37 UTC 2020
    - 3K bytes
    - Viewed (0)
  8. src/go/parser/testdata/linalg.go2

    type OrderedNumeric interface {
    	~int|~int8|~int16|~int32|~int64|
    		~uint|~uint8|~uint16|~uint32|~uint64|~uintptr|
    		~float32|~float64
    }
    
    // Complex is a type bound that matches the two complex types, which do not have a < operator.
    type Complex interface {
    	~complex64|~complex128
    }
    
    // OrderedAbs is a helper type that defines an Abs method for
    // ordered numeric types.
    type OrderedAbs[T OrderedNumeric] T
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 15:34:22 UTC 2021
    - 2K bytes
    - Viewed (0)
  9. test/shift1.go

    	var z complex128
    	z = (1 << s) << (1 << s)     // ERROR "non-integer|type complex128"
    	z = (1 << s) << (1. << s)    // ERROR "non-integer|type complex128"
    	z = (1 << s) << (1.1 << s)   // ERROR "invalid|truncated|complex128"
    	z = (1. << s) << (1 << s)    // ERROR "non-integer|type complex128|must be integer"
    	z = (1. << s) << (1. << s)   // ERROR "non-integer|type complex128|must be integer"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 03 16:24:32 UTC 2021
    - 9.4K bytes
    - Viewed (0)
  10. test/typeparam/absdiff.go

    type orderedNumeric interface {
    	~int | ~int8 | ~int16 | ~int32 | ~int64 |
    		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
    		~float32 | ~float64
    }
    
    // Complex matches the two complex types, which do not have a < operator.
    type Complex interface {
    	~complex64 | ~complex128
    }
    
    // For now, a lone type parameter is not permitted as RHS in a type declaration (issue #45639).
    // // orderedAbs is a helper type that defines an Abs method for
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 2.9K bytes
    - Viewed (0)
Back to top