program pgm
real c,d
integer i
c = 10.01

do i = 1,10
  c = c + 10.32
end do

print *, c
end


C$Procedure            SMSGND  ( Same Sign Double Precision Numbers )

      LOGICAL FUNCTION SMSGND  ( X, Y )

C$ Abstract
C
C      A logical function that is true if the input arguments have the
C      same sign.
C
C$ Disclaimer
C
C     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
C     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
C     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
C     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
C     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
C     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
C     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
C     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
C     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
C     SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
C
C     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
C     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
C     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
C     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
C     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
C     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
C
C     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
C     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
C     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
C     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
C
C$ Required_Reading
C
C     None.
C
C$ Keywords
C
C      NUMBERS
C
C$ Declarations

      DOUBLE PRECISION   X
      DOUBLE PRECISION   Y

C$ Brief_I/O
C
C      VARIABLE  I/O  DESCRIPTION
C      --------  ---  --------------------------------------------------
C      X          I   A double precision number
C      Y          I   A double precision number
C
C$ Detailed_Input
C
C      X      is any double precision number.
C
C      Y      is any double precision number.
C
C$ Detailed_Output
C
C      SMSGND is returned as .TRUE. if X and Y are both positive or both
C             negative.
C
C$ Parameters
C
C     None.
C
C$ Particulars
C
C      This routine returns the value:
C
C            (      (( X .GT. 0) .AND. (Y .GT. 0))
C              .OR. (( X .LT. 0) .AND. (Y .LT. 0)) )
C
C      This is a more stable value than
C
C            ( X*Y .GT. 0 )
C
C      Note: If either of the to inputs is zero. The result returned
C      will be .FALSE.
C
C$ Examples
C
C      This routine can be used whenever a decision depends upon two
C      Double Precision values having the same sign.
C
C      IF ( SMSGND ( F(X1), F(X2) ) ) THEN
C            .
C            .
C         do something
C            .
C            .
C      ELSE
C            .
C            .
C         find a root of F lying between X1 and X2
C            .
C            .
C      END IF
C
C$ Restrictions
C
C      None.
C
C$ Exceptions
C
C      Error free.
C
C$ Files
C
C      None.
C
C$ Author_and_Institution
C
C      W.L. Taber      (JPL)
C
C$ Literature_References
C
C      None.
C
C$ Version
C
C-     SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)
C
C         Comment section for permuted index source lines was added
C         following the header.
C
C-     SPICELIB Version 1.0.0, 31-JAN-1990 (WLT)
C
C-&

C$ Index_Entries
C
C     same sign d.p. numbers
C
C-&

      SMSGND = (      (( X .GT. 0 ) .AND. ( Y .GT. 0 ))
     .           .OR. (( X .LT. 0 ) .AND. ( Y .LT. 0 ))
     .         )

      RETURN
      END


! @@name:	tasking.19f
! @@type:	F-free
! @@compilable:	yes
! @@linkable:	no
! @@expect:	success
subroutine matmul_depend (N, BS, A, B, C)
   integer :: N, BS, BM
   real, dimension(N, N) :: A, B, C
   integer :: i, j, k, ii, jj, kk
   BM = BS -1
   do i = 1, N, BS
      do j = 1, N, BS
         do k = 1, N, BS
!$omp task depend ( in: A(i:i+BM, k:k+BM), B(k:k+BM, j:j+BM) ) &
!$omp depend ( inout: C(i:i+BM, j:j+BM) )
            do ii = i, i+BS
               do jj = j, j+BS
                  do kk = k, k+BS
                     C(jj,ii) = C(jj,ii) + A(kk,ii) * B(jj,kk)
                  end do
               end do
            end do
!$omp end task
         end do
      end do
   end do
end subroutine


module au_si_units
  ! Conversion factors between atomic units (a.u.) and SI units
  !
  ! Atomic units are defined as:
  ! m_e = q_e = hbar = k_e = a_0 = 1
  !
  ! Variables have names of the format:
  !   [unit name]_[au|si]_[sp|dp]
  !
  ! Where units with [au] are used to convert TO au from SI and units with [SI]
  ! are used to convert FROM au to SI.
  !
  ! The [sp] and [dp] parts of a variable name indicates the real type kind of
  ! the variable.

  use iso_fortran_env, only: sp=>real32, dp=>real64

  implicit none

  ! All constants taken from:
  ! Bransden, B.H. and C.J. Joachain. Physics of Atoms and Molecules.
  ! Longman Scientific & Technical (1983).

  ! Mass of electron (kg)
  real(dp), parameter :: au_si_me_dp = 9.10953e-31_dp
  real(sp), parameter :: au_si_me_sp = real(au_si_me_dp, kind=sp)

  ! Absolute value of electron charge (C)
  real(dp), parameter :: qe_si_dp = 1.60219e-19_dp
  real(sp), parameter :: qe_sp_sp = real(qe_si_dp, kind=sp)
  real(dp), parameter :: qe_au_dp = 1.0_dp / qe_si_dp
  real(sp), parameter :: qe_au_sp = real(qe_au_dp, kind=sp)

  ! hbar -- angular momentum (J s)
  real(dp), parameter :: hbar_si_dp = 1.05459e-34_dp
  real(sp), parameter :: hbar_si_sp = real(hbar_si_dp, kind=sp)
  real(dp), parameter :: hbar_au_dp = 1.0_dp / hbar_si_dp
  real(sp), parameter :: hbar_au_sp = real(hbar_au_dp, kind=sp)

  ! Length - Bohr radius for atomic hydrogen with infinite nuclear mass (m)
  real(dp), parameter :: a0_si_dp = 5.21977e-11_dp
  real(sp), parameter :: a0_si_sp = real(a0_si_dp, kind=sp)
  real(dp), parameter :: a0_au_dp = 1.0_dp / a0_si_dp
  real(sp), parameter :: a0_au_sp = real(a0_au_dp, kind=sp)

  ! Velocity -- Magnitude of electron velocity in first Bohr obrbit (m/s)
  ! v_0 = alpha c
  real(dp), parameter :: v0_si_dp = 2.18769e6_dp
  real(sp), parameter :: v0_si_sp = real(v0_si_dp, kind=sp)
  real(dp), parameter :: v0_au_dp = 1.0_dp / v0_si_dp
  real(sp), parameter :: v0_au_sp = real(v0_au_dp, kind=sp)

  ! Momentum -- Magnitude of electron momentum in first Bohr orbit (kg m / s)
  ! p0 = m v0
  real(dp), parameter :: p0_si_dp = 1.99288e-24_dp
  real(sp), parameter :: p0_si_sp = real(p0_si_dp, kind=sp)
  real(dp), parameter :: p0_au_dp = 1.0_dp / p0_si_dp
  real(dp), parameter :: p0_au_sp = real(p0_au_dp, kind=sp)

  ! Time -- Time required for electron in first Bohr orbit to travel one Bohr radius (s)
  ! t = a0/v0
  real(dp), parameter :: t_si_dp = 2.41889e-17_dp
  real(sp), parameter :: t_si_sp = real(t_si_dp, kind=sp)
  real(dp), parameter :: t_au_dp = 1.0_dp / t_si_dp
  real(sp), parameter :: t_au_sp = real(t_au_dp, kind=sp)

  ! Angular frequency -- 1/t = v0/a0 (1/s)
  real(dp), parameter :: omega_si_dp = 4.13413e16_dp
  real(sp), parameter :: omega_si_sp = real(omega_si_dp, kind=sp)
  real(dp), parameter :: omega_au_dp = 1.0_dp / omega_si_dp
  real(sp), parameter :: omega_au_sp = real(omega_au_dp, kind=sp)

  ! Frequency -- Angular frequency of electron in first Bohr orbit (1/t = v0/a0) divided by 2pi (1/s)
  ! f = v0/(2 pi a0)
  real(dp), parameter :: f_si_dp = 6.57968e15_dp
  real(sp), parameter :: f_si_sp = real(f_si_dp, kind=sp)
  real(dp), parameter :: f_au_dp = 1.0_dp / f_si_dp
  real(sp), parameter :: f_au_sp = real(f_au_dp, kind=sp)

  ! Energy -- Twice the ionisation potential of atomic hydrogen w/infinite nuclear mass (J)
  real(dp), parameter :: e_si_dp = 4.35981e-18_dp
  real(sp), parameter :: e_sp_sp = real(e_si_dp, kind=sp)
  real(dp), parameter :: e_au_dp = 1.0_dp / e_si_dp
  real(sp), parameter :: e_au_sp = real(e_au_dp, kind=sp)

  ! Spectroscopic wavenumber -- twice the Rydberg constant (2x the wave number corresponding to the ionisation potential of atomic hydrogen w/infinite nuclear mass (1/m)
  real(dp), parameter :: nu_si_dp = 2.19464e7_dp
  real(sp), parameter :: nu_si_sp = real(nu_si_dp, kind=sp)
  real(dp), parameter :: nu_au_dp = 1.0_dp / nu_si_dp
  real(sp), parameter :: nu_au_sp = real(nu_au_dp, kind=sp)

end module au_si_units