Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 61 for IsFloat (0.22 sec)

  1. test/named.go

    	isChan(Chan(nil))
    
    	asFloat(f)
    	isFloat(f)
    	asFloat(-f)
    	isFloat(-f)
    	asFloat(+f)
    	isFloat(+f)
    	asFloat(f + 1)
    	isFloat(f + 1)
    	asFloat(1 + f)
    	isFloat(1 + f)
    	asFloat(f + f)
    	isFloat(f + f)
    	f++
    	f += 2
    	asFloat(f - 1)
    	isFloat(f - 1)
    	asFloat(1 - f)
    	isFloat(1 - f)
    	asFloat(f - f)
    	isFloat(f - f)
    	f--
    	f -= 2
    	asFloat(f * 2.5)
    	isFloat(f * 2.5)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 4.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/basic.go

    type BasicInfo int
    
    // Properties of basic types.
    const (
    	IsBoolean BasicInfo = 1 << iota
    	IsInteger
    	IsUnsigned
    	IsFloat
    	IsComplex
    	IsString
    	IsUntyped
    
    	IsOrdered   = IsInteger | IsFloat | IsString
    	IsNumeric   = IsInteger | IsFloat | IsComplex
    	IsConstType = IsBoolean | IsNumeric | IsString
    )
    
    // A Basic represents a basic type.
    type Basic struct {
    	kind BasicKind
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 01 22:17:50 UTC 2021
    - 1.5K bytes
    - Viewed (0)
  3. src/go/types/basic.go

    type BasicInfo int
    
    // Properties of basic types.
    const (
    	IsBoolean BasicInfo = 1 << iota
    	IsInteger
    	IsUnsigned
    	IsFloat
    	IsComplex
    	IsString
    	IsUntyped
    
    	IsOrdered   = IsInteger | IsFloat | IsString
    	IsNumeric   = IsInteger | IsFloat | IsComplex
    	IsConstType = IsBoolean | IsNumeric | IsString
    )
    
    // A Basic represents a basic type.
    type Basic struct {
    	kind BasicKind
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/softfloat.go

    	"cmd/compile/internal/types"
    	"math"
    )
    
    func softfloat(f *Func) {
    	if !f.Config.SoftFloat {
    		return
    	}
    	newInt64 := false
    
    	for _, b := range f.Blocks {
    		for _, v := range b.Values {
    			if v.Type.IsFloat() {
    				f.unCache(v)
    				switch v.Op {
    				case OpPhi, OpLoad, OpArg:
    					if v.Type.Size() == 4 {
    						v.Type = f.Config.Types.UInt32
    					} else {
    						v.Type = f.Config.Types.UInt64
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 03 16:14:24 UTC 2021
    - 2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ir/const.go

    func NewZero(pos src.XPos, typ *types.Type) Node {
    	switch {
    	case typ.HasNil():
    		return NewNilExpr(pos, typ)
    	case typ.IsInteger():
    		return NewBasicLit(pos, typ, intZero)
    	case typ.IsFloat():
    		return NewBasicLit(pos, typ, floatZero)
    	case typ.IsComplex():
    		return NewBasicLit(pos, typ, complexZero)
    	case typ.IsBoolean():
    		return NewBasicLit(pos, typ, constant.MakeBool(false))
    	case typ.IsString():
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 18:53:26 UTC 2023
    - 4K bytes
    - Viewed (0)
  6. src/text/template/parse/node.go

    			}
    		}
    	}
    	if !n.IsInt && !n.IsUint && !n.IsFloat {
    		return nil, fmt.Errorf("illegal number syntax: %q", text)
    	}
    	return n, nil
    }
    
    // simplifyComplex pulls out any other types that are represented by the complex number.
    // These all require that the imaginary part be zero.
    func (n *NumberNode) simplifyComplex() {
    	n.IsFloat = imag(n.Complex128) == 0
    	if n.IsFloat {
    		n.Float64 = real(n.Complex128)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types/universe.go

    	SimType[TFUNC] = TPTR
    	SimType[TUNSAFEPTR] = TPTR
    
    	for et := TINT8; et <= TUINT64; et++ {
    		IsInt[et] = true
    	}
    	IsInt[TINT] = true
    	IsInt[TUINT] = true
    	IsInt[TUINTPTR] = true
    
    	IsFloat[TFLOAT32] = true
    	IsFloat[TFLOAT64] = true
    
    	IsComplex[TCOMPLEX64] = true
    	IsComplex[TCOMPLEX128] = true
    }
    
    func makeErrorInterface() *Type {
    	sig := NewSignature(FakeRecv(), nil, []*Field{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 26 21:56:49 UTC 2023
    - 4K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/universe.go

    	Uint32:        {Uint32, IsInteger | IsUnsigned, "uint32"},
    	Uint64:        {Uint64, IsInteger | IsUnsigned, "uint64"},
    	Uintptr:       {Uintptr, IsInteger | IsUnsigned, "uintptr"},
    	Float32:       {Float32, IsFloat, "float32"},
    	Float64:       {Float64, IsFloat, "float64"},
    	Complex64:     {Complex64, IsComplex, "complex64"},
    	Complex128:    {Complex128, IsComplex, "complex128"},
    	String:        {String, IsString, "string"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  9. src/go/types/universe.go

    	Uint32:        {Uint32, IsInteger | IsUnsigned, "uint32"},
    	Uint64:        {Uint64, IsInteger | IsUnsigned, "uint64"},
    	Uintptr:       {Uintptr, IsInteger | IsUnsigned, "uintptr"},
    	Float32:       {Float32, IsFloat, "float32"},
    	Float64:       {Float64, IsFloat, "float64"},
    	Complex64:     {Complex64, IsComplex, "complex64"},
    	Complex128:    {Complex128, IsComplex, "complex128"},
    	String:        {String, IsString, "string"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/convert.go

    	case sys.ARM, sys.MIPS:
    		if src.IsFloat() {
    			switch dst.Kind() {
    			case types.TINT64, types.TUINT64:
    				return types.TFLOAT64, dst.Kind()
    			}
    		}
    		if dst.IsFloat() {
    			switch src.Kind() {
    			case types.TINT64, types.TUINT64:
    				return src.Kind(), dst.Kind()
    			}
    		}
    
    	case sys.I386:
    		if src.IsFloat() {
    			switch dst.Kind() {
    			case types.TINT64, types.TUINT64:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 17:28:22 UTC 2023
    - 18.2K bytes
    - Viewed (0)
Back to top