Grouping by units over add - progress, and a couple questions
Subject: Grouping by units over add - progress, and a couple questions
From: Robert Dodier
Date: Fri, 20 May 2005 08:48:17 -0700 (PDT)
--- C Y wrote:
> what units does rho*log(rho) have? [...]
> What, for example, does sin(1/s) mean? Anything?
> Should this return an error?
Maxima should take a light-handed approach here -- instead
of reporting an error, the result of sin(1/s) should be sin(1/s).
This is consistent with the general strategy of returning an
unevaluated expression to signify "I don't know what to do
with this." It leaves open the opportunity for the user to
figure out some way of handling it.
> What do I do with 'integrate(a*kg/s+b*kg/s,t)? Simplify
> what's inside integrate, or (my inclination) respect
> the ' symbol and do nothing to it?
Whether the argument of integrate is simplified and/or
evaluated should probably be governed by the usual rules.
It seems like attempting to impose some different order
of simplification and evaluation in the units package is
going to lead to confusion.
Albert Reiner wrote:
> > Also, suppose b = 1/meter. Why should sin(a*b) be prohibited? Do
> > you require the dimensions of a (which would be a length) to be
> > manifest in all calculations?
If a has no declared units, or it is declared as something
other than length, sin(a*b) should yield sin(a*b).
(It shouldn't be an error.) And yes, there should be "units
contagion"; that's part of the point of a units package, right?
There could certainly be a "ignore_units" flag or something.
Cliff again:
> [...] I don't know what sin(1/m) means, so I have no idea
> how to deal with it. Having units suddenly "vanish"
> when they aren't convenient seems like wimping out to me, [...]
Agreed -- it seems that automatically ignoring units is
more or less against the whole point of a units package.
For what it's worth,
Robert Dodier
__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs