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
Note non-unit maxima also does this for non-basic cases:
This is OK
(%i4) 2*(m/s) +3*(m/s) + v1;
5 m
(%o4) v1 + ---
s
but if we get fancy:
(%i5) a*(km/s)+b/6000*(km/s);
b km a km
(%o5) ------ + ----
6000 s s
I think the part of nformat that handles addition can be tweaked to
consolidate cases like the above, if that is the desired behavior.
This shouldn't be difficult if the behavior is similar to what I've
already seen - it's a question of looking at all the args to plus and
recombining the ones with the same units. There might have to be some
other tweaks like this to other nformat options in order to cover all
the possible iterations.
Darn it, I was hoping mtimes would be the only one that needed
tweaking. 3am logic I guess...
CY
--- Eike Welk wrote:
> This looks really nice!
>
> What would it answer if I typed the following in the example session
> that you gave? (Note the missing "^2".)
>
> (%i15) dimension(x0+v0*t+1/2*a*t);
>
> With other words: How efficiently could I check my (lengthy) formulas
>
> for dimensional correctness?
>
> Yours
> Eike.
>
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html