Function: intnumromb
Section: sums
C-Name: intnumromb0
Prototype: V=GGED0,L,p
Help: intnumromb(X=a,b,expr,{flag=0}): numerical integration of expr (smooth in
 ]a,b[) from a to b with respect to X. flag is optional and mean 0: default.
 expr can be evaluated exactly on [a,b]; 1: general function; 2: a or b can be
 plus or minus infinity (chosen suitably), but of same sign; 3: expr has only
 limits at a or b.
Wrapper: (,,G)
Description:
  (gen,gen,gen,?small):gen:prec intnumromb(${3 cookie}, ${3 wrapper}, $1, $2, $4, prec)
Doc: numerical integration of
 \var{expr} (smooth in $]a,b[$), with respect to $X$. This function is
 deprecated, use \tet{intnum} instead.

 Set $\fl=0$ (or omit it altogether) when $a$ and $b$ are not too large, the
 function is smooth, and can be evaluated exactly everywhere on the interval
 $[a,b]$.

 If $\fl=1$, uses a general driver routine for doing numerical integration,
 making no particular assumption (slow).

 $\fl=2$ is tailored for being used when $a$ or $b$ are infinite. One
 \emph{must} have $ab>0$, and in fact if for example $b=+\infty$, then it is
 preferable to have $a$ as large as possible, at least $a\ge1$.

 If $\fl=3$, the function is allowed to be undefined (but continuous) at $a$
 or $b$, for example the function $\sin(x)/x$ at $x=0$.

 The user should not require too much accuracy: 18 or 28 decimal digits is OK,
 but not much more. In addition, analytical cleanup of the integral must have
 been done: there must be no singularities in the interval or at the
 boundaries. In practice this can be accomplished with a simple change of
 variable. Furthermore, for improper integrals, where one or both of the
 limits of integration are plus or minus infinity, the function must decrease
 sufficiently rapidly at infinity. This can often be accomplished through
 integration by parts. Finally, the function to be integrated should not be
 very small (compared to the current precision) on the entire interval. This
 can of course be accomplished by just multiplying by an appropriate constant.

 Note that \idx{infinity} can be represented with essentially no loss of
 accuracy by 1e1000. However beware of real underflow when dealing with
 rapidly decreasing functions. For example, if one wants to compute the
 $\int_0^\infty e^{-x^2}\,dx$ to 28 decimal digits, then one should set
 infinity equal to 10 for example, and certainly not to 1e1000.

 \synt{intnumromb}{void *E, GEN (*eval)(void*,GEN), GEN a, GEN b, long flag, long prec},
 where $\kbd{eval}(x, E)$ returns the value of the function at $x$.
 You may store any additional information required by \kbd{eval} in $E$, or set
 it to \kbd{NULL}.
