Home | History | Annotate | Download | only in text

Lines Matching refs:digits

35  * characters, which are the digits radix 10, from '0' to '9'.  It also has a
38 * <em>f</em>, where 0 <= <em>f</em> < 1, derived by placing all the digits of
53 * The maximum number of significant digits in an IEEE 754 double, that
54 * is, in a Java double. This must not be increased, or garbage digits
64 * digits[decimalAt]. If decimalAt is < 0, then leading zeros between
66 * is > count, then trailing zeros between the digits[count-1] and the
70 * f is a value 0.1 <= f < 1 arrived at by placing the digits in Digits to
76 * digits present in digits[].
78 * Zero is represented by any DigitList with count == 0 or with each digits[i]
83 public byte[] digits = new byte[MAX_LONG_DIGITS];
86 if (digitCapacity > digits.length) {
88 System.arraycopy(digits, 0, newDigits, 0, digitsToCopy);
89 digits = newDigits;
98 for (int i=0; i<count; ++i) if (digits[i] != '0') return false;
104 // * Clears out the digits.
106 // * Typically, you set a series of digits with append, then at the point
108 // * then go on appending digits.
116 * Appends digits to the list.
120 digits[count++] = (byte) digit;
124 return (byte) (digits[i] - '0');
136 for (int i = 0; i < count; ++i) temp.append((char)(digits[i]));
154 // we represent. If we tried to just pass the digits off to parseLong,
161 temp.append((i < count) ? (char)(digits[i]) : '0');
183 stringRep.append((char) digits[i]);
200 text[i+1] = (char)digits[i];
205 text[i] = (char)digits[i];
235 stringRep.append((char) digits[i]);
276 significantDigits.append((char)digits[i]);
292 while (count > 0 && digits[count - 1] == (byte)'0') --count;
304 // // first look for nonzero digits after the decimal point;
310 // while (count > 0 && digits[count - 1] == (byte)'0') --count;
327 // byte dig = digits[i], max = LONG_MIN_REP[i];
332 // // At this point the first count digits match. If decimalAt is less
333 // // than count, then the remaining digits are zero, and we return true.
348 // * @param maximumFractionDigits The most fractional digits which should
361 * @param maximumDigits The most fractional or total digits which should
364 * fractional digits to be converted. If false, total digits.
381 // is more than the maximum fraction digits, then we have an underflow
390 digits[0] = (byte)'1';
400 while (count > 1 && digits[count - 1] == '0')
403 // Eliminate digits beyond maximum digits to be displayed.
448 digits[count++] = (byte)c;
460 * of digits will result in an increment to the last digit. This
463 * @param maximumDigits the number of digits to keep, from 0 to
464 * <code>count-1</code>. If 0, then all digits are rounded away, and
477 if (digits[maximumDigits] > '5') {
479 } else if (digits[maximumDigits] == '5' ) {
481 if (digits[i] != '0') {
485 return maximumDigits > 0 && (digits[maximumDigits-1] % 2 != 0);
492 * Round the representation to the given number of digits.
493 * @param maximumDigits The maximum number of digits to be shown.
498 // Eliminate digits beyond maximum digits to be displayed.
503 // Rounding up involves incrementing digits from LSD to MSD.
513 digits[0] = (byte) '1';
520 ++digits[maximumDigits];
522 if (digits[maximumDigits] <= '9') break;
523 // digits[maximumDigits] = '0'; // Unnecessary since we'll truncate this
532 while (count > 1 && digits[count-1] == '0') {
561 * @param maximumDigits The most digits which should be converted.
562 * If maximumDigits is lower than the number of significant digits
579 System.arraycopy(LONG_MIN_REP, 0, digits, 0, count);
588 digits[--left] = (byte) (('0') + (source % 10));
595 for (right = MAX_LONG_DIGITS - 1; digits[right] == (byte) '0'; --right) {}
597 System.arraycopy(digits, left, digits, 0, count);
606 * @param maximumDigits The most digits which should be converted.
607 * If maximumDigits is lower than the number of significant digits
628 digits[i] = (byte) stringDigits.charAt(i + offset);
641 * @param maximumDigits The most digits which should be converted.
642 * If maximumDigits is lower than the number of significant digits
645 * fractional digits to be converted. If false, total digits.
690 //| digits[i] = (byte) stringDigits.charAt(first++);
701 // Eliminate digits beyond maximum digits to be displayed.
716 * @param maximumDigits The most digits which should be converted.
717 * If maximumDigits is lower than the number of significant digits
720 * fractional digits to be converted. If false, total digits.
731 * @param maximumDigits The most digits which should be converted.
732 * If maximumDigits is lower than the number of significant digits
735 * fractional digits to be converted. If false, total digits.
753 if (digits[i] != LONG_MIN_REP[i]) return false;
816 if (digits[i] != other.digits[i])
829 hashcode = hashcode * 37 + digits[i];
839 for (int i=0; i<count; ++i) buf.append((char)digits[i]);