Unfortunately, the original thread expired, so I have to start a new
one. Here is the original:
http://groups.google.com/group/sage-devel/browse_thread/thread/81884a53ab28212/58ad9417b01ed46f?lnk=gstq=units#58ad9417b01ed46f
and some more ideas are here:
I have received a couple of helpful hints about functional existing
open source packages that treat units in the desired way (ezunits in
maxima and DesignerUnits.com), but I am still after the quick and
dirty way for using the existing units package in sage. The only thing
that really stops me
Yes, this makes sense to me. Wolfram seems to treat the expression and
the units separately, which makes sense. In your example, any omitted
value is seen as 1, so the result is perfectly correct. The expression
is evaluated and the units are added after it, but they don't cancel
out by
EDIT: Nooo, I don't want a behaviour like in Wolfram Alpha. Check this
out:
http://www.wolframalpha.com/input/?i=%28calorie%2Fcentimeter^2%2F+minute%29%2F%281kelvin-2kelvin%29
By inserting numbers that lead to a negative denominator, suddenly I
got units of time^-3! Maybe it's trickier than I
no it's not trickier then you thought. That is just one of the outputs,
wolfram alpha tries to convert units in what it calls basic units (I guess
they have chosen an independend subset of units so that all others can be
expressed in them). There are also other outputs which make more sense.
I don't think there is an easy way.
It seems that in Mathematica division by zero does not return an
error, simply evaluates to infinity (http://www.wolframalpha.com/
input/?i=1%2F0), which only makes sense if you are using the limit
definition of equality.
So essentially, the way to fix this in
Ah, yes, thanks. Didn't realise.
On Aug 3, 11:08 am, Maarten Derickx m.derickx.stud...@gmail.com
wrote:
no it's not trickier then you thought. That is just one of the outputs,
wolfram alpha tries to convert units in what it calls basic units (I guess
they have chosen an independend subset of
The division by zero is not the issue here, but the disappearance of
the units when two variables with the same units are subtracted from
each other. Wolfram gives 0 K for (kelvin - kelvin):
http://www.wolframalpha.com/input/?i=%28kelvin+-+kelvin%29
Sage would simply give 0 without any units, so
I don't really see this as a bug. Units are treated as variables, so
it makes sense. Are you suggesting that 0 * kelvin should be left
unevaluated, and then not give an error when it is the denominator?
On Aug 2, 7:49 am, Stan Schymanski schym...@gmail.com wrote:
Dear all,
This is a bug-report
It seems WolframAlpha evaluates the limit of the expression:
http://www.wolframalpha.com/input/?i=%28calorie%2Fcentimeter%5E2%2F+minute%29%2F%28kelvin-kelvin%29.
On Aug 2, 12:21 pm, Eviatar eviatarb...@gmail.com wrote:
I don't really see this as a bug. Units are treated as variables, so
it
I have now put the most recent version of my code online. It would be
great if people could look it over and tell me whether they think it
could be an official Sage package, or what changes I'd need to
implement to get it there.
The code is at
Hi all,
I just wanted to add that I wrote a wiki page some time ago about this
topic:
http://wiki.sagemath.org/Unit%20of%20Measurement
It was mainly about previously existing packages, but I still think
there are some valuable information there.
My other comment is that, my ideal units
On Tue, Aug 11, 2009 at 03:29:29PM -0700, William Stein wrote:
Hi,
I just wanted to let people know that David Ackerman -- a UW student who
took my course on Sage last quarter -- is working (funded by NSF) on
creating a units package for Sage right _now_. If anybody has any
William Stein wrote:
On Thu, Aug 13, 2009 at 1:55 PM, Peter
Jeremypeterjer...@optushome.com.au wrote:
On 2009-Aug-11 15:29:29 -0700, William Stein wst...@gmail.com wrote:
I just wanted to let people know that David Ackerman -- a UW student who
took my course on Sage last quarter -- is
On Fri, Aug 14, 2009 at 2:27 AM, Dr. David
Kirkbydavid.kir...@onetel.net wrote:
William Stein wrote:
On Thu, Aug 13, 2009 at 1:55 PM, Peter
Jeremypeterjer...@optushome.com.au wrote:
On 2009-Aug-11 15:29:29 -0700, William Stein wst...@gmail.com wrote:
I just wanted to let people know that
The docu looks great, but I still like Robert Dodier's proposal of
separating units from quantities, as done in ezunits. It is hard enough
to remember all the internal functions and constants that should not be
over-written by variable definitions (e.g. var('lambda')). If the unit
As a physical scientists I am definitely excited about this. I think
the basic plans are sound.
I presently do units as symbolic variable defined in terms of a list
of standard SI units. I also define a list of physical constants with
units. This works quite well, but as mentioned by others
Jonathan wrote:
As a physical scientists I am definitely excited about this. I think
the basic plans are sound.
I presently do units as symbolic variable defined in terms of a list
of standard SI units. I also define a list of physical constants with
units. This works quite well, but as
Jonathan wrote:
To give people an idea how a working physical scientist uses this, I
include a section of the function I use to set up my calculations with
units. One problem with this implementation is that it does not
account the limited number of significant figures in most of the
On Aug 13, 12:01 pm, Dr. David Kirkby david.kir...@onetel.net
wrote:
Jonathan wrote:
As a physical scientists I am definitely excited about this. I think
the basic plans are sound.
I presently do units as symbolic variable defined in terms of a list
of standard SI units. I also
On Aug 13, 12:37 pm, Jason Grout jason-s...@creativetrax.com wrote:
Could the units package could use standard Sage interval arithmetic in
order to automatically propagate errors? Of course, larger errors could
be propagated too, if the numbers were specified as Sage interval objects.
Jonathan wrote:
On Aug 13, 12:01 pm, Dr. David Kirkby david.kir...@onetel.net
wrote:
Jonathan wrote:
As a physical scientists I am definitely excited about this. I think
the basic plans are sound.
I presently do units as symbolic variable defined in terms of a list
of standard SI
On 2009-Aug-11 15:29:29 -0700, William Stein wst...@gmail.com wrote:
I just wanted to let people know that David Ackerman -- a UW student who
took my course on Sage last quarter -- is working (funded by NSF) on
creating a units package for Sage right _now_.
Since no-one else has mentioned it, I
On Thu, Aug 13, 2009 at 1:55 PM, Peter
Jeremypeterjer...@optushome.com.au wrote:
On 2009-Aug-11 15:29:29 -0700, William Stein wst...@gmail.com wrote:
I just wanted to let people know that David Ackerman -- a UW student who
took my course on Sage last quarter -- is working (funded by NSF) on
On Aug 13, 2:11 pm, Dr. David Kirkby david.kir...@onetel.net
wrote:
Jonathan wrote:
On Aug 13, 12:01 pm, Dr. David Kirkby david.kir...@onetel.net
wrote:
Jonathan wrote:
As a physical scientists I am definitely excited about this. I think
the basic plans are sound.
I presently do
William Stein wrote:
Hi,
I just wanted to let people know that David Ackerman -- a UW student who
took my course on Sage last quarter -- is working (funded by NSF) on
creating a units package for Sage right _now_. If anybody has any
pseudo-sage code that involves units that they wished
On Tue, Aug 11, 2009 at 11:30 PM, Jason
Groutjason-s...@creativetrax.com wrote:
William Stein wrote:
Hi,
I just wanted to let people know that David Ackerman -- a UW student who
took my course on Sage last quarter -- is working (funded by NSF) on
creating a units package for Sage right
William Stein wrote:
On Tue, Aug 11, 2009 at 11:30 PM, Jason
Groutjason-s...@creativetrax.com wrote:
William Stein wrote:
Hi,
I just wanted to let people know that David Ackerman -- a UW student who
took my course on Sage last quarter -- is working (funded by NSF) on
creating a units
William Stein wrote:
On Tue, Aug 11, 2009 at 11:30 PM, Jason
Groutjason-s...@creativetrax.com wrote:
William Stein wrote:
Hi,
I just wanted to let people know that David Ackerman -- a UW student who
took my course on Sage last quarter -- is working (funded by NSF) on
creating a units
On Wed, Aug 12, 2009 at 5:04 PM, Jason Groutjason-s...@creativetrax.com wrote:
William Stein wrote:
On Tue, Aug 11, 2009 at 11:30 PM, Jason
Groutjason-s...@creativetrax.com wrote:
William Stein wrote:
Hi,
I just wanted to let people know that David Ackerman -- a UW student who
took my
On Wed, Aug 12, 2009 at 8:44 AM, William Steinwst...@gmail.com wrote:
On Tue, Aug 11, 2009 at 11:30 PM, Jason
Groutjason-s...@creativetrax.com wrote:
William Stein wrote:
Hi,
I just wanted to let people know that David Ackerman -- a UW student who
took my course on Sage last quarter --
On Wed, Aug 12, 2009 at 12:02 AM, Jason
Groutjason-s...@creativetrax.com wrote:
William Stein wrote:
On Tue, Aug 11, 2009 at 11:30 PM, Jason
Groutjason-s...@creativetrax.com wrote:
William Stein wrote:
Hi,
I just wanted to let people know that David Ackerman -- a UW student who
took my
On Wed, Aug 12, 2009 at 12:11 AM, Fredrik
Johanssonfredrik.johans...@gmail.com wrote:
On Wed, Aug 12, 2009 at 8:44 AM, William Steinwst...@gmail.com wrote:
On Tue, Aug 11, 2009 at 11:30 PM, Jason
Groutjason-s...@creativetrax.com wrote:
William Stein wrote:
Hi,
I just wanted to let
On Wed, Aug 12, 2009 at 9:19 AM, William Steinwst...@gmail.com wrote:
On Wed, Aug 12, 2009 at 12:11 AM, Fredrik
Johanssonfredrik.johans...@gmail.com wrote:
On Wed, Aug 12, 2009 at 8:44 AM, William Steinwst...@gmail.com wrote:
On Tue, Aug 11, 2009 at 11:30 PM, Jason
Converting of units is one useful function, but I'd also like a
possibility to perform simple unit checks on functions. For example, if
one gets a nice equation for the total energy of a system after some
symbolic acrobatics, one would like to know whether the units of this
equation are still
Given some product of units, it can be desirable to find a nicest way
of expressing it, where nicest can mean least total degree or that
certain units are preferred or something else. This is an integer
linear programming problem, and a while ago I fell over this email by
Daniel Lichtblau (of
William Stein wrote:
Maple example is:
convert(4.532, 'units', 'N'/'m'^2, 'lb''ft'/('s'^2'ft'^2))
In Mathematica it would be basically:
Convert[4.532*Newton/Meter^2, Pound * Feet/(Second^2 * Feet^2)]
and in Sage it will be
sage: from units import newton, meter, pound, feet, second
On Wed, Aug 12, 2009 at 7:22 AM, Robert Dodierrobert.dod...@gmail.com wrote:
William Stein wrote:
Maple example is:
convert(4.532, 'units', 'N'/'m'^2, 'lb''ft'/('s'^2'ft'^2))
In Mathematica it would be basically:
Convert[4.532*Newton/Meter^2, Pound * Feet/(Second^2 * Feet^2)]
and in
On Wed, Aug 12, 2009 at 12:53 AM, Fredrik
Johanssonfredrik.johans...@gmail.com wrote:
On Wed, Aug 12, 2009 at 9:19 AM, William Steinwst...@gmail.com wrote:
On Wed, Aug 12, 2009 at 12:11 AM, Fredrik
Johanssonfredrik.johans...@gmail.com wrote:
On Wed, Aug 12, 2009 at 8:44 AM, William
William Stein wrote:
suggested doing almost precisely what Robert Dodier keeps telling us
to do, which is make the different units just be symbolic variables,
Well, in addition to implementing units as symbols, it greatly
simplifies
the whole business to keep the units separate from the
I have in fact been working on a units package for Sage this summer,
based on the DimPy package for Python and am now nearing the end of my
project.
I wasn't expecting to be putting things online for another week or
two, but I've put some preliminary documentation and the current
version of the
William Stein wrote:
We will just do whatever Mathematica does, unless somebody can come up
with a good argument while the Mathematica design is nonoptimal.
Hmm. I wonder what it would take to talk you out of it.
I claim that you're better off copying ezunits instead.
Try demo(ezunits); in a
On Wed, Aug 12, 2009 at 7:56 AM, Robert Dodierrobert.dod...@gmail.com wrote:
William Stein wrote:
suggested doing almost precisely what Robert Dodier keeps telling us
to do, which is make the different units just be symbolic variables,
Well, in addition to implementing units as symbols, it
William Stein wrote:
Mathematica's design spells out the units instead of using the
conventional abbreviations. I think that makes a lot more sense for
Sage as well, since it's much more explicit, and it is very easy to
confuse say N (for Newton's) with say N for numerical_approx.
Agreed.
William Stein wrote:
On Wed, Aug 12, 2009 at 7:56 AM, Robert Dodierrobert.dod...@gmail.com wrote:
I think it's fairly important to keep the names of things close
to what people would scribble on a piece of paper.
Unconventional capitalization and having to write out every
name is going to
On Wed, Aug 12, 2009 at 8:03 AM, M. Backensm.back...@googlemail.com wrote:
I have in fact been working on a units package for Sage this summer,
based on the DimPy package for Python and am now nearing the end of my
project.
I wasn't expecting to be putting things online for another week or
Maybe another feature would be to check if arithmetic of units is
compatible, so that you'd get an error when you try to add temperature
to length, for example. I got this idea from a tutorial of the c++
boost library at
On Wed, Aug 12, 2009 at 11:44 AM, javier wrote:
...
This is definitely not my field of expertise, but how is this working
with units thing any different from working in a (Laurent) polynomial
ring?
...
Maybe I misunderstood something, but why to start from scratch when
there is already so
On Aug 12, 4:14 pm, Robert Dodier robert.dod...@gmail.com wrote:
Agreed. That's a good argument for separating units from quantities
in an expression. Then you can tell without ambiguity which symbols
are supposed to be units.
This is definitely not my field of expertise, but how is this
On Aug 12, 4:59 pm, Robert m...@rschwarz.net wrote:
Maybe another feature would be to check if arithmetic of units is
compatible, so that you'd get an error when you try to add temperature
to length, for example. I got this idea from a tutorial of the c++
boost library
On Aug 11, 4:29 pm, William Stein wst...@gmail.com wrote:
I just wanted to let people know that David Ackerman -- a UW student who
took my course on Sage last quarter -- is working (funded by NSF) on
creating a units package for Sage right _now_. If anybody has any
pseudo-sage code that
William Stein wrote:
Since you've clearly been thinking of this from a developer's perspective,
and maybe even spending a lot of time writing code, is there any
chance you could just dump some of your design thoughts in an
email here?
I'll try to come up with some coherent description post
On Jul 20, 1:52 pm, William Stein [EMAIL PROTECTED] wrote:
(1) Are the list of all units one uses pretty standard? Is there
a table, say in Wikipedia, with pretty much all of them? Or do
people make up new units in the course of their work or research?
For just day-to-day unit conversion,
Tim Lahey wrote:
I've used the Maple units package and it works fairly well for most
of the calculations I've done with it. It's an add-on package but is
still useful enough to handle most things I've thrown at it. The biggest
problem I've had is the appropriation of symbols for use in units
This is done very often in physics; without this feature I largely
consider any units system useless.
On Mon, Jul 21, 2008 at 7:06 PM, Carl Witty [EMAIL PROTECTED] wrote:
On Jul 20, 1:52 pm, William Stein [EMAIL PROTECTED] wrote:
(1) Are the list of all units one uses pretty standard? Is
On Sun, Jul 20, 2008 at 8:36 PM, Robert Dodier [EMAIL PROTECTED] wrote:
William Stein wrote:
The justification for ConvertAll would be exactly the justification for us to
*not* use it in Sage, i.e., for Sage unit conversion we would surely want
something that works well in the context of
On Jul 20, 2008, at 9:19 PM, Robert Dodier wrote:
William Stein wrote:
(3) Does Maxima, Maple, Mathematica, Matlab or Axiom do anything
particularly cool, surprising or clever involving units?
I have looked around to see what Maple and Mathematica have in
the way of units, but from what
On Sun, Jul 20, 2008 at 11:14 PM, root [EMAIL PROTECTED] wrote:
I have looked around to see what Maple and Mathematica have in
the way of units, but from what I have seen, there is nothing very
exciting. Which is OK --- something boring which just works right
would be very useful.
Frink is the
58 matches
Mail list logo