Function: solvestep
Section: sums
C-Name: solvestep0
Prototype: V=GGGED0,L,p
Help: solvestep(X=a,b,step,expr,{flag=0}): find zeros of a function in the real
 interval [a,b] by naive interval splitting.
Wrapper: (,,,G)
Description:
  (gen,gen,gen,gen,?small):gen:prec solvestep(${4 cookie}, ${4 wrapper}, $1, $2, $3, $5, $prec)
Doc: find zeros of a continuous function in the real interval $[a,b]$ by naive
 interval splitting. This function is heuristic and may or may not find the
 intended zeros. Binary digits of \fl\ mean

 \item 1: return as soon as one zero is found, otherwise return all
 zeros found;

 \item 2: refine the splitting until at least one zero is found
 (may loop indefinitely if there are no zeros);

 \item 4: do a multiplicative search (we must have $a > 0$ and $\var{step} >
 1$), otherwise an additive search; \var{step} is the multiplicative or
 additive step.

 \item 8: refine the splitting until at least one zero is very close to an
 integer.

 \bprog
 ? solvestep(X=0,10,1,sin(X^2),1)
 %1 = 1.7724538509055160272981674833411451828
 ? solvestep(X=1,12,2,besselj(4,X),4)
 %2 = [7.588342434..., 11.064709488...]
 @eprog\noindent

 \synt{solvestep}{void *E, GEN (*eval)(void*,GEN), GEN a,GEN b, GEN step,long flag,long prec}.
