c  ULTRA DEMO
c
c  This calls the various subroutines of ultra as a test

	external uni,vni,duni,dvni
	external i32bit,i31bit,i16bit,i15bit,i8bit,i7bit,i1bit

	real*4     uni,     vni
	real*8     duni,    dvni,    d(4)
	integer*4  i32bit,  i31bit,  k(32)
	integer*2  i16bit,  i15bit
	integer*2  i8bit,   i7bit,   i1bit

	print 1
    1	format (' A Sample Printout:')

	call rinit(1234567,7654321)
	do 2 i=1,10000
	j=min(2,i)
    2	d(j)=dvni()
        print 12,(d(j),j=1,2)
   12	format (' Signed Double: ',2f32.15)

	call rinit(1234567,7654321)
	do 3 i=1,10000
	j=min(2,i)
    3	d(j)=duni()
	print 13,(d(j),j=1,2)
   13	format (' Unsigned Dble: ',2f32.15)

	call rinit(1234567,7654321)
	do 4 i=1,10000
	j=min(4,i)
    4	d(j)=vni()
	print 14,(d(j),j=1,4)
   14	format (' Signed Single: ',4f16.7)

	call rinit(1234567,7654321)
	do 5 i=1,10000
	j=min(4,i)
    5	d(j)=uni()
	print 15,(d(j),j=1,4)
   15	format (' Uns. Single:   ',4f16.7)

	call rinit(1234567,7654321)
	do 6 i=1,10000
	j=min(4,i)
    6	k(j)=i32bit()
	print 16,(k(j),j=1,4)
   16	format (' Signed 4 byte: ',4i16)

	call rinit(1234567,7654321)
	do 7 i=1,10000
	j=min(4,i)
    7	k(j)=i31bit()
	print 17,(k(j),j=1,4)
   17	format (' Uns. 4 byte:   ',4i16)

	call rinit(1234567,7654321)
	do 8 i=1,10000
	j=min(8,i)
    8	k(j)=i16bit()
	print 18,(k(j),j=1,8)
   18	format (' Signed 2 byte: ',8i8)

	call rinit(1234567,7654321)
	do 9 i=1,10000
	j=min(8,i)
    9	k(j)=i15bit()
	print 19,(k(j),j=1,8)
   19	format (' Uns. 2 byte:   ',8i8)

	call rinit(1234567,7654321)
	do 10 i=1,10000
	j=min(16,i)
   10	k(j)=i8bit()
	print 20,(k(j),j=1,16)
   20	format (' Signed byte:   ',16i4)

	call rinit(1234567,7654321)
	do 11 i=1,10000
	j=min(16,i)
   11	k(j)=i7bit()
	print 21,(k(j),j=1,16)
   21	format (' Uns. byte:     ',16i4)

	call rinit(1234567,7654321)
	do 22 i=1,10000
	j=min(32,i)
   22	k(j)=i1bit()
	print 23,(k(j),j=1,32)
   23	format (' Random bits:   ',32i2)

        end
