Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Otander (0.22 sec)

  1. android/guava/src/com/google/common/math/IntMath.java

          // But in gcd(a - b, b), a - b is even and b is odd, so we can divide out powers of two.
    
          // We bend over backwards to avoid branching, adapting a technique from
          // http://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax
    
          int delta = a - b; // can't overflow, since a and b are nonnegative
    
          int minDeltaOrZero = delta & (delta >> (Integer.SIZE - 1));
          // equivalent to Math.min(delta, 0)
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
Back to top