   Math question
  I am working on converting an excel spreadsheet into sourcecode, but I've ran into a problem. Heres a simplified version of the problem:where A = 4:B = A + (C * 2)C = B / 2What is B and C?Excel says B is 40, and C is 20.. the only way I can get to that value is by iterating 10 times starting where C = 0. I am almost certain though that theres a mathematical way of doing this... any help would be greatly appreciated!   
  Since you are converting an Excel spreadsheet you don't need to care about the mathematical meaning of this, you have to find out what exactly Excel does in this case. Iterating till it doesn't change anymore seems likely to me.OpenOffice Calc by default gives an error message.   ;  Well one would logically assume that, if two variables are inter-related, a loop will continue endlessly.   ;  Well, those values are incorrect. Try substituting.A = 4B = A + (C*2)C = B / 2B = 4 + (20*2) = 40C = 40/2 = 20B = 44 = 40 // Something is wrongC = 20 = 20I believe what you have typed is impossibleA=4B=A+(C*2)C=B/2B=4+(B/2*2)B=4+B // B=4+B something is wrong;  I stuck it in mathomatic, and it solved it to be 4=0. That's probably not good.   ;  So you guys don't think i'm crazy:;  My results are:A5  4A6  44A7  20so I don't know how you got 40 in A6.[edit]it results in error for me to put A6/2 into the A7 cell   ;Quote:Original post by DreqSo you guys don't think i'm crazy:Of course Excel outputs a wrong value if you gives it something impossible, try this:A1 = A2+1A2 = A1+1This will also generate some weird result.   ;  I am not able to enter the third cell in Excel 2003, it says it would be a circular function.   ;  The weird thing is that i get the same error in a new workbook, but not in this one..   