Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for truncation (0.09 sec)

  1. src/bytes/buffer.go

    func (b *Buffer) Truncate(n int) {
    	if n == 0 {
    		b.Reset()
    		return
    	}
    	b.lastRead = opInvalid
    	if n < 0 || n > b.Len() {
    		panic("bytes.Buffer: truncation out of range")
    	}
    	b.buf = b.buf[:b.off+n]
    }
    
    // Reset resets the buffer to be empty,
    // but it retains the underlying storage for use by future writes.
    // Reset is the same as [Buffer.Truncate](0).
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Oct 29 16:47:05 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/IntMathTest.java

            // The BigInteger implementation is tested separately, use it as the reference.
            // Promote the int value (rather than using intValue() on the expected value) to avoid
            // any risk of truncation which could lead to a false positive.
            assertEquals(BigIntegerMath.sqrt(valueOf(x), mode), valueOf(IntMath.sqrt(x, mode)));
          }
        }
      }
    
      /* Relies on the correctness of sqrt(int, FLOOR). */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/math/IntMathTest.java

            // The BigInteger implementation is tested separately, use it as the reference.
            // Promote the int value (rather than using intValue() on the expected value) to avoid
            // any risk of truncation which could lead to a false positive.
            assertEquals(BigIntegerMath.sqrt(valueOf(x), mode), valueOf(IntMath.sqrt(x, mode)));
          }
        }
      }
    
      /* Relies on the correctness of sqrt(int, FLOOR). */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/LongMathTest.java

        for (long x : POSITIVE_LONG_CANDIDATES) {
          for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) {
            // Promote the long value (rather than using longValue() on the expected value) to avoid
            // any risk of truncation which could lead to a false positive.
            assertEquals(BigIntegerMath.sqrt(valueOf(x), mode), valueOf(LongMath.sqrt(x, mode)));
          }
        }
      }
    
      /* Relies on the correctness of sqrt(long, FLOOR). */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/hash/BloomFilter.java

       * @param m total number of bits in Bloom filter (must be positive)
       */
      @VisibleForTesting
      static int optimalNumOfHashFunctions(long n, long m) {
        // (m / n) * log(2), but avoid truncation due to division!
        return max(1, (int) Math.round((double) m / n * Math.log(2)));
      }
    
      /**
       * Computes m (total bits of Bloom filter) which is expected to achieve, for the specified
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 23 16:45:30 UTC 2024
    - 26.6K bytes
    - Viewed (0)
  6. cmd/object-api-multipart_test.go

    				},
    			},
    		},
    		// listMultipartResults - 21.
    		// Testing for listing of 3 uploadID's for a given object, setting maxKeys to be 3.
    		// There are 3 MultipartInfo in the result (uploadIDs[1-3]), hence no truncation is expected.
    		// Since all the MultipartInfo is listed, expecting no values for NextUploadIDMarker and NextKeyMarker.
    		// Will be used to list on bucketNames[1].
    		{
    			MaxUploads:  3,
    			IsTruncated: false,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 09:42:21 UTC 2024
    - 88.8K bytes
    - Viewed (0)
  7. RELEASE.md

        *   [CVE-2020-15200](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15200),
        *   [CVE-2020-15201](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15201)
    *   Fixes an integer truncation vulnerability in code using the work sharder
        API,
        ([CVE-2020-15202](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15202))
    *   Fixes a format string vulnerability in `tf.strings.as_string`,
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Tue Oct 22 14:33:53 UTC 2024
    - 735.3K bytes
    - Viewed (0)
  8. doc/go1.17_spec.html

    The conversion always yields a valid value; there is no indication of overflow.
    </li>
    <li>
    When converting a floating-point number to an integer, the fraction is discarded
    (truncation towards zero).
    </li>
    <li>
    When converting an integer or floating-point number to a floating-point type,
    or a complex number to another complex type, the result value is rounded
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Oct 10 18:25:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/TreeRangeMap.java

          RangeMapEntry<K, V> rangeMapEntry = mapEntryAboveToTruncate.getValue();
          if (rangeMapEntry.getUpperBound().compareTo(rangeToRemove.upperBound) > 0) {
            // we know ( ] ), and since we dealt with truncating below already,
            // we know [ ( ] )
            putRangeMapEntry(
                rangeToRemove.upperBound,
                rangeMapEntry.getUpperBound(),
                mapEntryAboveToTruncate.getValue().getValue());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.9K bytes
    - Viewed (0)
  10. doc/go_spec.html

    The conversion always yields a valid value; there is no indication of overflow.
    </li>
    <li>
    When converting a <a href="#Numeric_types">floating-point number</a> to an integer, the fraction is discarded
    (truncation towards zero).
    </li>
    <li>
    When converting an integer or floating-point number to a floating-point type,
    or a <a href="#Numeric_types">complex number</a> to another complex type, the result value is rounded
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Oct 02 00:58:01 UTC 2024
    - 282.5K bytes
    - Viewed (0)
Back to top