Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 32 for isComplex (0.17 sec)

  1. src/cmd/compile/internal/walk/walk.go

    	// When instrumenting, any expression might require function calls.
    	if base.Flag.Cfg.Instrumenting {
    		return true
    	}
    
    	isSoftFloat := func(typ *types.Type) bool {
    		return types.IsFloat[typ.Kind()] || types.IsComplex[typ.Kind()]
    	}
    
    	return ir.Any(n, func(n ir.Node) bool {
    		// walk should have already moved any Init blocks off of
    		// expressions.
    		if len(n.Init()) != 0 {
    			base.FatalfAt(n.Pos(), "mayCall %+v", n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  2. src/go/types/sizes.go

    	}
    	a := s.Sizeof(T) // may be 0 or negative
    	// spec: "For a variable x of any type: unsafe.Alignof(x) is at least 1."
    	if a < 1 {
    		return 1
    	}
    	// complex{64,128} are aligned like [2]float{32,64}.
    	if isComplex(T) {
    		a /= 2
    	}
    	if a > s.MaxAlign {
    		return s.MaxAlign
    	}
    	return a
    }
    
    func _IsSyncAtomicAlign64(T Type) bool {
    	named := asNamed(T)
    	if named == nil {
    		return false
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  3. src/go/internal/gcimporter/iimport.go

    		val = constant.MakeString(r.string())
    
    	case types.IsInteger:
    		var x big.Int
    		r.mpint(&x, b)
    		val = constant.Make(&x)
    
    	case types.IsFloat:
    		val = r.mpfloat(b)
    
    	case types.IsComplex:
    		re := r.mpfloat(b)
    		im := r.mpfloat(b)
    		val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im))
    
    	default:
    		errorf("unexpected type %v", typ) // panics
    		panic("unreachable")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  4. src/text/template/exec.go

    	// and we have no context.  (If it was a method argument,
    	// we'd know what we need.) The syntax guides us to some extent.
    	s.at(constant)
    	switch {
    	case constant.IsComplex:
    		return reflect.ValueOf(constant.Complex128) // incontrovertible.
    
    	case constant.IsFloat &&
    		!isHexInt(constant.Text) && !isRuneInt(constant.Text) &&
    		strings.ContainsAny(constant.Text, ".eEpP"):
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:22:24 UTC 2024
    - 32K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssagen/ssa.go

    			case 48:
    				op = ssa.OpZeroExt32to64
    			default:
    				s.Fatalf("weird integer sign extension %v -> %v", ft, tt)
    			}
    		}
    		return s.newValue1(op, tt, v)
    	}
    
    	if ft.IsComplex() && tt.IsComplex() {
    		var op ssa.Op
    		if ft.Size() == tt.Size() {
    			switch ft.Size() {
    			case 8:
    				op = ssa.OpRound32F
    			case 16:
    				op = ssa.OpRound64F
    			default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types/type.go

    		return true
    	}
    	return false
    }
    
    func (t *Type) IsFloat() bool {
    	return t.kind == TFLOAT32 || t.kind == TFLOAT64 || t == UntypedFloat
    }
    
    func (t *Type) IsComplex() bool {
    	return t.kind == TCOMPLEX64 || t.kind == TCOMPLEX128 || t == UntypedComplex
    }
    
    // IsPtr reports whether t is a regular Go pointer type.
    // This does not include unsafe.Pointer.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/expr.go

    func walkDivMod(n *ir.BinaryExpr, init *ir.Nodes) ir.Node {
    	n.X = walkExpr(n.X, init)
    	n.Y = walkExpr(n.Y, init)
    
    	// rewrite complex div into function call.
    	et := n.X.Type().Kind()
    
    	if types.IsComplex[et] && n.Op() == ir.ODIV {
    		t := n.Type()
    		call := mkcall("complex128div", types.Types[types.TCOMPLEX128], init, typecheck.Conv(n.X, types.Types[types.TCOMPLEX128]), typecheck.Conv(n.Y, types.Types[types.TCOMPLEX128]))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  8. src/go/types/expr.go

    			x.mode = invalid
    			return
    		}
    
    		// check for divisor underflow in complex division (see go.dev/issue/20227)
    		if x.mode == constant_ && y.mode == constant_ && isComplex(x.typ) {
    			re, im := constant.Real(y.val), constant.Imag(y.val)
    			re2, im2 := constant.BinaryOp(re, token.MUL, re), constant.BinaryOp(im, token.MUL, im)
    			if constant.Sign(re2) == 0 && constant.Sign(im2) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/expr.go

    			x.mode = invalid
    			return
    		}
    
    		// check for divisor underflow in complex division (see go.dev/issue/20227)
    		if x.mode == constant_ && y.mode == constant_ && isComplex(x.typ) {
    			re, im := constant.Real(y.val), constant.Imag(y.val)
    			re2, im2 := constant.BinaryOp(re, token.MUL, re), constant.BinaryOp(im, token.MUL, im)
    			if constant.Sign(re2) == 0 && constant.Sign(im2) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"Int", Const, 5},
    		{"Int16", Const, 5},
    		{"Int32", Const, 5},
    		{"Int64", Const, 5},
    		{"Int8", Const, 5},
    		{"Interface", Type, 5},
    		{"Invalid", Const, 5},
    		{"IsBoolean", Const, 5},
    		{"IsComplex", Const, 5},
    		{"IsConstType", Const, 5},
    		{"IsFloat", Const, 5},
    		{"IsInteger", Const, 5},
    		{"IsInterface", Func, 5},
    		{"IsNumeric", Const, 5},
    		{"IsOrdered", Const, 5},
    		{"IsString", Const, 5},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top