! Figure 6.6
   module interval_addition
      public :: operator(+), add00, add11
      type, public :: interval
         real :: lower, upper
      end type interval
      interface operator(+)
         module procedure add00, add11
      end interface
   contains
      function add00 (a, b) result(c)
         type (interval), intent(in) :: a, b
         type (interval)             :: c
         c%lower = a%lower + b%lower  ! Production code would
         c%upper = a%upper + b%upper  ! allow for roundoff.
      end function add00
      function add11 (a, b) result(c)
         type (interval), dimension(:), intent(in) :: a,b
         type (interval), dimension(size(a))       :: c
         c%lower = a%lower + b%lower  ! Production code would
         c%upper = a%upper + b%upper  ! allow for roundoff.
      end function add11
   end module interval_addition
