Operators and Keywords

C++ API

## Functions

endif 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 (isinf(fa)) fa
endif if (isinf(fb)) fb
if (fcnt > 10000) warning("maximum iteration count reached")
elseif (isnan(q)||isinf(q)) warning("infinite or NaN function evaluations were returned")
elseif (hmin< (b-a)*myeps) warning("minimum step size reached -- possibly singular integral") = x != 0
endif if (trace) disp([fcnt
id q ()
endif if (fcnt==5||abs(q-q0) > tol)[q1

## Variables

function [q, fcnt]
else myeps = eps
endif c = (a + b) / 2
fa = feval (f, a, varargin{:})
fc = feval (f, c, varargin{:})
fb = feval (f, b, varargin{:})
fcnt = 3
endif h = (b - a) / 2
q = (b - a) / 6 * (fa + 4 * fc + fb)
else d = (a + c) / 2
e = (c + b) / 2
fd = feval (f, d, varargin{:})
fe = feval (f, e, varargin{:})
q1 = (c - a) / 6 * (fa + 4 * fd + fc)
q2 = (b - c) / 6 * (fc + 4 * fe + fb)
endif a
endif hmin
endif endif endfunction pi

## Function Documentation

 endif endif endfunction !assert ( quadv(@sin, 0, 2 *pi) , 0 , 1e- 5 )

 elseif ( ) = x != 0

 elseif ( isnan(q)||isinf(q) )

 endif if ( fcnt = `= 5 || abs (q - q0)`, tol )

 endif if ( trace )

 if ( fcnt , 10000 )

 endif if ( isinf(fb) )

 if ( isinf(fa) )

 endif if ( isempty(trace) ) ` [pure virtual]`

 endif if ( isempty(tol) )

 endif if ( isa(a,"single")||isa(b,"single") )

 endif if ( )

 id q ( ) ` [virtual]`

Type Constraints

## Variable Documentation

 endif a

 endif c = (a + b) / 2

 else d = (a + c) / 2

 b d e = (c + b) / 2

 fa = feval (f, a, varargin{:})

 fb = feval (f, b, varargin{:})

 fc = feval (f, c, varargin{:})

 endif fcnt = 3

 fd = feval (f, d, varargin{:})

 fe = feval (f, e, varargin{:})

 endif endfunction function[q, fcnt, hmin]

Initial value:

``` quadv (f, a, b, tol, trace, varargin)
if (nargin < 3)
print_usage ()
```

 endif h = (b - a) / 2

Initial value:

``` simpsonstp (f, a, c, d, fa, fc, fd, q1, fcnt, hmin,
tol, trace, varargin{:})
```

 else myeps = eps

 * pi

 q = (b - a) / 6 * (fa + 4 * fc + fb)

 q1 = (c - a) / 6 * (fa + 4 * fd + fc)

 q2 = (b - c) / 6 * (fc + 4 * fe + fb)