Re: [Maxima-bugs] [ maxima-Bugs-1407378 ] polarform returns a rectangular expression for float argumen
Subject: Re: [Maxima-bugs] [ maxima-Bugs-1407378 ] polarform returns a rectangular expression for float argumen
From: Barton Willis
Date: Thu, 19 Jan 2006 17:27:25 -0600
-----Robert Dodier wrote: -----
>i'm not sure i know what you mean by object
>oriented here.
I'd like for the function simplus, for example, to look
at the property list of non-atom addends to see if there
was a specific function for adding such objects. If there
was such a function, simplus would ship the addition
off to that function. That way simplus could be extended
without hacking the simplus code. That's all. I don't think
simplus, simptimes, and ... allow this.
>maybe you can give some examples of operations on
>real_interval (for example) which can't be
>handled in the current tellsimpafter implementation.
Tell me if I need to study the documentation, but I often
run into trouble:
(%i1) matchdeclare(x, lambda([s], mapatom(s) or op(s) # 'interval))$
(%i2) matchdeclare([a,b,c,d],true)$
The warning scares me:
(%i3) tellsimp(x * interval(a,b), interval(min(x*a,x*b), max(x*a,x*b)))$
Warning: Putting rules on '+' or '*' is inefficient, and may not work.
(%i4) tellsimp(interval(a,b) * interval(c,d),
interval(min(a*c,a*d,b*c,b*d), max(
a*c,a*d,b*c,b*d)))$
OK:
(%i5) interval(5,6) * interval(9,12);
(%o5) interval(45,72)
Yeechs!:
(%i6) interval(5,6) * interval(9,12) * p;
(%o6) interval(5,6)*interval(9,12)*p
OK:
(%i7) interval(5,6) * p;
(%o7) interval(MIN(6*p,5*p),MAX(6*p,5*p))
Maybe this can be done with tellsimp; to me, it seems to painful.
Barton