dest.append(positivePrefix, positivePrefixRanges, positivePrefixAttrs);
{ dest.append(substituteCurrency(positivePrefix, number), positivePrefixRanges, positivePrefixAttrs); }
  private void formatInternal (double number, FormatBuffer dest,				 FieldPosition fieldPos)  {		// A very special case.    if (Double.isNaN(number))      {			dest.append(symbols.getNaN());	if (fieldPos != null && 	    (fieldPos.getField() == INTEGER_FIELD ||	     fieldPos.getFieldAttribute() == NumberFormat.Field.INTEGER))	  {				int index = dest.length();				fieldPos.setBeginIndex(index - symbols.getNaN().length());				fieldPos.setEndIndex(index);			}	return;		}		boolean is_neg = number < 0;    if (is_neg)      {			if (negativePrefix != null)	  dest.append(negativePrefix, negativePrefixRanges, negativePrefixAttrs);	else	  {	    dest.append(symbols.getMinusSign(), NumberFormat.Field.SIGN);	    dest.append(positivePrefix, positivePrefixRanges, positivePrefixAttrs);			}	number = - number;      }    else      dest.append(positivePrefix, positivePrefixRanges, positivePrefixAttrs);		int integerBeginIndex = dest.length();		int integerEndIndex = 0;    int zeroStart = symbols.getZeroDigit() - '0';    if (Double.isInfinite (number))      {			dest.append(symbols.getInfinity());			integerEndIndex = dest.length();      }    else      {			number *= multiplier;			// Compute exponent.			long exponent = 0;			double baseNumber;	if (useExponentialNotation)	  {	    exponent = (long) Math.floor (Math.log(number) / Math.log(10));	    exponent = exponent - (exponent % exponentRound);				if (minimumIntegerDigits > 0)					exponent -= minimumIntegerDigits - 1;	    baseNumber = (number / Math.pow(10.0, exponent));	  }	else				baseNumber = number;			// Round to the correct number of digits.	baseNumber += 5 * Math.pow(10.0, - maximumFractionDigits - 1);			int index = dest.length();	//double intPart = Math.floor(baseNumber);	String intPart = Long.toString((long)Math.floor(baseNumber));	int count, groupPosition = intPart.length();	dest.setDefaultAttribute(NumberFormat.Field.INTEGER);	for (count = 0; count < minimumIntegerDigits-intPart.length(); count++)	  dest.append(symbols.getZeroDigit());	for (count = 0;	     count < maximumIntegerDigits && count < intPart.length();	     count++)	  {	    int dig = intPart.charAt(count);	    // Append group separator if required.	    if (groupingUsed && count > 0 && groupingSize != 0 && groupPosition % groupingSize == 0)	      {		dest.append(symbols.getGroupingSeparator(), NumberFormat.Field.GROUPING_SEPARATOR);		dest.setDefaultAttribute(NumberFormat.Field.INTEGER);			}	    dest.append((char) (zeroStart + dig));	    groupPosition--;	  }	dest.setDefaultAttribute(null);			integerEndIndex = dest.length();			int decimal_index = integerEndIndex;			int consecutive_zeros = 0;			int total_digits = 0;	int localMaximumFractionDigits = maximumFractionDigits;	if (useExponentialNotation)	  localMaximumFractionDigits += minimumIntegerDigits - count;			// Strip integer part from NUMBER.			double fracPart = baseNumber - Math.floor(baseNumber);		if ( ((fracPart != 0 || minimumFractionDigits > 0) && localMaximumFractionDigits > 0)	     || decimalSeparatorAlwaysShown)	  {	    dest.append (symbols.getDecimalSeparator(), NumberFormat.Field.DECIMAL_SEPARATOR);	  }	int fraction_begin = dest.length();	dest.setDefaultAttribute(NumberFormat.Field.FRACTION);	for (count = 0;	     count < localMaximumFractionDigits	       && (fracPart != 0 || count < minimumFractionDigits);	     ++count)	  {				++total_digits;				fracPart *= 10;				long dig = (long) fracPart;				if (dig == 0)					++consecutive_zeros;				else					consecutive_zeros = 0;				dest.append((char) (symbols.getZeroDigit() + dig));				// Strip integer part from FRACPART.	    fracPart = fracPart - Math.floor (fracPart);			}			// Strip extraneous trailing `0's.  We can't always detect			// these in the loop.	int extra_zeros = Math.min (consecutive_zeros,				    total_digits - minimumFractionDigits);	if (extra_zeros > 0)	  {	    dest.cutTail(extra_zeros);				total_digits -= extra_zeros;	    if (total_digits == 0 && !decimalSeparatorAlwaysShown)	      dest.cutTail(1);			}	if (fieldPos != null && fieldPos.getField() == FRACTION_FIELD)	  {	    fieldPos.setBeginIndex(fraction_begin);					fieldPos.setEndIndex(dest.length());				}			// Finally, print the exponent.	if (useExponentialNotation)	  {	    dest.append(symbols.getExponential(), NumberFormat.Field.EXPONENT_SYMBOL);	    	    if (exponent < 0)	      {		dest.append (symbols.getMinusSign (), NumberFormat.Field.EXPONENT_SIGN);		exponent = - exponent;				}				index = dest.length();	    dest.setDefaultAttribute(NumberFormat.Field.EXPONENT);	    String exponentString = Long.toString ((long) exponent);	    	    for (count = 0; count < minExponentDigits-exponentString.length();		 count++)	      dest.append((char) symbols.getZeroDigit());	    for (count = 0;		 count < exponentString.length();		 ++count)	      {		int dig = exponentString.charAt(count);		dest.append((char) (zeroStart + dig));				}			}		}    if (fieldPos != null && 	(fieldPos.getField() == INTEGER_FIELD ||	 fieldPos.getFieldAttribute() == NumberFormat.Field.INTEGER))      {			fieldPos.setBeginIndex(integerBeginIndex);			fieldPos.setEndIndex(integerEndIndex);		}    if (is_neg && negativeSuffix != null)      dest.append(negativeSuffix, negativeSuffixRanges, negativeSuffixAttrs);    else      dest.append(positiveSuffix, positiveSuffixRanges, positiveSuffixAttrs);  }