On 1/4/2011 7:11 PM, Simon Slavin wrote: > > On 5 Jan 2011, at 12:03am, Igor Tandetnik wrote: > >> On 1/4/2011 6:56 PM, Jean-Christophe Deschamps wrote: >>> .... and so many settings in IEE hardware/software. I really look >>> forward Intel decimal FP being mainstream, specially in business-likely >>> code like a DB engine. But until such baby finds its way in hardware, >>> I guess we're stuck with this pesky binary thing and slow / imprecise >>> conversions back and forth and 1/3 + 1/3 + 1/3 != 1. >> >> I can't help but wonder how decimal math is supposed to make 1/3 + 1/3 >> + 1/3 better. > > I bet I'm not the only one here old enough to remember FORTRAN and ALGOL > implementations with a 'RATIONAL' math type. It stored a numerator and > denominator for each number, and had absolutely no trouble with evaluating > > 1/4 + 1/6 + 1/12 + 1/3 > > precisely and accurately.
Did it use arbitrary precision integer library? By asking it to evaluate, say, 1/2 + 1/3 + 1/4 + ... + 1/n, I can easily force the library to deal with numbers on the order of n!, which of course will quickly overflow any fixed-size registers. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users