To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=75536
User er changed the following:
What |Old value |New value
================================================================================
CC|'er,kpalagin' |'er,fst,kpalagin'
--------------------------------------------------------------------------------
Assigned to|requirements |er
--------------------------------------------------------------------------------
------- Additional comments from [EMAIL PROTECTED] Fri Mar 30 17:28:11 +0000
2007 -------
Romolo,
> The calculation of quotient and remainder should follow their definition in
> the
> following theorem:
Why?
> Given two integers a and d, with |d| ≠ 0
> There exist unique integers q and r such that a = qd + r and 0 ≤ r < |d|,
> where
> |d| denotes the absolute value of d.
Please note that this is a _theorem_. Given ... there are ... that
fulfill the requirement of ...
Nothing more, especially not a definition of a rule of how quotient and
remainder should be calculated generally.
Another theorem is:
If a and d are integers, with d non-zero, then a remainder is an integer
r such that a = qd + r for some integer q, and with 0 ≤ |r| < |d|.
Taking the wording of the theorem you gave I assume it originated from
http://en.wikipedia.org/wiki/Division_algorithm
Please then also have a look at
http://en.wikipedia.org/wiki/Remainder
and especially
http://en.wikipedia.org/wiki/Modulo_operation
The Euclidean definition seems appealing for its regularity, but that's
just not the definition used in the wild. Spreadsheet implementations
usually define the remainder/modulo result to have the same sign as the
divisor. At least Excel, Gnumeric and Calc do.
Anyway, for the examples you gave later
> quotient(-5;10) Openoffice -1, Excel2003 -0, Gnumeric 0
> quotient(5;-10) Openoffice -1, Excel2003 -0, Gnumeric 0
the OOo results are wrong and this has to be corrected.
@fst: please don't assign issues about questionable calculation of
function results to 'requirements'. Either we have to fix things because
we do it wrong, or if changes of definitions are required the OASIS
subcommittee has to agree upon a standard for the ODFF (OpenFormula)
work.
Thanks
Eike
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]