     program test_modulo


      PRINT*, '******************************'
      PRINT*, ' Test MOD et MODULO'
      PRINT*, '******************************'
      PRINT*

  100 format(a)
  200 format(i3)
  300 format(f6.2)

      print 100, '----------------------------------'
      print 100, 'mod(9,4) should be 1'
      print 200, mod(9 ,4 )
      print 300, mod(9.,4.)
      print 100, 'modulo(9,4) should be 1'
      print 200, modulo(9 ,4 )
      print 300, modulo(9.,4.)

      print 100, '----------------------------------'
      print 100, 'mod(-9,4) should be -1'
      print 200, mod(-9 ,4 )
      print 300, mod(-9.,4.)
      print 100, 'modulo(-9,4) should be 3'
      print 200, modulo(-9 ,4 )
      print 300, modulo(-9.,4.)

      print 100, '----------------------------------'
      print 100, 'mod(9,-4) should be 1'
      print 200, mod(9 ,-4)
      print 300, mod(9.,-4.)
      print 100, 'modulo(9,-4) should be -3'
      print 200, modulo(9 ,-4 )
      print 300, modulo(9.,-4.)

      print 100, '----------------------------------'
      print 100, 'mod(-9,-4) should be -1'
      print 200, mod(-9 ,-4 )
      print 300, mod(-9.,-4.)
      print 100, 'modulo(-9,-4) should be -1 '
      print 200, modulo(-9 ,-4 )
      print 300, modulo(-9.,-4.)
      print 100, '----------------------------------'

      stop
      end
