infinity correct maxima



I'm not sure what is implemented, but the following sequence:

x: inf;
x-x; 
could result in zero, because it is the same infinity.
so should (x^2-1)-(x+1)*(x-1).

However,
y:inf;
x-y  should result in undefined.
Getting undefined arithmetic right would be just as important.

Labeling each unique inf with an identifier is a way to do this.

RJF

 

> -----Original Message-----
> From: maxima-bounces at math.utexas.edu 
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Barton Willis
> Sent: Thursday, August 28, 2008 5:39 AM
> To: maxima at math.utexas.edu
> Subject: infinity correct maxima
> 
> 
> Every once in awhile, we talk about making Maxima "infinity correct."
> Among other things, an infinity correct Maxima would do inf - inf -->
> und. I think Raymond even once started an infinity correct Maxima
> branch. My guess is that infinity correct multiplication and
> exponentiation operators would break quite a few limit calculations.
> 
> I think I've pointed things like the following before--one more time:
> Try tracing simplus and evaluate:
> 
>   integrate(1/(x^2*sqrt(x^2-a^2)),x,a,inf);
> 
> Maxima calls simplus 634 times; in the list of calls to simplus,
> you'll see
> 
>   1> (SIMPLUS ((MPLUS) $INF ((MTIMES SIMP) -1 $INF)) 1 T)
>   <1 (SIMPLUS 0)
> 
> Yikes! You'll also see the same sums done a dozen or more times in a
> row.
> 
> I have an *experimental* simplus function that tries to be infinity
> correct. Richard Fateman wrote parts of this code, but the infinity
> correctness is due to me. This code also uses sorting to speed up
> lengthy sums with many distinct terms; for short sums, the
> alternative simplus function is slower (in the test suite, about 98.7%
> of the summands have fewer than eight terms).
> 
> If it's OK with everybody, I'll place this code in a new folder, say
> /share/contrib/altsimp. Last I checked, this code makes it through the
> test suite with three errors. Maybe this code would be a distraction;
> maybe it would be helpful. Algorithmically, simplus is pretty simple.
> 
> Barton
> 
> And by the way, with my infinity correct addition, Maxima calls
> simplus 642 times to evaluate 
> integrate(1/(x^2*sqrt(x^2-a^2)),x,a,inf).
> It still gets the correct value. Because my code is not infinity
> correct for multiplication, some things don't work:
> 
> (%i5) inf - inf;
> (%o5) inf-inf
> 
> Some things do:
> 
> (%i6) inf + minf;
> (%o6) und
> 
> With an infinity correct multiplication, the test suite might
> report many errors.
> 
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>