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

*Subject*: **Re: [office-comment] Error in FLOOR function specification**

*From*:**Andreas J Guelzow <andreas.guelzow@concordia.ab.ca>***To*: office-comment@lists.oasis-open.org*Date*: Fri, 20 Feb 2015 11:05:54 -0700

On 15-02-20 10:39 AM, Dennis E. Hamilton wrote:

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.

Andreas

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.

-- Andreas J Guelzow, PhD FTICA Registrar Professor of Mathematical & Computing Sciences Concordia University College of Alberta

**References**:**Error in FLOOR function specification***From:*Joel <cincodenada@gmail.com>

**RE: [office-comment] Error in FLOOR function specification***From:*"Dennis E. Hamilton" <dennis.hamilton@acm.org>

**RE: [office-comment] Error in FLOOR function specification***From:*cowan@ccil.org

**RE: [office-comment] Error in FLOOR function specification***From:*"Dennis E. Hamilton" <dennis.hamilton@acm.org>

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