GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Macros | Functions | Variables
quadcc.cc File Reference
#include "lo-ieee.h"
#include "oct-locbuf.h"
#include "defun.h"
#include "error.h"
#include "ovl.h"
#include "parse.h"
#include "utils.h"
#include "variables.h"
Include dependency graph for quadcc.cc:

Go to the source code of this file.

Classes

struct  cquad_ival
 

Macros

#define DEBUG_QUADCC   0
 
#define MIN_CQUAD_HEAPSIZE   200
 

Functions

void downdate (double *c, int n, int d, int *nans, int nnans)
 
OCTAVE_EXPORT octave_value_list Fquadcc (const octave_value_list &args, int) ar
 
void Vinvfx (const double *fx, double *c, const int d)
 

Variables

nd example oindent which uses
the element by element dot
form for all operators or
discontinuities in any of its
inside the integration
interval For the example 
above
 
 ar {nr_points}] =} quadcc (ots{}) Numerically evaluate the integral of ar{f} from ar{a} to ar{b} using doubly-adaptive ospell{Clenshaw-Curtis} quadrature. ar{f} is a function handle, inline function, or string containing the name of the function to evaluate. The function ar{f} must be vectorized and must return a vector of output values if given a vector of input values. For example, xample f = @(x) x .* sin (1./x) .* sqrt (abs (1 - x))
 
static const double bee [68]
 
nd example oindent which uses
the element by element dot
form for all operators or
discontinuities in any of its 
derivatives
 
nd example The result of the
integration is returned in the
value of it is recommended to
verify this value for
difficult integrands and then
a warning is issued and as may
be less efficient for a smooth
or otherwise well behaved
integrand than other methods
such as ACM Transactions on
Mathematical 
Issue
 
nd example The result of the
integration is returned in the
value of it is recommended to
verify this value for
difficult integrands and then
a warning is issued and as may
be less efficient for a smooth
or otherwise well behaved
integrand than other methods
such as 
ite {Increasing the Reliability of Adaptive Quadrature Using Explicit Interpolants}
 
static const double Lalpha [33]
 
static const double Lgamma [33]
 
nd example The result of the
integration is returned in the
value of it is recommended to
verify this value for
difficult integrands and then
a warning is issued and as may
be less efficient for a smooth
or otherwise well behaved
integrand than other methods
such as ACM Transactions on
Mathematical Article 
No
 
nd example oindent which uses
the element by element dot
form for all operators or
discontinuities in any of its
inside the integration
interval For the example which
has a discontinuity at the
call to 
ode {quadcc} would be as follows xample int = quadcc (f, a, b, 1.0e-6, [ 1 ])
 
nd example The result of the
integration is returned in the
value of it is recommended to
verify this value for
difficult integrands and then
a warning is issued and as may
be less efficient for a smooth
or otherwise well behaved
integrand than other methods
such as ACM Transactions on
Mathematical 
Software
 
nd example The result of the
integration is returned in the
value of it is recommended to
verify this value for
difficult integrands and then
a warning is issued and as 
such
 
static const double Tleft [33 *33]
 
static const double Tright [33 *33]
 
static const double V1inv [5 *5]
 
static const double V2inv [9 *9]
 
static const double V3inv [17 *17]
 
static const double V4inv [33 *33]
 
nd example The result of the
integration is returned in the
value of it is recommended to
verify this value for
difficult integrands and then
a warning is issued and as may
be less efficient for a smooth
or otherwise well behaved
integrand than other methods
such as ACM Transactions on
Mathematical 
Vol
 
nd example oindent which uses
the element by element dot
form for all operators or
discontinuities in any of its
inside the integration
interval For the example which
has a discontinuity at 
x =1
 
static const double xi [33]
 

Macro Definition Documentation

#define DEBUG_QUADCC   0

Definition at line 38 of file quadcc.cc.

#define MIN_CQUAD_HEAPSIZE   200

Definition at line 41 of file quadcc.cc.

Function Documentation

void downdate ( double c,
int  n,
int  d,
int nans,
int  nnans 
)

Definition at line 1452 of file quadcc.cc.

References bee, Lalpha, Lgamma, and xi.

OCTAVE_EXPORT octave_value_list Fquadcc ( const octave_value_list args,
int   
)

Definition at line 1549 of file quadcc.cc.

Referenced by install_quadcc_fcns().

void Vinvfx ( const double fx,
double c,
const int  d 
)

Definition at line 1407 of file quadcc.cc.

References V1inv, V2inv, V3inv, and V4inv.

Variable Documentation

nd example oindent which uses the element by element dot form for all operators or discontinuities in any of its inside the integration interval For the example above

Definition at line 1549 of file quadcc.cc.

Referenced by TerminalView::extendSelection().

nd example The result of the integration is returned in the value of ar {nr_points}] =} quadcc (ots{}) Numerically evaluate the integral of ar{f} from ar{a} to ar{b} using doubly-adaptive ospell{Clenshaw-Curtis} quadrature. ar{f} is a function handle, inline function, or string containing the name of the function to evaluate. The function ar{f} must be vectorized and must return a vector of output values if given a vector of input values. For example, xample f = @(x) x .* sin (1./x) .* sqrt (abs (1 - x))

Definition at line 1549 of file quadcc.cc.

const double bee[68]
static
Initial value:
=
{
0.00000000000000e+00, 2.28868854108532e-01, 0.00000000000000e+00,
-8.15740215243451e-01, 0.00000000000000e+00, 5.31212715259731e-01,
0.00000000000000e+00, 1.38538036812454e-02, 0.00000000000000e+00,
3.74405228908818e-02, 0.00000000000000e+00, 2.12224115039342e-01,
0.00000000000000e+00, -8.16362644507898e-01, 0.00000000000000e+00,
5.35648426691481e-01, 0.00000000000000e+00, 1.52417902753662e-03,
0.00000000000000e+00, 2.63058840550873e-03, 0.00000000000000e+00,
4.15292106318904e-03, 0.00000000000000e+00, 6.97106011119775e-03,
0.00000000000000e+00, 1.35535708431058e-02, 0.00000000000000e+00,
3.52132898424856e-02, 0.00000000000000e+00, 2.06946714741884e-01,
0.00000000000000e+00, -8.15674251283876e-01, 0.00000000000000e+00,
5.38841175520580e-01, 0.00000000000000e+00, 1.84909689577590e-04,
0.00000000000000e+00, 2.90936325007499e-04, 0.00000000000000e+00,
3.84877750950089e-04, 0.00000000000000e+00, 4.86436656735046e-04,
0.00000000000000e+00, 6.08688640346879e-04, 0.00000000000000e+00,
7.66732830740331e-04, 0.00000000000000e+00, 9.82753336104205e-04,
0.00000000000000e+00, 1.29359957505615e-03, 0.00000000000000e+00,
1.76616363801885e-03, 0.00000000000000e+00, 2.53323433039089e-03,
0.00000000000000e+00, 3.88872172121956e-03, 0.00000000000000e+00,
6.58635106468291e-03, 0.00000000000000e+00, 1.30326736343254e-02,
0.00000000000000e+00, 3.44353850696714e-02, 0.00000000000000e+00,
2.05025409531915e-01, 0.00000000000000e+00, -8.14985893995401e-01,
0.00000000000000e+00, 5.40679930965238e-01
}

Definition at line 72 of file quadcc.cc.

Referenced by downdate().

nd example oindent which uses the element by element dot form for all operators or discontinuities in any of its derivatives

Definition at line 1549 of file quadcc.cc.

nd example The result of the integration is returned in the value of it is recommended to verify this value for difficult integrands and then a warning is issued and as may be less efficient for a smooth or otherwise well behaved integrand than other methods such as ACM Transactions on Mathematical Issue

Definition at line 1549 of file quadcc.cc.

nd example The result of the integration is returned in the value of it is recommended to verify this value for difficult integrands and then a warning is issued and as may be less efficient for a smooth or otherwise well behaved integrand than other methods such as ite {Increasing the Reliability of Adaptive Quadrature Using Explicit Interpolants}

Definition at line 1549 of file quadcc.cc.

const double Lalpha[33]
static
Initial value:
=
{
5.77350269189626e-01, 5.16397779494322e-01, 5.07092552837110e-01,
5.03952630678970e-01, 5.02518907629606e-01, 5.01745206004255e-01,
5.01280411827603e-01, 5.00979432868120e-01, 5.00773395667191e-01,
5.00626174321759e-01, 5.00517330712619e-01, 5.00434593736979e-01,
5.00370233297676e-01, 5.00319182924304e-01, 5.00278009473803e-01,
5.00244319584578e-01, 5.00216403386025e-01, 5.00193012939056e-01,
5.00173220168024e-01, 5.00156323280355e-01, 5.00141783641018e-01,
5.00129182278347e-01, 5.00118189340972e-01, 5.00108542278496e-01,
5.00100030010004e-01, 5.00092481273333e-01, 5.00085755939229e-01,
5.00079738458365e-01, 5.00074332862969e-01, 5.00069458915387e-01,
5.00065049112355e-01, 5.00061046334395e-01, 5.00057401986298e-01
}

Definition at line 99 of file quadcc.cc.

Referenced by downdate().

const double Lgamma[33]
static
Initial value:
=
{
0.0, 0.0, 5.16397779494322e-01, 5.07092552837110e-01, 5.03952630678970e-01,
5.02518907629606e-01, 5.01745206004255e-01, 5.01280411827603e-01,
5.00979432868120e-01, 5.00773395667191e-01, 5.00626174321759e-01,
5.00517330712619e-01, 5.00434593736979e-01, 5.00370233297676e-01,
5.00319182924304e-01, 5.00278009473803e-01, 5.00244319584578e-01,
5.00216403386025e-01, 5.00193012939056e-01, 5.00173220168024e-01,
5.00156323280355e-01, 5.00141783641018e-01, 5.00129182278347e-01,
5.00118189340972e-01, 5.00108542278496e-01, 5.00100030010003e-01,
5.00092481273333e-01, 5.00085755939229e-01, 5.00079738458365e-01,
5.00074332862969e-01, 5.00069458915387e-01, 5.00065049112355e-01,
5.00061046334395e-01
}

Definition at line 114 of file quadcc.cc.

Referenced by downdate().

nd example The result of the integration is returned in the value of it is recommended to verify this value for difficult integrands and then a warning is issued and as may be less efficient for a smooth or otherwise well behaved integrand than other methods such as ACM Transactions on Mathematical Article No
nd example The result of the integration is returned in the value of it is recommended to verify this value for difficult integrands and then a warning is issued and as may be less efficient for a smooth or otherwise well behaved integrand than other methods such as ode {quadcc} would be as follows xample int = quadcc (f, a, b, 1.0e-6, [ 1 ])

Definition at line 1549 of file quadcc.cc.

nd example The result of the integration is returned in the value of it is recommended to verify this value for difficult integrands and then a warning is issued and as may be less efficient for a smooth or otherwise well behaved integrand than other methods such as ACM Transactions on Mathematical Software

Definition at line 1549 of file quadcc.cc.

nd example The result of the integration is returned in the value of it is recommended to verify this value for difficult integrands and then a warning is issued and as such

Definition at line 1549 of file quadcc.cc.

const double Tleft[33 *33]
static

Definition at line 892 of file quadcc.cc.

const double Tright[33 *33]
static

Definition at line 1147 of file quadcc.cc.

const double V1inv[5 *5]
static
Initial value:
=
{
.47140452079103168293e-1, .37712361663282534635, .56568542494923801952,
.37712361663282534635, .47140452079103168293e-1,
-.81649658092772603273e-1, -.46188021535170061160, 0,
.46188021535170061160, .81649658092772603273e-1, .15058465048420853962,
.12046772038736683169, -.54210474174315074262, .12046772038736683169,
.15058465048420853962, -.21380899352993950775, .30237157840738178177, -0.,
-.30237157840738178177, .21380899352993950775, .10774960475223581324,
-.21549920950447162648, .21549920950447162648, -.21549920950447162648,
.10774960475223581324
}

Definition at line 129 of file quadcc.cc.

Referenced by Vinvfx().

const double V2inv[9 *9]
static

Definition at line 142 of file quadcc.cc.

Referenced by Vinvfx().

const double V3inv[17 *17]
static

Definition at line 177 of file quadcc.cc.

Referenced by Vinvfx().

const double V4inv[33 *33]
static

Definition at line 315 of file quadcc.cc.

Referenced by Vinvfx().

nd example The result of the integration is returned in the value of it is recommended to verify this value for difficult integrands and then a warning is issued and as may be less efficient for a smooth or otherwise well behaved integrand than other methods such as ACM Transactions on Mathematical Vol

Definition at line 1549 of file quadcc.cc.

nd example oindent which uses the element by element dot form for all operators or discontinuities in any of its inside the integration interval For the example which has a discontinuity at x =1

Definition at line 1549 of file quadcc.cc.

const double xi[33]
static
Initial value:
=
{
-1., -0.99518472667219688624, -0.98078528040323044912,
-0.95694033573220886493, -0.92387953251128675612,
-0.88192126434835502970, -0.83146961230254523708,
-0.77301045336273696082, -0.70710678118654752440,
-0.63439328416364549822, -0.55557023301960222475,
-0.47139673682599764857, -0.38268343236508977173,
-0.29028467725446236764, -0.19509032201612826785,
-0.098017140329560601995, 0., 0.098017140329560601995,
0.19509032201612826785, 0.29028467725446236764, 0.38268343236508977173,
0.47139673682599764857, 0.55557023301960222475, 0.63439328416364549822,
0.70710678118654752440, 0.77301045336273696082, 0.83146961230254523708,
0.88192126434835502970, 0.92387953251128675612, 0.95694033573220886493,
0.98078528040323044912, 0.99518472667219688624, 1.
}

Definition at line 55 of file quadcc.cc.

Referenced by dbetai(), downdate(), and F__dsearchn__().