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


Help: OASIS Mailing Lists Help | MarkMail Help

office-comment message

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

Subject: RE: [office-comment] OpenFormula: Excel FLOOR Function


After I had ruminated a few hours on my remark, it occured to me that, as
useful as that identity is (and how thinking about it had me want a DELTA(x)
function too so I could easily tell when a number is too large to precisely
represent exact integers, among other things), it is definitely not useful
in an interchange situation, as you wisely point out.

In fact, a translation from OpenFormula that substituted -CEILING(-x) for
FLOOR(x) in going to OOXML (assuming there's really no FLOOR there) would
commit the venial sin of not preserving a formula as written as closely as
possible.  And of course, if that formula came back into OpenFormula, it is
not OK to translate -CEILING(-x) to FLOOR(x), for the same reason.  

This did leave me wondering about the general problem of round-tripping in
these cases, and how having formulas crammed into attribute values makes it
hard to provide mark-up that has a round-trip-supporting preservation
function (sort of like alternate renditions), along with a related problem,
disambiguating user-defined functions.

So, I agree with you, although it seemed to trigger some fruitful puzzling
on my part!

 - Dennis

PS: The nice thing about FLOOR(x) = -CEILING(-x) is that it is surely an
impeccable substitution, whereas computation of TAN(x) as SIN(x)/COS(x) has
a number of liabilities, though not so bad as power(x, n) = EXP(n*LOG(x)).
And I take your point.

-----Original Message-----
From: David A. Wheeler [mailto:dwheeler@dwheeler.com] 
Sent: Friday, June 13, 2008 09:07
To: office-comment@lists.oasis-open.org
Cc: dennis.hamilton@acm.org
Subject: Re: [office-comment] OpenFormula: Excel FLOOR Function

Dennis E. Hamilton:
> FLOOR(x) = -CEILING(-x)

True. What I _meant_ was that there was no built-in operation
to do the mathematical FLOOR operation. After all,

TAN(x) = SIN(x)/COS(x)

But people would rightly object if we only had SIN and COS.

We should try to make it _easy_ for users to express
common cases, using the functions they prefer to use.

--- David A. Wheeler

[ ... ]

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