(I sent this message 2.11.2008, but I'm not sure it has been published. Let's try again.)
1.189159413903272e3 printShowingDecimalPlaces: 2 '1189.16' 1.189159413903272e4 printShowingDecimalPlaces: 2 '11891.59' 1.189159413903272e5 printShowingDecimalPlaces: 2 '118915.94' 1.189159413903272e6 printShowingDecimalPlaces: 2 '1.18' BUG !!! Sincerly, Patrick Chénais |
On Wed, Nov 05, 2008 at 07:31:53PM +0100, [hidden email] wrote:
> (I sent this message 2.11.2008, but I'm not sure it has been published. Let's try again.) > > 1.189159413903272e3 printShowingDecimalPlaces: 2 '1189.16' > 1.189159413903272e4 printShowingDecimalPlaces: 2 '11891.59' > 1.189159413903272e5 printShowingDecimalPlaces: 2 '118915.94' > 1.189159413903272e6 printShowingDecimalPlaces: 2 '1.18' BUG !!! Hi Patrick, There are several issues on Mantis (bugs.squeak.org) that relate to #printShowingDecimalPlaces:, one if which must have addressed this bug (it is fixed in Squeak 3.9 and 3.10 at least). If you have follow up issues, it would be good to report them on Mantis. If you are using an older 3.7 image, you may need to locate the relevant patch and apply it your own image. Dave |
Hi Dave!
Thank you for your mail and advices. It's fine that the bug has already been removed (in 3.8). For my usage, I made a patch in my application. Patrick -----Ursprüngliche Nachricht----- Von: [hidden email] [mailto:[hidden email]] Im Auftrag von David T. Lewis Gesendet: Donnerstag, 6. November 2008 12:25 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] BUG Squeak 3.7 - Number>>printShowingDecimalPlaces: On Wed, Nov 05, 2008 at 07:31:53PM +0100, [hidden email] wrote: > (I sent this message 2.11.2008, but I'm not sure it has been > published. Let's try again.) > > 1.189159413903272e3 printShowingDecimalPlaces: 2 '1189.16' > 1.189159413903272e4 printShowingDecimalPlaces: 2 '11891.59' > 1.189159413903272e5 printShowingDecimalPlaces: 2 '118915.94' > 1.189159413903272e6 printShowingDecimalPlaces: 2 '1.18' BUG !!! Hi Patrick, There are several issues on Mantis (bugs.squeak.org) that relate to #printShowingDecimalPlaces:, one if which must have addressed this bug (it is fixed in Squeak 3.9 and 3.10 at least). If you have follow up issues, it would be good to report them on Mantis. If you are using an older 3.7 image, you may need to locate the relevant patch and apply it your own image. Dave |
In reply to this post by David T. Lewis
David T. Lewis a écrit :
> On Wed, Nov 05, 2008 at 07:31:53PM +0100, [hidden email] wrote: >> (I sent this message 2.11.2008, but I'm not sure it has been published. Let's try again.) >> >> 1.189159413903272e3 printShowingDecimalPlaces: 2 '1189.16' >> 1.189159413903272e4 printShowingDecimalPlaces: 2 '11891.59' >> 1.189159413903272e5 printShowingDecimalPlaces: 2 '118915.94' >> 1.189159413903272e6 printShowingDecimalPlaces: 2 '1.18' BUG !!! > > Hi Patrick, > > There are several issues on Mantis (bugs.squeak.org) that relate > to #printShowingDecimalPlaces:, one if which must have addressed > this bug (it is fixed in Squeak 3.9 and 3.10 at least). If you have > follow up issues, it would be good to report them on Mantis. If you > are using an older 3.7 image, you may need to locate the relevant > patch and apply it your own image. > > Dave > Unfortunately, as you can see in: See http://bugs.squeak.org/view.php?id=7028 printShowingDecimalPlaces: is broken in 3.10 changes harvested in 3.9/3.10 were not fully correct. You need to pick the last changes from: http://bugs.squeak.org/view.php?id=5640 additional tests and fixes for Number>>printShowingDecimalPlaces: Only current Pharo and future Squeak 3.11 should be correct. ------------------------------------------------------------------- I can propose an additional list of fixes for 3.7/3.8 concerning Number conversions and rounding: some might help converting better. http://bugs.squeak.org/view.php?id=3133 [BUG][FIX] Float>>#asIEEE32BitWord and #fromIEEE32Bit: http://bugs.squeak.org/view.php?id=3373 Float asFraction does not handle gradual underflow http://bugs.squeak.org/view.php?id=3504 Float asInteger conversion is inexact... http://bugs.squeak.org/view.php?id=3564 LargeInteger>>asFloat does not honour IEEE rounding mode http://bugs.squeak.org/view.php?id=3568 [FIX] Fraction>>asFloat does not answer nearest floating point number http://bugs.squeak.org/view.php?id=6990 0.0 significandAsInteger is too big http://bugs.squeak.org/view.php?id=7134 Float rounded is inexact ------------------------------------------------------------------- And don't forget, Float are not parsed "exactly" by Number class>>readFrom: because of chained inexact operations. It won't answer the nearest Float to the entered decimal number. Search for SqNumberParser on mantis for how to do it. There is a message for printing Float "exactly" that works quite well. I am on a computer without a mouse, so checking its name in squeak is not an option: i let you do it. Nicolas |
Free forum by Nabble | Edit this page |