anchor.diff:        END
   !
         BLOCK DATA
  +        use floatPrecision
         implicit none
  -      double precision DLAI(4),SAI(4)
  -      double precision DLRI(4),DLYI(4),AI(4),DES(4)
  -      double precision eUm(4)
  +      real(kind=fPrec) DLAI(4),SAI(4)
  +      real(kind=fPrec) DLRI(4),DLYI(4),AI(4),DES(4)
  +      real(kind=fPrec) eUm(4)
         COMMON /ALAST/DLAI,SAI
         COMMON/CRYS/ DLRI,DLYI,AI,DES
         COMMON/eUc/  eUm
  
positive.code:         COMMON  /PENCIL2/ X_PENCIL, Y_PENCIL
  !
  !
          double precision        AMPLZ
  !
        double precision XP_tangent
  !
        double precision Rcurv,C_xmax,C_ymax           !crystal geometrical parameters  - be careful! are in [m]
        double precision Alayer                           !amorphous layer [mm]
        integer C_orient                           !crystal orientation [0-1]
        double precision Cry_tilt_part                    !crystal tilt [rad]
        double precision Cry_tilt                         !crystal tilt [rad]
        double precision Cry_tilt0                        !tilt of the crystal for having channeling (determined by divergence of the beam) [rad]
        double precision Cry_length                       !original length (from the db) [m]
        double precision miscut
  !                                           !instead of this parameter, I use (mat-7)
  !
  
  
negative.code:             !           write(*,*)'s tan',Rcurv*sin(XP_tangent)
              !           write(*,*) 's tot', c_length,Rcurv*sin(cry_bend)
                         if ( XP .le. XP_tangent  ) then
  
              ! if it hits the crystal, calculate in which point and apply the
              ! transformation and drift to that point
                           a_eq=(1.+xp**2)
  