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] Wed Jan  3 00:44:38 -0800 
2007 -------
I think you are absolutely right about the difficulties with non-integers. The 
Mathematica manual uses fractions for its examples: GCD(1/2, 3/4) is 1/4 - and 
this is pretty sensible. But with floats we get very messy.

For instance the open-formula draft says that Calc GCD(18.1;24.1) returns zero. 
It doesn't. It returns 0.0000000000001 or something similar.

I've attached a file showing the odd results that Calc produces at present. I 
don't think it is seriously trying to evaluate rationals - it's more likely a 
byproduct of the method of calculating with integers. No user could/should have 
relied on this behaviour - so I'd suggest we would be perfectly safe to abandon 
any pretence and simply truncate any non-integer arguments as Excel does.

We'd then be left with whether to calculate with negative integers and mixed 
pos/neg integers. Unfortunately this behaviour could have been relied on by 
users, so I think we are stuck with it. I'd be pleased if you disagreed...

Gnumeric says its GCD function is the same as Excel, so it could be that Calc 
is then the only one marching in step.

I'd suggest that negative numbers are truncated = rounded towards zero so that 
GCD(3.5;12) and GCD(-3.5;-12) both return 3.

And if we clean up GCD_ADD so that it returns appropriate errors and mimics 
Excel by being Calc new GCD without the negative arguments will we be home and 
dry on this one?



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