Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 93 for maxInt (0.35 sec)

  1. src/math/big/ftoa.go

    	// 1) Compute normalized mantissa mant and exponent exp for x such
    	// that the lsb of mant corresponds to 1/2 ulp for the precision of
    	// x (i.e., for mant we want x.prec + 1 bits).
    	mant := nat(nil).set(x.mant)
    	exp := int(x.exp) - mant.bitLen()
    	s := mant.bitLen() - int(x.prec+1)
    	switch {
    	case s < 0:
    		mant = mant.shl(mant, uint(-s))
    	case s > 0:
    		mant = mant.shr(mant, uint(+s))
    	}
    	exp += s
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 13.5K bytes
    - Viewed (0)
  2. src/compress/lzw/writer.go

    func (w *Writer) Write(p []byte) (n int, err error) {
    	if w.err != nil {
    		return 0, w.err
    	}
    	if len(p) == 0 {
    		return 0, nil
    	}
    	if maxLit := uint8(1<<w.litWidth - 1); maxLit != 0xff {
    		for _, x := range p {
    			if x > maxLit {
    				w.err = errors.New("lzw: input byte too large for the litWidth")
    				return 0, w.err
    			}
    		}
    	}
    	n = len(p)
    	code := w.savedCode
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:40 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  3. src/strconv/ftoa.go

    func fmtX(dst []byte, prec int, fmt byte, neg bool, mant uint64, exp int, flt *floatInfo) []byte {
    	if mant == 0 {
    		exp = 0
    	}
    
    	// Shift digits so leading 1 (if any) is at bit 1<<60.
    	mant <<= 60 - flt.mantbits
    	for mant != 0 && mant&(1<<60) == 0 {
    		mant <<= 1
    		exp--
    	}
    
    	// Round if requested.
    	if prec >= 0 && prec < 15 {
    		shift := uint(prec * 4)
    		extra := (mant << shift) & (1<<60 - 1)
    		mant >>= 60 - shift
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  4. test/shift3.go

    func main() {
    	var x int = 1
    	f(x<<1, 2)
    	f(x<<1., 2)
    	f(x<<(1+0i), 2)
    	f(x<<0i, 1)
    
    	f(x<<(1<<x), 4)
    	f(x<<(1.<<x), 4)
    	f(x<<((1+0i)<<x), 4)
    	f(x<<(0i<<x), 1)
    
    	// corner cases
    	const M = math.MaxUint
    	f(x<<(M+0), 0)     // shift by untyped int representable as uint
    	f(x<<(M+0.), 0)    // shift by untyped float representable as uint
    	f(x<<(M+0.+0i), 0) // shift by untyped complex representable as uint
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 07 17:19:55 UTC 2022
    - 834 bytes
    - Viewed (0)
  5. src/math/big/floatmarsh.go

    		//   (in practice, this should never happen since rounding
    		//   takes care of it, but be safe and do it always)
    		if len(x.mant) < n {
    			n = len(x.mant)
    		}
    		// len(x.mant) >= n
    		sz += 4 + n*_S // exp + mant
    	}
    	buf := make([]byte, sz)
    
    	buf[0] = floatGobVersion
    	b := byte(x.mode&7)<<5 | byte((x.acc+1)&3)<<3 | byte(x.form&3)<<1
    	if x.neg {
    		b |= 1
    	}
    	buf[1] = b
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:31:58 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  6. src/strconv/ftoaryu.go

    func computeBounds(mant uint64, exp int, flt *floatInfo) (lower, central, upper uint64, e2 int) {
    	if mant != 1<<flt.mantbits || exp == flt.bias+1-int(flt.mantbits) {
    		// regular case (or denormals)
    		lower, central, upper = 2*mant-1, 2*mant, 2*mant+1
    		e2 = exp - 1
    		return
    	} else {
    		// border of an exponent
    		lower, central, upper = 4*mant-1, 4*mant, 4*mant+2
    		e2 = exp - 2
    		return
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 09 00:28:56 UTC 2022
    - 15.7K bytes
    - Viewed (0)
  7. src/strconv/fp_test.go

    // itself, passes the rest on to strconv.ParseFloat.
    func myatof32(s string) (f float32, ok bool) {
    	if mant, exp, ok := strings.Cut(s, "p"); ok {
    		n, err := strconv.Atoi(mant)
    		if err != nil {
    			println("bad n", mant)
    			return 0, false
    		}
    		e, err1 := strconv.Atoi(exp)
    		if err1 != nil {
    			println("bad p", exp)
    			return 0, false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 06 15:53:04 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/test/testdata/flowgraph_generator1.go

    			s += `
    		{f:` + fname + `, maxin:` + fmt.Sprintf("%d", 1<<k) + `, blocks:` + fmtBlocks(bs) + `},`
    		}
    
    	}
    	s += `}
    `
    	// write types for name+array tables.
    	fmt.Printf("%s",
    		`
    type blo struct {
    	inc   int64
    	cond  bool
    	succs [2]int64
    }
    type fun struct {
    	f      func(int64) int64
    	maxin  int64
    	blocks []blo
    }
    `)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:40:04 UTC 2020
    - 6.7K bytes
    - Viewed (0)
  9. utils/utils_test.go

    		})
    	}
    }
    
    func TestToString(t *testing.T) {
    	tests := []struct {
    		name string
    		in   interface{}
    		out  string
    	}{
    		{"int", math.MaxInt64, "9223372036854775807"},
    		{"int8", int8(math.MaxInt8), "127"},
    		{"int16", int16(math.MaxInt16), "32767"},
    		{"int32", int32(math.MaxInt32), "2147483647"},
    		{"int64", int64(math.MaxInt64), "9223372036854775807"},
    		{"uint", uint(math.MaxUint64), "18446744073709551615"},
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Feb 19 03:42:25 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/cel/environment/environment.go

    			return nil, err
    		}
    		p, err := e.newExpressions.Extend(newExprOpts)
    		if err != nil {
    			return nil, err
    		}
    		storedExprOpt, err := e.filterAndBuildOpts(e.storedExpressions, version.MajorMinor(math.MaxUint, math.MaxUint), options)
    		if err != nil {
    			return nil, err
    		}
    		s, err := e.storedExpressions.Extend(storedExprOpt)
    		if err != nil {
    			return nil, err
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 08 15:52:31 UTC 2023
    - 10.1K bytes
    - Viewed (0)
Back to top