!! Barlow and Barnett, Computing for Scientists 1998
!! page 198                 C++ and Fortran 90

! Programs shows more pitfalls of floating point math

PROGRAM non_associate

  ! to show (x+y)+z /= x+(y+z)
  
  REAL :: x = 1e8 , y = -1e8 , z = 1.0
  REAL :: xy , yz
  xy = x + y; yz = y + z                    !store result
  PRINT * , ' x+y , y+z , (x+y) + z , x + (y+z) ,'&
       & , ' supposedly equal, not 1. and 0.'
  PRINT * , xy , yz , xy + z , x + yz

END  PROGRAM non_associate

