Searched refs:digits (Results 1 - 14 of 14) sorted by relevance

/libcore/luni/src/main/java/java/math/
H A DLogical.java51 if (val.digits[val.numberLength - 1] != -1) {
52 for (i = 0; val.digits[i] == -1; i++) {
56 for (i = 0; (i < val.numberLength) && (val.digits[i] == -1); i++) {
67 for (i = 0; val.digits[i] == 0; i++) {
73 resDigits[i] = val.digits[i] + val.sign;
76 resDigits[i] = val.digits[i];
122 resDigits[i] = val.digits[i] & that.digits[i];
135 // the positive digits
145 resDigits[i] = -negative.digits[
[all...]
H A DBigInteger.java54 transient int[] digits; field in class:BigInteger
58 * digits.length().
113 * @param digits a reference of some array created before.
115 BigInteger(int sign, int numberLength, int[] digits) { argument
116 setJavaRepresentation(sign, numberLength, digits);
136 int[] digits = new int[numberLength];
138 digits[i] = random.nextInt();
141 digits[numberLength - 1] >>>= (-numBits) & 31;
142 setJavaRepresentation(sign, numberLength, digits);
207 * non-empty sequence of decimal digits
333 setJavaRepresentation(int sign, int numberLength, int[] digits) argument
[all...]
H A DBitLevel.java47 int highDigit = val.digits[val.numberLength - 1];
73 bCount += Integer.bitCount(val.digits[i]);
77 bCount += Integer.bitCount(-val.digits[i]);
79 bCount += Integer.bitCount(~val.digits[i]);
94 return ((val.digits[n >> 5] & (1 << (n & 31))) != 0);
103 static boolean nonZeroDroppedBits(int numberOfBits, int[] digits) { argument
108 for (i = 0; (i < intCount) && (digits[i] == 0); i++) {
111 return ((i != intCount) || (digits[i] << (32 - bitCount) != 0));
131 shiftLeftOneBit(resDigits, source.digits, srcLen);
147 shiftRight(resDigits, resLength, source.digits, intCoun
[all...]
H A DConversion.java57 int[] digits = val.digits;
63 int highDigit = digits[numberLength - 1];
84 System.arraycopy(digits, 0, temp, 0, numberLength);
91 // divide the array of digits by bigRadix and convert remainders
116 resDigit = digits[i] >> (j << 2) & 0xf;
141 int[] digits = val.digits;
173 // one 32-bit unsigned value may contains 10 decimal digits
178 // inserting necessary scaled digits
[all...]
/libcore/luni/src/main/java/java/lang/
H A DStrictMath.java287 * cancellation of significant digits).
1040 // the number of digits that shifts
1041 long digits = factor + Double.EXPONENT_BIAS + subNormalFactor;
1044 result = shiftLongBits(bits & Double.MANTISSA_MASK, digits);
1047 result = shiftLongBits(bits & Double.MANTISSA_MASK | 0x0010000000000000L, digits - 1);
1092 // the number of digits that shifts
1093 int digits = factor + Float.EXPONENT_BIAS + subNormalFactor;
1096 result = shiftIntBits(bits & Float.MANTISSA_MASK, digits);
1099 result = shiftIntBits(bits & Float.MANTISSA_MASK | 0x00800000, digits - 1);
1115 // Shifts integer bits as float, if the digits i
1117 shiftIntBits(int bits, int digits) argument
1136 shiftLongBits(long bits, long digits) argument
[all...]
H A DRealToString.java34 * An array of decimal digits, filled by longDigitGenerator or bigIntDigitGenerator.
36 private final int[] digits = new int[64]; field in class:RealToString
39 * Number of valid entries in 'digits'.
196 sb.append0((char) ('0' + digits[digitIndex++]));
206 sb.append0((char) ('0' + digits[digitIndex++]));
229 int U = digits[digitIndex++];
240 U = digitIndex < digitCount ? digits[digitIndex++] : -1;
308 digits[digitCount++] = U;
311 digits[digitCount++] = U;
313 digits[digitCoun
[all...]
H A DIntegralToString.java102 * The digits for every supported radix.
219 // Calculate digits two-at-a-time till remaining digits fit in 16 bits
229 // Calculate remaining digits one-at-a-time for performance
337 int low = (int) (n % 1000000000); // Extract low-order 9 digits
340 // Zero-pad Low order part to 9 digits
346 * The remaining digits are (n - low) / 1,000,000,000. This
353 * If the remaining digits fit in an int, emit them using a
356 * on the remaining digits (which now fit in an int).
401 // Calculate digits tw
[all...]
H A DMath.java283 * cancellation of significant digits). The returned result is within 1 ulp
1175 // the number of digits that shifts
1176 long digits = factor + Double.EXPONENT_BIAS + subNormalFactor;
1179 result = shiftLongBits(bits & Double.MANTISSA_MASK, digits);
1182 result = shiftLongBits(bits & Double.MANTISSA_MASK | 0x0010000000000000L, digits - 1);
1226 // the number of digits that shifts
1227 int digits = factor + Float.EXPONENT_BIAS + subNormalFactor;
1230 result = shiftIntBits(bits & Float.MANTISSA_MASK, digits);
1233 result = shiftIntBits(bits & Float.MANTISSA_MASK | 0x00800000, digits - 1);
1249 // Shifts integer bits as float, if the digits i
1251 shiftIntBits(int bits, int digits) argument
1277 shiftLongBits(long bits, long digits) argument
[all...]
/libcore/luni/src/main/java/java/sql/
H A DDate.java194 private void format(int date, int digits, StringBuilder sb) { argument
196 if (digits - str.length() > 0) {
197 sb.append(PADDING.substring(0, digits - str.length()));
239 * significance digits corresponding to milliseconds, seconds, minutes and
H A DTime.java202 private void format(int date, int digits, StringBuilder sb) { argument
204 if (digits - str.length() > 0) {
205 sb.append(PADDING.substring(0, digits - str.length()));
H A DTimestamp.java385 private void format(int date, int digits, StringBuilder sb) { argument
387 if (digits - str.length() > 0) {
388 sb.append(PADDING.substring(0, digits - str.length()));
442 * '.' followed by 1 to 9 digits - we also accept nothing (no fractions
464 * the 9 digits
/libcore/luni/src/main/native/
H A Djava_lang_RealToString.cpp171 static jfieldID digitsFid = env->GetFieldID(JniConstants::realToStringClass, "digits", "[I");
173 ScopedIntArrayRW digits(env, javaDigits.get());
174 if (digits.get() == NULL) {
216 digits[digitCount++] = U;
222 digits[digitCount++] = U;
224 digits[digitCount++] = U + 1;
226 digits[digitCount++] = U;
228 digits[digitCount++] = U + 1;
/libcore/luni/src/main/java/java/util/
H A DFormatter.java123 * number of digits for {@code d}, {@code o}, {@code x}, or {@code X}; the minimum number of digits
125 * the maximum number of significant digits for {@code g} or {@code G}; or the maximum number of
515 * <p><i>Number localization</i>. Some conversions use localized decimal digits rather than the
516 * usual ASCII digits. So formatting {@code 123} with {@code %d} will give 123 in English locales
1493 * Returns a CharSequence corresponding to {@code s} with all the ASCII digits replaced
1494 * by digits appropriate to this formatter's locale. Other characters remain unchanged.
1511 * Inserts the grouping separator every 3 digits. DecimalFormat lets you configure grouping
1512 * size, but you can't access that from Formatter, and the default is every 3 digits.
1526 // Append the digits tha
[all...]
H A DScanner.java998 * and {@code Locale}-specific suffixes are removed. Then non-ASCII digits are
999 * mapped into ASCII digits via {@link Character#digit(char, int)}, and a
1056 * Then non-ASCII digits are mapped into ASCII digits via
1134 * digits are mapped into ASCII digits via
1178 * {@code Locale}-specific suffixes are removed. Then non-ASCII digits are mapped
1179 * into ASCII digits via {@link Character#digit(char, int)}, and a negative
1222 * {@code Locale}-specific suffixes are removed. Then non-ASCII digits are mapped
1223 * into ASCII digits vi
[all...]

Completed in 487 milliseconds