To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=71158


User er changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |STARTED
--------------------------------------------------------------------------------
              OS/Version|Windows XP                |All
--------------------------------------------------------------------------------
                Platform|PC                        |All
--------------------------------------------------------------------------------
        Target milestone|---                       |OOo 2.x
--------------------------------------------------------------------------------




------- Additional comments from [EMAIL PROTECTED] Mon Jan  8 11:50:16 -0800 
2007 -------
Of course a result of zero is never correct except maybe if both
arguments are zero. Note however that the visible zeros of the testcases
in fact are only rounded for the display value, despite the fact that
GCD for non-integers isn't defined.

Strictly spoken GCD(0;0) is undefined because of the infinite number of
common divisors, however, it can be convenient to define GCD(0;0)=0 as
Excel does.

As for the handling of negative arguments I'm undecided. Mathematically
the relation

|a*b| = GCD(a,b) * LCM(a,b)

is given, so a negative result would play well. Some sources define GCD
to be the largest positive integer, but neither that nor the
non-negative argument seem to be a mathematical restriction.

That relationship btw possibly is the reason why the functions were
implemented the way they are, working on non-integers and delivering the
"strange" results; in the testcases, calculating the LCM of the same
numbers and multiplying with the GCD produces the same amount as
multiplying the numbers. However, the algorithm for finding the GCD for
fractional numbers is not appropriate, as can easily be seen with
GCD(1.2;3.6)

GCD_ADD of course should strictly mimic the Excel behavior.

Even though a GCD of rational numbers isn't defined, a LCM of rational
numbers actually may make sense to compute the recurrence of a wave
form. To comply with the relationship given above a GCD should also be
able to handle it. So either enhance the GCD algorithm or change both to
truncate fractional arguments to integers.


---------------------------------------------------------------------
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]

Reply via email to