axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Unit package question - Reply to 1st half


From: William Sit
Subject: Re: [Axiom-developer] Unit package question - Reply to 1st half
Date: Tue, 23 Aug 2005 23:09:58 -0400


C Y wrote:
> Here's one scenario: I start up Axiom and have
> the default system load up in SI units.  I look at my data, and realize
> I'm working on a scale of nanometers.  SI is ideal for most everything
> I'm going to be doing, but I want Length output to be in nm so I don't
> have to visually sort through lots of powers of ten.  In Maxima, I
> could simply say setunits(nm) and from that point on, until I told it
> differently, all my lengths would be converted and rendered in output
> as nanometers.  I would like similar ease of use in Axiom, if it is
> compatible with how Axiom works - I'd rather not have to open up the
> text editor, whip out a new MyUnits domain, and define things
> accordingly - I'd rather that all be hidden.

Actually, we can even do better, without the user doing a setUnitLength(nm), if
the only reason to use nm instead of m is to get rid of annoying powers of 10.
For numerical output (the problem does not arise for symbolic output), the
output coerce routine can sense the magnitude of the value in the unit and shift
the decimal place appropriately and adjusting using a suitable prefix. So one
stays in SI but the output gets rid of the powers of 10.

William




reply via email to

[Prev in Thread] Current Thread [Next in Thread]