From: jmichel@...3.institut.math.jussieu.fr (Jean Michel) Date: 2001-07-30T04:09:56+09:00 Subject: [ruby-talk:18755] Re: Numbers classes.. Rational number? [was: Ruby as opposed to Python?] In article <3b645247$0$51737$edfadb0f@dspool01.news.tele.dk>, MikkelFJ wrote: > >A different pretty cool number class is interval arithmetic. >Given the topic of the discussion I thought I'd mention it. >Interval arithmetic is not just a gimmick. It is possible to do exact >calculations and reason about the accuracy of the result. Unfortunately, interval arithmetic is a nice idea which does not work in practice, as you will discover asking anybody who has looked hard at it (usually in order to try to make provably correct numerical computations). The problem is that interval arithmetic, while trying to guarantee error bounds, is *much* too pessimistic. The actual errors grow exponentially less than the errors predicted by the interval arithmetic, because in practice errors do not have all the same sign thus tend to cancel out. As a result most computations, even trivial ones, become impossible with interval arithmetic, requiring huge initial precision to get any significant digits at the end. Best regards, Jean MICHEL