Subject: Maxima gives incorrect results with ceiling
From: Stavros Macrakis
Date: Tue, 11 Dec 2007 08:31:36 -0500
Calculate in interval arithmetic. If relation is true for all elements
of. Interval, return result. If not, increase precision and try again.
Repeat until you get a result or give up.
Of course, this doesn't always converge. In particular, when the exact
result is at the border between two relation values, it will almost
never converge. E.g. Is(0.0 == 0.0) or floor(1.0), where 1.0
represents some approximate calculation whose exact value would be 1.
Floor(0.0^2), on the other hand, will converge. This may of course be
surprising to na?ve users, but if they want approximate results, they
can always use float/bfloat.
-s
On 12/11/07, Robert Dodier <robert.dodier at gmail.com> wrote:
> On 12/7/07, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
>
> > As I said, Maxima uses bigfloats *internally* to calculate
> > ceiling/floor. Unfortunately, the current method of using bigfloats is
> > not conservative enough to avoid error in some cases. The right way to
> > handle this would be interval arithmetic, but no one has coded that up
> > yet.
>
> Can you summarize the approach using interval arithmetic?
> I will take a look at it.
>
> Robert
>