Unit package updates



On Wednesday 11 May 2005 15:44, C Y wrote:
> Hmm - I was looking over your emails about Maple, and it looks like
> Maxima exhibits a Maple behavior you didn't like:
>
> (%i18) a*kg/s+z*g/minutes;
>                                z     kg         kg
> (%o18)                      (-----) (--) + (a) (--)
>                              60000   s          s
>
> This should be, if I understand your preferences:
>
>                               z         kg
>                            (----- + a) (--)
>                             60000       s
>

You've got me wrong (or I've maybe changed my mind). The present 
situation may be even better when the formula is not dimensionally 
correct. You see the formula more like you entered it and understand 
faster what has happened.

What I find nice about Maple is that the variable "m" for mass and 
the unit "m" for meter can coexist in the same formula. 
My main problems are that Maple considers most of the expressions that 
I enter to be errornous and refuses to work with these expressions.


Seeing what you can already do, I have some more ideas for 
improvement. I again change some parts of theMaxima session from your 
first mail.

Assigning quantities to variables should also work with units. This is 
more like people think. Additionally non native English speakers (me) 
don't need to figure out how a quantity is correctly called. 

(%i10) assignquantity(t, s);
(%o10)                               %time


I think it would be really nice to also see the units of the variables 
that have quantities assigned. Something like (again missing "^2"):

(%i14) x(t) := x0+v0*t+1/2*a*t;


                                                      1      m
(%o14)                    x(t) := x0 [m] + v0 t [m] + - a t [-]
                                                      2      s

When you substitute a variable by a values it could look like:

(%i14) ev(%, v0=5*m/s);

                                                m        1      m
(%o14)                    x(t) := x0 [m] + 5 t (-) [s] + - a t [-]
                                                s        2      s

The output of "dimension" should maybe be more verbose, so one can see 
more easy what is wrong. Really nice would be like this:

(%i15) dimension(x(t));

                                           /* 1     */ %length
(%o15)             /* x0+v0*t */ %length + /* - a t */ -------
                                           /* 2     */  %time

I focus so much on incorrect formulas, because this is what I have 
most of the time. When everything is correct I can go on and work on 
something else. 

Can your code deal with unevaluated differentials? This would be great 
if it worked, for formulas that contain partial differentials.

(%i21) assignquantity(y(t), %length);
(%o21)                               %length

(%i22) dimension( diff(y(t), t) );

                %length
(%o22)          -------
                %time


To me your code seems to be already very usefull, and quite easy to 
use.



> Darn it, I was hoping mtimes would be the only one that needed
> tweaking.  3am logic I guess...
3 am - I got your mail at 4 pm; where do you live? Japan? Australia?

>
> CY
>

Yours
Eike.