[Top][All Lists]

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

[Axiom-developer] Re: address@hidden: Re: [Frink] unit suggestion]

From: C Y
Subject: [Axiom-developer] Re: address@hidden: Re: [Frink] unit suggestion]
Date: Fri, 9 Dec 2005 09:04:12 -0800 (PST)

--- root <address@hidden> wrote:

> CY,
> I'm on the Frink mailing list. Did you see this note?
> In particular, are you aware of the http reference?
> .....<snip>.....
>  By the way, you shouldn't have to do *any* modification of 
> many files containing normal mathematical notation to turn it
> into Frink notation. Frink is designed, more than any other
> language I know, to parse normal mathematical notation and 
> units correctly without any modification.  If you follow, say,
> the SI (the International System of units, the modern
> "metric" system) rules and style conventions (
> ), Frink will 
> usually parse your equations without ambiguity or error.  
> Except where's there's ambiguity in standard mathematical 
> notation.
> .....<snip>.....

I'm not on the Frink list, but I'm familiar with the nist site - it's
actually the primary resource for units information for those who
haven't bought the actual ISO standard or one of the other major
compilations of conversion factors out there.

As to formatting issues, there is actually a TeX package out there
called SIstyle which works off of these standards to properly format
units - I intend to utilize it as part of Axiom's TeX output

>    For a really interesting look into ambiguities in standard
> mathematical notation, here's a really interesting talk by 
> Stephen Wolfram, the main person behind Mathematica:
> Especially read the section called "Computers" to read about
> precedence, ambiguity in normal mathematical notation, and 
> different attempts to get around it.  No, really, read the 
> whole thing.  It's a really great article.  Mathematica and 
> Frink take different tactics for underlying representation, 
> but the problem of ambiguity in normal mathematical notation 
> is the same.  Mathematica breaks normal SI orthography, 
> forcing you to write "Meter" instead of "m" or "meter",
> etc, so Frink's a bit more natural.

There's a problem there, since a computer algebra environment has to
deal with so many possible inputs.  I'll take a look at the article,
but I'm already convinced of the ambiguity inherent in many notations. 
We might be able to eventually allow something like 5[m] as input for
units but that is yet to be seen.  Output is a different matter - Axiom
has some really interesting abilities there, as the available test unit
code already demonstrates.  I don't know about terminal/ASCII output
formatting, but in TeX and similar environments we should be able to do
quite well at providing SI formatting, ambiguity and all :-).  Input,
of course, cannot be ambiguous so the user will just have to come to
terms with it :-/.

One idea, which I'll just throw out, is to have input contexts.  There
are many cases where the same notation is used to mean different things
in different contexts.  So perhaps we could come up with a way for a
user to specify, for a given input, what context they were using. 
E.g., a Unit context would know that 5*m is actually
setUnit(<storagevariable>,meters,Length,5) or something like that. 
Then the only problems that arise would be when one actually has
conflicting syntax conventions in the same expression, but that's a
problem no matter how you shuffle things.

Just an idea.  It might be too cumbersome to actually implement, but if
one wants to do a great deal of work in (say) one scientific field and
not worry about the syntax in other fields, it could be a considerable
help.  And if you had to put it in a different context, well there's
always the underlying translation made before sending it to the CAS
itself, which by definition has to be a unique notation.

Heh - I smell another paper:  Variable Mathematical Syntatical Input
and Output Rules in a Computer Algebra System based on Context
Environments.  I'll have to see if someone has written it already ;-). 
Sounds like the B-sharp idea might be related in some way.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

reply via email to

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