big float arithmetic & mgrp, also Interval Arithmetic project
Subject: big float arithmetic & mgrp, also Interval Arithmetic project
From: Robert Dodier
Date: Wed, 3 May 2006 00:04:57 -0600
On 5/2/06, Richard Fateman <fateman at cs.berkeley.edu> wrote:
> which reminds me. If anyone wants a project: define an interval as
> interval(a,b). all numbers between a and b on the real line.
> using tellsimp (etc) define all you need.
My attempt at this is the following ...
(xx^ii --> expt_noninterval_interval (xx, ii) (after),
ii^xx --> expt_interval_noninterval (ii, xx) (after),
ii^jj --> expt_interval_interval (ii, jj) (after),
ii*xx --> mult_interval_noninterval (ii, xx) (after),
ii+xx --> add_interval_noninterval (ii, xx) (after))
assuming (intervalp (ii), intervalp (jj), nonintervalp (xx));
With appropriate macros (to expand that into matchdeclare
and tellsimp or tellsimpafter) and function definitions,
this yields stuff like
(interval (a, b) + interval (5, 7))^3;
=> interval ((a + 5)^3, (b + 7)^3)
To get this far, I've been really sloppy about add_interval_noninterval
and so on. I'm assuming the hard part is figuring out which
arithmetic function to call when, and once that's squared away
we can make add_interval_noninterval, etc, as sophisticated
as we want.
> Is anyone keeping a list of projects?
The wish list is
http://maxima.sourceforge.net/wiki/index.php?Design%20Notes
and interval arithmetic is on the list. Feel free to paste any
items you want.
Robert Dodier