Units 0.5 (unit.mac) evaluates quoted symbols to their bound values.



Hello All,

With regards to available unit packages for Maxima, does anybody know  
of alternatives to both the included "units" package and the  
"ezunits" package? Both of these packages have specific issues which  
i find unpleasant and I am wondering if a suitable replacement (or  
fix) exists.

The problem with "units" which i am running into is that quoted  
variables are evaluated to their bound value, rather than to their  
symbol as expected. This is demonstrated below:

Before doing load("unit")

> (%i1) a;
> (%o1) 				       a
> (%i2) a: 5;
> (%o2) 				       5
> (%i3) 'a;
> (%o3) 				       a
> (%i4) load("unit");
> ..... snip ......
> Done.
> (%o4)  /usr/local/maxima/share/maxima/5.12.0/share/contrib/unit/ 
> unit.mac
> (%i5) a;
> (%o5) 				       5
> (%i6) 'a;
> (%o6) 				       5

(Notice how   'a   evaluates to 5 after loading unit.mac. but not  
before)

  Obviously this is not desired when attempting to do purely symbolic  
math in cases where the variable may be bound. Also, no units are  
even present so it is not a matter of the units themselves, rather i  
suspect the problem lies with handling of mquoted symbols in the pre- 
eval and post-eval functions which unit.mac registers. If anyone  
knows how to fix this i would be very thankful.

Ideally, I would like to find a unit system which supports printing  
expressions with the most specific unit (and therefore the smallest  
quantity >= 1)... i.e. 3000 meters => 3 kilometers,  or 0.75 meters  
=> 75 centimeters, etc., without reducing everything to a set of base  
units, however this is a more aesthetic issue than the above issue.

Thank you,
Benjamin Ullian