Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 74 for underflow (0.24 sec)

  1. src/math/exp.go

    		Log2e = 1.44269504088896338700e+00
    
    		Overflow  = 7.09782712893383973096e+02
    		Underflow = -7.45133219101941108420e+02
    		NearZero  = 1.0 / (1 << 28) // 2**-28
    	)
    
    	// special cases
    	switch {
    	case IsNaN(x) || IsInf(x, 1):
    		return x
    	case IsInf(x, -1):
    		return 0
    	case x > Overflow:
    		return Inf(1)
    	case x < Underflow:
    		return 0
    	case -NearZero < x && x < NearZero:
    		return 1 + x
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  2. src/runtime/histogram.go

    	counts [timeHistNumBuckets * timeHistNumSubBuckets]atomic.Uint64
    
    	// underflow counts all the times we got a negative duration
    	// sample. Because of how time works on some platforms, it's
    	// possible to measure negative durations. We could ignore them,
    	// but we record them anyway because it's better to have some
    	// signal that it's happening than just missing samples.
    	underflow atomic.Uint64
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/loopbce.go

    	}
    	return x + int64(y)
    }
    
    // subU returns x-y. Requires that x-y does not underflow an int64.
    func subU(x int64, y uint64) int64 {
    	if y >= 1<<63 {
    		if x < 0 {
    			base.Fatalf("subU underflowed %d - %d", x, y)
    		}
    		x -= 1<<63 - 1
    		x -= 1
    		y -= 1 << 63
    	}
    	if subWillUnderflow(x, int64(y)) {
    		base.Fatalf("subU underflowed %d - %d", x, y)
    	}
    	return x - int64(y)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 07 17:37:47 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  4. src/math/hypot.go

    package math
    
    /*
    	Hypot -- sqrt(p*p + q*q), but overflows only if the result does.
    */
    
    // Hypot returns [Sqrt](p*p + q*q), taking care to avoid
    // unnecessary overflow and underflow.
    //
    // Special cases are:
    //
    //	Hypot(±Inf, q) = +Inf
    //	Hypot(p, ±Inf) = +Inf
    //	Hypot(NaN, q) = NaN
    //	Hypot(p, NaN) = NaN
    func Hypot(p, q float64) float64 {
    	if haveArchHypot {
    		return archHypot(p, q)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 850 bytes
    - Viewed (0)
  5. platforms/core-runtime/io/src/main/java/org/gradle/internal/io/StreamByteBuffer.java

                    if (!result.isUnderflow()) {
                        result.throwException();
                    }
                    break;
                }
                wasUnderflow = result.isUnderflow();
            }
            if (needsFlush) {
                CoderResult result = decoder.flush(charbuffer);
                if (!result.isUnderflow()) {
                    result.throwException();
                }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 12 08:51:14 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  6. src/math/ldexp.go

    	case IsInf(frac, 0) || IsNaN(frac):
    		return frac
    	}
    	frac, e := normalize(frac)
    	exp += e
    	x := Float64bits(frac)
    	exp += int(x>>shift)&mask - bias
    	if exp < -1075 {
    		return Copysign(0, frac) // underflow
    	}
    	if exp > 1023 { // overflow
    		if frac < 0 {
    			return Inf(-1)
    		}
    		return Inf(1)
    	}
    	var m float64 = 1
    	if exp < -1022 { // denormal
    		exp += 53
    		m = 1.0 / (1 << 53) // 2**-53
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/resource/amount.go

    	}
    	return true
    }
    
    // Sub removes the value of b from the current amount, or returns false if underflow would result.
    func (a *int64Amount) Sub(b int64Amount) bool {
    	return a.Add(int64Amount{value: -b.value, scale: b.scale})
    }
    
    // Mul multiplies the provided b to the current amount, or
    // returns false if overflow or underflow would result.
    func (a *int64Amount) Mul(b int64) bool {
    	switch {
    	case a.value == 0:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 13 19:42:28 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  8. src/crypto/internal/bigmod/nat.go

    //
    // x and m operands must have the same announced length.
    func (x *Nat) maybeSubtractModulus(always choice, m *Modulus) {
    	t := NewNat().set(x)
    	underflow := t.sub(m.nat)
    	// We keep the result if x - m didn't underflow (meaning x >= m)
    	// or if always was set.
    	keep := not(choice(underflow)) | choice(always)
    	x.assign(keep, t)
    }
    
    // Sub computes x = x - y mod m.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 24K bytes
    - Viewed (0)
  9. guava/src/com/google/common/math/IntMath.java

       * {@code Integer.MAX_VALUE} or {@code Integer.MIN_VALUE} is returned, respectively.
       *
       * @since 20.0
       */
      public static int saturatedAdd(int a, int b) {
        return Ints.saturatedCast((long) a + b);
      }
    
      /**
       * Returns the difference of {@code a} and {@code b} unless it would overflow or underflow in
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 07 17:50:39 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  10. platforms/core-runtime/serialization/src/main/java/org/gradle/internal/serialize/kryo/StringDeduplicatingKryoBackedDecoder.java

                input.setPosition(input.limit());
                return remaining;
            }
        }
    
        private RuntimeException maybeEndOfStream(KryoException e) throws EOFException {
            if (e.getMessage().equals("Buffer underflow.")) {
                throw (EOFException) new EOFException().initCause(e);
            }
            throw e;
        }
    
        @Override
        public byte readByte() throws EOFException {
            try {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 15 16:06:56 UTC 2024
    - 6.2K bytes
    - Viewed (0)
Back to top