Issue 19740

Summary: Certain Goal Seek constellation loops forever (was: Goal Seek limitations)
Product: Calc Reporter: ademol <ademol>
Component: codeAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 2.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Goal seek on cell D19 as formula cell and 0 (zero) as result. Variable cell is D1.
none
goalseek to target 401 with variable A1 works in cell E3 but not in cell F3 none

Description ademol 2003-09-18 09:25:39 UTC
The "goal seek" function is limited by the number of cells between the variable
cell and the goal cell.
When the number of intermediate cells is higher than 60 the search fail 
When this happen a dialog box say (backward translated): "Fail of the goal seek 
Impossible to find the exact value. Insert the (%d) nearest value" where %d is 
the previous value.
Reproduced on Linux and MSWinXP platform
Works on MSExcel2k (no such limit)
Comment 1 frank 2003-09-18 09:50:21 UTC
Hi Eike,

I think this is a double to internal BugID 110262.

Frank
Comment 2 frank 2003-09-18 09:55:39 UTC
The internal BugID is #110262#

Frank
Comment 3 ooo 2003-09-18 10:06:24 UTC
This happens if more than 50 _recursive formula cells_ steps are
involved. Yes, big construction site, need reimplementation of
recursive calculations (graph oriented instead of simple stack
oriented). A graph solution would also ease handling of circular
iterative calculations as described in issue 956, and prevent the
exasperating Err:527 as described in issue 7309.
Comment 4 ooo 2003-09-18 10:11:02 UTC
Created attachment 9445 [details]
Goal seek on cell D19 as formula cell and 0 (zero) as result. Variable cell is D1.
Comment 5 ademol 2007-09-21 14:21:58 UTC
Retesting with version 2.0.4.7 
This issue is still present but the number of iterations is now 400 
(instead of 50)
Perhaps a better solution is to use the number of iteration steps
which can be configure in the option menu as the maximum number of 
computation steps (default is 100)

Comment 6 ademol 2007-09-21 14:26:10 UTC
Created attachment 48402 [details]
goalseek to target 401 with variable A1 works in cell E3 but not in cell F3
Comment 7 ooo 2007-10-11 23:28:28 UTC
Actually there is no arbitrary limit anymore since reimplementation of
calculation of deep-nested and circular formulas with issues 20986, 21124, 4874,
7309, and this issue should had been closed along with them.

Anyway, the attached goalseek.ods document even loops in OOo2.3 when goalseeking
like described. This needs fixing, adapting summary and retargeting to OOo2.4

Debug note: ScFormulaCell:Interpret() rRecursionHelper.bInRecursionReturn is
endlessly reset to true while executing the loop do {...} while
(rRecursionHelper.IsInRecursionReturn()); without new cells being added to the
recursion list.
Comment 8 Marcus 2017-05-20 11:11:46 UTC
Reset assigne to the default "issues@openoffice.apache.org".