Functions | |
if (nargin< 4) tol | |
endif | if (isa(a,"single")||isa(b,"single")) myeps |
endif | if (isempty(tol)) tol |
endif | if (isempty(trace)) trace=0 |
if (s==0) s | |
if (erri2!=0) R | |
endif | if (R > 0 &&R< 1) tol |
if (is==0) is | |
warning ("quadl: required tolerance may not be met") | |
need_warning (0) | |
if (trace) disp([a | |
id | Q () |
if (nargin==0) r | |
Variables | |
function | Q |
else | myeps = eps |
endif | m = (a+b)/2 |
h = (b-a)/2 | |
alpha = sqrt(2/3) | |
beta = 1/sqrt(5) | |
x1 = .942882415695480 | |
x2 = .641853342345781 | |
x3 = .236383199662150 | |
x | |
y = feval (f, x, varargin{:}) | |
fa = y(1) | |
fb = y(13) | |
i2 = (h/6)*(y(1) + y(13) + 5*(y(5)+y(9))) | |
i1 | |
is | |
s = sign(is) | |
endif | erri1 = abs(i1-is) |
erri2 = abs(i2-is) | |
R = 1 | |
mll = m-alpha*h | |
ml = m-beta*h | |
mr = m+beta*h | |
mrr = m+alpha*h | |
fmll = y(1) | |
fml = y(2) | |
fm = y(3) | |
fmr = y(4) | |
fmrr = y(5) | |
endif endfunction function | r |
else | w = v |
if | ( | nargin | = =0 |
) |
if | ( | trace | ) |
if | ( | is | = =0 |
) |
if | ( | erri2! | = 0 |
) |
if | ( | s | = =0 |
) |
endif if | ( | isa(a,"single")||isa(b,"single") | ) |
if | ( | ) |
need_warning | ( | 0 | ) |
id Q | ( | ) | [virtual] |
warning | ( | "quadl: required tolerance may not be met" | ) |
beta = 1/sqrt(5) |
fa = y(1) |
fb = y(13) |
fm = y(3) |
fml = y(2) |
fmll = y(1) |
fmr = y(4) |
fmrr = y(5) |
h = (b-a)/2 |
i2 = (h/6)*(y(1) + y(13) + 5*(y(5)+y(9))) |
m = (a+b)/2 |
Initial value:
need_warning (v) persistent w = []
R = 1 |
s = sign(is) |
else w = v |
x |
else x1 = .942882415695480 |
x2 = .641853342345781 |
x3 = .236383199662150 |
y = feval (f, x, varargin{:}) |