Subj : Re: ratio approximation algorithm To : comp.programming From : Alex Fraser Date : Tue Aug 16 2005 12:19 pm "Mark Maglana" wrote in message news:1124181130.920740.314610@g47g2000cwa.googlegroups.com... > I also got the same response from another mailing list I posted to. A > minor correction though. The method of comparison should probably be > > -t.b.d < b.d.x - a.c < t.b.d Is the tolerance relative or absolute? If it is absolute, the comparison should be: -t <= bdx - ac <= t If it is relative, then I think you need: -bdtx <= bdx - ac <= bdtx In either case though, it is probably better to compute the range of acceptable values of ac. > I was wondering if it would be better to have the B*D products computed > in advance and saved inside of a database. If that is appropriate, you may as well compute every possible value of x in advance. Alex .