Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 41 for isInt (0.1 sec)

  1. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/evaluate/FirAnnotationValueConverter.kt

                type.isUShort -> KaConstantValue.KaUnsignedShortConstantValue((value as Number).toShort().toUShort(), expression)
                type.isInt -> KaConstantValue.KaIntConstantValue((value as Number).toInt(), expression)
                type.isUInt -> KaConstantValue.KaUnsignedIntConstantValue((value as Number).toInt().toUInt(), expression)
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 11 15:45:42 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/value.go

    }
    
    // Get returns the value at the given index.
    //
    // If the index is negative or greater than the size of the list, an error is returned.
    func (lv *ListValue) Get(idx ref.Val) ref.Val {
    	iv, isInt := idx.(types.Int)
    	if !isInt {
    		return types.ValOrErr(idx, "unsupported index: %v", idx)
    	}
    	i := int(iv)
    	if i < 0 || i >= len(lv.Entries) {
    		return types.NewErr("index out of bounds: %v", idx)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 10 22:05:55 UTC 2022
    - 20.5K bytes
    - Viewed (0)
  3. src/math/big/ratconv.go

    func (x *Rat) RatString() string {
    	if x.IsInt() {
    		return x.a.String()
    	}
    	return x.String()
    }
    
    // FloatString returns a string representation of x in decimal form with prec
    // digits of precision after the radix point. The last digit is rounded to
    // nearest, with halves rounded away from zero.
    func (x *Rat) FloatString(prec int) string {
    	var buf []byte
    
    	if x.IsInt() {
    		buf = x.a.Append(buf, 10)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 15 22:16:34 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/flatbuffer_operator.cc

        } else if (value.IsString()) {
          mlir_vector.push_back(
              BuildVhloStringV1Attr(value.AsString().str(), builder));
        } else if (value.IsInt()) {
          mlir_vector.push_back(BuildVhloIntV1Attr(value.AsInt64(), builder));
        } else if (value.IsFloat()) {
          mlir_vector.push_back(BuildVhloFloatV1Attr(value.AsFloat(), builder));
        } else if (value.IsVector()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 38K bytes
    - Viewed (0)
  5. src/math/big/rat.go

    	return z
    }
    
    // Sign returns:
    //
    //	-1 if x <  0
    //	 0 if x == 0
    //	+1 if x >  0
    func (x *Rat) Sign() int {
    	return x.a.Sign()
    }
    
    // IsInt reports whether the denominator of x is 1.
    func (x *Rat) IsInt() bool {
    	return len(x.b.abs) == 0 || x.b.abs.cmp(natOne) == 0
    }
    
    // Num returns the numerator of x; it may be <= 0.
    // The result is a reference to x's numerator; it
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 13.5K bytes
    - Viewed (0)
  6. analysis/analysis-api-standalone/tests/org/jetbrains/kotlin/analysis/api/standalone/fir/test/cases/session/builder/StandaloneSessionBuilderTest.kt

                    type.classId
                )
                // expanded to `actual` `typealias`
                val expandedType = type.fullyExpandedType
                Assertions.assertTrue(expandedType.isInt)
            }
    
            // Test stdlib-common: @JvmInline in the common module
            val actualClass = ktFile.findDescendantOfType<KtClassOrObject>()!!
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed Jun 05 16:16:39 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/cel/common/values.go

    		}
    		if b == types.True {
    			return types.True
    		}
    	}
    	if err != nil {
    		return err
    	}
    	return types.False
    }
    
    func (t *unstructuredList) Get(idx ref.Val) ref.Val {
    	iv, isInt := idx.(types.Int)
    	if !isInt {
    		return types.ValOrErr(idx, "unsupported index: %v", idx)
    	}
    	i := int(iv)
    	if i < 0 || i >= len(t.elements) {
    		return types.NewErr("index out of bounds: %v", idx)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:30:17 UTC 2023
    - 20.5K bytes
    - Viewed (0)
  8. src/go/constant/value.go

    	// proceed if f doesn't underflow to 0 or overflow to inf.
    	if x, _ := f.Float64(); f.Sign() == 0 == (x == 0) && !math.IsInf(x, 0) {
    		s := fmt.Sprintf("%.6g", x)
    		if !f.IsInt() && strings.IndexByte(s, '.') < 0 {
    			// f is not an integer, but its string representation
    			// doesn't reflect that. Use more digits. See issue 56220.
    			s = fmt.Sprintf("%g", x)
    		}
    		return s
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 34K bytes
    - Viewed (0)
  9. src/math/big/float.go

    func (x *Float) Signbit() bool {
    	return x.neg
    }
    
    // IsInf reports whether x is +Inf or -Inf.
    func (x *Float) IsInf() bool {
    	return x.form == inf
    }
    
    // IsInt reports whether x is an integer.
    // ±Inf values are not integers.
    func (x *Float) IsInt() bool {
    	if debugFloat {
    		x.validate()
    	}
    	// special cases
    	if x.form != finite {
    		return x.form == zero
    	}
    	// x.form == finite
    	if x.exp <= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 15:46:54 UTC 2024
    - 44.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/typecheck/const.go

    	// (See issue #11371).
    	f := ir.BigFloat(v)
    	if f.MantExp(nil) > 2*ir.ConstPrec {
    		base.Errorf("integer too large")
    	} else {
    		var t big.Float
    		t.Parse(fmt.Sprint(v), 0)
    		if t.IsInt() {
    			base.Errorf("constant truncated to integer")
    		} else {
    			base.Errorf("constant %v truncated to integer", v)
    		}
    	}
    
    	// Prevent follow-on errors.
    	return constant.MakeUnknown()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 10.5K bytes
    - Viewed (0)
Back to top