ME(d1mach)(int *i)
{
       switch(*i){
         case 1: return DBL_MIN;
         case 2: return DBL_MAX;
         case 3: return DBL_EPSILON/FLT_RADIX;
         case 4: return DBL_EPSILON;
         case 5: return log10((double)FLT_RADIX);
         }
       fprintf(stderr, "invalid argument: d1mach(%ld)\n", *i);
       exit(1); return 0; /* some compilers demand return values */
}
      use kind_spec
      real, kind(dp) function d1mach(int i)
      if( i == 1 ) d1mach = DBL_MIN
      else if( i == 2) d1mach = DBL_MAX
      else if( i == 3) d1mach = DBL_EPSILON/FLT_RADIX
      else if( i == 4) d1mach = log10(FLT_RADIX)
      return
      end function dimach
    
