      program tsntgrl

c----------------------------------------------------------------------
c Program to test the subroutine SNTGRL
c----------------------------------------------------------------------	

	implicit real*8(a-h,o-z)
	parameter(m=1000000)
	real*8 f(0:m)
	pi=4d0*datan(1d0)

	write(6,*) 'TESTING SNTGRL'
	write(6,*) ' k=power of x in integral from 0 to 1'
	write(6,*) ' n=no of points'
	write(6,*) ' ans=int x**k*(k+1)-1'

	do k=1,5
	do n=20,80,20
	  do i=0,n
	    x=dreal(i)/dreal(n)
	    f(i)=dreal(k+1)*x**k
	  enddo
	  ans=SNTGRL(n,f)-1d0
	  write(6,*) 'k=',k,' n=',n,' ans=',ans
	enddo
	write (6,*) ''
	enddo

	end



