      program    tdtrunc
      implicit   none

      real*8     dtrunc

      real*8     val

      val = 1.2d0
      do while ( val .le. 1.0d20 ) 
         write(*,100) val, dtrunc(val)
 100     format(1p,e30.16,0p,f50.20)
         val = val * 1.23456789012345d0
      end do

      stop
      end

      real*8 function dtrunc(x)
         implicit      none

         real*8        x

         dtrunc = x - mod(x,1.0d0)

         return

      end
