Relativistic addition of velocities in wxMaxima



Hi,
in any case, I don't understand why Jon is loading package "vect" since 
he is not using it at all. He should just remove the first statement 
(load(vect);) and his script will work fine in command-line and wxmaxima.
Regards,
Jaime


On 23-09-2013 20:12, Robert Dodier wrote:
> 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);
> I gather that ctrl-R tells wxMaxima to reevaluate all cells. One of them
> is load(vect), but 'vect' defines some simplification rules and if you
> load it twice, the second time through you get the error about the
> circular rule. There's certainly no harm in reevaluating the other
> cells -- maybe you can put everything but load(vect) into a script,
> then execute load(vect) once, then batch(yourscript) multiple times.
> Just guessing, I don't know what you need to accomplish.
>