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

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

[Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-va


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #62468] quadgk.m should be able to do array-valued integration
Date: Thu, 19 May 2022 00:02:55 -0400 (EDT)

Follow-up Comment #3, bug #62468 (project octave):

I think since we made some warnings dependent on nargout, the b<a call to
quadgkv around line 150 should probably become:

  if (b < a)
    ## Reverse integration
    if (nargout < 2)
      q = quadgkv (f, b, a, varargin{:});
    else
      [q, err] = quadgkv (f, b, a, varargin{:});
    endif
    q = -q;
    return;
  endif


otherwise the error tol warning doesn't trigger:


>> q= quadgkv(@(t) -1 ./ t.^1.1,1,9999999999999)
warning: quadgkv: maximum interval count (650) exceeded
warning: called from
    quadgkv at line 407 column 9

warning: quadgkv: Error tolerance not met.  Estimated error 7.23189e-05
warning: called from
    quadgkv at line 418 column 7

q = -9.5319
>> q= quadgkv(@(t) -1 ./ t.^1.1,9999999999999,1)
warning: quadgkv: maximum interval count (650) exceeded
warning: called from
    quadgkv at line 407 column 9
    quadgkv at line 153 column 16

q = 9.5319



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62468>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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