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





------- Additional comments from [EMAIL PROTECTED] Tue Jan  9 07:39:52 -0800 
2007 -------
Well, actually LCM(0.4;1.2) "sort of" works, it just doesn't give the result one
would expect, which is because it uses the broken GCD method to determine the
value. LCM(0.4;1.2) * GCD(0.4;1.2) gives 0.48 that is correct.

As for negative results if one of the arguments is negative, a GCD always
returns one of the possible factors. Even GCD(12;3) has two solutions, 4 and -4.
Since the "greatest" semantically somehow implies to choose the positive value,
and especially as some sources say to not regard factorization into negative
numbers and some sources say the result is a positive integer (natural number),
I tend to use that.

For the |a*b|=... relationship, most sources omit the absolute value there,
including the http://en.wikipedia.org/wiki/Greatest_common_divisor page.
However, I think that's wrong. Several sources talk of integer values, not
mentioning positive integers nor natural numbers. The German
http://de.wikipedia.org/wiki/Gr%C3%B6%C3%9Fter_gemeinsamer_Teiler page states
the relationship, but what finally convinced me was that the
"Bronstein/Semendjajew" standard book of mathematics does so as well, and also
mentions only integer numbers for arguments, nothing about positive values.

As a conclusion we should allow negative arguments, truncate fractional values
to integer (we might come up with a proper fractional algorithm later as an
addition if someone feels challenged :) and return always positive numbers.

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