Home
last modified time | relevance | path

Searched refs:bits (Results 1 – 25 of 43) sorted by relevance

12

/libcore/luni/src/main/java/libcore/util/
DFP16.java314 int bits = h & 0xffff; in rint() local
315 int abs = bits & EXPONENT_SIGNIFICAND_MASK; in rint()
316 int result = bits; in rint()
359 int bits = h & 0xffff; in ceil() local
360 int abs = bits & EXPONENT_SIGNIFICAND_MASK; in ceil()
361 int result = bits; in ceil()
365 result |= 0x3c00 & -(~(bits >> 15) & (abs != 0 ? 1 : 0)); in ceil()
369 result += mask & ((bits >> 15) - 1); in ceil()
402 int bits = h & 0xffff; in floor() local
403 int abs = bits & EXPONENT_SIGNIFICAND_MASK; in floor()
[all …]
/libcore/ojluni/src/main/java/java/util/
DBase64.java424 int bits = (src[sp0++] & 0xff) << 16 | in encodeBlock() local
427 dst[dp0++] = (byte)base64[(bits >>> 18) & 0x3f]; in encodeBlock()
428 dst[dp0++] = (byte)base64[(bits >>> 12) & 0x3f]; in encodeBlock()
429 dst[dp0++] = (byte)base64[(bits >>> 6) & 0x3f]; in encodeBlock()
430 dst[dp0++] = (byte)base64[bits & 0x3f]; in encodeBlock()
810 int bits = 0; in decode0() local
851 bits |= (b << shiftto); in decode0()
854 dst[dp++] = (byte)(bits >> 16); in decode0()
855 dst[dp++] = (byte)(bits >> 8); in decode0()
856 dst[dp++] = (byte)(bits); in decode0()
[all …]
DDualPivotQuicksort.java178 static void sort(Sorter sorter, int[] a, int bits, int low, int high) { in sort() argument
185 if (size < MAX_MIXED_INSERTION_SORT_SIZE + bits && (bits & 1) > 0) { in sort()
202 if ((bits == 0 || size > MIN_TRY_MERGE_SIZE && (bits & 1) > 0) in sort()
211 if ((bits += DELTA) > MAX_RECURSION_DEPTH) { in sort()
352 sorter.forkSorter(bits | 1, lower + 1, upper); in sort()
353 sorter.forkSorter(bits | 1, upper + 1, high); in sort()
355 sort(sorter, a, bits | 1, lower + 1, upper); in sort()
356 sort(sorter, a, bits | 1, upper + 1, high); in sort()
425 sorter.forkSorter(bits | 1, upper, high); in sort()
427 sort(sorter, a, bits | 1, upper, high); in sort()
[all …]
DPriorityQueue.java937 private static void setBit(long[] bits, int i) { in setBit() argument
938 bits[i >> 6] |= 1L << i; in setBit()
940 private static boolean isClear(long[] bits, int i) { in isClear() argument
941 return (bits[i >> 6] & (1L << i)) == 0; in isClear()
/libcore/ojluni/src/main/java/java/math/
DBitSieve.java51 private long bits[]; field in BitSieve
77 bits = new long[(unitIndex(length - 1) + 1)]; in BitSieve()
105 bits = new long[(unitIndex(searchLen-1) + 1)]; in BitSieve()
150 return ((bits[unitIndex] & bit(bitIndex)) != 0); in get()
158 bits[unitIndex] |= bit(bitIndex); in set()
197 for (int i=0; i<bits.length; i++) { in retrieve()
198 long nextLong = ~bits[i]; in retrieve()
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixFileAttributes.java217 int bits = (st_mode & UnixConstants.S_IAMB); in permissions() local
220 if ((bits & UnixConstants.S_IRUSR) > 0) in permissions()
222 if ((bits & UnixConstants.S_IWUSR) > 0) in permissions()
224 if ((bits & UnixConstants.S_IXUSR) > 0) in permissions()
227 if ((bits & UnixConstants.S_IRGRP) > 0) in permissions()
229 if ((bits & UnixConstants.S_IWGRP) > 0) in permissions()
231 if ((bits & UnixConstants.S_IXGRP) > 0) in permissions()
234 if ((bits & UnixConstants.S_IROTH) > 0) in permissions()
236 if ((bits & UnixConstants.S_IWOTH) > 0) in permissions()
238 if ((bits & UnixConstants.S_IXOTH) > 0) in permissions()
/libcore/ojluni/src/main/java/sun/security/util/
DBitArray.java116 public BitArray(boolean[] bits) { in BitArray() argument
117 length = bits.length; in BitArray()
121 set(i, bits[i]); in BitArray()
201 boolean[] bits = new boolean[length]; in toBooleanArray()
204 bits[i] = get(i); in toBooleanArray()
206 return bits; in toBooleanArray()
DDerOutputStream.java237 public void putBitString(byte[] bits) throws IOException { in putBitString() argument
239 putLength(bits.length + 1); in putBitString()
241 write(bits); in putBitString()
251 byte[] bits = ba.toByteArray(); in putUnalignedBitString()
254 putLength(bits.length + 1); in putUnalignedBitString()
255 write(bits.length*8 - ba.length()); // excess bits in last octet in putUnalignedBitString()
256 write(bits); in putUnalignedBitString()
DDerInputBuffer.java245 byte[] bits = new byte[len - 1]; in getUnalignedBitString()
247 int length = (bits.length == 0) ? 0 : bits.length * 8 - unusedBits; in getUnalignedBitString()
249 System.arraycopy(buf, pos + 1, bits, 0, len - 1); in getUnalignedBitString()
251 BitArray bitArray = new BitArray(length, bits); in getUnalignedBitString()
DObjectIdentifier.java508 int bits = ilength * iw; // number of all used bits in pack() local
509 byte[] out = new byte[(bits+ow-1)/ow]; in pack()
515 int opos = (bits+ow-1)/ow*ow-bits; in pack()
517 while(ipos < bits) { in pack()
/libcore/ojluni/src/test/java/util/Random/
DRandomTestBsi1999.java315 long bits = 0; in testRngBsi1999LongOnce() local
319 bits = theSupplier.getAsLong(); in testRngBsi1999LongOnce()
321 bitCount += Long.bitCount((j == (20000 - 32)) ? ((bits << 32) >>> 32) : bits); in testRngBsi1999LongOnce()
323 s[j] = (byte)(bits & 1); in testRngBsi1999LongOnce()
324 bits >>>= 1; in testRngBsi1999LongOnce()
357 int bits = 0; in testRngBsi1999IntOnce() local
361 bits = theSupplier.getAsInt(); in testRngBsi1999IntOnce()
362 bitCount += Integer.bitCount(bits); in testRngBsi1999IntOnce()
364 s[j] = (byte)(bits & 1); in testRngBsi1999IntOnce()
365 bits >>>= 1; in testRngBsi1999IntOnce()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerConstructorsTest.java752 int bits; in testConstructorPrime() local
755 bits = 128; in testConstructorPrime()
756 b = new BigInteger(bits, 10, rnd); in testConstructorPrime()
757 assertEquals(b.toString(), bits, b.bitLength()); in testConstructorPrime() local
760 bits = 25; in testConstructorPrime()
761 b = new BigInteger(bits, 10, rnd); in testConstructorPrime()
762 assertEquals(b.toString(), bits, b.bitLength()); in testConstructorPrime() local
765 bits = 18; in testConstructorPrime()
766 b = new BigInteger(bits, 10, rnd); in testConstructorPrime()
767 assertEquals(b.toString(), bits, b.bitLength()); in testConstructorPrime() local
[all …]
/libcore/ojluni/src/main/java/java/lang/
DDouble.java893 long bits = doubleToLongBits(value); in hashCode() local
894 return (int)(bits ^ (bits >>> 32)); in hashCode()
1068 public static native double longBitsToDouble(long bits); in longBitsToDouble() argument
/libcore/luni/src/main/native/
Dcbigint.h62 #define INTBITS_TO_FLOAT(bits) (*(reinterpret_cast<float*>(&bits))) argument
/libcore/ojluni/annotations/hiddenapi/sun/security/util/
DBitArray.java40 public BitArray(boolean[] bits) { in BitArray() argument
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DRandomTest.java272 protected int next(int bits) { in next() argument
274 return super.next(bits); in next()
/libcore/ojluni/src/main/java/java/util/concurrent/
DSubmissionPublisher.java1102 final int getAndBitwiseOrCtl(int bits) { in getAndBitwiseOrCtl() argument
1103 return (int)CTL.getAndBitwiseOr(this, bits); in getAndBitwiseOrCtl()
1239 final void startOnSignal(int bits) { in startOnSignal() argument
1240 if ((ctl & bits) != bits && in startOnSignal()
1241 (getAndBitwiseOrCtl(bits) & (RUN | CLOSED)) == 0) in startOnSignal()
/libcore/ojluni/annotations/flagged_api/java/util/concurrent/
DThreadLocalRandom.annotated.java51 protected int next(int bits) { throw new RuntimeException("Stub!"); } in next() argument
/libcore/ojluni/annotations/flagged_api/java/lang/
DDouble.annotated.java82 public static native double longBitsToDouble(long bits); in longBitsToDouble() argument
DFloat.annotated.java85 public static native float intBitsToFloat(int bits); in intBitsToFloat() argument
/libcore/ojluni/src/test/java/util/zip/
DChecksumBase.java56 for (byte bits : BYTES_123456789) { in testBytes()
57 checksum.update(bits); in testBytes()
/libcore/ojluni/src/test/java/math/BigInteger/
DBigIntegerTest.java345 IntStream bits = random.ints(SIZE, 3, Short.MAX_VALUE); in squareRootAndRemainder() local
346 bits.mapToObj(BigInteger::valueOf).map(g).collect(Collectors.toList()); in squareRootAndRemainder()
677 for (int bits = upper; bits >= lower; bits--) { in stringConv_schoenhage()
679 … BigInteger x = BigInteger.ONE.shiftLeft(bits - 1).or(new BigInteger(bits - 2, random)); in stringConv_schoenhage()
/libcore/ojluni/annotations/sdk/nullability/java/lang/
DDouble.annotated.java81 public static native double longBitsToDouble(long bits); in longBitsToDouble() argument
/libcore/ojluni/annotations/hiddenapi/java/lang/
DFloat.java133 public static native float intBitsToFloat(int bits); in intBitsToFloat() argument
DDouble.java130 public static native double longBitsToDouble(long bits); in longBitsToDouble() argument

12