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] Error in FLOOR function specification

Please read the definition I gave for classical floor one more time.  The result is never greater than the given argument.  For ceiling, the result is never less than the given argument.

And I agree, with the significance parameter, floor(53,5) is 50 (i.e., the greatest integer multiple of 5 not greater than 53).  Likewise, floor(-53,5) is -55.

Note that I did not ever use toward or away from zero in my statement of the classical condition, but pointed out how those statements could line up.  Remember, the away from zero statement in OpenFormula is when x < 0 for FLOOR(x,s).

I agree that the elaborations in the OpenFormula specification can be confusing.  It would be far better to stick with a mathematical definition avoiding all that operational business about stripping and restoring "-" signs.  A couple of careful examples would demonstrate to people that they need to pay careful attention to the basic rule, which is very clean.  And of course, it is even more painful to introduce "rounding" as explanatory in this context.  FLOOR and CEILING are very simple, in all of their forms, and there is no need to get weird about how to handle negative arguments at all, so long as the implementation gets it right.

 - Dennis

-----Original Message-----
From: cowan@ccil.org [mailto:cowan@ccil.org] 
Sent: Friday, February 20, 2015 08:28
To: dennis.hamilton@acm.org
Cc: office-comment@lists.oasis-open.org
Subject: RE: [office-comment] Error in FLOOR function specification

Dennis Hamilton scripsit:

> Let's simplify this as it applies to having integer results:

Your argument is impeccable where the significance is not present.
But where it is present, if the "away from zero" were correct,
then floor(53,5) would be 55, whereas in fact it is 50.  So
"away from zero" is incorrect, and it should be changed to
"toward zero", as Joel says.

Alternatively, it would also be correct to say "toward negative infinity"
in both cases, since the value being rounded, being an absolute value, is
in fact always positive.

John Cowan          http://www.ccil.org/~cowan        cowan@ccil.org
At times of peril or dubitation,
Perform swift circular ambulation,
With loud and high-pitched ululation.

This publicly archived list offers a means to provide input to the
OASIS Open Document Format for Office Applications (OpenDocument) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: office-comment-subscribe@lists.oasis-open.org
Unsubscribe: office-comment-unsubscribe@lists.oasis-open.org
List help: office-comment-help@lists.oasis-open.org
List archive: http://lists.oasis-open.org/archives/office-comment/
Feedback License: http://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
Committee: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office
Join OASIS: http://www.oasis-open.org/join/

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