From bug-octave-request at bevo dot che dot wisc dot edu Thu Jan 13 12:37:52 2000 Subject: quad function problem From: "John W. Eaton" To: woodj at vrinet dot com Cc: bug-octave at bevo dot che dot wisc dot edu Date: Thu, 13 Jan 2000 12:38:51 -0600 (CST) On 13-Jan-2000, woodj at vrinet dot com wrote: | | | To: bug-octave at bevo dot che dot wisc dot edu | Cc: jlw | Subject: quad function problem | -------- | Bug report for Octave 2.0.15 configured for i686-pc-linux-gnu | | Description: | ----------- | | Can't call the quad function more than once per octave session. This error | occurs if I use the the same user defined function over the same | limits of integration, the same function over different limits of | integration or a new user defined function. This includes the quad | example provided in the manual. | | | Repeat-By: | --------- | | octave> function y = f (x) | > y = sin (x); | > endfunction | octave> [v, ier, nfun, err] = quad ("f", 0, 1) | v = 0.45970 | | ier = 0 | | nfun = 21 | | err = 5.1037e-15 | | octave> [v, ier, nfun, err] = quad ("f", 1, 2) | error: quad: invalid recursive call | error: evaluating index expression near line 6, column 23 | error: evaluating assignment expression near line 6, column 21 Please try the following patch. Thanks, jwe 2000-01-13 John W. Eaton * quad.cc (Fquad): Call run_unwind_frame before normal return. *** src/quad.cc~ Tue Oct 26 21:09:18 1999 --- src/quad.cc Thu Jan 13 12:35:06 2000 *************** *** 269,274 **** --- 269,276 ---- else print_usage ("quad"); + run_unwind_frame ("Fquad"); + return retval; } ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------