Re: [sc-dev] How should MULTIPLE.OPERATIONS calculate?
On 06/21/09 22:57, Regina Henschel wrote: In ODF1.2 draft spec I read, MULTIPLE.OPERATIONS executes the formula expression pointed to by FormulaCell and _all_ formula expressions it depends on while replacing _all_ references to RowCell with references to RowReplacement respectively all references to ColumnCell with references to ColumnReplacement. I think that the terms execute formula expression and while replacing is not exact enough. (1) I interpret it in the way, that I first replace all references, generating intermediate, temp sheets, and then evaluate that sheet. I get the following: The references are replaced dynamically during calculation, not in a separate step up front. The implementation uses a list of active replacements in the document (aTableOpList), no modified copies of the formulas are made. Niklas - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
Re: [sc-dev] How should MULTIPLE.OPERATIONS calculate?
Hi Niklas, Niklas Nebel schrieb: On 06/21/09 22:57, Regina Henschel wrote: In ODF1.2 draft spec I read, MULTIPLE.OPERATIONS executes the formula expression pointed to by FormulaCell and _all_ formula expressions it depends on while replacing _all_ references to RowCell with references to RowReplacement respectively all references to ColumnCell with references to ColumnReplacement. I think that the terms execute formula expression and while replacing is not exact enough. (1) I interpret it in the way, that I first replace all references, generating intermediate, temp sheets, and then evaluate that sheet. I get the following: The references are replaced dynamically during calculation, not in a separate step up front. The implementation uses a list of active replacements in the document (aTableOpList), no modified copies of the formulas are made. That makes it not clearer and I do not see by which rules OOo results in 702. Would you be so kind to give a step by step calculation? And besides the question what OOo does, there is the question whether that conforms to the spec. Calculation starts in (A7=)MULTIPLE.OPERATIONS(A5;A2;A6). This means, Take the formula in A5, replace all occurrence of A2 with A6 and calculate the formula then. Right? So instead of calculating (A5=)MULTIPLE.OPERATIONS(A3;A2;A4) OOo calculates =MULTIPLE.OPERATIONS(A3;A6;A4). And now? If I understand the spec correct, then OOo has to go to A3 and look whether it depends on A2 and replace A2 with A6 if so. If the formula on which a cell depends is a simple operation like + or * (as in the examples in the spec), then it makes no difference, when the replacement is done. In addition, it makes no difference whether you use the reference or use already the value to which the reference points. But here it is more complex and need to be defined. Another example, again enter in column A. 2 3 5 7 11 13 17 19 =OFFSET(A2;1;0) =A9+A2 =MULTIPLE.OPERATIONS(A10;A2;A4) Try the same with =OFFSET(A2;1;0)+A2 in cell A10 instead of =A9+A2 I would expect the same result, but it isn't. kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
Re: [sc-dev] How should MULTIPLE.OPERATIONS calculate?
On 06/22/09 17:10, Regina Henschel wrote: Right. A1+A2 is calculated as A1+A6, which is 2+700, or 702. So OOo drops =MULTIPLE.OPERATIONS(A3;A6;A4)? OOo acts as if the formula in A5 is =A3. All references to A6 in A3's formula are replaced with A4. There are none, so the result is A3, unchanged. OFFSET doesn't mix well with MULTIPLE.OPERATIONS because it's one of the functions that cause the cell to be recalculated on any change, like RAND or NOW. So the changed formula depends on the special ALWAYS range, not on A2. That's a matter of implementation, and could probably be changed, but it doesn't look like a high-priority issue. That means, that it is another problem and a real bug and the result should be 18 in both cases? [18= 11 (content of one position after A4)+7 (content of A4)] OOo Later would be OK for me. A bug or a limitation, whatever one might call it, but certainly different from the other case. Niklas - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
Re: [sc-dev] How should MULTIPLE.OPERATIONS calculate?
Hi all, Regina Henschel schrieb: Hi all, thinking about issue 102980 and 102981 I found, that it is not clear to me, how to calculate MULTIPLE.OPERATIONS at all. Take a spreadsheet and enter the following numbers and formulas into column A, beginning in cell A1 with number 2. 2 3 =A1+A2 30 =MULTIPLE.OPERATIONS(A3;A2;A4) 700 =MULTIPLE.OPERATIONS(A5;A2;A6) I forgot to say, that the above mentioned values for A3 and A5 are only internal, temporary. The real sheet shows in A3 the value 5 and in A5 the value 32. There is no doubt about it. Only the value in A7 is in question. kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org