On Wed, Aug 12, 2009 at 7:22 AM, Robert Dodier<robert.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 Sage it will be
>>
>> sage: from units import newton, meter, pound, feet, second
>> sage: a = 4.532*newton/meter^2
>> sage: a.convert(pound*feet/(second^2*feet^2))
>
> Well, while we're doing the Rosetta stone here ...
>
> load (ezunits);
> 4.532 ` N/m^2 `` lbm*foot/(s^2*foot^2);
>  => 3.045884688 ` lbm/(foot*s^2)
>
> Differences:
> (1) separate units from quantities
>  (right & left sides of backtick)
> (2) concise notation
> (3) conventional abbreviations
> (4) conventional capitalization
>
> Robert Dodier

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.  In
fact, the very first thing David Ackerman, who is doing this project,
said to me when thinking about how units would work in Sage, is that
he thought it would be impossibly confusing if N and m and s, etc.,
were units since one is so likely to use single letters as variables.

Of course, in the Sage design, one puts them all in the units
namespace too, which helps.

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to