FUNCTION f(x)
  IMPLICIT NONE

  DOUBLE PRECISION, INTENT (in) :: x
  DOUBLE PRECISION :: f

  f = EXP(-x**2/2)
END FUNCTION f

PROGRAM gaussian
  IMPLICIT NONE
  INTERFACE
     FUNCTION f(x)
       IMPLICIT NONE

       DOUBLE PRECISION, INTENT (in) :: x
       DOUBLE PRECISION :: f
     END FUNCTION f
  END INTERFACE

  PRINT *, f(0.3d0), f(1.4d0), f(5.6d0)
END PROGRAM gaussian
