      PROGRAM xrtbis
C     driver for routine rtbis
      INTEGER N,NBMAX
      REAL X1,X2
      PARAMETER(N=100,NBMAX=20,X1=1.0,X2=50.0)
      INTEGER i,nb
      REAL rtbis,root,xacc,xb1(NBMAX),xb2(NBMAX)
      EXTERNAL fx
      nb=NBMAX
      call zbrak(fx,X1,X2,N,xb1,xb2,nb)
      write(*,'(/1x,a)') 'Roots of fx:'
      write(*,'(/1x,t19,a,t31,a/)') 'x','F(x)'
      do 11 i=1,nb
        xacc=(1.0e-9)
        root=rtbis(fx,xb1(i),xb2(i),xacc)
        write(*,'(1x,a,i2,2x,f12.6,e16.4)') 'Root ',i,root,fx(root)
11    continue
      END

      FUNCTION fx(x)
      REAL fx
      fx=x**3-1.5
      return
      END
