Home
last modified time | relevance | path

Searched refs:numBits (Results 1 – 7 of 7) sorted by relevance

/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DSecureRandom2Test.java276 int numBits = 29; in test_nextJ() local
277 int random = mySecureRandom.getNext(numBits); in test_nextJ()
278 assertEquals(numBits, Integer.bitCount(random)); in test_nextJ()
280 numBits = 0; in test_nextJ()
281 random = mySecureRandom.getNext(numBits); in test_nextJ()
282 assertEquals(numBits, Integer.bitCount(random)); in test_nextJ()
284 numBits = 40; in test_nextJ()
285 random = mySecureRandom.getNext(numBits); in test_nextJ()
288 numBits = -1; in test_nextJ()
289 random = mySecureRandom.getNext(numBits); in test_nextJ()
[all …]
/libcore/luni/src/main/native/
Djava_lang_StringToReal.cpp198 int32_t numBits; in createDouble1() local
204 numBits = highestSetBitHighPrecision (f, length) + 1; in createDouble1()
205 numBits -= lowestSetBitHighPrecision (f, length); in createDouble1()
206 if (numBits < 54 && e >= 0 && e < DOUBLE_LOG5_OF_TWO_TO_THE_N) in createDouble1()
210 else if (numBits < 54 && e < 0 && (-e) < DOUBLE_LOG5_OF_TWO_TO_THE_N) in createDouble1()
586 int32_t numBits; in createFloat1() local
590 numBits = highestSetBitHighPrecision (f, length) + 1; in createFloat1()
591 if (numBits < 25 && e >= 0 && e < FLOAT_LOG5_OF_TWO_TO_THE_N) in createFloat1()
595 else if (numBits < 25 && e < 0 && (-e) < FLOAT_LOG5_OF_TWO_TO_THE_N) in createFloat1()
/libcore/ojluni/src/main/java/java/security/
DSecureRandom.java498 final protected int next(int numBits) { in next() argument
499 int numBytes = (numBits+7)/8; in next()
508 return next >>> (numBytes*8 - numBits); in next()
/libcore/luni/src/test/java/tests/java/security/
DSecureRandomTest.java291 public int nextElement(int numBits) { in nextElement() argument
292 return super.next(numBits); in nextElement()
/libcore/ojluni/src/main/java/java/math/
DBigInteger.java462 long numBits = ((numDigits * bitsPerDigit[radix]) >>> 10) + 1; in BigInteger() local
463 if (numBits + 31 >= (1L << 32)) { in BigInteger()
466 int numWords = (int) (numBits + 31) >>> 5; in BigInteger()
519 long numBits = ((numDigits * bitsPerDigit[10]) >>> 10) + 1; in BigInteger() local
520 if (numBits + 31 >= (1L << 32)) { in BigInteger()
523 numWords = (int) (numBits + 31) >>> 5; in BigInteger()
626 public BigInteger(int numBits, @NonNull Random rnd) { in BigInteger() argument
627 this(1, randomBits(numBits, rnd)); in BigInteger()
630 private static byte[] randomBits(int numBits, Random rnd) { in randomBits() argument
631 if (numBits < 0) in randomBits()
[all …]
DMutableBigInteger.java2182 int numBits = k & 0x1f;
2183 if (numBits != 0) {
2186 v &= ((1<<numBits) - 1);
2191 c.rightShift(numBits);
/libcore/ojluni/src/main/java/java/util/
DBitSet.java1184 int numBits = (wordsInUse > 128) ? in toString() local
1186 StringBuilder b = new StringBuilder(6*numBits + 2); in toString()