Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!newsfeed.pitt.edu!uunet!bcstec!bronte!bronte!jamesr
From: jamesr@bronte.network-a (James Rubert,public)
Subject: Re: Dividing problem
Message-ID: <1995Feb6.190424.14507@grace.rt.cs.boeing.com>
Sender: usenet@grace.rt.cs.boeing.com (For news)
Reply-To: jamesr@bronte.network-a
Organization: Boeing Computer Services
References: <9501271611.AA15019@wcdev718.dukepower.com>
Date: Mon, 6 Feb 1995 19:04:24 GMT
Lines: 53

In article AA15019@wcdev718.dukepower.com, "<P. Sundar Rajan>" <srp431c@CRUSHER.DUKEPOWER.COM> () writes:
> >
> > Is anyone to help me for that stupid problem
> >
> > (0.0333/333) = 1e-4 always responds false????
> >
> > Representation of float is anadequate ...
> >
> > Have you any solutions???
> >
> > Thanks
> >
> Iam facing the same stupid problem.
> For this matter, I ran the following tests in 1e-6 to 1e-3 range.
> The results were arbitrary!!! I have no clue either.
> 
> Results in 1e-4 range: (arbitrary)
> 
> (0.0111/111.0)  = 1.0e-4  true
> (0.0222/222.0)  = 1.0e-4  true
> (0.0333/333.0)  = 1.0e-4  false  (!!!)
> (0.0444/444.0)  = 1.0e-4  true
> (0.0555/555.0)  = 1.0e-4  false  (!!!)
> (0.0666/666.0)  = 1.0e-4  false  (!!!)
> (0.0777/777.0)  = 1.0e-4  true
> (0.0888/888.0)  = 1.0e-4  true
> (0.0999/999.0)  = 1.0e-4  true
> 
> Results in 1e-5 range: (consistently wrong)
> 
> (0.01111/1111.0) = 1.0e-5 false
> (0.02222/2222.0) = 1.0e-5 false
> (0.03333/3333.0) = 1.0e-5 false
> (0.04444/4444.0) = 1.0e-5 false
> (0.05555/5555.0) = 1.0e-5 false
> (0.06666/6666.0) = 1.0e-5 false
> (0.07777/7777.0) = 1.0e-5 false
> (0.08888/8888.0) = 1.0e-5 false
> (0.09999/9999.0) = 1.0e-5 false
> 
> Results in 1e-3 and 1e-6 were correct.
> Any clues why results are arbitrary or consistently wrong!
> Thanks in advance.
> 
> Sundar


By chance are you using a Pentium based machine ;-)


Jim 
jamesr@atc.boeing.com

