bugGNU Octave - Bugs: bug #51867, Warning in quadgk with zero size...

 
 

bug #51867: Warning in quadgk with zero size interval

Submitter:  Avinoam Kalma <avinoam>
Submitted:  Sun 27 Aug 2017 05:43:07 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Avinoam Open/Closed:  * Closed
Release:  * 4.2.1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 29 Aug 2017 07:45:48 PM UTC, comment #5: 
Avinoam Kalma <avinoam>
Group Member
Tue 29 Aug 2017 02:26:11 PM UTC, comment #4: 

A reference to the Shampine paper is



L.F. Shampine, Vectorized adaptive quadrature in Matlab, Journal of Computational and Applied Mathematics, Volume 211, Issue 2, 2008, Pages 131-140, ISSN 0377-0427, http://dx.doi.org/10.1016/j.cam.2006.11.021.
(http://www.sciencedirect.com/science/article/pii/S037704270600700X)
Keywords: Global adaptive quadrature; Infinite interval; End point singularity; Piecewise-smooth integrand


though its behind a paywall. The relavant text in this article is


"A computational distinction is that if reltol is positive, then rtol = max(reltol,100*eps), where eps is the unit roundoff in MATLAB. This prevents the code from attempting an accuracy unreasonable in the precision available."

David Bateman <dbateman>
Group Member
Tue 29 Aug 2017 02:14:33 PM UTC, comment #3: 

I pushed your changeset here:

http://hg.savannah.gnu.org/hgweb/octave/rev/36e86c8150cc

I initially pushed on default, then I realized that this was a regression so I also grafted the change to stable.

John W. Eaton <jwe>
Group administrator
Mon 28 Aug 2017 08:28:15 PM UTC, comment #2: 

Thanks, it fixed the problem.

Avinoam Kalma <avinoam>
Group Member
Mon 28 Aug 2017 08:25:33 AM UTC, comment #1: 

Thanks for the bug report, fixed in the attached patch.

(file #41687)

Marco Caliari <caliari>
Group Member
Sun 27 Aug 2017 05:43:07 PM UTC, original submission:  



>> fun = @(x) x;
>> quadgk (fun, 0, 1)
ans =  0.50000
>> quadgk (fun, 0, 0)
warning: __quadgk_eval__: some elements in list of return values are undefined
warning: called from
    quadgk>__quadgk_eval__ at line 441 column 5
    quadgk at line 333 column 18
ans = 0


This warning is due to http://hg.savannah.gnu.org/hgweb/octave/rev/ed1722f70fad.
In the early exit from  _quadgk_eval_ (line 441), q and err are not defined.

Avinoam Kalma <avinoam>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #41687:  quadgk.diff added by caliari (1KiB - application/x-tex)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by dbateman (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by caliari (Updated the item)
  • -email is unavailable- added by avinoam (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-29 rik5 Open/ClosedOpen Closed
    2017-08-29 jwe StatusPatch Submitted Fixed
    2017-08-28 caliari Attached File- Added quadgk.diff, #41687
        StatusNone Patch Submitted

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code