Err 523 in Open Office Calc

Asked by sica07

Hello, i made a iteration (in A1 cell i wrote =A1+B1), with the iteration step set to 1, but i get the Err 523 (Calculation does not converge). Why? In Excel this works just fine.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openoffice.org Edit question
Assignee:
No assignee Edit question
Solved by:
Ralph Janke
Solved:
Last query:
Last reply:
Revision history for this message
Cesare Tirabassi (norsetto) said :
#1

What version of OOo are you using?
I checked this in OOo 2.2 and it works fine.

Revision history for this message
sica07 (structumstudio) said :
#2

I use 2.2 to. What did you do? Could you tell me please.

Revision history for this message
Cesare Tirabassi (norsetto) said :
#3

I went to Tools->Options->OpenOffice.org Calc->Calculate clicked on Iterations, inserted =A1+B1 in A1 and got the answer 0 without any error.
Changing steps and/or Minimum Change to 1 still gives 0 with no error.

Revision history for this message
sica07 (structumstudio) said :
#4

That I know, but if you change the value in B1, you will get the error. In Tools->Options->OpenOffice.org Calc->Calculate I changed the iterations step to 1, but I still get the same error. That is not normal.

Revision history for this message
Cesare Tirabassi (norsetto) said :
#5

What is the logic of what you are trying to do!?
If you set B1 to anything but 0 of course it will never converge.

Revision history for this message
sica07 (structumstudio) said :
#6

I want to do a simple iteration. For example: for example in B1 i'm providing value 8, in A1 should result 8, then if I'm writing 2 in B1, in A1 should appear value 10, and so on. In Excel this method works, so I dont see why is not posible in OOo Calc. There could be any better solution? O, and I want to thank you for trying to help.

Revision history for this message
Benoit Malet (benoit-malet) said :
#7

Hello !

I just tried with Excel, and it reacted as I thought it would ... In Excel or in OpenOffice, if B1=8, an =A1+B1 in A1 will only result in an error (you say it should say A1=8, but as far as I know, 8 != 8+8 ... and if B1 = 2, A1 can't be 10 as 10 is still different than 12 (10+2))

So I think in this case the problem is not from the software ... (maybe Excel is misleading you, showing no error while it did not converge, but mine does)

Regards,
Benoît

Revision history for this message
sica07 (structumstudio) said :
#8

Thamk you Benoit for your answer. I tried again in Excel and it worked. I changed the iteration step to 1. If you leave it at 100 (as is it by default) you are right, it will result an error, but if you change it to 1 it will work. That is because the initial state of B1=0. so A1+B1=0; if I change B1 to 8 then I will get 0+8=8 because A1 has the 0 value, but after I change the value of B1 cell , A1 will change his value too becoming 8; after I change the B1 value to 2 I get in A1 10 because, 8+2=10.

Revision history for this message
Cesare Tirabassi (norsetto) said :
#9

I think that by setting the iteration step to 1 Excel actually doesn't iterate at all. You are trying to solve this problem:

Given b<>0 find an a such that a+b=a

No matter what, the result is ERROR. There is no such solution (beside infinity of course).
As also Benoit said, I'm afraid that it is Excel that is wrong or misleading. It is actually telling you it has found a solution while it hasn't found any.

Revision history for this message
sica07 (structumstudio) said :
#10

I'm not an Exel fun at all. I'm OOo user for a long time. But this time I must say that Exel is right and OOo has a bug. I dont understand how is telling me that "it has found a solution while it hasn't found any." , when the solution is right. Please try in OOo Calc this: =A1+1 and you will get an error even if you choose an one step iteration. In Exel this works. I don't want to look as I'm taking your answers as wrong, the thing is that I can't understand what are you trying to say. Is not =A1+1 the same thing as i=i+1 in C++ or Pascal or any language?

Revision history for this message
sica07 (structumstudio) said :
#11

err Excel

Revision history for this message
Best Ralph Janke (txwikinger) said :
#12

Neither OOo Spreadsheet nor MS Excel allow circular calculation, since they won't converge. This is equivalent to an endless loop in programming.

Revision history for this message
sica07 (structumstudio) said :
#13

Thanks Ralph Janke, that solved my question.

Revision history for this message
sica07 (structumstudio) said :
#14

"Thanks Ralph Janke, that solved my question." -equal with "I quit; I will do it in Excel"

Revision history for this message
Cesare Tirabassi (norsetto) said :
#15

>Is not =A1+1 the same thing as i=i+1 in C++ or Pascal or any language?

No.

Revision history for this message
Benoit Malet (benoit-malet) said :
#16

In fact, when you insert in Excel (or Calc)

in A1 : =A1+B1
in B1 : 8

Calc (and Excel) will try to solve an equation of type x = x + y ... So in this case, it leads to x - x = y --> 0 = y ... So if you put anything other than 0 in B1, this won't work, as problem is unfeasible ...

This example is simple because it has analytic solution, but for example, if you say x = sqrt(x), an obvious answer is 0, but a way to compute it is to take a first guess (let's say 16) and iterate :
x = sqrt(16) --> 4 (but 4, as computed here, is not equal to our first guess 16, so let's continue)
x = sqrt(4) --> 2 (but 2 != 4 --> continue)
x = sqrt(2) --> 1.41 (but 1.41 != 2 --> continue)

And iteration after iteration, you converge to a numeric solution, which is 1 ...

This is the principle of iterative computing, what you seem to want is to increment some variable, which as few to do with iteration ...

So, in your case, Excel reaches it's limit of iterations (you must specify a maximum amount of iteration, as sometimes it never converges, so you avoid entering an endless loop) and gives no error, although the result is not correct. In OOo, it stops and says "well, the result I have and the result from previous iteration are too different to say I have an answer" ...

Hope this clarifies a bit the concept.

Regards,
Benoît

Revision history for this message
sica07 (structumstudio) said :
#17

Ok, thx a lot Benoit, now I get it. And, I understand (well at least I think I understand) why in excel I have an answer. Thank you again.
Thanks, that solved my question - for real :)

Revision history for this message
gabistef (gabistef) said :
#18

I think thath the problem isn't solved.
Benoit Malet said:"This is the principle of iterative computing, what you seem to want is to increment some variable, which as few to do with iteration ..."

This is not the question!
Excel is perhaps not correct, but more intelligent than openoffice. I try to explain why. If i select the iteration step to 1, then i don't have a loop and I can use a spreadsheet for making an incredible number of simulation: I can simulate with F9 (recalculation) a movement of a point, or an evolution of a cellular automata , or ...
Calc without this variable increment is a stupid spreadsheet! :(