Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for leadingZeros (0.09 sec)

  1. guava/src/com/google/common/math/LongMath.java

          case HALF_EVEN:
            // Since sqrt(2) is irrational, log2(x) - logFloor cannot be exactly 0.5
            int leadingZeros = Long.numberOfLeadingZeros(x);
            long cmp = MAX_POWER_OF_SQRT2_UNSIGNED >>> leadingZeros;
            // floor(2^(logFloor + 0.5))
            int logFloor = (Long.SIZE - 1) - leadingZeros;
            return logFloor + lessThanBranchFree(cmp, x);
        }
        throw new AssertionError("impossible");
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/math/LongMath.java

          case HALF_EVEN:
            // Since sqrt(2) is irrational, log2(x) - logFloor cannot be exactly 0.5
            int leadingZeros = Long.numberOfLeadingZeros(x);
            long cmp = MAX_POWER_OF_SQRT2_UNSIGNED >>> leadingZeros;
            // floor(2^(logFloor + 0.5))
            int logFloor = (Long.SIZE - 1) - leadingZeros;
            return logFloor + lessThanBranchFree(cmp, x);
        }
        throw new AssertionError("impossible");
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
Back to top