Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 37 for IsComplex (0.18 sec)

  1. src/internal/pkgbits/decoder.go

    	}
    	return res
    }
    
    // Value decodes and returns a constant.Value from the element
    // bitstream.
    func (r *Decoder) Value() constant.Value {
    	r.Sync(SyncValue)
    	isComplex := r.Bool()
    	val := r.scalar()
    	if isComplex {
    		val = constant.BinaryOp(val, token.ADD, constant.MakeImag(r.scalar()))
    	}
    	return val
    }
    
    func (r *Decoder) scalar() constant.Value {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 20:58:46 UTC 2022
    - 13.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/predicates.go

    func isInteger(t Type) bool        { return isBasic(t, IsInteger) }
    func isUnsigned(t Type) bool       { return isBasic(t, IsUnsigned) }
    func isFloat(t Type) bool          { return isBasic(t, IsFloat) }
    func isComplex(t Type) bool        { return isBasic(t, IsComplex) }
    func isNumeric(t Type) bool        { return isBasic(t, IsNumeric) }
    func isString(t Type) bool         { return isBasic(t, IsString) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/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: Mon Mar 25 19:53:03 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  4. src/go/types/const.go

    			}
    			r := roundFloat64(x)
    			if r != nil {
    				*rounded = r
    				return true
    			}
    		case UntypedFloat:
    			return true
    		default:
    			panic("unreachable")
    		}
    
    	case isComplex(typ):
    		x := constant.ToComplex(x)
    		if x.Kind() != constant.Complex {
    			return false
    		}
    		switch typ.kind {
    		case Complex64:
    			if rounded == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. api/go1.5.txt

    pkg go/types, const Int8 BasicKind
    pkg go/types, const Invalid = 0
    pkg go/types, const Invalid BasicKind
    pkg go/types, const IsBoolean = 1
    pkg go/types, const IsBoolean BasicInfo
    pkg go/types, const IsComplex = 16
    pkg go/types, const IsComplex BasicInfo
    pkg go/types, const IsConstType = 59
    pkg go/types, const IsConstType BasicInfo
    pkg go/types, const IsFloat = 8
    pkg go/types, const IsFloat BasicInfo
    pkg go/types, const IsInteger = 2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 30 21:14:09 UTC 2015
    - 46.6K bytes
    - Viewed (0)
Back to top