Home | History | Annotate | Download | only in text

Lines Matching refs:digits

34  * characters, which are the digits radix 10, from '0' to '9'.  It also has a
37 * <em>f</em>, where 0 <= <em>f</em> < 1, derived by placing all the digits of
51 * The maximum number of significant digits in an IEEE 754 double, that
52 * is, in a Java double. This must not be increased, or garbage digits
62 * digits[decimalAt]. If decimalAt is < 0, then leading zeros between
64 * is > count, then trailing zeros between the digits[count-1] and the
68 * f is a value 0.1 <= f < 1 arrived at by placing the digits in Digits to
74 * digits present in digits[].
76 * Zero is represented by any DigitList with count == 0 or with each digits[i]
81 public byte[] digits = new byte[MAX_LONG_DIGITS];
84 if (digitCapacity > digits.length) {
86 System.arraycopy(digits, 0, newDigits, 0, digitsToCopy);
87 digits = newDigits;
96 for (int i=0; i<count; ++i) if (digits[i] != '0') return false;
102 // * Clears out the digits.
104 // * Typically, you set a series of digits with append, then at the point
106 // * then go on appending digits.
114 * Appends digits to the list.
118 digits[count++] = (byte) digit;
122 return (byte) (digits[i] - '0');
134 for (int i = 0; i < count; ++i) temp.append((char)(digits[i]));
152 // we represent. If we tried to just pass the digits off to parseLong,
159 temp.append((i < count) ? (char)(digits[i]) : '0');
181 stringRep.append((char) digits[i]);
198 text[i+1] = (char)digits[i];
203 text[i] = (char)digits[i];
233 stringRep.append((char) digits[i]);
274 significantDigits.append((char)digits[i]);
290 while (count > 0 && digits[count - 1] == (byte)'0') --count;
302 // // first look for nonzero digits after the decimal point;
308 // while (count > 0 && digits[count - 1] == (byte)'0') --count;
325 // byte dig = digits[i], max = LONG_MIN_REP[i];
330 // // At this point the first count digits match. If decimalAt is less
331 // // than count, then the remaining digits are zero, and we return true.
346 // * @param maximumFractionDigits The most fractional digits which should
359 * @param maximumDigits The most fractional or total digits which should
362 * fractional digits to be converted. If false, total digits.
379 // is more than the maximum fraction digits, then we have an underflow
388 digits[0] = (byte)'1';
398 while (count > 1 && digits[count - 1] == '0')
401 // Eliminate digits beyond maximum digits to be displayed.
446 digits[count++] = (byte)c;
458 * of digits will result in an increment to the last digit. This
461 * @param maximumDigits the number of digits to keep, from 0 to
462 * <code>count-1</code>. If 0, then all digits are rounded away, and
475 if (digits[maximumDigits] > '5') {
477 } else if (digits[maximumDigits] == '5' ) {
479 if (digits[i] != '0') {
483 return maximumDigits > 0 && (digits[maximumDigits-1] % 2 != 0);
490 * Round the representation to the given number of digits.
491 * @param maximumDigits The maximum number of digits to be shown.
496 // Eliminate digits beyond maximum digits to be displayed.
501 // Rounding up involves incrementing digits from LSD to MSD.
511 digits[0] = (byte) '1';
518 ++digits[maximumDigits];
520 if (digits[maximumDigits] <= '9') break;
521 // digits[maximumDigits] = '0'; // Unnecessary since we'll truncate this
530 while (count > 1 && digits[count-1] == '0') {
559 * @param maximumDigits The most digits which should be converted.
560 * If maximumDigits is lower than the number of significant digits
577 System.arraycopy(LONG_MIN_REP, 0, digits, 0, count);
586 digits[--left] = (byte) (('0') + (source % 10));
593 for (right = MAX_LONG_DIGITS - 1; digits[right] == (byte) '0'; --right) {}
595 System.arraycopy(digits, left, digits, 0, count);
604 * @param maximumDigits The most digits which should be converted.
605 * If maximumDigits is lower than the number of significant digits
626 digits[i] = (byte) stringDigits.charAt(i + offset);
639 * @param maximumDigits The most digits which should be converted.
640 * If maximumDigits is lower than the number of significant digits
643 * fractional digits to be converted. If false, total digits.
688 //| digits[i] = (byte) stringDigits.charAt(first++);
699 // Eliminate digits beyond maximum digits to be displayed.
714 * @param maximumDigits The most digits which should be converted.
715 * If maximumDigits is lower than the number of significant digits
718 * fractional digits to be converted. If false, total digits.
729 * @param maximumDigits The most digits which should be converted.
730 * If maximumDigits is lower than the number of significant digits
733 * fractional digits to be converted. If false, total digits.
751 if (digits[i] != LONG_MIN_REP[i]) return false;
814 if (digits[i] != other.digits[i])
827 hashcode = hashcode * 37 + digits[i];
837 for (int i=0; i<count; ++i) buf.append((char)digits[i]);