      module Vrealterp
      implicit none
c
      contains
      function terp (g1, g2, g3, g4)
      use Vterppars, only: a12, a13, a14, a23, a24, a34
      implicit none
      real terp
      real :: g1,g2,g3,g4
      terp = (1./a12 + 1./a13 + 1./a14)*g1 - a13*a14/(a12*a23*a24)*g2 + 
     1   a12*a14/(a13*a23*a34)*g3 - a12*a13/(a14*a24*a34)*g4
      return 
      end function terp
c      
      end module Vrealterp
