2009/7/9 David Goehrig <[email protected]>: > > > On Wed, Jul 8, 2009 at 5:30 PM, Nicolas Cellier > <[email protected]> wrote: >> >> I guess you gonna miss pretty soon those imperfect inexact Float of >> the unreasonnable people. > > Nicolas please read what I wrote: > > If you're defining the default behavior of numbers in the system, the > principle of "thou shall not commit premature optimization" should come into > play. If you're that desperately in need of floating point speed, you're > also probably capable of applying that and other optimization techniques > accordingly, as befits your problem. > > The case of the core drawing engine is a special case. You would optimize > this case specially, knowing full well that it is a critical system loop > that affects the performance of everything else. But turning around and > saying that because this core loop requires optimization, that this > optimization technique should be the default is a total non > sequitur. One special case does not define what the general case should be. > Your arguments sound reasonable to me. But still the're not giving the answer why (13/10) should be equal to 1.3 I can see the only exit, which may meet your (inexperienced users) expectations: - replace the Float binding in SystemDictionary with ScaledDecimal - and rename current Float class to InexactFloat
and deal & live with all consequences of such refactoring.. >When making a fundamental design decision as to what a sane default is, you need to look at what the non-expert using the system will expect. Saying that "you should know IEEE 754 float math" isn't helpful. Skilled professionals > make mistakes with floating point math every day. Telling a child in grammar school that their program doesn't work because they don't understand IEEE 754 math is equally absurd. > Design decisions should not be driven by implementation optimization requirements. Doing so only places the incidental preferences of the system implementors over the needs of those who will use it. > > Dave > > -- > -=-=-=-=-=-=-=-=-=-=- http://blog.dloh.org/ > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
