pq24884 Different output from float inputs ---------------------------------------------------------------------------------------------------- Affected Platforms: OS/2 Win Affected Features: Base Smalltalk Prerequisites: v4.5a Symptom: Run the following two scripts. Depending on the size of the float, the output format will be different; ie there are more than two decimal places in one case. | stream lcMon input | input := 255031475185005568720896.429496729. stream := WriteStream on: (Locale current preferredStringClass new:16). lcMon := (Locale current lcMonetary deepCopy) monDecimalPoint: '.'; "$NON-NLS$" currencySymbol: ''; "$NON-NLS$" monThousandsSep: ''; pSepBySpace: 0 ; nSepBySpace: 0 ; intFracDigits: 2; fracDigits: 2. lcMon printNumber: input on: stream. stream contents. | stream lcMon input | input := 185005568720896.4294967296. stream := WriteStream on: (Locale current preferredStringClass new:16). lcMon := (Locale current lcMonetary deepCopy) monDecimalPoint: '.'; "$NON-NLS$" currencySymbol: ''; "$NON-NLS$" monThousandsSep: ''; pSepBySpace: 0 ; nSepBySpace: 0 ; intFracDigits: 2; fracDigits: 2. lcMon printNumber: input on: stream. stream contents. Workaround: | input stringToPrint theString decimalPlaceIndex | input := 255031475185005568720896.4294967296. "input := 185005568720896.4294967296." theString := AbtFloatingPointRepresentationConverter new thousandsSeparator: ''; decimalSeparator: '.'; decimalPlace: 2; objectToPrint: input. decimalPlaceIndex :=theString indexOfSubCollection: '.' startingAt: 1. decimalPlaceIndex = 0 ifFalse:[^stringToPrint := theString copyFrom: 1 to: decimalPlaceIndex+2.] ifTrue: [^theString].