Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 262 for 3xcomplex (0.23 sec)

  1. src/cmd/compile/internal/typecheck/func.go

    	}
    
    	if !t.ChanDir().CanSend() {
    		base.Errorf("invalid operation: %v (cannot close receive-only channel)", n)
    		n.SetType(nil)
    		return n
    	}
    	return n
    }
    
    // tcComplex typechecks an OCOMPLEX node.
    func tcComplex(n *ir.BinaryExpr) ir.Node {
    	l := Expr(n.X)
    	r := Expr(n.Y)
    	if l.Type() == nil || r.Type() == nil {
    		n.SetType(nil)
    		return n
    	}
    	l, r = defaultlit2(l, r, false)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  2. src/go/types/conversions.go

    				return true
    			}
    		}
    	}
    
    	// "V and T are both integer or floating point types"
    	if isIntegerOrFloat(Vu) && isIntegerOrFloat(Tu) {
    		return true
    	}
    
    	// "V and T are both complex types"
    	if isComplex(Vu) && isComplex(Tu) {
    		return true
    	}
    
    	// "V is an integer or a slice of bytes or runes and T is a string type"
    	if (isInteger(Vu) || isBytesOrRunes(Vu)) && isString(Tu) {
    		return true
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:51:00 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  3. test/fixedbugs/issue41736.go

    type A [1]*complex128
    
    //go:noinline
    func (i I) X() C {
    	cx := complex(0, float64(i.x))
    	return C{&cx}
    }
    
    //go:noinline
    func (f F) X() C {
    	cx := complex(f.x, 0)
    	return C{&cx}
    }
    
    //go:noinline
    func (c C) X() C {
    	cx := complex(imag(*c.x), real(*c.x))
    	return C{&cx}
    }
    
    //go:noinline
    func (d D) X() C {
    	cx := complex(float64(imag(d.x)), -float64(real(d.x)))
    	return C{&cx}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 06 15:37:42 UTC 2020
    - 1.3K 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. src/math/cmplx/exp.go

    			return x
    		case math.IsInf(im, 0) || math.IsNaN(im):
    			if re < 0 {
    				return complex(0, math.Copysign(0, im))
    			} else {
    				return complex(math.Inf(1.0), math.NaN())
    			}
    		}
    	case math.IsNaN(re):
    		if im == 0 {
    			return complex(math.NaN(), im)
    		}
    	}
    	r := math.Exp(real(x))
    	s, c := math.Sincos(imag(x))
    	return complex(r*c, r*s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 03:16:37 UTC 2020
    - 2.1K bytes
    - Viewed (0)
  6. src/math/cmplx/sqrt.go

    		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) {
    		return complex(math.Inf(1.0), imag(x))
    	}
    	if real(x) == 0 {
    		if imag(x) < 0 {
    			r := math.Sqrt(-0.5 * imag(x))
    			return complex(r, -r)
    		}
    		r := math.Sqrt(0.5 * imag(x))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 03:16:37 UTC 2020
    - 3K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/syntax/testdata/linalg.go

    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: Wed Mar 30 18:02:18 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  8. 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.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 09 21:26:42 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  9. test/typeparam/issue50193.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"fmt"
    )
    
    type Complex interface {
    	~complex64 | ~complex128
    }
    
    func zero[T Complex]() T {
    	return T(0)
    }
    func pi[T Complex]() T {
    	return T(3.14)
    }
    func sqrtN1[T Complex]() T {
    	return T(-1i)
    }
    
    func main() {
    	fmt.Println(zero[complex128]())
    	fmt.Println(pi[complex128]())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 599 bytes
    - Viewed (0)
  10. src/math/cmplx/log.go

    // source listings for the gamma function and the incomplete beta
    // integral.
    //
    //   Stephen L. Moshier
    //   ******@****.***
    
    // Complex natural logarithm
    //
    // DESCRIPTION:
    //
    // Returns complex logarithm to the base e (2.718...) of
    // the complex argument z.
    //
    // If
    //       z = x + iy, r = sqrt( x**2 + y**2 ),
    // then
    //       w = log(r) + i arctan(y/x).
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 03:16:37 UTC 2020
    - 2K bytes
    - Viewed (0)
Back to top