why not round it before comparing it ? looks like an easy enough problem to fix . I would expect that to be equal.
On Fri, Jul 11, 2014 at 5:18 PM, Yuriy Tymchuk <[email protected]> wrote: > That’s why mathematics and programming are two different things… > > > On 11 Jul 2014, at 16:08, Esteban A. Maringolo <[email protected]> > wrote: > > > Usually comparing against floats is not as deterministic as you would > > expect. And in other dialects you use #equals: instead of #= > > > > But in Pharo there is no #equals: and instead there is a #closeTo:, > > but #closeTo: has an arbitrary decimal precision, more than enough for > > commong arithmetic. > > > > Regards! > > > > Esteban A. Maringolo > > > > > > 2014-07-11 10:59 GMT-03:00 Goubier Thierry <[email protected]>: > >> :) > >> > >> in Smalltalk, the division of two integers is a fraction, not a float. > >> > >> i.e. 1/5 is 1/5. > >> > >> Thierry > >> > >> Le 11/07/2014 15:53, Natalia Tymchuk a écrit : > >>> > >>> Hello. > >>> I found interesting thing: > >>> Why it is like this? > >>> > >>> Best regards, > >>> Natalia > >>> > >> > >> -- > >> Thierry Goubier > >> CEA list > >> Laboratoire des Fondations des Systèmes Temps Réel Embarqués > >> 91191 Gif sur Yvette Cedex > >> France > >> Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95 > >> > > > > >
