Re: Super and Subscripts

Fisher Mark (
Wed, 18 Jan 95 07:03:55 EST

Bert Bos writes in <>:
>Ideal would be a syntax that is easy to format, yet still allowed
>unambigous translation for input to an equation solver. It may require
>that the author insert `invisible parentheses' like <BOX></BOX> to
>make the meaning clear. Wasn't Phil Hallam-Baker working on such a

The `invisible parentheses' idea is similar to what UNIX's EQN
preprocessor does with '{}'. For example, the equation would be
something like this in EQN:

E ~=~ { c sup 2 } m
where we use '{}' to force the superscript 2 to belong to 'c'.

Offhand, I would think that less ambiguity would be caused by a rule
like 'superscripts should be applied to the immediately preceding
`regular` atom' rather than 'superscripts should be applied after all
items within a subexpression have been found' (which I think is the
other logical alternative).

Something relatively hairy (compared to E=mc^2 :)), like the roots
from a quadratic equation:
r , r -b +- sqrt(b^2 - 4ac)
1 2 = ---------------------
would require some kind of grouping mechanism:
r<sub>1</sub>,r<sub>2</sub> =
<numerator>-b +- <sqrt>b<sup>2</sup> - 4ac</sqrt></numerator>
just to keep it all straight (IMHO). Apologies if I have tag names
wrong; I don't have the math proposal handy.
Mark Fisher Thomson Consumer Electronics Indianapolis, IN

"Just as you should not underestimate the bandwidth of a station wagon
traveling 65 mph filled with 8mm tapes, you should not overestimate
the bandwidth of FTP by mail."