Subject: Relativistic addition of velocities in wxMaxima
From: Stavros Macrakis
Date: Mon, 23 Sep 2013 16:12:40 -0400
I can see that value of re-evaluating all input lines, but in general that
won't give the same result the second time as the first. If you want to
use ctrl-R, maybe the first line of your session should be kill(all). That
doesn't reset everything -- in particular, it doesn't reset explicit global
variables like 'numer' and 'radexpand' and implicit ones like the ordering
of CRE variables -- but it's a start. In particular, it forgets all rewrite
rules.
As for having packages not load twice, I'm not sure I like that as a
general rule. What do I do if I'm actively developing a package and want
to reload it because I've changed some definition?
I do like the idea of changing vect so that load(vect) twice works
properly, though....
-s
On Mon, Sep 23, 2013 at 3:42 PM, Raymond Toy <toy.raymond at gmail.com> wrote:
> >>>>> "Robert" == Robert Dodier <robert.dodier at gmail.com> writes:
>
> Robert> On 2013-09-19, Jon Fleming <jonf at fleming-group.com> wrote:
> >> In wxMaxima I have, after pressing <Ctrl-R>:
> >>
> >> | load(vect);
> >> | u: [-3.84,0,0];
> >> | v: [0,0,3.84];
> >> | c: 299792.458;
> >> | CPsquared(v1, v2) := (v1 . v1)*(v2 . v2) - (v1 . v2)^2;
> >> | addrelativistic(v1, v2) := sqrt(((v2 - v1) . (v2 - v1) -
> CPsquared(v1, v2)/c^2)/(1 - (v2 . v1)^2/c^2)^2);
> >> | tellsimpafter: circular rule attempted.
> >> | -- an error. To debug this try: debugmode(true);
>
> Robert> I gather that ctrl-R tells wxMaxima to reevaluate all cells.
> One of them
> Robert> is load(vect), but 'vect' defines some simplification rules
> and if you
> Robert> load it twice, the second time through you get the error about
> the
> Robert> circular rule. There's certainly no harm in reevaluating the
> other
>
> We should probably fix it so that load(vect) won't load itself again
> if it's already been loaded. Or at least won't redefine simplification
> rules.
>
> Unfortunately, I don't know how to do that.
>
> Ray
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>