OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [office-formula] Decimal point in ISO specifications


"David A. Wheeler" <dwheeler@dwheeler.com> wrote on 08/31/2009 10:55:27 
PM:

> 
> Is this mandatory?  If it is, then we'll need to comply.
> 

yes, that is my understanding.

> If so, it's a little unfortunate, because it creates a nasty and 
> subtle inconsistency: Syntactically, we MUST use "." and MUST NOT 
> use "," for the decimal point in the actual language being 
> specified, so any text that mentions examples (other than the test 
> cases) will need to continue to use "." and MUST NOT use ",".  It 
> may be difficult to be consistently inconsistent :-).  Obviously, 
> this is possible; Ada, C, C++, and many other internationally-
> standardized languages, also use "." (and not ",") as the decimal 
> point.  Maybe we ought to make a statement up front about this, so 
> that people won't "help" us by changing "." to "," (or the other 
> way) in the wrong places... suggested wording welcome.
> 

The vast majority of the examples, in particular the ones for the 
spreadsheet functions, will be stripped from the specification.  So we 
should not bother changing those numbers. 

As for the lexical representation of numbers in an OpenFormula expression, 
we are able to define this as we wish.

> > Another point we are violating on occasion is:
> > 
> > 6.6.8.4 For clarity, the symbol X [multiplication sign]  rather than a 

> > point shall be used to indicate multiplication of numbers and 
numerical 
> > values.
> 
> Eek.  In many fonts, X [multiplication sign] looks like X the 
> letter.  How can we make sure that the multiplication symbol (where 
> used) isn't confused with something else?  Obviously, in many cases 
> we can just leave values adjacent like "a x" or "(5)(2)".
> 

The character we want is U+00D7 'MULTIPLICATION SIGN', which appears to be 
stuck arbitrarily in the Latin-1 range between 'LATIN CAPITAL LETTER O 
WITH DIAERESIS' and 'LATIN CAPITAL LETTER O WITH STROKE'.

I don't see is using 'x' for multiplication much, but I do see us using 
'*', which is fine when this is from defining a function in terms of our 
own expression syntax.  But there are a few cases where we probably should 
be more explicit in this.  For example, 6.11.29 NPER() says:

"PV = - Fv - (Payment * Nper)
If rate is non-zero, then NPER solves this equation:
Pv*(1+Rate)^Nper + Payment * (1 + Rate*PaymentType) *
 ( (1+Rate)^Nper -1)/Rate + Fv = 0"
So this looks like OpenFormula syntax.  Fine.  But then the next paragraph 
starts using subscripts rather than '^' for exponentiation.  We need to be 
careful, since we seem to have several ways of defining mathematical 
operations:
MathML
OpenFormula syntax
nondescript infix notation, of various flavors
These are not all equivalent, due to differences in the way we treat 
errors, and even some oddness in the way spreadsheet expressions treat 
order of operations.  Because of these quirks, we really need to be 
explicit as to what rules govern the interpretation of any given notation 
in the specification.  It would be most excellent, I believe, if we could 
limit ourselves to using only two notations:  OpenFormula expressions and 
MathML.
-Rob



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]