octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #42037] Missing function integral


From: Rik
Subject: [Octave-bug-tracker] [bug #42037] Missing function integral
Date: Tue, 19 Sep 2017 20:46:10 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Update of bug #42037 (project octave):

                  Status:          Patch Reviewed => In Progress            

    _______________________________________________________

Follow-up Comment #18:

I made some other changes including using the default Copyright notice for
Octave, using spaces between the function name and the opening parenthesis,
using lower case for variable names such as q, f, a, b, and using only one '#'
for single-line comments appearing after code.  I checked everything in here
(http://hg.savannah.gnu.org/hgweb/octave/rev/2eae2ad53eb9).

I changed one of the array-valued tests to use the default AbsTol of 1e-10
which now causes it to fail.  Although quadgk uses a default of 1e-10, quadv
uses a default of 1e-6.

The integral() function could be changed to pass abstol of 1e-10 down to
quadv, but I think it would be better to change quadv to simply use these new
default values.  For one thing, quadv does not distinguish between double and
single values and always uses 1e-6 by default.  That seems wrong.  There is
code in the input validation for quadgk which could be copied to quadv to make
this work.  


  issingle = (isa (a, "single") || isa (b, "single")
              || isa (waypoints, "single"));

  if (isempty (abstol))
    abstol = ifelse (issingle, 1e-5, 1e-10);
  elseif (! isscalar (abstol) || abstol < 0)
    error ("quadgk: ABSTOL must be a scalar >=0");
  endif




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42037>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]