/libcore/luni/src/main/java/java/util/ |
H A D | BitSet.java | 40 * The bits. Access bit n thus: 42 * boolean bit = (bits[n / 64] | (1 << n)) != 0; 49 private long[] bits; field in class:BitSet 52 * The number of elements of 'bits' that are actually in use (non-zero). Amongst other 58 * Updates 'longCount' by inspecting 'bits'. Assumes that the new longCount is <= the current 67 while (i >= 0 && bits[i] == 0) { 74 * Creates a new {@code BitSet} with size equal to 64 bits. 90 this.bits = arrayForBits(bitCount); 94 private BitSet(long[] bits) { argument 95 this.bits [all...] |
H A D | HugeEnumSet.java | 30 private long[] bits; field in class:HugeEnumSet 44 bits = new long[(enums.length + BIT_IN_LONG - 1) / BIT_IN_LONG]; 50 * The bits yet to be returned for the long in bits[index]. As values from the current index 51 * are returned, their bits are zeroed out. When this reaches zero, the index must be 54 private long currentBits = bits[0]; 57 * The index into HugeEnumSet.bits of the next value to return. 83 } else if (++index < bits.length) { 84 currentBits = bits[index]; 126 long oldBits = bits[inde [all...] |
H A D | MiniEnumSet.java | 31 private long bits; field in class:MiniEnumSet 48 * The bits yet to be returned for bits. As values from the current index are returned, 49 * their bits are zeroed out. 51 private long currentBits = bits; 103 bits = 0; 110 long oldBits = bits; 113 bits = newBits; 130 long oldBits = bits; 131 long newBits = oldBits | miniSet.bits; [all...] |
H A D | Random.java | 83 * the number of bits specified by the argument {@code bits} as 89 protected synchronized int next(int bits) { argument 91 return (int) (seed >>> (48 - bits)); 180 int bits, val; 182 bits = next(31); 183 val = bits % n; 184 } while (bits - val + (n - 1) < 0);
|
/libcore/luni/src/main/native/ |
H A D | java_lang_Double.cpp | 28 uint64_t bits; member in union:Double 38 return isnan(d.d) ? NaN : d.bits; 44 return d.bits; 49 d.bits = val;
|
H A D | java_lang_Float.cpp | 27 unsigned int bits; member in union:Float 37 return isnanf(f.f) ? NaN : f.bits; 43 return f.bits; 48 f.bits = val;
|
H A D | cbigint.h | 28 single: 31 = sign bit, 30..23 = exponent (8 bits), 22..0 = significand (23 bits) 29 double: 63 = sign bit, 62..52 = exponent (11 bits), 51..0 = significand (52 bits) 30 inf == (all exponent bits set) and (all mantissa bits clear) 31 nan == (all exponent bits set) and (at least one mantissa bit set) 33 zero == (all exponent bits clear) and (all mantissa bits clear) 34 denormal == (all exponent bits clea [all...] |
H A D | java_math_NativeBN.cpp | 522 static void NativeBN_BN_generate_prime_ex(JNIEnv* env, jclass, jlong ret, int bits, argument 525 BN_generate_prime_ex(toBigNum(ret), bits, safe, toBigNum(add), toBigNum(rem),
|
/libcore/luni/src/main/java/java/lang/ |
H A D | StrictMath.java | 1016 long bits = Double.doubleToLongBits(d); 1018 long sign = bits & Double.SIGN_MASK; 1020 long factor = (int) ((bits & Double.EXPONENT_MASK) >> Double.MANTISSA_BITS) 1024 int subNormalFactor = Long.numberOfLeadingZeros(bits & ~Double.SIGN_MASK) 1044 result = shiftLongBits(bits & Double.MANTISSA_MASK, digits); 1047 result = shiftLongBits(bits & Double.MANTISSA_MASK | 0x0010000000000000L, digits - 1); 1053 | (bits & Double.MANTISSA_MASK); 1057 | ((bits << (subNormalFactor + 1)) & Double.MANTISSA_MASK); 1071 int bits = Float.floatToIntBits(d); 1072 int sign = bits 1117 shiftIntBits(int bits, int digits) argument 1136 shiftLongBits(long bits, long digits) argument [all...] |
H A D | Math.java | 1033 int bits = Float.floatToRawIntBits(f); 1034 bits = (bits & Float.EXPONENT_MASK) >> Float.MANTISSA_BITS; 1035 return bits - Float.EXPONENT_BIAS; 1043 long bits = Double.doubleToRawLongBits(d); 1044 bits = (bits & Double.EXPONENT_MASK) >> Double.MANTISSA_BITS; 1045 return (int) bits - Double.EXPONENT_BIAS; 1152 long bits = Double.doubleToLongBits(d); 1154 long sign = bits 1251 shiftIntBits(int bits, int digits) argument 1277 shiftLongBits(long bits, long digits) argument [all...] |
H A D | Double.java | 108 * Constant for the number of bits needed to represent a {@code double} in 169 * Returns an integer corresponding to the bits of the given 177 * Returns an integer corresponding to the bits of the given 276 * double precision float corresponding to the given {@code bits}. 278 public static native double longBitsToDouble(long bits); argument 418 // mask exponent bits and shift down 420 // mask significand bits and shift up 436 // significand is 52-bits, so there can be 13 hex digits 458 // significand is 52-bits, so there can be 13 hex digits
|
H A D | Float.java | 105 * Constant for the number of bits needed to represent a {@code float} in 197 * Returns an integer corresponding to the bits of the given 205 * Returns an integer corresponding to the bits of the given 229 * single precision float corresponding to the given {@code bits}. 231 public static native float intBitsToFloat(int bits); argument 425 // mask exponent bits and shift down 427 // mask significand bits and shift up 428 // significand is 23-bits, so we shift to treat it like 24-bits 444 // significand is 23-bits, s [all...] |
/libcore/luni/src/main/java/java/util/concurrent/ |
H A D | ThreadLocalRandom.java | 100 protected int next(int bits) { argument 102 return (int) (rnd >>> (48-bits)); 140 int bits = next(2); 142 long nextn = ((bits & 2) == 0) ? half : n - half; 143 if ((bits & 1) == 0)
|
/libcore/luni/src/main/java/libcore/io/ |
H A D | Base64.java | 71 int bits = 0; 85 bits = chr - 65; 90 bits = chr - 71; 95 bits = chr + 4; 97 bits = 62; 99 bits = 63; 104 quantum = (quantum << 6) | (byte) bits;
|
/libcore/luni/src/main/java/java/text/ |
H A D | ChoiceFormat.java | 317 long bits; 320 bits = 0; 322 bits = Double.doubleToLongBits(value); 324 return Double.longBitsToDouble(value < 0 ? bits - 1 : bits + 1); 399 long bits; 402 bits = 0x8000000000000000L; 404 bits = Double.doubleToLongBits(value); 406 return Double.longBitsToDouble(value <= 0 ? bits + 1 : bits [all...] |
/libcore/luni/src/test/java/libcore/java/util/ |
H A D | RandomTest.java | 31 @Override protected synchronized int next(int bits) { return state.length(); }
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
H A D | BigIntegerConstructorsTest.java | 739 * Create a random number of 75 bits length. 752 int bits; 755 bits = 128; 756 b = new BigInteger(bits, 10, rnd); 757 assertEquals(b.toString(), bits, b.bitLength()); 759 // Create a prime number of 25 bits length. 760 bits = 25; 761 b = new BigInteger(bits, 10, rnd); 762 assertEquals(b.toString(), bits, b.bitLength()); 764 // Create a prime number of 18 bits lengt [all...] |
/libcore/luni/src/main/java/org/apache/harmony/security/provider/crypto/ |
H A D | SHA1PRNG_SecureRandomImpl.java | 39 * <p>To generate pseudo-random bits, the implementation uses technique described in 150 // a number of the 512-bit length frames (512 bits = 64 bytes = 16 words), 239 * byte array containing bits in order from left to right 269 * To generate random bytes, the "expansion of source bits" method is used, 271 * the current seed with a 64-bit counter appended is used to compute new bits. 285 long bits; // number of bits required by Secure Hash Standard 330 bits = (seedLength << 3) + 64; // transforming # of bytes into # of bits 332 // putting # of bits int [all...] |
/libcore/luni/src/main/java/java/math/ |
H A D | NativeBN.java | 122 public static native void BN_generate_prime_ex(long ret, int bits, boolean safe, argument 124 // int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe,
|
H A D | BigDecimal.java | 467 long bits = Double.doubleToLongBits(val); // IEEE-754 471 scale = 1075 - (int)((bits >> 52) & 0x7FFL); 472 // Extracting the 52 bits of the mantissa. 473 mantissa = (scale == 1075) ? (bits & 0xFFFFFFFFFFFFFL) << 1 474 : (bits & 0xFFFFFFFFFFFFFL) | 0x10000000000000L; 486 if((bits >> 63) != 0) { 1632 int oneBitMask; // mask of bits 2395 * If scale <= -64 there are at least 64 trailing bits zero in 2422 * If scale <= -32 there are at least 32 trailing bits zero in 2527 long bits; // IEE [all...] |
/libcore/luni/src/main/java/org/apache/harmony/security/asn1/ |
H A D | BerInputStream.java | 220 // content: check unused bits 223 + "]. A number of unused bits MUST be in range 0 to 7"); 228 + "]. For empty string unused bits MUST be 0"); 256 int bits = buffer[contentOffset] & 0xFF; 258 bits += 0x100; 261 if (bits == 0 || bits == 0x1FF) {
|
/libcore/luni/src/test/java/tests/api/java/util/ |
H A D | RandomTest.java | 257 protected int next(int bits) { argument 259 return super.next(bits);
|