!	subprograma da rotina bissecao
	subroutine bissec (f,a,b,maxit,tol,c)
      implicit real *8 (a-h,o-z)
      u=f(a)
      v=f(b)
      write(*,*)'u=',u,'v=',v
      aux1=u*v
      if (aux1.gt.0.d0) then
         write(*,*)'intervalo ruim'
         stop
      endif
      do k=1,maxit
       c=(a+b)/2
       w=f(c)
	!   write(8,*)k,w
	!   write(13,*)k,c,w
       aux2=abs(w)
       if(aux2.le.tol) goto 353
       aux3=w*u
       if(aux3.lt.0.d0) then
          b=c
          v=w
          else
             a=c
             u=w
       endif
      enddo
      write(*,*)'no convergence, k =',k,'c =',c,'f(c) =',w
      stop
353   continue
      write(*,*)'bisection converged with c =',c,'f(c)=',w
      return
      end 
!-------------------------------------------------------------------
    function f3(x)
	implicit real *8 (a-h,o-z)
	f3=exp(x)-3*x

!	f=exp(-x)-x*cos(x)

!	fp=2.
!	bi=2.
!	t0tl=1.2
!	h=10.

!	f=fp-t0tl*h*log((h-1.-1./x)/(h-1.-1./x-bi*(1.+x)))/bi/(1.+x)+1.


	return
	end

